/* ============================================================
 * HOMEPAGE — sections, in page order.
 * Tokens, buttons, header and footer come from styles.css.
 * ============================================================ */

.index-body {
  font-size: 19px;
  color: var(--paper);
}

.h2, .hero-title, .card-type h3, .difficulty legend, .difficulty-opt span,
.run-step h3, .modes-title, .ks-badge, .hp-mod {
  text-transform: uppercase;
}

.index-body .site-footer { margin-top: calc(var(--section-y) * .6); }

/* the header floats over the hero painting instead of pushing it down */
.home-header {
  position: fixed;
  left: 0;
  right: 0;
  padding-inline: var(--gutter);
}

.container {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: calc(var(--section-y) * .5);
}

/* ---------- shared section type ---------- */

.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: .98;
  letter-spacing: .005em;
  color: var(--paper);
  -webkit-text-stroke: .1em var(--card-black);
  paint-order: stroke fill;
  text-shadow: 0 .07em 0 var(--card-black);
  text-wrap: balance;
}

.lead {
  margin: var(--s-5) 0 0;
  max-width: 46ch;
  font-size: clamp(19px, 1.55vw, 23px);
  line-height: 1.45;
  color: var(--paper-dim);
  text-wrap: pretty;
}

.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 72px); }

/* ============================================================
 * HERO — the painted world as a stage, the pitch, and a dealt hand
 * ============================================================ */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: clamp(700px, 100svh, 1000px);
  background: var(--night);
}

.hero-art img {
  position: absolute;
  z-index: -2;
  left: 0;
  top: 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: 50% 35%;
  will-change: transform;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 52% 40% at 50% 40%, rgba(5, 9, 28, .6) 0%, rgba(5, 9, 28, .25) 55%, rgba(5, 9, 28, 0) 80%),
    linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 20%, rgba(10, 18, 48, 0) 58%, rgba(10, 18, 48, .7) 84%, var(--night) 100%);
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(40px, 7vh, 72px)) var(--gutter) 0;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 92px);
  line-height: .92;
  letter-spacing: .005em;
  color: var(--paper);
  -webkit-text-stroke: .09em var(--card-black);
  paint-order: stroke fill;
  text-shadow: 0 .075em 0 var(--card-black);
}
.hero-title-line { display: block; text-wrap: balance; }

.hero-lead {
  margin: clamp(18px, 2.6vh, 28px) auto 0;
  max-width: 48ch;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.4;
  color: var(--paper);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .75), 0 0 18px rgba(0, 0, 0, .6);
  text-wrap: balance;
}

.hero-actions {
  margin-top: clamp(24px, 3.6vh, 40px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-4) var(--s-5);
}

.hero-note {
  margin: var(--s-4) 0 0;
  text-wrap: balance;
  font-size: 18px;
  color: var(--paper-dim);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .8);
}

/* ---------- the hand ---------- */

.hero-hand {
  --card-w: clamp(128px, 12.5vw, 196px);
  list-style: none;
  margin: clamp(28px, 4.5vh, 56px) 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  perspective: 1100px;
  /* the lower part of the hand stays below the fold of the stage, like
     cards held at the bottom of the screen, and fades into the page */
  height: calc(var(--card-w) * 1.49 * .74);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}

.hand-card {
  --r: 0deg;
  --y: 0px;
  --lift: 0px;
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  position: relative;
  flex: none;
  width: var(--card-w);
  margin: 0 calc(var(--card-w) * -.12);
  border-radius: 5% / 3.4%;
  overflow: hidden;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .7), 0 26px 34px -14px rgba(0, 0, 0, .75);
  transform-origin: 50% 110%;
  transform: translateY(calc(var(--y) + var(--lift))) rotate(var(--r)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 260ms var(--ease-out), box-shadow 260ms;
}
.hand-card img { display: block; width: 100%; height: auto; }

/* specular sheen that follows the pointer */
.hand-card::after,
.table-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: var(--mx, 50%) 0;
  opacity: 0;
  transition: opacity 200ms;
  pointer-events: none;
}

