/* Acts I and II: the hero board, the flight through the helmet, the world select.

   Default rules give a plain, readable page (no script, or reduced motion).
   Rules under .motion turn the same markup into one pinned, scroll-driven stage.
   Layers inside the pin, back to front:
     1-2  world artwork      5  canvas (wall + helmet)      6  hero copy
     7    the VIDI fly-by    8  world select controls       9  exit blades */

.stage {
  position: relative;
  background: var(--petrol);
  color: var(--cream);
}

.stage__canvas,
.flyby,
.blades,
.worlds__cursor,
.worlds__pips,
.hero__cue {
  display: none;
}

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

.hero {
  --board: min(42vw, 58svh, 39rem);
  --exit: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  min-height: 100svh;
  padding: calc(var(--nav-h) + 0.5rem) var(--gutter) clamp(3.25rem, 8svh, 4.5rem);
}

.hero__copy {
  display: grid;
  justify-items: start;
  gap: clamp(0.8rem, 2.2svh, 1.4rem);
}

.hero__emblem {
  justify-self: center;
  width: min(100%, 74svh);
  aspect-ratio: 1;
}

.hero__emblem img {
  width: 100%;
}

.hero__lead {
  max-width: 31em;
  font-size: clamp(1rem, 0.94rem + 0.34vw, 1.2rem);
  line-height: 1.45;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1rem;
  margin-top: 0.3rem;
}

/* ---------- the motto board: twelve letter tiles ---------- */

.motto {
  font-size: 1rem;
  line-height: 1;
}

.motto__board {
  --gap: calc(var(--board) * 0.03);
  --tile: calc((var(--board) - 3 * var(--gap)) / 4);
  display: grid;
  gap: calc(var(--gap) + var(--tile) * 0.07);
  width: var(--board);
  padding-bottom: calc(var(--tile) * 0.07);
  perspective: 70rem;
}

.motto__row {
  display: grid;
  grid-template-columns: repeat(4, var(--tile));
  gap: var(--gap);
}

.tile {
  position: relative;
  height: var(--tile);
  perspective: 38rem;
  transition: translate 0.16s var(--ease-out);
}

.tile__flip {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition:
    transform 0.7s var(--ease-spring) var(--d, 0s),
    opacity 0.12s linear var(--d, 0s);
}

.tile__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: calc(var(--tile) * 0.14);
  background: var(--ink);
  color: var(--cream);
  font: 600 calc(var(--tile) * 0.64) / 1 var(--font-display);
  box-shadow: 0 calc(var(--tile) * 0.07) 0 var(--ink-deep);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: box-shadow 0.16s var(--ease-out);
}

.tile__face--now {
  background: var(--gold);
  color: var(--ink-deep);
  box-shadow: 0 calc(var(--tile) * 0.07) 0 var(--gold-deep);
  transform: rotateX(180deg);
}

/* resting state: the last row has turned from VICI to LUSI */
.motto__row--twist .tile__flip {
  transform: rotateX(180deg);
}

/* The two faces also swap visibility as the tile passes edge-on (0.1s into the
   spring), so the flip never depends on a browser hiding back faces. */
.tile__face--was,
.tile__face--now {
  transition:
    box-shadow 0.16s var(--ease-out),
    visibility 0s linear calc(var(--d, 0s) + 0.1s);
}

.tile__face--was {
  visibility: hidden;
}

.motto__gloss {
  font: 500 var(--step-1) / 1.3 var(--font-text);
}

.motto__gloss s {
  position: relative;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.4s;
}

.motto__gloss s::after {
  content: "";
  position: absolute;
  inset: 54% -0.12em auto -0.12em;
  height: 0.12em;
  border-radius: 1em;
  background: var(--crimson);
  transform-origin: 0 50%;
  transition: transform 0.35s var(--ease-inout);
}

.motto__gloss strong {
  display: inline-block;
  color: var(--gold-light);
  font-weight: 700;
  transition:
    opacity 0.3s,
    translate 0.5s var(--ease-spring);
}

