/* ============================================================
   NECROMANICIDE — raw thrash aesthetic
   Tokens:
     --void      #050505  base ground, true black-ish
     --panel     #0d0d0d  alt section ground
     --blood     #c0141c  primary accent, blood red
     --blood-dk  #6e0d12  deep blood, shadows
     --bone      #eae6dd  primary text
     --bone-dim  #8f897c  secondary text
     --sick      #7a8f3c  sickly verdigris, status only
   ============================================================ */

/* fonts are loaded via a preconnected <link> in index.html's head, not
   @import here — @import is discovered late (after this file itself loads)
   and blocks rendering behind it */

:root {
  --void: #050505;
  --panel: #0c0c0c;
  --blood: #c0141c;
  --blood-bright: #e8262f;
  --blood-dk: #4a0d10;
  --bone: #eae6dd;
  --bone-dim: #8f897c;
  --sick: #7a8f3c;
  --hairline: rgba(234, 230, 221, 0.1);
}

* { box-sizing: border-box; }

/* native wheel/scrollbar/keyboard scrolling stays instant on purpose: CSS
   scroll-behavior:smooth would re-animate every one of those inputs, and rapid
   repeated scrolling restarts that easing mid-flight, staggering the actual
   scroll position (and anything tied to it, like the section-photo zoom).
   nav-link jumps get their own smooth scroll in script.js instead. */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: 'Oswald', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* fixed full-page WebGL scene — sits behind everything, camera keyed to [data-cam] chapters */
#webgl-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}

/* real photographic backdrop, behind the WebGL canvas — gives the hero actual depth, not just geometry */
.bg-photo-hero {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(74,13,16,0.3), var(--void) 96%),
    url('assets/cemetery_fog.jpg');
  background-size: cover;
  background-position: center 35%;
  filter: grayscale(35%) contrast(1.2) saturate(1.4) brightness(0.95) sepia(15%);
}

/* per-section photographic layer: sits behind copy, above the section's own scrim,
   desaturated + darkened so it reads as atmosphere rather than a stock photo */
.section-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(40%) contrast(1.15) saturate(1.3) brightness(0.8) sepia(10%);
  opacity: 0.85;
  /* fades out behind the heading (top) and toward the next section (bottom),
     staying fully visible only in the middle band where there's no text to fight */
  mask-image: linear-gradient(180deg, transparent, black 22%, black 62%, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 22%, black 62%, transparent 92%);
}

/* decorative SVG silhouette layers, parallax-driven by script.js, sit above the canvas but behind copy */
.parallax-layer {
  position: absolute;
  z-index: 0;
  color: var(--blood-dk);
  opacity: 0.16;
  pointer-events: none;
  will-change: transform;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ---------- fixed overlays: scanlines + grain ---------- */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 600;
  background: repeating-linear-gradient(
    180deg,
    rgba(0,0,0,0.18) 0px,
    rgba(0,0,0,0.18) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.35;
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 601;
  opacity: 0.035;
  mix-blend-mode: overlay;
}

/* ---------- focus ---------- */
:focus-visible { outline: 2px solid var(--blood-bright); outline-offset: 3px; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--hairline);
}
.site-nav .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav-mark {
  font-family: 'Anton', sans-serif;
  font-size: 20px;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--bone);
}
.nav-links {
  display: none;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (min-width: 640px) { .nav-links { display: flex; } }
.nav-links a { text-decoration: none; color: var(--bone-dim); border-bottom: 1px solid transparent; padding-bottom: 3px; transition: color 0.2s, border-color 0.2s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--blood-bright); border-color: var(--blood-bright); }

/* ---------- mobile nav toggle ---------- */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--bone);
  transition: transform 0.25s ease, opacity 0.2s ease, width 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 100%; }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 100%; }
@media (min-width: 640px) { .nav-toggle { display: none; } }

@media (max-width: 639px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(5, 5, 5, 0.97);
    border-bottom: 1px solid var(--hairline);
    backdrop-filter: blur(4px);
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { border-top: 1px solid var(--hairline); }
  .nav-links a { display: block; padding: 16px clamp(16px, 4vw, 32px); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid var(--hairline);
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 75% at 50% 45%, transparent 45%, rgba(5,5,5,0.6) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 140px 0 100px;
}
@media (max-width: 640px) {
  /* full 100vh plus generous top/bottom padding stacks into an oversized
     first screen on phones — cut both back so Origin isn't a full swipe away */
  .hero { min-height: 88vh; }
  .hero-content { padding: 90px 0 60px; }
}
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin: 0 0 22px;
}

