/* ============================================================
   Tvara landing — "One signal." (2026-08-16, concept v3)
   The page is 24 hours of the body. Scroll = time. One line
   travels the page and becomes each thing the app measures.
   Aurora tokens mirror docs/01-design-system.md. Zero build.
   ============================================================ */

:root {
  --bg: #07080C;                 /* deep night — darker than app canvas on purpose */
  --surface: #13151C;
  --elevated: #1B1E27;
  --border: #262A36;
  --text: #F5F7FA;
  --text-2: #A6ADBB;
  --text-3: #8A93A1;
  --lime: #C8FF3E;
  --lime-ink: #0A0B0F;
  --workout: #FF6B3D;
  --cardio: #3DD9FF;
  --nutrition: #FF4D8F;
  --recovery: #8B5CF6;

  /* hour-of-day sky tint, driven by body[data-hour] */
  --sky: #0B0D18;
  --line: var(--lime);

  --font-display: "Clash Display", "SF Pro Display", system-ui, sans-serif;
  --font-text: "Switzer", -apple-system, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* register the sky token so it can transition smoothly between hours */
@property --sky {
  syntax: "<color>";
  inherits: true;
  initial-value: #0B0D18;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--sky) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed, scroll; /* the sky follows the viewport, not the page top */
  transition: --sky 1.2s ease;
}

/* the sky follows the hour */
body[data-hour="night"]   { --sky: #0B0D18; }
body[data-hour="dawn"]    { --sky: #1A2410; }
body[data-hour="morning"] { --sky: #241407; }
body[data-hour="noon"]    { --sky: #241018; }
body[data-hour="day"]     { --sky: #101A20; }
body[data-hour="dusk"]    { --sky: #0A1B22; }

h1, h2 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
em { font-style: normal; }

/* ============ the shared icon primitive — VISIBLE this time ============ */
.gicon {
  display: inline-block; width: 22px; height: 22px; vertical-align: -4px;
  background: currentColor;
  -webkit-mask: var(--icon) no-repeat center / contain;
          mask: var(--icon) no-repeat center / contain;
}
.gicon--s { width: 17px; height: 17px; }

/* ============ HUD ============ */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center;
  gap: clamp(14px, 3vw, 30px);
  padding: 14px clamp(16px, 3.5vw, 36px) 12px;
  background: linear-gradient(color-mix(in srgb, var(--bg) 88%, transparent), transparent);
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud__logo { font-family: var(--font-display); font-weight: 700; font-size: 21px; text-decoration: none; }
.hud__logo span { color: var(--lime); }
.hud__clock {
  justify-self: center; display: flex; align-items: baseline; gap: 7px;
  font-family: var(--font-mono);
}
.hud__clock b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.hud__clock span { font-size: 11px; color: var(--text-3); letter-spacing: .18em; }
.hud__state {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; color: var(--text-2);
  white-space: nowrap;
}
.hud__state i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .hud__state i { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
}
.hud__cta {
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  background: var(--lime); color: var(--lime-ink);
  padding: 8px 16px; border-radius: 999px;
}
.hud__day { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.06); }
.hud__day i { display: block; height: 100%; width: 0; background: var(--lime); transition: width .1s linear; }
@media (max-width: 720px) { .hud__state { display: none; } .hud { grid-template-columns: auto 1fr auto; } }

/* ============ chapters ============ */
.ch { position: relative; min-height: 130vh; display: flex; align-items: center; padding: 18vh clamp(18px, 5vw, 60px); }
.ch__inner { position: relative; z-index: 2; max-width: 1060px; margin: 0 auto; width: 100%; }
.ch__inner--center { text-align: center; max-width: 780px; }
.ch__inner--split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(30px, 6vw, 90px); align-items: center; }
.ch__inner--flip > :first-child { order: 2; }
.ch__inner--flip > :last-child { order: 1; }
@media (max-width: 860px) {
  .ch__inner--split { grid-template-columns: 1fr; }
  .ch__inner--flip > :first-child { order: 1; }
  .ch__inner--flip > :last-child { order: 2; }
}

/* the line itself — drawn by scroll (JS sets stroke-dashoffset) */
.ch__line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; overflow: visible; }
.ch__path {
  fill: none; stroke: var(--line); stroke-width: 2.5;
  vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--line) 55%, transparent));
  opacity: .8;
}
.ch--train .ch__path { stroke: var(--workout); filter: drop-shadow(0 0 14px color-mix(in srgb, var(--workout) 55%, transparent)); }
.ch--eat   .ch__path { stroke: var(--nutrition); filter: drop-shadow(0 0 14px color-mix(in srgb, var(--nutrition) 55%, transparent)); }
.ch--run   .ch__path { stroke: var(--cardio); filter: drop-shadow(0 0 14px color-mix(in srgb, var(--cardio) 55%, transparent)); }
.ch--sleep .ch__path { stroke: var(--recovery); filter: drop-shadow(0 0 14px color-mix(in srgb, var(--recovery) 55%, transparent)); }

/* giant chapter glyph — the icons, unmissable */
.ch__glyph {
  position: absolute; z-index: 1; right: -4%; top: 8%;
  width: clamp(260px, 34vw, 520px); height: clamp(260px, 34vw, 520px);
  background: currentColor; opacity: .05; color: var(--text);
  -webkit-mask: var(--icon) no-repeat center / contain;
          mask: var(--icon) no-repeat center / contain;
  pointer-events: none;
}
.ch--train .ch__glyph { color: var(--workout); opacity: .07; }
.ch--eat .ch__glyph   { color: var(--nutrition); opacity: .07; left: -4%; right: auto; }
.ch--run .ch__glyph   { color: var(--cardio); opacity: .07; }
.ch--sleep .ch__glyph { color: var(--recovery); opacity: .07; left: -4%; right: auto; }

.ch__time {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .22em;
  color: var(--text-2); margin-bottom: 18px; text-transform: uppercase;
}
.ch__time .gicon { color: var(--lime); }
.ch--train .ch__time .gicon { color: var(--workout); }
.ch--eat .ch__time .gicon { color: var(--nutrition); }
.ch--run .ch__time .gicon { color: var(--cardio); }
.ch--sleep .ch__time .gicon { color: var(--recovery); }

.ch__h { font-size: clamp(34px, 5vw, 58px); font-weight: 600; line-height: 1.05; text-wrap: balance; }
.ch__h--big { font-size: clamp(38px, 6vw, 72px); }
.ch__h em { color: var(--lime); }
.ch--train .ch__h em { color: var(--workout); }
.ch--eat .ch__h em   { color: var(--nutrition); }
.ch--run .ch__h em   { color: var(--cardio); }
.ch--sleep .ch__h em { color: var(--recovery); }

.ch__p { color: var(--text-2); margin-top: 20px; max-width: 52ch; font-size: 17px; }
.ch__p--center { margin-inline: auto; }
.ch__p strong { color: var(--text); font-weight: 600; }
.ch__mark {
  margin-top: 22px; padding-left: 16px; font-size: 14.5px; color: var(--text-3);
  border-left: 2px solid var(--lime);
}
.ch--train .ch__mark { border-color: var(--workout); }
.ch--eat .ch__mark   { border-color: var(--nutrition); }
.ch--run .ch__mark   { border-color: var(--cardio); }
.ch--sleep .ch__mark { border-color: var(--recovery); }

.ch__cue {
  margin-top: 60px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .34em; text-transform: uppercase; color: var(--text-3);
}
@media (prefers-reduced-motion: no-preference) {
  .ch__cue { animation: bob 2.4s ease-in-out infinite; }
  @keyframes bob { 0%,100% { transform: translateY(0); opacity: .55 } 50% { transform: translateY(7px); opacity: 1 } }
}

/* ---- boot ---- */
.ch--boot { min-height: 150vh; }
.boot__pre { font-family: var(--font-mono); font-size: clamp(12px, 1.4vw, 14px); letter-spacing: .12em; color: var(--text-3); margin-bottom: 26px; }
.boot__pre b { color: var(--lime); font-weight: 600; }
.boot__title { font-size: clamp(58px, 10.5vw, 138px); font-weight: 700; line-height: .96; letter-spacing: -0.03em; }
.boot__title em { color: var(--lime); }
.boot__sub { margin-top: 30px; font-size: clamp(16px, 1.8vw, 20px); color: var(--text-2); }
.boot__sub strong { color: var(--text); }

/* ---- wake ---- */
.wake__ring { position: relative; width: clamp(210px, 26vw, 290px); margin: 8px auto 34px; }
.wake__ring svg { width: 100%; transform: rotate(-90deg); display: block; }
.wr__t { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 7; }
.wr__f {
  fill: none; stroke: var(--lime); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 552.9; /* 2π·88 */
  stroke-dashoffset: calc(552.9 - 552.9 * var(--v) / 100);
  transition: stroke-dashoffset 1.8s cubic-bezier(.22,.9,.3,1);
  /* NO CSS filter here — drop-shadow promotes the SVG to a compositing layer,
     and against the fixed-attachment sky that layer renders as a visibly
     lighter SQUARE behind the ring (verified live, Chrome). The glow is the
     ::before radial below instead — gradients cannot produce a layer edge. */
}
.wake__ring::before {
  content: ""; position: absolute; inset: -14%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lime) 22%, transparent), transparent 72%);
  pointer-events: none;
}
.wake__score { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.wake__score b { font-family: var(--font-display); font-size: clamp(64px, 8vw, 92px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.wake__score span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--text-3); margin-top: 6px; }
.wake__receipts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.wake__receipts span {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.wake__receipts i { width: 8px; height: 8px; border-radius: 50%; }

/* ---- thesis / fragments ---- */
.ch--thesis { min-height: 160vh; }
.frag { position: relative; max-width: 640px; margin: 40px auto 46px; }
.frag svg { width: 100%; display: block; overflow: visible; }
.frag__p {
  fill: none; stroke: var(--c); stroke-width: 2; opacity: .5;
  stroke-dasharray: 6 7; stroke-linecap: round;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c) 40%, transparent));
}
@media (prefers-reduced-motion: no-preference) {
  .frag__p { animation: fragflow 1.4s linear infinite; }
  @keyframes fragflow { to { stroke-dashoffset: -13; } }
}
.frag__tag {
  position: absolute; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.5;
  letter-spacing: .06em; color: var(--text-3); text-align: center;
}
.frag__tag b { color: var(--c); font-weight: 600; }
.frag__tag .gicon { color: var(--c); display: block; margin: 0 auto 4px; }
/* mobile: the four tags become a 2×2 legend under the diagram instead of
   absolute overlays (hiding them cost the labels that make the argument) */
