/* HELIX promo site — layout + components.
   Built on the HELIX design system tokens (styles/tokens/), per the promo_site
   handoff. Desktop is designed at 1360px content width; responsive behaviour
   below desktop follows the handoff's written guidance. */

/* ---------- shell ---------- */

.band {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 72px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--text-link); }

/* ---------- nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
}

.nav-lockup { height: 30px; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: 14px;
  color: var(--text-strong);
  text-decoration: none;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-links a.pill:hover { color: var(--helix-blue); background: var(--blue-100); }

.pill {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  color: var(--helix-blue);
}

/* ---------- buttons ---------- */

.btn {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background var(--duration-fast) var(--ease-standard);
}

.btn-primary {
  background: var(--action-primary);
  color: var(--text-on-brand);
}

.btn-primary:hover { background: var(--action-primary-hover); }

.btn-primary:disabled {
  background: var(--blue-100);
  cursor: default;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-store-glyph {
  width: 17px;
  height: 17px;
  margin-top: -2px;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 72px;
  align-items: center;
  padding: 64px 0 80px;
}

.hero-copy { max-width: 560px; }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 62px;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  margin: 18px 0 22px;
  text-wrap: pretty;
}

.hero-sub {
  font-size: 18px;
  line-height: var(--leading-normal);
  color: var(--text-strong);
  margin: 0 0 32px;
  max-width: 480px;
  text-wrap: pretty;
}

/* ---------- store call to action ---------- */

.cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-note {
  font-family: var(--font-body);
  font-size: 13px;
  margin: 0;
  color: var(--text-secondary);
}

/* ---------- notify form ---------- */

.notify {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.notify-row {
  display: flex;
  gap: 10px;
}

.notify-row[hidden] { display: none; }

.notify-input {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 16px;
  width: 280px;
  border-radius: var(--radius-lg);
  border: var(--border-width-strong) solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-primary);
  outline: none;
}

.notify-caption {
  font-family: var(--font-body);
  font-size: 13px;
  margin: 0;
  color: var(--text-secondary);
}

.notify-caption--done { color: var(--text-strong); }

.turnstile-slot:empty { display: none; }

/* Honeypot — visually removed, present for bots */
.hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- stats board (static marketing illustration of the match report) ---------- */

.statboard {
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 0 0 auto;
}

.statcard {
  background: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 14px 16px 12px;
}

.report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.report-scoreblock {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.report-scorecol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.report-label {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: 9px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  line-height: 1;
  color: var(--text-secondary);
}

.report-num {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.report-num.dash { color: var(--text-secondary); }

.report-status {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: 10px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-secondary);
  padding-top: 4px;
}

/* The worm — anatomy mirrors score-worm.tsx: extent hairlines and quarter
   dividers recessive, the even line one step stronger, the step line in blue. */
.worm {
  display: block;
  width: 100%;
  height: auto;
}

.worm-extent { stroke: var(--border-default); stroke-width: 1; }

.worm-even { stroke: var(--border-strong); stroke-width: 1; }

.worm-line {
  fill: none;
  stroke: var(--helix-blue);
  stroke-width: 3;
  stroke-linejoin: miter;
  stroke-linecap: round;
}

.worm-figure {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: 11px;
  fill: var(--text-secondary);
}

/* Headline stat cells, as the app's aggregate cards read */
.statcard--headline {
  display: flex;
  padding: 14px 8px;
}

.headline-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
}

.headline-cell + .headline-cell { border-left: var(--border-width) solid var(--border-default); }

.headline-value {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}

/* The one place orange appears on this page — the key figure */
.headline-value--spark { color: var(--accent-text); }

/* Segmented stats views */
.report-seg {
  display: flex;
  gap: 2px;
  background: var(--surface-disabled);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 10px;
}

.report-seg-item {
  flex: 1;
  text-align: center;
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: 12px;
  padding: 7px 4px;
  border-radius: var(--radius-pill);
  color: var(--text-strong);
}

