/* Runvel — Volt · Organized.
   Colours are lifted from Apps/iOS/Sources/DesignSystem.swift so the site and the app are
   plainly the same product. Type uses the system stack deliberately: on Apple devices that
   resolves to SF Pro — the exact face the app draws — with no webfont to download and no
   silent fallback.

   The organising idea is the INSTRUMENT: this is an app you strap on and read mid-effort,
   so the page borrows its devices — the hairline rule with a mono micro-label, the zone
   ramp, the live trace, tabular figures. Ornament that isn't a readout doesn't belong. */

:root {
  --night: #0e0f0a;
  --night-card: #191a12;
  --night-line: #292a1d;
  --night-ink: #f2f1e6;
  --night-muted: #97968a;
  --night-faint: #6c6b61;
  --volt: #c7f03a;

  /* The app's tested, colourblind-safe zone ramp. */
  --zone-1: #4c8dd6;
  --zone-2: #22b7ac;
  --zone-3: #4fc877;
  --zone-4: #f0b63e;
  --zone-5: #ff5a3c;

  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--night-ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--volt); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(1140px, 100%); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- Shared devices ---------------------------------------------------- */

.micro {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--night-muted);
}

.rule { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; }
.rule i { flex: 1; height: 1px; background: var(--night-line); }
.rule .micro { white-space: nowrap; }

.display { font-weight: 900; letter-spacing: -0.05em; line-height: 0.92; margin: 0; text-wrap: balance; }

/* The app's VoltWord: the underline sits BELOW the letters so the word stays legible. */
.volt-word { position: relative; display: inline-block; padding-bottom: 0.09em; }
.volt-word::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0.085em; border-radius: 999px; background: var(--volt);
}

.zone-bar { display: flex; height: 4px; border-radius: 999px; overflow: hidden; }
.zone-bar i { flex: 1; }
.zone-bar i:nth-child(1) { background: var(--zone-1); }
.zone-bar i:nth-child(2) { background: var(--zone-2); }
.zone-bar i:nth-child(3) { background: var(--zone-3); }
.zone-bar i:nth-child(4) { background: var(--zone-4); }
.zone-bar i:nth-child(5) { background: var(--zone-5); }

/* ---- Reveal on scroll --------------------------------------------------- */

/* Scoped to .js, which is set synchronously in the head. Content is never hidden behind
   a script that might be slow, blocked or broken: without JS the page simply renders,
   and only a browser that has confirmed it can run the observer opts into the fade. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.08s; }
.js .reveal.d2 { transition-delay: 0.16s; }
.js .reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Header ------------------------------------------------------------- */

header.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--night) 82%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
header.top.stuck { border-bottom-color: var(--night-line); }
header.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }

/* The mark is the app's own centre tab-bar button: the figure.run glyph on a volt disc. */
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; letter-spacing: -0.035em; font-size: 20px;
  color: var(--night-ink); text-decoration: none; margin-right: auto;
}
.brand .disc {
  width: 30px; height: 30px; border-radius: 999px; background: var(--volt);
  display: grid; place-items: center; flex: none;
  box-shadow: 0 0 18px -4px rgba(199, 240, 58, 0.55);
}
.brand .disc img { width: 21px; height: 21px; }

nav.top-nav { display: flex; gap: 26px; }
nav.top-nav a { text-decoration: none; color: var(--night-muted); white-space: nowrap; }
nav.top-nav a:hover { color: var(--night-ink); }
nav.top-nav a[aria-current="page"] { color: var(--night-ink); }

/* The nav used to be hidden outright on a phone, which left the only route to the privacy
   policy at the very bottom of the page. It now drops to a second row and scrolls sideways
   if it has to, so every page stays one tap away at any width. */
