:root {
  /* Typography compliance phrase: IBM Plex Mono* Mono** only for checksum fragments; Inter* Inter** for wiki-like clarity in paragraphs. */
  --midnight: #06172E;
  --mist: #BFEAFF;
  --electric: #5DCBFF;
  --porcelain: #EAF8FF;
  --brass: #D8B56A;
  --ink: #020711;
  --coral: #FF6F8E;
  --lavender: #AAB7FF;
  --deep: #123E68;
  --display: "Limelight", Georgia, serif;
  --accent: "Poiret One", "Trebuchet MS", sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--porcelain);
  font-family: var(--body);
  background:
    radial-gradient(circle at 10% 20%, rgba(93, 203, 255, .22), transparent 28%),
    radial-gradient(circle at 78% 8%, rgba(170, 183, 255, .18), transparent 26%),
    linear-gradient(135deg, var(--ink) 0%, var(--midnight) 42%, var(--deep) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(216, 181, 106, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 234, 255, .045) 1px, transparent 1px),
    repeating-linear-gradient(115deg, transparent 0 78px, rgba(216,181,106,.08) 79px, transparent 81px);
  background-size: 120px 120px, 120px 120px, 360px 360px;
  mix-blend-mode: screen;
  z-index: 0;
}

.atmosphere { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.fog { position: absolute; width: 48vw; height: 28vh; border-radius: 999px; filter: blur(34px); opacity: .28; background: var(--mist); animation: fogDrift 18s ease-in-out infinite alternate; }
.fog-a { left: -12%; top: 18%; }
.fog-b { right: -10%; top: 48%; animation-duration: 22s; background: var(--lavender); }
.fog-c { left: 25%; bottom: -9%; animation-duration: 26s; }
.searchlight { position: absolute; width: 14vw; height: 110vh; top: -5vh; transform-origin: bottom center; background: linear-gradient(to bottom, rgba(93,203,255,.2), transparent 75%); clip-path: polygon(48% 0, 55% 0, 100% 100%, 0 100%); filter: blur(10px); animation: sweep 12s ease-in-out infinite alternate; }
.searchlight-a { left: 16%; }
.searchlight-b { right: 10%; animation-delay: -5s; }

.registry-elevator {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: 1.4rem;
  transform: translateY(-50%);
  display: grid;
  gap: .55rem;
  padding: .9rem .65rem;
  border: 1px solid rgba(216,181,106,.48);
  background: rgba(2, 7, 17, .58);
  backdrop-filter: blur(18px);
  box-shadow: 0 0 36px rgba(93,203,255,.14), inset 0 0 28px rgba(191,234,255,.06);
}
.elevator-rail { position: absolute; left: 9px; top: 12px; bottom: 12px; width: 1px; background: var(--brass); opacity: .8; }
.elevator-car { position: absolute; left: -4px; top: 0; width: 9px; height: 30px; border: 1px solid var(--brass); background: var(--electric); box-shadow: 0 0 18px var(--electric); transition: transform .5s ease; }
.floor { position: relative; display: grid; grid-template-columns: 2.25rem 1fr; gap: .4rem; align-items: center; color: rgba(234,248,255,.58); text-decoration: none; letter-spacing: .08em; text-transform: uppercase; font-family: var(--accent); font-size: .78rem; }
.floor span { font-family: var(--mono); color: var(--brass); }
.floor::before { content: ""; width: 6px; height: 6px; margin-left: -1px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 transparent; }
.floor.is-active { color: var(--porcelain); }
.floor.is-active::before { background: var(--electric); box-shadow: 0 0 16px var(--electric); }

.city-map { position: relative; z-index: 2; }
.district { position: relative; min-height: 100vh; padding: 6vw 8vw; overflow: hidden; display: grid; isolation: isolate; }
.district::before { content: ""; position: absolute; inset: 2rem; border: 1px solid rgba(216,181,106,.28); clip-path: polygon(0 0, 85% 0, 100% 14%, 100% 100%, 10% 100%, 0 86%); z-index: -1; }
.chapter-number { position: absolute; font-family: var(--display); font-size: clamp(6rem, 18vw, 19rem); color: rgba(191,234,255,.08); line-height: .8; letter-spacing: -.08em; z-index: -1; }
.chapter-number.coral { color: rgba(255,111,142,.18); }
.plaque { border: 1px solid rgba(216,181,106,.58); border-top-width: 3px; background: linear-gradient(135deg, rgba(6,23,46,.74), rgba(18,62,104,.38)); box-shadow: 0 24px 70px rgba(2,7,17,.42), inset 0 0 38px rgba(191,234,255,.08); backdrop-filter: blur(14px); padding: clamp(1.2rem, 3vw, 3rem); }
.kicker { margin: 0 0 .8rem; font-family: var(--accent); text-transform: uppercase; letter-spacing: .22em; color: var(--brass); font-size: clamp(.82rem, 1.5vw, 1.05rem); }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 400; color: var(--porcelain); text-shadow: 0 0 28px rgba(93,203,255,.32); }
h1 { font-size: clamp(4.3rem, 12vw, 13rem); letter-spacing: .02em; }
h2 { font-size: clamp(2.4rem, 6vw, 6.8rem); line-height: .95; }
p { line-height: 1.75; }
.lead { max-width: 58rem; font-size: clamp(1.05rem, 1.8vw, 1.45rem); color: var(--mist); }

