:root {
  --abyss-basalt: #07070B;
  --polar-violet: #7C3CFF;
  --cryo-cyan: #3DF2E7;
  --bone-graphite: #D8D4C6;
  --ferrofluid-black: #11141A;
  --oxidized-copper: #A66A3F;
  --ultraviolet-shadow: #24103F;
  --axis-x: 17vw;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--abyss-basalt);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--bone-graphite);
  font-family: "Geologica", sans-serif;
  background:
    radial-gradient(circle at 17% 44%, rgba(124, 60, 255, .24), transparent 22rem),
    radial-gradient(circle at 82% 18%, rgba(61, 242, 231, .07), transparent 20rem),
    linear-gradient(135deg, rgba(36, 16, 63, .56), transparent 38%),
    var(--abyss-basalt);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .42;
  background-image:
    linear-gradient(112deg, transparent 0 46%, rgba(216, 212, 198, .035) 46.2% 47%, transparent 47.2%),
    linear-gradient(170deg, rgba(216, 212, 198, .028) 0 1px, transparent 1px 14px),
    radial-gradient(circle, rgba(216, 212, 198, .08) 1px, transparent 1.6px);
  background-size: 100vw 24vh, 100% 21px, 33px 33px;
  mix-blend-mode: screen;
}

#field-canvas {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.axis-spine {
  position: fixed;
  top: 0;
  left: var(--axis-x);
  width: 1px;
  height: 100vh;
  z-index: 4;
  pointer-events: none;
}

.axis-spine::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(transparent, var(--cryo-cyan), var(--polar-violet), transparent);
  box-shadow: 0 0 28px rgba(61, 242, 231, .45), 0 0 56px rgba(124, 60, 255, .36);
  opacity: .74;
}

.axis-glow {
  position: absolute;
  top: 17vh;
  left: -8.8rem;
  width: 17rem;
  height: 68vh;
  background: radial-gradient(ellipse, rgba(124, 60, 255, .24), rgba(61, 242, 231, .05) 39%, transparent 72%);
  filter: blur(14px);
  animation: breathe 7s ease-in-out infinite;
}

.unpaired-shard {
  position: absolute;
  top: 12vh;
  left: -3.6rem;
  width: 7.5rem;
  height: 76vh;
  filter: drop-shadow(0 0 26px rgba(61, 242, 231, .28)) drop-shadow(0 0 60px rgba(124, 60, 255, .34));
  transform-origin: 50% 50%;
  animation: shardDrift 12s ease-in-out infinite;
}