.hand-card:nth-child(1) { --r: -14deg; --y: 42px; }
.hand-card:nth-child(2) { --r: -7deg;  --y: 12px; }
.hand-card:nth-child(3) { --r: 0deg;   --y: 0px; z-index: 2; }
.hand-card:nth-child(4) { --r: 7deg;   --y: 12px; z-index: 1; }
.hand-card:nth-child(5) { --r: 14deg;  --y: 42px; z-index: 1; }

@media (hover: hover) and (pointer: fine) {
  .hand-card:hover {
    --lift: -48px;
    z-index: 5;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .7), 0 40px 50px -16px rgba(0, 0, 0, .85);
    transition: transform 180ms var(--ease-out), box-shadow 180ms;
  }
  .hand-card:hover::after,
  .table-card:hover::after { opacity: 1; }
}

/* ---------- hero entrance: title dealt, then the hand ---------- */

@keyframes rise-in {
  from { opacity: 0; translate: 0 26px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes deal-card {
  from { opacity: 0; translate: 0 70%; }
  60%  { opacity: 1; }
  to   { opacity: 1; translate: 0 0; }
}

.motion-ok.gate-active .hero-title-line,
.motion-ok.gate-active .hero-lead,
.motion-ok.gate-active .hero-actions,
.motion-ok.gate-active .hero-note,
.motion-ok.gate-active .hand-card { opacity: 0; }

.motion-ok.gate-done .hero-title-line { animation: rise-in 620ms var(--ease-out) both; }
.motion-ok.gate-done .hero-title-line + .hero-title-line { animation-delay: 90ms; }
.motion-ok.gate-done .hero-lead { animation: rise-in 620ms var(--ease-out) 200ms both; }
.motion-ok.gate-done .hero-actions { animation: rise-in 620ms var(--ease-out) 290ms both; }
.motion-ok.gate-done .hero-note { animation: rise-in 620ms var(--ease-out) 360ms both; }
.motion-ok.gate-done .hand-card { animation: deal-card 720ms var(--ease-deal) both; }
.motion-ok.gate-done .hand-card:nth-child(3) { animation-delay: 380ms; }
.motion-ok.gate-done .hand-card:nth-child(2),
.motion-ok.gate-done .hand-card:nth-child(4) { animation-delay: 460ms; }
.motion-ok.gate-done .hand-card:nth-child(1),
.motion-ok.gate-done .hand-card:nth-child(5) { animation-delay: 540ms; }

/* ============================================================
 * Scroll reveals — focal elements only, once. home.js adds
 * .reveal-ready, so without JS nothing is ever hidden.
 * ============================================================ */

.motion-ok.reveal-ready [data-reveal] {
  transition: opacity 700ms var(--ease-out), translate 800ms var(--ease-deal);
}
.motion-ok.reveal-ready [data-reveal]:not(.is-in) {
  opacity: 0;
  translate: 0 40px;
}
.motion-ok.reveal-ready .run-step[data-reveal]:nth-child(2) { transition-delay: 70ms; }
.motion-ok.reveal-ready .run-step[data-reveal]:nth-child(3) { transition-delay: 140ms; }
.motion-ok.reveal-ready .run-step[data-reveal]:nth-child(4) { transition-delay: 210ms; }
.motion-ok.reveal-ready .run-step[data-reveal]:nth-child(5) { transition-delay: 280ms; }
.motion-ok.reveal-ready .mode[data-reveal]:nth-child(2) { transition-delay: 110ms; }

/* ============================================================
 * CARDS — three real cards on the table, one annotated
 * ============================================================ */

.cards-showcase { padding-top: calc(var(--section-y) * .6); }

.cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

.card-types {
  list-style: none;
  margin: var(--s-6) 0 var(--s-6);
  padding: 0;
  display: grid;
  gap: var(--s-4);
}

.card-type {
  position: relative;
  padding-left: 44px;
}
/* a tiny card in that type's printed colours */
.card-type::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 34px;
  border: 3px solid var(--card-black);
  border-radius: 3px;
  box-shadow: 0 3px 0 var(--card-black);
  transform: rotate(-6deg);
}
.card-type--monster::before { background: linear-gradient(var(--card-sky) 0 55%, var(--card-rust) 55%); }
.card-type--gadget::before { background: linear-gradient(var(--card-sky) 0 60%, var(--card-slate) 60%); }
.card-type--world::before { background: linear-gradient(#fff 0 60%, #fff 60%); }

.card-type h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .02em;
  color: var(--paper);
}
.card-type p {
  margin: 2px 0 0;
  max-width: 40ch;
  font-size: 19px;
  line-height: 1.4;
  color: var(--paper-dim);
}

.cards-table {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 56px;
  perspective: 1400px;
}

.table-card {
  --tw: clamp(150px, 16vw, 232px);
  --base: none;
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  position: relative;
  flex: none;
  width: var(--tw);
  margin: 0;
  border-radius: 5% / 3.4%;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .7), 0 30px 40px -18px rgba(0, 0, 0, .8);
  transform: var(--base) translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 260ms var(--ease-out), box-shadow 260ms;
}
.table-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

/* overlap comes from negative margins, not translate, so the row's real
   width shrinks with it and can't push past a phone's edge */
.table-card--left {
  --base: translateY(30px) rotate(-10deg);
  margin-right: calc(var(--tw) * -.3);
  z-index: 1;
}
.table-card--right {
  --base: translateY(30px) rotate(10deg);
  margin-left: calc(var(--tw) * -.3);
  z-index: 1;
}
.table-card--center {
  --tw: clamp(210px, 22vw, 320px);
  z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
  .table-card--left:hover, .table-card--right:hover { --lift: -22px; z-index: 3; }
  .table-card--center:hover { --lift: -10px; }
}

/* anatomy callouts, pinned to the printed heart and the ability numerals */
.anatomy { position: absolute; inset: 0; pointer-events: none; }

.anatomy-pin {
  position: absolute;
  display: block;
}
.anatomy-pin--life { left: 86%; top: 61.5%; }
.anatomy-pin--roll { left: 9%; top: 74%; }

.anatomy-dot {
  position: absolute;
  left: -11px;
  top: -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--card-black);
  box-shadow: 0 0 0 3px rgba(255, 198, 41, .35);
}

