:root {
  --ivory: #FFF9E8;
  --pollen: #F6E7A8;
  --white: #FFFFFF;
  --cyan: #BDEFFF;
  --violet: #D8C7FF;
  --coral: #FFB6A3;
  --ink: #31506B;
  --glass-cyan: rgba(189, 239, 255, 0.28);
  --glass-violet: rgba(216, 199, 255, 0.22);
  --serif: "Cormorant Garamond", serif;
  --sans: "Manrope", "Inter", sans-serif;
  --inscription: "Instrument Serif", serif;
  --mono: "IBM Plex Mono", monospace;
  --Interval: "Interval**";
}

/* IBM Plex Mono sparingly for tiny exposure marks Interval Interval* Interval** */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(ellipse at 20% 8%, rgba(246, 231, 168, 0.52), transparent 32vw),
    radial-gradient(ellipse at 90% 38%, rgba(189, 239, 255, 0.36), transparent 30vw),
    linear-gradient(180deg, var(--white), var(--ivory) 18%, #f9fbf4 48%, #eef6fb 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

body::before {
  opacity: 0.55;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(49, 80, 107, 0.14) 0 1px, transparent 1.5px),
    radial-gradient(circle at 62% 38%, rgba(255, 255, 255, 0.75) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 70%, rgba(246, 231, 168, 0.48) 0 1px, transparent 2px);
  background-size: 92px 92px, 137px 137px, 171px 171px;
  animation: dustDrift 18s linear infinite;
}

body::after {
  mix-blend-mode: soft-light;
  opacity: 0.4;
  background:
    repeating-linear-gradient(90deg, rgba(49, 80, 107, 0.03) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 11px);
}

.ambient-grain {
  position: fixed;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.34;
  background:
    radial-gradient(circle at 10% 10%, transparent 0 8px, rgba(49,80,107,.045) 9px, transparent 10px),
    radial-gradient(circle at 45% 80%, transparent 0 5px, rgba(255,182,163,.09) 6px, transparent 7px),
    radial-gradient(circle at 78% 22%, transparent 0 7px, rgba(189,239,255,.11) 8px, transparent 9px);
  background-size: 63px 63px, 91px 91px, 127px 127px;
  filter: blur(.25px);
  animation: grainFloat 30s linear infinite;
}

.solar-journey {
  position: relative;
  z-index: 3;
}

.chamber {
  --local-a: var(--ivory);
  --local-b: var(--white);
  position: relative;
  min-height: 105vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(24px, 8vw) 1fr 1fr minmax(24px, 8vw);
  grid-template-rows: 18vh 1fr 1fr 18vh;
  isolation: isolate;
  background:
    radial-gradient(ellipse at var(--oval-x, 34%) var(--oval-y, 40%), rgba(255,255,255,.88), transparent 28vw),
    linear-gradient(120deg, var(--local-a), var(--local-b));
}

.chamber::before {
  content: "";
  position: absolute;
  inset: 8vh -8vw;
  z-index: -1;
  transform: rotate(-18deg) translateX(var(--beam-shift, 0));
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent),
    radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.9), rgba(246,231,168,.32) 42%, transparent 68%);
  filter: blur(18px);
  opacity: 0.72;
}

.chamber::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.62;
  background:
    radial-gradient(circle at 18% 74%, var(--glass-cyan), transparent 20vw),
    radial-gradient(circle at 86% 18%, var(--glass-violet), transparent 24vw);
}

