/* The product page — StateLess-Cube's public page, as a template.
 *
 * The same lessons as the games apply: no blur filters on big surfaces, no
 * animated shadows, motion on the compositor only (transform / opacity).
 * The generator writes the game's colours into the tokens at the top.
 */

:root {
  --accent: #4dffc3;
  --accent2: #9b7bff;
  --accent3: #ff5cd6;
  --grad: linear-gradient(110deg, var(--accent), var(--accent2) 52%, var(--accent3));
  --radius: 28px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --max: 1160px;
  --pad: clamp(20px, 5vw, 40px);
  --bg: #070520;
  --bg2: #22124a;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.11);
  --text: #f6f2ff;
  --text-2: #ddd6f3;
  --muted: #a99ccd;
  --shadow: rgba(8, 4, 24, 0.6);
  --phone: linear-gradient(160deg, #3b3160, #16122a 45%, #2a2347);
  --glow: 32%;
  --grain: 0.3;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family:
    ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* -- ambient backdrop (gradients only, no blur filters) ------------------ */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(
      52vw 52vw at 10% 2%,
      color-mix(in srgb, var(--accent) var(--glow), transparent),
      transparent 62%
    ),
    radial-gradient(
      48vw 48vw at 92% 14%,
      color-mix(in srgb, var(--accent2) var(--glow), transparent),
      transparent 64%
    ),
    radial-gradient(
      56vw 56vw at 50% 98%,
      color-mix(in srgb, var(--accent3) calc(var(--glow) * 0.6), transparent),
      transparent 66%
    ),
    linear-gradient(180deg, var(--bg), var(--bg2) 55%, var(--bg));
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("grain.png");
  background-size: 180px;
}

.wrap {
  width: min(100% - (var(--pad) * 2), var(--max));
  margin-inline: auto;
}

.narrow {
  --max: 760px;
}

/* -- nav ----------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.logo img {
  border-radius: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition:
    transform 0.2s var(--ease),
    background 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
}

/* -- store buttons ------------------------------------------------------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  line-height: 1.15;
  transition:
    transform 0.2s var(--ease),
    background 0.2s var(--ease);
}

a.store:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
}

.store small {
  display: block;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.mark-apple {
  margin-top: -2px;
}

/* -- hero ---------------------------------------------------------------- */

.hero {
  padding: clamp(36px, 6vw, 74px) 0 clamp(20px, 3vw, 40px);
  overflow-x: clip;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.86fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
}

.hero-copy {
  min-width: 0;
}

h1 {
  font-size: clamp(2.6rem, 7.4vw, 6rem);
}

/* The wordmark fits its column whatever the name's length: ~0.56em a letter. */
.hero h1 {
  font-size: clamp(2.2rem, min(7.4vw, calc(min(46vw, 560px) / (var(--chars, 8) * 0.56))), 6rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin-top: 18px;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 600;
  color: var(--muted);
  text-wrap: pretty;
}

.hero .stores {
  margin-top: clamp(26px, 4vw, 38px);
}

.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: clamp(230px, 27vw, 310px);
  aspect-ratio: 9 / 19.5;
  border-radius: 44px;
  padding: 9px;
  background: var(--phone);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.16) inset,
    0 40px 90px var(--shadow),
    0 0 90px color-mix(in srgb, var(--accent2) 35%, transparent);
  animation: float 7s ease-in-out infinite;
}

.phone video,
.phone .screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 36px;
  background: var(--bg2);
}

.notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 31%;
  height: 20px;
  border-radius: 999px;
  background: #0a0714;
  z-index: 2;
}

.video-play {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.video-play[hidden] {
  display: none;
}

.peek {
  position: absolute;
  top: 50%;
  width: clamp(130px, 17vw, 200px);
  border-radius: 24px;
  border: 1px solid var(--border);
  opacity: 0.5;
  pointer-events: none;
}

.peek-l {
  left: 0;
  transform: translateY(-54%) rotate(-11deg);
}

.peek-r {
  right: 0;
  transform: translateY(-46%) rotate(11deg);
}

@keyframes float {
  50% {
    transform: translateY(-14px);
  }
}

/* -- the rules, in three words ------------------------------------------- */

.rules {
  padding: clamp(24px, 4vw, 44px) 0;
}

.rules .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 4vw, 44px);
}

.rule {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
}

.rule span {
  font-size: 1.4em;
  line-height: 1;
}

/* -- feature blocks ------------------------------------------------------ */

.feature {
  padding: clamp(44px, 6vw, 84px) 0;
}

.feature .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(30px, 6vw, 80px);
}

.feature-flip .feature-copy {
  order: 2;
}

