:root {
  --annotation-token: "annotation:* annotation:**";
  --void: #080611;
  --purple: #24113B;
  --marble: #E9E2D0;
  --cyan: #55F7FF;
  --magenta: #FF4FD8;
  --amber: #FFB15E;
  --teal: #1E8A8A;
  --pane: rgba(233,226,208,0.10);
  --cyan-glass: rgba(85,247,255,0.18);
  --magenta-glow: rgba(255,79,216,0.12);
  --mx: 50%;
  --my: 50%;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--marble);
  background:
    radial-gradient(circle at 18% 8%, rgba(255,79,216,0.15), transparent 26rem),
    radial-gradient(circle at 80% 22%, rgba(85,247,255,0.12), transparent 24rem),
    linear-gradient(145deg, var(--void), #10091d 48%, var(--void));
  font-family: Inter, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(85,247,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233,226,208,0.025) 1px, transparent 1px);
  background-size: 54px 54px, 54px 54px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  z-index: -2;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  opacity: 0.23;
  background-image: repeating-radial-gradient(circle at 17% 23%, rgba(233,226,208,0.18) 0 1px, transparent 1px 5px);
  mix-blend-mode: overlay;
}

.cursor-glow {
  position: fixed;
  left: var(--mx);
  top: var(--my);
  width: 34rem;
  height: 34rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(85,247,255,0.13), rgba(255,79,216,0.055) 34%, transparent 67%);
  filter: blur(10px);
  z-index: 2;
}

.global-scan {
  position: fixed;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100vh;
  background: linear-gradient(transparent, var(--cyan), transparent);
  box-shadow: 0 0 18px var(--cyan), 0 0 60px rgba(85,247,255,0.35);
  opacity: 0.55;
  z-index: 5;
  pointer-events: none;
  transform: translateX(-50%);
}

.section {
  position: relative;
  min-height: 100vh;
  padding: 8vw 5vw;
}

.atrium {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.oversize-word {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(5rem, 18vw, 18rem);
  line-height: 0.78;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  color: var(--marble);
}

.hero-word {
  position: absolute;
  left: -3vw;
  top: 10vh;
  font-size: clamp(9rem, 31vw, 32rem);
  opacity: 0.18;
  mix-blend-mode: screen;
  text-shadow: 0 0 70px rgba(85,247,255,0.18);
  z-index: 0;
}

.section-heading {
  position: sticky;
  top: 2rem;
  z-index: 0;
  opacity: 0.12;
  margin-left: -3vw;
  margin-bottom: -2rem;
  mix-blend-mode: screen;
}

.pane {
  --radius: 28px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(233,226,208,0.36);
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(85,247,255,0.18), transparent 18rem),
    linear-gradient(135deg, rgba(233,226,208,0.13), rgba(36,17,59,0.26) 48%, rgba(30,138,138,0.12));
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(233,226,208,0.45), inset -10px -10px 45px rgba(8,6,17,0.25), 0 30px 90px rgba(0,0,0,0.46), 0 0 0 1px rgba(85,247,255,0.08), 14px 14px 0 rgba(85,247,255,0.035);
  padding: clamp(1.2rem, 2.2vw, 2.5rem);
  transform: translateY(34px) scale(0.985);
  opacity: 0.58;
  filter: blur(8px);
  transition: opacity 900ms ease, filter 900ms ease, transform 900ms ease, border-radius 1800ms ease;
  animation: breathe 8s ease-in-out infinite;
  z-index: 3;
}

.pane::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(233,226,208,0.14), transparent 22%),
    radial-gradient(ellipse at 80% 20%, rgba(85,247,255,0.13), transparent 21%),
    radial-gradient(ellipse at 52% 78%, rgba(255,79,216,0.12), transparent 20%);
  opacity: 0.72;
  animation: veinDrift 14s ease-in-out infinite alternate;
}

.pane::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius) - 10px);
  border: 1px solid rgba(85,247,255,0.20);
  box-shadow: inset 0 0 26px rgba(85,247,255,0.08);
  pointer-events: none;
}

.pane.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.pane > * { position: relative; z-index: 2; }

.edge-label {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--cyan);
  font-family: "Space Mono", monospace;
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, p, pre { margin: 0; }

h1, h2 {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

h1 { font-size: clamp(3.4rem, 7vw, 8rem); }
h2 { font-size: clamp(2.8rem, 5.8vw, 6.5rem); }

p {
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  line-height: 1.55;
  color: rgba(233,226,208,0.82);
}

.caption {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.35rem, 2vw, 2.2rem);
  color: rgba(233,226,208,0.82);
}

