/* Jadefall home page. Seven acts: key art, premise, ten realms, runners, gameplay, features, endcard. */

html:not(.js) [data-sc-in], html:not(.js) [data-sc-stagger] > * { opacity: 1; transform: none; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------- 1 hero -- */
.hero {
  position: relative; height: 100svh; min-height: 640px; max-height: 1180px;
  overflow: hidden; isolation: isolate; background: #1a120a;
}
.hero__scene { position: absolute; inset: 0; }
.hero__layer { position: absolute; will-change: transform; pointer-events: none; }
.hero__layer img { display: block; max-width: none; }

.hero__plate { inset: -5% -3% -3% -3%; transform-origin: 60% 40%; }
.hero__plate picture, .hero__plate img { width: 100%; height: 100%; }
.hero__plate img { object-fit: cover; object-position: 64% 42%; }

.hero__haze--far {
  inset: 0;
  background:
    radial-gradient(40% 38% at 66% 58%, rgb(255 196 120 / 0.22), transparent 70%),
    linear-gradient(to top, rgb(255 190 120 / 0.10), transparent 40%);
  mix-blend-mode: screen;
}
.hero__panthers { width: clamp(420px, 35vw, 760px); left: 45vw; bottom: 31vh; transform-origin: 50% 85%; }
.hero__panthers img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgb(10 6 2 / 0.45)) saturate(1.04); }
.hero__haze--mid {
  inset: auto 0 0 0; height: 58%;
  background: linear-gradient(to top, rgb(255 205 150 / 0.30), rgb(255 205 150 / 0.08) 55%, transparent);
  mix-blend-mode: screen; opacity: 0.6;
}
.hero__runner { height: min(96vh, 1080px); left: 62vw; bottom: -12vh; transform-origin: 50% 100%; }
.hero__runner img { height: 100%; width: auto; filter: drop-shadow(-14px 22px 26px rgb(12 6 2 / 0.5)); }
.hero__fore { left: -16vw; right: -10vw; bottom: -3vh; transform-origin: 50% 100%; }
.hero__fore img { width: 100%; height: auto; filter: brightness(0.82) saturate(1.05); }
.hero__embers { inset: 0; overflow: hidden; }
.ember {
  position: absolute; bottom: -12px; width: var(--s, 4px); height: var(--s, 4px); border-radius: 50%;
  background: radial-gradient(circle, #fff3c4 0%, #ffb347 45%, rgb(255 140 40 / 0) 70%);
  opacity: 0; animation: ember var(--d, 9s) linear var(--delay, 0s) infinite;
}
@keyframes ember {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  10%  { opacity: 0.9; }
  70%  { opacity: 0.6; }
  100% { transform: translate3d(var(--dx, 40px), -88vh, 0); opacity: 0; }
}
.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(6 12 9 / 0.52) 0%, rgb(6 12 9 / 0.36) 24%, rgb(6 12 9 / 0.08) 42%, transparent 52%),
    linear-gradient(to top, var(--sc-canvas) 0%, rgb(7 18 14 / 0.75) 9%, transparent 26%),
    linear-gradient(to bottom, rgb(4 10 8 / 0.45), transparent 14%);
}