/* ---------- worlds, plain layout ---------- */

.worlds {
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
  background: var(--ink);
}

.worlds__title {
  display: flex;
  align-items: baseline;
  gap: 0.45em;
  font: 600 clamp(1.7rem, 1.2rem + 2vw, 3rem) / 1 var(--font-display);
  letter-spacing: 0.04em;
}

.worlds__num {
  font-size: 0.56em;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--accent, var(--gold-light));
  transition: color 0.4s;
}

.worlds__gloss {
  max-width: 26em;
  margin-top: 0.55rem;
}

.worlds__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: 3rem 2rem;
  margin-top: 2.75rem;
}

.world__art {
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 3 / 2;
  background: var(--scrim);
}

.world__frame,
.world__frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.world__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus-l);
}

.world__name {
  margin-top: 1.1rem;
  color: var(--accent);
  font: 600 var(--step-2) / 1.1 var(--font-display);
  letter-spacing: 0.03em;
}

.world__pick {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
}

.world__line {
  max-width: 30em;
  margin-top: 0.5rem;
}

@media (max-aspect-ratio: 4/5) {
  .world__art {
    aspect-ratio: 4 / 5;
  }

  .world__frame img {
    object-position: var(--focus-p);
  }
}

/* =====================================================================
   Motion: one sticky viewport that the scroll position drives.
   ===================================================================== */

/* --stage-len is set by stage/index.js; the fallbacks match it so nothing shifts when it arrives */
.motion .stage {
  height: calc(var(--stage-len, 8.12) * 100vh);
}

.motion .stage__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  /* nothing inside affects the page around it, so scrolling never re-lays out the rest */
  contain: layout paint;
}

.motion .stage__canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.motion .hero {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 6;
  height: 100svh;
  min-height: 0;
  pointer-events: none;
}

.motion .hero.is-gone {
  visibility: hidden;
}

.motion .hero__copy {
  pointer-events: auto;
}

/* the canvas draws the helmet here; the image only holds the space */
.motion .hero__emblem img {
  visibility: hidden;
}

/* scroll pushes the board apart and lifts the copy away */
.motion .tile {
  will-change: transform, opacity;
  transform: translate3d(calc(var(--exit) * var(--dx, 0px)), calc(var(--exit) * var(--dy, 0px)), 0)
    rotate(calc(var(--exit) * var(--dr, 0deg)));
  opacity: calc(1 - var(--exit) * 1.7);
}

.motion .motto__gloss,
.motion .hero__lead,
.motion .hero__actions {
  transform: translateY(calc(var(--exit) * -3rem));
  opacity: calc(1 - var(--exit) * 2.4);
  transition:
    opacity 0.5s var(--ease-out) var(--d, 0s),
    translate 0.6s var(--ease-out) var(--d, 0s);
}

.motion .hero.is-live .motto__gloss,
.motion .hero.is-live .hero__lead,
.motion .hero.is-live .hero__actions {
  transition: none;
}

.motion .tile:hover {
  translate: 0 calc(var(--tile) * 0.035);
}

.motion .tile:hover .tile__face {
  box-shadow: 0 calc(var(--tile) * 0.035) 0 var(--ink-deep);
}

.motion .tile:hover .tile__face--now {
  box-shadow: 0 calc(var(--tile) * 0.035) 0 var(--gold-deep);
}

.motion .hero__cue {
  position: absolute;
  left: 50%;
  bottom: clamp(0.9rem, 2.6svh, 1.6rem);
  display: block;
  padding: 0.4rem 0.6rem;
  text-decoration: none;
  pointer-events: auto;
  font-size: var(--step-small);
  font-weight: 600;
  font-stretch: 92%;
  white-space: nowrap;
  opacity: calc(0.9 - var(--exit) * 5);
  transform: translateX(-50%);
  transition: opacity 0.6s 0.4s;
}

.hero__cue span {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}

.hero__cue span::after {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border: solid currentColor;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  animation: cue 1.6s var(--ease-inout) infinite;
}

