/* ── Variables ─────────────────────────────── */
/* "Daylight terminal" — the CRT theme rendered as ink on paper.
   Every colour on the page derives from these, including the
   digital rain, so the palette can be retuned from one place. */
:root {
  --bg:      #edf1ee;   /* paper */
  --ink:     #0d5648;   /* primary text */
  --accent:  #c2185b;   /* accent / alerts */

  /* Channel values, so every alpha variant shares one hue */
  --ink-rgb: 13, 86, 72;
  --bg-rgb:  237, 241, 238;

  /* Surfaces that sit over the rain */
  --panel:   rgba(252, 254, 253, 0.90);

  /* Digital rain. Derived from the palette above rather than
     restated, so retuning --bg / --ink carries the rain with it. */
  --rain-bg:    var(--bg);
  --rain-ink:   #56a189;
  --rain-head:  var(--ink);
  --rain-trail: rgba(var(--bg-rgb), 0.10);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ──────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── CRT scan line ─────────────────────────── */
.scanline {
  position: fixed;
  left: 0; right: 0;
  top: 0;
  height: 2px;
  background: rgba(var(--ink-rgb), 0.16);
  box-shadow: 0 0 10px rgba(var(--ink-rgb), 0.10);
  pointer-events: none;
  z-index: 200;
  will-change: transform;
  transform: translateZ(0);
  animation: scan 6s linear infinite;
}

/* Animate transform (GPU-accelerated) rather than `top`, which iOS
   Safari throttles heavily. 100vh keeps it sweeping the full screen. */
@keyframes scan {
  from { transform: translate3d(0, -2px, 0); }
  to   { transform: translate3d(0, 100vh, 0); }
}

/* ── CRT row grid ──────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(var(--ink-rgb), 0.035) 2px,
    rgba(var(--ink-rgb), 0.035) 4px
  );
  pointer-events: none;
  z-index: 190;
}

/* ── Glitch keyframes ──────────────────────── */
@keyframes glitch-clip {
  0%   { clip-path: inset(15% 0 70% 0); transform: translate(-5px, 0); }
  20%  { clip-path: inset(65% 0 10% 0); transform: translate( 5px, 0); }
  40%  { clip-path: inset(35% 0 45% 0); transform: translate(-3px, 0); }
  60%  { clip-path: inset(5%  0 80% 0); transform: translate( 4px, 0); }
  80%  { clip-path: inset(55% 0 25% 0); transform: translate(-4px, 0); }
  100% { clip-path: inset(25% 0 55% 0); transform: translate( 3px, 0); }
}

/* ── Digital rain backdrop ─────────────────── */
#matrixRain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.58;
}

/* Scrim over the rain: washes the middle back toward paper, where
   the text column sits, so copy stays crisp while the rain still
   reads at the edges of the screen. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 60% at 50% 45%,
    rgba(var(--bg-rgb), 0.94) 0%,
    rgba(var(--bg-rgb), 0.86) 40%,
    rgba(var(--bg-rgb), 0.45) 75%,
    rgba(var(--bg-rgb), 0.10) 100%
  );
}

/* ── Layout ────────────────────────────────── */
.wrapper {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 44px 32px 96px;
}

/* ── Status bar ────────────────────────────── */
.status-bar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.22em;
  opacity: 0.72;
  text-transform: uppercase;
  margin-bottom: 56px;
}

/* ── Title ─────────────────────────────────── */
.title-wrap {
  position: relative;
  margin-bottom: 48px;
  line-height: 0.88;
}

.title-main, .title-glitch {
  font-size: clamp(64px, 14vw, 132px);
  font-weight: 900;
  font-family: 'Arial Black', 'Arial Bold', Arial, sans-serif;
  letter-spacing: -0.02em;
  user-select: none;
}

.title-main {
  color: var(--ink);
  position: relative;
  z-index: 2;
  transition: text-shadow 0.05s;
}

/* Chromatic split reads as offset ink on paper rather than neon bleed */
.title-main.glitching {
  text-shadow: 4px 0 var(--accent), -4px 0 #1b8fa8, 0 2px var(--accent);
}

.title-glitch {
  position: absolute;
  top: 0; left: 0;
  color: var(--accent);
  opacity: 0;
  /* `screen` lightens — invisible on paper. `multiply` darkens. */
  mix-blend-mode: multiply;
  z-index: 3;
}

.title-glitch.active {
  opacity: 0.65;
  animation: glitch-clip 0.14s steps(1) infinite;
}

