/* Hallmark · shape: app download page · genre: atmospheric · theme: brand · surface: absolute
 * paper: oklch(14% 0.006 265) · accent: oklch(93% 0.2 122) · display: Instrument Sans · body: Instrument Sans · hero: layered photo, the headline passing behind the athlete cut-out · nav: wordmark and one action · footer: wordmark over legal links · signature: the woven 8 as a track with a charged ball running laps, a crackling bolt following it
 * axes: dark/grotesk-sans/chromatic-volt · posture: full-bleed · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R4 V4 · weakest: E, the feature panels are built from the app rather than captured; real screens are the next material */
/* Hallmark · waive 38iii · the volt line is the whole third step, Start racing, set once in the hero as its own line · the three-step message is the page's signature and the last step is the payoff */
/* Hallmark · waive 7b · --color-ink is the app theme's pure white text (Colors.text) · the owner chose pure white over tinted whites for the brand */
@import url("./tokens.css");
@import url("./base.css");

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* One centred, capped column for everything but the full-bleed hero and marquee. */

.closer,
.nav,
.footer {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The woven 8 (a symbol): frost for you, volt for your partner. */
.loop-you,
.loop-partner { fill: none; stroke-width: 10; stroke-linecap: round; }
.loop-you { stroke: var(--color-ink-2); }
.loop-partner { stroke: var(--color-accent); }
.loop-gap { stroke: var(--color-paper); stroke-width: 18; }
.loop-over { stroke-linecap: butt; }
.mark { width: 48px; height: 24px; flex: none; }

/* Navigation */
.nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: var(--z-sticky-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-lg);
}
.brand { display: flex; align-items: center; gap: var(--space-xs); font-weight: 700; font-size: var(--text-lg); text-decoration: none; border-radius: var(--radius-card); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-accent) 60%, transparent);
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.button:hover { box-shadow: 0 0 24px 2px color-mix(in oklab, var(--color-accent) 45%, transparent); }
.button:active { transform: scale(0.97); }
.button:focus-visible { outline-color: var(--color-ink); outline-offset: 3px; }
.button-small { min-height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.soon { color: var(--color-muted); font-size: var(--text-sm); }

/* Hero, the start line: the photo, then the words, then her cut out on top, so the words pass
   behind her. Photo and cut-out share one size and crop, so they stay lined up at every width. */
.hero { position: relative; height: min(100svh, 920px); min-height: 600px; overflow: hidden; isolation: isolate; display: grid; align-items: end; }
.hero-photo,
.hero-cutout { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 70% 50%; pointer-events: none; }
.hero-photo { z-index: 0; }
/* No z-index or transform here, so each line can sit on its own side of her: the first line in
   front, the other two behind. */
.hero-words { position: absolute; inset: 0 0 8%; max-width: none; display: grid; align-content: center; padding-inline: var(--gutter); font-size: clamp(3rem, 9.5vw, 10rem); line-height: 0.92; letter-spacing: -0.035em; text-wrap: nowrap; white-space: nowrap; }
.hero-words span { position: relative; z-index: 1; display: block; will-change: transform; }
.hero-words span:first-child { z-index: 3; }
.hero-cutout { z-index: 2; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; z-index: 3; background: linear-gradient(to top, var(--color-paper) 15%, transparent); pointer-events: none; }
.hero-copy {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter) var(--space-2xl);
  display: grid;
  gap: var(--space-md);
}
.hero-place { color: var(--color-ink-2); max-width: 46ch; }
.start-line { position: absolute; z-index: 4; inset: auto 0 0; height: 10px; background: repeating-linear-gradient(90deg, var(--color-ink) 0 12px, var(--color-paper) 12px 24px); }
.volt { color: var(--color-accent); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); }

/* The electric 8: braided plasma strands tracing the woven 8 on its own dark stage. */
.logo-stage { display: grid; justify-items: center; gap: var(--space-md); padding: var(--space-3xl) var(--gutter) var(--space-2xl); }
.plasma { display: block; width: min(760px, 100%); aspect-ratio: 2 / 1; touch-action: pan-y; }
.plasma-small { width: 240px; }
.pitch { display: grid; justify-items: center; text-align: center; gap: var(--space-sm); max-width: 40rem; }
.pitch-not { color: var(--color-accent); font-size: var(--text-lg); font-weight: 700; }
.pitch-big { font-size: var(--text-display); max-width: 14ch; line-height: 1; }
.pitch-heart { font-size: var(--text-xl); font-weight: 600; color: var(--color-ink-2); margin-top: var(--space-sm); }
.pitch .hand { margin-bottom: 0; }