.anatomy-text {
  position: absolute;
  display: block;
  width: max-content;
  max-width: 17ch;
  padding: 8px 12px 7px;
  background: var(--card-black);
  color: var(--paper);
  font-size: 17px;
  line-height: 1.2;
  border: 2px solid rgba(255, 246, 227, .25);
  border-radius: 4px;
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .7);
}
.anatomy-pin--life .anatomy-text { left: 22px; top: -96px; }
.anatomy-pin--roll .anatomy-text { right: 22px; top: 18px; text-align: right; }

/* the connector from dot to label */
.anatomy-pin::before {
  content: '';
  position: absolute;
  height: 3px;
  background: var(--gold);
  transform-origin: 0 50%;
}
.anatomy-pin--life::before { left: 0; top: 0; width: 70px; transform: rotate(-52deg); }
.anatomy-pin--roll::before { left: 0; top: 0; width: 44px; transform: rotate(142deg); }

@media (prefers-reduced-motion: no-preference) {
  .cards-table.is-in .anatomy-dot { animation: pin-pulse 1.4s ease-out 700ms 2; }
}
@keyframes pin-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 198, 41, .75); }
  100% { box-shadow: 0 0 0 16px rgba(255, 198, 41, 0); }
}

/* ============================================================
 * WORLD — difficulty picker + a monster deck you can draw from
 * ============================================================ */

.world-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}
.world-copy { order: 2; }
.deck-stage { order: 1; }

.difficulty {
  margin: var(--s-6) 0 var(--s-6);
  padding: 0;
  border: 0;
  min-width: 0;
}
.difficulty legend {
  padding: 0;
  margin-bottom: var(--s-3);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .03em;
  color: var(--paper);
}

.difficulty-row { display: flex; flex-wrap: wrap; gap: 10px; }

