/* Motion is a layer on the existing design. Content never depends on it. */
.hero { isolation: isolate; transition: color .8s ease; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(ellipse at 82% 30%, #365f66 0, #203f51 50%, #142f3f 100%);
  transition: opacity .85s ease;
}
.hero.is-night::before { opacity: 1; }
.hero.is-night { color: #fff5de; }
.hero.is-night h1 > span:first-of-type { color: #c3df98; }
.hero h1 > span:first-of-type, .hero-description, .availability, .hero .text-link { transition: color .8s ease; }
.hero.is-night .hero-description, .hero.is-night .availability { color: #d0e0da; }
.hero.is-night .text-link { border-color: #bfd6c778; }
.hero.is-night .text-link:hover { color: #ffdd78; }
.hero.is-night .primary { background: #f5d16c; color: #183f4b; box-shadow: 0 5px 0 #b7923d; }
.world-sticker { color: var(--ink); }
.hero-world { perspective: 1100px; }
.world-frame {
  --frame-rotation: -3deg;
  z-index: 1;
  transform: perspective(1100px) rotate(var(--frame-rotation)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .4s cubic-bezier(.2,.7,.2,1), border-color .85s ease, box-shadow .5s ease;
}
.hero.is-night .world-frame { border-color: #88aaa2; box-shadow: 0 22px 65px #071f4255; }
.world-image-night { position: absolute; inset: 0; opacity: 0; height: 100%; pointer-events: none; transition: opacity .85s ease; }
.is-night .world-image-night { opacity: 1; }
.world-frame figcaption, .time-toggle { z-index: 2; }
.world-sticker { z-index: 3; }
.world-ornaments { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.orbit-token { position: absolute; object-fit: contain; filter: drop-shadow(0 9px 8px #25472d24); }
.token-water { top: -32px; right: 21%; rotate: 12deg; }
.token-brick { top: 37%; left: -10px; rotate: -17deg; }
.token-power { bottom: -25px; right: 6%; rotate: 15deg; }
.glint { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: #ffce5c; rotate: 45deg; opacity: 0; }
.glint-one { top: 5px; right: 13%; }
.glint-two { top: 43px; left: 45px; width: 6px; height: 6px; }
.glint-three { bottom: 6px; right: 17%; }
.button { position: relative; overflow: hidden; isolation: isolate; }
.button::after { content: ""; position: absolute; inset: -40% -75%; background: linear-gradient(110deg, transparent 42%, #ffffff28 49%, transparent 56%); transform: translateX(-55%); pointer-events: none; }
.button span { transition: translate .25s ease; }
.button:hover span, .button:focus-visible span { translate: 3px -2px; }
.button:active { transform: translateY(2px); box-shadow: 0 1px 0 #163e3a55; }
.time-toggle button { transition: color .3s, background .3s, transform .18s; }
.time-toggle button:active, .icon-button:active, .gallery-nav:active { transform: scale(.94); }
.time-toggle button span { display: inline-block; transition: transform .4s ease; }
.time-toggle button[aria-pressed="true"] span { transform: rotate(18deg); }
.brand img { transition: transform .4s cubic-bezier(.2,.8,.3,1.3); }
.brand:hover img { transform: rotate(-7deg) scale(1.06); }
.shot-image img { transition: transform .6s cubic-bezier(.2,.65,.3,1); }
.expand { transition: transform .3s, background .3s; }
.screenshot-card:hover .shot-image img, .screenshot-card:focus-visible .shot-image img { transform: scale(1.035); }
.screenshot-card:hover .expand, .screenshot-card:focus-visible .expand { transform: rotate(8deg); background: #ffdf86; }
.roadmap-card { transition: box-shadow .3s, transform .3s; }
.roadmap-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px #183f4b12; }
.details-plus { transition: transform .3s ease; }
.reveal-pending { opacity: 0; translate: 0 22px; }
.reveal-ready { transition: opacity .65s ease var(--reveal-delay, 0ms), translate .65s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms), transform .3s ease, box-shadow .3s ease; }
.reveal-ready:focus-within { opacity: 1; translate: none; transition: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: welcome-in .75s cubic-bezier(.16,.75,.3,1) backwards; }
  .hero-copy > :nth-child(1) { animation-delay: 40ms; }
  .hero-copy > :nth-child(2) { animation-delay: 120ms; }
  .hero-copy > :nth-child(3) { animation-delay: 200ms; }
  .hero-copy > :nth-child(4) { animation-delay: 280ms; }
  .hero-copy > :nth-child(5) { animation-delay: 360ms; }
  .hero-copy > :nth-child(6) { animation-delay: 420ms; }
  .hero-world { animation: neighborhood-in 1s cubic-bezier(.16,.75,.3,1) .15s backwards; }
  .token-water { animation: token-arrival 4.2s cubic-bezier(.2,.6,.2,1) .3s both; }
  .token-brick { animation: token-arrival 4s cubic-bezier(.2,.6,.2,1) .45s both; }
  .token-power { animation: token-arrival 4s cubic-bezier(.2,.6,.2,1) .2s both; }
  .glint { animation: glimmer 1.8s ease-out .6s 2 both; }
  .glint-two { animation-delay: .85s; }
  .glint-three { animation-delay: .4s; }
  .world-sticker { animation: sticker-arrival .9s cubic-bezier(.16,.8,.3,1.12) .65s backwards; }
  .button:hover::after, .button:focus-visible::after { animation: button-sheen .8s ease-out; }
  .feature-grid article:hover .feature-icon img { animation: piece-nudge .55s ease; }
  .loop-band > span:hover img { animation: piece-nudge .55s ease; }
  dialog[open] { animation: gallery-open .3s cubic-bezier(.2,.75,.3,1); }
  dialog[open]::backdrop { animation: backdrop-in .25s ease; }
  .already-growing[open] > div { animation: welcome-in .3s ease; }
}
@keyframes welcome-in { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes neighborhood-in { from { opacity: 0; translate: 25px 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes token-arrival { 0% { opacity: 0; translate: 0 20px; scale: .75; } 18% { opacity: 1; translate: 0 -10px; scale: 1.03; } 48% { translate: 0 3px; scale: 1; } 76% { translate: 0 -5px; } 100% { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes glimmer { 0%,100% { opacity: 0; scale: .3; } 38% { opacity: .8; scale: 1; } 68% { opacity: .35; scale: .6; } }
@keyframes sticker-arrival { from { opacity: 0; translate: 0 20px; scale: .9; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes button-sheen { from { transform: translateX(-55%); } to { transform: translateX(55%); } }
@keyframes piece-nudge { 0%,100% { translate: 0 0; } 40% { translate: 0 -8px; rotate: -7deg; } 72% { translate: 0 -2px; rotate: 3deg; } }
@keyframes gallery-open { from { opacity: 0; translate: 0 12px; scale: .98; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width:760px) {
  .world-frame { --frame-rotation: -2deg; }
  .token-water { width: 42px; height: 42px; top: -26px; right: 13%; }
  .token-brick { width: 38px; height: 38px; left: -11px; top: 37%; }
  .token-power { width: 39px; height: 39px; bottom: -26px; right: 7%; }
  .world-ornaments .glint-two { left: 7px; top: -6px; }
}
@media (hover:none) {
  .roadmap-card:hover { transform: none; box-shadow: 0 5px 0 #183f4b0c; }
  .screenshot-card:hover .shot-image img { transform: none; }
}
@media (prefers-reduced-motion:reduce) {
  .reveal-pending { opacity: 1; translate: none; }
  .world-frame { transform: rotate(var(--frame-rotation)); }
  .glint { display: none; }
  .button:hover, .button:hover span, .screenshot-card:hover, .roadmap-card:hover { transform: none; translate: none; }
  .screenshot-card:hover .shot-image img, .screenshot-card:focus-visible .shot-image img, .brand:hover img, .screenshot-card:hover .expand { transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
