.has-story,
.has-story body {
  background: #030204;
  color: #fff6fa;
}
.capsule-story {
  position: relative;
  background: #030204;
  color: #fdf6fa;
  isolation: isolate;
  overflow-anchor: none;
}
.story-screen {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #030204;
}
.story-stop {
  position: absolute;
  pointer-events: none;
  width: 1px;
  height: 1px;
  left: 0;
}
.story-stop > span {
  position: absolute;
  inset: 0;
}
.story-window {
  position: absolute;
  z-index: 2;
  left: 7%;
  top: 14%;
  bottom: 10%;
  width: 40%;
  overflow: hidden;
}
.story-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  visibility: hidden;
  transform-origin: 45% 50%;
  text-align: left;
  will-change: transform, opacity;
}
.story-page h2 {
  font:
    900 clamp(31px, min(3.7vw, 6vh), 75px) / 1.02 Montserrat,
    Manrope,
    sans-serif;
  letter-spacing: -0.065em;
  color: #fcf6fa;
  margin: 0 0 clamp(17px, 2.4vh, 30px);
  text-wrap: balance;
}
.story-body {
  font:
    500 clamp(15px, min(1.2vw, 2.22vh), 20px) / 1.44 Manrope,
    sans-serif;
  color: #dbd1dd;
  text-wrap: pretty;
}
.story-body p + p,
.story-body ul + p {
  margin-top: 0.7em;
}
.story-body strong,
.story-body li::marker {
  color: #f3b7df;
}
.story-body ul {
  padding-left: 1.35em;
  margin: 0.65em 0;
}
.story-body li + li {
  margin-top: 0.22em;
}
.story-art {
  position: absolute;
  left: 52%;
  right: 3%;
  top: 18%;
  bottom: 12%;
  pointer-events: none;
  --sweep: 0;
  --journey: 0;
}
/* Let the capsule pass behind the invitation and its button on the way to the rings. */
.hero[data-touch-approach] {
  isolation: auto;
}
.hero[data-touch-approach] .action {
  z-index: 4;
}
.hero[data-touch-approach] .invitation::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(transparent, #000b 14%, #000b 86%, transparent);
  pointer-events: none;
}
.capsule-at-rest.stage {
  position: fixed;
  inset: auto;
}
.travelling-capsule.stage {
  position: fixed;
  z-index: 3;
  inset: 0 auto auto 0;
  max-width: none;
  transform-origin: center;
  pointer-events: none;
}
.story-origin {
  visibility: hidden;
}
.stage canvas.scroll-poses {
  display: none;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  object-fit: fill;
}
.stage[data-scroll-pose] .scroll-poses,
.stage[data-pose-mix] .scroll-poses {
  display: block;
}
.stage[data-pose-mix] .scroll-poses {
  opacity: var(--pose-mix);
}
.stage[data-pose-mix] :is(#backup, #product) {
  opacity: calc(1 - var(--pose-mix));
}
.stage[data-scroll-pose] :is(#backup, #product),
.stage[data-engine="frames"] #product {
  display: none;
}

[data-mode="orbit"] .story-screen {
  background:
    radial-gradient(
      ellipse at 78% 54%,
      #200e2c 0,
      #0c0611 24%,
      transparent 54%
    ),
    #030204;
}
.orbit-space {
  position: absolute;
  inset: 3% 0;
  transform: rotate(calc(-15deg + var(--sweep) * 5deg));
}
.orbit-space i {
  --d: calc(var(--i) * 6%);
  position: absolute;
  inset: calc(19% + var(--d)) calc(1% + var(--d));
  border: 1px solid #9c6bb554;
  border-radius: 50%;
  transform: rotate(calc(var(--i) * 29deg + var(--sweep) * 16deg));
}
.orbit-space i:nth-child(2) {
  border-color: #d77ca84f;
}
.orbit-space i::after {
  content: "";
  position: absolute;
  top: 26%;
  left: 4.7%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e6b6ff;
  box-shadow: 0 0 10px #c478ff;
}
.orbit-space b {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #ac44f21c, transparent 66%);
}
[data-mode="orbit"] .story-body > p:first-child {
  color: #fff4fb;
}