.difficulty-opt { position: relative; cursor: pointer; }
.difficulty-opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.difficulty-opt span {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 14px 7px;
  background: var(--card-black);
  border: 3px solid rgba(255, 246, 227, .28);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .03em;
  color: var(--paper);
  transition: transform var(--t-hover) var(--ease-out), background var(--t-hover), border-color var(--t-hover), box-shadow var(--t-hover);
}
.difficulty-opt:hover span { border-color: var(--gold); transform: translateY(-2px); }
.difficulty-opt input:checked + span {
  background: var(--gold);
  border-color: var(--card-black);
  color: #1d1300;
  box-shadow: 0 4px 0 var(--card-black);
  transform: translateY(-2px);
}
.difficulty-opt--hell input:checked + span { background: var(--red); color: var(--paper); }
.difficulty-opt input:focus-visible + span { outline: 3px solid var(--paper); outline-offset: 3px; }

.difficulty-note {
  margin: var(--s-4) 0 0;
  min-height: 1.4em;
  font-size: 19px;
  color: var(--paper-dim);
}
.difficulty-note strong { color: var(--paper); font-weight: 400; }

.deck-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-7);
}

.deck {
  position: relative;
  width: clamp(220px, 23vw, 320px);
  aspect-ratio: 460 / 686;
  perspective: 1200px;
}

/* the draw pile: face-down cards stacked behind */
.deck-pile,
.deck-pile::before,
.deck-pile::after {
  position: absolute;
  inset: 0;
  border-radius: 5% / 3.4%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 198, 41, .16) 0 18%, transparent 19%),
    repeating-linear-gradient(45deg, #151c3f 0 10px, #10163a 10px 20px);
  border: 6px solid var(--card-black);
}
.deck-pile { transform: translate(18px, 16px) rotate(4deg); box-shadow: 0 30px 40px -18px rgba(0, 0, 0, .8); }
.deck-pile::before { content: ''; inset: -6px; transform: translate(-8px, -6px) rotate(-2deg); }
.deck-pile::after { content: ''; inset: -6px; transform: translate(-15px, -13px) rotate(-3deg); }

.deck-card {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 5% / 3.4%;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .7), 0 26px 36px -16px rgba(0, 0, 0, .8);
}
.deck-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* the difficulty's life modifier, stamped next to the printed heart */
.hp-mod {
  position: absolute;
  left: 86%;
  top: 61.5%;
  transform: translate(-10%, -125%) rotate(8deg);
  min-width: 48px;
  padding: 7px 10px 4px;
  background: var(--red);
  border: 3px solid var(--card-black);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--card-black);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  text-align: center;
  color: var(--paper);
}
.hp-mod[hidden] { display: none; }
.hp-mod.is-easy { background: var(--card-sky); }

/* ============================================================
 * GAMEPLAY — the run loop and the two modes
 * ============================================================ */

.run-loop {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-5);
}

/* the path the steps sit on */
.run-loop::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: calc(clamp(96px, 9vw, 136px) / 2);
  height: 4px;
  background: repeating-linear-gradient(90deg, rgba(255, 246, 227, .4) 0 14px, transparent 14px 26px);
}

.run-step {
  position: relative;
  text-align: center;
}

.run-step img,
.run-die {
  position: relative;
  display: block;
  width: clamp(96px, 9vw, 136px);
  height: clamp(96px, 9vw, 136px);
  margin: 0 auto;
}
.run-step img {
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--card-black);
  background: var(--card-sky);
  box-shadow: 0 6px 0 var(--card-black);
}
.run-die { filter: drop-shadow(0 6px 0 var(--card-black)); transform: rotate(-8deg); }

/* circled numerals, exactly how the cards number their attacks */
.run-num {
  position: absolute;
  z-index: 1;
  top: -6px;
  left: calc(50% + clamp(26px, 2.6vw, 40px));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--card-black);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  padding-top: 3px;
  color: var(--card-black);
}

.run-step h3 {
  margin: var(--s-4) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 25px);
  letter-spacing: .02em;
  color: var(--paper);
}
.run-step p {
  margin: 6px auto 0;
  max-width: 22ch;
  font-size: 18px;
  line-height: 1.35;
  color: var(--paper-dim);
}

.modes-title {
  margin: clamp(72px, 8vw, 112px) 0 var(--s-6);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 36px);
  color: var(--paper);
  -webkit-text-stroke: .08em var(--card-black);
  paint-order: stroke fill;
}

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6);
}