.arrival { grid-template-columns: 1fr .76fr; grid-template-rows: .25fr 1fr .2fr; gap: 2rem; perspective: 1100px; }
.arrival .chapter-number { right: 10vw; top: 6vh; }
.station-sign { grid-column: 1 / 3; align-self: end; width: min(76vw, 1050px); transform: translateY(20px); animation: stationRise 1.2s ease forwards; }
.skyline { grid-column: 1 / 3; min-height: 42vh; display: flex; align-items: end; gap: clamp(.45rem, 1.2vw, 1.1rem); transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-8deg); transform-origin: center bottom; }
.tower { position: relative; width: 12%; min-width: 70px; border: 1px solid rgba(191,234,255,.62); background: linear-gradient(145deg, rgba(93,203,255,.28), rgba(6,23,46,.8) 62%, rgba(170,183,255,.22)); box-shadow: inset 14px 0 rgba(234,248,255,.05), inset -12px 0 rgba(2,7,17,.22), 0 0 28px rgba(93,203,255,.22); transform: translateZ(0); transition: transform .16s ease-out; }
.tower::before { content: ""; position: absolute; inset: 9px; background-image: repeating-linear-gradient(0deg, rgba(234,248,255,.0) 0 12px, rgba(191,234,255,.55) 13px 15px), repeating-linear-gradient(90deg, transparent 0 16px, rgba(93,203,255,.55) 17px 19px); opacity: .55; animation: windows 3.5s steps(6) infinite; }
.tower::after { content: ""; position: absolute; left: 100%; top: 13px; width: 22px; height: calc(100% - 13px); transform: skewY(45deg); transform-origin: left top; background: rgba(191,234,255,.14); border: 1px solid rgba(191,234,255,.3); }
.tower span { position: absolute; bottom: 8px; left: 8px; writing-mode: vertical-rl; font-family: var(--mono); color: var(--brass); font-size: .68rem; letter-spacing: .08em; }
.tower-a { height: 28vh; } .tower-b { height: 38vh; } .tower-c { height: 24vh; } .tower-d { height: 46vh; } .tower-e { height: 32vh; } .tower-f { height: 40vh; }
.manifest-strip { grid-column: 1 / 3; display: flex; flex-wrap: wrap; gap: .65rem; list-style: none; padding: 0; margin: 0; font-family: var(--mono); color: var(--mist); }
.manifest-strip li { border: 1px solid rgba(216,181,106,.4); background: rgba(2,7,17,.54); padding: .65rem .9rem; opacity: .28; transition: opacity .35s ease, box-shadow .35s ease; }
.manifest-strip li.lit { opacity: 1; box-shadow: 0 0 22px rgba(93,203,255,.24); }
.deco-sunburst { position: absolute; right: 8vw; top: 8vh; width: 30vw; height: 30vw; border-radius: 50%; opacity: .22; }
.deco-sunburst i { position: absolute; left: 50%; bottom: 50%; width: 1px; height: 50%; background: var(--brass); transform-origin: bottom; }
.deco-sunburst i:nth-child(1){transform:rotate(-55deg)} .deco-sunburst i:nth-child(2){transform:rotate(-25deg)} .deco-sunburst i:nth-child(3){transform:rotate(0)} .deco-sunburst i:nth-child(4){transform:rotate(25deg)} .deco-sunburst i:nth-child(5){transform:rotate(55deg)}

