:root {
  /* Design typography tokens: Inter** very interface details maximum neutrality needed and edge Grotesk** wordmark */
  --void: #05060A;
  --polar: #071B2E;
  --green: #39FF88;
  --cyan: #18F3FF;
  --violet: #8A5CFF;
  --magenta: #FF2BD6;
  --ice: #EAFDFF;
  --green-glow: 0 0 18px rgba(57, 255, 136, .55), 0 0 42px rgba(57, 255, 136, .18);
  --cyan-glow: 0 0 18px rgba(24, 243, 255, .5), 0 0 52px rgba(24, 243, 255, .15);
  --magenta-glow: 0 0 14px rgba(255, 43, 214, .6), 0 0 40px rgba(255, 43, 214, .18);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--ice);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 80%, rgba(24, 243, 255, .10), transparent 25%),
    linear-gradient(90deg, rgba(5, 6, 10, .72), transparent 18%, transparent 82%, rgba(5, 6, 10, .75));
  z-index: 20;
}

.fixed-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 55% 100%, rgba(7, 27, 46, .75), transparent 42%),
    linear-gradient(180deg, #05060A 0%, #05060A 60%, #071B2E 130%);
  z-index: 0;
}

.star-noise {
  position: absolute;
  inset: 0;
  opacity: .23;
  background-image:
    radial-gradient(circle, rgba(234, 253, 255, .42) 0 1px, transparent 1.2px),
    radial-gradient(circle, rgba(24, 243, 255, .28) 0 1px, transparent 1.2px);
  background-size: 210px 170px, 340px 260px;
  background-position: 17px 23px, 140px 80px;
}

.aurora {
  position: absolute;
  width: 130vw;
  height: 38vh;
  left: -14vw;
  top: 10vh;
  opacity: .55;
  filter: blur(16px);
  transform: translate3d(var(--drift, 0px), 0, 0) skewX(-12deg);
  border-radius: 50%;
  mix-blend-mode: screen;
}

.aurora-one {
  background: linear-gradient(110deg, transparent 0 18%, rgba(57, 255, 136, .05) 28%, rgba(57, 255, 136, .44) 37%, rgba(24, 243, 255, .16) 45%, transparent 62%);
  animation: auroraBreathe 9s ease-in-out infinite alternate;
}

.aurora-two {
  top: 24vh;
  left: 8vw;
  opacity: .34;
  background: linear-gradient(100deg, transparent 0 25%, rgba(138, 92, 255, .35) 42%, rgba(24, 243, 255, .12) 54%, transparent 76%);
  animation: auroraBreathe 12s ease-in-out infinite alternate-reverse;
}

.aurora-three {
  top: 2vh;
  left: -30vw;
  opacity: .28;
  background: linear-gradient(98deg, transparent 0 12%, rgba(24, 243, 255, .34) 30%, rgba(57, 255, 136, .14) 44%, transparent 58%);
  animation: auroraBreathe 15s ease-in-out infinite alternate;
}

.horizon-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20vh;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24, 243, 255, .4), rgba(57, 255, 136, .36), transparent);
  box-shadow: 0 0 36px rgba(24, 243, 255, .16);
}

.site-mark {
  position: fixed;
  top: 28px;
  left: 34px;
  right: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  font-family: "Space Grotesk", Inter, sans-serif;
  letter-spacing: -.035em;
}

.site-mark span {
  font-size: 15px;
  color: var(--ice);
  text-shadow: var(--cyan-glow);
}

.site-mark i {
  font-family: Archivo, Inter, sans-serif;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(234, 253, 255, .54);
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  z-index: 5;
}

.track {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  width: 720vw;
  height: 100vh;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.panel {
  position: relative;
  flex: 0 0 120vw;
  height: 100vh;
  overflow: hidden;
  border-left: 1px solid rgba(24, 243, 255, .04);
}

.panel::after {
  content: "";
  position: absolute;
  left: 12vw;
  right: 12vw;
  bottom: 20vh;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(234, 253, 255, .08), rgba(24, 243, 255, .18), transparent);
}

