/* 248 Anthems — Variant A "Signal"
 * Athletic performance brand × editorial data viz.
 * Black, orange, paper. Space Grotesk + IBM Plex Mono.
 * Pinterest board DNA: motion blur, HUD overlays, bold condensed type. */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --black: #111111;
  --black-deep: #0A0A0A;
  --orange: #E85002;
  --orange-light: #F25623;
  --paper: #F6F4F1;
  --stone: #E4DED2;
  --coral: #F95C4B;
  --gray: #4D4D4D;
  --gray-light: #888;
  --white: #F9F9F9;
  --hairline: rgba(255, 255, 255, .1);
  --hairline-strong: rgba(255, 255, 255, .2);
  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Plex Mono', ui-monospace, 'SF Mono', monospace;
  --gutter: clamp(1.2rem, 4vw, 4rem);
  --maxw: 1360px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-display);
  background: var(--black-deep);
  color: var(--paper);
  line-height: 1.55;
  font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mono { font-family: var(--font-mono); font-weight: 500; }
::selection { background: var(--orange); color: var(--black); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--orange); color: var(--black);
  padding: .8rem 1.2rem; z-index: 100; font-family: var(--font-mono);
}
.skip:focus { left: 0; }

a { color: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.03em; line-height: 1.0; }
em { font-style: normal; color: var(--orange); }

/* ---------- masthead ---------- */
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem var(--gutter);
  background: rgba(10, 10, 10, .8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.masthead-mark { font-weight: 700; letter-spacing: -.02em; font-size: 1.05rem; white-space: nowrap; }
.mark-num { background: var(--orange); color: var(--black); padding: .15em .35em; }
.mark-word { letter-spacing: .12em; font-size: .82em; color: var(--paper); }
.masthead-nav { display: flex; gap: clamp(.9rem, 2.5vw, 2rem); }
.masthead-nav a {
  text-decoration: none; font-size: .9rem; font-weight: 550;
  color: var(--gray-light);
  border-bottom: 2px solid transparent; padding-bottom: .15em;
  transition: color .18s ease, border-color .18s ease;
}
.masthead-nav a:hover { color: var(--paper); border-color: var(--orange); }
.masthead-meta { font-size: .68rem; letter-spacing: .14em; color: var(--gray); }
@media (max-width: 900px) { .masthead-meta { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.4) contrast(1.2);
}
.hero-video {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .35; mix-blend-mode: screen; pointer-events: none;
}
.hero-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: url('data:image/svg+xml,<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence baseFrequency=".75" numOctaves="4" stitchTiles="stitch"/></filter><rect width="256" height="256" filter="url(%23n)" opacity=".12"/></svg>');
  background-size: 128px;
  opacity: .5;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 3;
  background:
    linear-gradient(180deg, rgba(10,10,10,.6) 0%, rgba(10,10,10,.1) 30%, rgba(10,10,10,.0) 50%, rgba(10,10,10,.7) 75%, rgba(10,10,10,.95) 100%),
    linear-gradient(90deg, rgba(10,10,10,.8) 0%, transparent 40%);
}
.hero-content {
  position: relative; z-index: 4;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  padding: 0 var(--gutter) clamp(3rem, 8vh, 6rem);
}
.hero-kicker {
  font-size: .7rem; letter-spacing: .3em; color: var(--orange);
  margin-bottom: 1.6rem;
  display: flex; align-items: center; gap: 1rem;
}
.hero-kicker::before {
  content: ''; width: 40px; height: 2px; background: var(--orange);
}
h1 {
  font-size: clamp(3.4rem, 8vw, 7rem);
  max-width: 14ch;
  text-transform: uppercase;
  line-height: .92;
}
h1 em { display: inline; color: var(--orange); font-style: normal; }
.hero-sub {
  margin-top: 1.8rem; max-width: 48ch;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--stone); line-height: 1.65;
}
.hero-ctas { display: flex; gap: 1rem; margin-top: 2.4rem; flex-wrap: wrap; }
.btn {
  text-decoration: none; font-weight: 600; font-size: .88rem;
  padding: 1em 2em; text-transform: uppercase; letter-spacing: .08em;
  transition: all .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--orange); color: var(--black); }
.btn-solid:hover { background: var(--orange-light); }
.btn-line { border: 1.5px solid var(--paper); color: var(--paper); }
.btn-line:hover { background: var(--paper); color: var(--black); }

