:root {
  --vacuum: #11151A;
  --oxide: #2C333A;
  --silver: #AEB7C0;
  --fog: #E6EAEE;
  --cathode: #7CA7B8;
  --amber: #D6A24A;
  --shadow: #1B1A24;
  --cursor-x: 50vw;
  --cursor-y: 50vh;
  --hex-size: min(42vw, 430px);
  --stroke-opacity: .26;
  --stage-shift-x: 0px;
  --stage-shift-y: 0px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: #11151A;
  color: #E6EAEE;
}

body {
  font-family: "Libre Baskerville", Georgia, serif;
  cursor: crosshair;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(124, 167, 184, .16), transparent 16rem),
    radial-gradient(circle at 50% 45%, rgba(124, 167, 184, .13), transparent 36rem),
    linear-gradient(135deg, #11151A 0%, #1B1A24 44%, #2C333A 100%);
  pointer-events: none;
}

.warmup {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #11151A;
  animation: monitorWarm 2.8s ease forwards;
  pointer-events: none;
}

.noise-field,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.noise-field {
  opacity: .28;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(230, 234, 238, .45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 81% 33%, rgba(174, 183, 192, .35) 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 74%, rgba(124, 167, 184, .28) 0 1px, transparent 1.5px),
    radial-gradient(circle at 64% 58%, rgba(214, 162, 74, .18) 0 1px, transparent 1.5px);
  background-size: 31px 37px, 43px 41px, 53px 47px, 71px 67px;
  filter: contrast(160%);
  animation: dustDrift 14s steps(8) infinite;
}

.scanlines {
  opacity: .16;
  background: repeating-linear-gradient(to bottom, transparent 0 8px, rgba(230, 234, 238, .08) 9px, transparent 11px);
  border-radius: 28px;
}

.inspection-lens {
  position: fixed;
  left: var(--cursor-x);
  top: var(--cursor-y);
  width: 19rem;
  height: 19rem;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(174, 183, 192, .28);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(230, 234, 238, .10), rgba(124, 167, 184, .05) 38%, transparent 69%),
    conic-gradient(from 20deg, transparent, rgba(214, 162, 74, .20), transparent 18%, transparent 100%);
  box-shadow: 0 0 44px rgba(124, 167, 184, .18), inset 0 0 38px rgba(230, 234, 238, .08);
  opacity: .72;
  pointer-events: none;
  z-index: 8;
  transition: opacity .35s ease;
}

.coordinate-tag {
  position: fixed;
  left: calc(var(--cursor-x) + 26px);
  top: calc(var(--cursor-y) + 24px);
  z-index: 9;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .18em;
  color: #D6A24A;
  background: rgba(17, 21, 26, .74);
  border: 1px solid rgba(214, 162, 74, .22);
  padding: 7px 9px;
  text-transform: uppercase;
  pointer-events: none;
}

.site-shell {
  position: relative;
  min-height: 400vh;
  z-index: 4;
}

.lattice-stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(124, 167, 184, .10), transparent 32rem),
    linear-gradient(90deg, rgba(174, 183, 192, .04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(174, 183, 192, .025) 1px, transparent 1px);
  background-size: auto, 74px 74px, 74px 74px;
}

.lattice-stage::before {
  content: "";
  position: absolute;
  inset: -14%;
  background-image:
    linear-gradient(30deg, rgba(174, 183, 192, .12) 12%, transparent 12.5%, transparent 87%, rgba(174, 183, 192, .12) 87.5%),
    linear-gradient(150deg, rgba(174, 183, 192, .12) 12%, transparent 12.5%, transparent 87%, rgba(174, 183, 192, .12) 87.5%),
    linear-gradient(30deg, rgba(174, 183, 192, .12) 12%, transparent 12.5%, transparent 87%, rgba(174, 183, 192, .12) 87.5%),
    linear-gradient(150deg, rgba(174, 183, 192, .12) 12%, transparent 12.5%, transparent 87%, rgba(174, 183, 192, .12) 87.5%);
  background-size: 150px 260px;
  background-position: 0 0, 0 0, 75px 130px, 75px 130px;
  opacity: 0;
  transform: translate(var(--stage-shift-x), var(--stage-shift-y));
  animation: latticeWake 2.6s .5s ease forwards;
  transition: transform 1.2s cubic-bezier(.2, .7, .1, 1);
}

.honeycomb {
  position: absolute;
  inset: 0;
  transform: translate(var(--stage-shift-x), var(--stage-shift-y));
  transition: transform 1.2s cubic-bezier(.2, .7, .1, 1);
}

