/* KANZ Hosting - interaction and motion layer (loads after style.css).
   Rules of this file:
   - one pixel unit everywhere: block faces are 16 x 16 texels drawn at 3, 4 or 6 px per texel; particles are 4 px squares
   - only transform / opacity / the individual translate + scale properties move (accordion-type panels are the one exception)
   - hover motion is gated to real pointers, and everything stops under prefers-reduced-motion
   Block face textures are the --tx-* variables in css/textures.css (generated by _source/build_site.py). */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}
html { color-scheme: dark; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.display, .h2 { text-wrap: balance; }
a, button, summary, input { touch-action: manipulation; }
button { -webkit-tap-highlight-color: transparent; }

/* ============================================================ hero scene */
.hero { background: none; }
.hero { overflow: clip; }
/* the hollow gem sits on the edge of the page so only half of it shows (the edge is the art side: left in Arabic, right in English) */
.hero__gem { position: absolute; inset: 0; pointer-events: none; }
.hero__gem::before { content: ""; position: absolute; top: 50%; left: 0; height: min(94%, 620px); aspect-ratio: 17 / 13; translate: -50% -50%;
  background: url("../assets/gem-hollow.svg") center / contain no-repeat; }
html[lang="en"] .hero__gem::before { left: auto; right: 0; translate: 50% -50%; }
.hero__in { z-index: 2; }
/* hero -> plans: an ordered-dither edge in the colour the next section starts with */
.hero::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 24px; pointer-events: none;
  background: var(--tx-dither) 0 0 / 48px 24px repeat-x; image-rendering: pixelated; }
.hero__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.fx-burst { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; image-rendering: pixelated; }

.scene { position: relative; width: min(100%, 600px); margin-inline: auto; aspect-ratio: 900 / 708; }
.hero__art .scene img { width: 100%; margin: 0; }
.scene__l { position: absolute; left: var(--x); top: var(--y); width: var(--w); translate: -50% -50%; }
.scene__l--base { inset: 0; width: auto; translate: none; }
.scene__p { display: block; }                    /* the part the pointer moves (added by js/fx.js) */
.scene__l--vox { width: var(--s, 96px); --s: 96px; z-index: 3; }