.hero__copy {
  position: absolute; z-index: 5; left: var(--sc-gutter); top: 50%; transform: translateY(-46%);
  width: min(36rem, 44vw);
}
.hero__logo { margin: 0; }
.hero__logo img { width: 100%; height: auto; filter: drop-shadow(0 10px 24px rgb(0 0 0 / 0.5)); }
.hero__tag {
  margin-top: var(--sc-4);
  font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-xl); line-height: 1.2;
  color: #fff6e2; text-shadow: 0 2px 12px rgb(0 0 0 / 0.55);
}
.hero__copy .badges { margin-top: var(--sc-6); }
.hero__note { margin-top: var(--sc-4); font-size: var(--sc-t-sm); color: #e6dcc6; text-shadow: 0 1px 8px rgb(0 0 0 / 0.6); }

/* the entrance: each plane settles at its own pace once every plane has loaded */
html.js .hero__layer > img, html.js .hero__layer > picture,
html.js .hero__copy > * { opacity: 0; }
.hero.is-in .hero__layer > img, .hero.is-in .hero__layer > picture, .hero.is-in .hero__copy > * {
  opacity: 1; translate: 0 0; scale: 1;
}
html.js .hero__plate picture { scale: 1.07; transition: opacity 900ms var(--sc-ease-out), scale 2400ms var(--sc-ease-out); }
html.js .hero__panthers img { translate: 0 7vh; transition: opacity 1000ms var(--sc-ease-out) 260ms, translate 1500ms var(--sc-ease-out) 260ms; }
html.js .hero__runner img { translate: 0 9vh; transition: opacity 900ms var(--sc-ease-out) 480ms, translate 1400ms var(--sc-ease-out) 480ms; }
html.js .hero__fore img { translate: 0 5vh; transition: opacity 900ms var(--sc-ease-out) 120ms, translate 1500ms var(--sc-ease-out) 120ms; }
html.js .hero__copy > * { translate: 0 14px; transition: opacity 700ms var(--sc-ease-out), translate 700ms var(--sc-ease-out); }
.hero.is-in .hero__copy > :nth-child(1) { transition-delay: 700ms; }
.hero.is-in .hero__copy > :nth-child(2) { transition-delay: 820ms; }
.hero.is-in .hero__copy > :nth-child(3) { transition-delay: 920ms; }
.hero.is-in .hero__copy > :nth-child(4) { transition-delay: 1000ms; }

/* --------------------------------------------------------- 2 premise -- */
.premise {
  position: relative; padding: clamp(7rem, 16vh, 12rem) var(--sc-gutter) clamp(8rem, 22vh, 15rem);
  background: radial-gradient(70% 50% at 20% 0%, rgb(61 255 176 / 0.04), transparent 70%), var(--sc-canvas);
}
.premise__inner { max-width: var(--sc-maxw); margin-inline: auto; }
.premise__line {
  font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-2xl); line-height: 1.12;
  letter-spacing: 0.005em; color: var(--sc-ink); max-width: 18ch;
}
.premise__line + .premise__line { margin-top: clamp(4rem, 13vh, 9rem); }
.premise__line--two { margin-left: clamp(0rem, 14vw, 16rem); color: #d9cfb8; max-width: 22ch; }
.premise__line--big {
  font-size: clamp(3rem, 1.6rem + 6.4vw, 7.4rem); line-height: 0.98; letter-spacing: -0.01em; color: var(--gold-hi);
  max-width: 12ch;
}
.premise__body {
  margin-top: clamp(3rem, 8vh, 5rem); margin-left: auto; max-width: 30rem;
  font-size: var(--sc-t-lg); line-height: 1.55; color: var(--sc-ink-soft);
}

/* ------------------------------------------------- 3 the ten realms -- */
.realms { background: #050c09; }
.realms__stage { overflow: hidden; background: #050c09; }
.realms__frames { position: absolute; inset: 0; }
.realm-frame { position: absolute; inset: 0; opacity: 0; transition: opacity 240ms var(--sc-ease-out); }
.realm-frame.is-on { opacity: 1; z-index: 1; }
.realm-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; transform-origin: 50% 46%; will-change: transform; }
.realms__flash {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 50% at 50% 46%, rgb(255 244 214 / 0.9), rgb(255 230 180 / 0.25) 60%, transparent 80%);
}
.realms__flash.is-flash { animation: realm-flash 420ms var(--sc-ease-out); }
@keyframes realm-flash { 0% { opacity: 0.32; } 100% { opacity: 0; } }
.realms__shade {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(to top, rgb(4 10 8 / 0.86) 0%, rgb(4 10 8 / 0.5) 22%, transparent 46%),
    linear-gradient(to bottom, rgb(4 10 8 / 0.72) 0%, transparent 28%),
    linear-gradient(90deg, rgb(4 10 8 / 0.5) 0%, transparent 36%);
}
.realms__runner {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 2vh; height: 47vh;
  display: flex; justify-content: center; align-items: flex-end; pointer-events: none;
}
.realms__runner img {
  height: 100%; width: auto; max-width: none;
  filter: drop-shadow(0 0 22px var(--rim, rgb(255 200 120 / 0.45))) brightness(var(--lum, 1)) saturate(var(--sat, 1));
  transition: filter 300ms var(--sc-ease-out);
}
.realms__shadow {
  position: absolute; bottom: -1vh; left: 50%; width: 15vh; height: 3vh; margin-left: -7.5vh; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.55), transparent);
}
.realms.is-live .realms__runner img { animation: stride 0.4s ease-in-out infinite alternate; }
@keyframes stride { from { translate: 0 0; } to { translate: 0 -1.6%; } }

