/* ============================================================
   SAW TERROR — descent site
   palette: ink / blood / bone / rust / orb-green
   ============================================================ */

:root {
  --ink: #0b0806;
  --ink2: #070504;
  --abyss: #030202;
  --blood: #c1241d;
  --blood-dim: #7c1713;
  --bone: #d6cbb8;
  --bone-dim: #8d8371;
  --rust: #7a4a2b;
  --orb: #3f7a3f;
  --line: rgba(214, 203, 184, 0.16);
  --mono: "Space Mono", "Courier New", monospace;
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: crosshair;
}

a { color: inherit; }
a:hover { color: var(--blood); }
img { max-width: 100%; display: block; }

::selection { background: var(--blood); color: var(--ink); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--abyss); }
::-webkit-scrollbar-thumb { background: var(--blood-dim); border: 2px solid var(--abyss); }
::-webkit-scrollbar-thumb:hover { background: var(--blood); }

/* ---------- global overlays (noise + scanlines), cheap: fixed, on one element each ---------- */
.overlay-noise {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0.5;
  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%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}
.overlay-scan {
  position: fixed; inset: 0; z-index: 91; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0, 0, 0, 0.14) 3px, rgba(0, 0, 0, 0.14) 4px
  );
}

/* ---------- top nav : dottxt-style chips ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  background: linear-gradient(to bottom, rgba(7,5,4,0.92), rgba(7,5,4,0.75) 70%, transparent);
  font-size: 11px; letter-spacing: 0.08em;
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
  mask-image: linear-gradient(to right, #000 92%, transparent);
}
.nav::-webkit-scrollbar { display: none; }
.nav-logo { height: 26px; width: auto; flex: 0 0 auto; image-rendering: auto; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; white-space: nowrap;
  padding: 3px 8px; border: 1px solid transparent;
  color: var(--bone-dim);
  transition: color 0.15s, border-color 0.15s;
}
.nav a .idx {
  display: inline-block; padding: 0 4px; margin-right: 5px;
  background: var(--blood-dim); color: var(--bone);
}
.nav a:hover { color: var(--bone); border-color: var(--line); }
.nav a.active { color: var(--bone); border-color: var(--blood); }
.nav a.active .idx { background: var(--blood); }

/* ---------- depth rail ---------- */
.depth-rail {
  position: fixed; left: 14px; top: 50%; transform: translateY(-50%);
  z-index: 95; pointer-events: none;
  font-size: 10px; letter-spacing: 0.14em; color: var(--bone-dim);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.depth-rail .ticks {
  width: 1px; height: 180px; background: var(--line); position: relative;
}
.depth-rail .ticks::before {
  content: ""; position: absolute; left: -3px; right: -3px; top: 0; height: 1px;
  background: var(--bone-dim);
}
.depth-rail .cursor {
  position: absolute; left: -4px; width: 9px; height: 9px;
  background: var(--blood);
  transform: rotate(45deg) translateY(0);
  top: 0;
}
.depth-readout { writing-mode: vertical-rl; }
.depth-readout b { color: var(--blood); font-weight: normal; }

/* ---------- floors : shared ---------- */
.floor {
  position: relative;
  padding: 110px 6vw 130px;
  border-top: 1px solid var(--line);
}
.floor-head { margin-bottom: 54px; position: relative; }
.floor-head .fh-meta {
  font-size: 11px; letter-spacing: 0.22em; color: var(--bone-dim);
  display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap;
}
.floor-head .fh-meta .chip {
  background: var(--blood-dim); color: var(--bone); padding: 1px 7px;
}
.floor-head h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.98;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: -0.025em;
  margin-top: 12px;
}
.floor-head h2::after {
  content: "."; color: var(--blood);
}
.floor-head .fh-rule {
  margin-top: 18px; height: 1px; background: var(--line); position: relative;
}
.floor-head .fh-rule::after {
  content: ""; position: absolute; left: 0; top: -2px; width: 90px; height: 5px;
  background: repeating-linear-gradient(45deg, var(--blood), var(--blood) 5px, transparent 5px, transparent 10px);
}

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.rv.on { opacity: 1; transform: none; }

