/* The home page (js/views/promo.js): real footage of the game on the site's ground (base.css tokens), parchment for the
   rules, navy lacquer for pictures' captions and buttons, gold the one accent. Text over footage always sits on the
   hero's shade, measured against the darkest and the brightest frame of every loop (docs/tasks/20261115-night/S6.md). */

.home {
  --home-max: 1180px;
  overflow-x: clip;
}

/* ------------------------------------------------------------------ hero: a game being played */
.home-hero {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--bar-actual, var(--bar-h)) + 8px) var(--pad) 0;
  overflow: hidden;
  background: var(--desk-lo);
}
.home-hero__poster,
.film {
  position: absolute;
  inset: 0;
  z-index: -3;
}
.film {
  z-index: -2;
  pointer-events: none;
}
.home-hero__poster img,
.film__clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.home-hero__poster img {
  animation: home-settle 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.film__clip {
  opacity: 0;
  transition: opacity 1.2s ease;
}
.film__clip.is-on {
  opacity: 1;
}
/* the shade: dark at the top (under the bar), deepest behind the text block, the foot fading into the ground. The
   board sits centred under it (S13: the reshoot's loops); its pale grounds (sakura stone, avalon grass) and a camp's
   dust puff under the kicker set the middle stop (measured: S13-promo-assets.md, hero contrast). The ellipse's middle
   follows the text block (--hero-text-y) */
.home-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 7, 4, 0.78) 0, rgba(10, 7, 4, 0.34) calc(var(--bar-actual, var(--bar-h)) + 60px), rgba(10, 7, 4, 0) 34%),
    radial-gradient(ellipse 50% 46% at 50% var(--hero-text-y, 50%), rgba(12, 8, 5, 0.8), rgba(12, 8, 5, 0.7) 58%, rgba(12, 8, 5, 0.32) 100%),
    linear-gradient(180deg, rgba(12, 8, 5, 0) 62%, rgba(27, 19, 12, 0.85) 92%, var(--desk) 100%);
}
/* upright screens: the text block fills the width, so the shade does too. S23 (Phone layout): lighter than before
   (centre 0.84 → 0.74, edges 0.42 → 0.3) so more of the board shows round the text, no lighter than the lede and the
   kicker allow: WCAG AA against the brightest pixel under them in every frame of every loop (s23/contrast-*.json) */
@media (max-aspect-ratio: 3/4) {
  .home-hero__shade {
    background:
      linear-gradient(180deg, rgba(10, 7, 4, 0.76) 0, rgba(10, 7, 4, 0.36) calc(var(--bar-actual, var(--bar-h)) + 50px), rgba(10, 7, 4, 0) 28%),
      radial-gradient(ellipse 92% 54% at 50% 47%, rgba(12, 8, 5, 0.74), rgba(12, 8, 5, 0.64) 62%, rgba(12, 8, 5, 0.3) 100%),
      linear-gradient(180deg, rgba(12, 8, 5, 0) 66%, rgba(27, 19, 12, 0.85) 92%, var(--desk) 100%);
  }
}

/* the kicker's two sentences: each stays whole, so a narrow screen breaks between them; there, without the side
   ornaments (they would hang at the screen's edges, off the two centred lines) */
.kicker__text > span {
  display: inline-block;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .home-hero .kicker {
    text-align: center;
    letter-spacing: 0.2em;
  }
  .home-hero .kicker::before,
  .home-hero .kicker::after {
    display: none;
  }
}

.home-hero__body {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(12px, 2.2vh, 22px);
  max-width: 820px;
  padding: clamp(16px, 4vh, 48px) 0 clamp(18px, 4vh, 44px);
  text-align: center;
}
/* landscape screens: the text block sits 8vh above the middle, so the lower part of a board of several islands (an
   islet, the boats) shows under the store buttons instead of behind them (S16: the round-3 boards fill less of the
   frame than the single island did) */