/* glitch title: layered chromatic-aberration text */
.glitch-title {
  position: relative;
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: clamp(46px, 11vw, 130px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  margin: 0 0 26px;
  color: var(--bone);
  text-shadow: 0 6px 0 rgba(0,0,0,0.6);
}
.glitch-title span {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.glitch-title span:nth-of-type(1) {
  color: var(--blood-bright);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  opacity: 0;
  animation: glitch-a 5.2s infinite steps(1);
}
.glitch-title span:nth-of-type(2) {
  color: #2fb5b0;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  opacity: 0;
  animation: glitch-b 4.6s infinite steps(1);
}
@keyframes glitch-a {
  0%, 89%, 100% { transform: translate(0, 0); opacity: 0; }
  90% { transform: translate(6px, -4px); opacity: 0.8; }
  91% { transform: translate(-8px, 3px); opacity: 0; }
  92% { transform: translate(4px, -2px); opacity: 0.8; }
  93% { transform: translate(0, 0); opacity: 0; }
}
@keyframes glitch-b {
  0%, 91%, 100% { transform: translate(0, 0); opacity: 0; }
  92% { transform: translate(-6px, 4px); opacity: 0.8; }
  93% { transform: translate(8px, -3px); opacity: 0; }
  94% { transform: translate(-4px, 2px); opacity: 0.8; }
  95% { transform: translate(0, 0); opacity: 0; }
}

.hero-sub {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--bone-dim);
  max-width: 52ch;
  margin: 0 auto 34px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.btn {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  background: var(--blood);
  color: var(--void);
  display: inline-block;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 96% 100%, 0 100%);
  transition: transform 0.15s, background 0.2s;
  border: none;
}
.btn:hover, .btn:focus-visible { background: var(--blood-bright); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--bone-dim);
  /* the notched clip-path clips the rendered border away along that diagonal
     edge without drawing a new stroke there, so a bordered button ends up
     with a broken-looking corner — the filled primary .btn doesn't have this
     problem since there's no border to interrupt. plain rectangle instead. */
  clip-path: none;
}
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--bone); background: rgba(234,230,221,0.06); }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--bone-dim);
  z-index: 2;
  animation: cue-bob 2.2s ease-in-out infinite;
}
@keyframes cue-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- section boundaries ---------- */
.torn-edge { height: 1px; width: 100%; background: var(--hairline); }

/* ---------- section shell ---------- */
/* backgrounds are translucent scrims, not solid fills — the fixed WebGL scene
   stays faintly visible behind copy, matching the reference site's layered
   panels-over-open-3D-space approach, while staying dark enough for contrast */
section { position: relative; z-index: 1; padding: 0 0 96px; background: rgba(5, 5, 5, 0.93); overflow: hidden; }
.section-alt { background: rgba(12, 12, 12, 0.93); }
section > .wrap { position: relative; z-index: 1; }
.section-head { padding-top: 64px; margin-bottom: 44px; }

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--blood);
  padding: 4px 10px;
  display: inline-block;
  margin-bottom: 18px;
}

.section-title {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(32px, 5vw, 52px);
  margin: 0 0 12px;
  line-height: 0.98;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.section-desc { color: var(--bone-dim); max-width: 62ch; text-shadow: 0 1px 6px rgba(0,0,0,0.8); }

/* ---------- bio ---------- */
.bio-layout { display: grid; gap: 48px; }
@media (min-width: 860px) { .bio-layout { grid-template-columns: 1fr 1fr; } }
.bio-copy p { margin: 0 0 18px; color: var(--bone-dim); }
.bio-copy strong { color: var(--bone); font-weight: 600; }
.edit-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--bone-dim);
  border-left: 2px solid var(--blood-dk);
  padding-left: 12px;
}

/* ---------- name meaning ---------- */
.bio-copy p.name-statement {
  margin: 0;
  color: var(--blood-bright);
  font-style: italic;
  font-weight: 500;
}

.vitals { border: 1px solid var(--hairline); background: rgba(234,230,221,0.02); align-self: start; }
.vitals-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
}
.vitals-row:last-child { border-bottom: none; }
.vitals-row .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blood-bright);
}
.vitals-row .v { color: var(--bone); }
.pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sick);
  box-shadow: 0 0 0 0 rgba(122,143,60,0.7);
  animation: pulse 1.8s infinite;
  margin-right: 6px;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(122,143,60,0.6); }
  70% { box-shadow: 0 0 0 7px rgba(122,143,60,0); }
  100% { box-shadow: 0 0 0 0 rgba(122,143,60,0); }
}

/* ---------- discography: slideshow ---------- */
#discography .section-head { text-align: center; }
#discography .section-desc { margin-left: auto; margin-right: auto; }