@keyframes cue {
  0%,
  100% {
    translate: 0 -0.25em;
  }
  50% {
    translate: 0 0.2em;
  }
}

/* ----- entrance: tiles flip in row by row, the last row first reads VICI ----- */

.pre .tile__flip {
  opacity: 0;
  transform: rotateX(-96deg);
}

/* the description and buttons are there from the first paint; only the motto waits for its cue */
.pre .motto__gloss,
.pre .hero__cue {
  opacity: 0;
  translate: 0 0.9rem;
}

.intro .motto__row--twist .tile__flip {
  transform: rotateX(0deg);
}

.pre .tile__face--was,
.intro .tile__face--was {
  visibility: visible;
}

.pre .tile__face--now,
.intro .tile__face--now {
  visibility: hidden;
}

.intro .motto__gloss s {
  opacity: 1;
}

.intro .motto__gloss s::after {
  transform: scaleX(0);
}

.intro .motto__gloss strong {
  opacity: 0;
  translate: -0.5em 0;
}

.motto__row--twist.is-won .tile {
  animation: hop 0.55s var(--ease-out) calc(var(--c, 0) * 0.07s);
}

@keyframes hop {
  0%,
  100% {
    translate: 0 0;
  }
  38% {
    translate: 0 calc(var(--tile) * -0.24);
  }
}

/* ----- the VIDI fly-by ----- */

.motion .flyby {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 7;
  display: grid;
  place-content: center;
  justify-items: center;
  height: 100svh;
  color: var(--cream);
  text-align: center;
  pointer-events: none;
  visibility: hidden;
  opacity: var(--fly-o, 0);
  transform: scale(var(--fly-s, 1));
  will-change: transform, opacity;
}

/* painted ahead of time (but transparent) once the entrance is over, so it arrives without a hitch */
.motion .flyby.is-ready {
  visibility: visible;
}

.flyby__num {
  margin-right: -0.36em;
  font: 600 clamp(1.3rem, 2.8vw, 2.5rem) / 1 var(--font-display);
  letter-spacing: 0.36em;
  color: var(--gold-light);
  text-shadow: 0 0.09em 0 var(--ink-deep);
}

.flyby__word {
  font: 600 clamp(5rem, 24vw, 23rem) / 0.95 var(--font-display);
  letter-spacing: 0.01em;
  -webkit-text-stroke: 0.035em var(--ink-deep);
  paint-order: stroke fill;
  text-shadow: 0 0.045em 0 var(--ink-deep);
}

.flyby__gloss {
  margin-top: 0.2em;
  font: 700 var(--step-2) / 1.1 var(--font-text);
  -webkit-text-stroke: 0.16em var(--ink-deep);
  paint-order: stroke fill;
}

/* ----- world select ----- */

.motion .worlds {
  --scrim-o: 0;
  /* menu type size: whichever is tighter, width or height, so every name always fits */
  --name: clamp(1.1rem, min(1rem + 1.75vw, 5.2svh), 2.6rem);
  position: absolute;
  inset: 0 0 auto 0;
  display: grid;
  grid-template-columns: minmax(0, 28rem) minmax(0, 1fr);
  /* rows: heading, slack, one per world (--count is set by the script), description, slack, pips */
  grid-template-rows: auto minmax(0.75rem, 1fr) repeat(var(--count, 6), auto) auto minmax(0.75rem, 1.25fr) auto;
  column-gap: 2rem;
  height: 100svh;
  padding: calc(var(--nav-h) + clamp(0.25rem, 2.5svh, 1.75rem)) var(--gutter) clamp(1.1rem, 4svh, 2.5rem);
  background: none;
  pointer-events: none;
}

.motion .worlds.is-open {
  --scrim-o: 1;
}

.motion .worlds__list,
.motion .world {
  display: contents;
}

/* artwork: a window that rotates about the bottom-left corner while its
   contents counter-rotate, so the picture stays upright as it is swept in */