@media (min-aspect-ratio: 4/3) {
  .home-hero {
    --hero-text-y: 42%;
  }
  .home-hero__body {
    padding-bottom: calc(clamp(18px, 4vh, 44px) + 16vh);
  }
}
.home-hero__body > * {
  animation: home-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.home-hero__body > :nth-child(2) {
  animation-delay: 0.08s;
}
.home-hero__body > :nth-child(3) {
  animation-delay: 0.2s;
}
.home-hero__body > :nth-child(4) {
  animation-delay: 0.32s;
}
.home-hero__body > :nth-child(5) {
  animation-delay: 0.44s;
}
.home-hero__name {
  margin: 0;
  line-height: 0;
}
.home-hero__logo {
  width: min(78vw, 520px);
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75));
}
.home-hero__lede {
  max-width: 32em;
  font-size: clamp(1.12rem, 1rem + 0.55vw, 1.4rem);
  line-height: 1.45;
  text-wrap: balance;
  color: var(--cream);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

/* the store buttons: lacquer plates in a bronze frame, the game's button family */
.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
  margin-top: 4px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 212px;
  min-height: 62px;
  padding: 8px 22px 8px 16px;
  border-radius: 9px;
  text-align: left;
  text-decoration: none;
  color: var(--cream);
  background:
    var(--pin) top 5px left 5px / 8px no-repeat,
    var(--pin) top 5px right 5px / 8px no-repeat,
    var(--pin) bottom 5px left 5px / 8px no-repeat,
    var(--pin) bottom 5px right 5px / 8px no-repeat,
    var(--lacquer);
  box-shadow: var(--frame-lacquer), 0 8px 14px -6px rgba(0, 0, 0, 0.8);
  transition: filter 0.15s;
}
a.store:hover {
  filter: brightness(1.14);
  box-shadow: var(--frame-lacquer-hi), 0 8px 14px -6px rgba(0, 0, 0, 0.8);
}
a.store:active {
  filter: brightness(0.88);
}
.store__glyph {
  flex: none;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--gold-hi);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.store__text {
  display: grid;
  gap: 3px;
}
.store__cta {
  font: 700 0.62rem / 1.15 var(--font-title);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.store__name {
  font: 600 1.32rem / 1.05 var(--font-text);
  color: var(--cream);
}
/* not in that store yet: the same plate in slate, no gloss, no link */
.store--soon {
  background:
    var(--pin) top 5px left 5px / 8px no-repeat,
    var(--pin) top 5px right 5px / 8px no-repeat,
    var(--pin) bottom 5px left 5px / 8px no-repeat,
    var(--pin) bottom 5px right 5px / 8px no-repeat,
    var(--tex-slate) 0 0 / 300px 300px,
    var(--slate);
  box-shadow:
    inset 0 0 0 1px #0d0905,
    inset 0 0 0 3px #5e4a2c,
    inset 0 0 0 4px rgba(201, 162, 78, 0.45),
    inset 0 0 0 5px #1d1912,
    0 8px 14px -6px rgba(0, 0, 0, 0.8);
}
.store--soon .store__glyph {
  stroke: var(--cream-80);
}
.store--soon .store__cta {
  color: var(--cream-80);
}

/* "Watch live matches": a dark pill with the live dot */
.watch-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  font: 700 0.78rem / 1 var(--font-title);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-hi);
  text-decoration: none;
  background: rgba(10, 15, 29, 0.82);
  box-shadow: var(--hairline-gilt);
}
.watch-link:hover {
  color: var(--cream);
  box-shadow: inset 0 0 0 1px var(--gold-hi);
}
/* the live dot: a small candle-gold light, as the arena's "live" chips */
.live-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 8px 2px rgba(232, 203, 116, 0.7);
  animation: dot 1.6s ease-in-out infinite;
}