/* hero HUD data overlay */
.hero-hud {
  position: absolute; z-index: 5; right: var(--gutter); bottom: clamp(3rem, 8vh, 6rem);
  display: grid; gap: .3rem; text-align: right;
}
.hud-item { display: flex; align-items: baseline; justify-content: flex-end; gap: .6rem; }
.hud-label { font-size: .6rem; letter-spacing: .2em; color: var(--gray-light); }
.hud-val { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.hud-val.accent { color: var(--orange); }

/* hero scroll indicator */
.hero-scroll {
  position: absolute; z-index: 5; bottom: 1.4rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.hero-scroll span { font-size: .58rem; letter-spacing: .3em; color: var(--gray-light); }
.hero-scroll-line {
  width: 1px; height: 36px; background: var(--gray);
  position: relative; overflow: hidden;
}
.hero-scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0; width: 1px; height: 100%;
  background: var(--orange);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

@media (max-width: 900px) {
  .hero-hud { position: relative; right: auto; bottom: auto; text-align: left; margin-top: 2rem; display: flex; gap: 2rem; flex-wrap: wrap; }
  .hud-item { justify-content: flex-start; flex-direction: column; gap: .1rem; }
}

/* ---------- sections ---------- */
section { padding: clamp(4rem, 10vh, 8rem) var(--gutter); }
.section-head {
  max-width: var(--maxw); margin: 0 auto 3rem;
  display: flex; gap: clamp(1rem, 3vw, 2.5rem); align-items: flex-start;
}
.section-no {
  font-size: .72rem; letter-spacing: .1em; color: var(--orange);
  border: 1px solid rgba(232, 80, 2, .4); border-radius: 50%;
  width: 2.8em; height: 2.8em; display: grid; place-items: center; flex: none;
  margin-top: .5rem;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 20ch; text-transform: uppercase; }

/* ---------- full-bleed image break ---------- */
.image-break {
  position: relative; width: 100%; height: 60vh; min-height: 400px;
  overflow: hidden;
}
.image-break img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.5) contrast(1.1);
  transition: transform 8s ease-out;
}
.image-break.in-view img { transform: scale(1.05); }
.image-break-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--black-deep) 0%, transparent 20%, transparent 80%, var(--black-deep) 100%);
}
.image-break-data {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.ibd-item { text-align: center; }
.ibd-num {
  font-size: clamp(3rem, 8vw, 6rem); font-weight: 700; letter-spacing: -.04em;
  line-height: 1; color: var(--paper);
  text-shadow: 0 4px 30px rgba(0,0,0,.5);
}
.ibd-num.accent { color: var(--orange); }
.ibd-label { font-size: .6rem; letter-spacing: .25em; color: var(--stone); margin-top: .5rem; }

/* ---------- method ---------- */
.method { background: var(--black); border-top: 1px solid var(--hairline); }
.frames-ribbon { max-width: var(--maxw); margin: 0 auto 3rem; }
.frames { display: flex; gap: 3px; height: 34px; }
.frames.back { --n: 24; }
.frames.down { --n: 8; margin-top: 3px; }
.frames span { flex: 1; background: var(--paper); opacity: .08; transition: opacity .2s ease, background .2s ease; }
.frames.down span { background: var(--orange); opacity: .15; }
.frames span.lit { opacity: 1; }
.frames.down span.lit { background: var(--orange); opacity: 1; }
.frames-caption {
  display: flex; justify-content: space-between; font-size: .64rem;
  letter-spacing: .14em; color: var(--gray); margin-top: .6rem;
}
.method-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
}
.method-card { background: var(--black-deep); padding: clamp(1.4rem, 2.6vw, 2.4rem); }
.method-card h3 { font-size: 1.25rem; margin-bottom: .9rem; display: flex; gap: .7rem; align-items: baseline; }
.card-no { font-size: .68rem; color: var(--orange); letter-spacing: .08em; }
.method-card p { color: var(--stone); font-size: .98rem; }
.footnote {
  margin-top: 1.1rem; padding-top: .8rem; border-top: 1px dashed rgba(255,255,255,.15);
  font-size: .68rem !important; letter-spacing: .02em; line-height: 1.6; color: var(--gray);
}
@media (max-width: 900px) { .method-grid { grid-template-columns: 1fr; } }

