/* 248 Anthems — Variant B "Dusk"
 * Cinematic luxury: a championship course at last light.
 * Deep pine into indigo night, amber horizon, editorial Fraunces + Outfit. */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-full-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-full-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('/fonts/outfit-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --night: #0A0F22;
  --indigo: #141B3C;
  --pine: #0A2E23;
  --pine-deep: #051B14;
  --amber: #E8A33D;
  --amber-hi: #F3BE6A;
  --rose: #D98A7E;
  --cream: #F5EFE2;
  --cream-dim: rgba(245, 239, 226, .64);
  --cream-faint: rgba(245, 239, 226, .42);
  --hairline: rgba(245, 239, 226, .14);
  --hairline-strong: rgba(245, 239, 226, .28);
  --gold-hairline: rgba(232, 163, 61, .38);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Outfit', 'Avenir Next', 'Segoe UI', sans-serif;
  --gutter: clamp(1.25rem, 4.5vw, 5rem);
  --maxw: 1280px;
  --ease-lux: cubic-bezier(.16, .84, .28, 1);
}

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

body {
  font-family: var(--sans);
  font-weight: 340;
  background: var(--night);
  color: var(--cream);
  line-height: 1.65;
  font-size: clamp(1rem, .95rem + .3vw, 1.1rem);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--amber); color: #2A1B04; }

.caps {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 430;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--amber); color: #2A1B04;
  padding: .8rem 1.4rem; z-index: 200; font-family: var(--sans);
  letter-spacing: .08em; text-decoration: none;
}
.skip:focus { left: 0; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 460;
  line-height: 1.04;
  letter-spacing: -.01em;
}
h1 em, h2 em {
  font-style: italic;
  font-weight: 420;
  color: var(--amber-hi);
}

/* film grain over everything */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: .05;
  mix-blend-mode: overlay;
  animation: grain-shift 1.2s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1.5%, 1%); }
  50% { transform: translate(1%, -1.5%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* ---------- crown (header) ---------- */
.crown {
  position: absolute; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.4rem var(--gutter);
}
.crown-mark {
  font-family: var(--serif); text-decoration: none; white-space: nowrap;
  display: flex; align-items: baseline; gap: .55rem;
}
.crown-num {
  font-style: italic; font-weight: 560; font-size: 1.35rem;
  color: var(--amber);
  font-variation-settings: "opsz" 40;
}
.crown-word {
  font-size: .95rem; letter-spacing: .34em; text-transform: uppercase;
  font-family: var(--sans); font-weight: 380; color: var(--cream-dim);
}
.crown-nav { display: flex; gap: clamp(1rem, 2.6vw, 2.4rem); font-size: .72rem; }
.crown-nav a {
  text-decoration: none; color: var(--cream-dim); padding-bottom: .3em;
  background: linear-gradient(var(--amber), var(--amber)) bottom left / 0 1px no-repeat;
  transition: color .4s var(--ease-lux), background-size .4s var(--ease-lux);
}
.crown-nav a:hover { color: var(--cream); background-size: 100% 1px; }
.crown-meta { font-size: .62rem; color: var(--cream-faint); }
@media (max-width: 900px) { .crown-meta { display: none; } }
@media (max-width: 560px) { .crown-word { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: max(92vh, 640px);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: clamp(6rem, 14vh, 9rem) var(--gutter) 4.5rem;
  overflow: hidden;
  background:
    radial-gradient(120% 55% at 50% 63%, rgba(232, 163, 61, .28) 0%, rgba(217, 138, 126, .13) 32%, rgba(20, 27, 60, 0) 62%),
    linear-gradient(180deg, #0B0F26 0%, var(--indigo) 40%, #2E2545 60%, #123527 74%, var(--pine) 82%, #05190F 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: url('/images/hero-1.webp') center/cover no-repeat;
  opacity: .22; mix-blend-mode: soft-light; pointer-events: none;
}
.hero-video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .15; mix-blend-mode: soft-light; pointer-events: none;
}
.hero-sky { position: absolute; inset: 0; z-index: 1; }
#dusk { width: 100%; height: 100%; display: block; }
.hero-copy { position: relative; z-index: 2; max-width: 900px; }

.kicker {
  display: inline-flex; align-items: center; gap: 1.1rem;
  font-size: .7rem; color: var(--amber);
  margin-bottom: clamp(1.4rem, 3vh, 2.2rem);
}
.kicker-rule { width: clamp(1.6rem, 6vw, 4rem); height: 1px; background: var(--gold-hairline); }

h1 {
  font-size: clamp(2.7rem, 7.2vw, 6.2rem);
  font-variation-settings: "opsz" 144, "SOFT" 40;
  text-wrap: balance;
}
.hero h1 { text-shadow: 0 2px 60px rgba(6, 10, 25, .8); }
.hero-sub {
  margin: 1.8rem auto 0; max-width: 56ch;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  color: var(--cream-dim);
  text-wrap: pretty;
}
.hero-ctas {
  display: flex; gap: 1rem; margin-top: 2.6rem;
  justify-content: center; flex-wrap: wrap;
}
.btn {
  font-family: var(--sans); font-weight: 460; font-size: .95rem;
  letter-spacing: .04em; text-decoration: none;
  padding: .95em 2.2em; border-radius: 99px;
  transition: transform .5s var(--ease-lux), box-shadow .5s var(--ease-lux),
              background .5s var(--ease-lux), border-color .5s var(--ease-lux), color .5s var(--ease-lux);
}
.btn:active { transform: translateY(1px); }
.btn-amber {
  background: linear-gradient(160deg, var(--amber-hi), var(--amber));
  color: #2A1B04;
  box-shadow: 0 6px 30px rgba(232, 163, 61, .25);
}
.btn-amber:hover { transform: translateY(-2px); box-shadow: 0 12px 44px rgba(232, 163, 61, .4); }
.btn-ghost {
  border: 1px solid var(--hairline-strong); color: var(--cream);
  background: rgba(245, 239, 226, .03);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber-hi); transform: translateY(-2px); }

.hero-foot {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 1.4rem;
  width: min(100%, var(--maxw));
  margin-top: clamp(3rem, 9vh, 6rem);
  font-size: .62rem; color: var(--cream-faint);
}
.hero-foot-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--hairline) 30%, var(--hairline) 70%, transparent); }

