/* TAPE//LACQUER — chaotic warehouse cassette label.
   Fixed video + WebGL stage (js/scene.js), scroll/static HUD in js/app.js. */

:root {
  --void:   #08060a;
  --void-2: #0e0a12;
  --panel:  #121018;
  --line:   #2a2438;
  --line-2: #3d3550;
  --bone:   #ece8e0;
  --dim:    #9a94a8;
  --faint:  #6e6878;
  --tape:   #f2e94a;
  --tape-d: #c4b832;
  --static: #4de8ff;
  --burn:   #ff3d2e;
  --magenta:#ff2bd6;
  --ch:     var(--tape);

  --f-disp: "Anton", "Arial Narrow", "Impact", sans-serif;
  --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --gx: 0;
  --gy: 0;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
.mono { font-family: var(--f-mono); letter-spacing: 0.04em; }

::selection { background: var(--tape); color: var(--void); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--static);
  outline-offset: 3px;
}

.skip {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--tape); color: var(--void);
  padding: 10px 18px; font-weight: 700; transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* ---- fixed stage ---- */
.stage {
  position: fixed; inset: 0; z-index: 0;
  background: var(--void);
  overflow: hidden;
}
.stage-vid {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.35) contrast(1.1) brightness(0.42);
  transform: scale(1.06);
}
.stage canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.no3d-back {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
}
.no3d-back img { width: 100%; height: 100%; object-fit: cover; }
body.no-3d .no3d-back { opacity: 1; }
body.no-3d #gl { display: none; }
body.no-3d .stage-vid { filter: brightness(0.35) saturate(1.2); }
@media (prefers-reduced-motion: reduce) {
  .stage-vid { display: none; }
}

.scanlines {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 3px),
    radial-gradient(130% 90% at 50% 40%, transparent 50%, rgba(0,0,0,0.55) 100%);
}

/* ---- HUD ---- */
.hud {
  position: fixed; left: 18px; bottom: 18px; z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--dim);
  pointer-events: none;
}
.hud-static, .hud-tape {
  background: rgba(8, 6, 10, 0.82);
  padding: 5px 9px;
  width: max-content;
}
.hud-static { display: flex; align-items: center; gap: 10px; }
.hs-label { color: var(--faint); }
.hs-track {
  width: 120px; height: 6px; background: var(--line);
  position: relative; overflow: hidden;
}
.hs-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
  background: linear-gradient(90deg, var(--tape-d), var(--static));
  transform-origin: left center;
  transform: scaleX(0);
}
.hs-read { color: var(--static); min-width: 4ch; }
.hud-tape { display: flex; align-items: center; gap: 8px; }
.hud-sep { color: var(--line-2); }
.beat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--tape);
  transform: scale(0.55);
  transition: transform 0.14s ease-out;
}
.beat-dot.tick { transform: scale(1); }
body.burning .beat-dot { background: var(--burn); }
body.burning .hs-fill { background: linear-gradient(90deg, var(--burn), var(--magenta)); }
body.burning .hud { color: var(--bone); }

.edge-ticker {
  position: fixed; right: 10px; top: 50%; z-index: 40;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center center;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em;
  color: var(--faint);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.7;
}

/* ---- header ---- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 3vw, 28px);
  background: linear-gradient(180deg, rgba(8,6,10,0.92) 0%, transparent 100%);
}
.wordmark {
  font-family: var(--f-disp);
  font-size: clamp(18px, 2.4vw, 22px);
  letter-spacing: 0.04em;
  line-height: 1;
}
.wordmark em { font-style: normal; color: var(--burn); }
.top nav {
  display: flex; gap: clamp(12px, 2vw, 22px);
  font-size: 13px; font-weight: 500;
  margin-left: auto;
}
.top nav a:hover { color: var(--static); }
.burger { display: none; width: 36px; height: 36px; position: relative; }
.burger span {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--bone);
  transition: transform 0.2s;
}
.burger span:first-child { top: 12px; }
.burger span:last-child { top: 22px; }
body.nav-open .burger span:first-child { transform: translateY(5px) rotate(45deg); }
body.nav-open .burger span:last-child { transform: translateY(-5px) rotate(-45deg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-burn {
  background: var(--burn);
  color: var(--void);
  border-color: var(--burn);
}
.btn-burn:hover { background: var(--tape); border-color: var(--tape); }
.btn-ghost {
  border-color: var(--line-2);
  color: var(--bone);
}
.btn-ghost:hover { border-color: var(--static); color: var(--static); }
.btn-wide { width: 100%; }

.scrim {
  position: fixed; inset: 0; z-index: 58;
  background: rgba(8, 6, 10, 0.72);
  backdrop-filter: blur(4px);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: min(320px, 88vw);
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 72px 24px 32px;
  display: flex; flex-direction: column; gap: 18px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
body.nav-open .drawer { transform: translateX(0); }
body.nav-open .scrim { display: block !important; }
.drawer a { font-size: 18px; font-weight: 500; }
.drawer .btn { margin-top: 12px; }

main { position: relative; z-index: 5; }

.wrap {
  width: min(var(--wrap), calc(100% - clamp(24px, 5vw, 48px)));
  margin: 0 auto;
}

.kicker {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.kdot {
  display: inline-block; width: 7px; height: 7px;
  background: var(--ch);
  margin-right: 10px;
  vertical-align: middle;
}

.slab {
  font-family: var(--f-disp);
  font-size: clamp(42px, 9vw, 96px);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.slab-burn { color: var(--burn); }
.slab-static { color: var(--static); }

.body-l { font-size: clamp(17px, 2vw, 20px); line-height: 1.55; max-width: 52ch; color: var(--dim); }
.body-m { font-size: 17px; line-height: 1.55; max-width: 56ch; color: var(--dim); }

.sect {
  position: relative;
  padding: clamp(110px, 16vh, 180px) 0;
}
.sect::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8,6,10,0.55) 0%, rgba(8,6,10,0.88) 40%, rgba(8,6,10,0.94) 100%);
}

/* ---- hero ---- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(48px, 8vh, 96px);
}
.hero-wrap { padding-top: clamp(120px, 18vh, 200px); }

.hero-title {
  font-family: var(--f-disp);
  font-size: clamp(56px, 14vw, 148px);
  line-height: 0.88;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.06em;
}
.ht-a { color: var(--tape); }
.ht-b { color: var(--burn); transform: rotate(-2deg); }
.ht-slash { color: var(--faint); font-size: 0.55em; align-self: center; }
.ht-c { color: var(--static); }
.ht-d {
  color: var(--bone);
  text-shadow: 3px 0 var(--magenta), -2px 0 var(--burn);
}

.hero-lede {
  max-width: 44ch;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--dim);
  margin-bottom: 28px;
}
.hero-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.touch-cue { font-size: 11px; color: var(--faint); letter-spacing: 0.14em; }
.scroll-cue {
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.12em;
  padding: 0 16px 24px;
  animation: bob 2.4s ease-in-out infinite;
}
.cue-arrow { display: inline-block; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue { animation: none; }
}

/* ---- rig ---- */
.rig-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.stat-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat {
  border: 1px solid var(--line);
  padding: 16px 14px;
  background: rgba(12, 10, 16, 0.65);
}
.stat-n {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--ch);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-l { font-size: 12px; color: var(--faint); }

