@font-face { font-family: "Anton"; src: url("fonts/anton-latin.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #151417;          /* v4 clip: edge pixels run ~#040405 to #403b40, median ~#1a191c */
  --bg-mid: #1e1d21;      /* studio wall mid-tone */
  --blue: #3fa9ff;
  --blue-soft: rgba(63, 169, 255, .35);
  --ink: #f2f1f4;
  --muted: #aeabb5;          /* readability: was #8d8a93 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--bg);
  transition: opacity .8s ease, visibility .8s;
}
/* a finished loader never takes clicks, even if its fade has not run (stalled tab): pointer-events is not animated */
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__name { font-family: "Anton", Impact, sans-serif; letter-spacing: .3em; font-size: 14px; color: var(--muted); }
.loader__bar { width: min(240px, 60vw); height: 1px; background: rgba(255,255,255,.12); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--blue); box-shadow: 0 0 10px var(--blue); transition: width .15s linear; }
.loader__pct { font-size: 11px; letter-spacing: .2em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(18px, 4vw, 48px);
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
  pointer-events: none;
}
.nav__name { font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .22em; color: var(--ink); text-decoration: none; pointer-events: auto; }
.nav__meta { color: var(--muted); }

/* ---------- hero ---------- */
.hero { position: relative; height: 400vh; }
.hero__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }

/* melts the frame edges into the page background */
.hero__vignette {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(ellipse 85% 80% at 50% 50%, transparent 60%, rgba(21,20,23,.45) 85%, rgba(21,20,23,.8) 100%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 5%, transparent 86%, var(--bg) 100%),
    linear-gradient(to right, var(--bg) 0%, transparent 7%, transparent 93%, var(--bg) 100%);
}

.hero__title {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 12vh;
  pointer-events: none; will-change: transform, opacity; transform-origin: 50% 80%;
}
.hero__kicker {
  font-size: clamp(11px, 1vw, 13px); letter-spacing: .5em; text-transform: uppercase; color: rgba(242,241,244,.82);
  margin-bottom: 1.2vw;
}
.hero__headline {
  font-family: "Anton", Impact, sans-serif; font-weight: 400;
  font-size: clamp(64px, min(13vw, 22vh), 230px); line-height: .86; letter-spacing: -.005em;
  text-align: center; white-space: nowrap;
  color: rgba(242,241,244,.92);
  mix-blend-mode: overlay;
  text-shadow: 0 0 60px rgba(63,169,255,.25);
}
@media (max-width: 700px) {
  .hero__headline { white-space: normal; font-size: 27vw; }
  .hero__title { padding-bottom: 16vh; }
}

.hero__particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; mix-blend-mode: screen; }

.hero__hint {
  position: absolute; left: 50%; bottom: 28px; z-index: 6; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: var(--muted);
  transition: opacity .4s;
}
.hero__hint i { width: 1px; height: 38px; background: linear-gradient(var(--blue), transparent); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hero__hint i { animation: none; }
}

/* ---------- stage 5: nav links, skip link, no-JavaScript fallback ---------- */
.nav__right { display: flex; align-items: center; gap: 30px; }
.nav__links { display: flex; gap: 22px; pointer-events: auto; }
.nav__links a { color: var(--ink); text-decoration: none; letter-spacing: .16em; transition: color .3s; }
.nav__links a:hover, .nav__links a:focus-visible { color: #7fd4ff; }
@media (max-width: 600px) {
  .nav__meta { display: none; }
  .nav__links { gap: 14px; }
  .nav__links a { letter-spacing: .1em; }
}
.skip-link {
  position: fixed; z-index: 40; right: clamp(18px, 4vw, 48px); bottom: 26px;
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px;
  border: 1px solid rgba(127,212,255,.45); border-radius: 999px; background: rgba(21,20,23,.55);
  color: #d8f1ff; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity .4s, background .3s, color .3s;
}
.skip-link:hover, .skip-link:focus-visible { background: #2f8cff; color: #05070a; outline: none; }
.skip-link.is-away { opacity: 0; pointer-events: none; }
.skip-link.is-away:focus-visible { opacity: 1; pointer-events: auto; }
a:focus-visible, button:focus-visible { outline: 2px solid #7fd4ff; outline-offset: 3px; }

/* no JavaScript: no loader, no pinned piece; a still of Norm, then the plain track list */
html:not(.js) .loader, html:not(.js) .hero__hint, html:not(.js) .spiral__detail, html:not(.js) .spiral__rail,
html:not(.js) .spiral__hint, html:not(.js) .spiral__head, html:not(.js) .hero__particles, html:not(.js) .players,
html:not(.js) .skip-link, html:not(.js) .nav__links a[href="#players"] { display: none !important; }
html:not(.js) body.is-loading { overflow: auto; }
html:not(.js) .hero.show { height: auto; }
html:not(.js) .hero__stage { position: relative; background: var(--bg) url("frames/f0241.webp") center / auto 100% no-repeat; }
html:not(.js) .spiral__list { padding-top: 10vh; }

/* ---------- stage 6: entrance after the loader (Norm fades up, the title letters rise, the nav slides in) ---------- */
.js .hero__headline .w { display: inline-block; white-space: nowrap; }
.js .hero__headline .ch { display: inline-block; opacity: 0; transform: translateY(45%); }
.js.is-revealed .hero__headline .ch { animation: ch-rise 1.05s cubic-bezier(.16,.84,.24,1) both; animation-delay: calc(.5s + var(--i) * 42ms); }
@keyframes ch-rise { from { opacity: 0; transform: translateY(45%); } to { opacity: 1; transform: none; } }
.js .hero__kicker { opacity: 0; }
.js.is-revealed .hero__kicker { animation: fade-up .9s .3s cubic-bezier(.2,.7,.2,1) both; }
.js #orbit, .js .hero__particles { opacity: 0; }
.js.is-revealed #orbit { animation: norm-up 1.6s cubic-bezier(.25,.6,.2,1) both; }
.js.is-revealed .hero__particles { animation: fade-in 2s .6s both; }
@keyframes norm-up { from { opacity: 0; filter: brightness(.35); } to { opacity: 1; filter: none; } }
.js .nav { opacity: 0; transform: translateY(-14px); }
.js.is-revealed .nav { animation: nav-in .9s 1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.js:not(.is-revealed) .hero__hint, .js:not(.is-revealed) .skip-link:not(:focus-visible) { opacity: 0 !important; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .js .hero__headline .ch, .js .hero__kicker, .js #orbit, .js .hero__particles, .js .nav {
    animation: none !important; opacity: 1; transform: none;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .skip-link { top: 58px; bottom: auto; }
  /* sideways phones: the scroll hint moves to the bottom-right corner, clear of the opening title */
  .hero__hint { left: auto; right: clamp(18px, 4vw, 48px); bottom: 18px; transform: none; }
  /* the nav links take the top-right corner (as on phones, the small album name drops out), clear of Norm's head */
  .nav__meta { display: none; }
}

/* nav backing: a dark glass strip, only once the players are under the nav (never over the pinned hero) */
.nav::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -16px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(21,20,23,.86) 0%, rgba(21,20,23,.62) 65%, rgba(21,20,23,0) 100%);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent);
  opacity: 0; transition: opacity .35s;
}
.nav.is-solid::before { opacity: 1; }