/* Marquee strip */
.marquee { overflow: hidden; border-block: var(--rule-hair) solid var(--color-rule); padding-block: var(--space-md); }
.marquee-track { display: flex; align-items: center; gap: var(--space-xl); width: max-content; padding-inline: var(--space-xl); font-size: var(--text-2xl); font-weight: 700; white-space: nowrap; will-change: transform; }
.marquee-track span:nth-of-type(3n) { color: var(--color-accent); }

/* The race: 1 km, then a station, eight times. Without the script the stations are a plain list. */
.race-intro { width: 100%; max-width: var(--container); margin-inline: auto; padding: var(--section-gap) var(--gutter) var(--space-xl); display: grid; gap: var(--space-sm); }
.race-lede { color: var(--color-ink-2); }
.race-stage { position: relative; }
.race-hud { display: none; }
.revolver { width: 100%; max-width: var(--container); margin-inline: auto; padding: 0 var(--gutter) var(--section-gap-s); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-xl); }
.station { display: grid; gap: var(--space-xs); align-content: start; min-width: 0; }
/* Each card: the station photo faded into the background, a piece of the app on top, the words below. */
.station-frame { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); margin-bottom: var(--space-sm); display: grid; place-items: center; padding: var(--space-md); }
.station-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.38; }
.station-frame::after { content: ""; position: absolute; inset: 0; background: radial-gradient(75% 75% at 50% 50%, transparent, color-mix(in oklab, var(--color-paper) 70%, transparent)); }

/* The app pieces: small, real-looking slices of the screens. */
.ui { position: relative; z-index: 1; width: min(100%, 320px); display: grid; gap: var(--space-xs); padding: var(--space-md); border-radius: 18px; background: color-mix(in oklab, var(--color-paper-2) 88%, transparent); border: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); line-height: 1.4; }
.ui p { max-width: none; }
.ui b { font-weight: 700; }
.ui-row { display: flex; align-items: center; gap: var(--space-sm); }
.ui-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 72% 30%; flex: none; }
.ui-tag { display: inline-block; padding: 0 var(--space-xs); border-radius: 999px; border: var(--rule-hair) solid var(--color-accent); color: var(--color-accent); font-size: var(--text-xs); font-weight: 700; }
.ui-volt { color: var(--color-accent); font-weight: 600; }
.ui-muted { color: var(--color-muted); }
.ui-label { color: var(--color-muted); font-size: var(--text-xs); font-weight: 700; }
.ui-big { font-size: var(--text-md); }
.ui-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xs); padding-block: var(--space-xs); border-block: var(--rule-hair) solid var(--color-rule); }
.ui-stats span { display: block; color: var(--color-muted); font-size: var(--text-xs); }
.ui-stats b { color: var(--color-accent); font-variant-numeric: tabular-nums; }
.ui-score { justify-self: start; display: inline-flex; align-items: baseline; gap: var(--space-2xs); padding: var(--space-2xs) var(--space-sm); border-radius: 999px; background: var(--color-accent); color: var(--color-accent-ink); font-weight: 700; }
.ui-score b { font-size: var(--text-xl); }
.ui-fit p::before, .ui-book .ui-check { color: var(--color-accent); font-weight: 700; }
.ui-fit p::before { content: "✓ "; }
.ui-buttons-round { display: flex; justify-content: center; gap: var(--space-md); }
.ui-pass, .ui-like { display: grid; place-items: center; min-height: 52px; border-radius: 999px; font-weight: 700; }
.ui-pass { width: 52px; border: var(--rule-hair) solid var(--color-rule); color: var(--color-ink-2); }
.ui-like { padding: 0 var(--space-lg); background: var(--color-accent); color: var(--color-accent-ink); }
.ui-match { text-align: center; color: var(--color-accent); font-weight: 700; font-size: var(--text-md); }
.ui-chat p { max-width: 80%; padding: var(--space-2xs) var(--space-sm); border-radius: 14px; }
.ui-chat .them { justify-self: start; background: var(--color-paper-3); }
.ui-chat .me { justify-self: end; background: var(--color-accent); color: var(--color-accent-ink); }
.ui-buttons { display: flex; gap: var(--space-xs); }
.ui-buttons span, .ui-button { display: inline-grid; place-items: center; min-height: 36px; padding: 0 var(--space-sm); border-radius: 999px; border: var(--rule-hair) solid var(--color-rule); font-weight: 700; }
.ui-buttons .solid, .ui-button.solid { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.ui-button { justify-self: start; }
.ui-date { display: grid; place-items: center; width: 52px; padding-block: var(--space-2xs); border-radius: 12px; background: var(--color-paper-3); flex: none; }
.ui-date span { color: var(--color-accent); font-size: var(--text-xs); font-weight: 700; }
.ui-date b { font-size: var(--text-xl); line-height: 1; }
.ui-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }
.ui-split > div { padding: var(--space-xs); border-radius: 12px; background: var(--color-paper-3); }
.ui-split .theirs { background: color-mix(in oklab, var(--color-accent) 16%, var(--color-paper-2)); }
.ui-split .theirs .ui-label { color: var(--color-accent); }
.station h3 { font-size: var(--text-title); font-variant-numeric: tabular-nums; }
.station-body { color: var(--color-ink-2); max-width: 40ch; }