.home-hero__more {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: clamp(14px, 3vh, 28px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(10, 15, 29, 0.78);
  box-shadow: var(--hairline-gilt);
}
.home-hero__more:hover {
  box-shadow: inset 0 0 0 1px var(--gold-hi);
}
.home-hero__chev {
  width: 22px;
  height: 22px;
  background: var(--gold-hi);
  -webkit-mask: url(../img/chev-r.webp?v=uVQRaH6m) center / contain no-repeat;
  mask: url(../img/chev-r.webp?v=uVQRaH6m) center / contain no-repeat;
  transform: rotate(90deg);
  animation: home-bob 2.6s ease-in-out infinite;
}
/* the film's pause / play plate, at the hero's lower right */
.home-hero__motion {
  position: absolute;
  right: max(var(--pad), env(safe-area-inset-right));
  bottom: clamp(14px, 3vh, 28px);
}

/* the play / pause plate of every clip: a navy disc in a bronze ring, a gilt triangle or two gilt bars */
.play-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 35% 28%, var(--navy-hi), var(--navy) 62%, var(--navy-lo));
  box-shadow: inset 0 0 0 2px var(--bronze), inset 0 0 0 3px rgba(232, 203, 116, 0.78), 0 4px 10px -2px rgba(0, 0, 0, 0.75);
}
.play-btn:hover {
  box-shadow: inset 0 0 0 2px var(--gold-leaf), inset 0 0 0 3px var(--gold-hi), 0 4px 10px -2px rgba(0, 0, 0, 0.75);
}
.play-btn__icon {
  width: 14px;
  height: 16px;
  margin-left: 3px;
  background: var(--gold-hi);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.play-btn[data-state="playing"] .play-btn__icon {
  width: 13px;
  height: 15px;
  margin-left: 0;
  clip-path: none;
  background: linear-gradient(90deg, var(--gold-hi) 0 36%, transparent 36% 64%, var(--gold-hi) 64% 100%);
}

/* ------------------------------------------------------------------ sections on the ground */
.home-section {
  max-width: var(--home-max);
  margin: 0 auto;
  /* some room below too: a rendered-when-near section clips at its box, and its cards' shadows need it */
  padding: calc(var(--section-gap) - 40px) var(--pad) 40px;
  outline: none;
}
/* Off-screen sections are not rendered until they come near: their textures, emblems and pictures load then, not with
   the first view (the size is remembered once seen). */
.home-section,
.home-cta {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}
.home-head {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: clamp(26px, 4vw, 48px);
}
.home-title {
  font-size: var(--fs-h2);
}
.home-lede {
  max-width: 40em;
  font-size: var(--fs-lede);
  color: var(--cream-80);
}

/* how it plays: four parchment cards, each the real move as a still that plays when looked at */
.beats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-5) 20px;
}
.beat {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 10px;
  padding: 10px 10px 22px;
}
.beat__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--r-s);
  background: #0e2a33;
  box-shadow: 0 0 0 1px rgba(43, 32, 22, 0.85), 0 3px 6px -2px rgba(43, 32, 22, 0.65);
}
.beat__still img,
.beat__clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.beat__clip {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.beat__clip.is-on {
  opacity: 1;
}
.beat__play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 40px;
  height: 40px;
}
.beat__title {
  display: flex;
  align-items: center;
  gap: 10px;
  /* two lines' room, so the four cards' texts start on one line whatever the title's length */
  min-height: calc(2 * 1.2em);
  margin: 6px 8px 0;
  font: 700 var(--fs-h3) / 1.2 var(--font-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ink);
}
.beat__num {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 2.2em;
  height: 2.2em;
  padding: 0 0.3em;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(43, 32, 22, 0.75);
}
.beat__text {
  margin: 0 8px;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.42;
  text-wrap: pretty;
}

/* what playing looks like: a gallery of the game's screens (its own camera, HUD on). One 16:9 frame at a time over its
   caption (every caption sits in one cell, so the longest sets the height and nothing below moves), previous / next on
   the frame's sides, the thumbnails under it (a phone: dots between previous and next); the frame opens at full size
   in the lightbox */
