:root {
  --black: #050713;
  --glass: #101A33;
  --parchment: #F6F0D2;
  --cyan: #BDFDFF;
  --violet: #7C5CFF;
  --ember: #FFB86B;
  --dawn: #C8F7A1;
  --display: "Cormorant Garamond", serif;
  --body: "Manrope", sans-serif;
  --mark: "Bricolage Grotesque", sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--black);
  color: var(--parchment);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  background:
    radial-gradient(circle at 15% 10%, rgba(124, 92, 255, .16), transparent 32rem),
    radial-gradient(circle at 90% 80%, rgba(189, 253, 255, .12), transparent 36rem),
    linear-gradient(135deg, var(--black), var(--glass) 58%, #071027);
  overflow-x: hidden;
}

a { color: inherit; }
button { font: inherit; }

.atlas-shell {
  position: relative;
  min-height: 600vh;
  isolation: isolate;
}

.dust-field,
.star-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.dust-field {
  opacity: .55;
  background-image:
    radial-gradient(circle, rgba(246, 240, 210, .55) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(189, 253, 255, .35) 0 1px, transparent 1.6px);
  background-size: 83px 71px, 137px 119px;
  animation: driftDust 34s linear infinite;
  mix-blend-mode: screen;
}

.star-field {
  opacity: .38;
  background:
    radial-gradient(circle at 12% 24%, var(--cyan) 0 1px, transparent 1.5px),
    radial-gradient(circle at 22% 82%, var(--parchment) 0 1px, transparent 1.4px),
    radial-gradient(circle at 44% 18%, var(--dawn) 0 1px, transparent 1.6px),
    radial-gradient(circle at 70% 48%, var(--cyan) 0 1px, transparent 1.5px),
    radial-gradient(circle at 86% 72%, var(--parchment) 0 1px, transparent 1.4px);
}

.diagonal-beam {
  position: fixed;
  left: -20vw;
  top: 78vh;
  width: 145vw;
  height: 18vh;
  transform: rotate(-28deg) scaleX(.18);
  transform-origin: 12% 50%;
  opacity: .16;
  z-index: 3;
  pointer-events: none;
  filter: blur(.2px);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(.2,.9,.1,1);
}

.diagonal-beam span,
.diagonal-beam::before,
.diagonal-beam::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.diagonal-beam span {
  background: linear-gradient(90deg, transparent, rgba(255, 184, 107, .05), rgba(189, 253, 255, .72), rgba(124, 92, 255, .28), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 74%, transparent);
}

.diagonal-beam::before {
  transform: translateY(-22px);
  background: linear-gradient(90deg, transparent, rgba(255, 184, 107, .30), transparent 45%, rgba(200, 247, 161, .18), transparent);
  filter: blur(18px);
}

.diagonal-beam::after {
  transform: translateY(24px);
  background: linear-gradient(90deg, transparent, rgba(124, 92, 255, .24), rgba(189, 253, 255, .18), transparent);
  filter: blur(12px);
}

body.ignited .diagonal-beam {
  opacity: .82;
  transform: rotate(-28deg) scaleX(var(--beam-scale, 1));
}