.report-seg-item.is-active {
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

/* The stats table: mono numbers, gains cluster on a sunken band, zeros dimmed */
.report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.report-table th {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: 9px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
  padding: 6px 0;
}

.report-table td {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 9px 0;
  border-top: var(--border-width) solid var(--border-default);
  color: var(--text-primary);
}

.report-table .lead {
  width: 44px;
  text-align: left;
}

.report-table .gain { background: var(--surface-sunken); }

.report-table .zero { color: var(--text-disabled); }

.report-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 5px 5px;
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  font-size: 10px;
  letter-spacing: var(--tracking-code);
  border: var(--border-width-strong) solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

/* ---------- phone bezel (carousel screenshots) ---------- */

.phone {
  background: var(--helix-ink);
  border-radius: 40px;
  padding: 9px;
  box-shadow: var(--shadow-phone);
  width: 330px;
  flex: 0 0 auto;
}

/* ---------- app-mockup carousel ---------- */

.carousel-section {
  padding: 8px 0 88px;
  text-align: center;
  /* Contain the side phones when the viewport is narrower than the spread. */
  overflow: hidden;
}

.carousel-head {
  max-width: 620px;
  margin: 0 auto 12px;
}

.carousel-head h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 40px;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  margin: 12px 0 14px;
  text-wrap: pretty;
}

.carousel-sub {
  font-size: 17px;
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  margin: 0 auto;
  max-width: 520px;
  text-wrap: pretty;
}

/* The coverflow. --car-* below drive the geometry so the responsive rules only
   retune numbers. The active phone sits flat and forward; the other two turn
   back at the sides and stay visible. */
.carousel {
  --car-w: 300px;
  --car-h: 640px;
  --car-spread: 208px; /* gap between phone centres */
  --car-depth: 260px; /* how far the side phones sit back */
  --car-tilt: 42deg; /* side phone turn-in */
  --car-scale: 0.84; /* side phone scale */
  position: relative;
  height: var(--car-h);
  margin: 28px auto 8px;
  perspective: 1500px;
  /* Allow vertical page scroll to pass through; JS claims horizontal drags. */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.carousel-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.carousel.is-grabbing { cursor: grabbing; }
.carousel:not(.is-grabbing) .carousel-face { cursor: grab; }

/* Faces are centred; the controller sets each transform from its distance to the
   active screen. The rules below mirror that controller's resting state exactly,
   so the band reads correctly with no JS too: teams centre, lineup right, stats
   left. With four faces the third is the one furthest from the active screen —
   the controller wraps it to the far side and fades it out, so it is hidden here
   rather than left stacked on the centre phone. One rule per face: a fifth
   screen needs a fifth rule. */
.carousel-face {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--car-w);
  margin-top: calc(var(--car-h) / -2);
  margin-left: calc(var(--car-w) / -2);
  will-change: transform;
}

.carousel-face:nth-child(1) {
  transform: translateX(0) translateZ(0) rotateY(0) scale(1);
  z-index: 3;
}
.carousel-face:nth-child(2) {
  transform: translateX(var(--car-spread)) translateZ(calc(var(--car-depth) * -1))
    rotateY(calc(var(--car-tilt) * -1)) scale(var(--car-scale));
  z-index: 2;
}
.carousel-face:nth-child(3) {
  transform: translateX(calc(var(--car-spread) * -2)) translateZ(calc(var(--car-depth) * -1))
    rotateY(calc(var(--car-tilt) * 2)) scale(var(--car-scale));
  opacity: 0;
  z-index: 1;
}
.carousel-face:nth-child(4) {
  transform: translateX(calc(var(--car-spread) * -1)) translateZ(calc(var(--car-depth) * -1))
    rotateY(var(--car-tilt)) scale(var(--car-scale));
  z-index: 2;
}

/* Carousel phones reuse the hero bezel at a smaller, screenshot-shaped size. */
.phone--shot {
  width: var(--car-w);
  padding: 8px;
  border-radius: 34px;
}

.phone-shot {
  display: block;
  width: 100%;
  /* height:auto so the width/height attributes don't fix a literal pixel height;
     the aspect ratio drives it instead (matches the source — no crop). */
  height: auto;
  aspect-ratio: 1284 / 2778;
  border-radius: 27px;
  object-fit: cover;
  background: var(--surface-page);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-standard),
    transform var(--duration-base) var(--ease-standard);
}

.carousel-dot[aria-current='true'] {
  background: var(--helix-blue);
  transform: scale(1.25);
}

/* Static, honest fallback: no 3D staging, just show the front screen. */
@media (prefers-reduced-motion: reduce) {
  .carousel-stage { transition: none; }
}

/* ---------- feature cards ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 80px;
}

.feature {
  background: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 26px 26px 28px;
}

.feature .eyebrow { color: var(--helix-blue); }

.feature h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 19px;
  margin: 12px 0 8px;
}

.feature p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- court-photo band ---------- */

.photo-band { padding-bottom: 84px; }

.photo-frame { position: relative; }

/* Placeholder until court photography is supplied — flat neutral block per the handoff */
.photo-slot {
  width: 100%;
  height: 420px;
  display: block;
  border-radius: var(--radius-xl);
  background: var(--neutral-100);
  object-fit: cover;
}