.realms__copy {
  position: absolute; z-index: 5; left: var(--sc-gutter); right: calc(var(--sc-gutter) + 15rem);
  top: calc(var(--bar-h) + env(safe-area-inset-top) + 4vh); bottom: 9vh;
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--sc-5);
  pointer-events: none;
}
.realms__head { max-width: 34rem; }
.realms__title { font-size: var(--sc-t-2xl); color: var(--sc-ink); text-shadow: 0 2px 18px rgb(0 0 0 / 0.5); }
.realms__sub { margin-top: var(--sc-3); color: #d6dccf; font-size: var(--sc-t-sm); max-width: 28rem; text-shadow: 0 1px 10px rgb(0 0 0 / 0.6); }

/* every caption sits in the same grid cell, so the list is as tall as the longest one */
.realms__list { display: grid; align-items: end; width: min(30rem, 36vw); margin: 0; padding: 0; list-style: none; }
.realm { grid-area: 1 / 1; opacity: 0; translate: 0 12px; transition: opacity 260ms var(--sc-ease-out), translate 360ms var(--sc-ease-out); }
.realm.is-on { opacity: 1; translate: 0 0; }
.realm h3 { font-size: var(--sc-t-3xl); line-height: 1; color: var(--gold-hi); text-shadow: 0 3px 20px rgb(0 0 0 / 0.55); }
.realm p { margin-top: var(--sc-3); font-size: var(--sc-t-lg); line-height: 1.45; color: #f3ecdc; text-shadow: 0 1px 12px rgb(0 0 0 / 0.7); }

.realms__rail {
  position: absolute; z-index: 5; right: var(--sc-gutter); top: 50%; transform: translateY(-50%);
  display: grid; gap: 4px; justify-items: end;
}
.realms__rail button {
  display: flex; align-items: center; gap: 12px; padding: 5px 0; background: none; border: 0; cursor: pointer;
  color: rgb(243 235 217 / 0.55); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.8); transition: color 180ms var(--sc-ease-out);
}
.realms__rail button::after {
  content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: width 260ms var(--sc-ease-out), background 180ms var(--sc-ease-out);
}
.realms__rail button:hover { color: var(--sc-ink); }
.realms__rail button.is-on { color: var(--gold-hi); }
.realms__rail button.is-on::after { width: 42px; background: var(--sc-accent); }
.realms__rail button.is-past { color: rgb(243 235 217 / 0.8); }

/* the light each realm throws on the runner */
.realms__stage[data-realm="ruins"]  { --rim: rgb(255 190 110 / 0.55); --lum: 1;    --sat: 1; }
.realms__stage[data-realm="mire"]   { --rim: rgb(140 255 150 / 0.45); --lum: 0.86; --sat: 0.9; }
.realms__stage[data-realm="frost"]  { --rim: rgb(190 230 255 / 0.6);  --lum: 1.02; --sat: 0.8; }
.realms__stage[data-realm="sakura"] { --rim: rgb(255 180 210 / 0.6);  --lum: 1.04; --sat: 1; }
.realms__stage[data-realm="dunes"]  { --rim: rgb(255 190 90 / 0.65);  --lum: 1.05; --sat: 1.05; }
.realms__stage[data-realm="tide"]   { --rim: rgb(170 240 255 / 0.55); --lum: 1.02; --sat: 0.95; }
.realms__stage[data-realm="grotto"] { --rim: rgb(90 230 255 / 0.6);   --lum: 0.84; --sat: 0.85; }
.realms__stage[data-realm="sky"]    { --rim: rgb(255 225 170 / 0.6);  --lum: 1.06; --sat: 0.95; }
.realms__stage[data-realm="star"]   { --rim: rgb(170 150 255 / 0.6);  --lum: 0.8;  --sat: 0.85; }
.realms__stage[data-realm="ember"]  { --rim: rgb(255 110 50 / 0.7);   --lum: 0.92; --sat: 1.1; }

/* without motion: the ten realms as a plain gallery, no pinning */
.realms.is-static .realms__stage { position: static; height: auto; overflow: visible; padding: var(--sc-section) var(--sc-gutter); }
.realms.is-static .realms__frames, .realms.is-static .realms__flash, .realms.is-static .realms__shade,
.realms.is-static .realms__runner, .realms.is-static .realms__rail { display: none; }
.realms.is-static .realms__copy { position: static; display: block; max-width: var(--sc-maxw); margin-inline: auto; pointer-events: auto; }
.realms.is-static .realms__list {
  width: auto; margin: var(--sc-7) 0 0; align-items: start;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--sc-6);
}
.realms.is-static .realm { grid-area: auto; opacity: 1; translate: none; }
.realms.is-static .realm::before {
  content: ""; display: block; aspect-ratio: 3 / 2; border-radius: var(--sc-r-md); margin-bottom: var(--sc-4);
  background: var(--img) center / cover no-repeat, var(--sc-surface);
}
.realms.is-static .realm h3 { font-size: var(--sc-t-xl); }
.realms.is-static .realm p { font-size: var(--sc-t-base); text-shadow: none; color: var(--sc-ink-soft); }

