/* Generated by scripts/build-landing.mjs: fonts + @shottimer/ui tokens + landing.css */
@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/barlow/barlow-latin-400-normal.woff2) format('woff2');}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/barlow/barlow-latin-600-normal.woff2) format('woff2');}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/barlow/barlow-condensed-latin-600-normal.woff2) format('woff2');}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/barlow/barlow-condensed-latin-700-normal.woff2) format('woff2');}
/*
 * ShotTimer design tokens — "range signage".
 *
 * Two modes, chosen by the environment preset (ThemeController):
 *   daylight — outdoor: white paper, black ink (highest contrast in sun glare)
 *   bay      — indoor / low light: true black (OLED), light ink
 * The one bold element in both: the readout plate, black figures on signal yellow.
 *
 * Tokens apply to :root and to any element with [data-theme] (previews, scoped areas).
 */

:root,
[data-theme='daylight'] {
  /* colour */
  --st-paper: #ffffff;
  --st-surface: #f1f3f5; /* raised panels, sheets */
  --st-ink: #000000;
  --st-ink-2: #4a525c; /* secondary text (steel), 8:1 on paper */
  --st-ink-3: #6b737d; /* hints, disabled, 4.9:1 */
  --st-rule: #d3d8de; /* hairlines, control outlines */
  --st-plate: #ffc409; /* signal yellow: readout plate, primary action */
  --st-plate-ink: #000000;
  --st-beep: #0077c8; /* beep / buzzer markers */
  --st-shot: #000000; /* shot markers on paper */
  --st-danger: #d7261e;
  --st-success: #137a43;
  --st-focus: #0077c8;
  --st-scrim: rgb(0 0 0 / 0.4);
  --st-raised: #ffffff; /* sheets and dialogs: the scrim separates them */
  /* spectrogram: ink on paper; shots signal yellow, beeps green, both cased in black; cursor ink */
  --st-spec-bg: #ffffff;
  --st-spec-shot: #ffc409;
  --st-spec-beep: #00c853;
  --st-spec-casing: #000000;
  --st-spec-cursor: #000000;
  --st-spec-label-bg: rgb(255 255 255 / 0.82);
  --st-spec-label-fg: #000000;
  --st-spec-band: rgb(0 119 200 / 0.07);
  color-scheme: light;
}

[data-theme='bay'] {
  --st-paper: #000000;
  --st-surface: #15181c;
  --st-ink: #f2f2f0;
  --st-ink-2: #a3abb5;
  --st-ink-3: #7c8590;
  --st-rule: #2c3138;
  --st-plate: #ffc409;
  --st-plate-ink: #000000;
  --st-beep: #4fb3ff;
  --st-shot: #ffc409;
  --st-danger: #ff5a4f;
  --st-success: #3dd68c;
  --st-focus: #ffc409;
  --st-scrim: rgb(0 0 0 / 0.6);
  --st-raised: #1c2026; /* on true black a scrim is invisible: raise sheets by colour */
  /* spectrogram: amber energy on black; shots signal yellow, beeps bright green, cased in black */
  --st-spec-bg: #000000;
  --st-spec-shot: #ffc409;
  --st-spec-beep: #3dff6e;
  --st-spec-casing: #000000;
  --st-spec-cursor: #f2f2f0;
  --st-spec-label-bg: rgb(0 0 0 / 0.6);
  --st-spec-label-fg: #f2f2f0;
  --st-spec-band: rgb(79 179 255 / 0.08);
  color-scheme: dark;
}

