/* Demografix — clean, modern, minimal
   Reference: Dieter Rams / Stripe / Linear */

:root {
  --bg: #ffffff;
  --bg-subtle: #f7f7f8;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e7eb;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.05), 0 12px 32px rgba(0,0,0,0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Header / Nav ─────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: max(env(safe-area-inset-top, 12px), 12px);
}

.nav-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.hero-logo {
  display: block;
  margin: 0 auto 24px;
  max-width: 200px;
  height: auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 1px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 6px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.main-nav a:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.main-nav a.active {
  color: var(--accent);
  background: rgba(37,99,235,0.08);
}

/* ── Layout ───────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-lg { padding: 96px 0; }

.section-alt { background: var(--bg-subtle); }

/* ── Hero ─────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 96px 20px 72px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-tagline {
  font-size: 1rem !important;
  color: var(--text-muted) !important;
  font-style: italic;
  margin-top: 8px !important;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: var(--bg);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  background: var(--bg-subtle);
}

.btn-sm { padding: 6px 16px; font-size: 0.85rem; }

/* ── App Cards ────────────────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.app-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-bottom: 20px;
  object-fit: cover;
}

.app-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.app-card .app-platform {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.app-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.app-card .app-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.app-card .app-links img {
  height: 40px;
  width: auto;
}

/* ── Feature Lists ────────────────────────────── */
.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.feature-list li {
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.feature-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Milestones ───────────────────────────────── */
.milestones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
}

.milestone-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.milestone-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Reviews / Testimonials ─────────────────────── */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.review-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.review-card blockquote {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.review-card .reviewer {
  font-weight: 600;
  font-size: 0.9rem;
}

.review-card .review-source {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.review-card .review-stars {
  color: #f59e0b;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* ── Screenshots ────────────────────────────────── */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.screenshot-grid img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.screenshot-grid img:hover {
  transform: scale(1.02);
}

/* ── Version History ──────────────────────────── */
.version-list {
  list-style: none;
}

.version-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.version-list li:last-child { border-bottom: none; }

.version-number {
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 4px;
}

.version-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.version-list p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ── Press / Badges ───────────────────────────── */
.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  align-items: center;
}

.press-grid img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* ── YouTube Embed ────────────────────────────── */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 24px 0;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
}

/* ── Page Header ──────────────────────────────── */
.page-header {
  padding: 64px 20px 40px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Two-column layout ────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ── Flags ────────────────────────────────────── */
.flag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
}

.flag-list img {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
}

/* ── Footer ───────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer p { margin-bottom: 4px; }

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.footer-social a:hover {
  border-color: var(--accent);
  background: rgba(37,99,235,0.05);
}

.footer-social img {
  width: 18px;
  height: 18px;
}

/* ── Utility ──────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

h2.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 8px;
}

p.section-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1rem;
}

/* ── Download CTA ─────────────────────────────── */
.download-cta {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.download-cta h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.download-cta p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .site-header {
    position: relative;
    padding-top: 24px;
  }
  
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 96px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    gap: 2px;
  }

  .main-nav a {
    padding: 10px 14px;
    font-size: 1rem;
  }

  .section { padding: 48px 0; }
  .section-lg { padding: 64px 0; }
  .hero { padding: 64px 20px 48px; }
}

/* ── Accessibility ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