.gallery {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "stage stage stage"
    "caption caption caption"
    "picks picks picks";
  row-gap: 16px;
}
.gallery__stage {
  grid-area: stage;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-m);
  background: #0b1020;
  box-shadow: var(--frame-picture), var(--shadow-3);
  /* a sideways swipe is the gallery's; up and down still scroll the page */
  touch-action: pan-y;
}
.gallery__open {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  overflow: hidden;
  cursor: zoom-in;
  background: none;
}
.gallery__frame {
  position: absolute;
  inset: 0;
}
.gallery__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* a step: the new frame fades in over the one shown (js/views/promo.js GALLERY_FADE_MS) */
.gallery__frame.is-top {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.gallery__frame.is-top.is-on {
  opacity: 1;
}
/* previous / next: the clips' navy disc (.play-btn) with a gilt chevron, on the frame's sides */
.gallery__nav {
  grid-area: stage;
  align-self: center;
  z-index: 2;
}
.gallery__nav--prev {
  justify-self: start;
  margin-left: 12px;
}
.gallery__nav--next {
  justify-self: end;
  margin-right: 12px;
}
.gallery__nav::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--gold-hi);
  -webkit-mask: url(../img/chev-r.webp?v=uVQRaH6m) center / contain no-repeat;
  mask: url(../img/chev-r.webp?v=uVQRaH6m) center / contain no-repeat;
}
.gallery__nav--prev::before {
  -webkit-mask-image: url(../img/chev-l.webp?v=UfBmInIK);
  mask-image: url(../img/chev-l.webp?v=UfBmInIK);
}
.gallery__captions {
  grid-area: caption;
  display: grid;
}
.gallery__caption,
.lightbox__caption,
.hands__caption,
.hands-pair figcaption {
  max-width: 46em;
  font-size: var(--fs-caption);
  font-style: italic;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
  color: var(--cream);
}
.gallery__caption {
  grid-area: 1 / 1;
  margin: 0 auto;
  visibility: hidden;
}
.gallery__caption.is-on {
  visibility: visible;
}
.gallery__picks {
  grid-area: picks;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.gallery__pick {
  flex: 0 1 96px;
  min-width: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  background: #0b1020;
  opacity: 0.6;
  box-shadow: 0 0 0 1px #1b1209, 0 0 0 2px rgba(138, 106, 60, 0.75);
  transition: opacity 0.2s ease;
}
.gallery__pick:hover {
  opacity: 0.9;
}
.gallery__pick[aria-selected="true"] {
  opacity: 1;
  box-shadow: 0 0 0 1px #1b1209, 0 0 0 3px var(--gold-hi);
}
.gallery__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.gallery__dot {
  display: none;
}

/* the lightbox (a modal dialog): the frame's largest file, never enlarged, on the dark ground; its caption under it, a
   close button in the corner. A click on the ground closes it too. */
.lightbox {
  --lb-pad: clamp(12px, 3vw, 40px);
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--lb-pad);
  border: 0;
  color: var(--cream);
  background: rgba(10, 7, 4, 0.94);
}
.lightbox[open] {
  display: grid;
  place-items: center;
  animation: lightbox-in 0.25s ease both;
}
.lightbox::backdrop {
  background: transparent;
}
.lightbox__figure {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
}
.lightbox__figure picture {
  display: contents;
}
.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 2 * var(--lb-pad));
  max-height: calc(100vh - 2 * var(--lb-pad) - 3.5em);
  max-height: calc(100dvh - 2 * var(--lb-pad) - 3.5em);
  border-radius: var(--r-s);
  box-shadow: var(--frame-picture), var(--shadow-3);
}
.lightbox__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  color: var(--gold-hi);
}
.lightbox__close .ico {
  width: 22px;
  height: 22px;
}
/* the page under the lightbox stays where it was */
html:has(.lightbox[open]) {
  overflow: hidden;
}

/* mouse, gamepad or touch (S22): one moment of a match in both interfaces in one 16:9 box (nothing moves while the
   pictures load): the large interface whole, the compact one over it up to the divider (--split, set through the
   CSSOM by js/views/promo.js `hands`), a gilt rule and a round grip on the divider (the clips' navy disc in its bronze
   ring, two gilt chevrons). Each side's label sits by the top centre, clear of the game's own top bar and corners,
   and gives way when the divider would cross it. */