.hex {
  position: absolute;
  width: 240px;
  aspect-ratio: 1.1547;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  background: linear-gradient(135deg, rgba(44, 51, 58, .36), rgba(17, 21, 26, .46));
  border: 1px solid rgba(174, 183, 192, var(--stroke-opacity));
  box-shadow: inset 0 0 0 1px rgba(230, 234, 238, .035), 0 0 34px rgba(124, 167, 184, .03);
}

.hex::after {
  content: "";
  position: absolute;
  inset: 8px;
  clip-path: inherit;
  border: 1px solid rgba(174, 183, 192, .13);
  opacity: .8;
}

.hex span {
  position: absolute;
  left: 32px;
  bottom: 36px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .26em;
  color: rgba(174, 183, 192, .62);
}

.hex.near {
  border-color: rgba(214, 162, 74, .78);
  box-shadow: inset 0 0 0 1px rgba(214, 162, 74, .16), 0 0 34px rgba(214, 162, 74, .14);
}

.hex-a { left: -70px; top: 11vh; }
.hex-b { left: 13vw; top: -92px; }
.hex-c { right: 11vw; top: 9vh; }
.hex-d { right: -68px; top: 42vh; }
.hex-e { left: 9vw; bottom: -46px; }
.hex-f { right: 19vw; bottom: 4vh; }

.central-cell {
  left: 50%;
  top: 50%;
  width: var(--hex-size);
  min-width: 330px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 3.2rem;
  clip-path: none;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.central-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  background: linear-gradient(145deg, rgba(27, 26, 36, .84), rgba(44, 51, 58, .50));
  box-shadow: inset 0 0 70px rgba(124, 167, 184, .09), 0 0 80px rgba(17, 21, 26, .76);
}

.hex-draw {
  position: absolute;
  inset: -1px;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hex-draw polygon {
  fill: transparent;
  stroke: #AEB7C0;
  stroke-width: 1.2;
  stroke-dasharray: 920;
  stroke-dashoffset: 920;
  filter: drop-shadow(0 0 8px rgba(124, 167, 184, .28));
  animation: drawHex 3.2s .8s ease forwards;
}

.cell-coords,
.chamber-label,
.field-note span,
.chamber-nav button {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
}

.cell-coords {
  position: relative;
  margin-bottom: .8rem;
  font-size: 10px;
  letter-spacing: .28em;
  color: #D6A24A;
  opacity: 0;
  animation: reveal 1s 2s ease forwards;
}

h1 {
  position: relative;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: .83;
  letter-spacing: .075em;
  color: #E6EAEE;
  text-shadow: 0 0 26px rgba(124, 167, 184, .20);
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 1.4s 1.8s ease forwards;
}

.definition {
  position: relative;
  max-width: 25rem;
  margin: 1.3rem auto 0;
  color: rgba(230, 234, 238, .72);
  font-size: clamp(.9rem, 1.3vw, 1.05rem);
  line-height: 1.72;
  opacity: 0;
  animation: reveal 1.1s 2.5s ease forwards;
}

.protoform {
  position: relative;
  width: 170px;
  height: 130px;
  margin-top: 1.45rem;
  opacity: 0;
  animation: reveal .8s 2.45s ease forwards;
}

.shape {
  position: absolute;
  display: block;
  transform-origin: center;
  animation: alignShape 3.8s cubic-bezier(.2, .8, .08, 1) forwards;
}

.shape-triangle {
  left: 20px;
  top: 27px;
  width: 0;
  height: 0;
  border-left: 34px solid transparent;
  border-right: 34px solid transparent;
  border-bottom: 66px solid rgba(124, 167, 184, .34);
  filter: drop-shadow(0 0 10px rgba(124, 167, 184, .32));
  transform: rotate(-51deg) translateX(-35px);
}

.shape-capsule {
  left: 67px;
  top: 18px;
  width: 78px;
  height: 24px;
  border-radius: 99px;
  border: 1px solid #AEB7C0;
  background: rgba(230, 234, 238, .06);
  transform: rotate(50deg) translateY(-36px);
}

.shape-ring {
  left: 88px;
  top: 53px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(214, 162, 74, .74);
  box-shadow: 0 0 16px rgba(214, 162, 74, .18);
  transform: rotate(88deg) translateX(30px);
}

.shape-cube {
  left: 36px;
  top: 64px;
  width: 57px;
  height: 45px;
  border: 1px solid rgba(230, 234, 238, .58);
  transform: skewY(-16deg) rotate(34deg) translateY(42px);
}

.shape-cube i {
  position: absolute;
  inset: 9px -11px -9px 11px;
  border: 1px solid rgba(174, 183, 192, .40);
}

.pilot-row {
  position: relative;
  display: flex;
  gap: 18px;
  margin-top: 1.4rem;
}

.pilot-row b {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #D6A24A;
  box-shadow: 0 0 12px #D6A24A;
  animation: pilot 3.7s infinite;
}

.pilot-row b:nth-child(2) { animation-delay: .8s; }
.pilot-row b:nth-child(3) { animation-delay: 1.7s; }

.chamber {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s ease;
}

.chamber.active { opacity: 1; }

.chamber-label {
  position: absolute;
  left: 4vw;
  top: 4vh;
  font-size: 11px;
  letter-spacing: .24em;
  color: rgba(174, 183, 192, .72);
  padding-left: 52px;
}

.chamber-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 38px;
  height: 1px;
  background: #D6A24A;
}