/* ── Nav ───────────────────────────────────── */
nav {
  display: flex;
  gap: 34px;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 52px;
  flex-wrap: wrap;
}

nav a {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  opacity: 0.8;
  padding-bottom: 6px;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s;
}

nav a.active,
nav a:hover {
  opacity: 1;
}

nav a.active {
  border-bottom-color: var(--ink);
}

/* ── Sections ──────────────────────────────── */
.section { display: none; }
.section.active { display: block; }

/* ── Section label ─────────────────────────── */
.section-label {
  font-size: 12px;
  letter-spacing: 0.3em;
  opacity: 0.78;
  margin-bottom: 30px;
  text-transform: uppercase;
}

/* ── Waveform ──────────────────────────────── */
.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 62px;
  margin-bottom: 48px;
  overflow: hidden;
}

@keyframes bar-pulse {
  from { transform: scaleY(0.12); opacity: 0.3; }
  to   { transform: scaleY(1);    opacity: 1;   }
}

.waveform span {
  display: block;
  width: 3px;
  background: rgba(var(--ink-rgb), 0.85);
  border-radius: 1px;
  flex-shrink: 0;
  transform-origin: center;
  will-change: transform;
  animation: bar-pulse 1s ease-in-out infinite alternate;
}

.waveform span.accent {
  background: var(--accent);
  opacity: 0.85;
}

/* ── Release card ──────────────────────────── */
.card {
  border: 1px solid rgba(var(--ink-rgb), 0.34);
  padding: 28px;
  max-width: 440px;
  /* Opaque enough that the rain doesn't read through the copy */
  background: var(--panel);
  margin-bottom: 40px;
}

.card-label {
  font-size: 12px;
  letter-spacing: 0.3em;
  opacity: 0.78;
  margin-bottom: 12px;
}

.card-title {
  font-size: 34px;
  font-weight: 900;
  font-family: 'Arial Black', sans-serif;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.card-sub {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 20px;
  letter-spacing: 0.15em;
}

/* ── Platform pills ────────────────────────── */
.platforms { display: flex; gap: 10px; flex-wrap: wrap; }

.pill {
  font-size: 12px;
  letter-spacing: 0.2em;
  border: 1px solid rgba(var(--ink-rgb), 0.40);
  padding: 9px 16px;
  color: var(--ink);
  opacity: 0.88;
  text-decoration: none;
  transition: opacity 0.2s, border-color 0.2s;
}

.pill:hover { opacity: 1; border-color: rgba(var(--ink-rgb), 0.6); }

/* ── Socials ───────────────────────────────── */
.socials {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  align-items: center;
}

.social-link {
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--ink);
  opacity: 0.82;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.social-link:hover { opacity: 1; }

/* ── Featured video (home) ─────────────────── */
.featured {
  max-width: 720px;
  margin-bottom: 44px;
}

/* ── Video list ────────────────────────────── */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 44px;
  max-width: 720px;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}

.video-num {
  font-size: 12px;
  letter-spacing: 0.24em;
  opacity: 0.85;
}

.video-date {
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border: 1px solid rgba(var(--ink-rgb), 0.26);
  /* Placeholder while the iframe loads — a black box flashes harshly
     against paper, so hold the frame in a neutral tint instead. */
  background: rgba(var(--ink-rgb), 0.06);
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Mix section ───────────────────────────── */
.mix-block { max-width: 720px; }

.mix-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}

.mix-num  { font-size: 12px; letter-spacing: 0.24em; opacity: 0.82;  margin-bottom: 6px; }
.mix-name { font-size: 15px; letter-spacing: 0.1em;  opacity: 0.95; }
.mix-date { font-size: 11px; letter-spacing: 0.2em;  opacity: 0.7; }

.sc-embed {
  border: 1px solid rgba(var(--ink-rgb), 0.26);
  display: block;
}

/* ── More link ─────────────────────────────── */
.more-link {
  display: inline-block;
  margin-top: 32px;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--ink);
  opacity: 0.8;
  text-decoration: none;
  transition: opacity 0.2s;
}
.more-link:hover { opacity: 1; }

/* ── Contact form ──────────────────────────── */
.booking-intro {
  font-size: 15px;
  letter-spacing: 0.05em;
  opacity: 0.88;
  line-height: 1.9;
  margin-bottom: 36px;
}

.contact-form { max-width: 520px; }

.form-group { margin-bottom: 22px; }

.form-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.28em;
  opacity: 0.82;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.form-input,
