/* ==========================================================================
   actucally — landing page styles

   The palette below is copied verbatim from the app's design tokens in
   app/tailwind.config.js. The app is light-only (app.json sets
   userInterfaceStyle: "light"), so this page is light-only too.
   ========================================================================== */

/* Self-hosted (no Google Fonts CDN, for data protection). Variable font
   covers weights 200–1000, so one file serves the 400/600/700/800 in use. */
@font-face {
  font-family: 'Nunito';
  src: url('font/Nunito-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand — shades of green */
  --brand-50:  #F1F8F0;
  --brand-100: #DDEEDA;
  --brand-200: #BADDB3;
  --brand-300: #93C88A;
  --brand-400: #7FB77E;
  --brand-500: #5FA45E;
  --brand-600: #488547;
  --brand-700: #3A6A39;
  --brand-800: #2E522E;
  --brand-900: #1E361E;

  /* cream — surfaces */
  --cream-50:  #FFFFFF;
  --cream-100: #F9FCF8;
  --cream-200: #F1F8F0;
  --cream-300: #E6F2E4;

  /* ink — text is pure black; hierarchy comes from size, weight and opacity */
  --ink:        #000000;
  --ink-muted:  rgba(0, 0, 0, 0.62);
  --ink-faint:  rgba(0, 0, 0, 0.45);
  --hairline:   rgba(186, 221, 179, 0.55); /* brand-200 at ~55% */

  /* the app uses rounded-2xl (16px) almost everywhere */
  --r-card: 16px;
  --r-ctrl: 12px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(30, 54, 30, 0.06);
  --shadow-phone: 0 2px 6px rgba(30, 54, 30, 0.08), 0 24px 60px rgba(30, 54, 30, 0.18);

  --gutter: 20px;
  --maxw: 1120px;

  /* Self-hosted Nunito (see @font-face above) prepended to the app's own
     token — ui-rounded, system-ui, sans-serif — as a fallback. */
  --font: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream-50);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

a {
  color: var(--brand-700);
  text-decoration: none;
  font-weight: 600;
}
a:hover { color: var(--brand-800); }

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Type scale, mirroring src/components/ui/text.tsx
   display 36/700 · title 24/700 · subtitle 18/600 · body 16/400 · caption 14/400
   metric 48/700 in brand-700 */

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-700);
}

.caption {
  font-size: 14px;
  color: var(--ink-muted);
}

.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--ink-muted);
  max-width: 60ch;
}

.section-title {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* --------------------------------------------------------------------------
   Buttons — from src/components/ui/button.tsx
   primary: bg-brand-500, active bg-brand-600, white text
   secondary: bg-cream-100, border brand-200, text brand-800
   size lg: px-5 py-4 · rounded-2xl · font-semibold
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 22px;
  border-radius: var(--r-card);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease,
              transform 0.16s ease, box-shadow 0.16s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand-500);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(30, 54, 30, 0.12), 0 6px 18px rgba(72, 133, 71, 0.24);
}
.btn-primary:hover {
  background: var(--brand-600);
  color: #FFFFFF;
}

.btn-secondary {
  background: var(--cream-100);
  border-color: var(--brand-200);
  color: var(--brand-800);
}
.btn-secondary:hover {
  background: var(--cream-200);
  border-color: var(--brand-300);
  color: var(--brand-800);
}

/* The two CTAs are deliberately equal in weight and size. */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cta-row .btn { flex: 1 1 220px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--brand-100);
  background: rgba(255, 255, 255, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-lockup:hover { color: var(--ink); }
.brand-lockup img {
  width: 48px;
  height: 48px;
}

.header-link {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Hero — the signature app background is the LinearGradient in
   src/components/ui/screen.tsx: ['#F1F8F0', '#FFFFFF'] top to bottom.
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--cream-50) 100%);
  padding-block: clamp(40px, 6vw, 76px) clamp(48px, 7vw, 88px);
  overflow: hidden;
}

.hero::after {
  /* a soft green bloom, the same family as the splash green (brand-400) */
  content: '';
  position: absolute;
  inset: auto auto 0 50%;
  width: min(1200px, 140%);
  height: 420px;
  transform: translate(-50%, 45%);
  background: radial-gradient(closest-side, rgba(127, 183, 126, 0.20), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 5vw, 56px);
  align-items: center;
}

.hero-copy > * + * { margin-top: 20px; }

.hero h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 15ch;
}
.hero h1 .accent { color: var(--brand-700); }

.hero .lede { font-size: clamp(17px, 1.7vw, 20px); }

.cta-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-muted);
  max-width: 52ch;
}
.cta-note::before {
  content: '🌱';
  flex: none;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Phone mockup — a rebuild of the app's home screen (src/app/index.tsx),
   since the repo ships no screenshots.
   -------------------------------------------------------------------------- */

.phone-col {
  display: flex;
  justify-content: center;
}

.phone {
  width: 100%;
  max-width: 320px;
  border-radius: 42px;
  padding: 10px;
  background: linear-gradient(160deg, #2E522E, #1E361E 60%, #14240F);
  box-shadow: var(--shadow-phone);
}

.phone-screen {
  position: relative;
  border-radius: 33px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--cream-50) 62%);
  padding: 14px 16px 22px;
  min-height: 580px;
}

.phone-notch {
  width: 96px;
  height: 5px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.12);
  margin: 2px auto 14px;
}