:root {
  /* type: Barlow for text, Barlow Condensed for figures and headings (signage) */
  --st-font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --st-font-figures: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  /* scale ≈ 1.25 from 16 px */
  --st-text-xs: 0.8125rem; /* 13 */
  --st-text-s: 0.875rem; /* 14 */
  --st-text-m: 1rem; /* 16 */
  --st-text-l: 1.25rem; /* 20 */
  --st-text-xl: 1.5625rem; /* 25 */
  --st-text-2xl: 2rem; /* 32 */
  --st-readout: clamp(4.5rem, 24vw, 10rem); /* the plate figures */
  --st-figure-l: 1.75rem; /* stats row figures */

  /* space: 4 px steps */
  --st-s1: 4px;
  --st-s2: 8px;
  --st-s3: 12px;
  --st-s4: 16px;
  --st-s5: 24px;
  --st-s6: 32px;
  --st-s7: 48px;

  /* shape: small radii, industrial; pills only for toggles */
  --st-r1: 4px;
  --st-r2: 6px;
  --st-r-pill: 999px;
  --st-border: 1px solid var(--st-rule);
  --st-border-strong: 2px solid var(--st-ink);

  /* touch */
  --st-hit: 48px;
  --st-hit-primary: 64px;
  --st-tabbar: 64px;

  /* motion */
  --st-ease: cubic-bezier(0.2, 0, 0, 1);
  --st-fast: 120ms;
  --st-mid: 200ms;
  --st-slow: 320ms;

  /* safe areas */
  --st-safe-top: env(safe-area-inset-top, 0px);
  --st-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/*
 * ShotTimer landing page (static, no framework). The build (scripts/build-landing.mjs) puts the
 * design-system tokens (@shottimer/ui tokens.css) and the Barlow @font-face rules in front of
 * this file, so colours, type and spacing are the app's own.
 *
 * One bold element: the readout plate running a real string in the hero. Everything else is
 * quiet signage: big condensed headings, left aligned, rules instead of cards.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--st-paper);
}

body {
  margin: 0;
  background: var(--st-paper);
  color: var(--st-ink);
  font: 400 1.0625rem/1.55 var(--st-font);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--st-font-figures);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  max-width: 34em;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--st-focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--st-s4);
  top: -100px;
  background: var(--st-plate);
  color: var(--st-plate-ink);
  padding: var(--st-s2) var(--st-s3);
  z-index: 2;
}
.skip:focus {
  top: var(--st-s2);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.top,
main > section,
.foot {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: max(var(--st-s5), env(safe-area-inset-left, 0px));
}

main > section + section {
  margin-top: clamp(4rem, 12vw, 8rem);
}

h2 {
  font-size: clamp(2.25rem, 8vw, 3.75rem);
  margin-bottom: var(--st-s5);
  max-width: 14em;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--st-s4);
  padding-top: calc(var(--st-s4) + env(safe-area-inset-top, 0px));
  padding-bottom: var(--st-s4);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: var(--st-s2);
  font: 700 1.5rem/1 var(--st-font-figures);
  text-decoration: none;
}

.mark__plate {
  width: 1.9rem;
  height: 1.9rem;
  display: block;
}

/* ".app" in beep blue, as in the wordmark on exports and the end card. */
.mark__tld {
  color: var(--st-beep);
}

.top__open {
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  min-height: var(--st-hit);
  display: inline-flex;
  align-items: center;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-s3);
  margin-top: var(--st-s6);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--st-hit-primary);
  padding: 0 var(--st-s6);
  border-radius: var(--st-r1);
  font: 700 1.375rem/1 var(--st-font-figures);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--st-plate);
  color: var(--st-plate-ink);
  border-color: var(--st-plate);
}
.btn--primary:hover {
  border-color: var(--st-ink);
}

.btn--secondary {
  background: transparent;
  color: var(--st-ink);
  border-color: var(--st-ink);
}
.btn--secondary:hover {
  background: var(--st-surface);
}

.btn[hidden],
[hidden] {
  display: none;
}

.returning,
.ios-hint {
  margin-top: var(--st-s3);
  color: var(--st-ink-2);
  font-size: var(--st-text-s);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  gap: var(--st-s7);
  padding-top: clamp(var(--st-s5), 6vw, 5rem);
}

.hero h1 {
  font-size: clamp(3.25rem, 15vw, 7.5rem);
  line-height: 0.9;
  max-width: 8em;
}

.lead {
  margin-top: var(--st-s5);
  font-size: 1.1875rem;
  color: var(--st-ink-2);
}

/* The plate: the app's readout, black figures on signal yellow. */
.demo {
  margin: 0;
}

.plate {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--st-s4);
  background: var(--st-plate);
  color: var(--st-plate-ink);
  border-radius: var(--st-r2);
  padding: var(--st-s4) var(--st-s5) var(--st-s3);
}

.plate__time {
  font: 700 clamp(5.5rem, 30vw, 10rem) / 0.85 var(--st-font-figures);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.plate__caption {
  font: 600 1.25rem/1.1 var(--st-font-figures);
  text-align: right;
  padding-bottom: var(--st-s2);
}

/* Time strip: beep at 0, shots where they happened (0–2.5 s). */
.strip {
  --span: 2.5;
  position: relative;
  height: 3.25rem;
  margin: var(--st-s4) 0 var(--st-s2);
}

.strip__rule {
  position: absolute;
  inset: auto 0 0.75rem 0;
  height: 2px;
  background: var(--st-ink);
}

.tick {
  position: absolute;
  left: calc(var(--t) / var(--span) * 100%);
  bottom: 0.75rem;
  width: 3px;
  height: 2rem;
  margin-left: -1.5px;
  background: var(--st-shot);
  transform-origin: bottom;
}

.tick--beep {
  width: 4px;
  height: 2.75rem;
  background: var(--st-beep);
}

.splits {
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-s2) var(--st-s5);
  margin: 0;
  font-family: var(--st-font-figures);
  font-variant-numeric: tabular-nums;
}

.splits div {
  display: flex;
  gap: var(--st-s2);
  align-items: baseline;
}

.splits dt {
  color: var(--st-ink-2);
  font-weight: 600;
}

.splits dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.demo figcaption {
  margin-top: var(--st-s3);
  color: var(--st-ink-3);
  font-size: var(--st-text-s);
}

/* One orchestrated moment: the string runs once on load (landing.js adds .is-running). */
.demo.is-running .tick:not(.tick--beep) {
  transform: scaleY(0);
}
.demo.is-running .tick.is-fired {
  transform: scaleY(1);
  transition: transform 90ms var(--st-ease);
}