.quest-svg {
  position: absolute;
  inset: 0;
  width: 720vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.quest-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.path-shadow {
  stroke: rgba(24, 243, 255, .14);
  stroke-width: 9;
  filter: blur(10px);
}

.path-main {
  stroke: var(--green);
  stroke-width: 2.2;
  filter: url(#greenGlow);
  transition: stroke .25s ease;
}

.path-after {
  stroke: var(--magenta);
  stroke-width: 1.4;
  opacity: 0;
  transition: opacity .16s ease, transform .16s ease;
}

.chapter {
  position: absolute;
  z-index: 4;
  max-width: 620px;
}

.micro-label,
.caption,
.floating-coordinate {
  font-family: Archivo, Inter, sans-serif;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(234, 253, 255, .62);
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 500;
  letter-spacing: -.075em;
  line-height: .9;
  color: var(--ice);
}

h1 {
  font-size: clamp(76px, 15vw, 230px);
  text-shadow: 0 0 34px rgba(24, 243, 255, .15);
}

h2 {
  font-size: clamp(42px, 6.8vw, 118px);
}

.opening { left: 7vw; top: 30vh; }
.opening .caption { margin-top: 26px; color: rgba(57, 255, 136, .78); }
.small-left { left: 20vw; top: 23vh; }
.lower-note { left: 43vw; bottom: 15vh; }
.error-copy { left: 18vw; top: 18vh; }
.shrine-text { left: 15vw; bottom: 18vh; }
.horizon-text { left: 23vw; top: 24vh; max-width: 820px; }

.ribbon-glyph {
  position: absolute;
  z-index: 3;
  width: 240px;
  height: 240px;
  right: 20vw;
  top: 40vh;
  border: 1px solid rgba(24, 243, 255, .58);
  transform: rotate(45deg);
  box-shadow: var(--cyan-glow);
}

.ribbon-glyph::before,
.ribbon-glyph::after {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(57, 255, 136, .38);
}

.ribbon-glyph::after { inset: 76px; border-color: rgba(138, 92, 255, .42); }

.floating-coordinate {
  position: absolute;
  right: 9vw;
  bottom: 18vh;
  z-index: 4;
  color: rgba(24, 243, 255, .7);
}

.namu-tree {
  position: absolute;
  z-index: 3;
  width: 360px;
  height: 520px;
  left: 18vw;
  top: 18vh;
  filter: drop-shadow(0 0 18px rgba(57, 255, 136, .34));
}

.trunk,
.branch {
  position: absolute;
  display: block;
  background: var(--green);
  height: 2px;
  transform-origin: left center;
}

.trunk { width: 460px; left: 180px; top: 28px; transform: rotate(90deg); }
.b1 { width: 150px; left: 181px; top: 160px; transform: rotate(-35deg); }
.b2 { width: 120px; left: 181px; top: 210px; transform: rotate(28deg); }
.b3 { width: 180px; left: 181px; top: 285px; transform: rotate(-18deg); }
.b4 { width: 135px; left: 181px; top: 355px; transform: rotate(38deg); }

.false-waypoint {
  position: absolute;
  z-index: 4;
  left: 53vw;
  top: 42vh;
  width: 130px;
  height: 130px;
  filter: drop-shadow(0 0 16px rgba(255, 43, 214, .38));
}

.false-waypoint span {
  position: absolute;
  width: 58px;
  height: 2px;
  background: var(--magenta);
  box-shadow: var(--magenta-glow);
}

.false-waypoint span:nth-child(1) { left: 0; top: 20px; transform: rotate(35deg); }
.false-waypoint span:nth-child(2) { right: 0; top: 20px; transform: rotate(-35deg); }
.false-waypoint span:nth-child(3) { left: 0; bottom: 34px; transform: rotate(-35deg); }
.false-waypoint span:nth-child(4) { right: 0; bottom: 34px; transform: rotate(35deg); }

.shrine-ring {
  position: absolute;
  z-index: 4;
  right: 28vw;
  top: 22vh;
  width: 360px;
  height: 360px;
}

.ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(24, 243, 255, .55);
  border-radius: 50%;
  box-shadow: var(--cyan-glow);
}

.ring-b {
  inset: 48px;
  border-color: rgba(138, 92, 255, .5);
  border-radius: 24% 76% 31% 69%;
  animation: ringTurn 13s linear infinite;
}

.name-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 56px;
  letter-spacing: -.06em;
  color: var(--green);
  text-shadow: var(--green-glow);
}

