/* ============================================================
   Dopamind — getdopamind.com
   Visual language mirrors the app (app/src/design/tokens.ts):
   violet brand accent, cyan secondary, dark violet atmosphere.
   Reserved hues follow the app's discipline — gold = milestone/XP,
   green = growth/tree, red = panic. Never decoration.
   No external requests: self-hosted font, inline/local SVG only.
   ============================================================ */

/* ---------- Font (self-hosted, variable, latin) ---------- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/PlusJakartaSans-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* atmosphere — app palette.bg / bgGlow / surface / border */
  --bg: #060410;
  --bg-2: #17102e;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(139, 110, 255, 0.22);
  --border-strong: rgba(139, 110, 255, 0.45);

  /* brand — Dopamind violet (app palette.accent) */
  --accent: #7b61ff;
  --accent-light: #a78bfa;
  --accent-pale: #c9b8ff;

  /* secondary — cyan, the ONLY second global hue */
  --cyan: #22d3ee;

  /* reserved semantic hues — never decoration */
  --gold: #ffb020; /*   milestone / XP only */
  --gold-deep: #f59e0b;
  --growth: #34d399; /* growth / tree only */
  --danger: #f0574a; /* panic / slip only */

  /* solid CTA ramp — single-hue violet, deepened toward the bottom */
  --cta-top: #7059e9;
  --cta-bottom: #5b45c7;
  --grad: linear-gradient(180deg, var(--cta-top), var(--cta-top) 45%, var(--cta-bottom));
  --sheen: rgba(255, 255, 255, 0.22);
  --on-cta: #ffffff;

  /* display gradient — violet family only, pale → light → brand */
  --grad-text: linear-gradient(120deg, var(--accent-pale), var(--accent-light) 55%, var(--accent));
  --grad-warm: linear-gradient(120deg, var(--gold), var(--gold-deep));

  --accent-soft: rgba(123, 97, 255, 0.16);
  --cyan-soft: rgba(34, 211, 238, 0.1);
  --cyan-border: rgba(34, 211, 238, 0.3);
  --gold-soft: rgba(255, 176, 32, 0.12);
  --gold-border: rgba(255, 176, 32, 0.28);
  --danger-soft: rgba(240, 87, 74, 0.12);

  /* text-2/-3 are lighter than the app's text2/text3 on purpose (owner,
     2026-10-24): the app's lavender-grey read as squinting-dim in the site's
     long paragraphs. An off-white keeps the hierarchy under --text. */
  --text: #f2eeff;
  --text-2: #d3cee6;
  --text-3: #aaa3c7;

  --glass: rgba(14, 10, 26, 0.93);
  --glass-border: rgba(139, 110, 255, 0.18);

  /* radii — app radii.sm/md/lg, plus one step up for full-width bands */
  --r-xl: 24px;
  --r-lg: 22px;
  --r-md: 17px;
  --r-sm: 13px;

  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 8px 40px rgba(123, 97, 255, 0.3);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;

  --container: 1140px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-2);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  /* accent-light, not accent: #7b61ff only reaches 3.9:1 on the violet bg —
     #a78bfa clears AA (6.7:1) for inline body links. */
  color: var(--accent-light);
  text-decoration: none;
}

a:hover {
  color: var(--accent-pale);
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

ul[class],
ol[class] {
  list-style: none;
}

::selection {
  background: rgba(123, 97, 255, 0.45);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: var(--on-cta);
  font-weight: 700;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  color: var(--on-cta);
}

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Ambient background ---------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* violet-dominant with a cyan whisper — the app's heroTint ratio (0.17 : 0.06)
     scaled up to full-viewport washes. */
  background:
    radial-gradient(52rem 34rem at 82% -6%, rgba(123, 97, 255, 0.18), transparent 60%),
    radial-gradient(46rem 30rem at -12% 22%, rgba(167, 139, 250, 0.1), transparent 60%),
    radial-gradient(60rem 40rem at 50% 118%, rgba(34, 211, 238, 0.07), transparent 60%),
    var(--bg);
}

.bg-fx::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(139, 110, 255, 0.18) 1px, transparent 1.4px);
  background-size: 34px 34px;
  mask-image: radial-gradient(48rem 30rem at 70% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(48rem 30rem at 70% 0%, #000 0%, transparent 72%);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color 0.25s, border-color 0.25s;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--text);
}

/* No radius here on purpose: the mark is now a background-free tree SVG, not the
   app icon's rounded square. Rounding it would clip the canopy. */
.brand img {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-links a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s, background-color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-cta a.btn {
  margin-left: 0.4rem;
}

.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: var(--on-cta);
  background:
    linear-gradient(180deg, var(--sheen), transparent 52%),
    var(--grad);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded='true'] .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s;
}