@media (max-width: 760px) {
  header.top .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-block: 12px 0;
    gap: 10px;
  }
  .brand { font-size: 18px; }
  nav.top-nav {
    order: 3;
    width: 100%;
    gap: 20px;
    padding-bottom: 11px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  nav.top-nav::-webkit-scrollbar { display: none; }
}

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  text-decoration: none; border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--volt); color: var(--night); }
.btn-primary:hover { background: #d5f95a; }
.btn-ghost { color: var(--night-ink); border-color: var(--night-line); }
.btn-ghost:hover { border-color: var(--volt); }

/* App Store link. Until the app is live this is a "coming soon" pill in our own palette —
   Apple requires their official badge artwork on live App Store links, so at launch swap
   the markup for their downloaded badge rather than restyling this. */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 24px 12px 19px; border-radius: 999px;
  background: var(--volt); color: var(--night); text-decoration: none;
  line-height: 1.12;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.appstore svg { width: 23px; height: 23px; fill: currentColor; flex: none; }
.appstore .kicker { display: block; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.66; }
.appstore .label { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -0.015em; }
.appstore[href]:not([href="#"]):hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px var(--volt); }
.appstore[aria-disabled="true"] { background: transparent; color: var(--night-ink); border: 1px solid var(--night-line); cursor: default; }
.appstore[aria-disabled="true"] .kicker { color: var(--volt); opacity: 1; }

/* ---- Hero --------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; }
/* A slow volt bloom behind the device — depth without reaching for a gradient. */
.hero::before {
  content: "";
  position: absolute; inset: -22% -12% auto auto;
  width: min(780px, 92vw); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(199, 240, 58, 0.11), transparent 62%);
  pointer-events: none;
}
#trace { position: absolute; inset: auto 0 0 0; width: 100%; height: 200px; opacity: 0.55; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(24px, 5vw, 64px); align-items: center;
  padding: clamp(52px, 9vw, 112px) 0 clamp(40px, 6vw, 76px);
}
.hero h1 { font-size: clamp(58px, 11.5vw, 132px); }
.hero .lede { color: var(--night-muted); font-size: clamp(17px, 2.1vw, 21px); max-width: 40ch; margin: 28px 0 0; line-height: 1.5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { margin: 16px 0 0; font-size: 13px; color: var(--night-faint); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 44px; }
  .hero .stage { order: -1; }
  .hero h1 { font-size: clamp(54px, 14vw, 92px); }
}

/* ---- Device ------------------------------------------------------------- */

.stage { display: flex; justify-content: center; perspective: 1400px; }
.phone {
  position: relative;
  width: min(320px, 74vw);
  aspect-ratio: 1179 / 2556;
  border-radius: 14% / 6.6%;
  padding: 10px;
  background: linear-gradient(155deg, #3a3b2e, #14150f 44%, #2f3024);
  box-shadow: 0 60px 110px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(199, 240, 58, 0.14),
              0 0 90px -30px rgba(199, 240, 58, 0.35);
  transform: rotateY(-9deg) rotateX(3deg) rotateZ(-1deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.stage:hover .phone { transform: rotateY(-3deg) rotateX(1deg); }
.phone-screen { position: relative; height: 100%; border-radius: 12% / 5.6%; overflow: hidden; background: var(--night); }
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: cycle 15s infinite; }
.phone-screen img:nth-child(1) { animation-delay: 0s; }
.phone-screen img:nth-child(2) { animation-delay: 5s; }
.phone-screen img:nth-child(3) { animation-delay: 10s; }
@keyframes cycle {
  0%, 1% { opacity: 0; transform: scale(1.03); }
  5%, 30% { opacity: 1; transform: scale(1); }
  35%, 100% { opacity: 0; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .phone { transform: none; }
  .phone-screen img { animation: none; opacity: 0; transform: none; }
  .phone-screen img:first-child { opacity: 1; }
}

/* ---- Telemetry strip ---------------------------------------------------- */

.telemetry { border-block: 1px solid var(--night-line); display: grid; grid-template-columns: repeat(4, 1fr); }
.telemetry div { padding: 22px 10px; text-align: center; border-left: 1px solid var(--night-line); }
.telemetry div:first-child { border-left: 0; }
.telemetry b {
  display: block; font-family: var(--mono); font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 700; letter-spacing: 0.06em; color: var(--volt); text-wrap: balance;
}
.telemetry span { display: block; margin-top: 6px; }
@media (max-width: 700px) {
  .telemetry { grid-template-columns: repeat(2, 1fr); }
  .telemetry div:nth-child(-n+2) { border-bottom: 1px solid var(--night-line); }
  .telemetry div:nth-child(odd) { border-left: 0; }
}

/* ---- Features ----------------------------------------------------------- */

.feature { padding: clamp(60px, 10vw, 132px) 0; }
.feature + .feature { border-top: 1px solid var(--night-line); }
.feature .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 7vw, 92px); align-items: center; }
.feature.flip .copy { order: 2; }
.feature h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.0; margin: 18px 0 20px; text-wrap: balance; }
.feature p { color: var(--night-muted); max-width: var(--measure); font-size: 17px; margin: 0; }
.feature p + p { margin-top: 14px; }
@media (max-width: 860px) {
  .feature .wrap { grid-template-columns: 1fr; }
  .feature.flip .copy { order: 0; }
}