.slideshow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 44px;
  padding: 0 clamp(12px, 3vw, 32px);
  --slide-w: min(560px, 76vw);
}
.slide-track {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 28px;
  overflow-x: auto;
  /* scroll-snap-type alone settles cleanly; pairing it with scroll-behavior:smooth
     makes the browser's smooth-scroll easing and the snap-back correction fight
     each other right at the stop, which is what reads as a jerk landing on a slide */
  scroll-snap-type: x mandatory;
  padding: 4px calc(50% - min(560px, 76vw) / 2) 8px;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}
.slide-track::-webkit-scrollbar { display: none; }
.slide-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.slide-track.is-animating { scroll-snap-type: none; }
.slide-track.is-jumping .slide { transition: none; }

.slide {
  flex: 0 0 auto;
  width: min(560px, 76vw);
  scroll-snap-align: center;
  opacity: 0.4;
  transform: scale(0.92);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.slide.is-active { opacity: 1; transform: scale(1); }
.slide-image {
  aspect-ratio: 1;
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
  pointer-events: none;
}
.slide.is-active:hover .slide-image img { transform: scale(1.06); }

.slide-caption { padding-top: 18px; text-align: center; }
.slide-index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--blood-bright);
}
.slide-caption h3 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(20px, 2.6vw, 28px);
  margin: 6px 0 4px;
  line-height: 1.15;
}
.slide-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--bone-dim);
}

.slide-nav {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--bone);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  /* align to the vertical center of the (square) cover image, not the
     whole slide — align-items:center on .slideshow would center against
     the caption text below the image too, sinking the buttons on mobile
     where the caption's fixed height is a bigger share of the slide */
  margin-top: calc(var(--slide-w) / 2 - 22px);
}
.slide-nav:hover, .slide-nav:focus-visible { border-color: var(--blood-bright); color: var(--blood-bright); }
/* shrunk rather than hidden below 640px: arrows were removed entirely on
   mobile with nothing telling users they could swipe instead — the dots +
   hint text below cover discoverability, but keep a tappable nav too */
@media (max-width: 640px) {
  .slide-nav { width: 34px; height: 34px; font-size: 18px; margin-top: calc(var(--slide-w) / 2 - 17px); }
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.slide-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  /* solid fill, not just an outline: a hairline border alone is fragile —
     depends on the browser rendering thin strokes cleanly at small sizes.
     a filled circle can't fail to show up regardless of device/renderer. */
  border: 1.5px solid var(--bone);
  background: var(--bone-dim);
  opacity: 0.85;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, opacity 0.2s;
}
.slide-dot:hover, .slide-dot:focus-visible { border-color: var(--blood-bright); opacity: 1; }
.slide-dot.is-active { background: var(--blood-bright); border-color: var(--blood-bright); opacity: 1; transform: scale(1.3); }

.slide-swipe-hint {
  display: none;
  text-align: center;
  margin: 14px 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
@media (max-width: 640px) { .slide-swipe-hint { display: block; } }

.album-panel {
  display: grid;
  gap: 40px;
  border: 1px solid var(--hairline);
  padding: clamp(24px, 4vw, 44px);
}
@media (min-width: 860px) { .album-panel { grid-template-columns: 280px 1fr; } }

.cover-art {
  aspect-ratio: 1;
  border: 1px solid var(--blood-dk);
  overflow: hidden;
}
.cover-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.album-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--bone-dim);
  margin-bottom: 22px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.album-meta-row strong { color: var(--blood-bright); }

.tracklist { list-style: none; margin: 0 0 28px; padding: 0; }
.tracklist li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: center;
  transition: background 0.2s;
}
.tracklist li:last-child { border-bottom: none; }
.tracklist li.is-active { background: rgba(232,38,47,0.06); }
.tracklist .num {
  display: inline-block;
  width: 26px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--bone-dim);
  font-size: 13px;
}
.tracklist .time { font-family: 'JetBrains Mono', monospace; color: var(--bone-dim); font-size: 13px; }

.play-btn {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 0;
  background: rgba(232,38,47,0.1);
  border: 1px solid var(--blood-dk);
  border-radius: 50%;
  color: var(--blood-bright);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.play-btn:hover, .play-btn:focus-visible { border-color: var(--blood-bright); background: rgba(232,38,47,0.25); transform: scale(1.08); }
.play-btn.is-playing { background: var(--blood-bright); border-color: var(--blood-bright); color: var(--void); }
.play-btn .icon::before { content: "▶"; }
.play-btn.is-playing .icon::before { content: "❚❚"; }

.now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px dashed var(--hairline);
  padding: 14px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--bone-dim);
}
.now-playing.has-error { border-color: var(--blood-dk); color: var(--blood-bright); }
.np-title { flex: 0 0 auto; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-progress { flex: 1; height: 3px; background: var(--hairline); position: relative; cursor: pointer; }
.np-progress-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--blood-bright); }
.np-time { flex: 0 0 auto; }