/* the island in pieces: positions come from js/config.js (scene), offsets from the pointer */
.isle { position: relative; aspect-ratio: 900 / 708; }
.isle img { position: absolute; max-width: none; height: auto; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.scene.is-live { cursor: pointer; touch-action: pan-y; }

.bob--a { animation: bob-a 4.2s steps(7) infinite alternate; }
.bob--b { animation: bob-b 5.4s steps(8) -1.2s infinite alternate; }
.bob--c { animation: bob-a 6.2s steps(8) -2.4s infinite alternate-reverse; }
@keyframes bob-a { from { transform: translateY(6%); } to { transform: translateY(-10%); } }
@keyframes bob-b { from { transform: translateY(-7%); } to { transform: translateY(7%); } }

/* entrance: plain CSS so it runs on the compositor while the page is still loading, and nothing waits for a script */
.hero__copy > * { animation: rise .5s var(--ease-out) backwards; }
.hero__copy > :nth-child(2) { animation-delay: .06s; }
.hero__copy > :nth-child(3) { animation-delay: .12s; }
.hero__copy > :nth-child(4) { animation-delay: .18s; }
.hero__copy > :nth-child(5) { animation-delay: .24s; }
.scene__l { animation: pop-in .45s var(--ease-out) var(--d, 0s) backwards; }
.scene__l--base { animation: rise-t .6s var(--ease-out) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-t { from { opacity: 0; translate: 0 18px; } }
@keyframes pop-in { from { opacity: 0; scale: .9; } }

/* ============================================================ voxel blocks
   A CSS 3D cube: six 16 x 16 faces. .vox__tilt follows the pointer, .vox__hit takes the knock, .vox__spin turns. */
.vox { --s: 96px; position: relative; display: block; width: var(--s); height: var(--s); perspective: 700px; background: none; border: 0; padding: 0; color: inherit; }
.vox--m { --s: 64px; } .vox--s { --s: 48px; }
.vox__tilt, .vox__hit, .vox__spin { position: absolute; inset: 0; display: block; transform-style: preserve-3d; }
.vox__tilt { transform: rotateX(-24deg); }
.vox__spin { transform: rotateY(-38deg); animation: vox-spin 18s linear infinite; }
.vox--rev .vox__spin { animation-direction: reverse; animation-duration: 26s; }
@keyframes vox-spin { from { transform: rotateY(-38deg); } to { transform: rotateY(322deg); } }
.vox i { position: absolute; inset: 0; background: var(--side) 0 0 / 100% 100%; image-rendering: pixelated; backface-visibility: hidden; }
.vox i::after { content: ""; position: absolute; inset: 0; background: var(--crack, none) 0 0 / 100% 100%; image-rendering: pixelated; }
.vox i:nth-child(1) { transform: translateZ(calc(var(--s) / 2)); }
.vox i:nth-child(2) { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.vox i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); background-image: var(--side-d); }
.vox i:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); background-image: var(--side-d); }
.vox i:nth-child(5) { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); background-image: var(--top); }
.vox i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); background-image: var(--bottom); }
.vox--ore { --side: var(--tx-ore); --side-d: var(--tx-ore-d); --top: var(--tx-ore); --bottom: var(--tx-ore-d); }
.vox--turf { --side: var(--tx-turf-side); --side-d: var(--tx-turf-side-d); --top: var(--tx-turf-top); --bottom: var(--tx-stone-d); }
.vox--srv { --side: var(--tx-rack); --side-d: var(--tx-rack-d); --top: var(--tx-plate); --bottom: var(--tx-rack-d); }
.vox--stone { --side: var(--tx-stone); --side-d: var(--tx-stone-d); --top: var(--tx-stone); --bottom: var(--tx-stone-d); }
.vox[data-stage="1"] { --crack: var(--tx-crack-1); }
.vox[data-stage="2"] { --crack: var(--tx-crack-2); }
.vox[data-stage="3"] { --crack: var(--tx-crack-3); }
.is-paused .vox__spin, .is-paused .bob--a, .is-paused .bob--b, .is-paused .bob--c, .is-paused .float { animation-play-state: paused; }

/* the block you can mine */
button.vox { cursor: url("../assets/art/cursor-pick.png") 26 4, pointer; }
.ore__n { position: absolute; top: calc(100% + 16px); left: 50%; translate: -50% 0; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 2px 10px 4px; font-size: 13px; font-weight: 700; color: var(--mint); background: var(--ink); border: 1px solid rgba(90, 234, 207, .4); border-radius: 3px; direction: ltr; }
.ore__n img { width: 18px !important; }
.ore__n span:empty { display: none; }
.ore__gem { position: absolute; left: 50%; top: 50%; width: 36px !important; margin: -14px 0 0 -18px !important; pointer-events: none; }

.cta__vox { position: absolute; top: 50%; margin-top: -32px; pointer-events: none; }
.cta__vox--1 { inset-inline-start: max(4%, calc(50% - 560px)); }
.cta__vox--2 { inset-inline-end: max(4%, calc(50% - 560px)); margin-top: 20px; }

/* ================================================================== nav */
.nav__menu a[aria-current="true"] { color: var(--mint); border-color: var(--mint); }
.snd { display: grid; place-items: center; padding: 0; }
.snd[aria-pressed="false"] .snd__on, .snd[aria-pressed="true"] .snd__off { display: none; }
.snd[aria-pressed="true"] { color: var(--mint); border-color: var(--mint); }
.nav__burger span { transition: transform .2s var(--ease-out), opacity .15s ease; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
@media (max-width: 1080px) {
  .nav__menu { display: flex; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), visibility 0s .2s; }
  .nav__menu.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav__menu a[aria-current="true"] { border-color: var(--line); }
}