[data-mode="reel"] .story-art {
  left: 0;
  right: 0;
  top: 13%;
  bottom: 54%;
}
.reel-window {
  position: absolute;
  inset: 1% -3%;
  transform: rotate(-3deg);
  overflow: hidden;
  box-shadow: 0 0 52px #a653c61f;
}
.reel-strip {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  width: max-content;
  gap: 6px;
  padding: 12px 5px;
  transform: translateX(calc(-7% - var(--journey) * 40%));
  background: #211923;
}
.reel-strip::before,
.reel-strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #030204 0 9px,
    transparent 9px 17px
  );
}
.reel-strip::before {
  top: 4px;
}
.reel-strip::after {
  bottom: 4px;
}
.story-photo {
  display: block;
  background-image: url("/2030/assets/atlas.webp");
  background-size: 400% 300%;
  background-position: calc(var(--col) * 100% / 3) calc(var(--row) * 50%);
}
.reel-strip .story-photo {
  height: 100%;
  aspect-ratio: 16/11;
  filter: saturate(0.57) brightness(0.57);
}
[data-mode="reel"] .story-window,
[data-mode="voice"] .story-window {
  left: 7%;
  width: 86%;
  top: 49%;
  bottom: 8%;
}
:is([data-mode="reel"], [data-mode="voice"]) .story-page {
  display: grid;
  grid-template-columns: minmax(0, 0.81fr) minmax(0, 1.19fr);
  gap: clamp(30px, 6vw, 110px);
  align-items: start;
}
[data-mode="reel"] .story-page h2 {
  line-height: 0.99;
  letter-spacing: -0.072em;
}