/* --------------------------------------------------------- 4 runners -- */
.runners {
  position: relative; padding: var(--sc-section) var(--sc-gutter);
  background: radial-gradient(60% 60% at 25% 40%, rgb(232 182 75 / 0.07), transparent 70%), linear-gradient(#06100c, #0a1813 60%, #07120e);
}
.runners__grid {
  max-width: var(--sc-maxw); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2.5rem, 6vw, 6.5rem); align-items: center;
}
.runners__frame {
  position: relative; aspect-ratio: 2 / 3; border-radius: 20px; overflow: hidden; background: var(--sc-surface);
  border: 1px solid rgb(232 182 75 / 0.32);
  box-shadow: var(--sc-e3), inset 0 0 0 1px rgb(255 240 200 / 0.05);
}
.runners__frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 1px 0 rgb(255 240 200 / 0.18), inset 0 -120px 90px -60px rgb(4 10 8 / 0.65);
}
.runner-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; scale: 1.035; transition: opacity 460ms var(--sc-ease-out), scale 900ms var(--sc-ease-out); }
.runner-poster.is-on { opacity: 1; scale: 1; }

.runners__title { font-size: var(--sc-t-3xl); color: var(--sc-ink); }
.runners__lede { margin-top: var(--sc-4); max-width: 34rem; color: var(--sc-ink-soft); font-size: var(--sc-t-lg); line-height: 1.5; }
.runners__tabs { display: flex; flex-wrap: wrap; gap: 14px; margin-top: var(--sc-7); }
.runners__tabs button {
  display: grid; justify-items: center; gap: 8px; padding: 0; background: none; border: 0; cursor: pointer;
  color: var(--sc-ink-soft); font-size: var(--sc-t-sm); font-weight: 500; letter-spacing: 0.02em;
  transition: color 160ms var(--sc-ease-out);
}
.runners__tabs img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgb(243 235 217 / 0.16); box-shadow: 0 4px 12px rgb(0 0 0 / 0.4);
  transition: border-color 160ms var(--sc-ease-out), transform 160ms var(--sc-ease-out);
}
.runners__tabs button:hover { color: var(--sc-ink); }
.runners__tabs button:hover img { border-color: rgb(232 182 75 / 0.6); }
.runners__tabs button:active img { transform: scale(0.96); }
.runners__tabs button[aria-selected="true"] { color: var(--gold-hi); }
.runners__tabs button[aria-selected="true"] img { border-color: var(--sc-accent); box-shadow: 0 0 0 3px rgb(232 182 75 / 0.22), 0 6px 16px rgb(0 0 0 / 0.5); }
.runners__tabs button:focus-visible { outline-offset: 6px; border-radius: 12px; }