/* ---------- sections shared ---------- */
section { position: relative; padding: clamp(4.5rem, 12vh, 8.5rem) var(--gutter); }
.chapter-head { max-width: 860px; margin: 0 auto 3.2rem; text-align: center; }
h2 {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  font-variation-settings: "opsz" 120, "SOFT" 30;
  text-wrap: balance;
}

/* ---------- method ---------- */
.method {
  background: linear-gradient(180deg, #05190F 0%, #071726 34%, #0B1128 100%);
}
.method::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-hairline), transparent);
}

/* the 24/8 dial */
.dial-stage { position: relative; width: min(400px, 78vw); margin: 0 auto 4rem; }
.dial { width: 100%; height: auto; display: block; }
.dial-track { fill: none; stroke: var(--hairline); stroke-width: 1; }
.dial-back { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; }
.dial-down { fill: none; stroke: #F2A392; stroke-width: 3; stroke-linecap: round; }
.dial-tick { stroke: rgba(245, 239, 226, .22); stroke-width: 1; }
.dial-tick.major { stroke: rgba(245, 239, 226, .4); stroke-width: 1.4; }
.dial-hand { stroke: var(--cream); stroke-width: 1.2; opacity: .85; }
.dial-hub { fill: var(--cream); }
.dial-tip { fill: var(--amber-hi); filter: drop-shadow(0 0 6px rgba(232, 163, 61, .8)); }
.dial-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: .3rem; pointer-events: none;
}
.dial-ratio {
  font-family: var(--serif); font-weight: 480; font-size: clamp(2.6rem, 6vw, 3.6rem);
  font-variation-settings: "opsz" 144; line-height: 1;
}
.dial-bpm { font-size: .6rem; color: var(--cream-faint); }
.dial-note {
  margin-top: 1.6rem; text-align: center; font-size: .62rem;
  color: var(--cream-dim); line-height: 2;
}
.dial-note-seg { white-space: nowrap; display: inline-block; margin: 0 .8em; }
.dot { display: inline-block; width: .5em; height: .5em; border-radius: 50%; margin-right: .6em; vertical-align: middle; }
.dot-amber { background: var(--amber); }
.dot-rose { background: var(--rose); }