[data-mode="prints"] .story-screen {
  background:
    radial-gradient(ellipse at 26% 54%, #2b1625, transparent 50%), #040305;
}
[data-mode="prints"] .story-window {
  left: 54%;
  width: 39%;
}
[data-mode="prints"] .story-art {
  left: 4%;
  right: 49%;
  top: 18%;
  bottom: 11%;
}
.photo-tray {
  position: absolute;
  inset: 0;
}
.memory-print {
  position: absolute;
  display: block;
  left: 22%;
  top: 17%;
  width: 53%;
  aspect-ratio: 1.14;
  padding: 2% 2% 7%;
  background: linear-gradient(128deg, #fff3dd, #dfcdd8);
  box-shadow: 0 8px 25px #0009;
  transform: translate(calc(var(--fan, 0) * 39%), calc(var(--depth, 0) * -17%))
    rotate(calc(var(--fan, 0) * 19deg - 5deg))
    scale(calc(0.9 + var(--depth, 0) * 0.1));
}
.memory-print .story-photo {
  height: 100%;
  filter: saturate(0.77);
}
[data-mode="prints"] .story-page h2 {
  font:
    italic 600 clamp(38px, min(4.4vw, 7.3vh), 78px) / 0.98 Georgia,
    serif;
  letter-spacing: -0.054em;
  color: #f9e5d8;
}

[data-mode="voice"] .story-screen {
  background:
    radial-gradient(ellipse at 53% 30%, #271023, transparent 51%), #040205;
}
[data-mode="voice"] .story-art {
  left: 7%;
  right: 7%;
  top: 15%;
  bottom: 56%;
}
.audio-space,
.audio-grid,
.audio-bars {
  position: absolute;
  inset: 0;
}
.audio-grid {
  background:
    repeating-linear-gradient(90deg, #80516d30 0 1px, transparent 1px 7.14%),
    linear-gradient(
      0deg,
      transparent calc(50% - 1px),
      #ba749961 50%,
      transparent calc(50% + 1px)
    );
  mask-image: linear-gradient(0deg, transparent, #000 25% 75%, transparent);
}
.audio-bars {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}
.audio-bars i {
  width: 0.65%;
  border-radius: 5px;
  background: linear-gradient(0deg, #663692, #f9a3dc 53%, #ba5eaa);
  opacity: 0.75;
}
.audio-head {
  position: absolute;
  left: calc(18% + var(--journey) * 64%);
  top: 5%;
  bottom: 0;
  width: 1px;
  background: #ffd2ed;
  box-shadow: 0 0 8px #fc76cc;
}
.audio-head::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -4px;
  border-bottom: 7px solid #f1a7dc;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}
[data-mode="voice"] .story-page h2 {
  font:
    italic 900 clamp(27px, min(3.25vw, 6vh), 58px) / 1.05
      "Montserrat Alternates",
    sans-serif;
  color: #f2b2e0;
  letter-spacing: -0.058em;
}
[data-mode="voice"] .story-body > p:first-child {
  color: #fff5fc;
}

[data-mode="tunnel"] .story-screen {
  background:
    radial-gradient(ellipse at 73% 53%, #241027, transparent 48%), #030203;
}
[data-mode="tunnel"] .story-art {
  left: 52%;
  right: 1%;
  top: 16%;
  bottom: 13%;
}
.time-tunnel {
  position: absolute;
  inset: 8% 2%;
  perspective: 600px;
  transform: rotate(calc(-8deg + var(--sweep) * 5deg));
}
[data-mode="tunnel"] .story-art::before {
  content: "";
  position: absolute;
  inset: -14%;
  background:
    radial-gradient(
      ellipse 39% 44% at 40% 46%,
      #843aff55,
      #843aff18 58%,
      #843aff00 98%
    ),
    radial-gradient(
      ellipse 34% 39% at 65% 59%,
      #e521813b,
      #e5218112 58%,
      #e5218100 98%
    );
  opacity: 0.74;
}
.time-tunnel i {
  position: absolute;
  inset: 2% 9%;
  border-radius: 19%;
  box-shadow:
    inset 0 0 0 1px #c68ee954,
    inset 0 0 16px #ab49ee12;
  filter: drop-shadow(0 0 2px #e995ff99) drop-shadow(0 0 7px #af3ce177);
  transform: rotateY(-20deg)
    rotateZ(calc(var(--i) * 5deg + var(--sweep) * 12deg))
    scale(calc(0.18 + var(--i) * 0.16 + var(--journey) * 0.1));
}
.tunnel-glow {
  display: none;
}
.capsule-story[data-lightweight] .time-tunnel i {
  filter: none;
}
.capsule-story[data-lightweight] .tunnel-glow {
  display: block;
  position: absolute;
  inset: -8%;
  overflow: hidden;
  container-type: size;
  background-color: rgb(200 118 250 / 34%);
  mask: url("/2030/assets/tunnel-glow.svg") center / 100% 100% no-repeat;
}
.time-tunnel i > span {
  position: absolute;
  inset: 0;
  padding: 2.4px;
  container-type: size;
  border-radius: inherit;
  overflow: hidden;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.time-tunnel i > span::before,
.tunnel-glow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(max(142cqw, 142cqh) + 8px);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: conic-gradient(
    from 22deg,
    transparent 0deg 19deg,
    #742eff66 42deg,
    #af65ff 62deg,
    #f0d5ff 72deg,
    #b265ff 77deg,
    transparent 99deg 168deg,
    #d7248444 202deg,
    #ff53ac 226deg,
    #ffc1e5 234deg,
    #e82d91 239deg,
    transparent 259deg
  );
  transform: rotate(calc(var(--i) * 16deg));
}
.tunnel-glow::before {
  background: conic-gradient(from 22deg,
    transparent 0deg 19deg, #dca2ff66 42deg, #dfacff 62deg, #efcaff 72deg,
    #dfacff 77deg, transparent 99deg 168deg, #dfa3ff44 202deg, #efa8ff 226deg,
    #ffdaff 234deg, #efa8ff 239deg, transparent 259deg);
}
@media (prefers-reduced-motion: no-preference) {
  .time-tunnel i > span::before,
  .tunnel-glow::before {
    animation: tunnel-light-pass 10s linear infinite;
    animation-delay: calc(-1.5s - var(--i) * 0.38s);
    animation-play-state: var(--tunnel-play, paused);
  }
  [data-mode="tunnel"] .story-art::before {
    animation: tunnel-halo 6s ease-in-out infinite alternate;
    animation-play-state: var(--tunnel-play, paused);
  }
}
@keyframes tunnel-light-pass {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}
@keyframes tunnel-halo {
  from {
    transform: translate(-2%, -1%) scale(0.95);
    opacity: 0.63;
  }
  to {
    transform: translate(2%, 1%) scale(1.06);
    opacity: 0.94;
  }
}
[data-mode="tunnel"] .story-window {
  container-type: inline-size;
  left: 5%;
  width: 46%;
}
[data-mode="tunnel"] .story-page h2 {
  font-size: clamp(26px, 8.6cqw, 58px);
  letter-spacing: -0.048em;
  margin-bottom: clamp(18px, 3.1vh, 32px);
}
[data-mode="tunnel"] .story-page h2 em {
  position: relative;
  display: block;
  width: fit-content;
  max-width: calc(100% - 0.13em);
  margin-left: 0.13em;
  padding: 0 0.1em 0.06em 0;
  font:
    italic 400 clamp(40px, 18.5cqw, 110px) / 1.03 Georgia,
    serif;
  letter-spacing: -0.075em;
  text-wrap: balance;
  background-image: var(--capsule-neon-spectrum);
  background-size: 200% 100%;
  background-clip: text;
  color: transparent;
}
.prism-surface {
  display: none;
  position: absolute;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  [data-mode="tunnel"] .story-page {
    transition: opacity 160ms ease-out;
  }
  .prism-surface {
    display: block;
  }
  [data-mode="tunnel"] .story-page h2 em[data-prism="running"] {
    background-image: none;
  }
  [data-mode="tunnel"] .story-page h2 em[data-prism="focused"] {
    animation: neon-letters 2.9s linear var(--prism-wave-offset, 0s) infinite;
  }
}
[data-mode="tunnel"] #story-title-1 em {
  font-size: clamp(35px, 13.7cqw, 88px);
}
[data-mode="tunnel"] .story-body {
  margin-left: 9%;
  max-width: 42ch;
  line-height: 1.49;
}
[data-mode="tunnel"] .story-body > p:first-child {
  color: #f6eff6;
}

@media (max-width: 740px), (max-height: 510px) {
  .capsule-story .story-art {
    left: 8%;
    right: 8%;
    top: 8%;
    bottom: 62%;
  }
  .capsule-story .story-window {
    left: 6.5%;
    width: 87%;
    top: 39%;
    bottom: 5%;
  }
  .capsule-story .story-page {
    display: block;
  }
  .story-page h2,
  .capsule-story[data-mode] .story-page h2 {
    font-size: clamp(24px, 7.2vw, 35px);
    margin-bottom: 12px;
  }
  .story-body {
    font-size: 15px;
    line-height: 1.43;
  }
  [data-mode="tunnel"] .story-body {
    margin-left: 5%;
  }
  .capsule-story[data-mode="reel"] .story-art {
    left: 0;
    right: 0;
    top: 11%;
    bottom: 65%;
  }
  [data-mode="prints"] .memory-print {
    width: auto;
    height: 56%;
    left: 34%;
    top: 16%;
    padding: 3px 3px 9px;
  }
  [data-mode="orbit"] .orbit-space {
    inset: 0 14%;
  }
  [data-mode="tunnel"] .time-tunnel {
    inset: 1% 14%;
  }
}
@media (max-height: 510px) and (min-width: 600px) {
  .capsule-story[data-mode] .story-art {
    left: 56%;
    right: 3%;
    top: 18%;
    bottom: 10%;
  }
  .capsule-story[data-mode] .story-window {
    left: 5%;
    width: 49%;
    top: 12%;
    bottom: 9%;
  }
  .story-body {
    font-size: 14px;
  }
}
@media (forced-colors: active) {
  [data-mode="tunnel"] .story-page h2 em {
    background: none;
    color: CanvasText;
  }
  .capsule-story[data-mode] .story-page h2,
  .story-body {
    color: CanvasText;
  }
}
