:root {
  /* compliance tokens: IBM Plex Mono** coordinates IBM Plex Sans** Mon San */
  --void: #05070A;
  --lichen: #39FF14;
  --cyan: #00E5FF;
  --violet: #B026FF;
  --bone: #F2F0DA;
  --moss: #2F5D32;
  --ochre: #B46A28;
  --white: #FFFFFF;
  --display: 'Bebas Neue', Impact, sans-serif;
  --sans: 'IBM Plex Sans', Arial, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--void);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--bone);
  background:
    radial-gradient(circle at 78% 12%, rgba(176, 38, 255, .16), transparent 30vw),
    radial-gradient(circle at 12% 82%, rgba(47, 93, 50, .28), transparent 34vw),
    linear-gradient(180deg, #05070A 0%, #071009 44%, #05070A 100%);
  font-family: var(--sans);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.cave-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .34;
  background-image:
    radial-gradient(circle, rgba(242, 240, 218, .16) 0 1px, transparent 1px),
    linear-gradient(115deg, transparent 0 48%, rgba(57, 255, 20, .05) 49% 51%, transparent 52%);
  background-size: 41px 41px, 260px 260px;
  mix-blend-mode: screen;
}

.spore-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.spore {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--lichen);
  box-shadow: 0 0 14px var(--lichen);
  opacity: .42;
  animation: drift var(--duration) linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 110vh, 0); }
  to { transform: translate3d(var(--sway), -12vh, 0); }
}

.perimeter-trace {
  position: fixed;
  inset: 22px;
  z-index: 5;
  pointer-events: none;
  border: 1px solid rgba(0, 229, 255, .22);
}

.perimeter-trace::before,
.perimeter-trace::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  animation: trace 7s linear infinite;
}

.perimeter-trace::before { border-top-color: var(--cyan); border-right-color: var(--cyan); }
.perimeter-trace::after { border-bottom-color: var(--violet); border-left-color: var(--lichen); animation-delay: -3.5s; }

@keyframes trace {
  0%, 100% { clip-path: inset(0 100% 100% 0); opacity: .2; }
  25% { clip-path: inset(0 0 96% 0); opacity: .95; }
  50% { clip-path: inset(0 0 0 96%); }
  75% { clip-path: inset(96% 0 0 0); }
}

.site-rail {
  position: fixed;
  left: 34px;
  top: 34px;
  bottom: 34px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 12px;
}

.rail-mark {
  color: var(--lichen);
  writing-mode: vertical-rl;
  letter-spacing: .3em;
}

.rail-nav {
  display: grid;
  gap: 18px;
}

.rail-nav a {
  color: rgba(242, 240, 218, .48);
  transition: color .3s ease, text-shadow .3s ease;
}

.rail-nav a.active,
.rail-nav a:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan);
}

.clearing {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12vh 9vw 12vh 14vw;
  isolation: isolate;
}

.clearing::after {
  content: attr(data-scene);
  position: absolute;
  right: 7vw;
  bottom: 7vh;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(242, 240, 218, .22);
  letter-spacing: .36em;
  text-transform: uppercase;
}

.hero {
  align-items: end;
  justify-items: start;
}

