:root {
  --micro-font-note: "Mono**";
  --asphalt: #120D0A;
  --sepia: #6F3F22;
  --cream: #D8C19A;
  --gold: #B8863B;
  --rose: #D982A6;
  --chrome: #8A8174;
  --green: #264C3A;
  --plum: #2B1726;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(circle at 18% 8%, rgba(184,134,59,.22), transparent 32rem),
    radial-gradient(circle at 82% 38%, rgba(43,23,38,.72), transparent 38rem),
    linear-gradient(135deg, var(--asphalt), #1b100b 44%, var(--plum));
  font-family: "Alegreya Sans", "IBM Plex Sans", system-ui, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 34%, rgba(18,13,10,.36) 68%, rgba(18,13,10,.82));
  mix-blend-mode: multiply;
}

.grain,
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.grain {
  opacity: .19;
  background-image:
    radial-gradient(circle at 11% 22%, rgba(216,193,154,.5) 0 1px, transparent 1.6px),
    radial-gradient(circle at 70% 42%, rgba(184,134,59,.45) 0 1px, transparent 1.8px),
    radial-gradient(circle at 35% 88%, rgba(138,129,116,.35) 0 1px, transparent 1.5px);
  background-size: 29px 31px, 37px 41px, 43px 47px;
}

.scanline {
  opacity: .16;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, rgba(216,193,154,.16) 6px, transparent 7px);
}

.descent-map { position: relative; z-index: 1; }

.scene {
  position: relative;
  min-height: 100vh;
  padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 4vw, 4rem);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.scene::before {
  content: attr(data-scene);
  position: absolute;
  left: clamp(1rem, 4vw, 4rem);
  top: 1rem;
  font-family: "IBM Plex Mono", monospace;
  color: rgba(216,193,154,.36);
  letter-spacing: .24em;
  text-transform: uppercase;
  font-size: .68rem;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 12% -8%;
  z-index: -2;
  background:
    linear-gradient(115deg, transparent 44%, rgba(184,134,59,.13) 45% 46%, transparent 47%),
    linear-gradient(63deg, transparent 52%, rgba(138,129,116,.11) 53% 54%, transparent 55%);
  transform: skewY(-7deg);
}

.hero-scene { align-items: center; }

.city-lines {
  position: absolute;
  inset: 0;
  opacity: .36;
  background:
    linear-gradient(30deg, transparent 50%, rgba(138,129,116,.22) 50.4%, transparent 51%),
    linear-gradient(150deg, transparent 54%, rgba(111,63,34,.45) 54.4%, transparent 55%),
    radial-gradient(circle at 62% 18%, rgba(217,130,166,.22), transparent 14rem);
}

.marquee-block {
  position: relative;
  width: min(92vw, 980px);
  z-index: 3;
  margin-top: -8vh;
  text-align: left;
  filter: drop-shadow(0 2rem 3rem rgba(0,0,0,.52));
}

.route-label,
.mono {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.route-label {
  margin: 0 0 .8rem;
  color: var(--gold);
  font-size: clamp(.66rem, 1.2vw, .82rem);
}

.wordmark {
  margin: 0;
  font-family: "Anybody", "Arial Black", sans-serif;
  font-size: clamp(4.8rem, 17vw, 15rem);
  line-height: .72;
  color: var(--cream);
  letter-spacing: -.09em;
  text-transform: lowercase;
  animation: marqueeBreath 5.5s ease-in-out infinite, flicker 8s steps(1) infinite;
  text-shadow: 0 0 1px #fff1d2, 0 0 18px rgba(184,134,59,.42), .08em .08em 0 rgba(43,23,38,.8);
}

.wordmark span { font-variation-settings: "wdth" 148, "wght" 860; }
.wordmark em { font-style: normal; color: var(--rose); font-variation-settings: "wdth" 62, "wght" 740; }

.whisper {
  max-width: 46rem;
  margin: 1.4rem 0 0;
  color: rgba(216,193,154,.82);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.45;
}

.honeycomb {
  position: absolute;
  inset: 0;
  perspective: 900px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.hex {
  --size: 12rem;
  position: absolute;
  left: calc(50% + (var(--x) * 1vw));
  top: calc(50% + (var(--y) * 1vh));
  width: var(--size);
  aspect-ratio: 1 / .866;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg)) translateZ(0);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
  padding: 1.55rem;
  color: var(--cream);
  pointer-events: auto;
  isolation: isolate;
  opacity: 0;
  animation: assemble .95s cubic-bezier(.18,.8,.2,1) forwards;
  animation-delay: var(--d, 0s);
  box-shadow: inset 0 0 0 1px rgba(216,193,154,.22);
}