/* jagged strata divider between floors */
.strata {
  height: 46px; position: relative; z-index: 5;
  background: var(--abyss);
  clip-path: polygon(0 0, 4% 55%, 9% 15%, 15% 70%, 22% 25%, 30% 80%, 37% 30%, 45% 65%, 52% 10%, 60% 75%, 68% 35%, 75% 85%, 82% 20%, 90% 60%, 96% 25%, 100% 70%, 100% 100%, 0 100%);
  margin-top: -46px;
}

/* ============ FLOOR 00 : SURFACE (hero) ============ */
#surface {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; border-top: none;
  overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
  filter: saturate(0.85) contrast(1.05);
  background: var(--abyss);
}
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 25%, rgba(11, 8, 6, 0.72) 75%),
    linear-gradient(to bottom, rgba(11,8,6,0.55), transparent 30%, transparent 65%, var(--ink) 98%);
}
.hero-logo {
  width: min(760px, 86vw);
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.85)) drop-shadow(0 0 60px rgba(193,36,29,0.22));
}
.hero-sub {
  margin-top: 26px; font-size: clamp(11px, 1.6vw, 14px);
  letter-spacing: 0.42em; text-transform: uppercase; color: var(--bone);
  text-shadow: 0 2px 8px #000;
}
.hero-chips {
  margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  font-size: 11px; letter-spacing: 0.12em;
}
.hero-chips span {
  border: 1px solid var(--line); padding: 4px 12px;
  background: rgba(7, 5, 4, 0.6);
}
.hero-chips span b { color: var(--blood); font-weight: normal; }
.hero-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.34em; color: var(--bone-dim);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.55; }
  50% { transform: translate(-50%, 9px); opacity: 1; }
}

