:root {
  --ink: #1f2320;
  --ink-soft: #526158;
  --paper: #f8f5ef;
  --mist: #edf3f0;
  --sage: #4f6f5f;
  --bamboo: #a7b86a;
  --sky: #2f78d6;
  --clay: #d98d5f;
  --error: #9a4f2e;
  --white: #ffffff;
  --border: rgba(31, 35, 32, 0.14);
  --shadow: 0 24px 80px rgba(31, 35, 32, 0.12);
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 36px;
  --onboarding-selected-bg: #e0e8d0;
  --onboarding-panel-bg: rgba(255, 255, 255, .72);
  --onboarding-progress-bg: rgba(31, 35, 32, .12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.drawer-open { overflow: hidden; }

img, svg { max-width: 100%; height: auto; }

a { color: inherit; }

p { color: var(--ink-soft); margin: 0 0 1rem; }

h1, h2, h3 { line-height: 1.04; margin: 0; letter-spacing: -0.04em; }

h1 { font-size: clamp(2.45rem, 7vw, 4.7rem); max-width: 850px; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); letter-spacing: -0.025em; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

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

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 4px;
  border-radius: 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 245, 239, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap, .section, .footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 20px;
}

.logo-link { display: inline-flex; align-items: center; min-height: 48px; }
.logo-link img { width: 160px; display: block; }

.desktop-nav { display: flex; align-items: center; gap: 6px; }

.desktop-nav a, .drawer-panel a:not(.button), .footer-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 750;
  color: var(--ink-soft);
}

.desktop-nav a[aria-current="page"], .desktop-nav a:hover, .drawer-panel a:hover, .footer-link:hover {
  color: var(--ink);
  background: var(--mist);
}

.button {
  min-height: 52px;
  min-width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-weight: 850;
  line-height: 1.1;
  cursor: pointer;
}

.button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(31, 35, 32, 0.16); }
.button.secondary { background: var(--mist); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }
.button.light { background: var(--white); color: var(--ink); }
.button.full { width: 100%; }

.menu-button { display: none; background: var(--mist); color: var(--ink); }

.drawer[hidden] { display: none; }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(31, 35, 32, 0.32);
  display: flex;
  justify-content: flex-end;
}

.drawer-panel {
  width: min(420px, 100%);
  height: 100%;
  background: var(--paper);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.drawer-close { background: var(--ink); color: var(--white); width: 52px; padding: 0; }
.drawer-nav { display: grid; gap: 6px; }
.drawer-nav a:not(.button) { justify-content: flex-start; padding-inline: 18px; }

.section { padding: 88px 0; }
.section.tight { padding: 52px 0; }
.hero { padding-top: 48px; }

.hero-grid, .split-grid, .download-grid, .contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, .98fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--sage);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
}

.lead { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 690px; margin-top: 20px; }
.hero-actions, .cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .58);
  color: var(--ink);
  font-weight: 800;
  font-size: .94rem;
}

.hero-visual, .media-card, .panel, .quote-panel, .form-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .62);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual { padding: 12px; }
.media-card { padding: clamp(18px, 3vw, 30px); }
.panel, .quote-panel, .form-card { padding: clamp(24px, 4vw, 40px); }
.mist { background: var(--mist); }

.section-heading { display: grid; gap: 14px; margin-bottom: 34px; max-width: 780px; }
.section-heading.center { text-align: center; margin-inline: auto; }

.grid { display: grid; gap: 18px; }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  min-height: 100%;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .72);
}

.card h3 { margin-bottom: 12px; }
.icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--mist);
  color: var(--sage);
  font-weight: 900;
  font-size: 1.4rem;
}

.step { position: relative; padding-left: 86px; }
.step-number {
  position: absolute;
  left: 24px;
  top: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.timeline { display: grid; gap: 16px; }
.timeline-item { display: grid; grid-template-columns: 84px 1fr; gap: 18px; align-items: start; }
.timeline-item strong { color: var(--sage); }

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border-radius: 16px;
  padding: 8px 18px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-weight: 850;
}