.hex::before,
.hex::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: inherit;
  z-index: -1;
}

.hex::before {
  background:
    linear-gradient(125deg, rgba(216,193,154,.2), transparent 35%),
    radial-gradient(circle at 30% 25%, rgba(217,130,166,.26), transparent 1.8rem),
    linear-gradient(135deg, rgba(18,13,10,.16), rgba(18,13,10,.58));
}

.hex::after {
  inset: -6px;
  background: conic-gradient(from var(--spin, 0deg), transparent, var(--gold), var(--rose), transparent 34%, var(--chrome), transparent 60%);
  z-index: -2;
  animation: rhinestone 4s linear infinite;
  opacity: .78;
}

.hex:hover {
  filter: brightness(1.18) saturate(1.18);
  transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1.035);
}

.hex:hover strong { color: #ffe0ab; text-shadow: 0 0 16px rgba(217,130,166,.54); }

.hex-xl { --size: clamp(17rem, 25vw, 28rem); }
.hex-lg { --size: clamp(13rem, 19vw, 21rem); }
.hex-md { --size: clamp(9.5rem, 14vw, 15rem); }
.hex-sm { --size: clamp(4.5rem, 7vw, 7rem); padding: .7rem; align-items: center; text-align: center; }

.hex strong {
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(1rem, 2.1vw, 2.15rem);
  line-height: .94;
  text-transform: uppercase;
  color: var(--cream);
}

.hex small {
  font-size: clamp(.86rem, 1vw, 1rem);
  color: rgba(216,193,154,.73);
  line-height: 1.25;
}

.stamp {
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: .68rem;
  color: var(--gold);
  letter-spacing: .13em;
  text-transform: uppercase;
}

.marble { background: #8A8174; }
.marble::before {
  background:
    linear-gradient(115deg, transparent 18%, rgba(111,63,34,.5) 19% 20%, transparent 21% 42%, rgba(43,23,38,.45) 43% 44%, transparent 45%),
    radial-gradient(circle at 70% 25%, rgba(216,193,154,.46), transparent 3rem),
    linear-gradient(135deg, #8A8174, #D8C19A 48%, #6F3F22);
}

.chrome::before { background: linear-gradient(135deg, #2B1726, #8A8174 38%, #D8C19A 48%, #120D0A 70%, #8A8174); }
.rose::before { background: radial-gradient(circle, #D982A6, #6F3F22 46%, #2B1726); }
.gold::before { background: radial-gradient(circle at 30% 20%, #D8C19A, #B8863B 38%, #6F3F22 70%, #120D0A); }
.green::before { background: linear-gradient(135deg, #264C3A, #120D0A 68%); }
.grate::before { background: repeating-linear-gradient(60deg, #120D0A 0 10px, #8A8174 11px 14px, #2B1726 15px 25px); }
.billboard::before { background: linear-gradient(135deg, #D982A6, #B8863B 28%, #2B1726 29% 54%, #8A8174 55%, #120D0A); }
.ticket::before { background: linear-gradient(120deg, #D8C19A, #6F3F22 58%, #2B1726); }
.core-hex::before { background: radial-gradient(circle, rgba(217,130,166,.55), #2B1726 32%, #120D0A 68%), conic-gradient(from 90deg, #B8863B, #8A8174, #264C3A, #B8863B); }

.lit::after { animation-duration: 2.7s; opacity: 1; }

.chapter-copy {
  position: relative;
  z-index: 3;
  max-width: 32rem;
  padding: 1.2rem 1.4rem;
  border-left: 2px solid var(--gold);
  background: linear-gradient(90deg, rgba(18,13,10,.72), rgba(43,23,38,.24), transparent);
}

.left-note { justify-self: start; margin-left: clamp(0rem, 6vw, 8rem); }
.right-note { justify-self: end; margin-right: clamp(0rem, 6vw, 8rem); }
.final-note { justify-self: center; align-self: start; text-align: center; border-left: 0; border-bottom: 2px solid var(--gold); background: rgba(18,13,10,.55); }

.chapter-copy h2 {
  margin: 0;
  font-family: "Anybody", "Arial Black", sans-serif;
  font-variation-settings: "wdth" 125, "wght" 760;
  font-size: clamp(2.1rem, 6vw, 6.6rem);
  line-height: .87;
  letter-spacing: -.06em;
  color: var(--cream);
  text-transform: lowercase;
}

.chapter-copy p:not(.route-label) {
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  color: rgba(216,193,154,.8);
}

.token-button {
  position: absolute;
  z-index: 4;
  right: clamp(1rem, 8vw, 8rem);
  bottom: clamp(2rem, 8vh, 5rem);
  border: 1px solid rgba(216,193,154,.38);
  border-radius: 999px;
  padding: .95rem 1.25rem;
  color: var(--cream);
  background: radial-gradient(circle at 30% 20%, #D8C19A, #B8863B 32%, #6F3F22 68%, #120D0A);
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .14em;
  cursor: pointer;
  box-shadow: 0 .8rem 2rem rgba(0,0,0,.4), inset 0 0 0 2px rgba(18,13,10,.5);
}

.token-button.pressed { animation: tokenPress .45s ease; }

.charm-nav {
  position: fixed;
  right: 1rem;
  top: 50%;
  z-index: 8;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: .72rem;
  align-items: center;
}

.chain {
  position: absolute;
  top: -3rem;
  bottom: -3rem;
  width: 1px;
  background: linear-gradient(var(--chrome), var(--gold), var(--plum));
  opacity: .5;
}

.nav-token {
  width: 2.45rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: #2B1726;
  color: var(--cream);
  text-decoration: none;
  font: 600 .68rem "IBM Plex Mono", monospace;
  box-shadow: inset 0 0 0 1px var(--chrome), 0 0 16px rgba(0,0,0,.5);
}

.nav-token.active { background: var(--gold); color: var(--asphalt); box-shadow: 0 0 22px rgba(217,130,166,.42); }

.atrium-comb { transform: rotate(-2deg); }
.table-comb { transform: rotate(3deg); }
.core-comb { transform: scale(1.05); }
.dawn-comb { transform: translateY(6vh) rotate(-4deg); }

@keyframes assemble {
  from { opacity: 0; transform: translate(calc(-50% + 0px), calc(-50% + 8vh)) rotate(calc(var(--r, 0deg) - 18deg)) scale(.58); filter: blur(10px); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1); filter: blur(0); }
}

@keyframes rhinestone { to { --spin: 360deg; } }

@keyframes marqueeBreath {
  0%, 100% { font-variation-settings: "wdth" 100, "wght" 830; }
  50% { font-variation-settings: "wdth" 132, "wght" 900; }
}

@keyframes flicker {
  0%, 9%, 11%, 68%, 70%, 100% { opacity: 1; }
  10%, 69% { opacity: .72; }
}

@keyframes tokenPress {
  0%, 100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(5px) rotate(-2deg) scale(.96); }
  65% { transform: translateY(-2px) rotate(2deg) scale(1.02); }
}

@media (max-width: 760px) {
  .charm-nav { right: .35rem; }
  .marquee-block { margin-top: -24vh; }
  .hex-xl { --size: 15rem; }
  .hex-lg { --size: 11rem; }
  .hex-md { --size: 8rem; }
  .chapter-copy { max-width: calc(100vw - 4rem); justify-self: start; margin: 0 2rem 0 0; }
  .token-button { left: 1rem; right: auto; }
}