.coordinate,
.proof-number,
.mono-readout,
.artifact-label,
.etched-label {
  font-family: var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.coordinate {
  color: var(--cyan);
  font-size: 12px;
  margin: 0 0 1rem;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  margin: 0;
  color: var(--white);
  line-height: .86;
  letter-spacing: .01em;
}

h1 {
  font-size: clamp(6rem, 18vw, 20rem);
  margin-left: -1vw;
  text-shadow: 0 0 34px rgba(0, 229, 255, .16);
}

h2 {
  font-size: clamp(4.5rem, 10vw, 12rem);
  max-width: 9ch;
}

p {
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  line-height: 1.55;
  color: rgba(242, 240, 218, .78);
  max-width: 38rem;
}

.thesis {
  margin: 1.1rem 0 0;
  color: var(--bone);
  font-size: clamp(1.2rem, 2.1vw, 2.1rem);
}

.artifact {
  position: absolute;
  transform-style: preserve-3d;
  transition: transform .18s ease-out;
  filter: drop-shadow(0 0 22px rgba(57, 255, 20, .18));
}

.relic-abacus {
  right: 13vw;
  top: 17vh;
  width: 260px;
  height: 220px;
}

.iso-platform {
  position: absolute;
  inset: 70px 20px 46px;
  transform: skewY(-25deg) rotate(8deg);
  border: 2px solid var(--cyan);
  background: linear-gradient(135deg, rgba(47, 93, 50, .58), rgba(5, 7, 10, .8));
  box-shadow: 0 0 24px rgba(0, 229, 255, .28), inset 0 0 20px rgba(57, 255, 20, .1);
}

.crystal {
  position: absolute;
  width: 42px;
  height: 96px;
  background: linear-gradient(155deg, rgba(255,255,255,.85), rgba(0,229,255,.2) 42%, rgba(176,38,255,.5));
  clip-path: polygon(50% 0, 100% 26%, 76% 100%, 22% 100%, 0 26%);
  border: 1px solid var(--white);
}

.crystal-one { left: 76px; top: 28px; }
.crystal-two { left: 128px; top: 48px; height: 118px; }
.crystal-three { left: 180px; top: 36px; }

.artifact-label {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 10px;
  color: var(--lichen);
}

.glyph {
  position: absolute;
  border: 1px solid var(--violet);
  opacity: .58;
}

.glyph-triangle {
  left: 28vw;
  top: 18vh;
  width: 120px;
  height: 120px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  animation: pulseGlyph 5s ease-in-out infinite;
}

@keyframes pulseGlyph {
  50% { box-shadow: 0 0 26px rgba(176, 38, 255, .5); opacity: 1; }
}

.shelf {
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: 12vw;
  place-items: center start;
}

.reverse { grid-template-columns: 1fr minmax(280px, 520px); }

.stone-slab,
.verdict-block {
  position: relative;
  padding: 42px;
  background: linear-gradient(145deg, rgba(47, 93, 50, .22), rgba(5, 7, 10, .8));
  border: 1px solid rgba(242, 240, 218, .18);
}

.animated-border::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, var(--cyan), var(--lichen), var(--violet), var(--cyan));
  background-size: 300% 100%;
  z-index: -1;
  clip-path: polygon(0 0, 100% 0, 100% 2px, 2px 2px, 2px calc(100% - 2px), 100% calc(100% - 2px), 100% 100%, 0 100%);
  animation: borderWalk 6s linear infinite;
}

@keyframes borderWalk { to { background-position: 300% 0; } }

.proof-number {
  display: block;
  color: var(--lichen);
  font-size: 12px;
  margin-bottom: 28px;
}

.theorem-tablet {
  position: relative;
  width: 280px;
  height: 300px;
}