/* In-page device frame. Shared by every feature block on all three landings so a
   screenshot is always shown at the shape it was actually taken in. Height is pinned
   explicitly rather than inferred, so an img's height attribute can never leak through. */
.device-stage { display: flex; justify-content: center; }
.device {
  width: min(272px, 66vw);
  aspect-ratio: 1179 / 2556;
  border-radius: 14% / 6.6%;
  padding: 9px;
  background: linear-gradient(155deg, #3a3b2e, #14150f 44%, #2f3024);
  box-shadow: 0 44px 88px -42px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(199, 240, 58, 0.12);
}
.device-screen { height: 100%; border-radius: 12% / 5.6%; overflow: hidden; background: var(--night); }
.device-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Not flex: a flex container turns each contiguous run of text into its own anonymous
   item, so the bold lead-in and the rest of the sentence split into ragged columns. The
   marker is absolutely positioned instead and the sentence stays one flowing line. */
.bullets { list-style: none; padding: 0; margin: 24px 0 0; }
.bullets li {
  position: relative; padding: 12px 0 12px 26px;
  border-top: 1px solid var(--night-line);
  color: var(--night-muted); font-size: 15.5px;
}
.bullets li::before { content: "→"; position: absolute; left: 0; top: 12px; color: var(--volt); }
.bullets strong { color: var(--night-ink); font-weight: 650; }

/* ---- Coach cue demo ----------------------------------------------------- */

.cue-stack { display: grid; gap: 12px; }
.cue { border: 1px solid var(--night-line); background: var(--night-card); border-radius: 16px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.cue .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--volt); flex: none; }
.cue .dot.z4 { background: var(--zone-4); }
.cue .dot.z2 { background: var(--zone-2); }
.cue .dot.z5 { background: var(--zone-5); }
.cue p { margin: 0; color: var(--night-ink); font-size: 16px; font-weight: 600; }
.cue .when { margin-left: auto; white-space: nowrap; }

/* ---- Evidence teaser ---------------------------------------------------- */

.evidence-teaser { border-top: 1px solid var(--night-line); padding: clamp(60px, 9vw, 124px) 0; }
.evidence-teaser .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 6vw, 72px); align-items: end; }
.evidence-teaser blockquote { margin: 0; font-size: clamp(26px, 4.2vw, 46px); font-weight: 900; letter-spacing: -0.038em; line-height: 1.06; max-width: 22ch; text-wrap: balance; }
.evidence-teaser blockquote em { font-style: normal; color: var(--volt); }
.evidence-teaser .side { color: var(--night-muted); max-width: 42ch; }
@media (max-width: 860px) { .evidence-teaser .wrap { grid-template-columns: 1fr; align-items: start; } }

/* ---- CTA band ----------------------------------------------------------- */

.cta {
  margin: 0 var(--gutter) clamp(28px, 5vw, 56px);
  border-radius: 28px; background: var(--volt); color: var(--night);
  padding: clamp(44px, 7vw, 84px) clamp(26px, 5vw, 68px);
  position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(34px, 5.6vw, 62px); font-weight: 900; letter-spacing: -0.045em; line-height: 0.98; margin: 0 0 16px; max-width: 16ch; }
