@property --wheel-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

.carousel [hidden] { display: none !important; }
.story-kicker { font-size: .7rem; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; }
.story-name { font-size: clamp(2.2rem, 4vw, 4rem); margin: .28em 0; }
.racinae-name img { width: min(100%, 255px); height: auto; }
.mailbox-sign-name { font-family: MailSign, Georgia, serif; }
.universe .portal:hover { text-decoration: underline; text-underline-offset: 4px; }

.universes:has(.is-ready) {
  padding: clamp(28px, 5vw, 70px) clamp(14px, 4vw, 56px) 0;
  background: none;
}
.universes:has(.is-ready) .section-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.universes:has(.is-ready) .closing { padding-top: clamp(38px, 7vw, 100px); }
.carousel.is-ready {
  --stage-height: clamp(510px, 48vw, 670px);
  --light: #e3bd79;
  --room: #314535;
  isolation: isolate;
  position: relative;
}
.carousel[data-scene="asterolife"] { --light: #e3c0ff; --room: #3d2b69; }
.carousel[data-scene="racinae"] { --light: #f0cbb0; --room: #5e4038; }
.carousel[data-scene="pass3d"] { --light: #eac880; --room: #57452a; }
.carousel.is-ready::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -12px -54px;
  background: radial-gradient(ellipse at 53% 54%, var(--room), transparent 70%);
  opacity: .68;
  filter: blur(30px);
  pointer-events: none;
}
.carousel.is-ready .gallery-tools { display: none; }
.carousel.is-ready .gallery {
  display: block;
  padding: 0;
  container-type: inline-size;
  perspective: clamp(540px, 115vw, 1540px);
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 93%, color-mix(in srgb, var(--room) 62%, #0d100e), #0b100e 68%);
  box-shadow: 0 18px 68px #0008, 0 0 0 1px #d7be8336;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
}
/* One angle drives the panels along a circular path. The cards lean into the turn. */
.carousel-wheel {
  --wheel-angle: 0deg;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  transform-style: preserve-3d;
  transition: --wheel-angle 1.18s cubic-bezier(.42, .04, .24, 1);
}
.carousel-wheel::before {
  content: "";
  position: absolute;
  inset: 32% -3% -9%;
  border: 1px solid color-mix(in srgb, var(--light) 50%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 11px #fff1, 0 0 34px color-mix(in srgb, var(--light) 26%, transparent);
  transform: translateZ(-260px);
  opacity: calc(.65 * abs(sin(calc(2 * var(--wheel-angle)))));
  pointer-events: none;
}
.carousel.is-ready .universe {
  --face-angle: 0deg;
  --phase: calc(var(--wheel-angle) + var(--face-angle));
  --orbit-x: sin(var(--phase));
  --front: cos(var(--phase));
  --recede: calc(1 - var(--front));
  --curve: clamp(0, calc(2.4 * var(--recede)), 1);
  --accent: #f3cb88;
  --copy: #f8eedc;
  --secondary: #e1d4bf;
  --cta: #f1d49b;
  --cta-ink: #222a1e;
  --ground: #172319;
  --wash: #deb273;
  display: grid;
  grid-area: 1 / 1;
  width: 100%;
  min-height: var(--stage-height);
  align-items: center;
  top: auto;
  border: 0;
  border-radius: calc(15px + min(9cqw, 110px) * var(--curve)) / calc(15px + min(8cqw, 85px) * var(--curve));
  background: var(--ground);
  box-shadow: none;
  overflow: hidden;
  z-index: calc(10 + 5 * var(--front));
  transform: translate3d(calc(64% * var(--orbit-x)), calc(-18% * var(--recede)), calc(-260px * var(--recede)))
    rotateZ(calc(14deg * var(--orbit-x))) rotateY(calc(-19deg * var(--orbit-x))) scale(calc(1 - .62 * var(--recede)));
  opacity: clamp(0, calc((var(--front) - .08) / .73), 1);
  filter: none;
  transition: none;
}
.carousel.is-ready .astero {
  --accent: #efcfff;
  --copy: #fff7ff;
  --secondary: #e8ddf4;
  --cta: #eed5ff;
  --cta-ink: #231533;
  --ground: #110b25;
  --wash: #b683ff;
}
.carousel.is-ready .racinae {
  --accent: #804553;
  --copy: #40282e;
  --secondary: #5c4143;
  --cta: #623b4b;
  --cta-ink: #fff7eb;
  --ground: #f7ecdf;
  --wash: #fff5d8;
}
.carousel.is-ready .pass {
  --accent: #ebc779;
  --copy: #f9f1df;
  --secondary: #e0d4ba;
  --cta: #ecd093;
  --cta-ink: #241d0f;
  --ground: #13160f;
  --wash: #e6c47a;
}
.carousel.is-dragging .gallery { cursor: grabbing; user-select: none; }
.carousel.is-dragging .carousel-wheel { transition: none; }
.carousel.is-ready .universe::before,
.carousel.is-ready .universe::after,
.carousel.is-ready .story::after,
.carousel.is-ready .visual-shade,
.carousel.is-ready .glint { display: none; }

.carousel-screen { position: relative; min-width: 0; }
.carousel.is-ready .carousel-screen { position: absolute; inset: 0; }
.carousel.is-ready .universe .visual {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: var(--ground);
  box-shadow: none;
  touch-action: pan-y pinch-zoom;
}
.carousel.is-ready .visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, #0c1912ef 0, #112018e3 20%, #102016a0 33%, transparent 57%);
}
.carousel.is-ready .letters .visual::before {
  background: radial-gradient(ellipse 48% 54% at 10% 2%, #101d16d4, #101d1670 52%, transparent 100%);
}
.carousel.is-ready .astero .visual::before {
  background: linear-gradient(90deg, #10091ff2, #130b28de 26%, #1a102c70 42%, transparent 63%);
}
.carousel.is-ready .racinae .visual::before {
  background: linear-gradient(90deg, #fff5ead4, #fff5ea68 32%, transparent 54%);
}
.carousel.is-ready .pass .visual::before {
  background: linear-gradient(90deg, #0c100df2, #0c100d98 31%, transparent 55%);
}
.carousel.is-ready .universe .visual::after {
  content: "" !important;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at 74% 20%, color-mix(in srgb, var(--wash) 46%, transparent), transparent 64%);
  mix-blend-mode: screen;
  opacity: 0;
}
.carousel.is-ready .universe:not([inert]) .visual::after { animation: scene-light 1.85s ease-out both; }
@keyframes scene-light {
  0% { opacity: 0; transform: translateX(-9%); }
  28% { opacity: .7; }
  100% { opacity: 0; transform: translateX(13%); }
}
.carousel.is-ready .universe .motion-control {
  top: 17px;
  right: 17px;
  width: 44px;
  height: 44px;
  box-shadow: none;
}
.carousel.is-ready .letters .visual::after {
  background: linear-gradient(119deg, transparent 30%, #f6d78d45 48%, transparent 62%);
}
.carousel.is-ready .pass .visual::after {
  background: conic-gradient(from 40deg at 69% 55%, transparent, #e6c47a48 9%, transparent 29%);
}
.carousel.is-ready .letters .mailbox-backdrop { object-position: left 66%; }
.carousel.is-ready .letters .mailbox-sign { top: 11%; left: auto; right: 7%; width: min(39%, 510px); }
.carousel.is-ready .mailbox-props { inset-inline: auto 0; width: 76%; max-width: 940px; }
.astero-final { display: none; }
.carousel.is-ready .astero :is(.astero-arrival, .astero-final) {
  position: absolute;
  inset: 0 0 0 auto;
  width: 83%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  mask-image: linear-gradient(90deg, transparent, #000 20%);
}
.carousel.is-ready .astero .astero-final {
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity .38s ease;
}
.carousel.is-ready .astero.scene-clip-ended .astero-final { opacity: 1; }
.carousel.is-ready .astero .visual { background: #110b25 url('assets/astero-arrival.jpg') center/cover; }
.carousel.is-ready .racinae-room {
  background: radial-gradient(ellipse at 69% 36%, #fffdf3 8%, #f0dcc7 59%, #b8977f);
}
.carousel.is-ready .racinae-room::before {
  width: 70%;
  height: 185%;
  left: 34%;
  top: -54%;
  border-width: 70px;
  border-color: #fff9eea6;
  box-shadow: 28px 24px 65px #835d3e2b, inset 14px -7px 42px #b8906421;
}
.carousel.is-ready .album-stage { inset: 9% 2.5% 9% 36%; }
.carousel.is-ready .album-hero,
.carousel.is-ready .album-companion { width: min(43%, 370px); top: 50%; translate: 0 -50%; }
.carousel.is-ready .album-hero { left: 53%; }
.carousel.is-ready .album-companion { left: 10%; }
.carousel.is-ready .album-kicker { font-size: clamp(5px, 1.6cqw, 11px); }
.carousel.is-ready .album-inside-right strong { font-size: clamp(14px, 4.2cqw, 34px); }
.carousel.is-ready .album-hand { font-size: clamp(10px, 2.7cqw, 20px); }
.carousel-wheel .racinae:not([data-carousel-arrived]) :is(.album-leaf, .album-hero, .album-companion, .album-floor) { animation-name: none; }
.carousel-wheel .pass .pm-turn { animation: pass-arrival-turn 11s ease-in-out infinite; }
.carousel-wheel .pass:not([data-carousel-playing]) .pm-turn { animation-name: none; }
@keyframes pass-arrival-turn {
  0% { transform: rotateY(-8deg); animation-timing-function: ease-out; }
  15% { transform: rotateY(22deg); }
  41%, 62% { transform: rotateY(172deg); }
  94%, 100% { transform: rotateY(352deg); }
}
.carousel.is-ready .album-floor { bottom: 11%; }
.carousel.is-ready .pass .visual {
  background: radial-gradient(ellipse at 70% 44%, #856f3e6e, transparent 48%),
    radial-gradient(ellipse at 74% 100%, #83704a4d, transparent 32%), #111511;
}
.carousel.is-ready .pass-motion { inset: 5% 3% 7% 37%; }
.carousel.is-ready .pm-halo { width: 85%; height: 94%; }
.carousel.is-ready .pm-halo::after {
  inset: 27% 0;
  border-color: #edcf7e3b;
  box-shadow: 0 0 54px #eac37c29, inset 0 0 52px #eac37c20;
}
.carousel.is-ready .pm-pose { scale: 1.4; }
.carousel.is-ready .pm-floor-shadow { bottom: 7%; }

.carousel.is-ready .universe .story {
  z-index: 4;
  margin: 0 0 0 clamp(33px, 6.1vw, 91px);
  padding: 0;
  width: min(41%, 520px);
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--copy);
  box-shadow: none;
  transform: none;
}
.carousel.is-ready .letters .story {
  align-self: start;
  margin-top: clamp(40px, 5.7vw, 82px);
}
.carousel.is-ready .letters .story h4 { font-size: clamp(1.65rem, 3.45vw, 3.45rem); }
.carousel.is-ready .story-kicker { color: var(--accent); }
.carousel.is-ready .story-name { font-size: clamp(2.8rem, 5.8vw, 6.1rem); margin: .2em 0 .19em; line-height: .98; }
.carousel.is-ready .racinae-name img { width: min(90%, 295px); margin-left: -2px; }
.carousel.is-ready .universe .story h4 { font-size: clamp(1.65rem, 3.05vw, 3.2rem); line-height: 1.06; }
.carousel.is-ready .universe .story h4 em { color: var(--accent); }
.carousel.is-ready .universe .story p {
  color: var(--secondary);
  font-size: clamp(.86rem, 1.18vw, 1.02rem);
  line-height: 1.65;
  margin: 15px 0 23px;
  max-width: 31ch;
}
.carousel.is-ready .letters .story p { margin: 12px 0 17px; }
.carousel.is-ready .story .desktop-br { display: none; }
.carousel.is-ready .universe .portal {
  align-self: flex-start;
  padding: 12px 18px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--cta);
  color: var(--cta-ink);
  font-size: .82rem;
  min-height: 44px;
}
.carousel.is-ready .portal-dot { width: 16px; height: 16px; border-color: currentColor; }
.carousel.is-ready .portal-dot::before { width: 3px; height: 3px; inset: 5.5px; }
.carousel.is-ready .universe:not([inert]) .story > * { animation: scene-copy .8s .14s cubic-bezier(.2, .65, .25, 1) both; }
.carousel.is-ready .universe:not([inert]) .story .portal { animation-delay: .31s; }
@keyframes scene-copy {
  from { opacity: 0; translate: 0 11px; }
  to { opacity: 1; translate: 0 0; }
}
.carousel.is-ready .motion-paused .story > *,
.carousel.is-ready .motion-paused .visual::after { animation-play-state: running !important; }

.carousel-controls {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 12px 0 0;
  min-height: 44px;
  color: #c7beab;
}
.carousel-gesture { font-size: .74rem; }
.carousel-navigation, .carousel-tabs { display: flex; align-items: center; }
.carousel-navigation { gap: 8px; }
.carousel-navigation button, .carousel-autoplay {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ecd9aa;
  cursor: pointer;
}
.carousel-navigation button:hover, .carousel-autoplay:hover { background: #d7be831a; }
.carousel-navigation button:focus-visible, .carousel-autoplay:focus-visible { outline: 2px solid #f1d498; outline-offset: 2px; }
.carousel-navigation svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.carousel-tabs button { width: 29px; }
.carousel-tabs button::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 100px;
  background: #a69e8e;
  transition: width .3s, background .3s;
}
.carousel-tabs button[aria-selected="true"]::before { width: 18px; background: var(--light); }
.carousel-autoplay { justify-self: end; font: 700 12px Arial, sans-serif; }
.carousel-progress {
  position: absolute;
  width: 33px;
  height: 1px;
  right: 5px;
  bottom: 3px;
  background: #c9b08033;
  pointer-events: none;
}
.carousel-progress span { display: block; height: 100%; background: var(--light); transform: scaleX(0); transform-origin: left; }

@media (max-width: 760px) {
  .carousel.is-ready { --art-height: clamp(265px, 76vw, 395px); --stage-height: calc(var(--art-height) + 232px); }
  .universes:has(.is-ready) { padding: 21px 12px 0; }
  .carousel.is-ready .gallery { border-radius: 12px; }
  .carousel.is-ready .universe { align-items: end; scroll-margin-top: 8px; }
  .carousel.is-ready .universe .visual::before {
    background: linear-gradient(180deg, transparent calc(var(--art-height) - 52px), var(--ground) calc(var(--art-height) + 30px));
  }
  .carousel.is-ready .letters .visual::before {
    background: linear-gradient(180deg, transparent calc(var(--art-height) + 2px), var(--ground) calc(var(--art-height) + 48px));
  }
  .carousel.is-ready .letters .mailbox-stage { bottom: auto; height: calc(var(--art-height) + 48px); }
  .carousel.is-ready .letters .mailbox-backdrop { object-position: left bottom; }
  .carousel.is-ready .letters .mailbox-sign { width: 70%; right: 15%; top: 10%; }
  .carousel.is-ready .mailbox-props { width: 100%; bottom: 34px; }
  .carousel.is-ready .astero .visual { background: var(--ground); }
  .carousel.is-ready .astero :is(.astero-arrival, .astero-final) { width: 100%; height: calc(var(--art-height) + 42px); mask-image: none; object-position: 56% center; }
  .carousel.is-ready .racinae-room::before { left: 22%; border-width: 36px; }
  .carousel.is-ready .album-stage { inset: 16px 1% auto; height: calc(var(--art-height) - 12px); }
  .carousel.is-ready .album-companion { left: 9%; }
  .carousel.is-ready .pass .visual {
    background: radial-gradient(ellipse 80% calc(var(--art-height) * .66) at 52% calc(var(--art-height) * .47), #77613b9c, transparent 74%), var(--ground);
  }
  .carousel.is-ready .pass-motion { inset: 5px 0 auto; height: calc(var(--art-height) - 10px); }
  .carousel.is-ready .pm-pose { scale: 1.02; }
  .carousel.is-ready .pm-floor-shadow { bottom: 2%; }
  .carousel.is-ready .universe .motion-control { top: 9px; right: 9px; }
  .carousel.is-ready .universe .story {
    align-self: end;
    margin: calc(var(--art-height) - 9px) auto 0;
    width: min(100% - 38px, 430px);
    padding: 0 0 24px;
    text-align: center;
    align-items: center;
  }
  .carousel.is-ready .story-kicker { font-size: .61rem; }
  .carousel.is-ready .story-name { font-size: clamp(2.4rem, 10.1vw, 3.7rem); margin: .17em 0 .23em; }
  .carousel.is-ready .universe .story h4,
  .carousel.is-ready .letters .story h4 { font-size: clamp(1.55rem, 6.4vw, 2.15rem); }
  .carousel.is-ready .universe .story p,
  .carousel.is-ready .letters .story p { font-size: .85rem; margin: 10px 0 15px; max-width: 37ch; }
  .carousel.is-ready .racinae-name img { width: min(172px, 52vw); margin: 0 auto; }
  .carousel.is-ready .universe .portal { align-self: center; padding: 10px 16px; }
  .carousel-gesture { font-size: .65rem; max-width: 11ch; line-height: 1.25; }
  .carousel-controls { margin-top: 5px; }
  .carousel-navigation { gap: 0; }
  .carousel-tabs button { width: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel.is-ready .universe { transform: none; opacity: 1; border-radius: 0; }
  .carousel-wheel::before, .carousel.is-ready .universe[inert] { visibility: hidden; }
  .carousel.is-ready .carousel-autoplay,
  .carousel.is-ready .carousel-progress { visibility: hidden; }
}