/* ---- drops ---- */
.drop-list { margin-top: 8px; }
.drop {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s, background 0.15s;
}
.drop:hover, .drop:focus-within {
  color: var(--ch);
  background: rgba(255,255,255,0.02);
}
.drop-title {
  font-family: var(--f-disp);
  font-size: clamp(22px, 3.5vw, 32px);
  letter-spacing: 0.04em;
}
.drop-meta { color: var(--faint); font-size: 11px; }
.drop[data-ch="a"]:hover { --ch: var(--tape); }
.drop[data-ch="b"]:hover { --ch: var(--static); }
.drop[data-ch="burn"]:hover { --ch: var(--burn); }

/* ---- warehouse ---- */
.night-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}
.night {
  border: 1px solid var(--line);
  padding: clamp(18px, 2.5vw, 24px);
  background: rgba(12, 10, 16, 0.55);
  transition: border-color 0.15s;
}
.night:hover { border-color: var(--ch); }
.night-head { margin-bottom: 12px; }
.night-tag { font-size: 10px; color: var(--faint); letter-spacing: 0.14em; }
.night-name {
  font-family: var(--f-disp);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.04em;
  margin: 6px 0;
}
.night-note { font-size: 10px; color: var(--faint); }
.night p { color: var(--dim); font-size: 15px; line-height: 1.5; }

/* ---- press ---- */
.press-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.press-form {
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 28px);
  background: rgba(12, 10, 16, 0.72);
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  background: var(--void);
  border: 1px solid var(--line-2);
  color: var(--bone);
  font: inherit;
}
.field input:focus, .field select:focus { border-color: var(--static); }
.field-err { font-size: 12px; color: var(--burn); margin-top: 6px; }
.press-done { margin-top: 14px; font-size: 14px; color: var(--tape); }

/* ---- footer ---- */
.foot {
  position: relative; z-index: 5;
  border-top: 1px solid var(--line);
  background: rgba(8, 6, 10, 0.94);
  padding: 48px 0 88px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  margin-bottom: 32px;
}
.foot-mark {
  font-family: var(--f-disp);
  font-size: 22px;
  letter-spacing: 0.06em;
}
.foot-line { color: var(--faint); font-size: 12px; margin-top: 6px; }
.foot-cols { display: flex; gap: 24px; font-size: 14px; }
.foot-cols a:hover { color: var(--static); }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 12px;
  color: var(--faint);
}
.foot-base a:hover { color: var(--tape); }

/* ---- reveals ---- */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js-anim .reveal.is-in {
  opacity: 1;
  transform: none;
}
.js-anim .reveal.d1 { transition-delay: 0.08s; }
.js-anim .reveal.d2 { transition-delay: 0.16s; }
.js-anim .reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; transition: none; }
}

/* glitch pulse on data-glitch when body.glitch */
body.glitch [data-glitch] {
  animation: glitch 0.35s steps(2) 1;
}
@keyframes glitch {
  0% { transform: translate(0); filter: none; }
  25% { transform: translate(-3px, 1px); filter: hue-rotate(90deg); }
  50% { transform: translate(2px, -2px); }
  75% { transform: translate(-1px, 2px); filter: hue-rotate(-40deg); }
  100% { transform: none; filter: none; }
}

/* channel colours from scroll stage */
body.ch-a { --ch: var(--tape); }
body.ch-b { --ch: var(--static); }
body.ch-burn { --ch: var(--burn); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .rig-grid, .press-wrap, .night-grid { grid-template-columns: 1fr; }
  .top nav, .top .btn-burn { display: none; }
  .burger { display: block; margin-left: auto; }
  .edge-ticker { display: none; }
}
@media (max-width: 520px) {
  .stat-rail { grid-template-columns: 1fr; }
  .drop { grid-template-columns: 36px 1fr; }
  .drop-meta { grid-column: 2; }
}