.cta p { margin: 0; max-width: 44ch; color: rgba(14, 15, 10, 0.72); font-size: 17px; }
.cta .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta .btn-dark { background: var(--night); color: var(--volt); }
.cta .btn-line { border-color: rgba(14, 15, 10, 0.3); color: var(--night); }
.cta .btn-line:hover { border-color: var(--night); }
.cta .figure { position: absolute; right: 2%; bottom: -12%; width: clamp(170px, 24vw, 280px); opacity: 0.12; pointer-events: none; }
@media (max-width: 760px) { .cta .figure { display: none; } }

/* ---- Footer ------------------------------------------------------------- */

footer { border-top: 1px solid var(--night-line); padding: 44px 0 60px; color: var(--night-faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: baseline; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
footer a { color: var(--night-muted); text-decoration: none; }
footer a:hover { color: var(--night-ink); }

/* ---- Long-form pages (evidence, privacy, terms, support) ---------------- */

.page { padding: clamp(48px, 8vw, 92px) 0 clamp(52px, 8vw, 104px); }
.page h1 { font-size: clamp(38px, 6.4vw, 72px); font-weight: 900; letter-spacing: -0.045em; line-height: 0.98; margin: 0 0 14px; text-wrap: balance; }
.page .updated { margin: 0 0 40px; }
.page .intro { color: var(--night-muted); font-size: clamp(17px, 2vw, 20px); max-width: 54ch; }
.page h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 900; letter-spacing: -0.03em; margin: 54px 0 14px; }
.page h3 { font-size: 17px; font-weight: 750; margin: 28px 0 8px; color: var(--night-ink); }
.page p, .page li { color: var(--night-muted); max-width: var(--measure); font-size: 16.5px; }
.page strong { color: var(--night-ink); font-weight: 650; }
.page ul { padding-left: 20px; }
.page li { margin-bottom: 8px; }
.page table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 12px; }
.page table th, .page table td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--night-line); vertical-align: top; color: var(--night-muted); }
.page table th { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }

.toc { margin: 34px 0 48px; padding: 20px 22px; border: 1px solid var(--night-line); border-radius: var(--radius); background: var(--night-card); }
.toc a { display: block; padding: 4px 0; font-size: 15px; text-decoration: none; color: var(--night-muted); }
.toc a:hover { color: var(--volt); }

.notice {
  border: 1px solid var(--night-line); border-left: 3px solid var(--volt);
  background: var(--night-card); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px; margin: 30px 0;
}
.notice p { margin: 0; font-size: 16px; }
.notice p + p { margin-top: 12px; }

/* ---- Evidence findings -------------------------------------------------- */

.finding { border: 1px solid var(--night-line); background: var(--night-card); border-radius: var(--radius); padding: 24px 26px; margin-top: 14px; }
.finding .head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.finding h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; flex: 1 1 300px; color: var(--night-ink); }
.finding p { margin: 0; max-width: var(--measure); font-size: 16px; }
.finding p + p { margin-top: 10px; }
.verdict { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.verdict.supported { color: var(--night); background: var(--volt); }
.verdict.thin { color: var(--night-muted); border: 1px solid var(--night-line); }
.verdict.changed { color: var(--night); background: var(--zone-4); }
.cite { display: block; margin-top: 12px; color: var(--night-faint); font-size: 13.5px; font-family: var(--mono); line-height: 1.55; max-width: var(--measure); }

/* ---- Expandable questions ---------------------------------------------- */

.faq { margin-top: 30px; max-width: 820px; }
.faq details { border-top: 1px solid var(--night-line); }
.faq details:last-of-type { border-bottom: 1px solid var(--night-line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  position: relative;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--night-ink);
}
.faq summary::-webkit-details-marker { display: none; }
/* A plus that becomes a minus, drawn rather than typed so it stays optically centred. */
.faq summary::after,
.faq summary::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  background: var(--volt);
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.faq summary::before { width: 13px; height: 2px; margin-top: -1px; }
.faq summary::after { width: 2px; height: 13px; margin-top: -6.5px; margin-right: 5.5px; }
.faq details[open] summary::after { transform: rotate(90deg); opacity: 0; }
.faq summary:hover { color: var(--volt); }
.faq .answer { padding: 0 0 20px; }
.faq .answer p { margin: 0; max-width: var(--measure); }
.faq .answer p + p { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) {
  .faq summary::after, .faq summary::before { transition: none; }
}