.field-note {
  position: absolute;
  width: min(27rem, 35vw);
  color: rgba(230, 234, 238, .70);
  font-size: .98rem;
  line-height: 1.85;
  padding: 1.1rem 0 0 1.4rem;
  border-left: 1px solid rgba(174, 183, 192, .24);
}

.field-note span {
  display: block;
  margin-bottom: .7rem;
  font-size: 10px;
  letter-spacing: .24em;
  color: #7CA7B8;
}

.note-origin { left: 7vw; top: 35vh; }
.note-measure { right: 5vw; top: 26vh; }
.note-iterate { left: 11vw; bottom: 16vh; }
.note-held { right: 10vw; bottom: 15vh; }

.ghost-orbit {
  position: absolute;
  border: 1px solid rgba(124, 167, 184, .12);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-a {
  width: 62vw;
  height: 62vw;
  left: 19vw;
  top: 6vh;
  animation: slowOrbit 28s linear infinite;
}

.orbit-b {
  width: 32vw;
  height: 32vw;
  right: -7vw;
  top: 22vh;
  animation: slowOrbit 18s linear reverse infinite;
}

.ghost-orbit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  top: 18%;
  left: 21%;
  border-radius: 50%;
  background: #D6A24A;
  box-shadow: 0 0 16px #D6A24A;
}

.chamber-nav {
  position: absolute;
  right: 3.5vw;
  bottom: 4vh;
  display: grid;
  gap: 10px;
  z-index: 7;
}

.chamber-nav button {
  width: 9.6rem;
  padding: 10px 12px;
  color: rgba(174, 183, 192, .68);
  background: rgba(17, 21, 26, .48);
  border: 1px solid rgba(174, 183, 192, .20);
  font-size: 10px;
  letter-spacing: .19em;
  text-align: left;
  cursor: crosshair;
  transition: color .3s ease, border-color .3s ease, transform .3s ease;
}

.chamber-nav button.active,
.chamber-nav button:hover {
  color: #E6EAEE;
  border-color: rgba(214, 162, 74, .66);
  transform: translateX(-8px);
}

body[data-chamber="1"] { --stage-shift-x: -7vw; --stage-shift-y: 2vh; --stroke-opacity: .36; }
body[data-chamber="2"] { --stage-shift-x: 6vw; --stage-shift-y: -4vh; --stroke-opacity: .42; }
body[data-chamber="3"] { --stage-shift-x: -3vw; --stage-shift-y: -8vh; --stroke-opacity: .30; }

body[data-chamber="1"] .shape-triangle { border-bottom-color: rgba(230, 234, 238, .22); }
body[data-chamber="1"] .shape-ring { transform: rotate(18deg) translateX(-10px); }
body[data-chamber="2"] .shape-capsule { transform: rotate(-12deg) translateY(8px); border-color: #D6A24A; }
body[data-chamber="2"] .shape-cube { transform: skewY(-16deg) rotate(-12deg) translateY(0); }
body[data-chamber="3"] .shape-triangle { transform: rotate(0deg) translateX(12px); }
body[data-chamber="3"] .shape-ring { border-color: #7CA7B8; }

@keyframes monitorWarm {
  0% { opacity: 1; }
  58% { opacity: .86; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes latticeWake {
  from { opacity: 0; filter: blur(10px); }
  to { opacity: 1; filter: blur(0); }
}

@keyframes drawHex { to { stroke-dashoffset: 0; } }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes alignShape {
  to { transform: rotate(0deg) translate(0, 0) skewY(0deg); }
}

@keyframes pilot {
  0%, 78%, 100% { opacity: .25; }
  12% { opacity: 1; }
}

@keyframes dustDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-31px, 37px); }
}

@keyframes slowOrbit { to { transform: rotate(360deg); } }

@media (max-width: 800px) {
  :root { --hex-size: 86vw; }
  .hex-offline { opacity: .42; }
  .field-note { width: 82vw; left: 8vw; right: auto; bottom: 12vh; top: auto; }
  .chamber-nav { right: auto; left: 5vw; grid-template-columns: repeat(2, 1fr); }
  .chamber-nav button { width: 44vw; }
  .coordinate-tag { display: none; }
}