/* ================================================================ plans */
.plan { transition: border-color .15s ease; }
@media (hover: hover) and (pointer: fine) {
  .plan:not(.plan--best):hover { border-color: var(--blue-200); }
  .chest:not([aria-expanded="true"]):hover .chest__lid { transform: rotateX(12deg); }
  .wall span:hover { transform: translateY(-6px); border-color: var(--mint); }
}
@media (min-width: 921px) {
  .plan--best { translate: 0 -10px; }       /* the recommended plan stands a step above the other two */
}
@media not ((hover: hover) and (pointer: fine)) {
  .wall span:hover { transform: none; border-color: var(--line-2); }   /* a tap must not leave a tile stuck in its hover state */
}

/* waiting for the order page */
.btn.is-loading { pointer-events: none; }
.btn.is-loading::after { content: ""; width: 18px; height: 4px; flex: none; animation: dots .75s steps(1) infinite;
  background: linear-gradient(currentColor, currentColor) 0 0 / 4px 4px no-repeat, linear-gradient(currentColor, currentColor) 7px 0 / 4px 4px no-repeat, linear-gradient(currentColor, currentColor) 14px 0 / 4px 4px no-repeat; }
@keyframes dots { 0% { clip-path: inset(0 14px 0 0); } 33% { clip-path: inset(0 7px 0 0); } 66% { clip-path: inset(0); } }

/* ================================================================= loot */
.loot { padding-block: 34px !important; }
.loot__in { display: flex; align-items: center; gap: clamp(18px, 4vw, 48px); padding: 18px 30px; border: 1px solid var(--line-2); border-radius: 4px;
  background: radial-gradient(120% 90% at 50% -10%, rgba(40, 157, 243, .16), transparent 62%), linear-gradient(180deg, rgba(3, 57, 95, .62), rgba(2, 42, 71, .62)); }
.loot__copy { flex: 1; min-width: 0; display: grid; }
.loot__ask, .loot__out { grid-area: 1 / 1; align-self: center; transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility 0s .25s; }
.loot__ask p { margin-top: 4px; }
.loot__out { opacity: 0; visibility: hidden; transform: translateY(10px); }
.loot.is-open .loot__out { opacity: 1; visibility: visible; transform: none; transition-delay: .2s, .2s, 0s; }
.loot.is-open .loot__ask { opacity: 0; visibility: hidden; transform: translateY(-10px); }
.loot__list { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); justify-content: start; gap: 8px 10px; margin-top: 12px; }
.loot__list li { display: flex; align-items: center; gap: 9px; padding: 4px 14px 7px 12px; border: 1px solid var(--line-2); border-radius: 3px; background: rgba(2, 26, 46, .5); color: var(--frost); font-weight: 700; font-size: 15px; line-height: 1.4; min-width: 0; }
.loot__list img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.loot__go { margin-top: 14px; justify-self: start; }
.loot__out { display: grid; }

/* the chest: a 3D box of 16 x 16 block faces, the lid hinged on its back edge */
.chest { --u: 6px; position: relative; flex: none; width: calc(var(--u) * 26); height: calc(var(--u) * 25); padding: 0; background: none; border: 0; perspective: 900px; cursor: pointer; }
.chest__box { position: absolute; left: 50%; top: 66%; width: calc(var(--u) * 16); height: calc(var(--u) * 16); margin: calc(var(--u) * -8) 0 0 calc(var(--u) * -8);
  transform-style: preserve-3d; transform: rotateX(-22deg) rotateY(-32deg); transition: scale .14s var(--ease-out); animation: chest-hop 3.6s steps(1) 1.5s infinite; }
.chest:active .chest__box { scale: .96; }
.chest[aria-expanded="true"] .chest__box { animation: none; }
@keyframes chest-hop { 0%, 12%, 100% { translate: 0 0; } 4% { translate: 0 -6px; } 8% { translate: 0 -3px; } }
.cf, .cl { position: absolute; left: 0; width: calc(var(--u) * 16); height: calc(var(--u) * 11); background-repeat: no-repeat; background-size: calc(var(--u) * 16) calc(var(--u) * 16);
  image-rendering: pixelated; backface-visibility: hidden; }
