:root {
  /* Design typography proof: Intersection Observer configurable thresholds. When node enters viewport (threshold: 0.15 scroll-trigger system everything else (spine vertical spine begins 200px below text and descends off-screen Space Grotesk Bold Medium Regular Regular: "The might." (Google (weight liberated monospace Its distinctive features include single-story 'a' */
  --burgundy-abyss: #1a0a12;
  --oxblood-field: #2d0f1e;
  --cream-linen: #f4ece0;
  --dusty-mauve: #9e7b8a;
  --hot-fuchsia: #d4145a;
  --electric-coral: #ff6b6b;
  --burgundy-core: #6b1d3a;
  --pale-gold: #f0d080;
  --reveal-curve: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--burgundy-abyss);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream-linen);
  background: var(--burgundy-abyss);
  font-family: "Space Grotesk", Inter, sans-serif;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 3;
  width: 2px;
  background: var(--burgundy-core);
  transform: translateX(-50%);
  pointer-events: none;
}

main {
  position: relative;
  z-index: 4;
}

.constellation {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.constellation-lines path {
  fill: none;
  stroke: var(--dusty-mauve);
  stroke-width: 0.5;
  opacity: 0.05;
}

.constellation-stars polygon {
  fill: var(--pale-gold);
  opacity: 0.15;
  transform-box: fill-box;
  transform-origin: center;
  animation: starDrift 18s ease-in-out infinite;
}

.constellation-stars polygon:nth-child(3n) {
  fill: var(--hot-fuchsia);
  animation-duration: 22s;
}

.constellation-stars polygon:nth-child(4n) {
  animation-delay: -8s;
}

.hero,
.terminus {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 8vw;
  isolation: isolate;
}

.hero {
  background: var(--burgundy-abyss);
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(50% + 170px);
  width: 2px;
  height: 220px;
  background: var(--burgundy-core);
  transform: translateX(-50%);
  z-index: 1;
}

.hero h1 {
  position: relative;
  z-index: 5;
  margin: 0;
  color: var(--cream-linen);
  font-size: clamp(3.5rem, 10vw, 8rem);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero .boo {
  color: var(--hot-fuchsia);
  text-shadow: 0 0 60px rgba(212, 20, 90, 0.3);
  animation: booPulse 4s ease-in-out infinite;
}

.hero p {
  position: absolute;
  top: calc(50% + clamp(3.6rem, 7vw, 6rem));
  left: 50%;
  z-index: 5;
  width: min(88vw, 680px);
  margin: 0;
  color: var(--dusty-mauve);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 1.72;
  letter-spacing: 0.005em;
  transform: translateX(-50%);
}

.hero-stars span {
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--pale-gold);
  opacity: 0.15;
  clip-path: polygon(50% 0%, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0% 50%, 39% 35%);
}

.hero-stars span:nth-child(1) { top: 20%; left: 18%; transform: rotate(18deg); }
.hero-stars span:nth-child(2) { top: 70%; left: 25%; transform: rotate(44deg) scale(0.75); }
.hero-stars span:nth-child(3) { top: 18%; right: 20%; transform: rotate(-20deg) scale(0.86); }
.hero-stars span:nth-child(4) { top: 66%; right: 15%; transform: rotate(72deg) scale(1.1); }

.timeline {
  position: relative;
  min-height: 460vh;
  padding: 11vh 0 4vh;
}

.timeline-node {
  position: relative;
  width: 40vw;
  min-height: 58vh;
  margin-bottom: 8vh;
  display: flex;
  align-items: center;
}

.timeline-node.left {
  margin-left: calc(50% - 43vw);
  justify-content: flex-end;
}

.timeline-node.right {
  margin-left: calc(50% + 3vw);
  justify-content: flex-start;
}

.connector {
  position: absolute;
  top: 50%;
  width: 3vw;
  height: 1px;
  background: var(--burgundy-core);
  transform: scaleX(0);
  transition: transform 200ms ease-out;
  transform-origin: center right;
}

.left .connector {
  right: -3vw;
}

.right .connector {
  left: -3vw;
  transform-origin: center left;
}

.connector i {
  position: absolute;
  top: -4px;
  width: 8px;
  height: 8px;
  background: var(--burgundy-core);
  opacity: 0;
  clip-path: polygon(50% 0%, 62% 36%, 100% 50%, 62% 64%, 50% 100%, 38% 64%, 0% 50%, 38% 36%);
  transform: rotate(0deg) scale(0.5);
  transition: opacity 150ms ease-out 200ms, transform 150ms ease-out 200ms, background-color 150ms ease-out;
}

.left .connector i { right: -4px; }
.right .connector i { left: -4px; }

.node-content {
  position: relative;
  width: 100%;
  padding: clamp(1.4rem, 3vw, 2.8rem);
  background: rgba(45, 15, 30, 0.82);
  opacity: 0;
  transform: translateX(-52px);
  transition: opacity 300ms var(--reveal-curve) 350ms, transform 300ms var(--reveal-curve) 350ms;
  overflow: hidden;
}

.right .node-content {
  transform: translateX(52px);
}

.node-content::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
}

.node-content::after {
  content: "";
  position: absolute;
  inset: 10% -20% auto auto;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(107, 29, 58, 0.22);
  border-radius: 50%;
}