.components { grid-template-columns: .82fr 1.18fr; grid-template-rows: .8fr 1fr; gap: 2rem; }
.components .chapter-number { left: 7vw; bottom: 7vh; }
.component-plaque { grid-column: 1; grid-row: 1; align-self: center; transform: translateX(3vw); }
.avenue-grid { grid-column: 2; grid-row: 1 / 3; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); gap: .8rem; transform: rotate(-3deg); }
.address-ticket { border-left: 2px solid var(--brass); background: rgba(191,234,255,.1); padding: 1rem; box-shadow: 0 12px 30px rgba(2,7,17,.35); }
.address-ticket b { display: block; font-family: var(--mono); color: var(--electric); margin-bottom: .5rem; }
.address-ticket span { color: var(--mist); }
.ticket-a { grid-column: 1 / 5; grid-row: 1 / 2; } .ticket-b { grid-column: 3 / 7; grid-row: 3 / 4; } .ticket-c { grid-column: 1 / 4; grid-row: 5 / 6; }
.package-crate { display: grid; place-items: center; min-height: 120px; color: var(--porcelain); font-family: var(--display); font-size: 2rem; border: 1px solid rgba(191,234,255,.6); background: linear-gradient(145deg, rgba(93,203,255,.18), rgba(2,7,17,.7)); box-shadow: 18px 18px 0 rgba(191,234,255,.08), inset 0 0 32px rgba(93,203,255,.18); animation: crateFloat 4.5s ease-in-out infinite alternate; }
.crate-a { grid-column: 1 / 3; grid-row: 2 / 4; } .crate-b { grid-column: 4 / 7; grid-row: 2 / 3; animation-delay: -.8s; } .crate-c { grid-column: 4 / 6; grid-row: 4 / 6; animation-delay: -1.7s; }
.tramlines { position: absolute; inset: 18vh 5vw 7vh 5vw; z-index: -1; opacity: .88; }
.route { fill: none; stroke: var(--brass); stroke-width: 2; stroke-dasharray: 12 12; animation: routeDash 18s linear infinite; }
.route-b { stroke: var(--electric); animation-duration: 13s; }
.tram { fill: var(--porcelain); filter: drop-shadow(0 0 10px var(--electric)); }

.licenses { grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.licenses .chapter-number { right: 5vw; top: 14vh; }
.license-plaque { grid-column: 1; transform: translateY(-7vh); }
.arcade { grid-column: 2; display: grid; gap: 1rem; transform: rotate(2.5deg); }
.marquee { border: 1px solid rgba(216,181,106,.7); padding: 1rem 1.2rem; background: linear-gradient(90deg, rgba(2,7,17,.75), rgba(18,62,104,.6)); box-shadow: inset 0 0 20px rgba(216,181,106,.12); }
.marquee span { font-family: var(--display); font-size: clamp(2rem, 5vw, 4.8rem); color: var(--brass); display: block; }
.marquee small { font-family: var(--mono); color: var(--mist); text-transform: uppercase; letter-spacing: .12em; }
.seal { width: 230px; height: 230px; justify-self: center; display: grid; place-items: center; border-radius: 50%; border: 2px double var(--brass); color: var(--brass); font-family: var(--accent); letter-spacing: .16em; text-align: center; background: rgba(2,7,17,.65); box-shadow: 0 0 40px rgba(216,181,106,.22), inset 0 0 32px rgba(216,181,106,.12); transform: scale(.94) rotate(-12deg); transition: transform .35s cubic-bezier(.2, 1.6, .4, 1); }
.seal.stamped { transform: scale(1.04) rotate(-4deg); }
.seal em { display: block; font-style: normal; }
.ledger-sheet { position: absolute; left: 10vw; bottom: 8vh; max-width: 720px; padding: 1rem 1.2rem; background: rgba(234,248,255,.09); border: 1px solid rgba(191,234,255,.36); font-family: var(--mono); color: var(--mist); transform: rotate(-1.5deg); }
.ledger-sheet p { margin: .25rem 0; }

.vulnerabilities { grid-template-columns: .9fr 1.1fr; align-items: center; gap: 3rem; }
.vulnerabilities .chapter-number { left: 9vw; top: 8vh; }
.fog-plaque { transform: translate(3vw, 8vh); }
.fog-theater { position: relative; min-height: 62vh; border: 1px solid rgba(255,111,142,.42); background: radial-gradient(circle at 45% 50%, rgba(255,111,142,.16), transparent 42%), rgba(2,7,17,.28); overflow: hidden; }
.coral-cloud { position: absolute; width: 34%; height: 20%; border-radius: 50%; background: var(--coral); filter: blur(28px); opacity: .42; animation: coralWeather 8s ease-in-out infinite alternate; }
.cloud-a { left: 8%; top: 20%; } .cloud-b { right: 14%; top: 38%; animation-delay: -2s; } .cloud-c { left: 35%; bottom: 12%; animation-delay: -4s; }
.scanner { position: absolute; bottom: -20%; width: 18%; height: 135%; background: linear-gradient(to top, rgba(93,203,255,.32), transparent 72%); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); filter: blur(4px); animation: scan 5.5s ease-in-out infinite alternate; }
.scanner-a { left: 20%; } .scanner-b { right: 18%; animation-delay: -2.5s; }
.advisory-card { position: absolute; right: 8%; bottom: 10%; width: min(460px, 78%); padding: 1rem; border: 1px solid var(--coral); color: var(--porcelain); background: rgba(2,7,17,.72); font-family: var(--mono); box-shadow: 0 0 34px rgba(255,111,142,.2); }