.cf { top: calc(var(--u) * 5); background-position: 0 100%; background-image: var(--tx-chest-side-d); }
.cf--front { background-image: var(--tx-chest-front); transform: translateZ(calc(var(--u) * 8)); }
.cf--back { transform: rotateY(180deg) translateZ(calc(var(--u) * 8)); }
.cf--right { transform: rotateY(90deg) translateZ(calc(var(--u) * 8)); }
.cf--left { transform: rotateY(-90deg) translateZ(calc(var(--u) * 8)); }
.cf--in { top: calc(var(--u) * -3 + 2px); height: calc(var(--u) * 16); background-image: var(--tx-chest-in); transform: rotateX(90deg); }
.chest__lid { position: absolute; left: 0; top: 0; width: calc(var(--u) * 16); height: calc(var(--u) * 5); transform-style: preserve-3d;
  transform-origin: 50% 100% calc(var(--u) * -8); transition: transform .5s var(--ease-pop); }
.chest[aria-expanded="true"] .chest__lid { transform: rotateX(112deg); }
.cl { top: 0; height: calc(var(--u) * 5); background-position: 0 0; background-image: var(--tx-chest-side-d); }
.cl--front { background-image: var(--tx-chest-front); transform: translateZ(calc(var(--u) * 8)); }
.cl--back { transform: rotateY(180deg) translateZ(calc(var(--u) * 8)); }
.cl--right { transform: rotateY(90deg) translateZ(calc(var(--u) * 8)); }
.cl--left { transform: rotateY(-90deg) translateZ(calc(var(--u) * 8)); }
.cl--top { top: calc(var(--u) * -8); height: calc(var(--u) * 16); background-image: var(--tx-chest-top); transform: rotateX(90deg); }
.cl--under { top: calc(var(--u) * -3 - 2px); height: calc(var(--u) * 16); background: var(--navy-900); box-shadow: inset 0 0 0 var(--u) var(--navy-500); transform: rotateX(-90deg); }