.hands {
  display: grid;
  gap: 16px;
  margin: 0;
}
.hands__stage {
  --split: 50%;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-m);
  background: #0b1020;
  box-shadow: var(--frame-picture), var(--shadow-3);
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  /* a sideways drag is the divider's; up and down still scroll the page */
  touch-action: pan-y;
}
.hands__frame {
  position: absolute;
  inset: 0;
}
.hands__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}
.hands__frame--mouse {
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}
.hands__label {
  position: absolute;
  top: 9%;
  z-index: 2;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  font: 700 clamp(0.62rem, 0.54rem + 0.35vw, 0.78rem) / 1 var(--font-title);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gold-hi);
  background: rgba(10, 15, 29, 0.84);
  box-shadow: var(--hairline-gilt);
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.hands__label--mouse {
  right: calc(50% + 34px);
}
.hands__label--gamepad {
  left: calc(50% + 34px);
}
.hands__label.is-covered {
  opacity: 0;
}
/* the rule and the grip move by transform, never by layout: a drag or the intro sweep is no layout shift. Each is a
   full-width layer, so a percentage of its own width is one of the picture's. */
.hands__rule,
.hands__handle {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hands__rule {
  z-index: 3;
  transform: translateX(var(--split));
}
.hands__rule::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2px;
  width: 4px;
  background: linear-gradient(90deg, var(--bronze), var(--gold-hi) 50%, var(--bronze));
  box-shadow: 0 0 0 1px rgba(20, 13, 7, 0.7), 0 0 10px rgba(0, 0, 0, 0.55);
}
.hands__handle {
  --grip: 50px;
  z-index: 4;
  /* the whole disc stays on the picture, also with the divider at an edge */
  transform: translateX(clamp(calc(var(--grip) / 2 + 4px), var(--split), calc(100% - var(--grip) / 2 - 4px)));
}
.hands__grip {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: var(--grip);
  height: var(--grip);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: grab;
  background: radial-gradient(circle at 35% 28%, var(--navy-hi), var(--navy) 62%, var(--navy-lo));
  box-shadow: inset 0 0 0 2px var(--bronze), inset 0 0 0 3px rgba(232, 203, 116, 0.78), 0 0 0 1px rgba(20, 13, 7, 0.7), 0 4px 10px -2px rgba(0, 0, 0, 0.75);
}
.hands__grip::before,
.hands__grip::after {
  content: "";
  width: 11px;
  height: 15px;
  background: var(--gold-hi);
  -webkit-mask: url(../img/chev-l.webp?v=UfBmInIK) center / contain no-repeat;
  mask: url(../img/chev-l.webp?v=UfBmInIK) center / contain no-repeat;
}
.hands__grip::after {
  -webkit-mask-image: url(../img/chev-r.webp?v=uVQRaH6m);
  mask-image: url(../img/chev-r.webp?v=uVQRaH6m);
}
.hands__grip:hover,
.hands__stage.is-dragging .hands__grip {
  box-shadow: inset 0 0 0 2px var(--gold-leaf), inset 0 0 0 3px var(--gold-hi), 0 0 0 1px rgba(20, 13, 7, 0.7), 0 4px 10px -2px rgba(0, 0, 0, 0.75);
}
.hands__grip:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--gold-leaf), inset 0 0 0 3px var(--gold-hi), 0 0 0 7px rgba(20, 13, 7, 0.72);
}
.hands__stage.is-dragging,
.hands__stage.is-dragging .hands__grip {
  cursor: grabbing;
}
.hands__caption {
  margin: 0 auto;
}
/* without JavaScript (index.html's noscript): the two frames side by side, each named under it; one above the other
   on a phone */
.hands-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.hands-pair figure {
  display: grid;
  gap: 10px;
  margin: 0;
}
.hands-pair img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-s);
  box-shadow: var(--frame-picture), var(--shadow-3);
}
.hands-pair figcaption {
  margin: 0 auto;
}

