/* Still Health — landing page styles. Brutalist matte: hard frames, no radii anywhere.
   Tokens mirror the app: field #0C0B09, ink #F4F2EC, Regulation Lime #D6FF3F. */

:root {
  --field: #0C0B09;
  --panel: #121110;
  --ink: #F4F2EC;
  --dim: rgba(244, 242, 236, 0.62);
  --faint: rgba(244, 242, 236, 0.38);
  --rule: rgba(244, 242, 236, 0.28);
  --lime: #D6FF3F;
  --gutter: clamp(20px, 3.4vw, 48px);
  --display: 'Anton', Impact, 'Arial Narrow Bold', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --body: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  background: var(--field);
  color: var(--ink);
  font: 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--lime); text-decoration: none; border-bottom: 1px solid var(--lime); }
a:hover { color: var(--ink); border-bottom-color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
section[id] { scroll-margin-top: 80px; }
b { color: var(--ink); font-weight: 600; }

.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.005em; text-transform: uppercase; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 400; }
.lime { color: var(--lime); }
.dim { color: var(--dim); }

/* ---------- state switch: pre-release vs released ---------- */
body[data-state="pre"] .only-post { display: none !important; }
body[data-state="post"] .only-pre { display: none !important; }

/* ---------- top bar ---------- */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  height: 64px; padding: 0 var(--gutter);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 11, 9, 0.92);
}
.brand { display: flex; align-items: center; gap: 12px; border: 0; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-ring { width: 28px; height: 28px; }
.brand-word { font-family: var(--display); font-size: 22px; line-height: 1; text-transform: uppercase; letter-spacing: 0.005em; white-space: nowrap; }
.topnav { display: flex; gap: 28px; }
.topnav a { color: var(--dim); border: 0; padding: 6px 0; }
.topnav a:hover { color: var(--lime); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding: clamp(40px, 5.5vw, 56px) var(--gutter) 88px;
  border-bottom: 1px solid var(--rule);
}
.hero-copy { display: flex; flex-direction: column; gap: 26px; max-width: 900px; }
.eyebrow { margin: 0; }
h1.display {
  font-size: clamp(48px, 8.9vw, 128px);
  max-width: 100%;
  line-height: 0.92;
  margin-left: -0.03em;
}
.lede { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.5; color: var(--dim); max-width: 560px; margin-top: 4px; }

.cta { display: flex; flex-direction: column; gap: 12px; }
.store {
  display: inline-flex; align-items: center; border: 0; color: var(--ink);
  min-height: 52px; width: max-content;
}
.store[hidden] { display: none; }
.store img { width: 180px; height: 60px; }
.store .store-text { display: none; }
.store.nobadge img { display: none; }
.store.nobadge .store-text {
  display: inline-block; background: var(--lime); color: var(--field);
  font-size: 18px; line-height: 1; padding: 17px 22px;
}
.store.nobadge:hover .store-text { background: var(--ink); }
.cta-note { margin: 0; }

.readout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--rule);
  margin-top: 8px;
}
.cell { padding: 16px 20px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cell:last-child, .cell-wisdom { border-right: 0; }
.cell dt { font-size: 9px; }
.cell dd.display { font-size: clamp(26px, 2.5vw, 36px); line-height: 1; white-space: nowrap; }
.cell .unit { font-size: 0.55em; letter-spacing: 0.02em; }
.cell-wisdom { grid-column: span 2; }
.wisdom.wisdom-long { font-size: clamp(14px, 1.05vw, 16px); }
.wisdom {
  font-family: var(--body); font-style: italic; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.35;
  color: var(--ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.readout-note { font-size: 10px; margin: 0; }

.screen { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.screen figcaption { font-size: 9px; }
.frame {
  position: relative; border: 1px solid var(--rule); background: var(--field);
  overflow: hidden;
}
.frame::before { content: ''; display: block; padding-top: calc(2082 / 958 * 100%); }
.frame > img, .frame > video { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.loop-control {
  align-self: flex-start; background: none; border: 1px solid var(--rule); color: var(--dim);
  padding: 7px 10px; cursor: pointer; font-size: 10px;
}
.loop-control:hover { color: var(--lime); border-color: var(--lime); }
.loop-control[hidden] { display: none; }
.hero-screen { width: 320px; }

.scroll-cue, .hero-tag { position: absolute; bottom: 26px; font-size: 9px; margin: 0; }
.scroll-cue { left: var(--gutter); }
.hero-tag { right: var(--gutter); }

/* ---------- scroll story ---------- */
.story {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding: 84px var(--gutter) 72px;
  border-bottom: 1px solid var(--rule);
}
.story-screen { position: sticky; top: 96px; width: 320px; }
.story-frame > img { opacity: 0; transition: opacity 0.45s ease; }
.story-frame > img.is-active { opacity: 1; }
.rows h2 { margin-bottom: 8px; }
.row {
  display: flex; gap: 28px; align-items: baseline;
  padding: 26px 0; border-top: 1px solid var(--rule);
  min-height: 30vh;
}
.row:last-child { border-bottom: 1px solid var(--rule); }
.row .num { width: 44px; flex-shrink: 0; color: var(--dim); }
.row h3 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1; color: var(--dim); margin-bottom: 10px; transition: color 0.3s ease; }
.row p { color: var(--dim); max-width: 620px; font-size: 16px; line-height: 1.55; }
.row.is-active .num, .row.is-active h3 { color: var(--ink); }
.row.is-active .num { color: var(--lime); }

/* ---------- plans ---------- */
.plans { padding: 64px var(--gutter); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 24px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); }
.plan { padding: 28px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 14px; background: var(--panel); }
.plan:last-child { border-right: 0; }
.price { font-size: clamp(34px, 3.2vw, 44px); line-height: 1; }
.price .unit { font-size: 0.5em; letter-spacing: 0.02em; }
.plan-copy { color: var(--dim); font-size: 15px; line-height: 1.55; }
.plan-fine { font-size: 10px; margin: 0; }

/* ---------- release banner (top of page, under the bar, above the hero) ---------- */
.release {
  padding: clamp(22px, 2.6vw, 34px) var(--gutter); border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center; gap: 48px;
  background: linear-gradient(90deg, rgba(214, 255, 63, 0.06), rgba(214, 255, 63, 0));
}
.release-copy { display: flex; flex-direction: column; gap: 10px; }
.release-date { font-size: clamp(28px, 3.4vw, 48px); line-height: 0.95; }
.release-note { color: var(--dim); font-size: 15px; margin: 0; }
.store-secondary { flex-shrink: 0; }

/* ---------- support ---------- */
.support { padding: 56px var(--gutter); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 22px; }
.support-lead { font-size: 18px; }
.answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.answers > div { display: flex; flex-direction: column; gap: 8px; }
.answers p { color: var(--dim); font-size: 15px; line-height: 1.55; }
.answers p.mono { color: var(--dim); }
.disclaimer { font-size: 13px; }

/* ---------- footer ---------- */
.foot { padding: 26px var(--gutter) 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 10px; }
.foot nav { display: flex; gap: 28px; flex-wrap: wrap; }
.foot a { color: var(--dim); border: 0; }
.foot a:hover { color: var(--lime); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) 280px; }
  .hero-screen { width: 280px; }
  .story { grid-template-columns: 280px minmax(0, 1fr); }
  .story-screen { width: 280px; }
}

@media (max-width: 860px) {
  .top { height: 56px; background: var(--field); }
  .brand-word { font-size: 20px; }
  .brand-ring { width: 24px; height: 24px; }
  .topnav { gap: 18px; }
  .topnav a:nth-child(1) { display: none; }

  .hero { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; }
  .hero-screen { width: min(350px, 100%); }
  .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell-session, .cell-pace { border-bottom: 1px solid var(--rule); }
  .cell-pace, .cell-wisdom { border-right: 0; }
  .cell-wisdom { grid-column: 1 / -1; border-bottom: 0; }
  .scroll-cue { display: none; }
  .hero-tag { right: auto; left: var(--gutter); }

  .story { grid-template-columns: minmax(0, 1fr); padding-top: 56px; gap: 24px; }
  .story-screen { top: 56px; width: 100%; z-index: 5; background: var(--field); padding: 12px 0 14px; border-bottom: 1px solid var(--rule); }
  .story-screen .frame { width: min(calc(40vh * 958 / 2082), 100%); margin: 0 auto; }
  .row { min-height: 0; padding: 22px 0; gap: 18px; }
  .row .num { width: 34px; }

  .plan-grid { grid-template-columns: 1fr; }
  .plan { border-right: 0; border-bottom: 1px solid var(--rule); }
  .plan:last-child { border-bottom: 0; }

  .release { flex-direction: column; align-items: flex-start; gap: 18px; }
  .answers { grid-template-columns: 1fr; gap: 22px; }
  .wisdom { -webkit-line-clamp: 3; }
  .foot { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 480px) {
  .store.nobadge .store-text { font-size: 16px; padding: 16px 18px; }
  .cell { padding: 14px 16px; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .story-frame > img, .row h3 { transition: none; }
}