/* ---- VHS overlay on the surface ---- */
.vhs { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.vhs::before {
  content: ""; position: absolute; inset: -4px 0;
  background: repeating-linear-gradient(0deg,
    rgba(4, 3, 2, 0.5) 0 1px,
    rgba(216, 205, 190, 0.06) 1px 2px,
    transparent 2px 3px);
  mix-blend-mode: overlay;
  opacity: 0.75;
  animation: vhs-roll 6s linear infinite;
}
.vhs::after {
  content: ""; position: absolute; left: -2%; right: -2%; height: 110px; top: -20%;
  background: linear-gradient(180deg, transparent,
    rgba(216, 205, 190, 0.07) 30%, rgba(193, 36, 29, 0.06) 60%, transparent);
  mix-blend-mode: screen; filter: blur(1px);
  animation: vhs-track 8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes vhs-roll { to { transform: translateY(3px); } }
@keyframes vhs-track {
  0% { top: -20%; opacity: 0; }
  5% { opacity: 1; }
  48% { top: 105%; opacity: 0.9; }
  52%, 100% { top: 105%; opacity: 0; }
}
/* occasional tracking slips on the hero footage */
.hero-video { animation: vhs-jitter 11s steps(1, end) infinite; }
@keyframes vhs-jitter {
  0%, 100% { transform: none; filter: saturate(0.85) contrast(1.05); }
  37% { transform: translateX(3px) scaleX(1.004); filter: saturate(0.55) contrast(1.22) hue-rotate(-8deg); }
  37.6% { transform: none; filter: saturate(0.85) contrast(1.05); }
  61% { transform: translateX(-4px); filter: saturate(1.15) contrast(1.1); }
  61.5% { transform: none; filter: saturate(0.85) contrast(1.05); }
  83% { transform: translateY(2px) scaleY(1.006); filter: saturate(0.7) contrast(1.28); }
  83.4% { transform: none; filter: saturate(0.85) contrast(1.05); }
}

/* ============ FLOOR 01 : THE MACHINE ============ */
#machine {
  background:
    linear-gradient(rgba(11,8,6,0.9), rgba(7,5,4,0.94)),
    url("assets/img/hall_machine.jpg") center / cover no-repeat fixed;
}
.machine-intro {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px; align-items: center; margin-bottom: 70px;
}
.machine-intro .lead { font-size: clamp(16px, 2vw, 19px); line-height: 1.75; }
.machine-intro .lead p + p { margin-top: 20px; font-size: 0.82em; line-height: 1.8; }
.machine-intro .lead em { color: var(--blood); font-style: normal; }
.machine-intro .lead b { color: var(--bone); }
.machine-intro .lead .dim { color: var(--bone-dim); font-size: 13px; display: block; margin-top: 18px; }
.machine-shot { position: relative; }
.machine-shot img { border: 1px solid var(--line); filter: contrast(1.03); height: auto; }
.machine-shot .cap {
  position: absolute; left: 0; bottom: -24px; font-size: 10px;
  letter-spacing: 0.18em; color: var(--bone-dim);
}

.pages-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px; background: var(--ink2); border: 1px solid var(--line);
}
.page-card {
  background: var(--ink2); padding: 26px 22px 22px;
  position: relative; overflow: hidden;
  transition: background 0.2s;
}
.page-card:hover { background: #120c09; }
.page-card .diamond { width: 74px; height: 74px; margin-bottom: 18px; }
.page-card .diamond svg { width: 100%; height: 100%; display: block; }
.page-card h3 {
  font-size: 15px; letter-spacing: 0.24em; color: var(--bone);
  font-weight: 700;
}
.page-card h3 .no { color: var(--blood); margin-right: 6px; }
.page-card p { font-size: 12.5px; color: var(--bone-dim); margin-top: 10px; min-height: 76px; }
.page-card p b { color: var(--bone); font-weight: normal; }
.hazard-bar { margin-top: 14px; font-size: 10px; letter-spacing: 0.14em; color: var(--bone-dim); }
.hazard-bar .cells { display: inline-flex; gap: 2px; margin-left: 8px; vertical-align: middle; }
.hazard-bar .cells i {
  width: 9px; height: 9px; display: block;
  background: var(--blood); transform: skewX(-18deg);
}
.hazard-bar .cells i.off { background: rgba(214,203,184,0.14); }
.page-card:hover .diamond svg { animation: dspin 0.55s steps(2) 1; }
@keyframes dspin { 50% { transform: scale(0.94) rotate(2deg); } }

/* sub-level rooms inside DEVELOP */
.sub-head {
  display: flex; align-items: center; gap: 14px;
  margin: 56px 0 14px; font-size: 11px; letter-spacing: 0.18em;
  color: var(--bone-dim);
}
.rooms-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px; background: var(--ink2); border: 1px solid var(--line);
}
.room {
  background: var(--ink2); padding: 18px 16px 16px;
  transition: background 0.2s;
}
.room:hover { background: #120c09; }
.room .mini { width: 44px; height: 44px; margin-bottom: 10px; }
.room .mini svg { width: 100%; height: 100%; display: block; }
.room:hover .mini svg { animation: dspin 0.55s steps(2) 1; }
.room h4 {
  font-size: 12px; letter-spacing: 0.26em; color: var(--bone);
  font-weight: 700;
}
.room p { font-size: 11px; color: var(--bone-dim); margin-top: 6px; line-height: 1.6; }

/* ============ FLOOR 02 : TRANSMISSIONS ============ */
#transmissions {
  background:
    linear-gradient(rgba(7,5,4,0.86), rgba(7,5,4,0.92)),
    url("assets/img/tex_stone.jpg") center / 512px repeat;
}
.trans-grid {
  display: flex; gap: 4vw; justify-content: center; flex-wrap: wrap; align-items: flex-start;
}
.short-frame {
  width: min(320px, 84vw); position: relative;
  border: 1px solid var(--line); padding: 10px; background: var(--abyss);
}
.short-frame::before, .short-frame::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
}
.short-frame::before { top: -1px; left: -1px; border-top: 2px solid var(--blood); border-left: 2px solid var(--blood); }
.short-frame::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--blood); border-right: 2px solid var(--blood); }
.short-frame iframe {
  width: 100%; aspect-ratio: 9 / 16; border: 0; display: block; background: #000;
}
.short-frame .tag {
  margin-top: 9px; font-size: 10px; letter-spacing: 0.2em; color: var(--bone-dim);
}