.runners__panels { margin-top: var(--sc-6); }
.runner-panel { padding-top: var(--sc-5); border-top: 1px solid var(--sc-hairline); }
.runner-panel + .runner-panel { margin-top: var(--sc-6); }
html.js .runner-panel + .runner-panel { margin-top: 0; }
.runner-panel:focus-visible { outline-offset: 8px; }
.runner-panel h3 { font-size: var(--sc-t-2xl); color: var(--sc-ink); }
.runner-panel__quote { margin-top: var(--sc-2); font-size: var(--sc-t-lg); color: #d8cdb3; }
.runner-panel dl { margin: var(--sc-5) 0 0; display: grid; gap: 0; }
.runner-panel dl > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--sc-4); padding: 14px 0; border-top: 1px solid var(--sc-hairline); align-items: center; }
.runner-panel dt { font-size: var(--sc-t-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sc-accent); }
.runner-panel dd { margin: 0; color: #e9e2d0; display: flex; align-items: center; gap: 14px; }
.runner-panel dd img { width: 48px; height: 48px; flex: none; }
.runner-panel dd b { display: block; color: var(--sc-ink); font-weight: 600; }
.runner-panel dd span { display: block; }
.runners__more { margin-top: var(--sc-6); color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }

/* -------------------------------------------------------- 5 gameplay -- */
.gameplay { background: #050d0a; }
.gameplay__stage { display: flex; align-items: center; overflow: hidden; background: radial-gradient(80% 70% at 70% 50%, rgb(232 182 75 / 0.06), transparent 70%), #050d0a; }
.gameplay__rail { align-items: center; gap: clamp(28px, 4vw, 64px); padding-inline: var(--sc-gutter); padding-top: calc(var(--bar-h) * 0.6); }
.gameplay__lead { flex: 0 0 min(28rem, 78vw); }
.gameplay__title { font-size: var(--sc-t-3xl); color: var(--sc-ink); }
.gameplay__lead p { margin-top: var(--sc-4); color: var(--sc-ink-soft); font-size: var(--sc-t-lg); line-height: 1.5; }
.shot { flex: 0 0 auto; width: clamp(200px, 19vw, 300px); margin: 0; }
.shot:nth-of-type(even) { margin-top: 9vh; }
.shot:nth-of-type(odd) { margin-bottom: 6vh; }
.shot__screen {
  aspect-ratio: 9 / 16; border-radius: 24px; overflow: hidden; background: #000;
  border: 1px solid rgb(255 255 255 / 0.16);
  box-shadow: 0 0 0 6px #0b0f0d, 0 0 0 7px rgb(232 182 75 / 0.25), var(--sc-e3);
}
.shot__screen img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--sc-hairline); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); line-height: 1.5; }
.shot figcaption b { display: block; font-family: var(--sc-font-display); font-weight: 700; font-size: 1.02rem; color: var(--sc-ink); letter-spacing: 0.02em; }
.shot figcaption span + span::before { content: " · "; color: var(--sc-accent); }
.gameplay__end { flex: 0 0 min(22rem, 72vw); }
.gameplay__end p { font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-2xl); line-height: 1.12; color: var(--gold-hi); }

