/* ───────────────────────────────────────────────────────────────
   LYSERGIC v2 — mono / technical skin
   field canvas behind everything · panels float above
   ─────────────────────────────────────────────────────────────── */
:root {
  --bg:        oklch(0.13 0.012 240);
  --bg-2:      oklch(0.17 0.012 240);
  --fg:        oklch(0.94 0.012 90);
  --fg-dim:    oklch(0.66 0.010 90);
  --fg-mute:   oklch(0.44 0.008 240);
  --line:      oklch(0.27 0.010 240);
  --accent:    oklch(0.82 0.13 155);
  --accent-d:  oklch(0.55 0.10 155);
  --grain:     0.07;
  --panel:     color-mix(in oklab, var(--bg) 80%, transparent);
  --panel-2:   color-mix(in oklab, var(--bg) 92%, transparent);
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: auto; }
html, body { margin: 0; padding: 0; }
body {
  background: transparent;
  color: var(--fg);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: crosshair;
}
a, button { cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

/* field canvas */
#field {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%; display: block;
  image-rendering: auto;
}

/* grain */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* type helpers */
.sm   { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); }
.xs   { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); }
.dim  { color: var(--fg-dim); }
.mute { color: var(--fg-mute); }
.acc  { color: var(--accent); }

/* corner ticks */
.ticks { position: relative; }
.ticks::before, .ticks::after {
  content: ""; position: absolute; width: 9px; height: 9px;
  border: 1px solid var(--accent); pointer-events: none;
}
.ticks::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.ticks::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ───────────────── entry gate ───────────────── */
#gate {
  position: fixed; inset: 0; z-index: 2000;
  background:
    radial-gradient(130% 90% at 50% 26%, oklch(0.16 0.04 158 / 0.5), transparent 58%),
    oklch(0.09 0.012 240 / 0.975);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: clamp(48px, 10vh, 120px) 24px clamp(40px, 6vh, 80px);
  gap: 22px; text-align: center;
  transition: opacity 0.9s ease;
  overflow-y: auto;
}
/* living backdrop + spotlight + atmosphere */
#gate-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.9; }
#gate-photo {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url("assets/homepage-bg-v3.png") no-repeat 50% 42% / cover;
  opacity: 0.82; mix-blend-mode: screen;
  animation: gatePhotoBreath 7.5s ease-in-out infinite;
}
@keyframes gatePhotoBreath {
  0%, 100% { filter: brightness(0.78) saturate(1); }
  50%      { filter: brightness(1.12) saturate(1.18); }
}
@media (prefers-reduced-motion: reduce) { #gate-photo { animation: none; filter: brightness(0.9); } }
#gate > *:not(#gate-bg):not(#gate-photo):not(#spotlight) { position: relative; z-index: 1; }
#gate::after { /* vignette + base haze */
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(115% 80% at 50% 42%, transparent 56%, oklch(0.05 0.01 240 / 0.7) 100%),
    linear-gradient(0deg, oklch(0.07 0.02 158 / 0.5) 0%, transparent 26%);
}
#spotlight {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 38%),
    color-mix(in oklab, var(--accent) 17%, transparent) 0%, transparent 70%);
}
#gate.out { opacity: 0; pointer-events: none; }
#gate .gate-eyebrow { color: var(--fg-mute); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; }
#gate h1 {
  margin: 0; font-weight: 600; text-transform: uppercase;
  font-size: clamp(44px, 9vw, 132px); line-height: 0.95; letter-spacing: -0.04em;
  text-shadow: 0 0 60px color-mix(in oklab, var(--accent) 24%, transparent);
}
#gate h1 .cursor-blink { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0; } }
/* glitch tagline */
.gate-tag {
  position: relative; display: inline-block; margin-top: 2px;
  font-size: clamp(10px, 1.5vw, 13px); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.gate-tag::before, .gate-tag::after {
  content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none;
}
.gate-tag::before { color: oklch(0.72 0.20 25); text-shadow: -2px 0 oklch(0.72 0.20 25); animation: gtagA 2.6s steps(13) infinite; mix-blend-mode: screen; }
.gate-tag::after { color: oklch(0.78 0.16 200); text-shadow: 2px 0 oklch(0.78 0.16 200); animation: gtagB 2.1s steps(11) infinite reverse; mix-blend-mode: screen; }
@keyframes gtagA { 0%,92%,100% { clip-path: inset(0 0 90% 0); transform: translate(0,0); opacity: 0; } 93% { opacity: 1; clip-path: inset(20% 0 56% 0); transform: translate(-2px,0); } 96% { opacity: 1; clip-path: inset(62% 0 14% 0); transform: translate(2px,0); } }
@keyframes gtagB { 0%,90%,100% { clip-path: inset(70% 0 12% 0); transform: translate(0,0); opacity: 0; } 91% { opacity: 1; clip-path: inset(10% 0 78% 0); transform: translate(2px,0); } 95% { opacity: 1; clip-path: inset(44% 0 30% 0); transform: translate(-2px,0); } }
@media (prefers-reduced-motion: reduce) { .gate-tag::before, .gate-tag::after { display: none; } }
#gate .gate-sub { color: var(--fg-dim); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; max-width: 56ch; line-height: 2; }
#gate .gate-sub em { color: var(--accent); font-style: normal; }
/* glow pooling behind the featured Portfolio door */
.gate-primary { display: flex; justify-content: center; position: relative; }
.gate-primary::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 460px; height: 460px;
  transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 30%, transparent) 0%, transparent 64%);
  filter: blur(8px);
}
/* ── doors ── */
.gate-primary { display: flex; justify-content: center; }
.doors { display: flex; gap: clamp(18px, 4vw, 52px); align-items: stretch; justify-content: center; flex-wrap: wrap; }
.hall-label { display: flex; align-items: center; gap: 16px; color: var(--fg-mute); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; width: min(1060px, 94vw); }
.hall-label::before, .hall-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hall {
  display: grid; gap: clamp(12px, 1.6vw, 22px);
  grid-template-columns: repeat(6, 1fr);
  width: min(1060px, 94vw);
}
.hall .door { width: 100%; height: clamp(132px, 17vw, 168px); padding: 11px; }
.hall .door-text { font-size: 10.5px; letter-spacing: 0.12em; gap: 4px; }
.hall .door-text em { font-size: 8.5px; letter-spacing: 0.1em; }
.hall .leaf::after { inset: 8px; }
.hall .leaf-l::before, .hall .leaf-r::before { height: 22px; }
/* visited marker — a small lit dot top-right of the door frame */
.room.visited .door::after {
  content: ""; position: absolute; top: 9px; right: 9px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--rc, var(--accent)); box-shadow: 0 0 7px var(--rc, var(--accent)); z-index: 4;
}
/* ── room signature colours + breathing ── */
.hall .room { --rc: hsl(var(--h, 150) 72% 60%); }
.hall .room .door::before { border-color: color-mix(in oklab, var(--rc) 20%, var(--line)); }
.hall .room:hover .door::before { border-color: color-mix(in oklab, var(--rc) 65%, var(--line)); box-shadow: 0 0 0 1px color-mix(in oklab, var(--bg) 80%, transparent) inset, 0 0 26px -4px color-mix(in oklab, var(--rc) 55%, transparent), 0 40px 70px -34px #000; }
.hall .room .threshold {
  inset: 11px; opacity: 0.07;
  background: radial-gradient(120% 110% at 50% 60%, color-mix(in oklab, var(--rc) 85%, white 15%) 0%, color-mix(in oklab, var(--rc) 36%, transparent) 48%, transparent 76%);
  animation: roomBreath 6s ease-in-out infinite;
}
.hall .room:hover .threshold { opacity: 0.6; }
.hall .room .leaf-l::before, .hall .room .leaf-r::before { background: var(--rc); box-shadow: 0 0 8px var(--rc); }
.hall .room .door-text em { color: color-mix(in oklab, var(--rc) 78%, var(--fg)); }
@keyframes roomBreath { 0%, 100% { opacity: 0.05; } 50% { opacity: 0.17; } }
.hall .room:nth-child(2n) .threshold { animation-duration: 7.2s; animation-delay: -1.5s; }
.hall .room:nth-child(3n) .threshold { animation-duration: 5.4s; animation-delay: -2.8s; }
.hall .room:nth-child(5n) .threshold { animation-duration: 8s; animation-delay: -0.7s; }
@media (prefers-reduced-motion: reduce) { .hall .room .threshold { animation: none; } }
/* ── door sigils ── */
.sigil { width: 26px; height: 26px; color: var(--rc, var(--accent)); opacity: 0.82; margin-bottom: 2px; filter: drop-shadow(0 0 6px color-mix(in oklab, var(--rc, var(--accent)) 45%, transparent)); transition: opacity .3s ease, transform .5s ease; }
.room:hover .sigil { opacity: 1; transform: scale(1.08); }
#door-portfolio .sigil { width: 30px; height: 30px; }
.core-door .sigil { color: var(--accent); }
.hall-progress { margin-top: 4px; color: var(--fg-mute); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; min-height: 12px; }
/* the Core door — hidden until every room is explored */
.core-door { position: relative; grid-column: 1 / -1; display: flex; justify-content: center; }
.core-door .door { width: clamp(142px, 16vw, 184px); }
.core-door .door::before { border-color: var(--accent-d); box-shadow: 0 0 30px -6px color-mix(in oklab, var(--accent) 50%, transparent), 0 40px 70px -34px #000; }
.core-door .door-text { color: var(--accent); }
.core-door.revealed { animation: coreReveal 1.4s ease both; }
@keyframes coreReveal { 0% { opacity: 0; transform: translateY(18px) scale(.94); } 100% { opacity: 1; transform: none; } }
.doorway { perspective: 1500px; margin: 8px 0 2px; transition: opacity .5s ease; }
.door {
  position: relative; display: block; cursor: pointer; padding: 14px;
  width: clamp(142px, 16vw, 184px); height: clamp(212px, 25vw, 276px);
  background: transparent; border: 0;
  transform-style: preserve-3d;
}
.door::before { /* door frame */
  content: ""; position: absolute; inset: 0; border: 2px solid var(--line);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--bg) 80%, transparent) inset, 0 40px 70px -34px #000;
  pointer-events: none; transition: border-color .3s ease;
}
.door:hover::before { border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); }
.threshold {
  position: absolute; inset: 14px; opacity: 0; transform-origin: 50% 60%;
  background: radial-gradient(120% 110% at 50% 60%,
    color-mix(in oklab, var(--accent) 78%, white 22%) 0%,
    color-mix(in oklab, var(--accent) 36%, transparent) 50%, transparent 78%);
  transition: opacity .5s ease, transform .9s ease;
}
.leaf {
  position: absolute; top: 14px; bottom: 14px; width: calc(50% - 14px);
  background: linear-gradient(180deg, oklch(0.18 0.012 240 / 0.6), oklch(0.13 0.012 240 / 0.62));
  border: 1px solid var(--line);
  transition: transform .8s cubic-bezier(.5,.05,.2,1);
  backface-visibility: hidden; z-index: 2;
}
.leaf::after { content: ""; position: absolute; inset: 13px; border: 1px solid color-mix(in oklab, var(--line) 70%, transparent); }
.leaf-l { left: 14px; transform-origin: left center; }
.leaf-r { right: 14px; transform-origin: right center; }
.leaf-l::before, .leaf-r::before { /* handles at the seam */
  content: ""; position: absolute; top: 50%; width: 4px; height: 36px;
  background: var(--accent); transform: translateY(-50%); box-shadow: 0 0 8px var(--accent);
}
.leaf-l::before { right: 7px; }
.leaf-r::before { left: 7px; }
.door-text {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-transform: uppercase; letter-spacing: 0.24em; font-size: 14px; font-weight: 600; color: var(--fg);
  text-shadow: 0 2px 12px #000; transition: opacity .4s ease;
}
.door-text em { color: var(--accent); font-style: normal; font-weight: 400; font-size: 11px; letter-spacing: 0.18em; }
/* hover: crack the doors and let light leak */
.door:hover .leaf-l { transform: rotateY(-13deg); }
.door:hover .leaf-r { transform: rotateY(13deg); }
.door:hover .threshold { opacity: 0.55; }
.door:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
/* walking through — only the clicked doorway opens & zooms */
.doorway.through .leaf-l { transform: rotateY(-118deg); }
.doorway.through .leaf-r { transform: rotateY(118deg); }
.doorway.through .door-text { opacity: 0; }
.doorway.through .threshold { opacity: 1; transform: scale(1.2); }
.doorway.through { animation: doorThrough 1.5s cubic-bezier(.62,0,.35,1) .42s forwards; }
#gate.going .doorway:not(.through) { opacity: 0; }
#gate.going .gate-eyebrow, #gate.going h1, #gate.going .gate-sub, #gate.going .gate-row, #gate.going .gate-foot {
  opacity: 0; transition: opacity .6s ease .25s;
}
@keyframes doorThrough { to { transform: translateY(-3%) scale(8); } }
@media (max-width: 760px) { .hall { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px) { .hall { grid-template-columns: repeat(2, 1fr); } }
#gate-quiet {
  font: inherit; background: none; border: none; color: var(--fg-mute);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding: 2px 0;
}
#gate-quiet:hover { color: var(--fg); border-color: var(--accent); }
.gate-row { display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap; }
#gate-instrument {
  font: inherit; color: var(--accent); text-decoration: none;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid var(--accent-d); padding: 2px 0;
  transition: color .2s ease, border-color .2s ease;
}
#gate-instrument:hover { color: var(--fg); border-color: var(--accent); }
#gate .gate-foot { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 28px; color: var(--fg-mute); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ───────────────── HUD ───────────────── */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px 24px; pointer-events: none; white-space: nowrap;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 85%, transparent), transparent);
}
.hud-top > * { pointer-events: auto; }
.hud-top .mark { letter-spacing: 0.22em; color: var(--fg); }
.hud-top .mark::before { content: "◐ "; color: var(--accent); }
.hud-top nav { display: flex; gap: 20px; justify-content: center; }
.hud-top nav a { color: var(--fg-dim); text-decoration: none; transition: color .2s ease; }
.hud-top nav a:hover { color: var(--accent); }
.hud-top .right { display: flex; gap: 20px; justify-content: flex-end; color: var(--fg-dim); }
.hud-top .right #to-field { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-d); transition: color .2s ease, border-color .2s ease; padding-bottom: 1px; }
.hud-top .right #to-field:hover { color: var(--fg); border-color: var(--accent); }
@media (max-width: 1280px) { .hud-top .right span:first-child { display: none; } }
.pulse-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent); margin-right: 8px; vertical-align: 1px;
  animation: pulseDot 2.4s ease-out infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hud-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 14px 24px; pointer-events: none; white-space: nowrap;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.hud-bottom > * { pointer-events: auto; }
