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

/* ─── Theme tokens ───────────────────────────────────────────────────────── */
:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --text: #1E293B;
  --text-strong: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --primary: #1D4ED8;
  --primary-hover: #1E40AF;
  --primary-text: #FFFFFF;
  --primary-soft: #DBEAFE;
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.2);
  --success: #15803D;
  --overlay: rgba(15, 23, 42, 0.45);
  --phone-bezel: #1E293B;
  --phone-screen: #E2E8F0;
  --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --section-alt-bg: #F1F5F9;
  --badge-filter: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1220;
    --surface: #111A2E;
    --surface-alt: #0B1220;
    --text: #E2E8F0;
    --text-strong: #FFFFFF;
    --text-muted: #9AA4B2;
    --text-subtle: #64748B;
    --primary: #0B5FFF;
    --primary-hover: #0950D8;
    --primary-text: #FFFFFF;
    --primary-soft: rgba(11, 95, 255, 0.22);
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.25);
    --success: #16A34A;
    --overlay: rgba(0, 0, 0, 0.6);
    --phone-bezel: #1E293B;
    --phone-screen: #1E293B;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --section-alt-bg: #0F172A;
    --badge-filter: invert(1);
  }
}

/* Manual theme override via data attribute */
[data-theme="light"] {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --text: #1E293B;
  --text-strong: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --primary: #1D4ED8;
  --primary-hover: #1E40AF;
  --primary-text: #FFFFFF;
  --primary-soft: #DBEAFE;
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.2);
  --success: #15803D;
  --overlay: rgba(15, 23, 42, 0.45);
  --phone-bezel: #1E293B;
  --phone-screen: #E2E8F0;
  --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --section-alt-bg: #F1F5F9;
  --badge-filter: none;
}

[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #111A2E;
  --surface-alt: #0B1220;
  --text: #E2E8F0;
  --text-strong: #FFFFFF;
  --text-muted: #9AA4B2;
  --text-subtle: #64748B;
  --primary: #0B5FFF;
  --primary-hover: #0950D8;
  --primary-text: #FFFFFF;
  --primary-soft: rgba(11, 95, 255, 0.22);
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.25);
  --success: #16A34A;
  --overlay: rgba(0, 0, 0, 0.6);
  --phone-bezel: #1E293B;
  --phone-screen: #1E293B;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --section-alt-bg: #0F172A;
  --badge-filter: invert(1);
}

/* ─── Base ────────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

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

section {
  padding: 80px 0;
}

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

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-strong);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text-strong);
  text-decoration: none;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  transition: border-color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
}

/* Mobile nav */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.nav-hamburger svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding-top: 96px;
  padding-bottom: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-split {
  display: flex;
  align-items: center;
  gap: 64px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-strong);
  margin-bottom: 16px;
}

.hero .subtitle {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-visual {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

@media (max-width: 640px) {
  .hero {
    padding-top: 96px;
    min-height: auto;
  }
  .hero-split {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }
  .hero h1 { font-size: 28px; white-space: nowrap; }
  .hero .subtitle { font-size: 17px; margin-left: auto; margin-right: auto; }
  .hero-cta { align-items: center; }
}

/* ─── Waitlist form ──────────────────────────────────────────────────────── */
.waitlist-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  width: 100%;
}

.waitlist-form input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.waitlist-form input[type="email"]::placeholder {
  color: var(--text-subtle);
}

.waitlist-form input[type="email"]:focus {
  border-color: var(--primary);
}

.waitlist-form button {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.waitlist-form button:hover {
  background: var(--primary-hover);
}

.waitlist-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.waitlist-message {
  font-size: 14px;
  margin-top: 8px;
  min-height: 20px;
}

.waitlist-message.success { color: var(--success); }
.waitlist-message.error { color: #DC2626; }

/* ─── App Store badges ───────────────────────────────────────────────────── */
.store-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.store-badge {
  height: 44px;
  opacity: 0.4;
  filter: var(--badge-filter);
  cursor: default;
  transition: opacity 0.15s;
}

.store-badge.active {
  opacity: 1;
  cursor: pointer;
}

.store-badge.active:hover {
  opacity: 0.85;
}

.badge-note {
  font-size: 13px;
  color: var(--text-subtle);
  text-align: center;
}

/* ─── Section headings ───────────────────────────────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: 56px;
}

.section-heading h2 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin-bottom: 12px;
}

.section-heading p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .section-heading h2 { font-size: 28px; }
  .section-heading p { font-size: 16px; }
  .section-heading { margin-bottom: 40px; }
}

/* ─── How It Works ───────────────────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 8px;
}

.step-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ─── Features ───────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ─── Product walkthrough ────────────────────────────────────────────────── */
.walkthrough-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 16px;
  margin-bottom: 24px;
  scrollbar-width: thin;
  justify-content: safe center;
}

.walkthrough-scroll:last-child {
  margin-bottom: 0;
}

.walkthrough-scroll::-webkit-scrollbar {
  height: 6px;
}

.walkthrough-scroll::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 3px;
}

.walkthrough-scroll::-webkit-scrollbar-thumb {
  background: var(--text-subtle);
  border-radius: 3px;
}

.walkthrough-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  text-align: center;
}