.press-quote {
  border-left: 2px solid var(--blood);
  padding: 4px 0 4px 24px;
  margin: 36px 0 0;
  color: var(--bone);
  font-size: 19px;
  font-style: italic;
}
.press-quote cite {
  display: block;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-size: 12px;
  color: var(--bone-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ---------- full-width band photo (between hero and origin) ---------- */
.band-photo {
  position: relative;
  /* floor lowered from 320px: at narrow phone widths a 320px-tall band forces
     the contain-fit photo (1246:864) wider than the viewport itself, cropping
     its sides again — 200px keeps the photo's rendered width under ~289px,
     safely inside even a 320px-wide screen */
  height: clamp(200px, 44vw, 600px);
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
  background: var(--void);
}
@media (max-width: 640px) {
  /* the 200px floor above leaves a lot of unused side margin on phones (photo
     renders well under the ~69vw width that would start cropping) — 65vw uses
     that room to render meaningfully bigger while keeping a safe buffer below
     the crop threshold at every width down to a 320px screen */
  .band-photo { height: 65vw; }
}
.band-photo-mark {
  /* near-invisible watermark sitting in the black margin either side of the
     (narrower, contain-fit) photo — echoes the hero's glitch-title treatment
     instead of introducing a new texture, and reads as intentional composition
     rather than dead space. sized to fit the margin itself, not the whole
     section, since a centered mark would just be hidden under the photo. */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  font-family: 'Anton', sans-serif;
  font-size: clamp(28px, 4.5vw, 90px);
  letter-spacing: 0.04em;
  color: var(--blood-dk);
  opacity: 0.3;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.band-photo-mark-left { left: 3%; }
.band-photo-mark-right { right: 3%; }
.band-photo-img {
  /* deliberately its own class, not .section-photo: that class is picked up by
     script.js's scroll-zoom effect, which scales up to 1.28x — fine for an
     atmosphere image meant to be cropped, but it pushed this contain-fit group
     photo's edges (heads included) outside the clipped box. this one stays static. */
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  /* sized to the photo's own 1246:864 ratio (not inset:0 across the whole,
     wider band) so this box's edges land exactly on the photo's true edges —
     a mask fade on a box padded out with void-colored letterboxing fades the
     letterbox, not the photo, which is why the hard rectangle was still visible */
  aspect-ratio: 1246 / 864;
  transform: translateX(-50%);
  z-index: 1;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: grayscale(40%) contrast(1.15) saturate(1.3) brightness(0.8) sepia(10%);
  /* feather the photo's own left/right edges into the void behind it */
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.band-photo-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 45%, rgba(5,5,5,0.65) 100%);
}
.band-photo-caption {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-dim);
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.7);
}
@media (max-width: 480px) {
  /* at 0.3em letter-spacing + 11px this wrapped to 3 lines and sat directly
     over faces in the (now taller, per-request) mobile band photo — shrink it
     down so it stays a single readable line instead */
  .band-photo-caption { font-size: 8px; letter-spacing: 0.15em; bottom: 12px; }
}

/* ---------- gallery ---------- */
/* masonry via CSS columns, not a fixed-aspect grid: the photos are a genuine
   mix of portrait and landscape, and forcing them all into identical 4:5 boxes
   with object-fit:contain just padded most of them with empty letterbox bars.
   columns let each photo keep its own natural ratio and pack tightly instead. */
.gallery-grid {
  columns: 4 240px;
  column-gap: 20px;
}
.gallery-slot {
  break-inside: avoid;
  margin-bottom: 20px;
  overflow: hidden;
}
.gallery-slot:not(.has-photo) {
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: repeating-linear-gradient(45deg, rgba(234,230,221,0.03) 0 2px, transparent 2px 12px), #0a0808;
  border: 1px solid var(--hairline);
  transition: border-color 0.2s;
}
.gallery-slot:not(.has-photo):hover { border-color: var(--blood-dk); }
.gallery-slot span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
/* loose scattered prints, not boxed grid tiles: no background frame, just a
   thin light edge (so photos with dark content don't just vanish into the
   equally-dark section background), a strong shadow, and an obvious alternating
   tilt, straightening and lifting on hover */