#hud-zone { color: var(--fg); }
#hud-zone .z-num { color: var(--accent); }
#hud-msg { color: var(--accent); min-height: 1em; text-align: center; animation: none; }
#hud-msg.flicker { animation: msgFlicker 0.5s steps(2) infinite; }
@keyframes msgFlicker { 50% { opacity: 0.25; } }
.hud-right { display: flex; gap: 14px; align-items: center; }
#snd-btn {
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  color: var(--fg); border: 1px solid var(--line); padding: 6px 12px;
  transition: all .2s ease;
}
#snd-btn:hover { border-color: var(--accent); color: var(--accent); }
#snd-btn.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.sig-bars { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.sig-bars span { width: 3px; background: var(--accent); animation: sig 1.3s ease-in-out infinite; }
.sig-bars span:nth-child(1) { height: 40%; animation-delay: 0s; }
.sig-bars span:nth-child(2) { height: 70%; animation-delay: .15s; }
.sig-bars span:nth-child(3) { height: 100%; animation-delay: .3s; }
.sig-bars span:nth-child(4) { height: 55%; animation-delay: .45s; }
@keyframes sig { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
body:not(.entered) .hud-bottom, body:not(.entered) .hud-top { opacity: 0; }
.hud-bottom, .hud-top { transition: opacity 1.2s ease; }

/* apparition */
.apparition {
  position: fixed; z-index: 4; pointer-events: none;
  width: 38vmin; height: 38vmin; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 40%, white 12%) 0%, transparent 62%);
  mix-blend-mode: screen; filter: blur(28px); opacity: 0;
}

