
:root {
  color-scheme: dark;
  --forest: #1b2820;
  --surface: #24352b;
  --bone: #efeae0;
  --sage: #a3ad9f;
  --terra: #e0a98f;
  --red: #c8462e;
  --mine: #2f6a4c;
  --gl: max(clamp(16px, 4.4vw, 72px), env(safe-area-inset-left, 0px));
  --gr: max(clamp(16px, 4.4vw, 72px), env(safe-area-inset-right, 0px));
  --disp: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --ui: "Zen Kaku Gothic New", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--forest); }
body {
  margin: 0; background: var(--forest); color: var(--bone);
  font-family: var(--ui); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

/* ---------- header ---------- */
.hd {
  position: fixed; z-index: 60; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top, 0px)) var(--gr) 14px var(--gl);
  color: var(--bone); background: var(--forest); pointer-events: none;
}
.hd a { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 33px; height: 22px; display: block; }
.hd-cta { font-weight: 700; font-size: 15px; text-decoration: none; border: 1.5px solid currentColor; border-radius: 999px; padding: 7px 16px; }

/* ---------- shots: stacked by default (reduced motion / no script) ---------- */
.film { position: relative; overflow-x: clip; }
.stage { position: relative; }
.shot {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px var(--gr) 56px var(--gl);
}
.frame { display: flex; flex-direction: column; gap: clamp(18px, 3.2vh, 36px); width: 100%; transform-origin: 0 50%; }
.bg-forest { background: var(--forest); color: var(--bone); }
.bg-terra { background: var(--terra); color: var(--forest); }
.bg-bone { background: var(--bone); color: var(--forest); }
.s-help { justify-content: flex-end; }

.mb { display: none; }
@media (max-width: 700px) { .dk { display: none; } .mb { display: block; } }

/* ---------- display type ---------- */
.big {
  font-family: var(--disp); font-weight: 900; text-transform: uppercase;
  line-height: 0.84; letter-spacing: -0.004em; margin: 0;
  white-space: nowrap; width: max-content; max-width: none;
  font-size: 11vw; font-variant-numeric: tabular-nums;
}
label.big { display: block; }
.m { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.08em 0.03em 0.03em; margin: -0.08em -0.03em -0.03em; }
.w { display: inline-block; }
.meas { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; }
.stack > * + * { margin-top: 0.12em; }