.tablet-face {
  position: absolute;
  inset: 38px;
  transform: rotate(-12deg) skewY(12deg);
  background: linear-gradient(150deg, #2F5D32, #182718 55%, #05070A);
  border: 2px solid var(--ochre);
  box-shadow: inset 0 0 28px rgba(0,0,0,.5), 0 0 28px rgba(180,106,40,.2);
}

.tablet-face i {
  display: block;
  width: 70%;
  height: 2px;
  margin: 42px auto;
  background: var(--bone);
  box-shadow: 0 0 10px var(--cyan);
}

.etched-label {
  position: absolute;
  left: 0;
  bottom: 16px;
  font-size: 10px;
  color: var(--ochre);
}

.proof-line {
  position: absolute;
  left: 50%;
  right: 12vw;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform-origin: left;
}

.vertical {
  grid-template-columns: 1fr 430px;
  gap: 10vw;
}

.constellation {
  position: relative;
  width: min(58vw, 620px);
  height: 430px;
}

.node-lines {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.node-lines path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-dasharray: 16 12;
  filter: drop-shadow(0 0 10px var(--cyan));
  animation: dashMove 9s linear infinite;
}

@keyframes dashMove { to { stroke-dashoffset: -140; } }

.node {
  position: absolute;
  z-index: 2;
  width: 130px;
  height: 72px;
  border: 1px solid var(--bone);
  background: rgba(5, 7, 10, .82);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease, box-shadow .25s ease;
}

.node.active {
  color: var(--void);
  background: var(--lichen);
  border-color: var(--lichen);
  box-shadow: 0 0 28px rgba(57, 255, 20, .45);
}

.circle { left: 48px; top: 170px; border-radius: 50%; }
.triangle { left: 205px; top: 58px; clip-path: polygon(50% 0, 100% 100%, 0 100%); padding-top: 28px; }
.hex { left: 376px; top: 165px; clip-path: polygon(20% 0, 80% 0, 100% 50%, 80% 100%, 20% 100%, 0 50%); }
.diamond { left: 240px; top: 292px; transform: rotate(45deg); }
.diamond::first-line { transform: rotate(-45deg); }

.evidence-column {
  border-left: 1px solid rgba(242, 240, 218, .24);
  padding-left: 34px;
}

.mono-readout {
  color: var(--cyan);
  font-size: 12px;
}

.offaxis {
  grid-template-columns: 1fr 460px;
  gap: 11vw;
}

.mushroom-proof {
  position: relative;
  width: 330px;
  height: 380px;
  justify-self: center;
}

.cap {
  position: absolute;
  left: 28px;
  top: 58px;
  width: 270px;
  height: 132px;
  border-radius: 160px 160px 28px 28px;
  background: radial-gradient(circle at 36% 34%, var(--cyan), var(--violet) 24%, #351642 52%, #05070A 100%);
  border: 2px solid var(--violet);
  box-shadow: 0 0 38px rgba(176, 38, 255, .36);
}

.gills {
  position: absolute;
  left: 78px;
  top: 176px;
  width: 170px;
  height: 38px;
  background: repeating-linear-gradient(90deg, var(--bone) 0 2px, transparent 2px 18px);
  opacity: .8;
}

.stem {
  position: absolute;
  left: 126px;
  top: 196px;
  width: 78px;
  height: 150px;
  border-radius: 35px 35px 22px 22px;
  background: linear-gradient(90deg, #F2F0DA, #9b9279);
}

.premise-chip {
  position: absolute;
  padding: 8px 12px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  background: var(--void);
}

.chip-a { left: 4px; top: 136px; }
.chip-b { right: 2px; top: 222px; border-color: var(--lichen); color: var(--lichen); }

.root-system {
  position: absolute;
  left: 20vw;
  bottom: 13vh;
  width: 38vw;
  height: 1px;
  background: var(--ochre);
  box-shadow: 44px 18px 0 rgba(180,106,40,.8), 96px -14px 0 rgba(180,106,40,.55), 170px 24px 0 rgba(180,106,40,.45);
  opacity: .42;
}

.stone-cairn {
  position: relative;
  width: 320px;
  height: 330px;
  justify-self: center;
}

.stone {
  position: absolute;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--void);
  background: linear-gradient(145deg, var(--bone), #777260);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 20px rgba(0,229,255,.22);
}

.s1 { left: 70px; bottom: 32px; width: 180px; height: 66px; border-radius: 48% 52% 42% 58%; }
.s2 { left: 92px; bottom: 98px; width: 138px; height: 58px; border-radius: 40% 60% 55% 45%; border-color: var(--violet); }
.s3 { left: 118px; bottom: 154px; width: 92px; height: 54px; border-radius: 55% 45% 60% 40%; border-color: var(--lichen); }

.exit {
  min-height: 115vh;
  grid-template-columns: 280px minmax(300px, 650px);
  gap: 10vw;
}

.lantern {
  position: relative;
  width: 240px;
  height: 330px;
}

.lantern-top {
  position: absolute;
  left: 78px;
  top: 20px;
  width: 84px;
  height: 42px;
  border: 2px solid var(--ochre);
  border-radius: 50% 50% 0 0;
}

.lantern-body {
  position: absolute;
  left: 54px;
  top: 70px;
  width: 132px;
  height: 160px;
  border: 2px solid var(--cyan);
  background: rgba(0, 229, 255, .08);
}

.lantern-light {
  position: absolute;
  left: 98px;
  top: 118px;
  width: 44px;
  height: 68px;
  background: var(--lichen);
  box-shadow: 0 0 70px 36px rgba(57, 255, 20, .35), 80px 0 140px 70px rgba(0,229,255,.18);
  animation: lantern 4s ease-in-out infinite;
}

@keyframes lantern { 50% { opacity: .72; transform: scale(.92); } }

.exit-copy h2 { max-width: 11ch; }

@media (max-width: 820px) {
  .site-rail { display: none; }
  .clearing,
  .shelf,
  .reverse,
  .vertical,
  .offaxis,
  .exit {
    display: grid;
    grid-template-columns: 1fr;
    padding: 14vh 7vw;
    gap: 44px;
  }
  .artifact { position: relative; inset: auto; }
  .relic-abacus { justify-self: end; }
  .constellation { width: 100%; transform: scale(.72); transform-origin: left center; }
  h1 { font-size: 28vw; }
}