.photo-card {
  position: absolute;
  left: 28px;
  bottom: 28px;
  background: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  padding: 16px 20px;
  max-width: 380px;
}

.photo-card h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 16px;
  margin: 0 0 4px;
}

.photo-card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- footer ---------- */

.footer {
  border-top: var(--border-width) solid var(--border-default);
  padding: 40px 0 44px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-lockup {
  height: 24px;
  display: block;
  margin-bottom: 14px;
}

.footer p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.footer .copyright {
  margin-top: 18px;
  font-size: 13px;
}

.footer .eyebrow { margin: 0 0 14px; }

.footer a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}

.footer a:hover { color: var(--text-link); }

.footer a.mail { color: var(--text-link); }

/* ---------- utility pages (privacy / terms / support / thanks / 404) ---------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 0 72px;
}

.page h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 40px;
  letter-spacing: var(--tracking-display);
  margin: 0 0 10px;
}

.page-meta {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 36px;
}

.page h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 20px;
  margin: 0 0 12px;
}

.page section { margin-bottom: 32px; }

.page section p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.page section ul {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
  padding-left: 22px;
}

.page section li { margin-bottom: 6px; }

/* Owner-supplied text goes here — dashed stub per the handoff */
.stub {
  background: var(--surface-sunken);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.stub p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  font-style: italic;
}

/* ---------- support ---------- */

.contact-card {
  background: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 24px 26px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.contact-card h2 { margin: 0 0 6px; font-size: 19px; }

.contact-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.contact-card .btn { white-space: nowrap; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq {
  background: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faq .q {
  font-size: 15px;
  font-weight: var(--weight-semibold);
}

.faq .a {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- help ---------- */

.page h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 16px;
  margin: 28px 0 8px;
}

.help-intro {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 20px;
}

.toc {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 40px;
  padding: 0;
}

.toc a {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-strong);
  text-decoration: none;
  background: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
}

.toc a:hover {
  color: var(--text-link);
  border-color: var(--border-strong);
}

.sample {
  background: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin: 12px 0 20px;
}

.sample-label {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: 10px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.sample-line + .sample-label { margin-top: 14px; }

.sample-note + .sample-label { margin-top: 14px; }

.sample-line {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  margin: 0 0 4px;
}

.sample-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  margin: 0 0 4px;
}

.sample-table-wrap { overflow-x: auto; }

.sample-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sample-table th {
  font-weight: var(--weight-semibold);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: right;
  padding: 0 0 8px 14px;
}

.sample-table td {
  border-top: 1px solid var(--border-default);
  text-align: right;
  padding: 7px 0 7px 14px;
}

.sample-table th:first-child,
.sample-table td:first-child {
  text-align: left;
  padding-left: 0;
}

.sample-table .dim { color: var(--text-secondary); }

.page .legend {
  list-style: none;
  padding: 0;
}

.legend .legend-abbr {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  font-size: 12px;
}

/* ---------- responsive (handoff guidance — not designed) ---------- */

@media (max-width: 1024px) {
  .band { padding: 0 40px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    justify-items: center;
    text-align: left;
    padding: 40px 0 64px;
  }

  .hero-copy { justify-self: start; }

  .hero h1 { font-size: 44px; }

  .statboard { width: min(430px, 100%); }

  .carousel {
    --car-w: 264px;
    --car-h: 590px;
    --car-spread: 182px;
    --car-depth: 230px;
  }

  .carousel-head h2 { font-size: 34px; }
}

@media (max-width: 760px) {
  .band { padding: 0 20px; }

  .hero h1 { font-size: 36px; }

  .statcard { padding: 12px 12px 10px; }

  .headline-value { font-size: 21px; }

  .report-num { font-size: 23px; }

  .features {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-bottom: 56px;
  }

  .footer {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .nav {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
  }

  .photo-band { padding-bottom: 56px; }

  .carousel {
    --car-w: 210px;
    --car-h: 470px;
    --car-spread: 128px;
    --car-depth: 190px;
    --car-tilt: 38deg;
    --car-scale: 0.8;
  }

  .carousel-section { padding-bottom: 64px; }

  .carousel-head h2 { font-size: 28px; }

  .carousel-sub { font-size: 15.5px; }

  .photo-slot { height: 280px; }

  .photo-card {
    position: static;
    margin-top: 12px;
    max-width: none;
  }

  .notify-row { flex-wrap: wrap; }

  .notify-input { width: min(280px, 100%); }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .page { padding: 32px 0 56px; }
}