.first-photon { --local-a: #FFFFFF; --local-b: #FFF9E8; }
.milkglass { --local-a: #FFF9E8; --local-b: #BDEFFF; }
.prism-noon { --local-a: #FFFFFF; --local-b: #F6E7A8; }
.heat-haze { --local-a: #FFF9E8; --local-b: #FFB6A3; }
.afterimage { --local-a: #BDEFFF; --local-b: #D8C7FF; }
.blue-gold { --local-a: #31506B; --local-b: #F6E7A8; color: #FFFFFF; }

.diagonal-beam {
  position: fixed;
  left: -28vw;
  top: 50%;
  width: 156vw;
  height: var(--beam-width, 22vh);
  z-index: 2;
  pointer-events: none;
  transform: translateY(-50%) rotate(-18deg);
  transform-origin: center;
  opacity: 0.92;
  mix-blend-mode: screen;
  filter: blur(var(--beam-blur, 14px));
  background:
    linear-gradient(90deg, transparent 2%, var(--beam-edge, rgba(189, 239, 255, 0.28)) 12%, rgba(255,255,255,.96) 43%, var(--beam-core, #F6E7A8) 56%, var(--beam-fringe, rgba(216, 199, 255, 0.22)) 74%, transparent 98%),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(255,255,255,.25) 17px 18px, transparent 19px 34px);
  transition: height .8s ease, filter .8s ease, background .8s ease;
}

.light-oval,
.afterimage-trail {
  position: fixed;
  width: 34vw;
  height: 21vw;
  left: var(--light-x, 18vw);
  top: var(--light-y, 16vh);
  z-index: 5;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-13deg);
}

.light-oval {
  opacity: .72;
  background: radial-gradient(ellipse at 45% 46%, rgba(255,255,255,.98) 0 22%, rgba(246,231,168,.72) 43%, rgba(189,239,255,.2) 67%, transparent 74%);
  filter: blur(var(--oval-blur, 18px));
  mix-blend-mode: soft-light;
}

.afterimage-trail {
  opacity: .18;
  background: radial-gradient(ellipse, rgba(216,199,255,.74), rgba(189,239,255,.24) 44%, transparent 72%);
  filter: blur(32px);
  transition: left 1.15s ease, top 1.15s ease;
  mix-blend-mode: multiply;
}

.exposure-meter {
  position: fixed;
  right: 30px;
  top: 28px;
  z-index: 10;
  width: 190px;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 13px;
  align-items: center;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 12px;
  border: 1px solid rgba(49,80,107,.2);
  background: rgba(255,255,255,.38);
  backdrop-filter: blur(16px);
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(49,80,107,.08), inset 0 0 24px rgba(255,255,255,.5);
}

.meter-orbit {
  position: relative;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(49,80,107,.32);
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0 18%, rgba(246,231,168,.32) 22%, transparent 56%);
}

.meter-sun {
  position: absolute;
  width: 9px;
  height: 9px;
  left: 50%;
  top: 4px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: #F6E7A8;
  box-shadow: 0 0 12px #F6E7A8, 0 0 24px rgba(255,182,163,.5);
  transform-origin: 4.5px 23px;
  transform: rotate(var(--sun-angle, 0deg));
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
}

.tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 8px;
  background: rgba(49,80,107,.38);
  transform-origin: 0 0;
}
.t1 { transform: rotate(0deg) translateY(-26px); }
.t2 { transform: rotate(45deg) translateY(-26px); }
.t3 { transform: rotate(90deg) translateY(-26px); }
.t4 { transform: rotate(135deg) translateY(-26px); }
.t5 { transform: rotate(180deg) translateY(-26px); }
.t6 { transform: rotate(225deg) translateY(-26px); }
.t7 { transform: rotate(270deg) translateY(-26px); }
.t8 { transform: rotate(315deg) translateY(-26px); }

.meter-copy { line-height: 1.35; }
.meter-copy strong { display: block; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: none; }
.meter-copy em { display: block; font-style: normal; opacity: .72; }

.mono { font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; }

.chapter-label {
  grid-column: 2 / 4;
  grid-row: 1;
  align-self: end;
  font-size: clamp(10px, .9vw, 13px);
  opacity: .72;
}

h1, h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -.045em;
  line-height: .83;
}

h2 {
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  align-self: center;
  max-width: 9ch;
  font-size: clamp(78px, 13vw, 210px);
  opacity: .88;
  text-shadow: 0 0 32px rgba(255,255,255,.38);
}

.wordmark {
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  align-self: center;
  justify-self: center;
  font-size: clamp(72px, 15vw, 240px);
  color: rgba(49,80,107,.08);
  text-shadow: 0 0 28px rgba(246,231,168,.15);
  transition: color .6s ease, text-shadow .6s ease;
}

.first-photon.active .wordmark,
.wordmark.exposed {
  color: rgba(49,80,107,.56);
  text-shadow: 0 0 42px rgba(246,231,168,.62), 0 0 90px rgba(255,255,255,.9);
}

.edge-copy {
  position: relative;
  z-index: 2;
  max-width: 330px;
  margin: 0;
  font-size: clamp(18px, 2.1vw, 36px);
  line-height: 1.08;
  font-weight: 300;
  text-wrap: balance;
}

.top-left { grid-column: 2; grid-row: 2; align-self: start; }
.right-edge { grid-column: 3; grid-row: 3; align-self: center; justify-self: end; }
.bottom-left { grid-column: 2; grid-row: 3; align-self: end; }

.inscription {
  grid-column: 3;
  grid-row: 4;
  align-self: start;
  justify-self: end;
  max-width: 420px;
  margin: 0;
  font-family: var(--inscription);
  font-size: clamp(30px, 5vw, 76px);
  font-style: italic;
  line-height: .95;
  opacity: .42;
}

.small-note {
  grid-column: 2;
  grid-row: 4;
  align-self: start;
  margin: 0;
  font-size: 11px;
  opacity: .7;
}

.aperture,
.vellum,
.slit-window,
.curtain,
.botanical,
.prism-symbol,
.spectrum-bars,
.heat-field,
.burn-mark,
.cyanotype-plate,
.halo-ring,
.last-light-mark,
.lens-rings,
.sundial {
  position: absolute;
  pointer-events: none;
}

.aperture-large {
  width: 43vw;
  height: 43vw;
  border-radius: 50%;
  left: -10vw;
  top: 16vh;
  border: 1px solid rgba(49,80,107,.14);
  box-shadow: inset 0 0 80px rgba(189,239,255,.24), 0 0 80px rgba(255,255,255,.58);
}

.vellum {
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(5px);
  box-shadow: 0 30px 80px rgba(49,80,107,.06);
}
.panel-a { width: 34vw; height: 45vh; right: 10vw; top: 18vh; transform: rotate(7deg); }

.sundial {
  width: 190px;
  height: 190px;
  right: 10vw;
  bottom: 12vh;
  border-radius: 50%;
  opacity: .28;
  background: repeating-conic-gradient(from 7deg, rgba(49,80,107,.45) 0 1deg, transparent 1deg 13deg);
  mask: radial-gradient(circle, transparent 0 62%, #000 63% 65%, transparent 66%);
}

.slit-window {
  width: 10vw;
  height: 74vh;
  left: 19vw;
  top: 12vh;
  border-radius: 999px;
  transform: rotate(18deg);
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(189,239,255,.14), rgba(255,255,255,.8));
  filter: blur(.2px);
  box-shadow: 0 0 80px rgba(189,239,255,.58), inset 0 0 40px rgba(255,255,255,.9);
}

.curtain {
  width: 28vw;
  height: 88vh;
  top: 8vh;
  border-radius: 44% 56% 38% 62%;
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.42), rgba(189,239,255,.13));
  filter: blur(1px);
}
.curtain-one { left: 2vw; transform: rotate(-5deg); }
.curtain-two { right: 0; transform: rotate(9deg); }

.botanical {
  right: 18vw;
  bottom: 12vh;
  width: 22vw;
  height: 42vh;
  opacity: .18;
  filter: blur(1px);
  background:
    radial-gradient(ellipse at 45% 25%, #31506B 0 8%, transparent 9%),
    radial-gradient(ellipse at 62% 45%, #31506B 0 10%, transparent 11%),
    radial-gradient(ellipse at 38% 62%, #31506B 0 9%, transparent 10%),
    linear-gradient(82deg, transparent 49%, #31506B 50% 51%, transparent 52%);
}

.prism-symbol {
  width: min(45vw, 540px);
  right: 8vw;
  top: 19vh;
  opacity: .72;
  filter: drop-shadow(0 30px 60px rgba(49,80,107,.12));
}

.spectrum-bars {
  left: 7vw;
  bottom: 18vh;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 36vw;
  height: 12px;
  transform: rotate(-18deg);
  filter: blur(.3px);
}
.spectrum-bars span:nth-child(1) { background: #BDEFFF; }
.spectrum-bars span:nth-child(2) { background: #FFFFFF; }
.spectrum-bars span:nth-child(3) { background: #F6E7A8; }
.spectrum-bars span:nth-child(4) { background: #FFB6A3; }
.spectrum-bars span:nth-child(5) { background: #D8C7FF; }

.heat-field {
  inset: 0;
  overflow: hidden;
  opacity: .45;
  filter: blur(7px) url(#none);
}
.heat-field span {
  position: absolute;
  width: 72vw;
  height: 18vh;
  left: 10vw;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), rgba(255,182,163,.32), transparent);
  animation: haze 6s ease-in-out infinite alternate;
}
.heat-field span:nth-child(1) { top: 20vh; animation-delay: -.4s; }
.heat-field span:nth-child(2) { top: 38vh; left: 22vw; animation-delay: -1.2s; }
.heat-field span:nth-child(3) { top: 56vh; left: -4vw; animation-delay: -2.1s; }
.heat-field span:nth-child(4) { top: 72vh; left: 18vw; animation-delay: -3s; }
.burn-mark {
  width: 30vw;
  height: 30vw;
  right: 12vw;
  bottom: 9vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,182,163,.42), rgba(246,231,168,.19) 35%, transparent 68%);
  mix-blend-mode: multiply;
}

.cyanotype-plate {
  left: 10vw;
  top: 12vh;
  width: 38vw;
  height: 72vh;
  border-radius: 45% 55% 52% 48%;
  background: linear-gradient(160deg, rgba(189,239,255,.28), rgba(216,199,255,.42));
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: inset 0 0 70px rgba(255,255,255,.38), 0 30px 90px rgba(49,80,107,.1);
}
.stem, .leaf { position: absolute; display: block; background: rgba(49,80,107,.36); }
.stem { width: 2px; height: 54%; bottom: 13%; transform-origin: bottom; }
.s1 { left: 38%; transform: rotate(-8deg); }
.s2 { left: 51%; height: 68%; transform: rotate(4deg); }
.s3 { left: 62%; height: 48%; transform: rotate(14deg); }
.leaf { width: 72px; height: 32px; border-radius: 50%; filter: blur(.5px); }
.l1 { left: 29%; top: 34%; transform: rotate(-35deg); }
.l2 { left: 48%; top: 26%; transform: rotate(28deg); }
.l3 { left: 54%; top: 48%; transform: rotate(-22deg); }
.l4 { left: 64%; top: 38%; transform: rotate(38deg); }
.halo-ring {
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: 0 0 42px rgba(216,199,255,.34);
}
.ring-one { width: 28vw; height: 28vw; right: 16vw; top: 18vh; }
.ring-two { width: 18vw; height: 18vw; right: 30vw; bottom: 16vh; }

.last-light-mark {
  width: 18vw;
  height: 18vw;
  right: 17vw;
  top: 31vh;
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0 8%, #F6E7A8 13%, rgba(246,231,168,.35) 33%, rgba(189,239,255,.14) 50%, transparent 70%);
  box-shadow: 0 0 70px rgba(246,231,168,.75), 0 0 140px rgba(189,239,255,.2);
  animation: lastDim 7s ease-in-out infinite alternate;
}
.lens-rings { inset: 12vh 7vw auto auto; width: 44vw; height: 44vw; }
.lens-rings span {
  position: absolute;
  inset: calc(var(--i, 0) * 8%);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
}
.lens-rings span:nth-child(1) { --i: 0; }
.lens-rings span:nth-child(2) { --i: 1; }
.lens-rings span:nth-child(3) { --i: 2; }
.final-line { max-width: 560px; color: #FFF9E8; }

.active .edge-copy,
.active h2,
.active .inscription,
.active .small-note,
.active .chapter-label {
  animation: expose .95s ease both;
}

@keyframes expose {
  from { opacity: .08; filter: blur(10px) brightness(1.8); }
  to { opacity: 1; filter: blur(0) brightness(1); }
}

@keyframes dustDrift {
  to { background-position: 92px 46px, -137px 68px, 171px -85px; }
}

@keyframes grainFloat {
  to { transform: translate3d(-7%, 4%, 0); }
}

@keyframes haze {
  from { transform: translateX(-4vw) scaleX(.94); }
  to { transform: translateX(5vw) scaleX(1.08); }
}

@keyframes lastDim {
  from { opacity: .95; transform: scale(1); }
  to { opacity: .48; transform: scale(.86); }
}

@media (max-width: 760px) {
  .chamber {
    grid-template-columns: 22px 1fr 22px;
    grid-template-rows: 16vh 1fr 1fr 16vh;
  }
  .chapter-label, h2, .wordmark { grid-column: 2; }
  h2 { font-size: clamp(62px, 20vw, 116px); }
  .wordmark { font-size: clamp(58px, 17vw, 104px); }
  .right-edge, .top-left, .bottom-left, .small-note, .inscription { grid-column: 2; justify-self: start; }
  .right-edge { grid-row: 3; }
  .exposure-meter { right: 14px; top: 14px; transform: scale(.86); transform-origin: top right; }
  .diagonal-beam { width: 190vw; left: -54vw; }
  .light-oval, .afterimage-trail { width: 64vw; height: 42vw; }
  .prism-symbol, .cyanotype-plate, .lens-rings { opacity: .42; width: 72vw; }
  .last-light-mark { width: 42vw; height: 42vw; }
}