.app-store-badge span { display: block; font-size: .73rem; line-height: 1; opacity: .85; font-weight: 700; }
.app-store-badge strong { display: block; font-size: 1.18rem; line-height: 1.1; }
.apple { font-size: 1.85rem; line-height: 1; }

.qr-card { display: grid; grid-template-columns: 154px 1fr; gap: 20px; align-items: center; }
.qr-card img { border-radius: 18px; border: 1px solid var(--border); background: var(--paper); }

.disclaimer {
  border-left: 5px solid var(--clay);
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(217, 141, 95, .12);
  color: var(--ink);
}

.faq-list { display: grid; gap: 12px; }
details {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, .72);
  padding: 0 20px;
}
summary {
  min-height: 60px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 850;
}
details p { padding-bottom: 18px; }

.hero-band {
  background: linear-gradient(135deg, var(--mist), rgba(167, 184, 106, .24));
  border-block: 1px solid var(--border);
}

.page-hero { padding: 76px 0; }
.page-hero .lead { max-width: 760px; }

.list-check { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.list-check li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; color: var(--ink-soft); }
.list-check li::before { content: "✓"; color: var(--sage); font-weight: 900; }

.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
label { font-weight: 850; }
input, select, textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}
textarea { min-height: 150px; resize: vertical; }
.helper { color: var(--ink-soft); font-size: .95rem; }
.form-note { margin-top: 0; }
.form-status { margin: 0; font-weight: 850; color: var(--sage); }
.form-status[data-state="error"] { color: var(--error); }

.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 104px; padding: 20px; border-radius: 22px; background: var(--mist); }
.toc a { display: block; padding: 8px 0; color: var(--ink-soft); font-weight: 800; text-decoration: none; }
.legal-copy { max-width: 780px; }
.legal-copy h2 { margin-top: 44px; font-size: clamp(1.6rem, 3vw, 2.2rem); }

.onboarding-page {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at top left, rgba(167, 184, 106, .18), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(217, 141, 95, .16), transparent 28rem),
    var(--paper);
}

.onboarding-shell {
  min-height: 100vh;
  min-height: 100svh;
  padding: 18px 0 32px;
}

.onboarding-app, .onboarding-fallback {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.onboarding-topbar {
  min-height: 74px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.onboarding-toplinks {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.onboarding-toplinks a, .back-link, .text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.onboarding-toplinks a:hover, .back-link:hover, .text-button:hover {
  background: var(--mist);
  color: var(--ink);
}

.onboarding-progress {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 900;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--onboarding-progress-bg);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--bamboo));
  transition: width .36s ease;
}

.onboarding-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .65fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: stretch;
  padding-top: clamp(18px, 4vw, 48px);
}

.onboarding-main-card, .onboarding-fallback-card, .rail-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--onboarding-panel-bg);
  box-shadow: var(--shadow);
}

.onboarding-main-card, .onboarding-fallback-card {
  min-height: min(720px, calc(100vh - 150px));
  min-height: min(720px, calc(100svh - 150px));
  display: grid;
  align-items: center;
  padding: clamp(26px, 5vw, 58px);
}

.onboarding-fallback-card {
  max-width: 760px;
  min-height: auto;
  margin: clamp(28px, 8vw, 80px) auto 0;
}

.onboarding-step {
  display: grid;
  gap: 20px;
}

.onboarding-step h1 { font-size: clamp(2.2rem, 6vw, 4.1rem); }
.onboarding-step .lead { margin-top: 0; }
.step-helper { font-size: 1.05rem; }

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.option-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.option-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  text-align: left;
  font: inherit;
  box-shadow: 0 12px 32px rgba(31, 35, 32, .07);
  cursor: pointer;
}

.option-card:hover { border-color: rgba(79, 111, 95, .5); }
.option-card.is-selected { border: 2px solid var(--sage); background: var(--onboarding-selected-bg); }
.option-card strong { display: block; font-size: 1.08rem; line-height: 1.2; }
.option-card small { display: block; margin-top: 6px; color: var(--ink-soft); line-height: 1.4; }
.option-card em { display: inline-flex; margin-top: 10px; color: var(--sage); font-style: normal; font-weight: 900; font-size: .86rem; }

.selected-mark {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--sage);
  color: var(--white);
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}