/* ============ FLOOR 03 : THE VAULT (presets) ============ */
#vault {
  background:
    linear-gradient(rgba(7,5,4,0.88), rgba(7,5,4,0.94)),
    var(--vault-bg, var(--ink2)) center / cover no-repeat;
}
.disk-row {
  display: flex; gap: 34px; overflow-x: auto; padding: 30px 6px 44px;
  scroll-snap-type: x proximity;
}
.disk-row::-webkit-scrollbar { height: 8px; }
.disk {
  flex: 0 0 auto; width: 300px; scroll-snap-align: center;
  text-decoration: none; display: block;
  transition: transform 0.25s ease;
  position: relative;
}
a.disk:hover { transform: translateY(-10px) rotate(-1.2deg); color: inherit; }
.disk-body {
  width: 300px; height: 300px; position: relative;
  background: linear-gradient(160deg, #191512, #0e0b09 60%);
  border: 1px solid rgba(214,203,184,0.22);
  border-radius: 4px 14px 4px 4px; /* notched corner feel */
  box-shadow: 0 14px 34px rgba(0,0,0,0.6);
}
.disk-shutter {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 128px; height: 74px; background: linear-gradient(#5c5348, #37312a);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.disk-shutter::after {
  content: ""; position: absolute; right: 18px; top: 12px;
  width: 34px; height: 50px; background: var(--ink);
}
.disk-label {
  position: absolute; left: 22px; right: 22px; bottom: 16px; top: 92px;
  background: var(--bone); overflow: hidden;
}
.disk-label img { width: 100%; height: 100%; object-fit: cover; }
/* wordmark engraved into the disk plastic */
.disk-label.etched {
  background: linear-gradient(160deg, #14100d, #0b0908 70%, #080605);
  box-shadow:
    inset 0 3px 9px rgba(0, 0, 0, 0.85),
    inset 0 -1px 0 rgba(214, 203, 184, 0.07);
  border: 1px solid rgba(214, 203, 184, 0.08);
  display: flex; align-items: center; justify-content: center;
}
.disk-label.etched img {
  width: 86%; height: auto; object-fit: contain;
  filter:
    drop-shadow(0 1px 0 rgba(214, 203, 184, 0.16))
    drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.95));
}
.disk-label .cs {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background:
    repeating-linear-gradient(0deg, #171310 0 2px, #0c0a08 2px 4px);
  color: var(--bone-dim); font-size: 11px; letter-spacing: 0.3em;
}
.disk-label .cs b { color: var(--blood); font-size: 26px; font-family: var(--display); font-weight: 500; letter-spacing: 0.02em; }
.disk-meta { margin-top: 14px; font-size: 11px; letter-spacing: 0.16em; }
.disk-meta .t { color: var(--bone); }
.disk-meta .d { color: var(--bone-dim); display: block; margin-top: 2px; font-size: 10px; }
.disk-writeprotect {
  position: absolute; top: 10px; right: 12px; font-size: 9px; letter-spacing: 0.2em;
  color: var(--blood); border: 1px solid var(--blood-dim); padding: 1px 6px;
}

/* rotating diskette exhibit — pops up over a disk on hover */
.disk-spin {
  position: absolute; inset: 0; z-index: 3;
  background: #000;
  border-radius: 4px 14px 4px 4px; overflow: hidden;
  opacity: 0; transition: opacity 0.28s ease;
  pointer-events: none;
}
.disk-spin.on { opacity: 1; }
.disk-spin video {
  position: absolute; inset: -8%;
  width: 116%; height: 116%; object-fit: cover; display: block;
}
.disk-spin::before, .disk-spin::after {
  content: ""; position: absolute; width: 22px; height: 22px; z-index: 2;
}
.disk-spin::before { top: 8px; left: 8px; border-top: 2px solid var(--blood); border-left: 2px solid var(--blood); }
.disk-spin::after { bottom: 8px; right: 8px; border-bottom: 2px solid var(--blood); border-right: 2px solid var(--blood); }
.disk-spin .tag {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  font-size: 9px; letter-spacing: 0.2em;
  color: var(--blood); border: 1px solid var(--blood-dim); padding: 1px 6px;
  background: rgba(0, 0, 0, 0.55);
}

.vault-video { margin-top: 40px; }
.vv-wrap { position: relative; width: 100%; }
.vv-wrap iframe {
  width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000;
}
.vv-cap {
  text-align: center; margin-top: 14px; font-size: 11px; letter-spacing: 0.2em; color: var(--bone-dim);
}
.vv-cap b { color: var(--bone); font-weight: normal; }

/* ============ FLOOR 04 : SOUND TRIALS ============ */
#sound {
  background:
    linear-gradient(rgba(9,7,5,0.88), rgba(5,4,3,0.93)),
    url("assets/img/bg_sound.jpg") center / cover no-repeat fixed;
}
.players { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.player {
  display: grid; grid-template-columns: 76px minmax(0,1fr) 92px;
  gap: 20px; align-items: center;
  background: var(--ink2); padding: 20px 22px;
}
.player .pbtn {
  width: 64px; height: 64px; border: none; background: none; cursor: pointer;
  position: relative; padding: 0;
}
.player .pbtn img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(63,122,63,0.0));
  transition: filter 0.3s;
}
.player.playing .pbtn img {
  animation: starspin 9s linear infinite;
  filter: drop-shadow(0 0 14px rgba(63,122,63,0.65));
}
@keyframes starspin { to { transform: rotate(360deg); } }
.player .pbtn::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--bone); font-size: 13px; text-shadow: 0 0 6px #000;
}
.player.playing .pbtn::after { content: "❚❚"; font-size: 10px; }
.player .pinfo .ptitle { font-size: 13px; letter-spacing: 0.16em; color: var(--bone); }
.player .pinfo .pdesc { font-size: 10.5px; letter-spacing: 0.12em; color: var(--bone-dim); margin-top: 2px; }
.player .track {
  margin-top: 12px; height: 18px; position: relative; cursor: pointer;
}
.player .track .rail {
  position: absolute; top: 8px; left: 0; right: 0; height: 2px;
  background: rgba(214,203,184,0.18);
}
.player .track .fill {
  position: absolute; top: 8px; left: 0; height: 2px; width: 0%;
  background: var(--blood);
}
.player .track .teeth {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(214,203,184,0.12) 14px 15px);
  clip-path: polygon(0 100%, 3% 40%, 6% 100%, 9% 40%, 12% 100%, 15% 40%, 18% 100%, 21% 40%, 24% 100%, 27% 40%, 30% 100%, 33% 40%, 36% 100%, 39% 40%, 42% 100%, 45% 40%, 48% 100%, 51% 40%, 54% 100%, 57% 40%, 60% 100%, 63% 40%, 66% 100%, 69% 40%, 72% 100%, 75% 40%, 78% 100%, 81% 40%, 84% 100%, 87% 40%, 90% 100%, 93% 40%, 96% 100%, 99% 40%, 100% 100%);
  opacity: 0.5; pointer-events: none;
}
.player .ptime { font-size: 11px; color: var(--bone-dim); text-align: right; letter-spacing: 0.08em; }
.sound-note { margin-top: 18px; font-size: 11px; letter-spacing: 0.18em; color: var(--bone-dim); }
.sound-note b { color: var(--blood); font-weight: normal; }