.app-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.app-topbar .app-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.app-topbar .app-greeting {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.app-topbar .app-gear {
  font-size: 17px;
  color: var(--brand-700);
}

/* Card — rounded-2xl p-5 shadow-sm, tones default (white) and brand (brand-50) */
.app-card {
  border-radius: var(--r-card);
  padding: 16px;
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(221, 238, 218, 0.7);
}
.app-card + .app-card { margin-top: 12px; }
.app-card.tone-brand {
  background: var(--brand-50);
  border-color: var(--brand-100);
}

.app-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.app-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.app-info { font-size: 12px; color: var(--brand-700); }

/* metric: text-5xl (48px) font-bold text-brand-700 */
.app-metric {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}
.app-metric .value {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--brand-700);
}
.app-metric .unit {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-faint);
}

.app-tolerance {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink);
}

/* Badge — self-start rounded-full px-3 py-1, established tone = brand-100 */
.app-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--brand-100);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-800);
}

.app-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.app-row .big {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.app-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-700);
}
.app-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-faint);
}
.app-spark { margin-top: 10px; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(56px, 7vw, 92px); }
.section-tint { background: var(--cream-100); }

.section-head { max-width: 62ch; }
.section-head > * + * { margin-top: 12px; }

.grid {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }

/* Card — the page-level equivalent of ui/card.tsx */
.card {
  border-radius: var(--r-card);
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.card h3 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.card p { color: var(--ink-muted); }

.card-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 14px;
}

/* Numbered steps */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--brand-500);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
}

/* The confidence ladder — "Still learning about you" → "Tuned to your body" */
.ladder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.ladder .rung {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  background: var(--cream-200);
  color: var(--ink-muted);
}
.ladder .rung.is-on {
  background: var(--brand-100);
  color: var(--brand-800);
}
.ladder .arrow {
  color: var(--brand-300);
  font-weight: 700;
}

/* Grace-day chips — 🍽️ normal day / 🎉 cheat day */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.chip {
  padding: 6px 12px;
  border-radius: var(--r-ctrl);
  border: 1px solid var(--brand-200);
  background: var(--cream-100);
  font-size: 13px;
  font-weight: 600;
}

/* Range segmented control — 1M / 3M / 6M / 1Y / Max */
.segmented {
  display: inline-flex;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border-radius: var(--r-ctrl);
  background: var(--cream-200);
}
.segmented span {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}
.segmented span.is-on {
  background: var(--brand-500);
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   Privacy band
   -------------------------------------------------------------------------- */

.privacy {
  background: linear-gradient(180deg, var(--cream-50) 0%, var(--brand-50) 100%);
  padding-block: clamp(56px, 7vw, 88px);
}

.privacy-card {
  border-radius: 24px;
  background: #FFFFFF;
  border: 1px solid var(--brand-200);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 4vw, 44px);
}

.privacy-quote {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  line-height: 1.45;
  max-width: 52ch;
  margin-top: 14px;
}

.proofs {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--brand-100);
}
.proofs li {
  font-size: 15px;
  color: var(--ink-muted);
}
.proofs strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 2px;
}

/* --------------------------------------------------------------------------
   Final CTA + footer
   -------------------------------------------------------------------------- */

.final {
  padding-block: clamp(56px, 7vw, 92px);
  text-align: center;
}
.final .section-head {
  margin-inline: auto;
  text-align: center;
}
.final .lede { margin-inline: auto; }
.final .cta-row {
  margin-top: 32px;
  max-width: 620px;
  margin-inline: auto;
}

.expect {
  margin-top: 32px;
  display: grid;
  gap: 10px;
  justify-items: center;
  font-size: 15px;
  color: var(--ink-muted);
}
.expect li::before {
  content: '✓';
  color: var(--brand-500);
  font-weight: 800;
  margin-right: 8px;
}

.site-footer {
  border-top: 1px solid var(--brand-100);
  background: var(--cream-100);
  padding-block: 32px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a { font-size: 14px; }

/* --------------------------------------------------------------------------
   Prose (privacy.html)
   -------------------------------------------------------------------------- */

.prose {
  max-width: 72ch;
  margin-inline: auto;
  padding-block: clamp(40px, 6vw, 72px);
}
.prose h1 {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.prose h2 {
  font-size: 21px;
  font-weight: 800;
  margin-top: 40px;
  margin-bottom: 10px;
}
.prose p,
.prose li { color: var(--ink-muted); }
.prose p + p { margin-top: 14px; }
.prose .updated {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-muted);
}
.prose .callout {
  margin-top: 28px;
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
}
.prose .callout p { color: var(--ink); font-weight: 600; }
.prose ul {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.prose ul li { padding-left: 20px; position: relative; }
.prose ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--brand-300);
}
.prose .back { display: inline-block; margin-top: 40px; }

/* --------------------------------------------------------------------------
   Reveal on scroll — degrades to visible if JS or IO is unavailable
   -------------------------------------------------------------------------- */

/* Only hide when scripting is on — without JS every .reveal stays visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

@media (min-width: 620px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .proofs { grid-template-columns: repeat(3, 1fr); }
  .expect {
    grid-auto-flow: column;
    justify-content: center;
    gap: 28px;
  }
}

@media (min-width: 860px) {
  :root { --gutter: 32px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
  .hero h1 { max-width: 13ch; }
}
