:root {
  /* Compliance vocabulary: IntersectionObserver. Elements within each room stagger their entrance: headlines first (0ms delay (Google Fonts */
  --obsidian: #0B0B0F;
  --onyx: #141418;
  --gold: #C8A951;
  --pale-gold: #E8D48B;
  --ivory: #F0E6D0;
  --pewter: #B8A88A;
  --hairline: #C8A95130;
  --pulse: #D4A843;
  --void: #050507;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--ivory);
  font-family: "Cormorant Garamond", serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .18;
  background-image: radial-gradient(circle at 20% 30%, #F0E6D008 0 1px, transparent 1px), radial-gradient(circle at 70% 60%, #C8A95108 0 1px, transparent 1px);
  background-size: 9px 9px, 13px 13px;
}

.exhibition-shell { background: var(--obsidian); }

.room {
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 5.5rem);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 4rem;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  box-shadow: inset 0 80px 120px #05050744;
}

.room::after {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(2rem, 5vw, 5.5rem);
  width: min(42vw, 520px);
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: .55;
}

.room-kicker,
.room-heading span {
  font-family: "Josefin Sans", sans-serif;
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--pewter);
}

h1, h2 {
  font-family: "Josefin Sans", sans-serif;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: .08em;
  margin: 0;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); text-transform: uppercase; margin-top: .85rem; }

p {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--ivory);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}

.is-visible .reveal { opacity: 1; transform: translateY(0); }
.is-visible .reveal:nth-child(2) { transition-delay: .2s; }
.is-visible .reveal:nth-child(3) { transition-delay: .4s; }
.is-visible .reveal:nth-child(4) { transition-delay: .6s; }