.large-fragment {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3.2vw, 4.1rem);
  line-height: 1;
}

pre, .mono-stack, .console-ribbon, .footer-console {
  font-family: "Space Mono", monospace;
  color: rgba(85,247,255,0.88);
  font-size: 0.78rem;
  line-height: 1.8;
  letter-spacing: 0.06em;
}

.console-ribbon {
  position: absolute;
  z-index: 6;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(85,247,255,0.26);
  background: rgba(8,6,17,0.36);
  backdrop-filter: blur(12px);
}

.top-left { top: 2rem; left: 2rem; }
.bottom-right { right: 2rem; bottom: 2rem; }

.hero-glass {
  width: min(62vw, 760px);
  min-height: 72vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.25rem, 3vw, 3rem);
}

.wake-panel {
  position: absolute;
  right: 5vw;
  bottom: 12vh;
  width: min(38rem, 44vw);
}

.scan-beam {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 18px var(--cyan), 0 0 42px rgba(85,247,255,0.7);
  z-index: 7;
  pointer-events: none;
}

.hero-beam { animation: scanDown 7s linear infinite; }

.bust-svg {
  width: 100%;
  height: min(56vh, 560px);
  filter: drop-shadow(0 0 22px rgba(85,247,255,0.28));
}

.archive { padding-top: 13vw; }

.masonry {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.height-s { min-height: 15rem; }
.height-m { min-height: 24rem; }
.height-l { min-height: 34rem; }
.height-xl { min-height: 45rem; }

.masonry .pane:nth-child(2) { margin-top: 6rem; z-index: 5; }
.masonry .pane:nth-child(3) { margin-top: -2rem; margin-left: -1.5rem; }
.masonry .pane:nth-child(4) { margin-top: 2rem; }
.method-grid .pane:nth-child(3), .ritual-grid .pane:nth-child(1) { margin-left: -2.5rem; }
.after-grid .pane:nth-child(3) { margin-top: -5rem; }

.line-art {
  width: 100%;
  height: auto;
  fill: none;
  stroke: var(--marble);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(85,247,255,0.22));
}

.column { max-height: 22rem; margin-top: 2rem; stroke: rgba(233,226,208,0.72); }
.laurel { stroke: var(--cyan); opacity: 0.78; }
.orbit { stroke: rgba(85,247,255,0.78); }
.hand { stroke: rgba(233,226,208,0.72); }
.mask { stroke: rgba(255,79,216,0.68); }

.code-slip { background-color: rgba(8,6,17,0.34); }
.amber .edge-label, .amber p { color: var(--amber); }
.void-pane { display: grid; align-content: space-between; }
.diagram { display: grid; place-items: center; }
.hand-pane { display: grid; align-content: center; gap: 2rem; }
.mask-pane { display: grid; place-items: center; }

.footer-console {
  margin-top: 12vw;
  text-align: center;
  color: var(--amber);
}

@keyframes scanDown {
  0% { top: -4%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 104%; opacity: 0; }
}

@keyframes breathe {
  0%, 100% { border-radius: 20px 38px 26px 44px; }
  50% { border-radius: 42px 18px 40px 22px; }
}

@keyframes veinDrift {
  0% { transform: translate3d(-12px, -8px, 0) rotate(0deg) scale(1); }
  100% { transform: translate3d(14px, 10px, 0) rotate(7deg) scale(1.05); }
}

@media (max-width: 900px) {
  .section { padding: 7rem 1rem; }
  .hero-word { left: -18vw; top: 13vh; font-size: 48vw; }
  .hero-glass { width: 92vw; min-height: 68vh; }
  .wake-panel { position: relative; right: auto; bottom: auto; width: 82vw; margin-top: -4rem; justify-self: end; }
  .console-ribbon { max-width: 80vw; font-size: 0.62rem; }
  .bottom-right { right: 1rem; }
  .top-left { left: 1rem; }
  .masonry { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .span-2, .span-3 { grid-column: span 3; }
  .span-4, .span-5, .span-7 { grid-column: span 6; }
  .masonry .pane:nth-child(3n) { width: 92%; justify-self: end; margin-left: 0; }
  .masonry .pane:nth-child(2) { margin-top: 1rem; }
  .after-grid .pane:nth-child(3) { margin-top: 0; }
}

@media (max-width: 560px) {
  .masonry { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .span-2, .span-3, .span-4, .span-5, .span-7 { grid-column: span 4; }
  .height-l, .height-xl { min-height: 32rem; }
  h1 { font-size: 4rem; }
  .section-heading { font-size: 34vw; margin-left: -10vw; }
}