.left .node-content {
  border-right: 1px solid var(--electric-coral);
}

.right .node-content {
  border-left: 1px solid var(--electric-coral);
}

.tint-fuchsia .node-content::before { background: var(--hot-fuchsia); }
.tint-coral .node-content::before { background: var(--electric-coral); }
.tint-gold .node-content::before { background: var(--pale-gold); }
.tint-mauve .node-content::before { background: var(--dusty-mauve); }

.date {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--dusty-mauve);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.timeline-node h2 {
  margin: 0 0 1rem;
  color: var(--cream-linen);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.timeline-node p {
  max-width: 34rem;
  margin: 0;
  color: var(--cream-linen);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 1.72;
  letter-spacing: 0.005em;
}

.iso-icon {
  width: clamp(120px, 15vw, 160px);
  margin-top: 1.7rem;
}

.iso-icon svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.iso-icon path,
.iso-icon polygon,
.iso-icon ellipse,
.iso-icon circle {
  vector-effect: non-scaling-stroke;
}

.face,
.layer {
  fill: var(--oxblood-field);
  stroke: var(--cream-linen);
  stroke-width: 1;
}

.side-a,
.l2 { fill: #6b1d3a; }
.side-b,
.l3 { fill: #2d0f1e; }
.top,
.l1 { fill: rgba(212, 20, 90, 0.42); }
.l4 { fill: rgba(240, 208, 128, 0.24); }

.field,
.ring,
.cream,
.band {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.field {
  stroke: var(--burgundy-core);
  stroke-dasharray: 6 8;
  animation: fieldFlow 20s linear infinite;
}

.cream { stroke: var(--cream-linen); }
.ring { stroke: var(--electric-coral); }
.inner { stroke: var(--hot-fuchsia); }
.gold { stroke: var(--pale-gold); }
.fuchsia { stroke: var(--hot-fuchsia); }
.coral { stroke: var(--electric-coral); }
.dot { stroke: var(--cream-linen); stroke-width: 1; }

.iso-icon .face,
.iso-icon .layer,
.iso-icon path,
.iso-icon ellipse,
.iso-icon circle,
.iso-icon polygon {
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
}

.timeline-node.is-revealed .connector {
  transform: scaleX(1);
}

.timeline-node.is-revealed .connector i {
  opacity: 1;
  background: var(--hot-fuchsia);
  transform: rotate(45deg) scale(1);
}

.timeline-node.is-revealed .node-content {
  opacity: 1;
  transform: translateX(0);
}

.timeline-node.is-revealed .iso-icon .face,
.timeline-node.is-revealed .iso-icon .layer,
.timeline-node.is-revealed .iso-icon path,
.timeline-node.is-revealed .iso-icon ellipse,
.timeline-node.is-revealed .iso-icon circle,
.timeline-node.is-revealed .iso-icon polygon {
  animation: drawIcon 800ms ease-out 650ms forwards;
}

.terminus {
  min-height: 100vh;
  background: var(--burgundy-abyss);
  align-content: center;
  gap: 2.5rem;
}

.burst {
  width: min(300px, 70vw);
  height: min(300px, 70vw);
  overflow: visible;
  animation: rotateBurst 360s linear infinite, pulseBurst 5s ease-in-out infinite;
}

.burst line,
.burst polygon {
  fill: none;
  stroke: var(--hot-fuchsia);
  stroke-width: 0.5;
  stroke-linecap: round;
  stroke-dasharray: 9 13;
  animation: dashOut 6s linear infinite;
}

.burst polygon {
  fill: rgba(212, 20, 90, 0.08);
  stroke: var(--pale-gold);
}

.terminus p {
  margin: 0;
  color: var(--pale-gold);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

@keyframes booPulse {
  0%, 100% { text-shadow: 0 0 40px rgba(212, 20, 90, 0.22); }
  50% { text-shadow: 0 0 80px rgba(212, 20, 90, 0.45); }
}

@keyframes starDrift {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(30deg) scale(1.25); }
}

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

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

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

@keyframes pulseBurst {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(212, 20, 90, 0.18)); }
  50% { filter: drop-shadow(0 0 36px rgba(212, 20, 90, 0.36)); }
}

@keyframes dashOut {
  to { stroke-dashoffset: -88; }
}

@media (max-width: 760px) {
  body::after {
    left: 24px;
  }

  .hero::after {
    left: 24px;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 15vw, 5.5rem);
  }

  .timeline {
    min-height: auto;
    padding: 6vh 0;
  }

  .timeline-node,
  .timeline-node.left,
  .timeline-node.right {
    width: calc(100vw - 64px);
    min-height: 62vh;
    margin-left: 52px;
    margin-bottom: 4vh;
  }

  .left .connector,
  .right .connector {
    left: -28px;
    right: auto;
    width: 28px;
    transform-origin: center left;
  }

  .left .connector i,
  .right .connector i {
    left: -4px;
    right: auto;
  }

  .left .node-content,
  .right .node-content {
    border-left: 1px solid var(--electric-coral);
    border-right: 0;
    transform: translateX(36px);
  }

  .timeline-node.is-revealed .node-content {
    transform: translateX(0);
  }
}