/* Top sheen layered over the CTA ramp — the app's solid CTA lights its upper
   edge instead of reaching for a second hue. Layered as a background rather
   than a pseudo-element so it can never paint over the label. */
.btn-primary {
  background:
    linear-gradient(180deg, var(--sheen), transparent 52%),
    var(--grad);
  color: var(--on-cta);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  color: var(--on-cta);
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(123, 97, 255, 0.45);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: 0.92rem;
}

/* Waiting on the server: dimmed, no lift, and a cursor that says "working"
   rather than "forbidden" — the click was accepted, it just isn't back yet. */
.btn:disabled,
.btn:disabled:hover {
  cursor: progress;
  transform: none;
  opacity: 0.75;
}

.btn-primary:disabled {
  box-shadow: none;
}

/* Drawn in the label's own colour, so it brings no hue of its own. Under
   reduced motion the global rule stops it, which leaves a still ring beside
   "Sending…" — the label alone still says what is happening. */
.btn-spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Form status line ----------
   The one line under a form that says what is happening — the hint before a
   submission, then pending, sent or what went wrong. Used by the contact form. */
.form-note {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-3);
}

.form-note.is-error {
  color: var(--danger);
}

.form-note.is-success {
  color: var(--growth);
  font-weight: 600;
}

/* ---------- Honeypot ----------
   Off-screen rather than display:none — some form-fillers skip hidden inputs,
   and one that is merely positioned away still looks fillable to them while
   staying unreachable for a human (tabIndex -1, aria-hidden, no label). */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Turnstile renders in `execute` mode, so this is empty until a submission
   actually needs a challenge — no reserved gap in the layout for the
   overwhelming majority of visitors who never see it. */
.turnstile-slot:not(:empty) {
  margin-top: 1rem;
}

/* ---------- Contact form ---------- */
/* The page box comes from `.legal`, which reserves 46rem, but every child here
   is capped at 34rem — so the whole column sat 6rem left of where the eye reads
   the page's centre. Narrow the box to the column instead of floating a narrow
   column inside a wide one. Two classes, so it wins over `.legal` regardless of
   which rule the file happens to declare first. */
.legal.contact-page {
  width: min(34rem, 100% - 2.5rem);
}

.contact-page .lead-sm {
  font-size: 1.06rem;
  max-width: 34rem;
  margin-bottom: 2.2rem;
}

.contact-page .eyebrow {
  margin-bottom: 1.1rem;
}

.contact-form {
  display: grid;
  gap: 1.15rem;
  max-width: 34rem;
}

.contact-form .field {
  display: grid;
  gap: 0.45rem;
}

.contact-form label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.contact-form label .opt {
  font-weight: 500;
  color: var(--text-3);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1.05rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #100b24;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.6;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-3);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.18);
}

.contact-form .hint {
  font-size: 0.85rem;
  color: var(--text-3);
}

.contact-form button[type='submit'] {
  justify-self: start;
}

.contact-form.is-done .field,
.contact-form.is-done button[type='submit'] {
  display: none;
}

/* Inline links inside prose are underlined, not just tinted: colour on its own
   fails WCAG 1.4.1 for anyone who cannot tell violet from the body grey.
   Navigation and card links are excluded — they read as controls by position,
   and underlining every one of them would make the page look like 1996. */
.legal p a,
.legal li a,
.contact-alt a,
.faq-body a,
.disclaimer a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.contact-alt {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 34rem;
}

.contact-alt h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.contact-alt .muted-note {
  margin-top: 1.1rem;
  font-size: 0.87rem;
  color: var(--text-3);
}

/* ---------- Store badges ----------
   The site goes live with the app, so the hero and the closing section end on
   the two store buttons rather than a form. Built in the site's own glass
   rather than as the stores' black artwork, and the logos stay monochrome:
   Google's four-colour mark would put green, red and yellow — three reserved
   hues — on the page as decoration. The wording follows the official badges. */
.download {
  margin-top: 2rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.badge-store {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 12.5rem;
  min-height: 3.75rem;
  padding: 0.7rem 1.5rem 0.7rem 1.2rem;
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 55%),
    #0d0920;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.badge-store:hover {
  color: var(--text);
  transform: translateY(-2px);
  border-color: var(--accent-light);
  box-shadow:
    0 14px 40px rgba(123, 97, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-store svg {
  width: 30px;
  height: 30px;
  flex: none;
}

/* Left-set even inside a centred section, like the store badges themselves. */
.badge-store > span {
  text-align: left;
}

.badge-store .small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-2);
  line-height: 1.2;
}