.chamber-nav {
  position: fixed;
  z-index: 8;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: .6rem;
  font-family: "Geologica", sans-serif;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.chamber-nav a {
  color: rgba(216, 212, 198, .55);
  text-decoration: none;
  border: 1px solid rgba(216, 212, 198, .14);
  background: rgba(17, 20, 26, .58);
  padding: .55rem .65rem;
  transition: color .3s ease, border-color .3s ease, transform .3s ease;
}

.chamber-nav a:hover,
.chamber-nav a.active {
  color: var(--cryo-cyan);
  border-color: rgba(61, 242, 231, .54);
  transform: translateY(3px) skewX(-8deg);
}

.chamber-track {
  position: relative;
  z-index: 2;
}

.chamber {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(5rem, 7vw, 8rem) clamp(1.4rem, 5vw, 6rem) clamp(4rem, 6vw, 7rem) 23vw;
  border-bottom: 1px solid rgba(216, 212, 198, .08);
  isolation: isolate;
}

.chamber::after {
  content: attr(data-chamber);
  position: absolute;
  left: calc(var(--axis-x) - 4.7rem);
  top: 2rem;
  writing-mode: vertical-rl;
  font: 500 .72rem/1 "Geologica", sans-serif;
  letter-spacing: .42em;
  color: rgba(61, 242, 231, .6);
  z-index: 5;
}

.coordinate,
.entry-mark {
  font-family: "Geologica", sans-serif;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: clamp(.64rem, .75vw, .84rem);
  color: rgba(61, 242, 231, .7);
}

h1,
h2,
.vertical-title {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  letter-spacing: -.055em;
}

h1 {
  font-size: clamp(4.2rem, 12vw, 13.2rem);
  line-height: .76;
  max-width: 9ch;
  color: var(--bone-graphite);
  text-shadow: 0 0 38px rgba(124, 60, 255, .28);
}

h2 {
  font-size: clamp(3.2rem, 8vw, 9.8rem);
  line-height: .82;
}

p {
  max-width: 42rem;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.75;
  color: rgba(216, 212, 198, .72);
}

.thesis,
.oracle,
.final-line,
.specimen-text h2 + p {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
}

.entry-rift {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  align-items: end;
  background:
    linear-gradient(102deg, transparent 0 18%, rgba(36, 16, 63, .52) 18.2% 18.8%, transparent 19%),
    radial-gradient(circle at 18% 62%, rgba(61, 242, 231, .13), transparent 18rem),
    linear-gradient(180deg, rgba(7, 7, 11, .3), rgba(17, 20, 26, .88));
}

.strata {
  position: absolute;
  inset: auto -10vw 0 -10vw;
  height: 42vh;
  opacity: .72;
  background: repeating-linear-gradient(-8deg, rgba(216, 212, 198, .055) 0 1px, transparent 1px 28px), linear-gradient(170deg, rgba(166, 106, 63, .18), transparent 60%);
  clip-path: polygon(0 36%, 14% 28%, 31% 47%, 48% 30%, 70% 44%, 100% 17%, 100% 100%, 0 100%);
}

.hero-copy { transform: translateY(-2vh); }

.thesis {
  margin: 2rem 0 0;
  font-size: clamp(2.1rem, 4vw, 5rem);
  line-height: .95;
  color: rgba(216, 212, 198, .86);
  max-width: 15ch;
}

.field-plaque {
  justify-self: end;
  align-self: center;
  width: 11rem;
  min-height: 27rem;
  border: 1px solid rgba(61, 242, 231, .28);
  background: linear-gradient(180deg, rgba(17, 20, 26, .8), rgba(36, 16, 63, .42));
  padding: 1rem;
  writing-mode: vertical-rl;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  box-shadow: inset 0 0 35px rgba(61, 242, 231, .06);
}

.field-plaque span { color: var(--oxidized-copper); letter-spacing: .24em; font-size: .7rem; }
.field-plaque strong { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 2rem; font-weight: 500; }

.equation-fragments {
  position: absolute;
  left: 50vw;
  top: 22vh;
  display: grid;
  gap: 2.6rem;
  color: rgba(216, 212, 198, .18);
  font: italic 2rem "Cormorant Garamond", serif;
  transform: rotate(-13deg);
}

.compass-ossuary {
  background: linear-gradient(100deg, rgba(17, 20, 26, .92), rgba(7, 7, 11, .7)), radial-gradient(circle at 70% 45%, rgba(124, 60, 255, .13), transparent 26rem);
}

.vertical-title {
  position: absolute;
  left: 23vw;
  top: 11vh;
  display: grid;
  font-size: clamp(4rem, 9vw, 10.5rem);
  line-height: .78;
  color: rgba(216, 212, 198, .12);
  transform: rotate(-4deg);
}

.ossuary-shelf {
  position: absolute;
  left: 25vw;
  right: 7vw;
  bottom: 14vh;
  height: 15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(216, 212, 198, .18);
}

.compass {
  position: relative;
  width: clamp(5.4rem, 9vw, 8.2rem);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(216, 212, 198, .33);
  background: radial-gradient(circle, rgba(216, 212, 198, .08), rgba(17, 20, 26, .92) 58%, rgba(7, 7, 11, .95));
  box-shadow: 0 0 0 .7rem rgba(17, 20, 26, .36), inset 0 0 24px rgba(61, 242, 231, .08);
}

.compass i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cryo-cyan), var(--polar-violet));
  transform-origin: 0 50%;
  transform: rotate(var(--needle, -45deg));
  box-shadow: 0 0 15px rgba(61, 242, 231, .65);
}

.compass span {
  position: absolute;
  inset: 1rem auto auto 1rem;
  color: rgba(216, 212, 198, .32);
  font: .65rem "Geologica", sans-serif;
}

.specimen-text {
  position: relative;
  z-index: 2;
  margin-left: 35vw;
  max-width: 42rem;
}

.specimen-text h2 { max-width: 8ch; color: var(--bone-graphite); }

.contour-map {
  position: absolute;
  right: 4vw;
  top: 8vh;
  width: min(48vw, 42rem);
  height: auto;
  opacity: .58;
  transform: skewY(-8deg);
}

.contour-map path {
  fill: none;
  stroke: var(--cryo-cyan);
  stroke-width: 1;
  stroke-opacity: .45;
}

.ferrofluid-choir {
  display: grid;
  grid-template-columns: 34rem 1fr;
  align-items: center;
  background: radial-gradient(ellipse at 72% 68%, rgba(17, 20, 26, .98), transparent 39rem), linear-gradient(180deg, rgba(36, 16, 63, .18), rgba(7, 7, 11, .94));
}

.choir-copy h2 { color: var(--bone-graphite); }
.oracle { font-size: clamp(2.4rem, 5vw, 6rem); line-height: .9; color: var(--cryo-cyan); text-shadow: 0 0 22px rgba(61, 242, 231, .3); }

.droplet-stage {
  position: relative;
  height: 72vh;
  border-bottom: 1px solid rgba(216, 212, 198, .12);
  background: linear-gradient(90deg, rgba(61, 242, 231, .07), transparent 24%), repeating-linear-gradient(90deg, rgba(216, 212, 198, .05) 0 1px, transparent 1px 72px);
  clip-path: polygon(4% 8%, 100% 0, 94% 100%, 0 91%);
}