@media (max-width: 640px) {
  .frag { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; }
  .frag svg { grid-column: 1 / -1; }
  .frag__tag { position: static; transform: none; left: auto; right: auto; top: auto; }
}

/* ---- evidence cards (screenshot slots — small, tilted, not a template phone) ---- */
.evidence {
  margin: 0; position: relative; justify-self: center;
  width: clamp(210px, 24vw, 270px); aspect-ratio: 9 / 19.2;
  border-radius: 28px; overflow: hidden;
  background:
    linear-gradient(160deg, var(--elevated), var(--surface) 60%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
  transform: rotate(3deg);
}
.ch__inner--flip .evidence { transform: rotate(-3deg); }
.evidence::before {
  content: "SCREENSHOT SLOT\A shots/ · see README";
  white-space: pre; text-align: center;
  position: absolute; inset: 0; display: grid; place-content: center;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em;
  color: var(--text-3); line-height: 2;
}
.evidence img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.evidence.has-shot img { display: block; }
.evidence.has-shot::before { display: none; }
.evidence figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2); text-align: center; padding: 10px;
  background: linear-gradient(transparent, rgba(7,8,12,.85));
}

/* ---- loop ---- */
.loop__num { display: flex; align-items: baseline; justify-content: center; gap: 14px; margin: 10px 0 26px; }
.loop__num b {
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: clamp(120px, 18vw, 210px); letter-spacing: -.04em;
  background: linear-gradient(165deg, var(--text) 25%, var(--lime));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.loop__num span { font-family: var(--font-mono); font-size: 20px; color: var(--lime); }

/* ============ ask ============ */
.ask { padding: 16vh clamp(18px, 5vw, 60px); }
.ask__inner { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.ask__chat { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 92%; padding: 14px 18px; border-radius: 18px; font-size: 14.5px; line-height: 1.55; }
.bubble--me { align-self: flex-end; background: var(--lime); color: var(--lime-ink); font-weight: 500; border-bottom-right-radius: 5px; }
.bubble--ai { align-self: flex-start; background: var(--elevated); border: 1px solid var(--border); border-bottom-left-radius: 5px; color: var(--text-2); }
.bubble--ai b { color: var(--lime); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .ask__inner { grid-template-columns: 1fr; } }

/* ============ honesty stamps ============ */
.honest { padding: 14vh clamp(18px, 5vw, 60px); text-align: center; }
.honest__title { max-width: 900px; margin: 0 auto; }
.honest__title em { color: var(--lime); }
.honest__stamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1060px; margin: 60px auto 0; }
.stamp {
  border: 1px dashed color-mix(in srgb, var(--lime) 35%, var(--border));
  border-radius: 16px; padding: 26px 18px 22px; text-align: center;
  transform: rotate(-.6deg);
}
.stamp:nth-child(2n) { transform: rotate(.7deg); }
.stamp .gicon { width: 26px; height: 26px; color: var(--lime); margin-bottom: 12px; }
.stamp b { display: block; font-family: var(--font-mono); font-size: 17px; letter-spacing: .02em; color: var(--text); }
.stamp span { display: block; font-size: 13px; color: var(--text-3); margin-top: 8px; line-height: 1.5; }
@media (max-width: 900px) { .honest__stamps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .honest__stamps { grid-template-columns: 1fr; } }

/* ============ everything index ============ */
.all { padding: 14vh clamp(18px, 5vw, 60px); }
.all__title { text-align: center; }
.all__title em { color: var(--lime); }
.all__list {
  list-style: none; margin: 60px auto 0; padding: 0; max-width: 1060px;
  columns: 2; column-gap: clamp(30px, 6vw, 80px);
}
.all__list li {
  break-inside: avoid;
  display: flex; align-items: baseline; gap: 14px;
  padding: 15px 4px; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 500; font-size: 19px;
}
.all__list .gicon { color: var(--c); flex: 0 0 auto; align-self: center; }
.all__list span { margin-left: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--text-3); text-align: right; }
@media (max-width: 760px) { .all__list { columns: 1; } .all__list span { display: none; } }