h2 {
  font-size: clamp(2rem, 5.4vw, 3.9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.feature-copy p {
  margin-top: 16px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  color: var(--muted);
}

.feature-art {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.single img,
.fan img {
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px var(--shadow);
}

.single img {
  width: clamp(210px, 25vw, 290px);
}

.fan {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

/* The overlap is margin, not transform, so the row really is this narrow. */
.fan img {
  width: clamp(132px, 15.5vw, 195px);
}

.fan img:first-child {
  transform: rotate(-9deg);
  margin-right: clamp(-54px, -4.2vw, -30px);
  z-index: 1;
}

.fan img:nth-child(2) {
  position: relative;
  z-index: 3;
}

.fan img:last-child {
  transform: rotate(9deg);
  margin-left: clamp(-54px, -4.2vw, -30px);
  z-index: 2;
}

.section-title {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  text-align: center;
  margin-bottom: clamp(20px, 3vw, 32px);
}

/* -- the worlds shelf ---------------------------------------------------- */

.worlds {
  padding: clamp(20px, 4vw, 40px) 0 clamp(50px, 8vw, 90px);
}

.shelf {
  display: grid;
  grid-template-columns: repeat(var(--narrow, 3), 1fr);
  gap: 12px;
}

@media (min-width: 1000px) {
  .shelf {
    grid-template-columns: repeat(var(--wide, 9), 1fr);
  }
}

.world {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 10px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  transition:
    transform 0.2s var(--ease),
    background 0.2s var(--ease);
}

.world:hover {
  transform: translateY(-4px);
  background: var(--surface-2);
}

.dot {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 1.3rem;
  color: #130d24;
  box-shadow: 0 8px 20px var(--shadow);
}

/* -- modes ----------------------------------------------------------------- */

.modes {
  padding: clamp(30px, 5vw, 60px) 0;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.mode {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.mode-icon {
  font-size: 2rem;
}

.mode h3 {
  margin-top: 10px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.mode p {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
}

/* -- get it -------------------------------------------------------------- */

.get {
  padding: 0 0 clamp(60px, 9vw, 110px);
}

.get .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: clamp(42px, 7vw, 76px) var(--pad);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(70% 120% at 50% 0%, color-mix(in srgb, var(--accent2) 30%, transparent), transparent 70%),
    var(--surface);
  text-align: center;
}

.get img {
  border-radius: 22px;
  box-shadow: 0 20px 50px var(--shadow);
}

.get-line {
  margin-top: -8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.1rem;
}

.get .stores {
  justify-content: center;
}

.promises {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  list-style: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.promises li::before {
  content: "✓ ";
  color: var(--accent);
}

/* -- questions and the legal pages ------------------------------------------ */

.faq {
  padding: 0 0 clamp(50px, 8vw, 90px);
}

.faq .wrap {
  max-width: 760px;
}

details {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

summary {
  cursor: pointer;
  font-weight: 750;
  font-size: 1.05rem;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 600;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 550;
}

.legal {
  padding: clamp(40px, 7vw, 90px) 0 clamp(60px, 9vw, 110px);
}

.legal h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
}

.legal h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-top: 34px;
}

.legal p,
.legal li {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 1.02rem;
  max-width: 66ch;
}

.legal ul {
  padding-left: 1.2em;
}

.legal a,
.legal summary + p a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal details {
  margin-top: 6px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* -- footer -------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

footer a:hover {
  color: var(--text);
}

footer .mark {
  width: 18px;
  height: 18px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* -- reveal on scroll (only hidden when JS can bring it back) ------------ */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

/* -- narrow screens ------------------------------------------------------ */

@media (max-width: 900px) {
  .hero .wrap,
  .feature .wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero .stores,
  .rules .wrap {
    justify-content: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero h1 {
    font-size: clamp(2rem, calc((100vw - 48px) / (var(--chars, 8) * 0.56)), 4.4rem);
  }

  .hero-media {
    margin-top: 10px;
  }

  .feature-flip .feature-copy {
    order: 0;
  }

  .phone {
    width: clamp(240px, 62vw, 300px);
  }

  .peek {
    width: clamp(120px, 30vw, 170px);
  }

  .single img {
    width: clamp(200px, 58vw, 280px);
  }

  .fan img {
    width: 30vw;
    max-width: 180px;
  }

  .fan img:first-child {
    margin-right: -6vw;
  }

  .fan img:last-child {
    margin-left: -6vw;
  }

  footer .wrap {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .peek {
    display: none;
  }

  .rules .wrap {
    gap: 9px;
  }

  .rule {
    padding: 12px 15px;
    gap: 7px;
    font-size: 0.95rem;
  }

  .rule span {
    font-size: 1.2em;
  }

  .store {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .phone {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* == the immersive layout ===================================================
 * site.json "layout": "immersive". The game fills the hero edge to edge and
 * the features are full-bleed chapters. Same rules as above: gradients, not
 * blur filters; motion is transform and opacity; all of it stops under
 * prefers-reduced-motion.
 */

/* clip, not hidden: a hidden body is a scroll container, and the pinned sequence would not stick. */
body.immersive {
  overflow-x: clip;
}

/* The game is the light here: a deeper, quieter backdrop. */
.immersive .aurora {
  opacity: 0.5;
}

.immersive .grain {
  opacity: calc(var(--grain) * 0.4);
}

.immersive .nav {
  position: fixed;
  inset: 0 0 auto;
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.immersive .nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom-color: var(--border);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
}

.immersive .eyebrow {
  color: var(--accent);
}

/* -- hero: the game, full screen ------------------------------------------ */

.hero-x {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 clamp(72px, 12vh, 132px);
  overflow: hidden;
  isolation: isolate;
}

.hero-x-stage,
.hero-x-stage > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-x-stage {
  z-index: -1;
  background: var(--bg2);
}

.hero-x-poster img,
.hero-x-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

/* The video fades in over its poster once it plays: no black flash. */
.hero-x-video {
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

.hero-x-video.playing {
  opacity: 1;
}

.fx {
  pointer-events: none;
}

.hero-x-shade {
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 30%, transparent 62%),
    linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 26%, transparent 46%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, transparent 18%);
}

/* A soft light that follows the pointer (moved with transform only). */
.hero-x-glow {
  width: 46vmax;
  height: 46vmax;
  inset: auto;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), transparent);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.6s var(--ease);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-x-glow.on {
  opacity: 1;
}

.hero-x-copy {
  position: relative;
}

.hero-x h1 {
  font-size: clamp(4rem, min(15vw, calc(84vw / (var(--chars, 8) * 0.6))), 13rem);
  font-weight: 850;
  line-height: 0.86;
  letter-spacing: -0.06em;
  margin-left: -0.04em;
}

.hero-x h1 .grad {
  background-size: 220% 100%;
  animation: shimmer 6s ease-in-out infinite alternate;
}

.hero-x .lede {
  color: var(--text-2);
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  max-width: 22ch;
}

.hero-x .stores {
  margin-top: clamp(24px, 4vh, 40px);
}

.immersive .store {
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-x-in {
  animation: rise 1s var(--ease) both;
}

.hero-x-in:nth-child(2) {
  animation-delay: 0.08s;
}

.hero-x-in:nth-child(3) {
  animation-delay: 0.2s;
}

.hero-x-in:nth-child(4) {
  animation-delay: 0.32s;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--text) 45%, transparent);
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--text);
  animation: cue 1.8s var(--ease) infinite;
}

@keyframes shimmer {
  to {
    background-position: 100% 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

@keyframes cue {
  60%,
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* -- the rules, glowing ------------------------------------------------------ */

.immersive .rules {
  padding: clamp(40px, 7vw, 80px) 0 clamp(20px, 4vw, 40px);
}

.immersive .rule {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  padding: 16px 30px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent) inset;
}

/* -- chapters: one big shot each ------------------------------------------- */

.chapter {
  position: relative;
  padding: clamp(60px, 10vw, 140px) 0;
}

.chapter .wrap,
.evolve .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(30px, 6vw, 90px);
}

.chapter-flip .feature-copy {
  order: 2;
}

.chapter-no {
  font-size: clamp(3.4rem, 8vw, 6.5rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--accent) 70%, transparent);
  margin-bottom: 10px;
}

.immersive h2 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.immersive .feature-copy p:not(.chapter-no) {
  margin-top: 18px;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--muted);
  max-width: 34ch;
}

.chapter-art {
  position: relative;
  display: flex;
  justify-content: center;
}

/* The light behind a shot: a gradient, never a blur. */
.chapter-art::before,
.evolve-art::before {
  content: "";
  position: absolute;
  inset: -12% -18%;
  z-index: -1;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--accent2) 42%, transparent), transparent),
    radial-gradient(40% 40% at 70% 70%, color-mix(in srgb, var(--accent3) 30%, transparent), transparent);
}

.chapter-art img,
.evolve-art img {
  /* a phone shot is ~2.17× as tall as wide: it always fits the screen's height */
  width: min(clamp(250px, 30vw, 380px), calc((100svh - 190px) * 0.46));
  border-radius: 34px;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
    0 50px 120px var(--shadow);
  transform: translateY(calc(var(--p, 0) * -40px));
}

/* -- the sequence: pinned, it steps through three shots ------------------- */

.evolve {
  position: relative;
  height: calc(var(--steps) * 85svh);
}

.evolve-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
}

.steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.steps li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 750;
  color: var(--muted);
  transition:
    color 0.4s var(--ease),
    background 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.steps span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 0.85rem;
}

.steps li.on {
  color: var(--text);
  background: color-mix(in srgb, var(--accent2) 30%, transparent);
  transform: translateY(-2px);
}

.steps li.on span {
  background: var(--grad);
  color: #fff;
}

.evolve-art {
  position: relative;
  display: grid;
  justify-items: center;
}

.evolve-art img {
  grid-area: 1 / 1;
  opacity: 0;
  transform: scale(0.94) rotate(-2deg);
  transition:
    opacity 0.6s var(--ease),
    transform 0.8s var(--ease);
}

.evolve-art img.on {
  opacity: 1;
  transform: none;
}

.evolve-bar {
  grid-area: 2 / 1;
  width: clamp(160px, 20vw, 240px);
  height: 4px;
  margin-top: 26px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}

.evolve-bar i {
  display: block;
  height: 100%;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
}

/* -- the shelf, modes and the card ------------------------------------------ */

.immersive .world:hover .dot {
  transform: scale(1.12) rotate(-6deg);
}

.immersive .dot {
  transition: transform 0.3s var(--ease);
  box-shadow:
    0 8px 24px var(--shadow),
    0 0 26px color-mix(in srgb, var(--accent) 30%, transparent);
}

.immersive .mode {
  position: relative;
  overflow: hidden;
  padding: 30px;
}

.immersive .mode::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent2) 30%, transparent), transparent);
  pointer-events: none;
}

