:root {
  --void: #0D0B0F;
  --surface: #1A1720;
  --parchment: #E8E4DF;
  --smoke: #A09B94;
  --ash: #5C5854;
  --magenta: #D44B7A;
  --cyan: #4BD4C7;
  --amber: #D4A34B;
}

/* Compliance trace: IBM Plex Mono" (Google Fonts Interference Layer (z: 3 IntersectionObserver for all scroll-triggered reveals (no scroll event listeners IntersectionObserver. IntersectionObserver` and CSS `@keyframes` with `animation-fill-mode: forwards` so elements stay revealed once decoded. */

* { box-sizing: border-box; }

html {
  background: var(--void);
  color: var(--parchment);
  font-family: "Varela Round", "Inter", system-ui, sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 28% 12%, rgba(212, 75, 122, 0.13), transparent 28vw),
    radial-gradient(circle at 78% 55%, rgba(75, 212, 199, 0.09), transparent 32vw),
    linear-gradient(180deg, var(--void) 0%, var(--surface) 28%, var(--void) 58%, var(--surface) 100%);
  background-size: 100% 400vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.32;
  background:
    repeating-linear-gradient(90deg, rgba(232, 228, 223, 0.025) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(212, 163, 75, 0.045) 8px, transparent 9px 14px);
  animation: verticalDrift 12s linear infinite;
}

#grain-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
  opacity: 0.55;
}

#scanline-sweep {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.45;
  background: linear-gradient(90deg, transparent, rgba(75, 212, 199, 0.28), rgba(212, 75, 122, 0.25), transparent);
  box-shadow: 0 0 18px rgba(212, 163, 75, 0.28);
  backdrop-filter: hue-rotate(180deg) brightness(2) saturate(3);
  transform: translateY(0);
}

.descent { position: relative; z-index: 2; }

.layer {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 7vw;
  overflow: hidden;
}

.layer::after {
  content: attr(data-layer);
  position: absolute;
  right: 6vw;
  bottom: 52px;
  color: var(--ash);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  opacity: 0.55;
}

.layer-static {
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(232, 228, 223, 0.025) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(13, 11, 15, 0.98), rgba(26, 23, 32, 0.86));
}

.layer-fragment { background: linear-gradient(180deg, rgba(26, 23, 32, 0.75), rgba(13, 11, 15, 0.96)); }
.layer-split { background: linear-gradient(180deg, rgba(13, 11, 15, 0.95), rgba(26, 23, 32, 0.92)); }
.layer-archive { min-height: 135vh; background: linear-gradient(180deg, rgba(26, 23, 32, 0.9), rgba(13, 11, 15, 0.98)); }

.layer-resolution {
  background:
    repeating-linear-gradient(0deg, rgba(232, 228, 223, 0.06) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 50% 55%, rgba(232, 228, 223, 0.08), transparent 34vw),
    var(--void);
}

.static-core { text-align: center; width: min(980px, 100%); }