.path-button {
  margin-top: 36px;
  padding: 12px 18px;
  border: 1px solid rgba(57, 255, 136, .56);
  background: transparent;
  color: var(--green);
  font-family: Archivo, Inter, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  box-shadow: var(--green-glow);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.path-button:hover { color: var(--cyan); border-color: var(--cyan); transform: translateX(5px); }

.horizon-vectors {
  position: absolute;
  left: 18vw;
  right: 8vw;
  bottom: 24vh;
  height: 90px;
  z-index: 3;
}

.horizon-vectors span {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--green), transparent);
  box-shadow: var(--cyan-glow);
}

.horizon-vectors span:nth-child(1) { width: 24vw; left: 0; top: 12px; }
.horizon-vectors span:nth-child(2) { width: 34vw; left: 18vw; top: 44px; opacity: .72; }
.horizon-vectors span:nth-child(3) { width: 18vw; right: 18vw; top: 4px; opacity: .5; }
.horizon-vectors span:nth-child(4) { width: 26vw; right: 0; top: 72px; opacity: .4; }

.micro-map {
  position: fixed;
  z-index: 31;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
}

.tick {
  width: 32px;
  height: 2px;
  border: 0;
  padding: 0;
  background: rgba(234, 253, 255, .24);
  cursor: pointer;
  transition: background .25s ease, box-shadow .25s ease, transform .25s ease;
}

.tick.is-active {
  background: var(--cyan);
  box-shadow: var(--cyan-glow);
  transform: scaleX(1.35);
}

.is-shaking .path-main { stroke: var(--magenta); }
.is-shaking .path-after { opacity: .9; }
.is-shaking .path-after-one { transform: translate(9px, -3px); }
.is-shaking .path-after-two { transform: translate(-8px, 4px); }
.is-shaking #falseWaypoint { animation: shakeError .32s steps(2, end) 2; }
.is-shaking .error-copy h2 { color: var(--magenta); text-shadow: var(--magenta-glow); }

@keyframes auroraBreathe {
  from { transform: translate3d(var(--drift, 0px), -2vh, 0) skewX(-14deg) scaleY(.86); }
  to { transform: translate3d(calc(var(--drift, 0px) + 3vw), 3vh, 0) skewX(-8deg) scaleY(1.08); }
}

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

@keyframes shakeError {
  0% { transform: translate(0, 0); }
  25% { transform: translate(4px, -2px); }
  50% { transform: translate(-3px, 3px); }
  75% { transform: translate(2px, 2px); }
  100% { transform: translate(0, 0); }
}

@media (max-width: 800px) {
  .track { width: 900vw; }
  .panel { flex-basis: 150vw; }
  .quest-svg { width: 900vw; }
  .site-mark { left: 20px; right: 20px; }
  .site-mark i { display: none; }
  .opening { left: 9vw; }
  .small-left, .lower-note, .error-copy, .shrine-text, .horizon-text { left: 12vw; max-width: 78vw; }
  .namu-tree { left: 8vw; transform: scale(.72); transform-origin: left top; }
  .shrine-ring { right: 18vw; width: 260px; height: 260px; }
  .micro-map { gap: 12px; }
  .tick { width: 22px; }
}