/* With the script: one sticky stage you scroll through. The lane markings stream past while you
   run and stop at each station; the cards turn like a revolver, the current one in full colour. */
.js .race { height: 900svh; }
.js .race-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.js .race-floor {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background:
    linear-gradient(90deg, transparent 14%, var(--color-rule) 14% calc(14% + 2px), transparent calc(14% + 2px) calc(86% - 2px), var(--color-rule) calc(86% - 2px) 86%, transparent 86%),
    repeating-linear-gradient(180deg, color-mix(in oklab, var(--color-ink-2) 45%, transparent) 0 46px, transparent 46px 120px);
  background-size: 100% 100%, 4px 120px;
  background-repeat: no-repeat, repeat-y;
  background-position: 0 0, 50% var(--lane, 0px);
  mask-image: linear-gradient(to bottom, transparent, var(--color-ink) 25%, var(--color-ink) 80%, transparent);
}
.js .race-hud { position: relative; z-index: 2; display: grid; gap: var(--space-sm); width: 100%; max-width: var(--container); margin-inline: auto; padding: var(--space-3xl) var(--gutter) var(--space-sm); }
.race-hud-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); }
.race-phase { font-size: var(--text-xl); font-weight: 700; }
.race-phase em { font-style: normal; color: var(--color-accent); }
.race-km { color: var(--color-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
/* The lane: edge lines top and bottom, and one centre dash per kilometre. A finished dash turns volt. */
.lane { position: relative; height: 28px; display: grid; align-items: center; border-block: 2px solid var(--color-rule); }
.lane-dashes { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--space-sm); }
.lane-dashes i { position: relative; height: 4px; border-radius: 2px; background: var(--color-paper-3); overflow: hidden; }
.lane-dashes i::before { content: ""; position: absolute; inset: 0; width: var(--run, 0%); background: var(--color-ink-2); }
.lane-dashes i.done { background: var(--color-accent); }
.lane-dashes i.done::before { display: none; }
.lane-runner { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; translate: -50% -50%; border-radius: 50%; background: var(--color-ink); box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-accent) 35%, transparent); }
.js .revolver { position: relative; z-index: 1; display: grid; place-items: center; max-width: none; padding: 0 0 var(--space-xl); perspective: 1400px; }
.js .station { position: absolute; width: min(84vw, 520px); will-change: transform, opacity, filter; }
.js .station-frame { max-height: 46svh; }
.js .station > h3,
.js .station > p,
.js .station .ui { opacity: var(--text, 1); }
/* The close, at the finish line */
.finish-line { height: 28px; background: repeating-conic-gradient(var(--color-ink) 0 25%, var(--color-paper) 0 50%) 0 0 / 28px 28px; }
.closer { display: grid; justify-items: center; text-align: center; gap: var(--space-md); padding-block: var(--section-gap); }
.closer h2 { max-width: 16ch; }
.hand { font-family: var(--font-outlier); font-size: var(--text-2xl); line-height: 1.1; color: var(--color-accent); rotate: -2deg; margin-bottom: var(--space-md); }

/* Footer */
.footer { display: grid; gap: var(--space-md); padding-block: var(--space-2xl); border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-muted); font-size: var(--text-sm); }
.footer-brand { color: var(--color-ink); font-weight: 700; font-size: var(--text-lg); }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); }
.footer a { border-radius: 2px; }
.footer a:hover { color: var(--color-ink); }
.fine { max-width: 70ch; }

/* Click sparks */
.sparks { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: var(--z-toast); }

/* Motion, only once the script runs and only without reduced motion; with neither, everything shows still. */
@media (prefers-reduced-motion: no-preference) {
  /* The headline slides in from the right, passing behind her, and settles on the left. */
  .js .hero-words span { animation: around 1100ms var(--ease-out) both; }
  .js .hero-words span:nth-child(2) { animation-delay: 140ms; }
  .js .hero-words span:nth-child(3) { animation-delay: 280ms; }
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
  .js .reveal.in { opacity: 1; transform: none; }
}

@keyframes around { from { translate: 70vw 0; } }

@media (max-width: 40rem) {
  .brand span { display: none; }
  /* On phones she fills the frame, so the photo starts lower and the words sit above her head. */
  .hero-photo,
  .hero-cutout { inset: 20% 0 0; height: 80%; object-position: 64% 50%; mask-image: linear-gradient(to bottom, transparent, var(--color-ink) 18%); }
  .hero-words { inset: 88px 0 auto; align-content: start; font-size: 2.7rem; }
  .marquee-track { font-size: var(--text-xl); }
}