/* ============ FLOOR 05 : THE GATE (download) ============ */
#gate {
  background:
    linear-gradient(rgba(7,5,4,0.9), rgba(5,4,3,0.94)),
    url("assets/img/bg_gate.jpg") center / cover no-repeat fixed;
  text-align: center;
}
.gate-inner { max-width: 760px; margin: 0 auto; position: relative; }
.gate-keys {
  position: absolute; right: -120px; top: -30px; width: 150px; opacity: 0.5;
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(0,0,0,0.8));
}
.gate-free {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(15px, 2.75vw, 32px); color: var(--blood);
  line-height: 1; letter-spacing: -0.03em; text-transform: uppercase;
  position: relative; display: inline-block;
}
.gate-wreath {
  position: absolute; left: 50%; top: 50%;
  width: 2.6em; max-width: none;
  transform: translate(-50%, -50%);
  opacity: 0.35; pointer-events: none; z-index: -1;
}
.gate-sub { margin-top: 10px; font-size: 12px; letter-spacing: 0.3em; color: var(--bone-dim); }
.gate-btns { margin-top: 44px; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.gate-btn {
  display: block; text-decoration: none;
  border: 1px solid var(--bone-dim); padding: 20px 34px;
  min-width: 250px; text-align: left; position: relative;
  transition: border-color 0.2s, background 0.2s;
  background: rgba(11,8,6,0.5);
}
.gate-btn:hover { border-color: var(--blood); background: rgba(193,36,29,0.08); color: var(--bone); }
.gate-btn .os { font-size: 17px; letter-spacing: 0.2em; color: var(--bone); }
.gate-btn .fmt { display: block; margin-top: 5px; font-size: 10.5px; letter-spacing: 0.16em; color: var(--bone-dim); }
.gate-btn .arr { position: absolute; right: 16px; top: 18px; color: var(--blood); }
.gate-fine { margin-top: 34px; font-size: 10.5px; letter-spacing: 0.16em; color: var(--bone-dim); }

/* ============ FLOOR 06 : THE ABYSS (subscribe) ============ */
/* email block on the gate, above the downloads */
.gate-mail { margin: 38px auto 30px; max-width: 480px; }
.gate-mail .gm-line {
  font-size: 10px; letter-spacing: 0.2em; color: var(--bone-dim);
  margin-bottom: 14px;
}
.gate-mail .sub-form { margin-top: 0; }
.gate-mail .sub-form input { padding: 9px 12px; font-size: 11px; flex-basis: 210px; max-width: 280px; }
.gate-mail .sub-form button { padding: 9px 16px; font-size: 10px; }
.gate-mail .sub-msg { margin-top: 10px; font-size: 10px; }
.gate-mail .sub-note { font-size: 9.5px; }

.abyss-deep {
  position: relative; overflow: hidden; text-align: center;
  padding: 40px 6vw 40px; background: var(--abyss);
  aspect-ratio: 16 / 9;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.abyss-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; opacity: 0.55;
  filter: saturate(0.85);
}
.abyss-shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, var(--abyss), transparent 16%, transparent 78%, rgba(7, 5, 4, 0.85));
}
#abyss .inner, .abyss-deep .inner { position: relative; z-index: 2; max-width: 680px; margin: 0 auto; width: 100%; }
.sub-form { margin-top: 40px; display: flex; gap: 0; justify-content: center; flex-wrap: wrap; }
.sub-form input {
  flex: 1 1 300px; max-width: 420px;
  background: rgba(7,5,4,0.85); border: 1px solid var(--bone-dim);
  border-right: none;
  color: var(--bone); font-family: var(--mono); font-size: 13px;
  padding: 15px 18px; letter-spacing: 0.08em; outline: none;
}
.sub-form input:focus { border-color: var(--blood); }
.sub-form input::placeholder { color: var(--bone-dim); }
.sub-form button {
  background: var(--blood); color: var(--ink); border: 1px solid var(--blood);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em;
  padding: 15px 26px; cursor: pointer;
}
.sub-form button:hover { background: var(--bone); border-color: var(--bone); }
.sub-msg { margin-top: 16px; font-size: 11px; letter-spacing: 0.18em; color: var(--orb); min-height: 18px; }
.sub-msg a { color: var(--bone); }
.sub-note { margin-top: 6px; font-size: 10.5px; letter-spacing: 0.14em; color: var(--bone-dim); }