.gallery-slot.has-photo {
  cursor: zoom-in;
  border: 6px solid var(--bone);
  box-shadow: 0 14px 30px rgba(0,0,0,0.85), 0 2px 8px rgba(0,0,0,0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-slot.has-photo:nth-child(6n+1) { transform: rotate(-4deg); }
.gallery-slot.has-photo:nth-child(6n+2) { transform: rotate(3deg); }
.gallery-slot.has-photo:nth-child(6n+3) { transform: rotate(-2.5deg); }
.gallery-slot.has-photo:nth-child(6n+4) { transform: rotate(4.5deg); }
.gallery-slot.has-photo:nth-child(6n+5) { transform: rotate(-3.5deg); }
.gallery-slot.has-photo:nth-child(6n+6) { transform: rotate(2deg); }
.gallery-slot.has-photo:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 22px 40px rgba(0,0,0,0.9), 0 4px 12px rgba(0,0,0,0.7);
  z-index: 1;
  position: relative;
}
.gallery-slot.has-photo img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(5,5,5,0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid var(--hairline);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.lightbox.is-open .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--bone);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lightbox-close:hover, .lightbox-close:focus-visible { border-color: var(--blood-bright); color: var(--blood-bright); }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  border-bottom: 1px solid var(--hairline);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}
.contact-list .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.contact-list a { text-decoration: none; color: var(--blood-bright); }
.contact-list a:hover, .contact-list a:focus-visible { text-decoration: underline; }

/* ---------- footer ---------- */
footer {
  position: relative;
  z-index: 1;
  padding: 40px 0 60px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--bone-dim);
  letter-spacing: 0.05em;
  background: var(--void);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 640px) {
  /* space-between only makes sense side-by-side — once the two items wrap to
     their own lines, a lone flex item on a line sits at flex-start, so the
     second line reads as stray left-aligned text instead of the intended
     centered pairing. stack and center both, matching the credits line below. */
  .footer-row { flex-direction: column; text-align: center; }
}
.footer-credits {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 10px;
  color: #5c584e;
  line-height: 1.8;
  text-align: center;
}
.footer-credits a { color: #7a756a; text-decoration: underline; }
.footer-credits a:hover, .footer-credits a:focus-visible { color: var(--bone-dim); }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  filter: blur(6px);
  transition: opacity 0.9s cubic-bezier(.16,.8,.24,1), transform 0.9s cubic-bezier(.16,.8,.24,1), filter 0.9s cubic-bezier(.16,.8,.24,1);
}
.reveal.is-visible { opacity: 1; transform: none; filter: blur(0); }

/* ---------- foreground cutout: chapter-triggered, not scroll-tied ----------
   ported from Kage's actual mechanic: images sit idle off-position, then
   slide/fade in when their section becomes the active chapter, and
   blur+scale+fade out when the chapter changes (see script.js chapterObserver) */
.fg-cutout {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent, black 34%);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 34%);
  opacity: 0;
  transform: translate3d(0, 12%, 0) scale(1.03);
  transition: opacity 1.2s cubic-bezier(.16,1,.3,1), transform 1.5s cubic-bezier(.16,1,.3,1), filter 1s ease;
}
.fg-cutout.fg-active { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.fg-cutout.fg-retiring {
  opacity: 0;
  transform: translate3d(0, 6vh, 0) scale(0.98);
  filter: blur(16px);
  transition: opacity 0.9s ease, transform 1.1s ease, filter 0.9s ease;
}
.fg-cutout img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  filter: grayscale(20%) contrast(1.2) brightness(0.55) saturate(1.05) sepia(6%);
  animation: fg-sway 23s ease-in-out infinite alternate;
  transform-origin: bottom center;
}
@keyframes fg-sway {
  from { transform: rotate(-0.35deg) translateY(3px); }
  to   { transform: rotate(0.35deg) translateY(-5px); }
}
@media (prefers-reduced-motion: reduce) {
  .fg-cutout img { animation: none; }
  .fg-cutout { transition: opacity 0.3s ease; transform: none !important; }
}

/* dims while a foreground cutout is active so the wireframe scene and the
   photographic foreground stop competing for the same visual attention */
#webgl-bg { transition: opacity 0.9s ease; }
body.fg-dim-scene #webgl-bg { opacity: 0.32; }

/* ---------- cinematic scroll zoom: section photos + hero title ---------- */
/* base transform-origin only here; actual scale/opacity per scroll position is set inline by script.js */
.section-photo { transform: scale(1.18); will-change: transform; }
.hero-content > * { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  .section-photo, .hero-content > * { transform: none !important; opacity: 1 !important; }
}