.motion .world__art {
  position: absolute;
  left: 0;
  top: calc(var(--pin-h, 100vh) - 150vmax);
  z-index: 1;
  display: none;
  width: 150vmax;
  height: 150vmax;
  border-radius: 0;
  aspect-ratio: auto;
  background: none;
  transform-origin: 0 100%;
  visibility: hidden;
}

.motion .world.is-ready .world__art {
  display: block;
}

/* the next and previous worlds sit painted beneath the current one, so a sweep can start at once */
.motion .world.is-warm .world__art {
  z-index: 0;
  visibility: visible;
}

.motion .world.is-under .world__art {
  z-index: 1;
  visibility: visible;
}

.motion .world.is-on .world__art {
  z-index: 2;
  visibility: visible;
}

.motion .world__art::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  width: 0.55rem;
  height: 100%;
  background: var(--gold-light);
  opacity: 0;
}

.motion .world.is-sweeping .world__art::before {
  opacity: 1;
}

/* nothing behind the hero wall is painted until the visitor starts to scroll */
.motion .worlds:not(.is-lit) .world__art {
  visibility: hidden;
}

.motion .world__frame {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--pin-w, 100vw);
  height: var(--pin-h, 100vh);
  background: var(--scrim);
  transform-origin: 0 100%;
}

.motion .world__frame picture {
  position: absolute;
  inset: 0;
}

/* the artwork never sits perfectly still; it also eases back as the camera arrives.
   Only the worlds on show drift, so hidden ones cost nothing. */
.motion .world__frame img {
  transform: scale(var(--art-zoom, 1));
}

.motion .world.is-on .world__frame img,
.motion .world.is-under .world__frame img {
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    scale: 1;
    translate: 0 0;
  }
  to {
    scale: 1.06;
    translate: -1.2% -0.8%;
  }
}

.motion .world__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  /* plain fallback first, for browsers without color-mix() */
  background: linear-gradient(90deg, rgb(6 31 34 / 0.92), rgb(6 31 34 / 0.76) 24%, transparent 62%);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--scrim) 95%, transparent) 0%,
      color-mix(in srgb, var(--scrim) 80%, transparent) 24%,
      transparent 62%
    ),
    linear-gradient(180deg, color-mix(in srgb, var(--scrim) 76%, transparent) 0%, transparent 24%),
    linear-gradient(0deg, color-mix(in srgb, var(--scrim) 70%, transparent) 0%, transparent 30%);
  opacity: var(--scrim-o);
  transition: opacity 0.6s;
}

.motion .worlds__head {
  grid-area: 1 / 1;
  z-index: 8;
}

.motion .world__name {
  grid-column: 1;
  grid-row: calc(var(--i) + 3);
  z-index: 8;
  margin: 0;
  justify-self: start;
  font-size: var(--name);
  line-height: 1.12;
}

.motion .world__line {
  grid-column: 1;
  grid-row: calc(var(--count, 6) + 3);
  z-index: 8;
  max-width: 27em;
  margin-top: clamp(0.7rem, 2.6svh, 1.5rem);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  opacity: 0;
  transform: translateY(0.7rem);
  transition:
    opacity 0.22s,
    transform 0.4s var(--ease-out);
}

.motion .worlds.is-open .world.is-active .world__line {
  opacity: 1;
  transform: none;
  transition-delay: 0.28s;
}

.motion .worlds__head,
.motion .world__name,
.motion .worlds__pips,
.motion .worlds__cursor {
  opacity: 0;
  translate: -1.4rem 0;
  transition:
    opacity 0.3s,
    translate 0.5s var(--ease-out);
}

.motion .worlds.is-open .worlds__head,
.motion .worlds.is-open .world__name,
.motion .worlds.is-open .worlds__pips,
.motion .worlds.is-open .worlds__cursor {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}

.motion .worlds.is-open .world__name {
  transition-delay: calc(0.1s + var(--i) * 0.045s);
}