/* picture cards (weather, campaigns): the picture over a lacquer or slate caption */
.media-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--r-m);
  color: var(--cream);
  background: var(--lacquer);
  box-shadow: var(--frame-picture), var(--shadow-2);
}
.media-card--slate {
  background:
    radial-gradient(120% 100% at 50% 30%, transparent 55%, rgba(0, 0, 0, 0.3) 100%),
    var(--tex-slate) 0 0 / 300px 300px,
    var(--slate);
}
.media-card__art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid #090d19;
}
.media-card__body {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px 18px 20px;
}
.media-card__title {
  font: 700 var(--fs-h3) / 1.2 var(--font-title);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.media-card__text {
  font-size: 1.02rem;
  line-height: 1.42;
  text-wrap: pretty;
  color: var(--cream-80);
}

.weather {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

/* factions: the HUD medallion (lacquer disc, gilt emblem, gem ring) and the game's own line */
.factions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 22px;
}
.faction {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  text-align: center;
}
.faction__medal {
  --d: 100px;
  margin-bottom: 8px;
}
.faction__name {
  font: 700 var(--fs-h3) / 1.25 var(--font-title);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
}
.faction__trait {
  font: 700 0.68rem / 1.3 var(--font-title);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.faction__line {
  max-width: 17em;
  margin-top: 4px;
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.4;
  text-wrap: pretty;
  color: var(--cream-80);
}

/* the campaigns (the section's one heading) as cards: their key art, what each is about, its faces; then a quiet line
   and one row of parchment tiles for the rest of the game */
.campaigns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
/* the carousel slide is 16:9; the card's body is a column whose faces and note sit at the foot, so the three cards
   end on one line whatever their text */
.campaign .media-card__art img {
  aspect-ratio: 16 / 9;
}
.campaign .media-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.campaign .media-card__text {
  flex: 1 0 auto;
}
.campaign__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.campaign__faces {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(232, 203, 116, 0.22);
}
/* the medallion: the disc, the picture cut to the circle (each a square crop with the same face size and eye line,
   never stretched), and the ring drawn over the picture so it is the same on every face */
.campaign__face {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, #2c3f68, var(--navy) 58%, var(--navy-lo));
  box-shadow: 0 0 0 1px var(--bronze), 0 0 0 2px rgba(232, 203, 116, 0.55), 0 4px 8px -3px rgba(0, 0, 0, 0.8);
}
.campaign__face picture,
.campaign__face img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.campaign__face img {
  object-fit: cover;
}
.campaign__face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #090d19;
  pointer-events: none;
}
/* two lines' room, so the faces of a row of cards start at one height whatever the names' length; 5px: the distance
   to the row the page always had (the medallions were inline pictures, a line's descent under them) */
.campaign__names {
  min-height: calc(2 * 1.35em);
  margin-top: 5px;
  font: italic 500 0.92rem / 1.35 var(--font-text);
  text-wrap: balance;
  color: var(--cream-80);
}
.campaign__names span {
  white-space: nowrap;
}
.campaign__note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 700 var(--fs-micro) / 1.3 var(--font-title);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-80);
}

/* the line before the tiles: the body's own type, no ornament (it is no second title) */
.haves__lead {
  margin: clamp(44px, 6vw, 64px) auto 18px;
  font-size: var(--fs-body);
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
  color: var(--cream-80);
}
/* the tiles: the game's picture, a name, one line. Each spans three rows of the list's grid (subgrid), so in a line of
   tiles the pictures, the names and the lines start at one height */
.haves {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.have.sheet {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  justify-items: center;
  row-gap: 10px;
  padding: 18px clamp(12px, 1.4vw, 18px) 22px;
  text-align: center;
}
.have__art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 116px;
}
.have__art img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 4px 4px rgba(43, 32, 22, 0.45));
}
.have__art .crest {
  width: 72px;
}
.have__title {
  font: 700 var(--fs-h3) / 1.25 var(--font-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ink);
}
.have__text {
  max-width: 20em;
  font-size: 1.04rem;
  line-height: 1.42;
  text-wrap: balance;
  color: var(--ink);
}

/* the arena right now: the war room's plaques, three of them */
.home-live .plaques {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 980px;
  margin: 0 auto 24px;
}
.home-live__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
}
.home-live__actions .live-dot {
  width: 8px;
  height: 8px;
}