.slot { color: var(--terra); font-weight: 800; font-size: 7vw; }
.soft { color: var(--sage); }
.oly { color: #f6b519; }
.big.comma { margin-bottom: 0.1em; } /* room for the comma under the tight line height */
/* the hero types itself in: hidden letters keep their width, so nothing reflows */
.typing .ch { visibility: hidden; }
.typing .ch.on { visibility: visible; }
.ch.cur { position: relative; }
.ch.cur::after { content: ""; position: absolute; left: 100%; top: 0.1em; bottom: 0.12em; width: 0.07em; margin-left: 0.04em; background: var(--terra); visibility: visible; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.frame.dream { gap: 0.1em; }
.frame.dream .slot { margin: 0.12em 0 0.16em; }
@media (max-width: 700px) {
  .slot { white-space: normal; width: 100%; min-height: 1.75em; }
  .slot .m { display: block; }
}
.cue { position: absolute; right: var(--gr); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); width: 18px; height: 34px; color: var(--sage); }

/* ---------- small text ---------- */
.fact { max-width: 36ch; font-size: clamp(16px, 1.2vw, 19px); }
.fact p { margin: 0; }
.src { margin-top: 10px !important; font-size: 13px; line-height: 1.35; opacity: 0.72; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: 28px 56px; align-items: end; }
@media (max-width: 760px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .fact { font-size: 15.5px; }
}
.ui { font-family: var(--ui); font-size: 15px; line-height: 1.4; }

/* the studies */
.sts { display: grid; gap: clamp(12px, 2.2vh, 24px); }
.st { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 36ch); gap: 6px 48px; align-items: end; padding-top: clamp(10px, 2vh, 22px); border-top: 2px solid rgba(27, 40, 32, 0.14); }
.st:first-child { border-top: 0; padding-top: 0; }
.n-res { width: auto; font-size: 80px; }
.n-res .nl { display: block; }
.st-txt { font-size: clamp(15px, 1.15vw, 18px); }
.st-txt p { margin: 0; }
@media (max-width: 760px) {
  .st { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .st-txt { font-size: 14.5px; }
  .st-txt .src { margin-top: 4px !important; font-size: 12px; }
}

/* goal card */
.gc { background: var(--forest); color: var(--bone); border-radius: 12px; padding: 18px 20px; display: grid; gap: 14px; box-shadow: 0 30px 60px -34px rgba(27, 40, 32, 0.7); }
.gc-top { display: flex; align-items: baseline; gap: 12px; }
.gc-lbl, .gc dt { font-size: 13px; color: var(--sage); }
.gc-vague { position: relative; font-size: 21px; font-weight: 700; color: rgba(239, 234, 224, 0.62); }
.strike { position: absolute; left: -3px; right: -3px; top: 54%; height: 3px; background: var(--terra); transform-origin: 0 50%; border-radius: 2px; }
.gc-pact { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 14px; border-top: 1px solid rgba(239, 234, 224, 0.13); padding-top: 14px; }
.gc dd { margin: 3px 0 0; font-size: 19px; font-weight: 700; }
.chip { display: inline-block; background: var(--terra); color: var(--forest); border-radius: 6px; padding: 1px 9px; }
.gc-alt { margin: 0; font-size: 14px; color: var(--sage); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.gc-alt s { text-decoration-color: var(--terra); text-decoration-thickness: 2px; }
.gc-alt span { color: var(--bone); }

/* periodization */
.per { display: grid; gap: 10px; }
.per-cap { margin: 0; font-size: 15px; font-weight: 700; }
.per-cap span { font-weight: 400; opacity: 0.65; margin-right: 6px; }
.bars { position: relative; display: grid; gap: 10px; }
.bar { position: relative; height: 54px; display: flex; gap: calc(var(--gap, 5) * 1px); transform-origin: 0 50%; }
.seg { flex: 1 1 0; min-width: 0; background: var(--forest); color: var(--bone); border-radius: 5px; padding: 6px 7px; font-size: 12px; font-weight: 700; display: flex; align-items: flex-end; overflow: hidden; white-space: nowrap; }
.seg.on { background: var(--terra); color: var(--forest); }
.cell { display: grid; align-items: center; padding: 0 16px; font-size: 15px; }
.cell > span { grid-area: 1 / 1; overflow: hidden; text-overflow: ellipsis; }

/* WhatsApp check-in */
.wa { background: var(--forest); color: var(--bone); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -34px rgba(27, 40, 32, 0.7); }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); }
.wa-av { width: 32px; height: 32px; border-radius: 50%; background: var(--forest); display: grid; place-items: center; color: var(--bone); }
.wa-av svg { width: 22px; height: 15px; }
.wa-head b { display: block; font-size: 15px; }
.wa-head small { display: block; font-size: 12px; color: var(--sage); }
.wa-body { display: grid; gap: 6px; padding: 12px 12px 6px; }
.wa-b { max-width: 84%; padding: 7px 10px 6px; border-radius: 10px; font-size: 14.5px; line-height: 1.35; }
.wa-b time { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: var(--sage); margin-top: 2px; }
.wa-b time svg { width: 16px; height: 10px; color: #8cc7a9; }
.wa-b.them { background: var(--surface); justify-self: start; border-top-left-radius: 3px; }
.wa-b.me { background: var(--mine); justify-self: end; border-top-right-radius: 3px; }
.wa-b.me time { color: rgba(239, 234, 224, 0.7); }
.wa-prog { padding: 4px 14px 12px; }
.wa-cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--sage); }
.wa-cap b { color: var(--terra); }
.prog { display: block; width: 100%; height: auto; }

