/* ───────────────────────── fonty (self-hosted, OFL) ─────────────────────────
   Bez Google Fonts z CDN: zero zapytań do stron trzecich (RODO, LG München I 3 O 17493/20)
   i brak FOUT na teksturach Canvas. Zakresy unicode jak w @fontsource. */
@font-face {
  font-family: "Pirata One";
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/pirata-one-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Pirata One";
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/pirata-one-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Archivo;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(../fonts/archivo-latin.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Archivo;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(../fonts/archivo-latin-ext.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ───────────────────────── tokeny ───────────────────────── */
:root {
  --bg: #000;
  --paper: #ebe8e1;
  --mute: #8a867e;
  --ink: #0d0f12;

  --display: "Pirata One", serif;
  --sans: Archivo, ui-sans-serif, system-ui, sans-serif;

  --gutter: clamp(18px, 3vw, 40px);

  --stage-h: 100vh;
  --scroll-len: 560vh;
  --load: 0;
}
@supports (height: 100lvh) {
  :root {
    --stage-h: 100lvh;
    --scroll-len: 560lvh;
  }
}

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

html {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.is-loading {
  overflow: hidden;
}
body {
  margin: 0;
  background: var(--bg);
}
::selection {
  background: var(--paper);
  color: var(--ink);
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.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;
}

.skip {
  position: fixed;
  left: var(--gutter);
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus-visible {
  transform: none;
}

/* ───────────────────────── loader: rozżarzanie lampy ─────────────────────────
   Zamiast licznika 0–100: włókno nabiera temperatury razem z postępem ładowania,
   a po starcie w tym samym miejscu zapala się reflektor. */
.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.loader__lamp {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: color-mix(in oklab, #ff7a1a, #fff4e2 calc(var(--load) * 100%));
  box-shadow: 0 0 calc(4px + var(--load) * 30px) calc(var(--load) * 6px) color-mix(in oklab, #ff6a00 70%, transparent);
  opacity: calc(0.25 + var(--load) * 0.75);
  transition: background-color 0.4s linear, box-shadow 0.4s linear, opacity 0.4s linear;
}
.is-ready .loader {
  opacity: 0;
  visibility: hidden;
}

/* ───────────────────────── nawigacja ───────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease 1.6s;
}
.is-ready .nav {
  opacity: 1;
}
.nav a {
  pointer-events: auto;
  color: var(--paper);
  font: 500 15px/1 var(--sans);
  text-decoration: none;
}
.nav .nav__brand {
  font: 400 22px/1 var(--display);
}
.nav__links {
  display: flex;
  gap: clamp(18px, 2.4vw, 32px);
}
.nav__links a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.3s ease;
}
.nav__links a:hover {
  text-decoration-color: currentColor;
}

/* ───────────────────────── scena ───────────────────────── */
.scrolly {
  position: relative;
  height: var(--scroll-len);
}
.is-reduced .scrolly {
  height: calc(var(--stage-h) * 2.2);
}
.stage {
  position: sticky;
  top: 0;
  height: var(--stage-h);
  overflow: hidden;
  touch-action: pan-y;
}
.stage.is-grab {
  cursor: grab;
}
.stage.is-dragging {
  cursor: grabbing;
}
.gl {
  position: absolute;
  inset: 0;
}
.gl canvas {
  display: block;
}

/* Link nad połówką etykiety: niewidoczny prostokąt na całą scenę przycięty clip-path do kształtu połówki.
   Stan hover/fokus rysuje WebGL (połówka unosi się, przy fokusie dostaje obwódkę). */
.hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  visibility: hidden;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.hit.is-on {
  visibility: visible;
}

/* przezroczystość ustawia JS (wejście po intro, znikanie przy scrollu) — bez animacji CSS,
   bo animacja z fill: both nadpisuje styl inline i napis zostawał na ekranie */
.hint {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  z-index: 2;
  margin: 0;
  translate: -50% 0;
  color: var(--mute);
  font: 500 13px/1 var(--sans);
  pointer-events: none;
  opacity: 0;
}

/* ───────────────────────── wersja bez WebGL ───────────────────────── */
.fallback {
  display: none;
}
.no-webgl .scrolly {
  height: auto;
}
.no-webgl .stage {
  position: relative;
  height: auto;
  min-height: var(--stage-h);
  overflow: visible;
}
.no-webgl .gl,
.no-webgl .hit,
.no-webgl .hint {
  display: none;
}
.no-webgl .fallback {
  display: grid;
  justify-items: center;
  gap: 40px;
  padding: 0 var(--gutter) 96px;
}
.fallback__halo {
  position: absolute;
  left: 50%;
  top: calc(var(--stage-h) / 2);
  width: 80vmin;
  height: 94vmin;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #eef1f3 0%, #e3e7ea 58%, rgb(206 170 96 / 0.8) 78%, rgb(110 76 22 / 0.3) 90%, transparent 100%);
}
.fallback__title {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--stage-h);
  margin: 0;
  color: var(--ink);
  font: 400 min(21vmin, 200px) / 0.85 var(--display);
  text-align: center;
}
.fallback__title span {
  max-width: 3.2em;
}
.fallback__cover {
  position: relative;
  width: min(420px, 82vw);
  height: auto;
}
.fallback__links {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  margin: 0;
  font: 500 clamp(20px, 2.4vw, 28px) / 1.2 var(--sans);
}

/* ───────────────────────── tracklista ───────────────────────── */
.outro {
  position: relative;
  padding: clamp(96px, 16vh, 180px) var(--gutter) clamp(64px, 10vh, 120px);
  background: var(--bg);
}
.outro__title {
  margin: 0 0 clamp(28px, 5vh, 56px);
  font: 400 clamp(64px, 11vw, 168px) / 0.8 var(--display);
}
.tracks {
  display: grid;
  gap: clamp(6px, 1vw, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.track {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  align-items: baseline;
  font: 500 clamp(24px, 3.4vw, 46px) / 1.15 var(--sans);
  letter-spacing: -0.015em;
}
.track__no {
  color: var(--mute);
  font-size: 0.5em;
  letter-spacing: 0;
}
.track__feat {
  color: var(--mute);
  font-weight: 400;
}
.track--bonus .track__title {
  color: var(--mute);
}
.track--bonus .track__feat {
  font-size: 0.55em;
}

.outro__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(28px, 4vw, 56px);
  margin: clamp(48px, 8vh, 96px) 0 0;
  font: 500 clamp(22px, 2.6vw, 32px) / 1.2 var(--sans);
}
.outro__links a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: text-decoration-thickness 0.2s ease;
}
.outro__links a:hover {
  text-decoration-thickness: 3px;
}
.outro__note {
  color: var(--mute);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 32px);
  color: var(--mute);
  font: 500 14px/1.4 var(--sans);
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--paper);
}

.noscript {
  position: fixed;
  inset: auto 0 0;
  z-index: 70;
  margin: 0;
  padding: 16px var(--gutter);
  background: var(--paper);
  color: var(--ink);
  font: 500 14px/1.4 var(--sans);
}

@media (prefers-reduced-motion: reduce) {
  .loader,
  .nav {
    transition: none;
  }
}
