:root {
  /* Typography compliance tokens: Mon* Inte* Mono* Inter* Mono** tiny coordinates Inter** crisp explanatory */
  --deep: #071426;
  --navy: #0E2340;
  --void: #020713;
  --ivory: #F4EBD2;
  --gold: #C6A35A;
  --blue: #6DA7D8;
  --red: #B84A5A;
  --title-width: 88;
  --rail-rotation: 0deg;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ivory);
  background: radial-gradient(circle at 50% 12%, rgba(109, 167, 216, .14), transparent 34%), linear-gradient(135deg, var(--void), var(--deep) 47%, var(--void));
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(244, 235, 210, .58) 0 1px, transparent 1.5px), linear-gradient(90deg, rgba(198, 163, 90, .06) 1px, transparent 1px);
  background-size: 97px 97px, 12vw 100%;
  opacity: .34;
  z-index: 0;
}

.opening-lines {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background: var(--void);
  animation: chamberOpen 3.8s cubic-bezier(.22, 1, .36, 1) forwards;
}

.measure-line {
  position: absolute;
  left: 50%;
  top: 18vh;
  width: 2px;
  height: 64vh;
  background: var(--ivory);
  box-shadow: 0 0 18px rgba(244, 235, 210, .5);
  transform-origin: center top;
  transform: scaleY(0);
}

.measure-line-one { animation: drawLine 1.1s .25s ease-out forwards; }
.measure-line-two { background: var(--gold); animation: duplicateLine 1.8s 1.05s cubic-bezier(.18, 1.42, .32, 1) forwards; }

.observatory, .chamber { position: relative; z-index: 1; }
.observatory { min-height: 100vh; padding: 24px clamp(18px, 4vw, 64px) 80px; }

.void-map {
  position: fixed;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(109, 167, 216, .12), transparent 18%), conic-gradient(from 22deg at 50% 48%, transparent, rgba(198, 163, 90, .08), transparent 28%);
  transition: background-position .2s ease;
}

.standard-bar {
  position: fixed;
  inset: 4vh auto 4vh 50%;
  width: 62px;
  transform: translateX(-50%) rotate(-7deg);
  z-index: 0;
  pointer-events: none;
}

.standard-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(var(--ivory), var(--gold), var(--ivory));
  opacity: .42;
}
.standard-bar span:first-child { left: 24px; }
.standard-bar span:last-child { left: 34px; transform: translateY(18px); opacity: .24; background: var(--red); }

.constellation-rail {
  position: fixed;
  right: clamp(12px, 3vw, 42px);
  top: 50%;
  width: 148px;
  height: 148px;
  border: 1px solid rgba(198, 163, 90, .42);
  border-radius: 50%;
  transform: translateY(-50%) rotate(var(--rail-rotation));
  z-index: 4;
}

.constellation-rail::before, .constellation-rail::after {
  content: "";
  position: absolute;
  inset: 21px;
  border: 1px solid rgba(109, 167, 216, .22);
  border-radius: 50%;
}
.constellation-rail::after { inset: 68px; background: var(--gold); box-shadow: 0 0 14px var(--gold); }

.rail-link {
  position: absolute;
  color: var(--ivory);
  text-decoration: none;
  font: 500 10px IBM Plex Mono, monospace;
  text-transform: uppercase;
  letter-spacing: .18em;
  opacity: .55;
}
.rail-link.active { color: var(--blue); opacity: 1; }
.rail-link:nth-child(1) { top: -6px; left: 42px; }
.rail-link:nth-child(2) { top: 68px; right: -28px; }
.rail-link:nth-child(3) { bottom: -8px; left: 24px; }
.rail-link:nth-child(4) { top: 68px; left: -18px; }

.hero {
  min-height: 96vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
  align-items: center;
  gap: clamp(28px, 6vw, 92px);
  padding: 7vh 0 4vh;
}