/* demo testimonials */
.ttrack { --step: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.tcard { background: var(--forest); color: var(--bone); border-radius: 12px; padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.t-res { width: auto; display: flex; flex-direction: column; justify-content: flex-end; min-height: 1.72em; font-size: 64px; }
.t-res .rl { display: block; }
.stars { display: flex; gap: 3px; }
.stars svg { width: 17px; height: 17px; display: block; }
.t-q { margin: 0; font-size: 15px; line-height: 1.45; color: rgba(239, 234, 224, 0.9); }
.t-who { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.t-who .av { width: 46px; height: 46px; flex: none; display: block; }
.t-who b { display: block; font-size: 15px; }
.t-who small { display: block; font-size: 13px; color: var(--sage); }
.t-demo { margin: 0; font-size: 12px; color: var(--sage); }
@media (max-width: 760px) {
  .ttrack { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* final field */
.s-test .frame { gap: clamp(14px, 2.6vh, 28px); }
.field { display: grid; gap: 0.06em; }
.field-row { display: flex; align-items: flex-start; gap: 16px; border-bottom: 3px solid rgba(239, 234, 224, 0.22); padding-bottom: 10px; transition: border-color 0.3s; }
.field-row:focus-within { border-color: var(--terra); }
.ta {
  display: block; flex: 1 1 auto; min-width: 0; width: 100%; height: 1em;
  resize: none; border: 0; outline: 0; background: transparent; color: var(--bone);
  padding: 0; margin: 0; white-space: normal; overflow: hidden; caret-color: var(--terra);
  font-size: 8vw; line-height: 0.92;
}
.ta::placeholder { color: rgba(239, 234, 224, 0.3); opacity: 1; }
.go {
  flex: none; width: clamp(52px, 6.4vw, 88px); aspect-ratio: 1; margin-top: 0.1em;
  border-radius: 50%; border: 0; background: var(--terra); color: var(--forest);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: scale(0.6); pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.go svg { width: 46%; height: 46%; }
.field.has .go { opacity: 1; transform: none; pointer-events: auto; }
.note { margin: 0; font-size: 15px; color: var(--sage); }

.ft { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding: 28px var(--gr) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gl); background: var(--forest); color: var(--sage); font-size: 14px; border-top: 1px solid rgba(239, 234, 224, 0.1); }
.ft .brand { color: var(--bone); font-size: 17px; }
.ft .brand svg { width: 28px; height: 19px; }
.ft a { text-decoration: none; }

.grain {
  position: fixed; inset: 0; z-index: 55; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- the sequence (motion allowed, script running) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html:not(.flat) .hd { background: transparent; }
  html:not(.flat) .film { height: 730vh; }
  html:not(.flat) .stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--forest); }
  html:not(.flat) .shot { position: absolute; inset: 0; min-height: 0; padding-bottom: calc(44px + 100vh - 100svh); }
  html:not(.flat) .stack { display: grid; align-items: end; }
  html:not(.flat) .stack > * { grid-area: 1 / 1; margin: 0; }
  html:not(.flat) .iris { --r: 0; clip-path: circle(calc(var(--r) * 1%) at var(--cx, 50%) var(--cy, 50%)); }
  html:not(.flat) .s-dream { z-index: 1; }
  html:not(.flat) .s-help { z-index: 2; }
  html:not(.flat) .s-cheesy { z-index: 3; }
  html:not(.flat) .s-sci { z-index: 4; }
  html:not(.flat) .s-studies { z-index: 5; }
  html:not(.flat) .s-goal { z-index: 6; }
  html:not(.flat) .s-per { z-index: 7; }
  html:not(.flat) .s-track { z-index: 10; }
  html:not(.flat) .s-proof { z-index: 11; }
  html:not(.flat) .s-test { z-index: 12; }
  html:not(.flat) .bars { display: block; height: 54px; overflow: hidden; border-radius: 5px; }
  html:not(.flat) .bar { position: absolute; inset: 0; height: auto; }
  @media (max-width: 760px) {
    html:not(.flat) .ttrack { display: flex; gap: 16px; transform: translateX(calc(var(--step) * (-100% - 16px))); }
    html:not(.flat) .tcard { flex: 0 0 100%; }
  }
  html:not(.flat) .w { will-change: transform; }
  html:not(.flat):not(.ready) .shot:not(.s-dream),
  html:not(.flat):not(.ready) .stack > :not(:first-child) { visibility: hidden; }
  .cue path { animation: bob 2.4s var(--ease) infinite; }
  @keyframes bob { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }
}

/* The studies remain one scene; sources distinguish field history from each review. */
.s-studies .frame { gap: 16px; }
.science-title { margin: 0; max-width: 24ch; font: 900 clamp(32px, 4.5vw, 68px)/.98 var(--disp); text-transform: uppercase; }
.science-sources { font-family: var(--ui); }
.science-history, .science-attribution { margin: 0; font-size: 11px; line-height: 1.35; }
.science-sources a, .st .src a { color: inherit; text-underline-offset: 3px; }
.research-names { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px; margin: 16px 0 10px; }
.research-names a { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; text-decoration: none; }
/* Original brand colors and proportions stay visible without monochrome filters. */
.research-names img { display: block; width: 100%; max-width: 160px; height: 44px; object-fit: contain; }
.research-names a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.research-names span { display: block; margin-top: 4px; font: 11px/1.3 var(--ui); }
.s-studies .n-res { font-size: 56px !important; }
@media (max-width: 760px) {
  .s-studies .frame { gap: 10px; }
  .science-title { font-size: 32px; }
  .s-studies .sts { gap: 10px; }
  .s-studies .st { padding-top: 8px; }
  .s-studies .n-res { font-size: 32px !important; }
  .s-studies .st-txt { font-size: 13px; line-height: 1.35; }
  .s-studies .st .src { font-size: 10px; }
  .research-names { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin: 10px 0; }
  .research-names img { height: 30px; }
  .research-names a:last-child:nth-child(3n + 1) { grid-column: 2; }
  .research-names span { font-size: 9px; }
}
/* Idle hint occupies its own narrow gutter; focus restores only the native caret. */
.field-row { position: relative; padding-left: 12px; }
.idle-caret { position: absolute; left: 0; top: .12em; width: 3px; height: .8em; font-size: 8vw; background: var(--terra); pointer-events: none; animation: idle-blink 1s steps(1) infinite; }
.field:focus-within .idle-caret, .field.has .idle-caret { display: none; }
@keyframes idle-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .idle-caret { animation: none; } }

/* A short introduction precedes the preserved customer accounts. */
.testimonial-intro { margin: 0 0 18px; }
.testimonial-intro h2 { margin: 4px 0 0; font: 900 clamp(32px, 4vw, 56px)/1.05 sans-serif; }
.intro-stars { color: #e0a98f; letter-spacing: .14em; font-size: 22px; }
.testimonial-intro h2 { font-family: var(--disp); text-transform: uppercase; }

/* The visitor's own goal uses the same accent as the invitation above it. */
#sJ #goal { color: var(--terra); -webkit-text-fill-color: var(--terra); }

/* A full scene gives the research conclusion its own two scroll entrances. */
html:not(.flat) #sBrain { z-index: 5; }
#sBrain .frame { gap: clamp(24px, 4vh, 48px); }
/* Keep the existing brand mark with its name in the same masked scroll word. */
#brain1 .brain-brand { display: inline-flex; align-items: center; gap: .12em; }
#brain1 .brain-mark { display: block; width: .78em; height: .52em; flex: none; }

/* Examples recede; the visitor's actual goal keeps the full peach accent. */
#sJ #goal::placeholder { color: rgba(239,234,224,.2); -webkit-text-fill-color: rgba(239,234,224,.2); opacity: 1; }
