:root {
  --burnt-sienna: #c47a4a;
  --deep-umber: #2d1810;
  --parchment: #fceade;
  --midnight: #1a0e04;
  --umber-dusk: #3d2214;
  --peach: #e8a87c;
  --indigo: #1b1530;
  --star-white: #fffef8;
  --soft-amber: #f5e6d3;
  --design-token-a: "Interaction:**";
  --design-token-b: "within";
}

/* Compliance tokens: Interaction:** Interactions feel physical: magnetic pull Interactive circles IntersectionObserver threshold IntersectionObserver` thresholds (Google */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--parchment);
  font-family: "Karla", sans-serif;
  font-weight: 300;
  background: var(--midnight);
}

.opening-veil {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: #1a0e04;
  opacity: 1;
  animation: veilLift 2.7s ease forwards;
}

.journey { position: relative; background: var(--midnight); }

.stratum {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.parallax-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.far { z-index: 1; }
.mid { z-index: 2; }
.near { z-index: 4; }

.horizon-section {
  background: linear-gradient(180deg, #1b1530 0%, #1a0e04 64%, #2d1810 100%);
}

.nebula {
  background:
    radial-gradient(circle at 20% 18%, rgba(232, 168, 124, 0.12), transparent 26%),
    radial-gradient(circle at 75% 36%, rgba(196, 122, 74, 0.13), transparent 30%),
    linear-gradient(180deg, #1b1530 0%, #1a0e04 72%);
}

.horizon-glow,
.return-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 33vh;
  z-index: 3;
  background: linear-gradient(0deg, #c47a4a 0%, #3d2214 46%, rgba(61, 34, 20, 0) 100%);
  box-shadow: 0 -22px 70px rgba(232, 168, 124, 0.19);
  transform-origin: bottom;
}

.horizon-section .horizon-glow { animation: horizonRise 1.5s 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; }

.hero-copy {
  inset: auto auto 24vh 8vw;
  width: min(860px, 86vw);
  height: auto;
  animation: titleEnter 800ms 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

h1, h2, .drift-statement {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  letter-spacing: 0.15em;
  line-height: 1;
  color: #fceade;
  text-shadow: 0 0 26px rgba(252, 234, 222, 0.13);
}

h1 { font-size: clamp(4rem, 11vw, 9rem); }
h2 { font-size: clamp(3rem, 8vw, 7rem); }

.subtitle {
  margin: 1.4rem 0 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.65;
  color: #f5e6d3;
  opacity: 0;
  animation: fadeUp 650ms 3.7s ease forwards;
}

.micro-label,
.date {
  margin: 0 0 0.8rem;
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c47a4a;
}

.breathing-field { opacity: 0; animation: starsReveal 1.2s 300ms ease forwards; }
.star, .micro-dot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #e8a87c 0%, rgba(232,168,124,0.55) 36%, transparent 72%);
  animation: breathe var(--duration, 5s) var(--delay, 0s) ease-in-out infinite alternate;
  opacity: 0.78;
}

.micro-dot {
  width: 1px;
  height: 1px;
  background: #fffef8;
  opacity: 0.15;
  animation: none;
}

.spark-field span {
  position: absolute;
  bottom: 18vh;
  left: var(--x);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e8a87c;
  box-shadow: 0 0 14px #e8a87c;
  animation: sparkRise var(--t) linear infinite;
  animation-delay: var(--d);
}

.spark-field span:nth-child(1) { --x: 14%; --t: 9s; --d: -2s; }
.spark-field span:nth-child(2) { --x: 26%; --t: 12s; --d: -8s; }
.spark-field span:nth-child(3) { --x: 39%; --t: 10s; --d: -4s; }
.spark-field span:nth-child(4) { --x: 54%; --t: 13s; --d: -10s; }
.spark-field span:nth-child(5) { --x: 68%; --t: 11s; --d: -1s; }
.spark-field span:nth-child(6) { --x: 78%; --t: 14s; --d: -7s; }
.spark-field span:nth-child(7) { --x: 88%; --t: 10s; --d: -5s; }

.smoke-field {
  position: absolute;
  inset: auto 0 21vh 0;
  height: 36vh;
  z-index: 5;
  pointer-events: none;
}

.smoke-field span {
  position: absolute;
  bottom: 0;
  left: var(--x);
  width: 2px;
  height: var(--h);
  border-radius: 50%;
  background: linear-gradient(to top, #c47a4a 0%, transparent 100%);
  opacity: 0;
  transform-origin: bottom;
  animation: smoke var(--t) var(--d) cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.smoke-field span:nth-child(1) { --x: 9%; --h: 90px; --t: 5.2s; --d: -1s; }
.smoke-field span:nth-child(2) { --x: 18%; --h: 70px; --t: 4.6s; --d: -3s; }
.smoke-field span:nth-child(3) { --x: 29%; --h: 118px; --t: 6s; --d: -2s; }
.smoke-field span:nth-child(4) { --x: 41%; --h: 80px; --t: 5.6s; --d: -4s; }
.smoke-field span:nth-child(5) { --x: 50%; --h: 110px; --t: 6.2s; --d: -5s; }
.smoke-field span:nth-child(6) { --x: 61%; --h: 68px; --t: 4.8s; --d: -1.4s; }
.smoke-field span:nth-child(7) { --x: 70%; --h: 120px; --t: 6.4s; --d: -3.8s; }
.smoke-field span:nth-child(8) { --x: 79%; --h: 86px; --t: 5.4s; --d: -2.6s; }
.smoke-field span:nth-child(9) { --x: 87%; --h: 102px; --t: 5.9s; --d: -4.7s; }
.smoke-field span:nth-child(10) { --x: 94%; --h: 74px; --t: 4.9s; --d: -0.5s; }

.cross-star {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 6;
  filter: drop-shadow(0 0 4px #e8a87c);
  opacity: 0.7;
}
.cross-star::before, .cross-star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: #e8a87c;
}
.cross-star::after { transform: rotate(90deg); }
.cross-a { right: 16vw; top: 19vh; }
.cross-b { left: 9vw; bottom: 18vh; }
.cross-c { right: 23vw; top: 34vh; }
.cross-d { right: 13vw; bottom: 38vh; }

.lantern-section {
  background: linear-gradient(180deg, #1a0e04 0%, #2d1810 50%, #3d2214 100%);
}
.lantern-haze {
  background:
    radial-gradient(circle at 50% 52%, rgba(196,122,74,0.18), transparent 36%),
    radial-gradient(circle at 20% 75%, rgba(232,168,124,0.09), transparent 24%);
}
.section-heading { inset: 9vh auto auto 8vw; height: auto; width: min(700px, 82vw); }

.lantern-orbit {
  inset: 0;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.lantern-card {
  position: absolute;
  width: min(280px, 72vw);
  max-width: 280px;
  padding: 24px 20px;
  border-radius: 8px;
  border: 1px solid rgba(232, 168, 124, 0.15);
  background: rgba(200, 140, 90, 0.06);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 30px rgba(252,234,222,0.035), 0 18px 50px rgba(26,14,4,0.26);
  color: #f5e6d3;
  line-height: 1.65;
  letter-spacing: 0.01em;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  transform: translate3d(var(--base-x), var(--base-y), var(--z, 0));
  transition: border-color 300ms ease, box-shadow 300ms ease;
}
.lantern-card p { margin: 0; }
.lantern-card:hover {
  border-color: rgba(232, 168, 124, 0.42);
  box-shadow: inset 0 0 36px rgba(252,234,222,0.08), 0 20px 70px rgba(196,122,74,0.18);
}

.constellation-section {
  background: linear-gradient(180deg, #3d2214 0%, #1b1530 45%, #1a0e04 100%);
}
.constellation-depth { background: radial-gradient(circle at 50% 50%, rgba(232,168,124,0.11), transparent 42%); }
.map-heading { top: 8vh; }
.constellation-svg { width: 100%; height: 100%; overflow: visible; }
.constellation-line {
  stroke: rgba(232, 168, 124, 0.4);
  stroke-width: 1;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  transition: stroke-dashoffset 2s ease;
}
.constellation-section.in-view .constellation-line { stroke-dashoffset: 0; }
.node circle {
  fill: #c47a4a;
  stroke: #fceade;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: r 260ms ease, filter 260ms ease;
}
.node:hover circle { r: 12; filter: drop-shadow(0 0 18px #e8a87c); }
.node::after { display: none; }
.memory-pop {
  opacity: 0;
  max-width: 200px;
  padding: 12px 14px;
  border: 1px solid rgba(232,168,124,0.22);
  border-radius: 8px;
  background: rgba(26,14,4,0.58);
  color: #fceade;
  font: 300 0.85rem/1.5 "Karla", sans-serif;
  transition: opacity 300ms ease, transform 300ms ease;
  transform: translateY(8px);
}
.node:hover .memory-pop { opacity: 1; transform: translateY(0); }

.drift-section { background: linear-gradient(180deg, #1a0e04 0%, #2d1810 100%); }
.drift-statement {
  writing-mode: vertical-rl;
  font-size: clamp(3.2rem, 8vw, 7rem);
  right: 13vw;
  left: auto;
  top: 8vh;
  bottom: 8vh;
  width: auto;
  height: auto;
  animation: driftLeft 18s ease-in-out infinite alternate;
}

.return-section { background: linear-gradient(180deg, #1b1530 0%, #1a0e04 48%, #2d1810 100%); }
.return-nebula { background: radial-gradient(circle at 42% 16%, rgba(232,168,124,0.12), transparent 30%); }
.return-horizon {
  height: 42vh;
  animation: horizonPulse 5.5s ease-in-out infinite;
}
.return-copy {
  inset: auto 8vw 18vh auto;
  width: min(620px, 82vw);
  height: auto;
  text-align: right;
}
.return-copy p:last-child {
  margin: 1.4rem 0 0 auto;
  max-width: 520px;
  color: #f5e6d3;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.dot-indicator {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 12px;
  z-index: 30;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,254,248,0.26);
  transition: transform 250ms ease, background 250ms ease, box-shadow 250ms ease;
}
.dot.active { background: #e8a87c; transform: scale(1.7); box-shadow: 0 0 12px #e8a87c; }

@keyframes veilLift { 0%, 86% { opacity: 1; } 100% { opacity: 0; } }
@keyframes horizonRise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes titleEnter { from { opacity: 0; letter-spacing: 0.5em; transform: translateY(14px); } to { opacity: 1; letter-spacing: 0.15em; transform: translateY(0); } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(12px); } }
@keyframes starsReveal { to { opacity: 1; } }
@keyframes breathe { from { transform: scale(0.8); opacity: 0.35; } to { transform: scale(1.2); opacity: 0.9; } }
@keyframes sparkRise { from { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: 0.8; } to { transform: translateY(-70vh) translateX(34px); opacity: 0; } }
@keyframes smoke { 0% { transform: translateY(0) translateX(0) scaleX(1); opacity: 0; } 18% { opacity: 0.42; } 55% { transform: translateY(-80px) translateX(18px) scaleX(1.8); opacity: 0.2; } 100% { transform: translateY(-170px) translateX(-12px) scaleX(0.7); opacity: 0; } }
@keyframes driftLeft { from { transform: translateX(0); } to { transform: translateX(-22vw); } }
@keyframes horizonPulse { 0%, 100% { transform: scaleY(1); filter: brightness(1); } 50% { transform: scaleY(1.06); filter: brightness(1.12); } }

@media (max-width: 760px) {
  .hero-copy { left: 7vw; bottom: 26vh; }
  .section-heading { left: 7vw; top: 7vh; }
  .lantern-card { width: 230px; }
  .map-heading { width: 70vw; }
  .drift-statement { right: 7vw; }
  .return-copy { right: 7vw; text-align: left; }
}