.motion .world__pick {
  padding: 0.14em 0;
  color: var(--cream);
  font-weight: 400;
  opacity: 0.62;
  cursor: pointer;
  text-shadow: 0 0.07em 0 rgb(6 31 34 / 0.45);
  transition:
    opacity 0.25s,
    color 0.3s,
    font-weight 0.35s var(--ease-out),
    transform 0.5s var(--ease-spring);
}

.motion .world__pick:hover {
  opacity: 1;
}

.motion .world.is-active .world__pick {
  color: var(--accent);
  font-weight: 700;
  opacity: 1;
  transform: translateX(1.45em);
}

/* the menu cursor is the helmet itself */
.motion .worlds__cursor {
  grid-area: 3 / 1;
  z-index: 8;
  display: block;
  align-self: center;
  width: calc(var(--name) * 1.2);
  transform: translateY(var(--cursor-y, 0px));
  transition:
    opacity 0.3s 0.3s,
    translate 0.5s var(--ease-out) 0.3s,
    transform 0.5s var(--ease-spring);
  pointer-events: none;
}

.motion .worlds.is-open .worlds__cursor {
  pointer-events: none;
}

.motion .worlds__pips {
  grid-column: 1;
  grid-row: calc(var(--count, 6) + 5);
  z-index: 8;
  display: flex;
  gap: 0.4rem;
  justify-self: start;
}

.worlds__pips i {
  width: clamp(1.1rem, 2.4vw, 2rem);
  height: 0.3rem;
  border-radius: 1rem;
  background: rgb(246 231 185 / 0.35);
  transition:
    background-color 0.3s,
    scale 0.4s var(--ease-spring);
}

.worlds__pips i.is-on {
  background: var(--accent, var(--gold-light));
  scale: 1 1.6;
}

/* ----- exit blades: three colours fan up from the bottom-left corner (drawn by stage/blades.js) ----- */