.walkthrough-item .caption {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ─── Phone mockup (CSS-only) ────────────────────────────────────────────── */
.phone-frame {
  width: 220px;
  aspect-ratio: 9 / 19.5;
  border-radius: 32px;
  border: 4px solid var(--phone-bezel);
  background: var(--phone-screen);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* No fake notch — screenshots include the real Dynamic Island */

.phone-frame .placeholder {
  font-size: 13px;
  color: var(--text-subtle);
  text-align: center;
  padding: 16px;
}

.phone-frame img,
.phone-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Theme-aware screenshots: show light by default, dark in dark mode */
.screenshot-dark { display: none; }
.screenshot-light { display: block; }

@media (prefers-color-scheme: dark) {
  .screenshot-dark { display: block; }
  .screenshot-light { display: none; }
}

[data-theme="dark"] .screenshot-dark { display: block; }
[data-theme="dark"] .screenshot-light { display: none; }
[data-theme="light"] .screenshot-dark { display: none; }
[data-theme="light"] .screenshot-light { display: block; }

.phone-frame-lg {
  width: 280px;
  border-radius: 40px;
  border-width: 5px;
}


/* ─── Coverage ───────────────────────────────────────────────────────────── */
.coverage-content {
  display: flex;
  gap: 48px;
  align-items: center;
}

.coverage-map {
  flex: 1;
  min-width: 0;
}

.coverage-map-img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.coverage-info {
  flex: 1;
  min-width: 0;
}

.coverage-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 16px;
}

.coverage-info p {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.data-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.data-badge:hover {
  opacity: 0.8;
  text-decoration: none;
}

.data-details {
  padding-left: 20px;
  margin-bottom: 20px;
}

.data-details li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0;
  line-height: 1.5;
}

.data-details strong {
  color: var(--text-strong);
}

.expand-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-subtle);
  font-style: italic;
}

@media (max-width: 640px) {
  .coverage-content {
    flex-direction: column;
    gap: 32px;
  }
}

/* ─── Bottom CTA ─────────────────────────────────────────────────────────── */
.bottom-cta {
  text-align: center;
  padding: 80px 0;
}

.bottom-cta h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin-bottom: 12px;
}

.bottom-cta p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.bottom-cta .waitlist-form {
  margin: 0 auto;
}

.bottom-cta .store-badges {
  margin-top: 24px;
}

@media (max-width: 640px) {
  .bottom-cta h2 { font-size: 28px; }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-strong);
  text-decoration: none;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-subtle);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ─── Scroll animations ─────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Legal pages ────────────────────────────────────────────────────────── */
.legal-page {
  padding-top: 120px;
  padding-bottom: 80px;
}

.legal-page h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 8px;
}

.legal-page .last-updated {
  font-size: 14px;
  color: var(--text-subtle);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-page h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-strong);
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-page p {
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal-page ul, .legal-page ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-page li {
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.6;
}

.legal-page a {
  color: var(--primary);
}

@media (max-width: 640px) {
  .legal-page { padding-top: 96px; }
  .legal-page h1 { font-size: 28px; }
}