/* ── Sequence ───────────────────────────────────────────────────────────── */

.sequence {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--st-s5);
  border-left: 2px solid var(--st-ink);
}

.sequence li {
  counter-increment: step;
  position: relative;
  padding-left: var(--st-s6);
}

/* Step number: a small square sitting on the rule. */
.sequence li::before {
  content: counter(step);
  position: absolute;
  left: calc(-0.875rem - 1px);
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  background: var(--st-paper);
  border: 2px solid var(--st-ink);
  border-radius: var(--st-r1);
  font: 700 1.125rem/1 var(--st-font-figures);
}

.sequence h3 {
  font-size: 1.75rem;
  margin-bottom: var(--st-s1);
}

.sequence p {
  color: var(--st-ink-2);
}

/* ── Features ───────────────────────────────────────────────────────────── */

.feature {
  display: grid;
  gap: var(--st-s6);
  align-items: center;
}

.feature__text p {
  color: var(--st-ink-2);
}

/* Screenshot frame (phone proportions); real screenshots replace the label. */
.frame {
  width: min(100%, 15rem);
  aspect-ratio: 9 / 19.5;
  border: var(--st-border-strong);
  border-radius: 1.75rem;
  background: var(--st-surface);
  display: grid;
  place-items: center;
  padding: var(--st-s5);
  color: var(--st-ink-3);
  font-size: var(--st-text-s);
  text-align: center;
  overflow: hidden;
}

.frame:has(img) {
  padding: 0;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Privacy band (Bay palette) ─────────────────────────────────────────── */

.private {
  background: var(--st-paper);
  color: var(--st-ink);
  border-radius: var(--st-r2);
  padding-block: clamp(var(--st-s6), 8vw, 5rem);
  border-left: 0.75rem solid var(--st-plate);
}

.private p {
  color: var(--st-ink-2);
  font-size: 1.1875rem;
}

/* ── Sports ─────────────────────────────────────────────────────────────── */

.sports__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-s2) var(--st-s5);
  font: 700 clamp(1.5rem, 5vw, 2.25rem) / 1.2 var(--st-font-figures);
}


/* ── FAQ ────────────────────────────────────────────────────────────────── */

.faq details {
  border-top: var(--st-border);
  max-width: 44rem;
}
.faq details:last-of-type {
  border-bottom: var(--st-border);
}

.faq summary {
  cursor: pointer;
  min-height: var(--st-hit);
  padding: var(--st-s3) 0;
  font: 600 1.375rem/1.2 var(--st-font-figures);
  list-style-position: inside;
}

.faq details p {
  padding-bottom: var(--st-s4);
  color: var(--st-ink-2);
}

/* ── Text pages (privacy, terms) ────────────────────────────────────────── */

.doc > section {
  padding-top: clamp(var(--st-s5), 6vw, 4rem);
}
.doc > section > * {
  max-width: 44rem;
}
.doc h1 {
  font-size: clamp(2.75rem, 10vw, 4.5rem);
  line-height: 0.95;
}
.doc h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin: var(--st-s7) 0 var(--st-s3);
}
.doc p,
.doc ul {
  margin-top: var(--st-s3);
  line-height: 1.5;
}
.doc ul {
  padding-left: 1.25em;
}
.doc li + li {
  margin-top: var(--st-s2);
}
.doc__date {
  color: var(--st-ink-3);
  font-size: var(--st-text-s);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.foot {
  margin-top: clamp(4rem, 12vw, 8rem);
  padding-top: var(--st-s6);
  padding-bottom: calc(var(--st-s6) + env(safe-area-inset-bottom, 0px));
  border-top: var(--st-border-strong);
  display: grid;
  gap: var(--st-s5);
  justify-items: start;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-s2) var(--st-s5);
}

.foot nav a {
  min-height: var(--st-hit);
  display: inline-flex;
  align-items: center;
}

.foot__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--st-s5);
}

.foot__social a {
  min-height: var(--st-hit);
  display: inline-flex;
  align-items: center;
}

.foot__label {
  color: var(--st-ink-3);
  font-size: var(--st-text-s);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-basis: 100%;
}

.foot__small {
  color: var(--st-ink-3);
  font-size: var(--st-text-s);
}

/* ── Wider screens ──────────────────────────────────────────────────────── */

@media (min-width: 52rem) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    align-items: end;
  }

  .sequence {
    grid-template-columns: repeat(5, 1fr);
    border-left: 0;
    border-top: 2px solid var(--st-ink);
    gap: var(--st-s5);
  }
  .sequence li {
    padding: var(--st-s6) 0 0;
  }
  .sequence li::before {
    left: 0;
    top: calc(-0.875rem - 1px);
  }

  .feature {
    /* The screenshot column is the frame's width: an image's own size must not widen it. */
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: var(--st-s7);
  }
  .feature--flip {
    grid-template-columns: 15rem minmax(0, 1fr);
  }
  .feature--flip .feature__text {
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo.is-running .tick:not(.tick--beep) {
    transform: none;
  }
}