.stats {
  max-width: var(--maxw); margin: 3rem auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
}
.stat { background: var(--black); padding: 1.6rem 1.4rem; display: grid; gap: .4rem; }
.stat-num {
  font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1; color: var(--paper);
}
.stat:nth-child(4) .stat-num { color: var(--orange); }
.stat-label { font-size: .64rem; letter-spacing: .18em; color: var(--gray); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- player stage ---------- */
.stage { background: var(--black-deep); color: var(--paper); }
.stage .section-no { border-color: rgba(232, 80, 2, .4); color: var(--orange); }
.stage .kicker { border-color: rgba(232, 80, 2, .4); color: var(--orange); font-size: .7rem; letter-spacing: .25em; }
.stage-sub { color: var(--stone); max-width: 56ch; margin-top: 1rem; }
.stage-player {
  position: relative; max-width: 1050px; margin: 0 auto;
  border: 1px solid var(--hairline); border-radius: 4px;
  padding: clamp(1.3rem, 3vw, 2.6rem);
  background: linear-gradient(180deg, rgba(232, 80, 2, .04), rgba(232, 80, 2, 0));
}
#spectrum {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: .55;
}
#player { position: relative; }
.stage .ap {
  --ap-accent: var(--orange);
  --ap-accent-fg: var(--black);
  --ap-font: var(--font-display);
  --ap-radius: 2px; --ap-row-radius: 2px;
}
.stage .ap-kicker, .stage .ap-panel-title, .stage .ap-time, .stage .ap-row-num,
.stage .ap-badge, .stage .ap-lib-course { font-family: var(--font-mono); }
.stage-note {
  max-width: 1050px; margin: 1.2rem auto 0; font-size: .62rem;
  letter-spacing: .14em; color: var(--gray); text-align: center;
}

/* ---------- series ---------- */
.series { border-top: 1px solid var(--hairline); background: var(--black); }
.series-sub { color: var(--stone); margin-top: 1rem; }
.series-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
}
/* 11 cards: rows of three (span 2), the final pair widens (span 3) so no cell sits empty */
.series-grid .course-card { grid-column: span 2; }
.series-grid .course-card:nth-last-child(-n+2) { grid-column: span 3; }
.course-card {
  position: relative; background: var(--black-deep); text-decoration: none;
  padding: clamp(1.6rem, 3vw, 2.6rem); min-height: 220px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .3rem;
  overflow: hidden; transition: background .25s ease;
}
.course-card:hover { background: rgba(232, 80, 2, .06); }
.course-card h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); text-transform: uppercase; }
.course-card p { font-size: .68rem; letter-spacing: .16em; color: var(--gray); }
.course-status {
  position: absolute; top: 1.2rem; left: 1.6rem; font-size: .62rem; letter-spacing: .18em;
  background: var(--orange); color: var(--black); padding: .25em .7em;
}
.course-swatch {
  position: absolute; top: 0; right: 0; width: 84px; height: 100%;
  background: linear-gradient(180deg, var(--sw1) 33%, var(--sw2) 33% 66%, var(--sw3) 66%);
  clip-path: polygon(70% 0, 100% 0, 100% 100%, 30% 100%);
  opacity: .85; transition: transform .3s ease;
}
.course-card:hover .course-swatch { transform: translateX(-6px); }
@media (max-width: 900px) {
  .series-grid { grid-template-columns: repeat(2, 1fr); }
  .series-grid .course-card, .series-grid .course-card:nth-last-child(-n+2) { grid-column: auto; }
  .series-grid .course-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .series-grid { grid-template-columns: 1fr; }
  .series-grid .course-card:last-child { grid-column: auto; }
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--hairline); padding: 2.2rem var(--gutter) 3rem;
  display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  max-width: var(--maxw); margin: 0 auto;
}
.footer-main p:first-child { font-weight: 600; }
.footer-sub { font-size: .66rem; letter-spacing: .14em; color: var(--gray); margin-top: .4rem; }
.footer-links { display: grid; gap: .7rem; font-size: .7rem; letter-spacing: .12em; justify-items: end; }
.footer-links a { text-decoration: none; border-bottom: 1px solid var(--hairline-strong); padding-bottom: .1em; color: var(--gray-light); }
.footer-links a:hover { border-color: var(--orange); color: var(--paper); }
.footer-variants { display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--gray); }
.footer-variants [aria-current] { color: var(--orange); border-bottom: 2px solid var(--orange); }
@media (max-width: 700px) { .footer-links { justify-items: start; } }

/* ---------- scroll animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal-left.in { opacity: 1; transform: none; }

/* parallax scroll effect */
[data-parallax] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left { opacity: 1; transform: none; transition: none; }
  .course-swatch, .btn { transition: none; }
  .hero-scroll-line::after { animation: none; }
  .image-break img { transition: none; }
}