.badge-store .big {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.download-note {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-3);
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent-light);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(123, 97, 255, 0.55);
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Sections ---------- */
/* Vertical rhythm. Two neighbouring sections add their paddings, so the gap
   between one section's last card and the next eyebrow is TWICE this. At
   6.5rem each that was ~13rem of empty band on a laptop — owner's call
   2026-10-12, it read as a page with holes in it. */
.section {
  padding: clamp(2.25rem, 4.5vw, 3.25rem) 0;
}

.section-head {
  max-width: 46rem;
  margin: 0 auto clamp(1.8rem, 3.5vw, 2.6rem);
  text-align: center;
}

.section-head .eyebrow {
  margin-bottom: 1.1rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4.2vw, 2.6rem);
  margin-bottom: 0.9rem;
}

.section-head p {
  font-size: 1.1rem;
  color: var(--text-2);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: calc(var(--header-h) + clamp(2rem, 5vw, 3.5rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
  min-height: min(86vh, 820px);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 3.9rem);
  margin: 1.1rem 0 1.2rem;
}

.hero .lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 34rem;
}

.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.4rem;
  margin-top: 1.8rem;
}

.trust-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-2);
}

.trust-chips svg {
  width: 17px;
  height: 17px;
  color: var(--accent-light);
  flex: none;
}

/* ---------- Hero phone ----------
   A rendered image of the real home screen (docs/store-screenshots, frame 1
   in ?hero=1 mode), not an HTML imitation of it — the old mockup drifted from
   the app and its floating chips read as toy-like. The glow behind it is the
   page's own, so the image can be cropped tight to the phone. */
.phone-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0.5rem 0;
}

.phone-wrap::before {
  content: '';
  position: absolute;
  width: min(30rem, 92%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 97, 255, 0.26), transparent 66%);
}

.hero-shot {
  position: relative;
  width: 300px;
  height: auto;
}

/* ---------- Stats band ---------- */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--border);
  overflow: hidden;
}

.stat {
  background: linear-gradient(180deg, rgba(13, 9, 28, 0.97), rgba(9, 6, 20, 0.97));
  padding: 1.7rem 1.2rem;
  text-align: center;
}

.stat .n {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat .l {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ---------- Card grids ---------- */
.science-grid,
.features-grid,
.steps {
  display: grid;
  gap: 1.1rem;
}

.science-grid {
  grid-template-columns: repeat(3, 1fr);
}

.steps {
  grid-template-columns: repeat(3, 1fr);
}

.features-grid {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  position: relative;
  padding: 1.7rem 1.5rem;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(123, 97, 255, 0.12);
}

.card h3 {
  font-size: 1.15rem;
  margin: 1.05rem 0 0.5rem;
}

.card p {
  font-size: 0.97rem;
  color: var(--text-2);
}

.icon-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent-light);
}

.icon-badge svg {
  width: 24px;
  height: 24px;
}

.icon-badge.danger {
  background: var(--danger-soft);
  border-color: rgba(240, 87, 74, 0.3);
  color: var(--danger);
}

.icon-badge.gold {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--gold);
}

.icon-badge.cyan {
  background: var(--cyan-soft);
  border-color: var(--cyan-border);
  color: var(--cyan);
}

/* Steps */
.step {
  padding-top: 2.1rem;
  margin-top: 1.1rem;
}

.step-num {
  position: absolute;
  top: -1.35rem;
  left: 1.4rem;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, var(--sheen), transparent 52%),
    var(--grad);
  color: var(--on-cta);
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: var(--shadow-glow);
}

.step h3 {
  margin-top: 0.2rem;
}