.abyss-links {
  display: flex; gap: 30px; justify-content: center; flex-wrap: wrap;
  font-size: 12px; letter-spacing: 0.22em;
}
.abyss-links a { text-decoration: none; border-bottom: 1px solid var(--blood-dim); padding-bottom: 3px; }
.abyss-links a:hover { border-color: var(--blood); }

.gate-tag {
  display: block; width: min(315px, 66%); margin: 0 auto 14px;
  opacity: 0.92; filter: invert(0.88) sepia(0.12);
}
.abyss-sig { margin-top: 46px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.abyss-sig img { width: 178px; opacity: 0.9; filter: invert(0.88) sepia(0.12); }
.abyss-sig .who { font-size: 10.5px; letter-spacing: 0.24em; color: var(--bone-dim); }
.abyss-sig .who a { color: var(--bone); }
.footer-fine {
  position: relative; z-index: 2;
  margin-top: 60px; font-size: 9.5px; letter-spacing: 0.2em; color: rgba(141,131,113,0.55);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .machine-intro { grid-template-columns: 1fr; }
  .gate-keys { display: none; }
  .depth-rail { display: none; }
}
@media (max-width: 560px) {
  .floor { padding-left: 5vw; padding-right: 5vw; }
  .player { grid-template-columns: 56px minmax(0,1fr); }
  .player .ptime { display: none; }
  .player .pbtn { width: 50px; height: 50px; }
  .sub-form input { border-right: 1px solid var(--bone-dim); }
}

@media (prefers-reduced-motion: reduce) {
  .rv { transition: none; opacity: 1; transform: none; }
  .hero-cue, .player.playing .pbtn img { animation: none; }
  .vhs::before, .vhs::after, .hero-video { animation: none; }
  html { scroll-behavior: auto; }
}