.selected-mark.muted { background: var(--mist); color: var(--ink-soft); }

.validation-message {
  min-height: 28px;
  color: var(--error);
  font-weight: 800;
  margin: 0;
}

.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.onboarding-actions .button[disabled] {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.onboarding-rail {
  display: grid;
  align-content: start;
  gap: 18px;
}

.rail-card { padding: clamp(22px, 3vw, 32px); }
.rail-card h2 { font-size: clamp(1.55rem, 2.5vw, 2.2rem); }
.rail-card.soft { background: var(--mist); box-shadow: none; }

.loading-step { justify-items: center; text-align: center; }

.breathing-circle {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 184, 106, .72), rgba(79, 111, 95, .16));
  animation: breathe 1.4s ease-in-out infinite alternate;
}

@keyframes breathe {
  from { transform: scale(.92); opacity: .75; }
  to { transform: scale(1.04); opacity: 1; }
}

.result-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(20px, 4vw, 32px);
  background: var(--white);
}

.result-card h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }

.summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.summary-list div {
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--mist);
}

.summary-list dt {
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.summary-list dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-weight: 900;
}

.onboarding-disclaimer {
  border-left: 4px solid var(--sage);
  padding-left: 14px;
  color: var(--ink);
  font-weight: 750;
}

.result-actions .text-button { padding-inline: 6px; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--ink);
  color: var(--white);
  padding: 56px 0 28px;
}
.site-footer p { color: rgba(255,255,255,.72); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr .8fr; gap: 34px; }
.footer-grid h2, .footer-grid h3 { letter-spacing: -0.02em; }
.footer-link { color: rgba(255,255,255,.78); padding-left: 0; justify-content: flex-start; }
.footer-link:hover { background: rgba(255,255,255,.08); color: var(--white); padding-left: 14px; }
.fine-print { width: min(1180px, calc(100% - 32px)); margin: 34px auto 0; color: rgba(255,255,255,.6); font-size: .9rem; }

@media (max-width: 980px) {
  .desktop-nav, .header-cta { display: none; }
  .menu-button { display: inline-flex; }
  .hero-grid, .split-grid, .download-grid, .contact-grid, .legal-layout, .onboarding-grid { grid-template-columns: 1fr; }
  .grid.four, .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onboarding-topbar { grid-template-columns: 1fr; align-items: start; }
  .onboarding-progress { order: 3; }
  .onboarding-toplinks { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .toc { position: static; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav-wrap, .section, .footer-grid, .fine-print, .onboarding-app, .onboarding-fallback { width: min(100% - 24px, 1180px); }
  .section { padding: 64px 0; }
  .hero { padding-top: 28px; }
  .grid.four, .grid.three, .grid.two, .option-grid, .option-grid.compact, .summary-list { grid-template-columns: 1fr; }
  .hero-actions, .cta-row { flex-direction: column; align-items: stretch; }
  .button, .app-store-badge { width: 100%; }
  .onboarding-shell { padding-top: 10px; padding-bottom: 20px; }
  .onboarding-topbar { gap: 12px; }
  .onboarding-toplinks { gap: 0; }
  .onboarding-toplinks a { padding-inline: 10px; }
  .onboarding-grid { padding-top: 18px; }
  .onboarding-main-card, .onboarding-fallback-card { min-height: auto; padding: 22px; border-radius: 26px; }
  .onboarding-step { gap: 16px; }
  .option-card { grid-template-columns: 1fr; min-height: 82px; }
  .selected-mark { width: max-content; }
  .onboarding-actions { position: sticky; bottom: 0; z-index: 10; margin-inline: -22px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); background: rgba(248, 245, 239, .94); border-top: 1px solid var(--border); }
  .welcome-step .hero-actions, .result-actions { position: static; margin-inline: 0; padding: 0; background: transparent; border-top: 0; }
  .qr-card { grid-template-columns: 1fr; }
  .qr-card img { width: 180px; }
  .footer-grid { grid-template-columns: 1fr; }
  .step { padding-left: 26px; padding-top: 78px; }
  .step-number { left: 26px; }
  .timeline-item { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .button:hover { transform: none; }
  .breathing-circle { animation: none; }
}