/* ---------- Growth stages (trees) ---------- */
.growth {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.growth::before {
  content: '';
  position: absolute;
  /* The ground the six trees stand on, not a stripe across their canopies.
     Every tree SVG carries its own shadow ellipse at cy 451 of a 512 viewBox,
     and that ellipse is the ground the art is drawn against. Measured in Chrome
     with the reveal transform off, it lands at 127.2px on a wide screen and
     128.6px at the 1081px end of the range where this rail is visible at all —
     so 8rem sits on it within a pixel everywhere. The stages are positioned and
     come later in the DOM, so the trunks paint over the line and it reads as
     ground rather than as a rule laid across the art. */
  top: 8rem;
  left: 4%;
  right: 4%;
  height: 2px;
  /* violet ramp that resolves into milestone gold at the final stage */
  background: linear-gradient(90deg,
      rgba(123, 97, 255, 0.08),
      rgba(123, 97, 255, 0.5),
      rgba(255, 176, 32, 0.55));
}

.g-stage {
  position: relative;
  text-align: center;
  padding: 1.2rem 0.6rem 1.4rem;
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  transition: transform 0.25s, border-color 0.25s, background-color 0.25s;
}

.g-stage:hover {
  transform: translateY(-6px);
  border-color: var(--border);
  background: var(--surface);
}

.g-stage img {
  /* A fixed slot the tree sits on the floor of. The rail is one absolutely
     positioned line and can only meet six trees if their baselines hold still;
     letting the height follow the width slid them ~0.5rem between the widest
     layout and the 1080px breakpoint, which is how the line ended up mid-canopy.
     `contain` + `bottom` keeps the artwork undistorted and floor-aligned when
     the 70% cap makes it narrower than the slot. */
  width: min(120px, 70%);
  height: 7.5rem;
  object-fit: contain;
  object-position: bottom;
  margin: 0 auto 0.4rem;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}

.g-day {
  display: inline-block;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent-light);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.g-stage h3 {
  font-size: 1.02rem;
  margin: 0.6rem 0 0.35rem;
}

.g-stage p {
  font-size: 0.88rem;
  color: var(--text-3);
  line-height: 1.55;
}

.g-stage.final .g-day {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--gold);
}

/* ---------- Reboot timeline ---------- */
.timeline {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
  padding-left: 2.4rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 0.55rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-light) 55%, var(--gold));
  opacity: 0.5;
}

.timeline li {
  position: relative;
  padding-bottom: 2.2rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -2.4rem;
  top: 0.42rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(123, 97, 255, 0.2);
}

.timeline li:last-child::before {
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(255, 176, 32, 0.2);
}

.t-day {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.timeline h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.timeline p {
  color: var(--text-2);
  font-size: 0.99rem;
}

/* The note that explains why this section carries no day numbers. No new hue:
   it borrows the accent wash the timeline dots already use. */
.timeline-note {
  max-width: 46rem;
  margin: 2.4rem auto 0;
  padding: 1.15rem 1.35rem;
  border-radius: var(--r-lg);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ---------- Privacy band ---------- */
.privacy-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--r-xl);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(34, 211, 238, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
}

.privacy-band .eyebrow {
  margin-bottom: 1.1rem;
}

.privacy-band h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  margin-bottom: 0.9rem;
}

.privacy-list {
  display: grid;
  gap: 1rem;
}

.privacy-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.97rem;
}

.privacy-list svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.15rem;
  color: var(--cyan);
}

.privacy-list strong {
  color: var(--text);
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 46rem;
  margin: 0 auto;
  display: grid;
  gap: 0.8rem;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq details[open] {
  border-color: var(--border-strong);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--accent-light);
  border-bottom: 2px solid var(--accent-light);
  transform: rotate(45deg);
  transition: transform 0.25s;
  margin-right: 3px;
}

.faq details[open] summary::after {
  transform: rotate(225deg);
}

.faq-body {
  padding: 0 1.35rem 1.25rem;
  color: var(--text-2);
  font-size: 0.98rem;
}

/* ---------- Final CTA ---------- */
.cta-final {
  position: relative;
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(70% 130% at 50% 0%, rgba(123, 97, 255, 0.2), transparent 60%),
    radial-gradient(50% 100% at 15% 100%, rgba(34, 211, 238, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  overflow: hidden;
}

.cta-final h2 {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  margin-bottom: 1rem;
}

.cta-final > p {
  max-width: 32rem;
  margin: 0 auto;
  font-size: 1.1rem;
}

.cta-final .store-badges {
  justify-content: center;
}

.cta-final .download {
  margin-top: 1.8rem;
}

.cta-tree {
  width: 110px;
  margin: 0 auto 0.6rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  background: rgba(0, 0, 0, 0.25);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-about p {
  margin-top: 1rem;
  font-size: 0.95rem;
  max-width: 20rem;
}

.site-footer h3 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
}

.site-footer nav ul {
  display: grid;
  gap: 0.55rem;
  list-style: none;
}

.site-footer nav a {
  color: var(--text-2);
  font-size: 0.96rem;
}

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

.disclaimer {
  font-size: 0.85rem;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  max-width: 52rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 1.4rem;
  font-size: 0.88rem;
  color: var(--text-3);
}

/* ---------- Legal pages ---------- */
.legal {
  width: min(46rem, 100% - 2.5rem);
  margin-inline: auto;
  padding: calc(var(--header-h) + 3rem) 0 4.5rem;
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 2.7rem);
  margin-bottom: 0.5rem;
}

.legal .updated {
  color: var(--text-3);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.3rem;
  margin: 2.2rem 0 0.7rem;
}

.legal p,
.legal li {
  font-size: 1rem;
}

/* Sections here run to several paragraphs; without this they butt together and
   read as one wall. `.legal .updated` and `.contact-page .lead-sm` set their own
   and win on specificity, so their spacing is unchanged. */
.legal p {
  margin-bottom: 1rem;
}

.legal ul {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 78vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 2rem) 1.5rem 3rem;
}