/* editorial chapters */
.chapters { max-width: 880px; margin: 0 auto; display: grid; }
.chapter {
  display: grid; grid-template-columns: minmax(72px, 150px) 1fr;
  gap: clamp(1.2rem, 4vw, 3.2rem);
  padding: clamp(2.2rem, 5vh, 3.4rem) 0;
  border-top: 1px solid var(--hairline);
}
.chapter:last-child { border-bottom: 1px solid var(--hairline); }
.chapter-no {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(3.4rem, 9vw, 6.4rem); line-height: .9;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: rgba(232, 163, 61, .2);
  -webkit-text-stroke: 1px var(--gold-hairline);
  text-align: right;
}
.chapter-body h3 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-variation-settings: "opsz" 100, "SOFT" 30;
  margin-bottom: 1rem;
}
.chapter-body p { color: var(--cream-dim); max-width: 58ch; }
.footnote {
  margin-top: 1.3rem; padding-top: .9rem;
  border-top: 1px solid var(--hairline);
  font-size: .78rem; line-height: 1.7; color: var(--cream-faint);
  letter-spacing: .015em;
}
.footnote cite { font-style: italic; }

/* stats */
.stats {
  max-width: var(--maxw); margin: 4.5rem auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat {
  display: grid; gap: .5rem; justify-items: center; text-align: center;
  padding: 1.8rem 1rem;
  border-left: 1px solid var(--hairline);
}
.stat:first-child { border-left: 0; }
.stat-num {
  font-family: var(--serif); font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: 1;
  background: linear-gradient(160deg, var(--cream) 30%, var(--amber-hi));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { font-size: .62rem; color: var(--cream-faint); }
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 1.5rem; }
  .stat:nth-child(3) { border-left: 0; }
}

/* ---------- player stage ---------- */
.stage {
  background: linear-gradient(180deg, #0B1128 0%, #101736 46%, #0D1230 100%);
  overflow: hidden;
}
.stage-glow {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  width: min(1200px, 130vw); height: 620px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(232, 163, 61, .17) 0%, rgba(217, 138, 126, .07) 45%, transparent 72%);
  transition: opacity 1.4s var(--ease-lux);
  opacity: .55;
}
body.is-playing .stage-glow { opacity: 1; }
.stage-sub { color: var(--cream-dim); max-width: 56ch; margin: 1.2rem auto 0; }

.deck {
  position: relative; max-width: 1020px; margin: 0 auto;
  border-radius: 22px;
  border: 1px solid rgba(245, 239, 226, .16);
  background: linear-gradient(165deg, rgba(245, 239, 226, .085), rgba(245, 239, 226, .035) 38%, rgba(20, 27, 60, .28));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 34px 90px rgba(4, 7, 18, .6), inset 0 1px 0 rgba(245, 239, 226, .14);
  padding: clamp(1.4rem, 3.4vw, 2.8rem);
}
#halo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: inherit; pointer-events: none; opacity: .8;
}
#player { position: relative; }

/* skin the shared player */
.deck .ap {
  --ap-accent: var(--amber);
  --ap-accent-fg: #2A1B04;
  --ap-font: var(--sans);
  --ap-radius: 16px;
  --ap-row-radius: 12px;
  --ap-line: rgba(245, 239, 226, .16);
  --ap-dim: var(--cream-dim);
}
.deck .ap-title {
  font-family: var(--serif); font-weight: 470;
  font-variation-settings: "opsz" 60, "SOFT" 30;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
}
.deck .ap-kicker, .deck .ap-panel-title, .deck .ap-badge, .deck .ap-lib-course { letter-spacing: .2em; font-weight: 430; }
.deck .ap-play { box-shadow: 0 4px 26px rgba(232, 163, 61, .38); }
.deck .ap-bar-knob { box-shadow: 0 0 0 4px rgba(232, 163, 61, .22), 0 0 12px rgba(232, 163, 61, .55); }
.deck .ap-mini { background: rgba(245, 239, 226, .04); }
.deck .ap-filter { background: rgba(245, 239, 226, .04); }
.deck .ap-row-current { background: rgba(232, 163, 61, .12); }

.stage-note {
  max-width: 1020px; margin: 1.4rem auto 0; text-align: center;
  font-size: .6rem; color: var(--cream-faint);
}