/* the panels carry their own frame with flame corners, so they sit on the
   page with a shadow that follows their silhouette — no second box */
.mode {
  position: relative;
  line-height: 0;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55));
}
.mode img { display: block; width: 100%; height: auto; }

.mode-hotspot {
  position: absolute;
  min-height: 44px;
  border-radius: 6px;
  transition: box-shadow var(--t-hover), background var(--t-hover);
}
.mode-hotspot:hover,
.mode-hotspot:focus-visible {
  background: rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 3px var(--paper);
  outline: none;
}

/* ============================================================
 * DEMO CTA — built as one oversized gadget card
 * ============================================================ */

.play-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 10px;
  background: var(--card-black);
  border: 12px solid var(--card-black);
  border-radius: 12px;
  box-shadow: 0 14px 0 rgba(0, 0, 0, .45), 0 50px 80px -40px #000;
  overflow: hidden;
}

.play-art {
  position: relative;
  min-height: 420px;
  background: var(--card-sky);
  overflow: hidden;
}
/* taller than the box and pinned to the top, so the portrait's own baked
   name plate at the bottom stays out of frame */
.play-art img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 118%;
  object-fit: cover;
  object-position: 50% 0;
  transition: transform 1.2s var(--ease-out);
}
.play-card:hover .play-art img { transform: scale(1.04); }