.notfound h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 1rem 0 0.7rem;
}

.notfound p {
  margin-bottom: 1.8rem;
}

.notfound img {
  width: 130px;
  margin: 0 auto 1rem;
}

.notfound .eyebrow,
.notfound .btn {
  justify-self: center;
}

/* ---------- Scroll reveal ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* An anchored heading on a legal page (#analytics, #delete-account) lands
   below the fixed header instead of under it. */
.legal h2[id] {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

/* ---------- Analytics choice ----------
   The "can we count your visit?" bar from assets/site.js. Fixed to the bottom
   so it moves no layout, above the header (50) and below the skip link (100).
   Both answers wear the same style on purpose: a no must be exactly as easy
   to give as a yes. */
.consent {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 60;
  width: min(36rem, calc(100% - 2rem));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.2rem;
  padding: 1rem 1.15rem;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
  color: var(--text-2);
  transform: translateX(-50%);
  animation: consent-in 0.4s ease-out both;
}

/* On a phone it is a slim sheet along the bottom, and the two answers split
   the row evenly — still the same size as each other. */
@media (max-width: 560px) {
  .consent {
    bottom: 0.75rem;
    padding: 0.85rem 0.95rem;
    font-size: 0.86rem;
    gap: 0.75rem;
  }

  .consent-actions {
    flex: 1 1 100%;
  }

  .consent-actions .btn {
    flex: 1;
  }
}

.consent p {
  flex: 1 1 17rem;
}

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

.consent-actions {
  display: flex;
  gap: 0.6rem;
}

@keyframes consent-in {
  from {
    opacity: 0;
    transform: translate(-50%, 0.75rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

/* The footer's "Cookie settings" — a button, because it opens something
   rather than going anywhere, dressed as the links beside it. */
.link-button {
  font: inherit;
  color: var(--accent-light);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.link-button:hover {
  color: var(--accent-pale);
}

.site-footer nav .link-button {
  color: var(--text-2);
  font-size: 0.96rem;
}

.site-footer nav .link-button:hover {
  color: var(--accent-pale);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}

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

  .growth {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 2rem;
  }

  .growth::before {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--header-h) + 2.5rem);
    min-height: 0;
  }

  .hero .lead {
    margin-inline: auto;
  }

  .store-badges,
  .trust-chips {
    justify-content: center;
  }

  .phone-wrap {
    order: 2;
    margin-top: 1rem;
  }

  .hero-shot {
    width: min(270px, 70vw);
  }

  .science-grid,
  .steps {
    grid-template-columns: 1fr;
    max-width: 30rem;
    margin-inline: auto;
  }

  .steps {
    gap: 2.2rem;
  }

  .stats-band {
    grid-template-columns: repeat(2, 1fr);
  }

  .privacy-band {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    right: 1.25rem;
    left: 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding: 0.9rem;
    border-radius: var(--r-lg);
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
  }

  .nav-links.open {
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .nav-links a {
    display: block;
    padding: 0.8rem 1rem;
    font-size: 1.02rem;
  }

  .nav-cta a.btn {
    margin: 0.3rem 0 0;
    width: 100%;
  }

  /* Simple nav (legal pages): no toggle, keep links inline */
  .nav-links-simple {
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .nav-links-simple a {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
  }
}

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

  /* Two badges side by side need ~26rem; below that they stack, full width,
     so neither shrinks its label to fit. */
  .store-badges {
    flex-direction: column;
    align-items: stretch;
    width: min(20rem, 100%);
    margin-inline: auto;
  }

  .badge-store {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 30rem;
    margin-inline: auto;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline li::before {
    left: -2rem;
  }
}