/* ---------- series ---------- */
.series {
  background: linear-gradient(180deg, #0D1230 0%, #0A0F26 55%, #081120 100%);
}
.series::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
}
.series-sub { color: var(--cream-dim); margin-top: 1.2rem; }
.series-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
}
/* 11 courses: rows of three (span 2), the last pair widens (span 3) so the grid stays full */
.series-grid .course { grid-column: span 2; }
.series-grid .course:nth-last-child(-n+2) { grid-column: span 3; }
.course {
  position: relative; text-decoration: none;
  min-height: 300px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(245, 239, 226, .04), rgba(245, 239, 226, .01));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.7rem;
  transition: transform .7s var(--ease-lux), border-color .7s var(--ease-lux), box-shadow .7s var(--ease-lux);
}
.course:hover {
  transform: translateY(-6px);
  border-color: var(--gold-hairline);
  box-shadow: 0 26px 60px rgba(4, 7, 18, .55);
}
.course-horizon {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 42% at 50% 58%, color-mix(in srgb, var(--c2) 52%, transparent) 0%, color-mix(in srgb, var(--c3) 22%, transparent) 45%, transparent 70%),
    linear-gradient(180deg, var(--indigo) 0%, color-mix(in srgb, var(--c3) 30%, var(--indigo)) 46%, var(--c2) 58%, var(--c1) 66%, color-mix(in srgb, var(--c1) 55%, #04120C) 100%);
  opacity: .8;
  transition: opacity .7s var(--ease-lux), transform 1.4s var(--ease-lux);
}
.course:hover .course-horizon { opacity: 1; transform: scale(1.04); }
.course-status {
  position: absolute; top: 1.2rem; right: 1.2rem;
  font-size: .58rem; color: #2A1B04;
  background: linear-gradient(160deg, var(--amber-hi), var(--amber));
  padding: .35em 1em; border-radius: 99px;
}
.course-text {
  position: relative;
  padding-top: 1rem;
  background: linear-gradient(180deg, transparent, rgba(4, 8, 18, .0));
}
.course h3 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-variation-settings: "opsz" 110, "SOFT" 40;
  text-shadow: 0 2px 24px rgba(4, 7, 18, .8);
}
.course-text p { font-size: .62rem; color: var(--cream-dim); margin-top: .5rem; text-shadow: 0 1px 12px rgba(4, 7, 18, .9); }
@media (max-width: 900px) {
  .series-grid { grid-template-columns: repeat(2, 1fr); }
  .series-grid .course, .series-grid .course:nth-last-child(-n+2) { grid-column: auto; }
  .series-grid .course:last-child { grid-column: 1 / -1; }
  .course { min-height: 220px; }
}
@media (max-width: 600px) {
  .series-grid { grid-template-columns: 1fr; }
  .series-grid .course:last-child { grid-column: auto; }
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  background: #060A18;
  padding: 3.4rem var(--gutter) 4rem;
  text-align: center;
  display: grid; gap: .7rem; justify-items: center;
}
.footer-line { font-family: var(--serif); font-size: 1.15rem; font-weight: 420; }
.footer-sub { font-size: .6rem; color: var(--cream-faint); }
.footer-links {
  margin-top: 1.6rem; font-size: .64rem;
  display: grid; gap: 1rem; justify-items: center;
}
.footer-links a {
  text-decoration: none; color: var(--cream-dim); padding-bottom: .25em;
  background: linear-gradient(var(--amber), var(--amber)) bottom left / 0 1px no-repeat;
  transition: color .4s var(--ease-lux), background-size .4s var(--ease-lux);
}
.footer-links a:hover { color: var(--amber-hi); background-size: 100% 1px; }
.footer-variants { display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: center; color: var(--cream-faint); }
.footer-variants [aria-current] { color: var(--amber); border-bottom: 1px solid var(--gold-hairline); padding-bottom: .25em; }

/* ---------- reveal motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  letter-spacing: .02em;
  transition: opacity 1.1s var(--ease-lux), transform 1.1s var(--ease-lux), letter-spacing 1.3s var(--ease-lux);
}
.reveal.in { opacity: 1; transform: none; letter-spacing: normal; }
.kicker.reveal, .stage-note.reveal, .series-coming.reveal { letter-spacing: .3em; }
.kicker.reveal.in, .series-coming.reveal.in { letter-spacing: .22em; }
.stage-note.reveal.in { letter-spacing: .22em; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; letter-spacing: normal; }
  .kicker.reveal, .stage-note.reveal, .series-coming.reveal { letter-spacing: .22em; }
  .btn, .course, .course-horizon, .crown-nav a, .footer-links a { transition: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .chapter { grid-template-columns: 1fr; gap: .6rem; }
  .chapter-no { text-align: left; font-size: 3rem; }
  .hero { min-height: max(86vh, 560px); }
}