/* ------------------------------------------------------------------ the call to action on the war table */
.home-cta {
  position: relative;
  z-index: 0;
  display: grid;
  justify-items: center;
  margin-top: var(--section-gap);
  padding: clamp(80px, 11vw, 150px) var(--pad) clamp(72px, 9vw, 120px);
  overflow: hidden;
  text-align: center;
}
.home-cta__art img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.home-cta__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--desk) 0%, rgba(27, 19, 12, 0) 22%, rgba(27, 19, 12, 0) 76%, var(--desk) 100%),
    radial-gradient(ellipse 60% 62% at 50% 52%, rgba(14, 9, 5, 0.76), rgba(14, 9, 5, 0.58) 70%, rgba(14, 9, 5, 0.4) 100%);
}
.home-cta__body {
  display: grid;
  justify-items: center;
  gap: clamp(12px, 2vw, 20px);
  max-width: 820px;
}
.home-cta__title {
  font-size: var(--fs-display);
}
.home-cta__lede {
  max-width: 30em;
  font-size: var(--fs-lede);
  font-style: italic;
  text-wrap: balance;
  color: var(--cream);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ------------------------------------------------------------------ motion (none under prefers-reduced-motion: base.css) */
@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes home-settle {
  from {
    opacity: 0.6;
    transform: scale(1.04);
  }
}
@keyframes home-bob {
  50% {
    transform: rotate(90deg) translateX(4px);
  }
}
@keyframes lightbox-in {
  from {
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1100px) {
  .beats,
  .weather {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .campaigns {
    gap: 18px;
  }
}
@media (max-width: 860px) {
  .campaigns {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
  .haves {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .factions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .home-live .plaques {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .beats {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
    margin: 0 auto;
  }
  /* the weather as rows: the picture beside its rule */
  .weather {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .weather .media-card {
    grid-template-rows: none;
    grid-template-columns: 40% minmax(0, 1fr);
  }
  .weather .media-card__art img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 100%;
    border-bottom: 0;
    border-right: 1px solid #090d19;
  }
  .weather .media-card__body {
    align-content: center;
    padding: 12px 14px;
  }
  .weather .media-card__text {
    font-size: 0.98rem;
  }
  /* the gallery: previous and next under the frame, dots between them (no thumbnail shows, so none loads) */
  .gallery {
    grid-template-areas:
      "stage stage stage"
      "caption caption caption"
      "prev picks next";
    align-items: center;
    column-gap: 4px;
    row-gap: 12px;
  }
  .gallery__nav {
    width: 44px;
    height: 44px;
    margin: 0;
  }
  .gallery__nav--prev {
    grid-area: prev;
  }
  .gallery__nav--next {
    grid-area: next;
  }
  .gallery__picks {
    gap: 0;
  }
  .gallery__pick,
  .gallery__pick[aria-selected="true"] {
    flex: none;
    display: grid;
    place-items: center;
    width: 20px;
    height: 44px;
    aspect-ratio: auto;
    background: none;
    opacity: 1;
    box-shadow: none;
  }
  .gallery__thumb {
    display: none;
  }
  .gallery__dot {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 247, 224, 0.42);
  }
  .gallery__pick[aria-selected="true"] .gallery__dot {
    background: var(--gold-hi);
    box-shadow: 0 0 0 3px rgba(232, 203, 116, 0.28);
  }
  /* mouse, gamepad or touch: a smaller grip, the labels closer to the middle */
  .hands__handle {
    --grip: 44px;
  }
  .hands__label {
    top: 7%;
    padding: 6px 9px;
    letter-spacing: 0.08em;
  }
  .hands__label--mouse {
    right: calc(50% + 28px);
  }
  .hands__label--gamepad {
    left: calc(50% + 28px);
  }
  .hands-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  /* 44 px touch targets (S23, Phone layout) */
  .watch-link {
    min-height: 44px;
  }
  .beat__play {
    width: 44px;
    height: 44px;
  }
  .stores {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .store {
    width: min(100%, 290px);
    min-height: 58px;
  }
  .factions {
    gap: 30px 12px;
  }
  .faction__medal {
    --d: 84px;
  }
  .faction__line {
    font-size: 0.98rem;
  }
  .haves {
    gap: 12px;
  }
  .have.sheet {
    row-gap: 8px;
    padding: 14px 10px 16px;
  }
  .have__art {
    height: 92px;
  }
  .have__art .crest {
    width: 56px;
  }
  .have__text {
    font-size: 0.98rem;
  }
  .home-hero__motion {
    width: 42px;
    height: 42px;
  }
}