.plate-kicker, .limelight {
  font-family: Limelight, Georgia, serif;
  color: var(--gold);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.domain-title {
  margin: 0;
  font-family: Commissioner, Inter, sans-serif;
  font-variation-settings: "wght" 780, "wdth" var(--title-width);
  font-size: clamp(3.2rem, 12vw, 11.8rem);
  line-height: .78;
  letter-spacing: .075em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(109, 167, 216, .13);
}
.domain-title span { display: block; transform: translateY(22px); opacity: 0; animation: assemble .9s cubic-bezier(.2, 1, .3, 1) forwards; }
.domain-title span:nth-child(2) { animation-delay: .18s; color: transparent; -webkit-text-stroke: 1px var(--ivory); }
.domain-title .dot-org { animation-delay: .33s; font-size: .28em; line-height: 1.5; color: var(--blue); -webkit-text-stroke: 0; }

.hero-copy { max-width: 520px; margin-top: 34px; color: rgba(244, 235, 210, .77); font-size: clamp(1rem, 1.8vw, 1.35rem); }
.mono { font-family: IBM Plex Mono, ui-monospace, monospace; color: var(--blue); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }

.hero-orbit {
  justify-self: center;
  width: min(74vw, 460px);
  aspect-ratio: 1;
  padding: 24px;
  border: 1px solid rgba(198, 163, 90, .45);
  clip-path: polygon(8% 0, 92% 0, 100% 8%, 100% 92%, 92% 100%, 8% 100%, 0 92%, 0 8%);
  background: rgba(14, 35, 64, .52);
}

svg { width: 100%; height: 100%; overflow: visible; }
.orbit, .halo { fill: none; stroke-width: 1.2; }
.gold { stroke: var(--gold); } .blue { stroke: var(--blue); } .ivory { stroke: var(--ivory); } .red { stroke: var(--red); }
.chart-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 640; stroke-dashoffset: 640; animation: drawChart 2.8s 1.6s ease forwards; }
.axis { stroke: rgba(244, 235, 210, .24); stroke-width: 1; }
.star { fill: var(--gold); opacity: .85; }
.nodes circle, .constellation circle { fill: var(--ivory); filter: drop-shadow(0 0 6px rgba(244, 235, 210, .7)); }

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(96px, auto);
  gap: clamp(16px, 2vw, 28px);
  padding: 7vh 0;
}

.plate {
  position: relative;
  min-height: 300px;
  padding: clamp(22px, 3vw, 36px);
  background: linear-gradient(145deg, rgba(14, 35, 64, .92), rgba(2, 7, 19, .66));
  border: 1px solid rgba(244, 235, 210, .18);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  box-shadow: inset 0 0 0 1px rgba(198, 163, 90, .18), 0 28px 80px rgba(0, 0, 0, .26);
  transform: translateY(42px) scale(.975);
  opacity: .16;
  transition: transform .9s cubic-bezier(.18, 1.4, .3, 1), opacity .9s ease, border-color .4s ease;
}
.plate.visible { transform: translateY(0) scale(1); opacity: 1; }
.plate:hover { border-color: rgba(109, 167, 216, .62); }
.plate:hover .twin-readout { color: var(--red); }
.plate::before, .plate::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-top: 1px solid rgba(198, 163, 90, .34);
  border-bottom: 1px solid rgba(198, 163, 90, .18);
  pointer-events: none;
}
.plate::after { inset: 0 auto 0 18px; width: 1px; background: repeating-linear-gradient(to bottom, var(--ivory) 0 5px, transparent 5px 15px); opacity: .28; border: 0; }
.offset-system { transform: translate(16px, 58px) scale(.965) rotate(.25deg); }
.offset-system.visible { transform: translate(16px, 0) scale(1) rotate(.25deg); }

.plate h2 { margin: 18px 0 14px; font-family: Commissioner, Inter, sans-serif; font-size: clamp(1.7rem, 3.7vw, 4rem); line-height: .92; letter-spacing: .03em; text-transform: uppercase; }
.plate p { color: rgba(244, 235, 210, .72); line-height: 1.65; max-width: 62ch; }
.plate-number { position: absolute; top: 18px; right: 20px; font-size: .84rem; }
.plate-tall { grid-column: span 4; grid-row: span 3; }
.plate-wide { grid-column: span 8; grid-row: span 2; }
.diamond-plate { grid-column: span 4; grid-row: span 2; }
.negative-well { grid-column: span 8; grid-row: span 3; }