/* ───────────────── layout frames ───────────────── */
section.frame, footer.frame { padding: 130px 28px; position: relative; max-width: 1560px; margin: 0 auto; }
.zone-head {
  display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: end;
  border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 56px;
}
.zone-head .zlabel { color: var(--fg-mute); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.zone-head .zlabel b { color: var(--accent); font-weight: 500; }
.zone-head h2 {
  margin: 0; font-weight: 600; text-transform: uppercase;
  font-size: clamp(26px, 4vw, 60px); line-height: 1.04; letter-spacing: -0.03em;
}
.zone-head h2 .dim { font-weight: 300; }
.zone-head .meta { grid-column: 2; color: var(--fg-dim); max-width: 62ch; font-size: 12.5px; margin-top: 14px; }
.zone-head .meta em { color: var(--accent); font-style: normal; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
}

/* ───────────────── hero ───────────────── */
.hero {
  min-height: 100vh; padding: 130px 28px 60px;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; max-width: 1560px; margin: 0 auto;
}
.hero-scan {
  position: absolute; top: 16vh; right: 28px;
  width: min(34vw, 460px);
  padding: 10px; background: var(--panel-2); border: 1px solid var(--line);
}
.hero-scan img { width: 100%; display: block; filter: contrast(1.06) saturate(0.85); }
.hero-scan figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 9px; color: var(--fg-mute); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.hero h1 {
  margin: 0 0 5vh; font-weight: 600; text-transform: uppercase;
  font-size: clamp(36px, 6.6vw, 110px); line-height: 0.98; letter-spacing: -0.04em;
  max-width: 14ch; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-foot {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 32px; align-items: end;
  border-top: 1px solid var(--line); padding-top: 22px;
  font-size: 11.5px; letter-spacing: 0.05em;
}
.hero-foot .lede { max-width: 38ch; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.9; margin: 0; }
.hero-foot .lede em { color: var(--accent); font-style: normal; }
.hero-foot .col span { display: block; color: var(--fg-mute); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10.5px; line-height: 2; }
.hero-foot .col span b { color: var(--fg-dim); font-weight: 400; }
.hero-foot .scroll { writing-mode: vertical-rl; transform: rotate(180deg); color: var(--fg-mute); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; }
.hero-foot .scroll::after {
  content: ""; display: block; width: 1px; height: 52px; background: var(--accent); margin: 12px auto 0;
  animation: scrollTick 2.4s ease-in-out infinite;
}
@keyframes scrollTick {
  0%, 100% { transform: scaleY(0.3); transform-origin: top; opacity: .35; }
  50%      { transform: scaleY(1);   transform-origin: top; opacity: 1; }
}

/* ───────────────── broadcast marquee ───────────────── */
.broadcast {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; background: var(--panel-2);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.broadcast .track { display: flex; gap: 60px; white-space: nowrap; animation: marquee 60s linear infinite; padding: 13px 0; }
.broadcast .item { display: inline-flex; align-items: center; gap: 16px; color: var(--fg-dim); }
.broadcast .item .dot { width: 5px; height: 5px; background: var(--accent); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ───────────────── featured — Sól ───────────────── */
.feat-video-wrap { position: relative; width: 50%; margin: 0 auto; }
.feat-video-wrap video { width: 100%; height: auto; display: block; }
.feat-video-wrap .vload { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--fg-mute); background: var(--panel-2); }
.feat-video-wrap .sound-toggle { position: absolute; bottom: 14px; right: 14px; font: 500 10px 'JetBrains Mono',monospace; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-mute); background: rgba(8,12,14,0.7); border: 1px solid var(--line); padding: 6px 11px; cursor: pointer; backdrop-filter: blur(4px); transition: color .2s, border-color .2s; }
.feat-video-wrap .sound-toggle:hover, .feat-video-wrap .sound-toggle.on { color: var(--accent); border-color: rgba(69,212,32,0.5); }
@media (max-width: 700px) { .feat-video-wrap video { height: 56vh; min-height: 300px; } }
.feat-photo { margin: 0; position: relative; overflow: hidden; padding: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.feat-photo img { width: 100%; height: 74vh; min-height: 480px; object-fit: cover; display: block; filter: contrast(1.05) saturate(0.9); }
.feat-photo figcaption { display: flex; gap: 24px; justify-content: space-between; padding: 10px 2px 0; color: var(--fg-mute); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.feat-grid { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 28px; align-items: stretch; }
.feat-side, .feat-meta { display: flex; flex-direction: column; gap: 20px; padding: 22px; }
.feat-side .head, .feat-meta .head { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.states { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.states li { display: grid; grid-template-columns: 20px 1fr; gap: 14px; align-items: flex-start; }
.states b { text-transform: uppercase; font-weight: 600; font-size: 14px; letter-spacing: 0.04em; color: var(--fg); display: block; margin-bottom: 4px; }
.states span { color: var(--fg-dim); font-size: 12px; line-height: 1.65; display: block; }
.st-mark { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; box-shadow: 0 0 0 1px var(--line); }
.st-mark[data-state="dormant"]  { background: oklch(0.45 0.16 25);  animation: breathe 6s ease-in-out infinite; }
.st-mark[data-state="stirring"] { background: oklch(0.65 0.16 60);  animation: breathe 3s ease-in-out infinite; }
.st-mark[data-state="awake"]    { background: oklch(0.92 0.08 90);  box-shadow: 0 0 14px oklch(0.92 0.08 90 / .8); }
.st-mark[data-state="fading"]   { background: oklch(0.35 0.10 25); opacity: 0.6; }
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.feat-etch { margin: 0; padding: 10px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.feat-etch img { width: 100%; flex: 1; min-height: 300px; object-fit: cover; filter: sepia(0.15) contrast(1.05); }
.feat-etch figcaption { display: flex; gap: 16px; justify-content: space-between; padding-top: 9px; color: var(--fg-mute); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.feat-meta { justify-content: center; align-items: stretch; gap: 24px; overflow: hidden; }

/* ── glitch doctrine quote ── */
.glitch-quote {
  margin: 0; padding: 6px 0;
  display: flex; flex-direction: column; gap: 6px;
}
.glitch-quote .g-line {
  position: relative; display: block;
  font-weight: 600; text-transform: uppercase;
  font-size: clamp(15px, 1.5vw, 21px); line-height: 1.18; letter-spacing: 0.01em;
  color: var(--accent);
  text-shadow: 0 0 7px color-mix(in oklab, var(--accent) 55%, transparent);
  animation: gFlash 4.2s steps(1) infinite;
}
.glitch-quote .g-line:nth-child(2) { animation-delay: .9s; }
.glitch-quote .g-line:nth-child(3) { animation-delay: 1.8s; }
.glitch-quote .g-line:nth-child(4) { animation-delay: 2.7s; }
.glitch-quote .g-line::before,
.glitch-quote .g-line::after {
  content: attr(data-text); position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; overflow: hidden;
  clip-path: inset(0 0 0 0);
}
.glitch-quote .g-line::before {
  color: oklch(0.72 0.20 25); /* red channel */
  text-shadow: -2px 0 oklch(0.72 0.20 25);
  animation: gShiftA 2.2s steps(14) infinite;
  mix-blend-mode: screen;
}
.glitch-quote .g-line::after {
  color: oklch(0.78 0.16 200); /* cyan channel */
  text-shadow: 2px 0 oklch(0.78 0.16 200);
  animation: gShiftB 1.7s steps(11) infinite reverse;
  mix-blend-mode: screen;
}
.glitch-quote .g-line:nth-child(2)::before { animation-duration: 1.9s; }
.glitch-quote .g-line:nth-child(3)::after  { animation-duration: 2.4s; }
.glitch-quote .g-line:nth-child(4)::before { animation-duration: 2.6s; }

@keyframes gFlash {
  0%, 92%, 100% { opacity: 1; transform: translate(0,0); }
  93%   { opacity: .4; transform: translate(-2px, 1px) skewX(-6deg); }
  94%   { opacity: 1; transform: translate(3px, -1px); }
  95%   { opacity: .65; transform: translate(-1px, 0) skewX(4deg); }
  96%   { opacity: 1; transform: translate(0,0); }
}
@keyframes gShiftA {
  0%   { clip-path: inset(0 0 86% 0); transform: translate(-3px, -1px); }
  10%  { clip-path: inset(74% 0 8% 0);  transform: translate(3px, 1px); }
  20%  { clip-path: inset(20% 0 56% 0); transform: translate(-2px, 0); }
  30%  { clip-path: inset(92% 0 0 0);   transform: translate(4px, -1px); }
  40%  { clip-path: inset(40% 0 38% 0); transform: translate(-4px, 1px); }
  50%  { clip-path: inset(6% 0 80% 0);  transform: translate(2px, 0); }
  60%  { clip-path: inset(60% 0 22% 0); transform: translate(-3px, 1px); }
  70%  { clip-path: inset(12% 0 70% 0); transform: translate(3px, -1px); }
  80%  { clip-path: inset(82% 0 4% 0);  transform: translate(-2px, 0); }
  90%  { clip-path: inset(34% 0 46% 0); transform: translate(4px, 1px); }
  100% { clip-path: inset(0 0 86% 0);   transform: translate(-3px, -1px); }
}
@keyframes gShiftB {
  0%   { clip-path: inset(70% 0 12% 0); transform: translate(3px, 1px); }
  12%  { clip-path: inset(10% 0 78% 0); transform: translate(-3px, -1px); }
  24%  { clip-path: inset(48% 0 28% 0); transform: translate(2px, 0); }
  36%  { clip-path: inset(86% 0 2% 0);  transform: translate(-4px, 1px); }
  48%  { clip-path: inset(24% 0 60% 0); transform: translate(3px, -1px); }
  60%  { clip-path: inset(58% 0 18% 0); transform: translate(-2px, 1px); }
  72%  { clip-path: inset(4% 0 84% 0);  transform: translate(4px, 0); }
  84%  { clip-path: inset(38% 0 44% 0); transform: translate(-3px, -1px); }
  100% { clip-path: inset(70% 0 12% 0); transform: translate(3px, 1px); }
}
@media (prefers-reduced-motion: reduce) {
  .glitch-quote .g-line, .glitch-quote .g-line::before, .glitch-quote .g-line::after { animation: none; }
  .glitch-quote .g-line::before, .glitch-quote .g-line::after { display: none; }
}

/* ───────────────── index of works ───────────────── */
.index .rows { border-top: 1px solid var(--line); }
.work {
  position: relative;
  display: grid; grid-template-columns: 64px 1fr 1fr 170px 90px; gap: 28px;
  align-items: center;
  padding: 24px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  transition: opacity .3s ease, background .2s ease, color .2s ease, padding .3s ease;
  cursor: crosshair;
}
.index:hover .work:not(:hover) { opacity: 0.3; }
.work:hover { background: var(--accent); color: var(--bg); padding-left: 26px; }
.work .n { font-size: 11px; color: var(--fg-mute); letter-spacing: 0.1em; }
.work .title { text-transform: uppercase; font-weight: 600; font-size: clamp(18px, 2.4vw, 34px); line-height: 1.05; letter-spacing: -0.02em; }
.work .desc { color: var(--fg-dim); font-size: 11.5px; line-height: 1.6; max-width: 44ch; }
.work .venue { color: var(--fg-dim); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.work .year { font-size: 12px; letter-spacing: 0.06em; text-align: right; }
.work:hover .n, .work:hover .desc, .work:hover .venue, .work:hover .year { color: var(--bg); }
.work .arrow { position: absolute; right: 24px; top: 50%; transform: translateY(-50%) translateX(-12px); opacity: 0; transition: all .3s ease; font-size: 18px; }
.work:hover .arrow { opacity: 1; transform: translateY(-50%) translateX(0); }

.preview {
  overflow: hidden; height: 0;
  transition: height .55s cubic-bezier(.6,.05,.1,1);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.preview.open { height: 440px; }
.preview .inner { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 24px; padding: 24px; height: 100%; }
.preview image-slot { width: 100%; height: 100%; }
.preview .work-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; filter: contrast(1.05) saturate(0.95); }
.preview .work-videos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; height: 100%; }
.preview .video-wrap { position: relative; width: 100%; height: 100%; }
.preview .video-wrap .work-video { width: 100%; height: 100%; }
.preview .vload {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
  background: #000; color: var(--fg-mute); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  transition: opacity .5s ease;
}
.preview .vload::before {
  content: ""; position: absolute; width: 26px; height: 26px; margin-top: -34px; border-radius: 50%;
  border: 1px solid var(--line); border-top-color: var(--accent); animation: vspin 0.9s linear infinite;
}
.preview .video-wrap.loaded .vload { opacity: 0; pointer-events: none; }
@keyframes vspin { to { transform: rotate(360deg); } }
.preview .sound-toggle {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  font-family: inherit; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg); background: color-mix(in oklab, var(--bg) 85%, transparent); border: 1px solid var(--line);
  padding: 6px 10px; transition: all .2s ease;
}
.preview .sound-toggle:hover { color: var(--accent); border-color: var(--accent); }
.preview .sound-toggle.on { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.preview .work-image { width: 100%; height: 100%; object-fit: cover; display: block; filter: contrast(1.05) saturate(0.95); }
.preview .work-image.contain { object-fit: contain; background: var(--panel-2); padding: 20px; filter: none; }
.preview .meta-col { display: flex; flex-direction: column; justify-content: space-between; }
.preview .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.preview .tag { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--line); color: var(--fg-dim); }
.preview .pdesc { margin: 18px 0 0; color: var(--fg); font-size: 13px; line-height: 1.75; }
.preview .credits { font-size: 11px; line-height: 1.9; color: var(--fg-dim); }
.preview .credits b { color: var(--fg); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.preview .spectrum { display: flex; gap: 2px; align-items: flex-end; height: 52px; }
.preview .spectrum span { display: block; width: 4px; background: var(--accent); animation: bar 1.4s ease-in-out infinite; }
@keyframes bar { 0%, 100% { height: 8%; } 50% { height: 100%; } }

/* ───────────────── practice ───────────────── */
.practice .grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; }
.practice .pull {
  padding: 24px; align-self: start;
  text-transform: uppercase; font-weight: 600;
  font-size: clamp(18px, 2.2vw, 30px); line-height: 1.25; letter-spacing: -0.01em;
}
.practice .pull em { font-style: normal; color: var(--accent); }
.practice .body { max-width: 66ch; font-size: 13.5px; line-height: 1.85; color: var(--fg); padding: 24px; }
.practice .body p { margin: 0 0 1.3em; }
.practice .body em { font-style: normal; color: var(--accent); }
.practice .portrait { float: right; margin: 0 0 20px 28px; width: 230px; }
.practice .portrait img { width: 100%; height: auto; display: block; filter: grayscale(0.15) contrast(1.05); border: 1px solid var(--line); }
.practice .portrait figcaption { color: var(--fg-mute); margin-top: 8px; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.practice .notes { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 1px solid var(--line); padding-top: 22px; }
.practice .note .num { font-size: 10px; color: var(--accent); letter-spacing: 0.12em; }
.practice .note p { font-size: 11.5px; color: var(--fg-dim); margin: 6px 0 0; line-height: 1.65; }

/* ───────────────── sounds ───────────────── */
.listen { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.listen-head { display: flex; gap: 24px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.listen-title { text-transform: uppercase; font-weight: 600; font-size: clamp(22px, 3vw, 42px); line-height: 1; margin: 8px 0 2px; letter-spacing: -0.02em; }
.eq { display: flex; gap: 4px; align-items: flex-end; height: 40px; }
.eq span { display: block; width: 4px; background: var(--accent); animation: bar 1.4s ease-in-out infinite; }
.eq span:nth-child(2n)  { animation-delay: 0.12s; }
.eq span:nth-child(3n)  { animation-delay: 0.22s; }
.eq span:nth-child(4n)  { animation-delay: 0.34s; }
.eq span:nth-child(5n)  { animation-delay: 0.45s; }
.sc-wrap { border-top: 1px solid var(--line); padding: 8px 0 0; }
.sc-wrap iframe { display: block; background: transparent; }

.veldwerk { margin-top: 48px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
.vw-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); overflow: hidden; background: #000; }
.vw-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.vw-text { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.vw-title { text-transform: uppercase; font-weight: 600; font-size: clamp(20px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -0.02em; margin: 4px 0; }
.vw-title em { font-style: normal; color: var(--accent); }
.vw-text p { margin: 0; color: var(--fg); font-size: 12.5px; line-height: 1.8; max-width: 44ch; }
.vw-text p em { font-style: normal; color: var(--accent); }
.vw-photo { margin: 12px 0 0; position: relative; overflow: hidden; border: 1px solid var(--line); }
.vw-photo img { display: block; width: 100%; height: 100%; max-height: 300px; object-fit: cover; filter: contrast(1.05) saturate(0.92); }
.vw-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; display: flex; gap: 16px; justify-content: space-between; background: linear-gradient(0deg, color-mix(in oklab, var(--bg) 88%, transparent), transparent); color: var(--fg-dim); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ───────────────── signal patchbay ───────────────── */
.signal .bay { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.signal .cell {
  background: var(--panel);
  padding: 20px 16px 16px; min-height: 150px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background .2s ease; position: relative;
}
.signal .cell:hover { background: color-mix(in oklab, var(--bg-2) 92%, transparent); }
.signal .cell .jack { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--fg-mute); position: relative; }
.signal .cell .jack::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--fg-mute); transition: background .2s ease, box-shadow .2s ease; }
.signal .cell:hover .jack::after { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.signal .cell .label { text-transform: uppercase; font-weight: 600; font-size: 14px; line-height: 1.3; margin-top: 20px; letter-spacing: 0.02em; }
.signal .cell .kind { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); }

/* ───────────────── booking footer ───────────────── */
footer.frame { padding-bottom: 90px; }
.book-lockup { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: end; border-top: 1px solid var(--line); padding-top: 48px; }
.book-lockup h2 {
  text-transform: uppercase; font-weight: 600;
  font-size: clamp(38px, 7.4vw, 128px); line-height: 0.95; margin: 0; letter-spacing: -0.04em;
}
.book-lockup h2 em { font-style: normal; color: var(--accent); }
.contact { color: var(--fg-dim); font-size: 12px; }
.contact a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s ease, color .2s ease; }
.contact a:hover { border-color: var(--accent); color: var(--accent); }
.contact .row { display: flex; gap: 16px; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); }
.contact .row:first-child { border-top: 1px solid var(--line); }
.contact .row .k { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-mute); }
.colofon {
  margin-top: 70px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--fg-mute); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
}

/* reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .broadcast .track { animation: none; }
}

/* point-cloud photo treatment */
.pc-wrap { position: relative; display: block; overflow: hidden; }
.pc-wrap img { display: block; }
.pc-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: oklch(0.14 0.012 240);
  opacity: 1; transition: opacity 0.7s ease;
  pointer-events: none;
}
.pc-wrap.pc-revealed .pc-canvas, .pc-wrap.pc-off .pc-canvas { opacity: 0; }
.pc-wrap::after {
  content: "hold to resolve"; position: absolute; right: 8px; top: 8px;
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-mute); background: color-mix(in oklab, var(--bg) 75%, transparent);
  padding: 3px 8px; pointer-events: none;
  opacity: 1; transition: opacity 0.4s ease;
}
.pc-wrap.pc-revealed::after, .pc-wrap.pc-off::after { opacity: 0; }

/* image-slot dark styling */
image-slot { --slot-bg: oklch(0.18 0.012 240); --slot-border: var(--line); --slot-fg: var(--fg-mute); }

/* ───────────────── mobile bottom nav ───────────────── */
#mob-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: rgba(7,11,15,0.92); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
}
#mob-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--fg-mute); text-decoration: none;
  font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: color .2s;
}
#mob-nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; }
#mob-nav a.active, #mob-nav a:hover { color: var(--accent); }
@media (max-width: 920px) { #mob-nav { display: grid; } }

.work-meta-row {
  display: flex; flex-wrap: wrap; gap: 10px 32px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-mute); margin-top: 6px;
}
.work-meta-row b { color: var(--fg-dim); margin-right: 6px; }

/* ───────────────── small screens ───────────────── */
@media (max-width: 920px) {
  .hud-top nav { display: none; }
  body { padding-bottom: 64px; }
  .hud-top .right span:nth-child(2) { display: none; }
  .hero-scan { position: static; width: 100%; margin-bottom: 32px; }
  .hero { justify-content: flex-start; padding-top: 90px; }
  .hero-foot { grid-template-columns: 1fr; gap: 18px; }
  .hero-foot .scroll { display: none; }
  .zone-head { grid-template-columns: 1fr; gap: 12px; }
  .zone-head .meta { grid-column: 1; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-photo img { height: 56vh; min-height: 340px; }
  .work { grid-template-columns: 44px 1fr 70px; gap: 14px; padding: 20px 10px; }
  .work .desc, .work .venue { display: none; }
  .preview .inner { grid-template-columns: 1fr; gap: 16px; }
  .preview.open { height: auto; }
  .practice .grid { grid-template-columns: 1fr; gap: 24px; }
  .practice .portrait { float: none; width: 64%; margin: 0 0 20px; }
  .practice .notes { grid-template-columns: 1fr; }
  .veldwerk { grid-template-columns: 1fr; }
  .signal .bay { grid-template-columns: repeat(2, 1fr); }
  .book-lockup { grid-template-columns: 1fr; gap: 28px; }
}