/* ============================================================ small bits */
.rs-isle { animation: swap-in .25s var(--ease-out); }
.kp__view { animation: view-in .22s var(--ease-out); }
@keyframes swap-in { from { opacity: .5; transform: scale(.94); } }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.steps__row { position: relative; }
.steps__row li.steps__bar { position: absolute; inset-inline: 0; top: 0; height: 4px; padding: 0; border: 0; background: var(--mint); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
html[dir="rtl"] .steps__row li.steps__bar { transform-origin: 100% 50%; }
.wall span { cursor: pointer; }
.faq details.is-moving p { overflow: hidden; }
.faq details.is-closing summary::after { transform: none;
  background: linear-gradient(var(--mint), var(--mint)) center / 16px 4px no-repeat, linear-gradient(var(--mint), var(--mint)) center / 4px 16px no-repeat; }

/* ============================================================ responsive */
@media (max-width: 860px) {
  .hero__gem::before { top: 210px; height: 430px; }
  .loot__list { grid-template-columns: repeat(2, minmax(0, max-content)); }
  .scene { width: min(78%, 420px); }
  .hero__art .scene img { width: 100%; }
  .scene__l--vox { --s: 56px; }
  .scene__l--vox .vox { --s: 56px; }
  #oreSlot { --x: 90% !important; --y: 4% !important; }
  #swordSlot { --x: 97% !important; --y: 44% !important; }
  .cta__vox { display: none; }
}
@media (max-width: 700px) {
  .loot__in { flex-direction: column; text-align: center; padding: 14px 18px 22px; gap: 6px; }
  .loot__list { justify-content: center; }
  .loot__go { justify-self: center; }
  .chest { --u: 5px; }
}
@media (max-width: 560px) {
  .nav__in { gap: 12px; }
  .loot__list { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; gap: 6px; }
  .loot__list li { white-space: normal; text-align: start; font-size: 13.5px; line-height: 1.35; padding: 6px 8px 7px; gap: 7px; }
  .loot__list img { width: 20px; height: 20px; }
}

/* ============================================================ feature cards: idle pixel motion
   Stepped timing so it moves like a game sprite. Paused while the card is off screen (.is-paused from js/fx.js). */
.feat__pad { transform-origin: 50% 80%; animation: pad-play 2.8s steps(3) infinite; }
@keyframes pad-play {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  25% { translate: 0 -8px; rotate: -4deg; }
  50% { translate: 0 0; rotate: 0deg; }
  75% { translate: 0 -8px; rotate: 4deg; }
}
.feat__f1 { animation: drift 4s steps(6) infinite alternate, beat 1.4s steps(2) infinite; }
.feat__f2 { transform-origin: 18% 82%; animation: drift 6s steps(6) infinite alternate-reverse, slash 3.2s steps(2) .8s infinite; }
@keyframes drift { to { translate: 0 -16px; } }
@keyframes beat { 0%, 40%, 100% { scale: 1; } 10% { scale: 1.22; } 20% { scale: 1; } 30% { scale: 1.12; } }
@keyframes slash { 0%, 62%, 100% { rotate: 0deg; } 70% { rotate: -40deg; } 78% { rotate: 25deg; } 86% { rotate: 0deg; } }

/* pixel sparkles: a 4 px square with four 4 px arms */
.spark { position: absolute; width: 4px; height: 4px; background: currentColor; color: var(--mint-200); scale: 0; pointer-events: none;
  box-shadow: 4px 0 0, -4px 0 0, 0 4px 0, 0 -4px 0; animation: twinkle 2.4s steps(1) infinite; }
.spark--1 { top: 16%; inset-inline-start: 34%; }
.spark--2 { top: 56%; inset-inline-end: 4%; color: var(--white); animation-delay: .6s; }
.spark--3 { bottom: 10%; inset-inline-start: 44%; color: var(--blue-200); animation-delay: 1.2s; }
.spark--4 { top: 6%; inset-inline-end: 30%; animation-delay: 1.8s; }
@keyframes twinkle { 0%, 40%, 100% { scale: 0; } 10% { scale: 1; } 20% { scale: 2; } 30% { scale: 1; } }

/* spec cards: the bolt flickers, the key goes in and turns, the server block hops */
.mini__ico--bolt { animation: zap 2.6s steps(1) infinite; }
@keyframes zap {
  0%, 60%, 100% { opacity: 1; translate: 0 0; scale: 1; }
  64% { opacity: .35; translate: -2px 0; }
  68% { opacity: 1; translate: 2px 0; scale: 1.12; }
  72% { opacity: .5; translate: 0 0; }
  76% { opacity: 1; scale: 1.06; }
  80% { scale: 1; }
}
.mini__ico--key { animation: key-turn 3.2s steps(2) .8s infinite; }
@keyframes key-turn {
  0%, 100% { translate: 0 0; scale: 1 1; }
  25%, 35% { translate: 8px 0; scale: 1 1; }
  45% { translate: 8px 0; scale: 1 .2; }
  55% { translate: 8px 0; scale: 1 1; }
  70% { translate: 0 0; }
}
.mini__ico--srv { transform-origin: 50% 100%; animation: srv-hop 2.4s steps(2) 1.6s infinite; }
@keyframes srv-hop {
  0%, 50%, 100% { translate: 0 0; scale: 1 1; }
  62% { translate: 0 -12px; scale: .95 1.05; }
  74% { translate: 0 0; scale: 1.08 .92; }
  82% { scale: 1 1; }
}
.is-paused .feat__pad, .is-paused .feat__f1, .is-paused .feat__f2, .is-paused .spark, .is-paused .mini__ico { animation-play-state: paused; }

/* With a mouse the cards come alive when the pointer is on them, and the art leans toward it (--mx / --my from js/fx.js).
   On touch screens the loops above keep playing on their own. */
.feat__art > img, .mini__ico { transition: transform .35s var(--ease-out); }
.feat__pad { transform: translate(calc(var(--mx, 0) * 12px), calc(var(--my, 0) * 8px)); }
.feat__f1 { transform: translate(calc(var(--mx, 0) * -22px), calc(var(--my, 0) * -14px)); }
.feat__f2 { transform: translate(calc(var(--mx, 0) * 24px), calc(var(--my, 0) * 16px)); }
.mini__ico { transform: translate(calc(var(--mx, 0) * 8px), calc(var(--my, 0) * 6px)) rotate(calc(var(--mx, 0) * 8deg)); }
@media (hover: hover) and (pointer: fine) {
  .feat--a .feat__f1 { animation: drift 4s steps(6) infinite alternate; }
  .feat--a .feat__f2 { animation: drift 6s steps(6) infinite alternate-reverse; }
  .feat--a .spark { animation: none; }
  .feat--a:hover .feat__pad { animation-duration: 1.2s; }
  .feat--a:hover .feat__f1 { animation: drift 4s steps(6) infinite alternate, beat .9s steps(2) infinite; }
  .feat--a:hover .feat__f2 { animation: drift 6s steps(6) infinite alternate-reverse, slash 1.4s steps(2) infinite; }
  .feat--a:hover .spark { animation: twinkle 1.2s steps(1) infinite; }
  .feat--a:hover .spark--2 { animation-delay: .3s; }
  .feat--a:hover .spark--3 { animation-delay: .6s; }
  .feat--a:hover .spark--4 { animation-delay: .9s; }
  .mini__ico { animation: none; }
  .mini:hover .mini__ico--bolt { animation: zap 1.3s steps(1) infinite; }
  .mini:hover .mini__ico--key { animation: key-turn 1.6s steps(2) infinite; }
  .mini:hover .mini__ico--srv { animation: srv-hop 1.2s steps(2) infinite; }
}

/* RAM scene: players pop in, walk back and forth with a step bob, and now and then say something */
.rs-p { animation: rs-in .35s var(--ease-pop) var(--d) backwards, rs-walk var(--w) steps(10) var(--d) infinite; }
.rs-body { scale: var(--f) 1; animation: rs-face var(--w) steps(1) var(--d) infinite, rs-bob .44s steps(2) infinite; }
.rs-say { animation: rs-say 4.6s steps(1) calc(var(--d) + 1s) infinite; }
.rs-loot { animation: rs-in .4s var(--ease-pop) var(--d) backwards, rs-float 2.4s steps(4) var(--d) infinite alternate; }
.rs-isle + .rs-p, .rs-p { will-change: translate; }
@keyframes rs-in { from { opacity: 0; scale: .2; } }
@keyframes rs-walk { 0%, 100% { translate: 0 0; } 50% { translate: calc(var(--dx) * var(--u)) calc(var(--dy) * var(--u)); } }
@keyframes rs-face { 0% { scale: var(--f) 1; } 50% { scale: calc(var(--f) * -1) 1; } }
@keyframes rs-bob { 50% { translate: 0 calc(-1 * var(--u)); } }
@keyframes rs-say { 0%, 55%, 100% { scale: 0; } 60% { scale: .7; } 64%, 86% { scale: 1; } 90% { scale: .6; } }
@keyframes rs-float { to { translate: 0 calc(-6 * var(--u)); } }
.is-paused .ram__scene * { animation-play-state: paused; }

/* the night drive in the "where" section: stepped 2 px at a time so the pixels stay sharp */
.world__dunes { animation: world-a 48s steps(640) infinite; }
.world__road { animation: world-b 12s steps(640) infinite; }
.world__lights { animation: world-b 12s steps(640) infinite, world-blink 1.2s steps(1) infinite; }
.world__walker i { animation: world-bob .44s steps(2) infinite; }
@keyframes world-a { to { translate: -1280px 0; } }
@keyframes world-b { to { translate: -1280px 0; } }
@keyframes world-blink { 50% { opacity: .2; } }
@keyframes world-bob { 50% { translate: 0 -2px; } }
.is-paused .world * { animation-play-state: paused; }

/* support bell: rings when the pointer is on the box or when clicked; on touch screens it rings now and then */
.bell { position: relative; flex: none; display: block; cursor: pointer; }
.bell img { display: block; transform-origin: 50% 6%; transform: translate(calc(var(--mx, 0) * 6px), calc(var(--my, 0) * 4px)); transition: transform .3s var(--ease-out); }
.bell__dot { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; font: 800 12px/20px system-ui, sans-serif; text-align: center;
  color: var(--ink); background: #FF9A9A; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); scale: 0; transition: scale .25s var(--ease-pop); }
.bell__wave { position: absolute; top: 18px; width: 10px; height: 24px; border: 3px solid transparent; opacity: 0; pointer-events: none; }
.bell__wave--a { left: -16px; border-left-color: var(--mint); }
.bell__wave--b { right: -16px; border-right-color: var(--mint); }
.bell.is-ringing img { animation: bell-ring .9s steps(2); }
.bell.is-ringing .bell__dot { scale: 1; }
.bell.is-ringing .bell__wave { animation: bell-wave .9s steps(3); }
@media (hover: hover) and (pointer: fine) {
  .community__in:hover .bell img { animation: bell-ring 1.2s steps(2) infinite; }
  .community__in:hover .bell__dot { scale: 1; }
  .community__in:hover .bell__wave { animation: bell-wave 1.2s steps(3) infinite; }
}
@media (hover: none) {
  .bell img { animation: bell-idle 4s steps(2) infinite; }
  .bell__dot { scale: 1; }
}
@keyframes bell-ring { 0%, 100% { rotate: 0deg; } 12% { rotate: 20deg; } 28% { rotate: -18deg; } 44% { rotate: 12deg; } 60% { rotate: -8deg; } 76% { rotate: 4deg; } }
@keyframes bell-idle { 0%, 30%, 100% { rotate: 0deg; } 5% { rotate: 18deg; } 10% { rotate: -16deg; } 15% { rotate: 10deg; } 20% { rotate: -6deg; } }
@keyframes bell-wave { 0%, 100% { opacity: 0; scale: .6; } 30% { opacity: 1; scale: 1; } 70% { opacity: .6; scale: 1.25; } }

/* "ways" block cards: lean toward the pointer, hop on hover, crack into particles on click (js/fx.js) */
.way { cursor: pointer; transition: translate .25s var(--ease-out), border-color .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.way img { transform: translate(calc(var(--mx, 0) * 8px), calc(var(--my, 0) * 6px)) rotate(calc(var(--mx, 0) * 6deg)); transition: transform .3s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .way:hover { translate: 0 -6px; border-color: var(--mint); box-shadow: 0 16px 34px -20px rgba(90, 234, 207, .6); }
  .way:hover img { animation: way-hop .9s steps(3) infinite; }
}
@media (hover: none) {
  .way img { animation: way-bob 2.4s steps(4) infinite alternate; }
  .way:nth-child(2) img { animation-delay: -.6s; } .way:nth-child(3) img { animation-delay: -1.2s; } .way:nth-child(4) img { animation-delay: -1.8s; }
}
.way.is-hit img { animation: way-hit .3s steps(3); }
@keyframes way-hop { 0%, 100% { translate: 0 0; scale: 1 1; } 40% { translate: 0 -12px; scale: .96 1.04; } 70% { translate: 0 0; scale: 1.06 .94; } }
@keyframes way-bob { to { translate: 0 -6px; } }
@keyframes way-hit { 0%, 100% { translate: 0 0; } 33% { translate: -5px 0; } 66% { translate: 5px 0; } }
.is-paused .bell img, .is-paused .way img { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) {
  .mini { transition: translate .25s var(--ease-out), border-color .25s var(--ease-out); }
  .mini:hover { translate: 0 -6px; border-color: var(--mint); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