/* -------------------------------------------------------- 6 features -- */
.features {
  position: relative; padding: var(--sc-section) var(--sc-gutter) calc(var(--sc-section) * 0.8);
  background: radial-gradient(55% 45% at 85% 20%, rgb(61 255 176 / 0.05), transparent 70%), var(--sc-canvas);
}
.features__grid {
  max-width: var(--sc-maxw); margin-inline: auto;
  display: grid; gap: var(--sc-7) clamp(2.5rem, 6vw, 6rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "head relics" "ledger relics" "powers powers";
  align-items: start;
}
.features__head { grid-area: head; }
.features__title { font-size: var(--sc-t-3xl); color: var(--sc-ink); max-width: 14ch; }
.features__head p { margin-top: var(--sc-4); color: var(--sc-ink-soft); font-size: var(--sc-t-lg); max-width: 30rem; line-height: 1.5; }

.ledger { grid-area: ledger; list-style: none; margin: 0; padding: 0; }
.ledger li { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; padding: 22px 0; border-top: 1px solid var(--sc-hairline); }
.ledger li:last-child { border-bottom: 1px solid var(--sc-hairline); }
.ledger img { width: 56px; height: 56px; object-fit: contain; }
.ledger h3 { font-family: var(--sc-font-text); font-size: var(--sc-t-lg); font-weight: 600; letter-spacing: 0; color: var(--sc-ink); }
.ledger p { margin-top: 4px; color: var(--sc-ink-soft); }

.relics {
  grid-area: relics; margin: 0; padding: clamp(1.5rem, 3vw, 2.75rem); border-radius: 22px;
  background:
    radial-gradient(80% 60% at 50% 0%, rgb(232 182 75 / 0.12), transparent 70%),
    linear-gradient(160deg, #10241c, #0a1612);
  border: 1px solid rgb(232 182 75 / 0.22); box-shadow: var(--sc-e3), var(--sc-edge);
}
.relics__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 10px; }
.relics__grid li { display: grid; justify-items: center; gap: 8px; text-align: center; }
.relics__grid img { width: clamp(52px, 5.4vw, 84px); height: clamp(52px, 5.4vw, 84px); object-fit: contain; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.5)); }
.relics__grid span { font-size: var(--sc-t-xs); color: var(--sc-ink-soft); line-height: 1.3; }
.relics figcaption { margin-top: var(--sc-6); padding-top: var(--sc-5); border-top: 1px solid rgb(232 182 75 / 0.18); color: #ddd5c2; }
.relics figcaption b { color: var(--gold-hi); font-family: var(--sc-font-display); font-weight: 700; margin-right: 4px; }

.powers { grid-area: powers; padding-top: var(--sc-4); }
.powers h3 { font-size: var(--sc-t-xl); color: var(--sc-ink); }
.powers__row { list-style: none; margin: var(--sc-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px; }
.powers__row li { display: grid; justify-items: center; gap: 10px; text-align: center; font-size: var(--sc-t-sm); color: #ddd5c2; }
.powers__row img { width: clamp(56px, 6vw, 88px); height: clamp(56px, 6vw, 88px); object-fit: contain; filter: drop-shadow(0 6px 12px rgb(0 0 0 / 0.5)); transition: transform 180ms var(--sc-ease-out); }
@media (hover: hover) and (pointer: fine) { .powers__row li:hover img { transform: translateY(-4px) rotate(-4deg); } }
.powers > p { margin-top: var(--sc-6); color: var(--sc-ink-soft); }

.yourway { max-width: var(--sc-maxw); margin: var(--sc-9) auto 0; padding-top: var(--sc-7); border-top: 1px solid rgb(232 182 75 / 0.2); }
.yourway__title { font-size: var(--sc-t-xl); color: var(--sc-ink); }
.yourway__list { list-style: none; margin: var(--sc-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sc-6) clamp(1.5rem, 4vw, 3.5rem); }
.yourway__list li { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); line-height: 1.6; }
.yourway__list b { display: block; margin-bottom: 4px; color: var(--sc-ink); font-size: var(--sc-t-base); font-weight: 600; }

/* --------------------------------------------------------- 7 endcard -- */
.endcard { position: relative; display: grid; grid-template-rows: 1fr auto; min-height: 100svh; isolation: isolate; background: #050d0a; overflow: hidden; }
.endcard__stage { position: relative; display: grid; isolation: isolate; }
.endcard__bg { position: absolute; inset: 0; z-index: -2; }
.endcard__bg picture, .endcard__bg img { width: 100%; height: 100%; }
.endcard__bg img { object-fit: cover; object-position: 50% 62%; }
.endcard__shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, var(--sc-canvas) 0%, rgb(7 18 14 / 0.4) 14%, transparent 30%),
    radial-gradient(46% 36% at 50% 42%, rgb(5 12 9 / 0.62), rgb(5 12 9 / 0.28) 60%, transparent 85%),
    linear-gradient(to top, #050d0a 0%, rgb(5 13 10 / 0.6) 14%, transparent 34%);
}
.endcard__inner { align-self: center; justify-self: center; text-align: center; padding: calc(var(--bar-h) + 4vh) var(--sc-gutter) 6vh; max-width: 54rem; }
.endcard__logo { margin: 0 auto; width: min(40rem, 82vw); }
.endcard__logo img { width: 100%; height: auto; filter: drop-shadow(0 10px 28px rgb(0 0 0 / 0.55)); }
.endcard__line { margin-top: var(--sc-5); font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-xl); color: #fff6e2; text-shadow: 0 2px 16px rgb(0 0 0 / 0.7); }
.badges--center { justify-content: center; margin-top: var(--sc-6); }
.endcard__run { margin-top: var(--sc-6); font-size: var(--sc-t-base); color: #efe6d2; text-shadow: 0 1px 10px rgb(0 0 0 / 0.8); }
.endcard__run b { color: var(--gold-hi); font-family: var(--sc-font-display); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- phones -- */
@media (max-width: 900px) {
  .runners__grid { grid-template-columns: 1fr; }
  .runners__poster { width: min(100%, 26rem); margin-inline: auto; }
  .features__grid { grid-template-columns: 1fr; grid-template-areas: "head" "relics" "ledger" "powers"; }
  .powers__row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 12px; }
  .yourway__list { grid-template-columns: 1fr 1fr; }
}

@media (max-aspect-ratio: 4/5), (max-width: 700px) {
  .hero { min-height: 600px; max-height: none; }
  .hero__plate img { object-position: 50% 50%; }
  .hero__copy {
    left: var(--sc-gutter); right: var(--sc-gutter); width: auto; top: calc(var(--bar-h) + env(safe-area-inset-top) + 3svh);
    transform: none; text-align: center;
  }
  .hero__logo img { width: min(100%, 26rem); margin-inline: auto; }
  .hero__tag { font-size: var(--sc-t-lg); margin-top: var(--sc-3); }
  .hero__copy .badges { justify-content: center; margin-top: var(--sc-5); gap: 10px; }
  .hero__note { margin-top: var(--sc-3); }
  .hero__shade {
    background:
      linear-gradient(to bottom, rgb(5 11 8 / 0.78) 0%, rgb(5 11 8 / 0.55) 30%, rgb(5 11 8 / 0.08) 50%, transparent 58%),
      linear-gradient(to top, var(--sc-canvas) 0%, rgb(7 18 14 / 0.7) 8%, transparent 22%);
  }
  .hero__panthers { width: 116vw; left: -4vw; bottom: 25svh; }
  .hero__runner { height: 50svh; left: 0; right: 0; bottom: -6svh; display: flex; justify-content: center; }
  .hero__runner img { margin-left: 18vw; }
  .hero__fore { left: -60vw; right: -60vw; bottom: -2svh; }

  .realms__runner { height: 36svh; bottom: 1svh; }
  .realms__copy { right: var(--sc-gutter); top: calc(var(--bar-h) + env(safe-area-inset-top) + 2svh); bottom: auto; justify-content: flex-start; gap: var(--sc-4); }
  .realms__sub { display: none; }
  .realms__list { width: auto; align-items: start; }
  .realm h3 { font-size: var(--sc-t-2xl); }
  .realm p { font-size: var(--sc-t-base); }
  .realms__shade {
    background:
      linear-gradient(to bottom, rgb(4 10 8 / 0.82) 0%, rgb(4 10 8 / 0.55) 34%, transparent 56%),
      linear-gradient(to top, rgb(4 10 8 / 0.5) 0%, transparent 25%);
  }
  .realms__rail {
    top: auto; bottom: 2svh; right: auto; left: 50%; transform: translateX(-50%);
    grid-auto-flow: column; gap: 6px; z-index: 6;
  }
  .realms__rail button { padding: 8px 0; }
  .realms__rail button span { display: none; }
  .realms__rail button::after { width: 14px; }
  .realms__rail button.is-on::after { width: 26px; }
}

@media (max-width: 700px) {
  .premise__line--two { margin-left: 0; }
  .shot { width: 58vw; }
  .shot:nth-of-type(even) { margin-top: 5vh; }
  .gameplay__rail { gap: 22px; }
  .yourway__list { grid-template-columns: 1fr; }
  .runner-panel dl > div { grid-template-columns: 5rem 1fr; }
  .runners__tabs { gap: 10px; justify-content: space-between; }
  .runners__tabs img { width: 58px; height: 58px; }
  .badge { height: 52px; padding: 0 14px 0 12px; gap: 9px; }
  .badge svg { width: 24px; height: 24px; }
  .badge__txt b { font-size: 1.12rem; }
  .badge__txt small { font-size: 0.58rem; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .hero__layer > img, html.js .hero__layer > picture, html.js .hero__copy > * { translate: none; scale: none; transition: opacity 400ms linear; }
  .ember { display: none; }
  .realms__flash { display: none; }
  .realms.is-live .realms__runner img { animation: none; }
  .runner-poster { scale: none; }
}

@media (max-width: 400px) {
  .hero__copy .badges { flex-wrap: nowrap; gap: 8px; }
  .badge { height: 46px; padding: 0 10px 0 9px; gap: 7px; border-radius: 10px; }
  .badge svg { width: 20px; height: 20px; }
  .badge__txt b { font-size: 0.98rem; }
  .badge__txt small { font-size: 0.5rem; letter-spacing: 0.04em; }
  .hero__tag { font-size: 1.12rem; }
}

/* Short, wide screens: phones held sideways, small laptop windows. Everything important has to
   fit in about 360 to 500 pixels of height. */
@media (max-height: 500px) and (min-aspect-ratio: 1/1) {
  .hero { min-height: 100svh; max-height: none; }
  .hero__copy { top: calc(var(--bar-h) + env(safe-area-inset-top) + 10px); transform: none; width: min(26rem, 46vw); }
  .hero__logo img { width: min(100%, 19rem); }
  .hero__tag { font-size: 1.05rem; margin-top: 8px; }
  .hero__copy .badges { margin-top: 12px; flex-wrap: nowrap; gap: 8px; }
  .hero__note { margin-top: 8px; font-size: 0.78rem; }
  .badge { height: 44px; padding: 0 10px 0 9px; gap: 7px; border-radius: 10px; }
  .badge svg { width: 20px; height: 20px; }
  .badge__txt b { font-size: 0.98rem; }
  .badge__txt small { font-size: 0.5rem; letter-spacing: 0.04em; }
  .hero__panthers { width: 34vw; left: 46vw; bottom: 24vh; }
  .hero__runner { height: 108svh; left: 64vw; bottom: -18svh; }

  .realms__copy { top: calc(var(--bar-h) + env(safe-area-inset-top) + 8px); bottom: 5vh; right: calc(var(--sc-gutter) + 11rem); }
  .realms__sub { display: none; }
  .realms__title { font-size: 1.35rem; }
  .realms__list { width: min(24rem, 40vw); }
  .realm h3 { font-size: 1.6rem; }
  .realm p { font-size: 0.92rem; margin-top: 6px; }
  .realms__runner { height: 58svh; }
  .realms__rail { gap: 0; }
  .realms__rail button { padding: 2px 0; font-size: 0.66rem; }

  .gameplay__rail { padding-top: calc(var(--bar-h) * 0.5); }
  .shot { width: auto; }
  .shot__screen { height: 58svh; width: auto; }
  .shot:nth-of-type(even) { margin-top: 4vh; }
  .shot:nth-of-type(odd) { margin-bottom: 2vh; }
  .shot figcaption { margin-top: 10px; padding-top: 6px; font-size: 0.78rem; }
  .gameplay__lead p { font-size: var(--sc-t-base); }

  .endcard__inner { padding: calc(var(--bar-h) + 2vh) var(--sc-gutter) 4vh; }
  .endcard__logo { width: min(24rem, 50vw); }
  .endcard__line { font-size: 1.1rem; margin-top: 10px; }
  .badges--center { margin-top: 14px; }
  .endcard__run { margin-top: 12px; }
}

/* Short, wide screens keep the runner poster beside its text. */
@media (max-height: 500px) and (min-aspect-ratio: 1/1) {
  .runners__grid { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); align-items: start; }
  /* the poster stays in view beside the text; its grid row is the only thing it can travel through */
  .runners__poster { width: auto; justify-self: center; position: sticky; top: calc(var(--bar-h) + 12px); }
  .runners__frame { height: calc(100svh - var(--bar-h) - 24px); width: auto; max-width: 100%; }
  .runners__tabs { margin-top: var(--sc-5); }
  .runners__title, .features__title, .gameplay__title { font-size: var(--sc-t-2xl); }
  .premise__line { font-size: var(--sc-t-xl); }
  .premise__line--big { font-size: clamp(2.2rem, 1rem + 4vw, 3.6rem); }
  .premise__line + .premise__line { margin-top: 3.5rem; }
  .premise { padding-top: 4.5rem; padding-bottom: 5rem; }
}

/* The narrowest phones: all five runner tabs on one row. */
@media (max-width: 380px) {
  .runners__tabs { gap: 6px; flex-wrap: nowrap; }
  .runners__tabs button { min-width: 0; flex: 1 1 0; font-size: 0.72rem; }
  .runners__tabs img { width: 48px; height: 48px; }
}