.immersive .mode-icon {
  font-size: 2.6rem;
}

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

/* A light that runs round the card's edge. */
.immersive .get .wrap {
  position: relative;
  border: 0;
  isolation: isolate;
}

.immersive .get .wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background:
    conic-gradient(
      from var(--spin),
      transparent 0 62%,
      var(--accent) 76%,
      var(--accent3) 84%,
      transparent 92%
    ),
    var(--border);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 7s linear infinite;
}

@keyframes spin {
  to {
    --spin: 360deg;
  }
}

/* -- phones: the shots go edge to edge -------------------------------------- */

@media (max-width: 900px) {
  .chapter .wrap,
  .evolve .wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .chapter-flip .feature-copy {
    order: 0;
  }

  .immersive .feature-copy p:not(.chapter-no) {
    margin-inline: auto;
  }

  .steps {
    justify-content: center;
  }

  .evolve {
    height: calc(var(--steps) * 80svh);
  }

  .evolve .wrap {
    gap: 22px;
  }

  /* the pinned sequence fits a phone's height: a compact title, one row of steps */
  .evolve-pin {
    padding-top: 64px;
  }

  .evolve .chapter-no {
    display: none;
  }

  .evolve h2 {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  .immersive .evolve .feature-copy p {
    margin-top: 10px;
    font-size: 1rem;
  }

  .evolve .steps {
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 16px;
  }

  .evolve .steps li {
    padding: 6px 12px 6px 6px;
    gap: 6px;
    font-size: 0.9rem;
  }

  .evolve .steps span {
    width: 22px;
    height: 22px;
  }

  .evolve-art img {
    width: min(56vw, 20svh);
    border-radius: 22px;
  }

  .evolve-bar {
    margin-top: 14px;
  }

  .hero-x h1 {
    font-size: clamp(3.4rem, calc(88vw / (var(--chars, 8) * 0.6)), 9rem);
  }

  .chapter {
    padding-bottom: 0;
  }

  .chapter-art {
    margin-inline: calc(var(--pad) * -1);
  }

  .chapter-art img {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 8%, #000 86%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 8%, #000 86%, transparent);
  }

  .hero-x {
    align-items: flex-end;
    text-align: center;
  }

  .hero-x-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-x .lede {
    margin-inline: auto;
  }

  .hero-x .stores {
    justify-content: center;
  }

  .hero-x-shade {
    background:
      linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 86%, transparent) 30%, transparent 62%),
      linear-gradient(
        180deg,
        var(--bg) 0%,
        color-mix(in srgb, var(--bg) 60%, transparent) 12%,
        transparent 24%
      );
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-x-in,
  .hero-x h1 .grad,
  .scroll-cue span,
  .immersive .get .wrap::before {
    animation: none;
  }

  .chapter-art img,
  .evolve-art img {
    transform: none;
  }
}