.form-textarea {
  width: 100%;
  /* Opaque so the rain never shows through what you're typing */
  background: var(--panel);
  border: 1px solid rgba(var(--ink-rgb), 0.32);
  color: var(--ink);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-input:focus,
.form-textarea:focus { border-color: rgba(var(--ink-rgb), 0.55); }

.form-input::placeholder,
.form-textarea::placeholder { opacity: 0.45; }

.form-textarea { height: 150px; resize: vertical; }

.form-submit {
  background: transparent;
  border: 1px solid rgba(var(--ink-rgb), 0.55);
  color: var(--ink);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 0.3em;
  padding: 16px 36px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s;
}

.form-submit:hover:not(:disabled) {
  background: rgba(var(--ink-rgb), 0.07);
  border-color: var(--ink);
}

.form-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.form-msg {
  font-size: 13px;
  letter-spacing: 0.18em;
  margin-top: 20px;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.35s;
}

.form-msg.visible  { opacity: 1; }
.form-msg.success  { color: var(--ink); }
.form-msg.error    { color: var(--accent); }

/* ── Footer ────────────────────────────────── */
.site-footer {
  position: fixed;
  bottom: 18px;
  right: 22px;
  font-size: 10px;
  letter-spacing: 0.28em;
  opacity: 0.45;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 50;
}

/* ── Reduced motion ────────────────────────── */
/* Honour the OS "Reduce Motion" setting, but keep the page feeling
   alive: drop only the full-screen scanline sweep and the jarring
   title glitch. The waveform keeps pulsing (it's small, localised,
   and core to the "signal active" identity). */
@media (prefers-reduced-motion: reduce) {
  .scanline { animation: none; opacity: 0.4; }
  .title-glitch.active { animation: none; }
}

/* ── Mobile ────────────────────────────────── */
@media (max-width: 580px) {
  .wrapper { padding: 28px 18px 96px; }
  .status-bar span:not(:first-child) { display: none; }
  nav { gap: 20px; }
  .socials { gap: 20px; }
  .card { max-width: 100%; }
}

/* ── Prose / body copy ─────────────────────── */
.prose {
  max-width: 640px;
  margin-bottom: 44px;
}

.prose p {
  font-size: 15px;
  line-height: 1.85;
  opacity: 0.88;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.prose p:last-child { margin-bottom: 0; }

.prose strong {
  font-weight: normal;
  opacity: 1;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.30);
}

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(var(--ink-rgb), 0.45);
  transition: text-decoration-color 0.2s;
}

.prose a:hover { text-decoration-color: var(--ink); }

/* The section label doubles as a heading now, so drop the h2 defaults */
h2.section-label,
h2.card-title { font-weight: inherit; }

h2.card-title {
  font-size: 34px;
  font-weight: 900;
  font-family: 'Arial Black', sans-serif;
}

/* ── Melt on scroll ────────────────────────── */
/* Scrolling fast in either direction distorts the content as if it were
   sagging, then springs it back to exactly where it started. Driven by
   custom properties so the JS writes a couple of numbers and the
   compositor does the rest — transforms and opacity only, no layout.

   --melt is SIGNED: positive scrolling up, negative scrolling down, so
   the content trails the gesture. --melt-a is its magnitude, for the
   parts that must not invert (a negative stretch would shrink, and a
   negative blur radius is invalid). Both are 0 at rest, so the rule
   below is a no-op on untouched elements. */
.melt-target {
  --melt: 0;
  --melt-a: 0;
  --melt-drip: 0px;
  --melt-skew: 0deg;
  --melt-rot: 0deg;
  --melt-x: 0px;
  transform-origin: top center;
  transform:
    translate3d(calc(var(--melt) * var(--melt-x)), calc(var(--melt) * var(--melt-drip)), 0)
    scaleY(calc(1 + var(--melt-a) * 0.95))
    scaleX(calc(1 - var(--melt-a) * 0.11))
    skewY(calc(var(--melt) * var(--melt-skew)))
    rotate(calc(var(--melt) * var(--melt-rot)));
}

/* Blur sells the melt but is the most expensive part of it, so it is
   opt-in: the script adds this class only where there is headroom. */
.melt-blur {
  filter: blur(max(0px, calc(var(--melt-a) * 6px)));
}

/* Held only while an element is actually moving; the script removes it
   on settle so the page does not sit on a pile of compositor layers. */
.melt-active {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  /* House convention: scale the effect down rather than killing it. */
  .melt-target {
    transform:
      translate3d(0, calc(var(--melt) * var(--melt-drip) * 0.16), 0)
      scaleY(calc(1 + var(--melt-a) * 0.06));
  }
  .melt-blur { filter: none; }
}