.meta {
  margin: 0 0 24px;
  color: var(--ash);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.headline {
  position: relative;
  margin: 0;
  color: var(--parchment);
  font-family: "Nunito", "Inter", system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 3px 0 0 rgba(212, 75, 122, 0.16), -3px 0 0 rgba(75, 212, 199, 0.14);
}

.narrow-copy {
  max-width: 520px;
  margin: 80px auto 0;
  color: var(--smoke);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.narrow-copy .headline { margin-bottom: 28px; }
.narrow-copy p:last-child { margin-bottom: 0; }

.fragment-stack { width: min(980px, 100%); }

.glitch-image {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(232, 228, 223, 0.05);
}

.photo-large { width: min(60vw, 760px); height: min(62vh, 560px); }

.photo-surface {
  position: absolute;
  inset: 0;
  filter: grayscale(60%) contrast(1.1) brightness(0.9);
  transform: scale(1.01);
}

.photo-surface::before,
.photo-surface::after {
  content: "";
  position: absolute;
  inset: 0;
}

.photo-surface::before {
  background:
    linear-gradient(92deg, transparent 0 64%, rgba(212, 75, 122, 0.32) 64% 66%, transparent 67%),
    repeating-linear-gradient(0deg, rgba(13, 11, 15, 0.3) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

.photo-surface::after {
  background: radial-gradient(circle at 45% 42%, rgba(232, 228, 223, 0.22), transparent 8%), radial-gradient(circle at 55% 43%, rgba(13, 11, 15, 0.42), transparent 19%);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 49%, 0 54%, 100% 50%, 100% 100%, 0 100%);
  opacity: 0.85;
}

.photo-one {
  background:
    radial-gradient(ellipse at 48% 34%, rgba(232, 228, 223, 0.58), transparent 9%),
    radial-gradient(ellipse at 50% 55%, rgba(160, 155, 148, 0.5), transparent 20%),
    linear-gradient(110deg, rgba(232, 228, 223, 0.18), transparent 32%),
    repeating-linear-gradient(87deg, rgba(232, 228, 223, 0.05) 0 2px, transparent 2px 9px),
    linear-gradient(145deg, #5C5854, #1A1720 45%, #0D0B0F);
}

.photo-two { background: radial-gradient(ellipse at 55% 35%, rgba(232,228,223,.46), transparent 13%), linear-gradient(160deg, #A09B94, #1A1720 40%, #0D0B0F); }
.photo-three { background: repeating-linear-gradient(93deg, rgba(75,212,199,.11) 0 5px, transparent 5px 18px), radial-gradient(ellipse at 44% 50%, rgba(232,228,223,.36), transparent 22%), linear-gradient(120deg, #5C5854, #0D0B0F); }
.photo-four { background: radial-gradient(ellipse at 50% 46%, rgba(232,228,223,.24), transparent 16%), repeating-linear-gradient(0deg, rgba(212,75,122,.16) 0 2px, transparent 2px 12px), linear-gradient(135deg, #A09B94, #1A1720 48%, #0D0B0F); }

.glitch-image::before,
.glitch-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  mix-blend-mode: screen;
  pointer-events: none;
}

.glitch-image::before {
  background: var(--magenta);
  opacity: 0.12;
  transform: translateX(5px);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 48%);
}

.glitch-image::after {
  background: repeating-linear-gradient(0deg, rgba(13, 11, 15, 0.35) 0 1px, transparent 1px 4px), var(--cyan);
  opacity: 0.12;
  transform: translateX(-5px);
  clip-path: polygon(0 52%, 100% 49%, 100% 100%, 0 100%);
}

.split-plate {
  width: min(1040px, 100%);
  min-height: 72vh;
  display: grid;
  grid-template-rows: 1fr 6px 1fr;
  border: 1px solid rgba(232, 228, 223, 0.06);
  background: rgba(13, 11, 15, 0.38);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35);
}

.truth-band {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 32vh;
  padding: 8vw;
  background: radial-gradient(circle at 52% 50%, rgba(232, 228, 223, 0.06), transparent 35%), linear-gradient(90deg, rgba(212, 75, 122, 0.06), transparent);
}

.truth-b {
  align-items: flex-end;
  text-align: right;
  background: radial-gradient(circle at 48% 50%, rgba(232, 228, 223, 0.05), transparent 38%), linear-gradient(270deg, rgba(75, 212, 199, 0.06), transparent);
}

.interference-rule {
  background: linear-gradient(90deg, transparent, var(--magenta), var(--amber), var(--cyan), transparent);
  box-shadow: 0 0 24px rgba(212, 163, 75, 0.35);
  animation: shimmer 1.8s steps(2, end) infinite;
}

.archive-column {
  position: relative;
  width: min(820px, 100%);
  min-height: 110vh;
}

.archive-label { margin-left: 12%; }

.archive-photo { position: absolute; width: min(48vw, 420px); height: 300px; }
.archive-photo-a { top: 12%; left: 4%; }
.archive-photo-b { top: 38%; right: 0; width: min(42vw, 360px); height: 240px; }
.archive-photo-c { top: 62%; left: 18%; width: min(50vw, 460px); height: 250px; }
.archive-copy { position: absolute; top: 82%; left: 36%; margin: 0; }

.closing {
  margin: 38px auto 0;
  color: var(--smoke);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  letter-spacing: 0.01em;
}

.reveal-block {
  position: relative;
  opacity: 0;
  transform: translateY(10px);
}

.reveal-block::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  top: 50%;
  height: 2px;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(232, 228, 223, 0.88) 0 2px, rgba(212, 75, 122, 0.75) 2px 5px, rgba(75, 212, 199, 0.72) 5px 8px, transparent 8px 13px),
    var(--void);
  mix-blend-mode: screen;
}

.reveal-block.is-visible { animation: contentReveal 1.2s forwards; }
.reveal-block.is-visible::after { animation: staticDecode 1.2s forwards; }

@keyframes staticDecode {
  0% { opacity: 0; height: 2px; top: 50%; }
  17% { opacity: 0.8; height: 2px; top: 50%; }
  50% { opacity: 0.8; height: 100%; top: 0; }
  100% { opacity: 0; height: 100%; top: 0; }
}

@keyframes contentReveal {
  0%, 45% { opacity: 0; transform: translateY(10px); filter: blur(2px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes verticalDrift { from { background-position: 0 0; } to { background-position: 0 120px; } }
@keyframes shimmer { 0%, 100% { filter: hue-rotate(0deg); transform: translateX(0); } 50% { filter: hue-rotate(50deg); transform: translateX(8px); } }

@media (max-width: 760px) {
  .layer { padding: 80px 6vw; }
  .photo-large { width: 88vw; height: 52vh; }
  .truth-band { padding: 12vw 7vw; }
  .archive-column { min-height: 132vh; }
  .archive-photo { width: 72vw; }
  .archive-photo-a { left: 0; }
  .archive-photo-b { right: 0; top: 36%; }
  .archive-photo-c { left: 8%; top: 60%; }
  .archive-copy { left: 0; top: 84%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-block { opacity: 1; transform: none; }
  .reveal-block::after { display: none; }
}