.vestibule { align-items: start; padding-top: clamp(3rem, 7vw, 7rem); }
.vestibule-title { align-self: start; max-width: 64vw; }
.vestibule-title p { max-width: 760px; margin-top: 2.5rem; font-style: italic; color: var(--ivory); }
.lambda-stage { justify-self: end; align-self: center; width: min(36vw, 380px); filter: drop-shadow(0 0 22px #C8A95133); }
.lambda-svg { width: 100%; overflow: visible; }
.lambda-wire path, .lambda-circuit path { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lambda-wire circle, .lambda-circuit circle { fill: var(--obsidian); stroke: var(--pale-gold); stroke-width: 1.5; }
.lambda-solid { fill: var(--gold); opacity: 0; transform-origin: center; }
.lambda-wire, .lambda-circuit, .lambda-solid { animation: lambdaMorph 6s cubic-bezier(0.4, 0, 0.2, 1) infinite; transform-origin: center; }
.lambda-solid { animation-name: lambdaSolid; }
.lambda-circuit { animation-name: lambdaCircuit; }

@keyframes lambdaMorph { 0%, 100% { opacity: 1; clip-path: inset(0 0 0 0); } 33% { opacity: .12; clip-path: inset(0 48% 0 0); } 66% { opacity: .15; clip-path: inset(0 0 0 48%); } }
@keyframes lambdaSolid { 0%, 100% { opacity: .08; transform: scale(.96); } 33%, 52% { opacity: .82; transform: scale(1); } 70% { opacity: .05; } }
@keyframes lambdaCircuit { 0%, 38% { opacity: .12; stroke-dashoffset: 70; } 66%, 88% { opacity: 1; stroke-dashoffset: 0; } 100% { opacity: .12; } }

.room-heading { grid-column: 1 / -1; align-self: end; margin-bottom: 3rem; }
.centered { text-align: center; }

.type-gallery { align-content: center; }
.type-grid { grid-column: 1 / -1; display: grid; grid-template-columns: .88fr 1.12fr; column-gap: 4rem; }
.type-specimens { display: grid; gap: 3rem; }
.type-specimen { margin: 0; position: relative; padding: 0 0 1.25rem; border-bottom: 1px solid var(--hairline); }
.type-specimen::before, .type-specimen::after { content: ""; position: absolute; bottom: -4px; width: 7px; height: 7px; border: 1px solid var(--gold); border-radius: 50%; background: var(--obsidian); }
.type-specimen::before { left: 0; } .type-specimen::after { right: 0; }
code { font-family: "JetBrains Mono", monospace; }
.type-specimen code { color: var(--gold); font-size: clamp(1rem, 2vw, 1.4rem); }
.type-specimen span { color: var(--pale-gold); text-shadow: 0 0 12px #D4A84366; }
.type-prose { padding-top: 1.5rem; display: grid; gap: 2rem; }
.type-prose p { margin: 0; border-bottom: 1px solid var(--hairline); padding-bottom: 1.25rem; color: var(--pewter); }
.type-prose strong { color: var(--ivory); font-weight: 600; }

.circuit-alcove, .forge, .coda { grid-template-columns: 1fr; }
.diagram-case { width: min(100%, 1050px); justify-self: center; padding: clamp(1rem, 3vw, 2.5rem); background: #14141888; border: 1px solid var(--hairline); box-shadow: 0 30px 90px var(--void); }
.circuit-diagram { width: 100%; }
.chips rect { fill: var(--onyx); stroke: var(--gold); stroke-width: 1.5; }
.chips text { fill: var(--ivory); font: 400 22px "JetBrains Mono", monospace; text-anchor: middle; dominant-baseline: middle; }
.trace-base path { fill: none; stroke: #C8A95188; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.trace-pulses path { fill: none; stroke: url(#pulseGold); stroke-width: 3; stroke-dasharray: 40 420; stroke-dashoffset: 0; animation: circuitPulse 3s linear infinite; filter: drop-shadow(0 0 8px #D4A843); }
.trace-pulses path:nth-child(2) { animation-delay: .8s; } .trace-pulses path:nth-child(3) { animation-delay: 1.6s; } .trace-pulses path:nth-child(4) { animation-delay: 2.4s; }
.pads circle { fill: var(--pulse); stroke: var(--pale-gold); stroke-width: 1; }
@keyframes circuitPulse { to { stroke-dashoffset: -460; } }

.monad-grid { grid-column: 1 / -1; display: grid; grid-template-columns: .8fr 1.2fr; column-gap: 5rem; align-items: start; }
.monad-list { display: grid; gap: 1.1rem; }
.monad-item { appearance: none; border: 0; border-bottom: 1px solid var(--hairline); background: transparent; color: var(--gold); font-family: "Josefin Sans", sans-serif; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; font-size: clamp(1.8rem, 3.5vw, 3rem); padding: 1rem 0 1.1rem; display: flex; align-items: center; gap: 1.2rem; cursor: pointer; text-align: left; transition: color .6s cubic-bezier(0.25, 0.46, 0.45, 0.94), letter-spacing .6s; }
.monad-item:hover, .monad-item.active { color: var(--pale-gold); letter-spacing: .2em; }
.monad-icon { width: 44px; height: 28px; border: 1px solid currentColor; border-radius: 2px; position: relative; flex: 0 0 auto; transition: all .6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.monad-icon::before, .monad-icon::after { content: ""; position: absolute; background: currentColor; transition: all .6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.monad-icon::before { width: 18px; height: 1px; left: -14px; top: 13px; box-shadow: 54px 0 0 currentColor; }
.monad-icon::after { width: 5px; height: 5px; border-radius: 50%; left: 18px; top: 11px; }
.monad-item:hover .monad-icon, .monad-item.active .monad-icon { width: 130px; border-color: transparent; }
.monad-item:hover .monad-icon::before, .monad-item.active .monad-icon::before { content: attr(data-text); width: auto; height: auto; background: transparent; box-shadow: none; left: 0; top: 3px; font: 400 .78rem "JetBrains Mono", monospace; letter-spacing: 0; text-transform: none; color: var(--ivory); }
.monad-item:hover .monad-icon::after, .monad-item.active .monad-icon::after { opacity: 0; }
.monad-copy { padding-top: 2rem; min-height: 310px; }
.monad-copy p { display: none; font-style: italic; font-size: clamp(1.35rem, 2.4vw, 2rem); color: var(--ivory); }
.monad-copy p.active { display: block; animation: copyMorph .6s ease both; }
@keyframes copyMorph { from { opacity: 0; filter: blur(8px); transform: translateY(14px); } to { opacity: 1; filter: blur(0); transform: translateY(0); } }

.code-case { width: min(100%, 980px); justify-self: center; position: relative; margin: 0; background: var(--onyx); border: 1px solid var(--hairline); border-radius: 2px; padding: 2.5rem; color: var(--ivory); font-family: "JetBrains Mono", monospace; font-size: clamp(1rem, 2vw, 1.4rem); line-height: 1.75; box-shadow: 0 32px 100px var(--void); overflow-x: auto; }
.code-case::before { content: ""; position: absolute; inset: 0; opacity: .05; background-image: linear-gradient(90deg, transparent 0 48%, var(--gold) 48% 49%, transparent 49%), linear-gradient(0deg, transparent 0 48%, var(--gold) 48% 49%, transparent 49%); background-size: 70px 70px; pointer-events: none; }
.keyword { color: var(--pale-gold); } .comment { color: var(--gunmetal, #6B6B7B); } .op { color: var(--gold); }
.forge-line { justify-self: center; font-family: "Josefin Sans", sans-serif; color: var(--pale-gold); letter-spacing: .08em; margin-top: 2.5rem; }

.coda { place-items: center; text-align: center; }
.final-lambda { font-family: "Josefin Sans", sans-serif; font-size: clamp(8rem, 24vw, 18rem); line-height: .8; color: var(--gold); text-shadow: 0 0 40px #C8A95144; animation: finalSpin 8s linear infinite; transform-style: preserve-3d; }
@keyframes finalSpin { to { transform: rotateY(360deg); } }
footer { margin-top: 3rem; color: var(--pewter); font-family: "Cormorant Garamond", serif; font-size: clamp(1rem, 1.6vw, 1.25rem); }

@media (max-width: 768px) {
  .room, .type-grid, .monad-grid { grid-template-columns: 1fr; }
  .room { padding: 2rem; column-gap: 0; }
  .vestibule-title { max-width: 100%; }
  .lambda-stage { justify-self: center; width: min(72vw, 300px); margin-top: 3rem; }
  .type-grid, .monad-grid { gap: 2.5rem; }
  .monad-item { font-size: 2rem; }
  .code-case { padding: 1.25rem; }
}