.droplet {
  position: absolute;
  left: calc(var(--x) * 1%);
  bottom: 4%;
  width: calc(1.15rem * var(--s));
  height: calc(1.9rem * var(--s));
  border-radius: 56% 44% 58% 42%;
  background: radial-gradient(circle at 35% 24%, var(--cryo-cyan), rgba(124, 60, 255, .78) 31%, var(--ferrofluid-black) 70%);
  box-shadow: 0 0 24px rgba(61, 242, 231, .25);
  animation: rise 5.8s ease-in-out var(--d) infinite;
}

.choir-phrases {
  position: absolute;
  right: 6vw;
  bottom: 10vh;
  display: grid;
  gap: .75rem;
  font: italic clamp(1.4rem, 2.2vw, 2.6rem) "Cormorant Garamond", serif;
  color: rgba(216, 212, 198, .72);
}

.choir-phrases span { transform: skewX(-10deg); }

.gradient-collapse {
  background: linear-gradient(125deg, rgba(7, 7, 11, .9), rgba(36, 16, 63, .8) 44%, rgba(17, 20, 26, .96));
}

.collapse-field {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.arrow {
  position: absolute;
  left: var(--tx);
  top: var(--ty);
  width: 9rem;
  height: 2px;
  background: rgba(216, 212, 198, .24);
  transform: rotate(var(--r));
  transition: transform .7s ease, background .7s ease, width .7s ease;
}

.arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 9px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  color: rgba(216, 212, 198, .26);
}

.gradient-collapse.in-view .arrow {
  transform: rotate(-90deg) translateX(-3rem);
  width: 5rem;
  background: rgba(124, 60, 255, .58);
}

.violet-axis {
  position: absolute;
  left: 46vw;
  top: -6vh;
  width: clamp(1.4rem, 3vw, 3.5rem);
  height: 112vh;
  background: linear-gradient(180deg, transparent, var(--polar-violet) 24%, var(--cryo-cyan) 49%, var(--polar-violet) 78%, transparent);
  filter: blur(.5px) drop-shadow(0 0 36px rgba(124, 60, 255, .58));
  transform: skewX(-11deg);
  opacity: .82;
}

.collapse-copy {
  margin-left: 34vw;
  margin-top: 14vh;
  max-width: 46rem;
}

.warning-stamp {
  position: absolute;
  left: 24vw;
  bottom: 16vh;
  color: var(--oxidized-copper);
  border: 1px solid rgba(166, 106, 63, .7);
  padding: .8rem 1rem;
  font: 600 .76rem "Geologica", sans-serif;
  letter-spacing: .22em;
  transform: rotate(-11deg);
}

.lone-direction {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 31vw;
  background: radial-gradient(circle at 17% 50%, rgba(61, 242, 231, .09), transparent 15rem), linear-gradient(180deg, var(--ferrofluid-black), var(--abyss-basalt) 62%);
}

.lone-direction h2 {
  max-width: 8ch;
  transform: rotate(-3deg);
}

.final-line {
  max-width: 36rem;
  font-size: clamp(1.8rem, 3vw, 3.4rem);
  line-height: 1.05;
  transform: rotate(-2deg);
  color: rgba(216, 212, 198, .82);
}

.almost-shard {
  position: absolute;
  left: calc(var(--axis-x) - .25rem);
  top: 27vh;
  width: .5rem;
  height: 46vh;
  background: linear-gradient(transparent, rgba(61, 242, 231, .38), transparent);
  filter: blur(2px);
  opacity: .38;
}

.field-log {
  width: fit-content;
  margin-top: 2rem;
  color: var(--oxidized-copper);
  text-decoration: none;
  border-bottom: 1px solid rgba(166, 106, 63, .55);
  font: 500 .8rem "Geologica", sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
}

@keyframes breathe {
  0%, 100% { opacity: .52; transform: scaleX(.85); }
  50% { opacity: .95; transform: scaleX(1.08); }
}

@keyframes shardDrift {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(1.8vh) rotate(1.1deg); }
}

@keyframes rise {
  0%, 100% { transform: translateY(0) scaleY(.82); opacity: .54; }
  44% { transform: translateY(-54vh) scaleY(1.15) rotate(8deg); opacity: .95; }
  70% { transform: translateY(-42vh) translateX(1.6rem) scale(.78); opacity: .65; }
}

@media (max-width: 860px) {
  :root { --axis-x: 13vw; }
  .chamber { padding-left: 18vw; }
  .chamber-nav { left: 1rem; right: auto; max-width: calc(100% - 2rem); overflow-x: auto; }
  .entry-rift,
  .ferrofluid-choir { grid-template-columns: 1fr; }
  .field-plaque { display: none; }
  .specimen-text,
  .collapse-copy { margin-left: 0; }
  .ossuary-shelf { left: 20vw; right: 1rem; gap: 1rem; overflow: hidden; }
  .contour-map { width: 80vw; opacity: .25; }
  .lone-direction { padding-left: 20vw; }
}