.portable-sun {
  position: fixed;
  left: var(--sun-x, 12vw);
  top: var(--sun-y, 76vh);
  width: clamp(54px, 7vw, 96px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 9;
  pointer-events: none;
  transition: left 700ms cubic-bezier(.2,.8,.2,1), top 700ms cubic-bezier(.2,.8,.2,1), filter 700ms ease;
}

.sun-core,
.sun-halo,
.sun-ring { position: absolute; inset: 0; border-radius: 50%; }
.sun-core {
  inset: 27%;
  background: radial-gradient(circle, #F6F0D2 0 10%, #FFB86B 34%, #101A33 76%, #050713 100%);
  box-shadow: 0 0 26px rgba(255, 184, 107, .28);
}
.sun-halo {
  background: radial-gradient(circle, rgba(255, 184, 107, .34), rgba(189, 253, 255, .12) 45%, transparent 70%);
  animation: breatheHalo 4.8s ease-in-out infinite;
}
.sun-ring {
  border: 1px solid rgba(246, 240, 210, .38);
  transform: scale(.72);
  box-shadow: inset 0 0 20px rgba(189, 253, 255, .16);
}
body:not(.ignited) .sun-core { background: radial-gradient(circle, #FFB86B 0 8%, #342638 30%, #050713 78%); }
body:not(.ignited) .sun-halo { opacity: .25; }
body.sun-prism .sun-core { background: conic-gradient(from 40deg, #BDFDFF, #7C5CFF, #FFB86B, #C8F7A1, #BDFDFF); }
body.sun-beacon .portable-sun { filter: drop-shadow(0 0 34px rgba(189, 253, 255, .82)); }
body.sun-dawn .sun-core { background: radial-gradient(circle, #F6F0D2 0 16%, #C8F7A1 42%, #BDFDFF 70%, transparent 100%); }

.instrument-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  display: grid;
  gap: 17px;
  font-family: var(--mark);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10px;
}

.instrument-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  text-decoration: none;
  color: rgba(246, 240, 210, .46);
}

.instrument-nav span {
  width: 10px;
  height: 10px;
  order: 2;
  border-radius: 50%;
  background: rgba(246, 240, 210, .25);
  border: 1px solid rgba(255, 184, 107, .46);
  box-shadow: 0 0 0 4px rgba(255, 184, 107, .04);
}
.instrument-nav a.active { color: var(--parchment); }
.instrument-nav a.active span { background: var(--ember); box-shadow: 0 0 24px rgba(255, 184, 107, .72); }

.chamber {
  position: relative;
  min-height: 100vh;
  padding: clamp(34px, 6vw, 86px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, 1fr);
  overflow: hidden;
  z-index: 2;
}

.chamber::before {
  content: "";
  position: absolute;
  inset: 8vh 8vw;
  border: 1px solid rgba(246, 240, 210, .07);
  border-radius: 42% 58% 48% 52%;
  mask-image: linear-gradient(135deg, #000, transparent 62%);
  pointer-events: none;
}

.chapter-stamp,
.overline,
.etched-note,
.calibration-card,
.engraved-axis,
.signal-label,
.annotation-cloud,
.dawn-code {
  font-family: var(--mark);
}

.chapter-stamp {
  grid-column: 1 / 5;
  grid-row: 1;
  align-self: start;
  color: rgba(189, 253, 255, .72);
  letter-spacing: .24em;
  font-size: clamp(11px, 1.1vw, 14px);
  text-transform: uppercase;
}

.scene-copy {
  position: relative;
  z-index: 5;
  max-width: 680px;
}

.overline {
  margin: 0 0 1rem;
  color: var(--ember);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 12px;
}

h1, h2 {
  font-family: var(--display);
  font-weight: 500;
  line-height: .9;
  margin: 0;
  color: var(--parchment);
  text-shadow: 0 0 30px rgba(189, 253, 255, .12);
}
h1 { font-size: clamp(62px, 11vw, 158px); letter-spacing: -.055em; }
h2 { font-size: clamp(54px, 8.5vw, 124px); letter-spacing: -.045em; }
.scene-copy p:not(.overline) {
  max-width: 510px;
  color: rgba(246, 240, 210, .74);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.75;
}

.varnish-wordmark {
  position: absolute;
  left: -8vw;
  top: 6vh;
  font-family: var(--display);
  font-size: clamp(90px, 21vw, 330px);
  letter-spacing: -.07em;
  white-space: nowrap;
  color: rgba(246, 240, 210, .045);
  text-shadow: 0 0 1px rgba(246, 240, 210, .15);
  z-index: 0;
}

.first-copy { grid-column: 2 / 10; grid-row: 4 / 8; align-self: center; }
.ignite-control {
  margin-top: 16px;
  padding: 14px 20px;
  border: 1px solid rgba(255, 184, 107, .42);
  border-radius: 999px;
  color: var(--parchment);
  background: linear-gradient(90deg, rgba(255, 184, 107, .08), rgba(189, 253, 255, .06));
  box-shadow: inset 0 0 28px rgba(255, 184, 107, .06), 0 0 36px rgba(255, 184, 107, .08);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
}
body.ignited .ignite-control { color: var(--black); background: var(--ember); }

.aperture {
  position: absolute;
  right: 8vw;
  top: 16vh;
  width: clamp(190px, 28vw, 390px);
  aspect-ratio: 1;
  border: 1px solid rgba(189, 253, 255, .18);
  border-radius: 50%;
  animation: rotateRing 28s linear infinite;
}
.aperture i {
  position: absolute;
  left: 50%; top: 50%;
  width: 44%; height: 18%;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(16, 26, 51, .9), rgba(246, 240, 210, .08));
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.aperture i:nth-child(1) { transform: rotate(0deg); }
.aperture i:nth-child(2) { transform: rotate(60deg); }
.aperture i:nth-child(3) { transform: rotate(120deg); }
.aperture i:nth-child(4) { transform: rotate(180deg); }
.aperture i:nth-child(5) { transform: rotate(240deg); }
.aperture i:nth-child(6) { transform: rotate(300deg); }

.etched-note {
  position: absolute;
  right: 12vw;
  bottom: 22vh;
  color: rgba(246, 240, 210, .5);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
  transform: rotate(-9deg);
}
.smoke-curve {
  position: absolute;
  left: 17vw;
  bottom: 12vh;
  width: 170px;
  height: 260px;
  border-left: 1px solid rgba(189, 253, 255, .22);
  border-radius: 50%;
  filter: blur(.6px);
  animation: smokeLean 8s ease-in-out infinite;
}

.first-wick { background: radial-gradient(circle at 26% 72%, rgba(255, 184, 107, .16), transparent 30rem); }
.wick-copy { grid-column: 6 / 12; grid-row: 3 / 7; align-self: center; }
.large-ring {
  grid-column: 1 / 7;
  grid-row: 2 / 8;
  align-self: center;
  justify-self: center;
}
.lens-ring {
  position: relative;
  width: min(54vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(246, 240, 210, .22);
  box-shadow: inset 0 0 80px rgba(189, 253, 255, .08), 0 0 90px rgba(255, 184, 107, .08);
  animation: rotateRing 38s linear infinite reverse;
}
.lens-ring span {
  position: absolute;
  left: 50%; top: -6px;
  width: 1px; height: 22px;
  background: var(--ember);
  transform-origin: 0 calc(min(27vw, 310px) + 6px);
}
.lens-ring span:nth-child(2) { transform: rotate(90deg); }
.lens-ring span:nth-child(3) { transform: rotate(180deg); }
.lens-ring span:nth-child(4) { transform: rotate(270deg); }
.calibration-card {
  grid-column: 2 / 5;
  grid-row: 6 / 8;
  padding: 18px;
  align-self: center;
  color: rgba(246, 240, 210, .76);
  border-left: 1px solid var(--ember);
  background: rgba(16, 26, 51, .38);
  transform: rotate(-4deg);
}
.calibration-card strong { display: block; color: var(--ember); margin-bottom: 10px; }
.calibration-card span { font-size: 13px; line-height: 1.55; }
.calibration-arc {
  position: absolute;
  left: 10vw;
  top: 19vh;
  width: min(44vw, 420px);
  fill: none;
  stroke: rgba(189, 253, 255, .4);
  stroke-width: 1;
  stroke-dasharray: 9 13;
}
.calibration-arc path { stroke: var(--ember); stroke-width: 2; stroke-dasharray: 620; stroke-dashoffset: 120; animation: drawArc 6s ease-in-out infinite alternate; }

.prism-bench { background: radial-gradient(circle at 80% 40%, rgba(124, 92, 255, .22), transparent 35rem); }
.prism-copy { grid-column: 2 / 8; grid-row: 3 / 7; align-self: center; }
.prism-stack { grid-column: 8 / 13; grid-row: 2 / 8; position: relative; z-index: 4; }
.prism {
  position: absolute;
  width: 260px;
  height: 360px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  mix-blend-mode: screen;
  opacity: .72;
  filter: drop-shadow(0 0 34px rgba(124, 92, 255, .34));
}
.shard-one { right: 12vw; top: 7vh; background: linear-gradient(135deg, rgba(189,253,255,.18), rgba(124,92,255,.62), transparent); transform: rotate(20deg); }
.shard-two { right: 4vw; top: 26vh; background: linear-gradient(135deg, rgba(255,184,107,.34), rgba(189,253,255,.34), transparent); transform: rotate(-18deg) scale(.72); }
.shard-three { right: 18vw; top: 42vh; background: linear-gradient(135deg, rgba(200,247,161,.32), rgba(124,92,255,.28), transparent); transform: rotate(42deg) scale(.55); }
.engraved-axis { position: absolute; left: 9vw; bottom: 12vh; color: rgba(189,253,255,.52); letter-spacing: .22em; text-transform: uppercase; font-size: 11px; transform: rotate(-28deg); }
.vellum-map { position: absolute; right: 8vw; bottom: 11vh; width: 330px; height: 220px; border: 1px solid rgba(246,240,210,.16); background: rgba(246,240,210,.025); transform: rotate(8deg); }
.vellum-map span { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--parchment); box-shadow: 0 0 18px var(--cyan); }
.vellum-map span:nth-child(1) { left: 12%; top: 64%; }
.vellum-map span:nth-child(2) { left: 34%; top: 28%; }
.vellum-map span:nth-child(3) { left: 53%; top: 52%; }
.vellum-map span:nth-child(4) { left: 74%; top: 21%; }
.vellum-map span:nth-child(5) { left: 86%; top: 70%; }

.signal-window { background: radial-gradient(circle at 62% 45%, rgba(189, 253, 255, .16), transparent 36rem); }
.signal-copy { grid-column: 7 / 12; grid-row: 3 / 7; align-self: center; }
.window-frame {
  grid-column: 1 / 7;
  grid-row: 2 / 8;
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(52vw, 620px);
  aspect-ratio: 1.15;
  border: 1px solid rgba(189,253,255,.22);
  border-radius: 48% 52% 43% 57%;
  box-shadow: inset 0 0 90px rgba(189,253,255,.1), 0 0 120px rgba(124,92,255,.08);
}
.moon-glass { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle at 35% 28%, rgba(246,240,210,.22), rgba(189,253,255,.08) 38%, rgba(16,26,51,.1) 70%); }
.diffraction-spike { position: absolute; left: 50%; top: 50%; width: 112%; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); transform-origin: center; opacity: .56; }
.spike-a { transform: translate(-50%, -50%) rotate(22deg); }
.spike-b { transform: translate(-50%, -50%) rotate(112deg); }
.signal-label { position: absolute; color: rgba(200,247,161,.76); letter-spacing: .16em; text-transform: uppercase; font-size: 11px; }
.label-one { left: 12vw; top: 20vh; transform: rotate(-7deg); }
.label-two { right: 14vw; bottom: 16vh; transform: rotate(8deg); }

.orbiting-notes { background: radial-gradient(circle at 35% 42%, rgba(246,240,210,.09), transparent 31rem); }
.notes-copy { grid-column: 2 / 7; grid-row: 3 / 7; align-self: center; }
.orbit-system { grid-column: 7 / 13; grid-row: 2 / 8; position: relative; align-self: center; justify-self: center; width: min(50vw, 560px); aspect-ratio: 1; }
.orbit { position: absolute; inset: 12%; border: 1px solid rgba(246,240,210,.14); border-radius: 50%; animation: rotateRing 23s linear infinite; }
.orbit-two { inset: 24%; animation-duration: 17s; animation-direction: reverse; }
.orbit-three { inset: 36%; animation-duration: 11s; }
.orbit span { position: absolute; left: 50%; top: -14px; padding: 6px 10px; border-radius: 999px; color: var(--black); background: var(--parchment); font-family: var(--mark); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; transform: translateX(-50%); }
.annotation-cloud { position: absolute; right: 10vw; bottom: 12vh; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; color: rgba(246,240,210,.7); }
.annotation-cloud li { padding-left: 26px; position: relative; transform: rotate(var(--tilt, -3deg)); }
.annotation-cloud li:nth-child(2) { --tilt: 4deg; color: rgba(189,253,255,.74); }
.annotation-cloud li:nth-child(3) { --tilt: -6deg; color: rgba(255,184,107,.74); }
.annotation-cloud li::before { content: "✶"; position: absolute; left: 0; color: var(--cyan); }

.dawn-compile { background: linear-gradient(135deg, var(--black), #101A33 42%, rgba(200,247,161,.2)); }
.dawn-copy { grid-column: 2 / 8; grid-row: 3 / 7; align-self: center; }
.dawn-disk { position: absolute; right: -12vw; top: 6vh; width: min(64vw, 740px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #F6F0D2 0 9%, #C8F7A1 30%, rgba(189,253,255,.24) 54%, transparent 72%); filter: blur(.2px); box-shadow: 0 0 140px rgba(200,247,161,.28); }
.final-inscription { display: inline-block; margin-top: 24px; color: var(--black); background: var(--dawn); text-decoration: none; padding: 13px 18px; border-radius: 2px 22px 22px 2px; font-family: var(--mark); letter-spacing: .11em; text-transform: uppercase; font-size: 12px; }
.dawn-code { position: absolute; right: 7vw; bottom: 12vh; color: rgba(5,7,19,.78); background: rgba(246,240,210,.52); padding: 12px 16px; border-radius: 18px; transform: rotate(-5deg); }

@keyframes driftDust { from { background-position: 0 0, 0 0; } to { background-position: 260px -180px, -220px 160px; } }
@keyframes breatheHalo { 0%,100% { transform: scale(.88); opacity: .7; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes rotateRing { to { transform: rotate(360deg); } }
@keyframes drawArc { to { stroke-dashoffset: 0; } }
@keyframes smokeLean { 0%,100% { transform: translateX(0) rotate(8deg); opacity: .28; } 50% { transform: translateX(28px) rotate(-6deg); opacity: .54; } }

@media (max-width: 820px) {
  .chamber { display: block; padding: 72px 28px; }
  .scene-copy { margin-top: 26vh; }
  .instrument-nav { right: 10px; font-size: 0; }
  .instrument-nav em { display: none; }
  .large-ring, .window-frame, .orbit-system { position: absolute; inset: auto 4vw 8vh auto; width: 70vw; opacity: .55; }
  .prism-stack { position: absolute; inset: 20vh 0 auto auto; opacity: .7; }
  .calibration-card, .annotation-cloud, .dawn-code { display: none; }
}