/* ============ get ============ */
.get { padding: 16vh clamp(18px, 5vw, 60px) 10vh; }
.get__inner { max-width: 860px; margin: 0 auto; text-align: center; }
.get__inner .ch__h--big em { color: var(--lime); }
.get__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 56px 0 40px; text-align: left; }
.plan { border: 1px solid var(--border); border-radius: 20px; padding: 30px 28px; background: color-mix(in srgb, var(--surface) 75%, transparent); }
.plan--premium { border-color: color-mix(in srgb, var(--lime) 50%, transparent); box-shadow: 0 0 90px -45px var(--lime); }
.plan__name { font-family: var(--font-display); font-weight: 600; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.plan__badge { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; background: var(--lime); color: var(--lime-ink); font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.plan__price { font-family: var(--font-display); font-size: 44px; font-weight: 700; margin: 10px 0 16px; font-variant-numeric: tabular-nums; }
.plan__price span { font-size: 15px; color: var(--text-3); font-weight: 500; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { font-size: 14.5px; color: var(--text-2); padding-left: 22px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--lime); font-weight: 700; }
.get__btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 17px;
  background: var(--lime); color: var(--lime-ink); padding: 17px 40px; border-radius: 999px;
  transition: transform .15s ease;
}
.get__btn:hover { transform: scale(1.05); }
.get__note { margin-top: 16px; font-size: 13px; color: var(--text-3); }
.get__faq { margin-top: 70px; text-align: left; }
.get__faq details { border-bottom: 1px solid var(--border); padding: 18px 4px; }
.get__faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 500; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.get__faq summary::-webkit-details-marker { display: none; }
.get__faq summary::after { content: "+"; color: var(--lime); font-size: 20px; }
.get__faq details[open] summary::after { content: "−"; }
.get__faq p { color: var(--text-2); font-size: 14.5px; padding-top: 12px; max-width: 62ch; }
@media (max-width: 720px) { .get__cards { grid-template-columns: 1fr; } }

/* ============ footer ============ */
.footer { border-top: 1px solid var(--border); padding: 30px clamp(18px, 4vw, 40px) 44px; text-align: center; font-size: 13px; color: var(--text-3); }
.footer a { color: var(--text-2); }
.footer__fine { margin-top: 10px; font-size: 11.5px; max-width: 64ch; margin-inline: auto; }
.footer__legal { margin-top: 14px; font-size: 14px; color: var(--text-3); }
.footer__legal a { color: var(--text-2); text-decoration: none; }
.footer__legal a:hover { color: var(--lime); }

/* ============ reduced motion: lines fully drawn ============ */
@media (prefers-reduced-motion: reduce) {
  .ch__line { clip-path: none !important; }
  .wr__f { transition: none; }
}

/* the thesis payoff: the home screen as the merged signal's reveal */
.evidence--hero {
  margin: 54px auto 0; transform: none;
  width: clamp(240px, 26vw, 310px);
  box-shadow:
    0 50px 100px -35px rgba(0,0,0,.85),
    0 0 130px -40px color-mix(in srgb, var(--lime) 45%, transparent);
  border-color: color-mix(in srgb, var(--lime) 30%, var(--border));
}
.evidence--hero::before {
  content: "SCREENSHOT SLOT\A shots/home.png";
  white-space: pre;
}

/* ============ what that buys you — outcomes, not mechanisms ============ */
.wins { padding: 12vh clamp(18px, 5vw, 60px); max-width: 900px; margin: 0 auto; }
.wins__eyebrow { justify-content: center; display: flex; width: 100%; }
.wins__list { list-style: none; margin: 26px 0 0; padding: 0; }
.wins__list li {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto;
  column-gap: 18px; align-items: baseline;
  padding: 26px 6px; border-bottom: 1px solid var(--border);
}
.wins__list li:last-child { border-bottom: 0; }
.wins__list .gicon { grid-row: 1 / 3; align-self: start; width: 26px; height: 26px; margin-top: 4px; }
.wins__list b {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(20px, 2.6vw, 30px); line-height: 1.15; letter-spacing: -0.015em;
}
.wins__list span { color: var(--text-3); font-size: 15px; margin-top: 6px; max-width: 60ch; }

.hud { grid-template-columns: auto 1fr auto auto auto; }
.get__note a { color: var(--text-2); }
@media (max-width: 720px) { .hud { grid-template-columns: auto 1fr auto auto; } }

/* boot: raise content into the first viewport; keep the 150vh runway below */
.ch--boot { align-items: flex-start; }
.ch--boot .ch__inner { padding-top: max(13vh, 110px); }
.ch--boot .ch__cue { margin-top: 46px; }

/* chapter glyphs bleed past the edges by design — clip them at the section so
   they can never widen the page (measured +4px horizontal wiggle at 500px) */
.ch { overflow: clip; }

/* keyboard focus — visible on the accent, consistent everywhere */
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}
