:root {
  --bg: #f4f1ea; --surface: #fbf9f4; --ink: #1b1a17; --ink-2: #57534a; --ink-muted: rgba(27, 26, 23, 0.3);
  --rule: #ddd6c7; --accent: #2a4bd7;
  --done: #2f7d4f; --partial: #9a6a00; --missed: #b3261e; --today: #ebe6da;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Geist", "Manrope", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, ol { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
code, .mono { font-family: var(--mono); }
code { font-size: 0.875em; background: #ece7dc; padding: 2px 4px; border-radius: 4px; white-space: nowrap; }

/* Text styles (B1) */
.heading-1 { font-size: 3.75rem; line-height: 1; font-weight: 600; letter-spacing: -0.025em; }
.heading-2 { font-size: 3rem; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.heading-3 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; letter-spacing: -0.015em; }
.heading-4 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.title-1 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 500; }
.title-2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.title-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.body-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 400; }
.body-6 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.caption-2 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.caption-3 { font-size: 0.75rem; line-height: 1rem; font-weight: 600; }
.caption-4 { font-size: 0.75rem; line-height: 1rem; font-weight: 500; }
.caption-5 { font-size: 0.75rem; line-height: 1rem; font-weight: 400; }
.button-md { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.muted { color: var(--ink-2); }
.grad { background: linear-gradient(90deg, #000000, #666666); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Skip link */
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Buttons (B2, B9) */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px;
  background: var(--ink); color: var(--bg); text-decoration: none;
  font-size: 1rem; line-height: 1.5rem; font-weight: 600;
  transition: transform 500ms var(--ease), opacity 300ms var(--ease);
}
.btn:hover { transform: translateY(-2px); opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn-sm { font-size: 0.875rem; line-height: 1.25rem; border-radius: 8px; }

/* Nav (B7) */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 24px; padding: 8px 8px 8px 16px; border-radius: 16px;
  background: rgba(251, 249, 244, 0.7); border: 1px solid var(--rule);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; transition: color 300ms var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.menu-toggle { display: none; position: relative; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.menu-toggle span { position: absolute; left: 12px; width: 16px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 500ms var(--ease); }
.menu-toggle span:first-child { transform: translateY(-4px); }
.menu-toggle span:last-child { transform: translateY(4px); }
.nav.open .menu-toggle span:first-child { transform: rotate(45deg); }
.nav.open .menu-toggle span:last-child { transform: rotate(-45deg); }

/* Layout */
main { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.label { color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }

/* Hero (B5) */
.hero { padding: 160px 0 64px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); background: var(--surface); border: 1px solid var(--rule); padding: 4px 12px; border-radius: 9999px; margin-bottom: 24px; }
.hero h1, .hero .sub { max-width: 680px; }
.hero .sub { color: var(--ink-2); margin-top: 24px; font-size: 1.125rem; line-height: 1.75rem; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 32px; }
.video-frame { width: 100%; margin-top: 64px; padding: 8px; background: var(--surface); border: 1px solid var(--rule); border-radius: 24px; box-shadow: 0 32px 64px rgba(27, 26, 23, 0.12); }
.video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--bg); }

/* Problem */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.icon { font-size: 1.5rem; color: var(--accent); margin-bottom: 8px; }

/* Tagline reveal (B11) */
.tagline { display: flex; justify-content: center; text-align: center; padding: 128px 0; }
.tagline-text { max-width: 680px; }
.tagline-text .w { color: var(--ink-muted); transition: color 500ms var(--ease); }
.tagline-text .w.on { color: var(--ink); }

/* Steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.step-n { color: var(--accent); font-size: 0.875rem; line-height: 1.25rem; margin-bottom: 8px; }

/* Proof */
.proof { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; margin-top: 40px; align-items: start; }
.stats { display: flex; flex-direction: column; gap: 24px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.answer { gap: 16px; }
.answer b { font-weight: 600; }
.answer figcaption { display: flex; align-items: center; gap: 4px; }

/* Plan and notes */
.ticks { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; }
.ticks i { color: var(--accent); font-size: 1.25rem; flex: none; transform: translateY(3px); }
.week { gap: 12px; }
.week table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.25rem; }
.week caption { text-align: left; padding-bottom: 8px; }
.week th { text-align: left; font-weight: 500; color: var(--ink-2); width: 48px; }
.week th, .week td { padding: 8px 4px; border-top: 1px solid var(--rule); vertical-align: top; }
.week td:last-child { white-space: nowrap; text-align: right; }
.week tr.today th, .week tr.today td { background: var(--today); }
.st { font-weight: 600; }
.st.done { color: var(--done); }
.st.partial, .st.over { color: var(--partial); }
.st.missed { color: var(--missed); }

/* FAQ */
.faq { margin-top: 40px; border-top: 1px solid var(--rule); max-width: 800px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { color: var(--ink-2); transition: transform 500ms var(--ease); }
.faq details[open] summary i { transform: rotate(45deg); }
.faq details p { padding-bottom: 24px; max-width: 680px; }

/* Final CTA */
.final { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }

/* Footer */
.footer { max-width: 1120px; margin: 0 auto; padding: 32px 24px 48px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 24px; }
.footer a { color: var(--ink-2); text-decoration: none; transition: color 300ms var(--ease); }
.footer a:hover { color: var(--ink); }

/* Legal + 404 pages */
.page { max-width: 680px; padding: 160px 24px 96px; display: flex; flex-direction: column; gap: 16px; }
.page h2 { margin-top: 16px; }

/* Scroll reveal (B7) */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .heading-1 { font-size: 3rem; line-height: 1; }
  .cards { grid-template-columns: 1fr 1fr; }
  .steps, .split, .proof { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .heading-1 { font-size: 2.25rem; line-height: 2.5rem; }
  .heading-2 { font-size: 1.875rem; line-height: 2.25rem; }
  .heading-3 { font-size: 1.5rem; line-height: 2rem; }
  .hero { padding-top: 128px; }
  .hero .sub { font-size: 1rem; line-height: 1.5rem; }
  .section { padding: 64px 0; }
  .tagline { padding: 96px 0; }
  .cards { grid-template-columns: 1fr; }
  .video-frame { margin-top: 40px; border-radius: 16px; }
  .video-frame video { border-radius: 8px; }
  .nav { left: 16px; right: 16px; transform: none; justify-content: space-between; }
  .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .nav-links {
    /* the nav's backdrop-filter traps fixed children, so the sheet hangs below the bar instead */
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; height: calc(100dvh - 96px);
    flex-direction: column; gap: 24px; padding: 32px 24px; border-radius: 16px; border: 1px solid var(--rule);
    background: rgba(244, 241, 234, 0.98); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease);
  }
  .nav-links a { font-size: 1.5rem; line-height: 2rem; color: var(--ink); opacity: 0; transform: translateY(24px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; }
  .nav.open .nav-links a { opacity: 1; transform: none; }
  .nav.open .nav-links a:nth-child(2) { transition-delay: 60ms; }
  .nav.open .nav-links a:nth-child(3) { transition-delay: 120ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 300ms linear; }
  .tagline-text .w { color: var(--ink); transition: none; }
  .nav-links a { transform: none !important; }
}

/* Export guide */
.guide { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.template { margin-top: 24px; }
.template pre { margin: 0; white-space: pre-wrap; font-family: var(--font); background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; padding: 16px; }
.page a { overflow-wrap: anywhere; }