.ruler-pair { display: grid; gap: 18px; margin: 40px 0; }
.ruler-pair i { display: block; height: 16px; background: repeating-linear-gradient(90deg, var(--ivory) 0 1px, transparent 1px 24px), linear-gradient(var(--gold), var(--gold)); background-size: 100% 100%, 100% 1px; background-repeat: no-repeat; background-position: left bottom; }
.ruler-pair i:nth-child(2) { transform: translateX(17px); background-image: repeating-linear-gradient(90deg, var(--red) 0 1px, transparent 1px 31px), linear-gradient(var(--gold), var(--gold)); }

.halo-chart { min-height: 180px; }
.halo.complete { stroke: var(--gold); }
.halo.clipped { stroke: var(--red); stroke-width: 3; }
.tick-row path { stroke: rgba(244, 235, 210, .35); stroke-dasharray: 2 13; }

.diamond-map { position: relative; width: 210px; aspect-ratio: 1; margin: 42px auto; border: 1px solid var(--gold); transform: rotate(45deg); }
.diamond-map span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--ivory); box-shadow: 0 0 12px var(--ivory); }
.diamond-map span:nth-child(1) { top: 22%; left: 22%; }
.diamond-map span:nth-child(2) { top: 50%; left: 53%; background: var(--red); }
.diamond-map span:nth-child(3) { right: 18%; bottom: 20%; background: var(--blue); }

.constellation { height: 210px; margin-top: 24px; }
.ghost { stroke: var(--red); stroke-dasharray: 8 12; opacity: .52; }
.ledger-bars { height: 230px; display: flex; align-items: end; gap: 18px; margin: 42px 0; border-bottom: 1px solid var(--gold); }
.ledger-bars span { flex: 1; height: var(--h); background: linear-gradient(var(--blue), rgba(109, 167, 216, .08)); border: 1px solid rgba(109, 167, 216, .7); }
.ledger-bars span:nth-child(even) { transform: translateY(22px); background: linear-gradient(var(--red), rgba(184, 74, 90, .08)); }

.orbit-window { position: relative; height: 260px; border-radius: 50%; border: 1px solid rgba(198, 163, 90, .5); margin-top: 26px; overflow: hidden; background: radial-gradient(circle, rgba(2, 7, 19, .5), transparent 66%); }
.orbit-window::before, .orbit-window::after { content: ""; position: absolute; inset: 42px; border: 1px solid rgba(109, 167, 216, .35); border-radius: 50%; }
.orbit-window::after { inset: 82px 110px; border-color: rgba(184, 74, 90, .45); transform: rotate(-12deg); }
.planet { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--ivory); box-shadow: 0 0 14px var(--ivory); }
.p1 { left: 20%; top: 56%; } .p2 { left: 48%; top: 28%; background: var(--gold); } .p3 { right: 18%; top: 61%; background: var(--red); }

.closing { min-height: 54vh; display: grid; place-content: center; text-align: center; }
.closing h2 { margin: 0; font-family: Commissioner, Inter, sans-serif; font-size: clamp(2.6rem, 7vw, 8rem); line-height: .9; text-transform: uppercase; font-variation-settings: "wght" 760, "wdth" 92; }
.closing p:last-child { max-width: 620px; margin: 26px auto; color: rgba(244, 235, 210, .72); }

@keyframes drawLine { to { transform: scaleY(1); } }
@keyframes duplicateLine { 0% { transform: translateX(0) scaleY(0); } 62% { transform: translateX(32px) scaleY(1.08) rotate(2.4deg); } 100% { transform: translateX(18px) scaleY(1) rotate(1.2deg); } }
@keyframes chamberOpen { 0%, 72% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes assemble { to { transform: translateY(0); opacity: 1; } }
@keyframes drawChart { to { stroke-dashoffset: 0; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 10vh; }
  .constellation-rail { display: none; }
  .evidence-grid { grid-template-columns: 1fr; }
  .plate, .plate-tall, .plate-wide, .diamond-plate, .negative-well { grid-column: 1; }
  .offset-system.visible { transform: translate(0, 0) scale(1); }
}