.motion .blades {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ----- act III title card: what the gold blade leaves behind ----- */

.titlecard {
  --focus: var(--ink-deep);
  padding: clamp(4rem, 9vw, 7rem) var(--gutter) 0;
  background: var(--gold);
  color: var(--ink-deep);
}

.giant {
  display: grid;
  gap: clamp(0.5rem, 1.6vw, 1.5rem);
  font: 600 min(31vw, 52svh, 38rem) / 0.8 var(--font-display);
}

.giant__num {
  font-size: clamp(1.1rem, 2.2vw, 2rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.36em;
}

.giant__word {
  display: flex;
  justify-content: space-between;
}

/* each letter rises out of its own mask */
.giant__word > span {
  display: block;
  padding-bottom: 0.05em;
  overflow: hidden;
}

.giant__word b {
  display: block;
  font-weight: inherit;
  transition: transform 0.9s var(--ease-out) calc(var(--n, 0) * 0.07s);
}

.giant__word > span:nth-child(2) {
  --n: 1;
}

.giant__word > span:nth-child(3) {
  --n: 2;
}

.giant__word > span:nth-child(4) {
  --n: 3;
}

.titlecard__gloss {
  margin-top: clamp(1rem, 2.5vw, 2rem);
  font: 500 var(--step-2) / 1.15 var(--font-text);
}

.motion .titlecard {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: grid;
  align-content: end;
  height: 100svh;
  padding: var(--nav-h) var(--gutter) clamp(1.5rem, 5svh, 3.5rem);
  background: none;
  pointer-events: none;
}

/* kept ready on their own layers so the reveal starts without a hitch */
.motion .giant__word b {
  will-change: transform;
}

.motion .giant__num,
.motion .titlecard__gloss {
  transition:
    opacity 0.5s 0.25s,
    translate 0.7s var(--ease-out) 0.25s;
}

/* 125%, not 100%: the capitals stand taller than their tight line box */
.motion .titlecard:not(.is-in) .giant__word b {
  transform: translateY(125%);
  transition-duration: 0.35s;
  transition-delay: 0s;
}

.motion .titlecard:not(.is-in) .giant__num,
.motion .titlecard:not(.is-in) .titlecard__gloss {
  opacity: 0;
  translate: 0 1rem;
  transition-duration: 0.2s;
  transition-delay: 0s;
}

/* ---------- narrow or tall screens: everything stacks, menu at the bottom ---------- */

@media (max-width: 52rem), (max-aspect-ratio: 4/5) {
  .hero {
    --board: min(100vw - 2 * var(--gutter), 30rem, 35svh);
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: clamp(0.5rem, 2svh, 1.25rem);
    padding-bottom: clamp(3rem, 7svh, 4rem);
  }

  .motion .stage {
    height: calc(var(--stage-len, 5.712) * 100vh);
  }

  .hero__emblem {
    order: -1;
    width: min(58vw, 24svh);
  }

  .hero__copy {
    justify-items: center;
    text-align: center;
  }

  .motto__gloss {
    font-size: clamp(1rem, 4.4vw, 1.3rem);
  }

  .hero__actions {
    justify-content: center;
  }

  .motion .worlds {
    --name: clamp(1.1rem, min(0.7rem + 3.4vw, 3.9svh), 1.9rem);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0.75rem, 1fr) repeat(var(--count, 6), auto) auto auto;
  }

  .motion .world__frame::after {
    background: linear-gradient(0deg, rgb(6 31 34 / 0.94), rgb(6 31 34 / 0.8) 34%, transparent 66%);
    background:
      linear-gradient(
        0deg,
        color-mix(in srgb, var(--scrim) 96%, transparent) 0%,
        color-mix(in srgb, var(--scrim) 84%, transparent) 34%,
        transparent 66%
      ),
      linear-gradient(180deg, color-mix(in srgb, var(--scrim) 80%, transparent) 0%, transparent 26%);
  }

  .motion .world__line {
    min-height: 4.5em;
    margin-top: 0.6rem;
  }

  .motion .worlds__pips {
    grid-row: calc(var(--count, 6) + 4);
    margin-top: 0.75rem;
  }
}

/* short screens: drop the scroll hint first, then tighten the hero */
@media (max-height: 44rem) {
  .hero {
    padding-bottom: 1.25rem;
  }

  .motion .hero__cue {
    display: none;
  }
}

@media (max-height: 42rem) and (max-aspect-ratio: 4/5) {
  .hero {
    --board: min(100vw - 2 * var(--gutter), 30svh);
    gap: 0.4rem;
  }

  .hero__emblem {
    width: min(50vw, 19svh);
  }

  .hero__copy {
    gap: 0.55rem;
  }

  .hero__lead {
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .motion .worlds__gloss {
    display: none;
  }
}

/* narrow phones: keep the two hero buttons on one row */
@media (max-width: 26rem) {
  .hero__actions {
    flex-wrap: nowrap;
    gap: 0.6rem;
  }

  .hero__actions .btn {
    padding-inline: 1em;
    font-size: 0.95rem;
  }
}

/* phones on their side: too short for a six-line menu plus a paragraph */
@media (max-height: 30rem) and (min-aspect-ratio: 4/5) {
  .hero {
    --board: min(34vw, 50svh);
  }

  .hero__lead {
    display: none;
  }

  .motion .worlds {
    --name: 1.05rem;
    grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
    grid-template-rows: auto minmax(0.25rem, 1fr) repeat(var(--count, 6), auto) minmax(0.25rem, 1fr) auto;
  }

  .motion .worlds__gloss {
    display: none;
  }

  /* no room under the menu, so the description sits on its own plate over the artwork */
  .motion .world__line {
    grid-column: 2;
    grid-row: 3 / calc(var(--count, 6) + 3);
    align-self: end;
    justify-self: end;
    max-width: 22em;
    margin: 0;
    padding: 0.6rem 0.8rem;
    border-radius: 0.6rem;
    background: color-mix(in srgb, var(--scrim) 88%, transparent);
    font-size: 0.9rem;
  }

  .motion .worlds__pips {
    grid-row: calc(var(--count, 6) + 4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile,
  .tile__flip,
  .giant__word b {
    transition: none;
  }
}