.play-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 72px);
  background: var(--card-slate);
}
.play-body .h2 {
  color: var(--card-black);
  -webkit-text-stroke: 0;
  text-shadow: none;
  font-size: clamp(34px, 4vw, 58px);
}
.play-body .lead { color: #17222a; max-width: 38ch; }

.play-actions {
  margin-top: var(--s-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
}
.play-body .btn--paper { --face: #fff; }

/* ============================================================
 * KICKSTARTER — key art, the countdown, and the reminder
 * ============================================================ */

.ks-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
}

.ks-art {
  line-height: 0;
  border: 6px solid var(--card-black);
  border-radius: 8px;
  overflow: hidden;
  rotate: -1.5deg;
  box-shadow: 0 10px 0 var(--card-black), 0 50px 70px -30px rgba(0, 0, 0, .85);
}
.ks-art img { display: block; width: 100%; height: auto; }

.ks-badge {
  display: inline-block;
  margin-bottom: var(--s-4);
  padding: 8px 14px 5px;
  background: var(--gold);
  color: #1d1300;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .04em;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
}

.ks-countdown { margin-top: var(--s-6); }

.ks-countdown-label {
  margin: 0 0 var(--s-3);
  font-size: 19px;
  color: var(--paper);
}

.ks-countdown-units {
  display: flex;
  gap: 10px;
}

.ks-unit {
  flex: 1 1 0;
  max-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 6px 8px;
  background: var(--card-black);
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(255, 246, 227, .12), 0 5px 0 rgba(0, 0, 0, .5);
}

.ks-unit-num {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.2vw, 44px);
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.ks-unit-label {
  margin-top: 4px;
  font-size: 16px;
  color: var(--paper-dim);
}

.ks-goal {
  margin: var(--s-4) 0 0;
  font-size: 18px;
  color: var(--paper-dim);
}

.ks-grid.is-live .ks-unit-num { color: #6fe39a; }
.ks-grid.is-live .ks-badge { background: #6fe39a; }
.ks-grid.is-ended .ks-countdown-units { display: none; }

.ks-live-only { display: none; margin-top: var(--s-6); }
.ks-grid.is-live .ks-live-only { display: inline-flex; }
.ks-grid.is-live .ks-prelaunch-only { display: none; }

.ks-reminder-link { margin: var(--s-5) 0 0; font-size: 21px; }


/* ============================================================
 * NEWS
 * ============================================================ */

.news .section-head { margin-bottom: var(--s-6); }

/* ============================================================
 * RESPONSIVE
 * ============================================================ */

@media (max-width: 1080px) {
  .modes { grid-template-columns: 1fr; max-width: 760px; margin-inline: auto; }
  .run-step p { font-size: 17px; }
}

@media (max-width: 960px) {
  .cards-grid,
  .world-grid,
  .ks-grid { grid-template-columns: 1fr; }

  .world-copy { order: 1; }
  .deck-stage { order: 2; }

  .cards-table { padding: 24px 0 90px; }

  .ks-art { rotate: -1deg; max-width: 720px; }

  .play-card { grid-template-columns: 1fr; border-width: 10px; }
  .play-art { min-height: 0; aspect-ratio: 16 / 10; }
}

@media (min-width: 641px) and (max-width: 960px) {
  .hero { min-height: clamp(700px, 88svh, 900px); }
  .hero-title { font-size: 7.4vw; }
  .hero-hand { --card-w: 19vw; }
}

@media (max-width: 760px) {
  /* the run loop becomes a vertical path */
  .run-loop { grid-template-columns: 1fr; gap: var(--s-5); }
  .run-loop::before {
    left: calc(44px - 2px);
    right: auto;
    top: 44px;
    bottom: 44px;
    width: 4px;
    height: auto;
    background: repeating-linear-gradient(180deg, rgba(255, 246, 227, .4) 0 14px, transparent 14px 26px);
  }
  .run-step {
    display: grid;
    grid-template-columns: 88px 1fr;
    column-gap: var(--s-5);
    align-items: center;
    text-align: left;
  }
  .run-step img,
  .run-die { grid-row: 1 / span 2; width: 88px; height: 88px; margin: 0; }
  .run-num { top: -8px; left: 60px; width: 34px; height: 34px; font-size: 17px; border-width: 3px; }
  .run-step h3 { margin: 0; align-self: end; }
  .run-step p { margin: 2px 0 0; max-width: none; align-self: start; }
}

@media (max-width: 640px) {
  .section { padding-block: 44px; }

  .hero { min-height: 0; }
  .hero-art img { object-position: 70% 50%; }
  .hero-shade {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, .7) 0%, rgba(5, 9, 28, .45) 30%, rgba(5, 9, 28, .55) 62%, rgba(10, 18, 48, .85) 86%, var(--night) 100%);
  }
  .hero-content { padding-top: calc(var(--header-h) + 36px); }
  .hero-title { font-size: clamp(38px, 11.4vw, 56px); }
  .hero-actions { width: 100%; flex-direction: column; gap: var(--s-3); }
  .hero-actions .btn { width: 100%; }
  .hero-note { font-size: 17px; }

  .hero-hand { --card-w: 36vw; height: calc(var(--card-w) * 1.49 * .62); margin-top: 32px; }
  .hand-card { margin: 0 calc(var(--card-w) * -.16); }
  .hand-card:nth-child(1),
  .hand-card:nth-child(5) { display: none; }
  .hand-card:nth-child(2) { --r: -9deg; --y: 18px; }
  .hand-card:nth-child(4) { --r: 9deg; --y: 18px; }

  .table-card { --tw: 30vw; }
  .table-card--center { --tw: 46vw; }

  /* callouts drop below the cards as a caption */
  .anatomy {
    position: absolute;
    inset: auto;
    left: 50%;
    top: calc(100% + 64px);
    width: min(86vw, 360px);
    transform: translateX(-50%);
    display: grid;
    gap: 8px;
  }
  .anatomy-pin { position: static; display: flex; align-items: center; gap: 10px; }
  .anatomy-pin::before { display: none; }
  .anatomy-dot { position: static; flex: none; width: 18px; height: 18px; }
  .anatomy-text,
  .anatomy-pin--roll .anatomy-text {
    position: static;
    max-width: none;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    text-align: left;
    color: var(--paper-dim);
    font-size: 18px;
  }
  .cards-table { padding-bottom: 150px; }

  .difficulty-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .difficulty-opt span { width: 100%; justify-content: center; padding: 10px 4px 7px; font-size: 15px; }

  .deck { width: 62vw; }
  .deck-stage { gap: 40px; }

  .play-actions .btn { width: 100%; }

  .ks-countdown-units { gap: 8px; }
  .ks-unit { padding: 12px 4px 7px; }

}

@media (prefers-reduced-motion: reduce) {
  .hand-card, .table-card, .play-art img { transition: none; }
}