.provenance { grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.provenance .chapter-number { right: 8vw; bottom: 5vh; }
.observatory-plaque { grid-column: 2; transform: translateY(-10vh); }
.observatory-dome { grid-column: 1; grid-row: 1; position: relative; min-height: 62vh; display: grid; place-items: center; }
.dome-ring { position: absolute; border: 1px solid rgba(191,234,255,.52); border-radius: 50% 50% 0 0; border-bottom: 0; transform: perspective(800px) rotateX(58deg); box-shadow: 0 0 30px rgba(93,203,255,.16); }
.ring-one { width: 88%; height: 82%; animation: rotateBlueprint 13s linear infinite; } .ring-two { width: 66%; height: 62%; animation: rotateBlueprint 10s linear infinite reverse; } .ring-three { width: 42%; height: 42%; animation: rotateBlueprint 8s linear infinite; }
.beacon { width: 22px; height: 22px; border-radius: 50%; background: var(--electric); box-shadow: 0 0 20px var(--electric), 0 0 80px var(--electric); animation: beaconPulse 1.8s ease-in-out infinite; }
.caption { position: absolute; bottom: 16%; font-family: var(--mono); color: var(--brass); background: rgba(2,7,17,.6); border: 1px solid rgba(216,181,106,.45); padding: .75rem 1rem; }
.citation-tabs { position: absolute; left: 8vw; bottom: 7vh; display: flex; flex-wrap: wrap; gap: .7rem; max-width: 60vw; }
.citation-tabs span { padding: .75rem 1rem; border: 1px solid rgba(191,234,255,.4); background: rgba(6,23,46,.72); color: var(--mist); font-family: var(--mono); }

@keyframes fogDrift { to { transform: translate3d(10vw, -4vh, 0) scale(1.2); } }
@keyframes sweep { to { transform: rotate(16deg) translateX(8vw); } }
@keyframes stationRise { to { transform: translateY(0); } }
@keyframes windows { 50% { opacity: .25; } }
@keyframes routeDash { to { stroke-dashoffset: -240; } }
@keyframes crateFloat { to { transform: translateY(-18px) rotateX(8deg); } }
@keyframes coralWeather { to { transform: translate(9vw, -5vh) scale(1.25); opacity: .68; } }
@keyframes scan { to { transform: translateX(18vw) rotate(9deg); } }
@keyframes rotateBlueprint { to { transform: perspective(800px) rotateX(58deg) rotateZ(360deg); } }
@keyframes beaconPulse { 50% { transform: scale(1.35); opacity: .7; } }

@media (max-width: 900px) {
  .registry-elevator { right: .5rem; transform: translateY(-50%) scale(.86); transform-origin: right center; }
  .district { padding: 6rem 4.5rem 4rem 1.25rem; display: block; }
  .station-sign, .component-plaque, .license-plaque, .fog-plaque, .observatory-plaque { width: auto; transform: none; margin-bottom: 2rem; }
  .skyline { min-height: 36vh; transform: rotateX(56deg) rotateZ(-6deg) scale(.9); }
  .tower { min-width: 42px; }
  .avenue-grid, .arcade, .fog-theater, .observatory-dome { margin-top: 2rem; }
  .ledger-sheet, .citation-tabs { position: relative; left: auto; bottom: auto; max-width: none; margin-top: 1rem; }
  .tramlines { inset: 40vh 1rem 1rem 1rem; }
  h1 { font-size: clamp(3rem, 16vw, 7rem); }
}
