/* ==========================================================================
   Cup Heroes — shared design system
   Palette and type are pulled from the game: night-indigo skies, cream UI
   panels, gold + flame from the logo, lime grass. Display face mirrors the
   chunky rounded lettering of the in-game HUD.
   ========================================================================== */

:root {
  --ink: #141033;          /* page background */
  --ink-2: #1c1746;        /* raised panels */
  --ink-3: #2a2468;        /* lighter panel / hover */
  --ink-line: rgba(255, 249, 238, .12);

  --cream: #fff3d9;
  --cream-2: #f3dfb0;
  --cream-ink: #2b1d3a;    /* text on cream */

  --gold: #ffc43a;
  --gold-deep: #e39a12;
  --flame: #ff6a3c;
  --berry: #d63c7a;
  --lime: #9ce02f;
  --sky: #8fd3f2;

  --text: #fff9ee;
  --muted: #b9b4d6;

  --font-display: "Lilita One", "Arial Black", Impact, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius-lg: 28px;
  --radius: 18px;
  --radius-sm: 12px;
  --width: 1180px;
  --header-h: 80px;
}

/* ---------- fonts (self-hosted, SIL Open Font License — see assets/fonts) ---------- */
@font-face {
  font-family: "Lilita One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/LilitaOne-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/Nunito-Variable.woff2") format("woff2");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-width: 320px; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  overflow-x: clip;
}
img, video { max-width: 100%; height: auto; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 6px;
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 3000; padding: 10px 16px; border-radius: 10px; background: var(--gold); color: var(--cream-ink); font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 14px; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1;
  margin: 0;
}
h2 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(var(--width), 100% - 40px); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--gold);
  --btn-bg-top: #ffd978;
  --btn-fg: var(--cream-ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 13px 26px;
  border: 3px solid #1a1230;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--btn-bg-top) 0%, var(--btn-bg) 48%, var(--btn-bg) 100%);
  color: var(--btn-fg);
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .02em; line-height: 1;
  text-decoration: none; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 5px 0 #1a1230, 0 12px 24px rgba(0, 0, 0, .3);
  transition: transform .1s ease, box-shadow .1s ease, filter .15s ease;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #1a1230, 0 4px 10px rgba(0, 0, 0, .3); }
.btn--ghost { --btn-bg: #2e2770; --btn-bg-top: #3c3488; --btn-fg: var(--text); }
.btn--cream { --btn-bg: var(--cream); --btn-bg-top: #fff; --btn-fg: var(--cream-ink); }
.btn--flame { --btn-bg: var(--flame); --btn-bg-top: #ff9068; --btn-fg: #fff; }
.btn--sm { min-height: 42px; padding: 9px 18px; font-size: .95rem; border-radius: 13px; }
.btn .icon { width: 1.15em; height: 1.15em; flex: none; }

/* store links: official badge image, with a plain text button as fallback until the badge files exist */
.store-link { display: inline-flex; text-decoration: none; }
.store-link .store-badge { display: block; height: 58px; width: auto; border-radius: 10px; box-shadow: 0 12px 26px rgba(0, 0, 0, .35); transition: transform .12s ease; }
.store-link:hover .store-badge { transform: translateY(-2px); }
.store-link .store-btn { display: none; }
.store-link.no-badge .store-badge { display: none; }
.store-link.no-badge .store-btn { display: inline-flex; }
/* text fallback button */
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 10px 22px 10px 16px;
  border: 3px solid #1a1230; border-radius: 16px;
  background: #15112f; color: #fff; text-decoration: none;
  box-shadow: 0 6px 0 #0a0718, 0 14px 26px rgba(0, 0, 0, .3);
  transition: transform .12s ease, box-shadow .12s ease;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #0a0718, 0 18px 30px rgba(0, 0, 0, .35); }
.store-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #0a0718; }
.store-btn svg { width: 30px; height: 30px; flex: none; }
.store-btn span { display: block; line-height: 1.1; }
.store-btn small { display: block; font-size: .72rem; font-weight: 700; color: #c9c3e8; letter-spacing: .04em; text-transform: uppercase; }
.store-btn strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 1000;
  background: rgba(20, 16, 51, .82);
  border-bottom: 2px solid rgba(255, 196, 58, .18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; width: 74px; height: auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.site-nav a {
  position: relative; padding: 6px 2px; color: var(--muted); text-decoration: none;
  font-weight: 800; font-size: .92rem; letter-spacing: .01em; transition: color .18s ease;
}
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.site-nav a:hover, .site-nav a.is-active { color: #fff; }
.site-nav a.is-active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none; width: 46px; height: 46px; align-items: center; justify-content: center;
  border: 2px solid var(--ink-line); border-radius: 12px; background: var(--ink-2); color: #fff; cursor: pointer;
}
.menu-toggle svg { width: 24px; height: 24px; }

/* ---------- page curtain (transition between pages) ----------
   Leaving: the curtain rises from the bottom and covers the page; the next page starts covered and the
   curtain drops away. The html.ch-enter class is set by a tiny inline script in <head> so there's no flash. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 5000; pointer-events: none;
  background: var(--ink) url("../img/brand/logo.png") center / 120px auto no-repeat;
  transform: translateY(102%);
  transition: transform .42s cubic-bezier(.65, 0, .35, 1);
}
html.ch-leave body::after { transform: translateY(0); }
html.ch-enter body::after { transform: translateY(0); transition: none; }
html.ch-enter.ch-reveal body::after { transform: translateY(102%); transition: transform .48s cubic-bezier(.65, 0, .35, 1) .05s; }
@media (prefers-reduced-motion: reduce) { body::after { display: none; } }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(72px, 9vw, 120px) 0; }
.section--tight { padding-block: clamp(56px, 7vw, 88px); }
.section-head { max-width: 720px; margin: 0 auto clamp(32px, 4.5vw, 56px); text-align: center; }
.section-head h2 { margin-bottom: 14px; text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section--cream { background: var(--cream); color: var(--cream-ink); }
.section--cream .section-head p { color: #5c4a6b; }
.section--raised { background: var(--ink-2); }

/* faded key-art banners behind sections */
.has-banner { position: relative; isolation: isolate; overflow: hidden; }
.has-banner::before { content: ""; position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; background-repeat: no-repeat; }
.has-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.banner--tavern::before { background-image: url("../img/banners/tavern.webp"); opacity: .34; }
.banner--tavern::after { background: linear-gradient(180deg, var(--ink) 0%, rgba(20, 16, 51, .55) 30%, rgba(20, 16, 51, .55) 70%, var(--ink) 100%); }
.banner--ascensions::before { background-image: url("../img/banners/ascensions.webp"); background-position: center 35%; opacity: .26; }
.banner--ascensions::after { background: linear-gradient(180deg, var(--ink) 0%, rgba(20, 16, 51, .6) 25%, rgba(20, 16, 51, .7) 75%, var(--ink) 100%); }
.banner--squad::before { background-image: url("../img/banners/squad-vertical.webp"); background-position: center 22%; opacity: .3; }
.banner--squad::after { background: linear-gradient(180deg, var(--ink) 0%, rgba(20, 16, 51, .55) 25%, rgba(20, 16, 51, .65) 75%, var(--ink) 100%); }
.banner--ascensions-trailer::before { background-image: url("../img/banners/ascensions.webp"); background-position: left 40%; opacity: .24; }
.banner--ascensions-trailer::after { background: linear-gradient(90deg, rgba(20, 16, 51, .75), rgba(20, 16, 51, .35) 50%, rgba(20, 16, 51, .8)), linear-gradient(180deg, var(--ink), transparent 20%, transparent 80%, var(--ink)); }

/* ---------- feature tiles ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.feature {
  position: relative; padding: 30px 26px 28px;
  border: 3px solid #0f0b26; border-radius: var(--radius);
  background: linear-gradient(170deg, #2a2468 0%, #1c1746 70%);
  box-shadow: 0 8px 0 #0f0b26, 0 18px 40px rgba(0, 0, 0, .3);
}
.feature-icon {
  display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 22px;
  border: 3px solid #1a1230; border-radius: 18px; color: var(--cream-ink);
  background: linear-gradient(180deg, #ffd978, var(--gold) 55%);
  box-shadow: 0 5px 0 #7a4a00;
}
.feature-icon svg { width: 36px; height: 36px; }
.feature-icon--img { width: 84px; height: 84px; margin-bottom: 18px; border: 0; background: none; box-shadow: none; }
.feature-icon img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.feature-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.feature-grid--5 .feature { padding: 26px 20px 24px; }
.feature-grid--5 .feature h3 { font-size: 1.3rem; }
.feature-grid--5 .feature p { font-size: .95rem; }
.feature h3 { margin-bottom: 10px; font-size: 1.5rem; }
.feature p { color: var(--muted); font-size: 1rem; }

/* ---------- hero cards (Choose your champion) ---------- */
.champions { background: radial-gradient(60% 50% at 50% 100%, rgba(255, 196, 58, .08), transparent 70%), var(--ink); }
.champ-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.champ-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); }
.champ-card {
  --frame: #e39a12;
  position: relative; display: flex; flex-direction: column; align-items: stretch;
  width: clamp(118px, 13vw, 150px); padding: 0; cursor: pointer;
  border: 0; border-radius: 16px; background: transparent;
  transition: transform .18s ease;
}
.champ-card .card-face {
  position: relative; overflow: hidden; border-radius: 16px;
  border: 4px solid var(--frame); outline: 3px solid #1a1230; outline-offset: -1px;
  background: radial-gradient(90% 70% at 50% 100%, #3d3480, #1f1a52 85%);
  box-shadow: 0 6px 0 #1a1230, 0 12px 24px rgba(0, 0, 0, .35);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.champ-card .card-face::after { content: ""; position: absolute; inset: 0; border-radius: 12px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18); pointer-events: none; }
.champ-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; transform: scale(1.12) translateY(6%); transition: transform .25s ease; }
.champ-card .card-name {
  position: relative; display: block; margin: -8px 6px 0; padding: 7px 6px 8px;
  border: 3px solid #1a1230; border-radius: 12px;
  background: linear-gradient(180deg, #fff6df, var(--cream-2)); color: var(--cream-ink);
  font-family: var(--font-display); font-size: 1.02rem; text-align: center; line-height: 1;
  box-shadow: 0 4px 0 #1a1230;
}
.champ-card:hover { transform: translateY(-4px); }
.champ-card:hover img { transform: scale(1.18) translateY(4%); }
.champ-card[aria-pressed="true"] { --frame: var(--gold); transform: translateY(-8px) scale(1.04); }
.champ-card[aria-pressed="true"] .card-face { box-shadow: 0 6px 0 #1a1230, 0 0 0 4px rgba(255, 196, 58, .35), 0 0 34px rgba(255, 196, 58, .45); }
.champ-card[aria-pressed="true"] .card-name { background: linear-gradient(180deg, #ffe08a, var(--gold)); }

.champ-panel {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0;
  padding: clamp(24px, 3vw, 36px); border: 3px solid #0f0b26; border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #2a2468, #1a1545 60%);
  box-shadow: 0 10px 0 #0f0b26, 0 24px 60px rgba(0, 0, 0, .4);
}
.champ-stage { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 18px; align-items: center; }
.champ-art { position: relative; aspect-ratio: 1; isolation: isolate; max-width: 440px; margin-inline: auto; }
.champ-art::before {
  content: ""; position: absolute; inset: 8% 4% 6%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 196, 58, .55), rgba(255, 106, 60, .18) 55%, transparent 72%);
  filter: blur(6px);
}
.champ-art img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45)); }
.champ-copy h3 { font-size: clamp(2rem, 3vw, 2.6rem); margin-bottom: 8px; text-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.champ-role {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 12px;
  border: 2px solid #1a1230; border-radius: 999px; background: var(--gold); color: var(--cream-ink);
  font-weight: 900; font-size: .8rem; letter-spacing: .04em; box-shadow: 0 3px 0 #1a1230;
}
.champ-copy p { color: var(--muted); font-size: 1rem; }

.champ-video {
  position: relative; overflow: hidden; aspect-ratio: 720 / 788;
  border: 4px solid #1a1230; border-radius: 22px; background: #0b0820;
  box-shadow: 0 8px 0 #0f0b26, 0 0 0 3px rgba(255, 255, 255, .06), 0 24px 50px rgba(0, 0, 0, .45);
}
.champ-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.champ-video .video-tag {
  position: absolute; left: 14px; top: 14px; z-index: 2; padding: 6px 11px; border-radius: 999px;
  background: rgba(20, 16, 51, .78); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .02em;
  border: 1px solid rgba(255, 255, 255, .14);
}
.champ-video .video-tag::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); vertical-align: 1px; }

/* ---------- store band ---------- */
.store-band {
  position: relative; overflow: hidden; padding: clamp(64px, 8vw, 100px) 0; text-align: center;
  background: linear-gradient(110deg, #ff7a3c 0%, #ff4d5d 48%, #c83a8c 100%);
  color: #fff;
}
.store-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 15% 50%, rgba(255, 236, 170, .35), transparent 60%); pointer-events: none; }
.store-band .wrap { position: relative; }
.store-princess { position: absolute; right: clamp(-40px, 2vw, 120px); bottom: -6%; height: 118%; width: auto; max-width: none; opacity: .28; pointer-events: none; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .25)); }
@media (max-width: 880px) { .store-princess { right: -20%; height: 100%; opacity: .2; } }
.store-band h2 { text-shadow: 0 5px 0 rgba(90, 10, 40, .45); margin-bottom: 12px; }
.store-band p { max-width: 560px; margin: 0 auto; font-size: 1.1rem; color: rgba(255, 255, 255, .92); }
.store-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.store-note { margin-top: 18px; font-size: .9rem; color: rgba(255, 255, 255, .8); }

/* ---------- features tabs (cream) ---------- */
.tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: clamp(28px, 5vw, 72px); align-items: center; }
.tablist { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.tab {
  padding: 10px 18px; border: 3px solid var(--cream-ink); border-radius: 14px; cursor: pointer;
  background: #fff; color: var(--cream-ink); font-family: var(--font-display); font-size: 1rem;
  box-shadow: 0 4px 0 var(--cream-ink); transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.tab:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--cream-ink); }
.tab[aria-selected="true"] { background: var(--gold); transform: translateY(2px); box-shadow: 0 2px 0 var(--cream-ink); }
.tabpanel[hidden] { display: none; }
.tabpanel h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 14px; }
.tabpanel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.tabpanel li { position: relative; padding-left: 36px; font-size: 1.06rem; color: #3f3250; }
.tabpanel li::before {
  content: ""; position: absolute; left: 0; top: .15em; width: 24px; height: 24px; border-radius: 8px;
  border: 2px solid var(--cream-ink); background: var(--lime);
  box-shadow: 0 3px 0 var(--cream-ink);
}
.tabpanel li::after { content: ""; position: absolute; left: 8px; top: .45em; width: 6px; height: 11px; border: solid var(--cream-ink); border-width: 0 3px 3px 0; transform: rotate(40deg); }
.phone {
  position: relative; width: min(100%, 340px); margin: 0 auto; padding: 12px;
  border: 4px solid #1a1230; border-radius: 40px; background: #2b2550;
  box-shadow: 0 10px 0 #1a1230, 0 30px 60px rgba(40, 20, 60, .35);
}
.phone::before { content: ""; position: absolute; left: 50%; top: 6px; width: 90px; height: 7px; border-radius: 99px; background: #1a1230; transform: translateX(-50%); }
.phone img, .phone video { display: block; width: 100%; aspect-ratio: 480 / 1038; object-fit: cover; border-radius: 28px; border: 2px solid #1a1230; background: #0b0820; }
.phone img[hidden], .phone video[hidden] { display: none; }

/* ---------- trailer ---------- */
.trailer-layout { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; justify-content: center; }
.trailer-copy h2 { margin-bottom: 14px; text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.trailer-copy p { color: var(--muted); font-size: 1.08rem; max-width: 46ch; }
.trailer-copy .btn { margin-top: 22px; }
.trailer-frame {
  position: relative; width: min(100%, 360px); margin-left: auto; padding: 10px;
  border: 4px solid #1a1230; border-radius: 40px; background: linear-gradient(170deg, #35307a, #1a1545);
  box-shadow: 0 10px 0 #0f0b26, 0 0 0 3px rgba(255, 255, 255, .06), 0 30px 70px rgba(0, 0, 0, .5);
}
.trailer-frame video { display: block; width: 100%; aspect-ratio: 480 / 1038; object-fit: cover; border-radius: 30px; background: #000; }
.sound-toggle {
  position: absolute; right: 22px; bottom: 22px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px;
  border: 2px solid #1a1230; border-radius: 999px; background: var(--cream); color: var(--cream-ink);
  font-weight: 900; font-size: .85rem; cursor: pointer; box-shadow: 0 4px 0 #1a1230;
}
.sound-toggle svg { width: 18px; height: 18px; }
.sound-toggle[aria-pressed="true"] { background: var(--gold); }

/* ---------- news ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.news-card {
  display: flex; flex-direction: column; padding: 26px; border: 3px solid #0f0b26; border-radius: var(--radius);
  background: var(--ink-2); box-shadow: 0 7px 0 #0f0b26; color: inherit; text-decoration: none;
  transition: transform .15s ease;
}
.news-card:hover { transform: translateY(-4px); }
.news-card .version {
  align-self: flex-start; margin-bottom: 16px; padding: 6px 11px; border: 2px solid #1a1230; border-radius: 999px;
  background: var(--gold); color: var(--cream-ink); font-weight: 900; font-size: .78rem; box-shadow: 0 3px 0 #1a1230;
}
.news-card h3 { margin-bottom: 10px; font-size: 1.45rem; }
.news-card p { color: var(--muted); font-size: .98rem; margin-bottom: 20px; }
.news-card .more { margin-top: auto; color: var(--gold); font-weight: 900; }
.news-card:hover .more { text-decoration: underline; text-underline-offset: 4px; }
.center { display: flex; justify-content: center; margin-top: 34px; }

/* ---------- support ---------- */
.support-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.support-card {
  display: flex; flex-direction: column; gap: 10px; padding: 26px;
  border: 3px solid var(--cream-ink); border-radius: var(--radius); background: #fff; color: var(--cream-ink);
  text-decoration: none; box-shadow: 0 6px 0 var(--cream-ink); transition: transform .15s ease;
}
.support-card:hover { transform: translateY(-4px); }
.support-card .feature-icon { margin-bottom: 4px; width: 56px; height: 56px; border-radius: 16px; }
.support-card .feature-icon svg { width: 30px; height: 30px; }
.support-card h3 { font-size: 1.35rem; }
.support-card p { color: #5c4a6b; font-size: .98rem; }
.support-card strong { color: var(--berry); }

/* ---------- footer ---------- */
.site-footer { padding: 56px 0 32px; border-top: 3px solid #0f0b26; background: #0e0b24; }
.footer-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.footer-top .brand img { width: 92px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; }
.footer-nav a, .social a { color: var(--muted); text-decoration: none; font-weight: 800; font-size: .95rem; }
.footer-nav a:hover, .social a:hover { color: var(--gold); }
.social { display: flex; gap: 10px; }
.social a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 12px; border: 2px solid var(--ink-line); border-radius: 12px; background: var(--ink-2); color: #fff; }
.social a:hover { border-color: var(--gold); }
.social img { display: block; width: 22px; height: 22px; }
.social .display { display: none; font-size: .9rem; }
.social a.no-icon img { display: none; }
.social a.no-icon .display { display: inline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--ink-line); color: #8a84ad; font-size: .88rem; }
.footer-bottom a { color: #a39dc7; text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- sub-page intro band ---------- */
.page-intro {
  position: relative; isolation: isolate; overflow: hidden;
  padding: calc(var(--header-h) + 64px) 0 72px; text-align: center;
  background: #1a1545;
}
.page-intro::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../img/key-art/ascensions-1920x1080.webp") center 30% / cover no-repeat;
  opacity: .32; filter: saturate(1.1);
}
.page-intro::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 16, 51, .55), rgba(20, 16, 51, .35) 50%, var(--ink) 100%); }
.page-intro h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: 14px; text-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.page-intro p { max-width: 640px; margin: 0 auto; color: #d7d2ee; font-size: 1.1rem; }

/* ---------- updates archive ---------- */
.updates-list { display: grid; gap: 18px; width: min(960px, 100% - 40px); margin: 0 auto; }
.update {
  padding: clamp(22px, 3.5vw, 32px); border: 3px solid #0f0b26; border-radius: var(--radius);
  background: var(--ink-2); box-shadow: 0 7px 0 #0f0b26;
}
.update.is-latest { border-color: var(--gold); box-shadow: 0 7px 0 #0f0b26, 0 0 0 3px rgba(255, 196, 58, .22); }
.update-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.update .version { display: inline-block; margin-bottom: 12px; padding: 6px 11px; border: 2px solid #1a1230; border-radius: 999px; background: var(--gold); color: var(--cream-ink); font-weight: 900; font-size: .78rem; box-shadow: 0 3px 0 #1a1230; }
.update h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 8px; }
.update p { color: var(--muted); }
.update-video { display: inline-flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--text); text-decoration: none; font-weight: 800; }
.update-video img { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border: 2px solid #1a1230; border-radius: 12px; }
.update-video span { color: var(--gold); }
.update-video:hover span { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .feature-grid, .feature-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .champ-layout { grid-template-columns: 1fr; }
  .champ-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .trailer-layout { grid-template-columns: 1fr; text-align: center; }
  .trailer-copy p { margin-inline: auto; }
  .trailer-frame { margin-inline: auto; }
}
@media (max-width: 880px) {
  :root { --header-h: 70px; }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 20px 18px; background: rgba(20, 16, 51, .98); border-bottom: 2px solid rgba(255, 196, 58, .2);
    box-shadow: 0 24px 40px rgba(0, 0, 0, .4);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--ink-line); font-size: 1.05rem; }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a::after { display: none; }
  .site-nav a.is-active { color: var(--gold); }
  .tabs { grid-template-columns: 1fr; }
  .phone { width: min(100%, 300px); }
  .news-grid, .support-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-bottom { justify-content: center; text-align: center; }
  .update-top { flex-direction: column; }
}
@media (max-width: 600px) {
  .wrap { width: min(var(--width), 100% - 32px); }
  .feature-grid, .feature-grid--5 { grid-template-columns: 1fr; }
  .feature { display: grid; grid-template-columns: 56px 1fr; gap: 0 16px; padding: 22px 20px; }
  .feature-icon { grid-row: span 2; width: 56px; height: 56px; margin: 0; }
  .feature-icon svg { width: 30px; height: 30px; }
  .feature-icon--img { width: 56px; height: 56px; }
  .feature-icon img { width: 56px; height: 56px; }
  .champ-stage { grid-template-columns: 1fr; }
  .champ-art { max-width: 280px; margin: 0 auto; }
  .champ-copy { text-align: center; }
  .champ-cards { gap: 10px; }
  .champ-card { width: calc(33.333% - 7px); }
  .nav-actions .btn { display: none; }
  .store-row { flex-direction: column; align-items: stretch; }
  .store-btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- updates: featured banner, data-driven cards, popup ---------- */
.news-card .more { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.update-date { font-size: .85rem; color: #8a84ad; margin-top: 4px; }
.update-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.update-featured {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: clamp(20px, 3vw, 40px); align-items: center;
  padding: clamp(24px, 3.5vw, 40px); border: 3px solid var(--gold); border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #2a2468, #1a1545 60%); box-shadow: 0 10px 0 #0f0b26, 0 0 0 3px rgba(255, 196, 58, .22), 0 24px 60px rgba(0, 0, 0, .4);
}
.update-featured h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin: 10px 0 10px; text-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.update-featured p { color: var(--muted); font-size: 1.05rem; }
.update-featured .version { display: inline-block; padding: 6px 11px; border: 2px solid #1a1230; border-radius: 999px; background: var(--gold); color: var(--cream-ink); font-weight: 900; font-size: .78rem; box-shadow: 0 3px 0 #1a1230; }
.update-featured__media { position: relative; display: block; padding: 0; border: 3px solid #1a1230; border-radius: var(--radius); overflow: hidden; background: #0b0820; cursor: pointer; box-shadow: 0 8px 0 #0f0b26; }
.update-featured__media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.play-badge { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 64px; height: 64px; border: 3px solid #1a1230; border-radius: 50%; background: var(--gold); color: var(--cream-ink); font-size: 1.4rem; box-shadow: 0 5px 0 #1a1230; }
.update-video { background: none; border: 0; padding: 0; cursor: pointer; }
.update-video img { background: #0b0820; }
@media (max-width: 880px) { .update-featured { grid-template-columns: 1fr; } }

.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__scrim { position: absolute; inset: 0; background: rgba(10, 8, 30, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal__card { position: relative; width: min(960px, 100%); max-height: min(92vh, 1000px); display: flex; flex-direction: column; border: 3px solid #0f0b26; border-radius: var(--radius-lg); background: var(--ink-2); box-shadow: 0 10px 0 #0f0b26, 0 40px 80px rgba(0, 0, 0, .6); overflow: hidden; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid var(--ink-line); }
.modal__head h3 { font-size: 1.5rem; margin-top: 8px; }
.modal__head .version { display: inline-block; padding: 5px 10px; border: 2px solid #1a1230; border-radius: 999px; background: var(--gold); color: var(--cream-ink); font-weight: 900; font-size: .75rem; }
.modal__tools { display: flex; align-items: center; gap: 10px; flex: none; }
.modal__close { width: 42px; height: 42px; border: 2px solid var(--ink-line); border-radius: 12px; background: var(--ink-3); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.modal__body { overflow: auto; padding: 18px 22px 24px; }
.modal__video { aspect-ratio: 16 / 9; border: 2px solid #1a1230; border-radius: var(--radius-sm); overflow: hidden; background: #000; margin-bottom: 18px; }
.modal__video iframe { display: block; width: 100%; height: 100%; border: 0; }
.modal__notes h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--gold); margin: 14px 0 8px; }
.modal__notes ul { margin: 0 0 8px; padding-left: 22px; color: var(--text); }
.modal__notes li { margin-bottom: 6px; }
.modal__frame iframe { display: block; width: 100%; height: min(70vh, 760px); border: 2px solid #1a1230; border-radius: var(--radius-sm); background: #fff; }
.modal__hint { margin-top: 10px; font-size: .85rem; color: #8a84ad; }
@media (max-width: 600px) { .modal { padding: 10px; } .modal__body { padding: 14px; } .modal__head { padding: 14px; } }

/* ---------- Cup Drop mini-game ---------- */
.cup-drop-section { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(70% 60% at 50% 100%, rgba(255, 196, 58, .07), transparent 70%), var(--ink); }
.cup-drop-section::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 46%; z-index: -1; background: url("../img/banners/cup-drop.webp") left center / cover no-repeat; opacity: .22; }
.cup-drop-section::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 50%; z-index: -1; background: linear-gradient(90deg, rgba(20, 16, 51, .35), var(--ink)), linear-gradient(180deg, var(--ink), transparent 20%, transparent 80%, var(--ink)); }
@media (max-width: 880px) { .cup-drop-section::before { width: 100%; opacity: .14; } .cup-drop-section::after { width: 100%; background: linear-gradient(180deg, var(--ink), rgba(20, 16, 51, .5) 20%, rgba(20, 16, 51, .5) 80%, var(--ink)); } }
.cup-drop { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(24px, 4vw, 56px); align-items: center; }
.cup-drop__how { margin: 0 0 22px; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.cup-drop__how li { position: relative; padding-left: 44px; color: var(--muted); font-size: 1.02rem; }
.cup-drop__how li b { color: var(--text); }
.cup-drop__how li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid #1a1230; border-radius: 10px; background: var(--gold); color: var(--cream-ink); font-family: var(--font-display); box-shadow: 0 3px 0 #1a1230; }
.cup-drop__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.cup-drop__stats div { padding: 14px; border: 3px solid #0f0b26; border-radius: var(--radius-sm); background: var(--ink-2); box-shadow: 0 5px 0 #0f0b26; text-align: center; }
.cup-drop__stats span { display: block; font-size: .78rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cup-drop__stats strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; color: var(--gold); line-height: 1.1; }
.cup-drop__cta { color: var(--muted); font-size: .95rem; }
.cup-drop__cta a { color: var(--gold); font-weight: 900; }
.cup-drop__stage { position: relative; width: 360px; max-width: 100%; margin-inline: auto; border: 4px solid #1a1230; border-radius: 28px; overflow: hidden; background: #2a1a3c; box-shadow: 0 10px 0 #0f0b26, 0 0 0 3px rgba(255, 255, 255, .06), 0 30px 60px rgba(0, 0, 0, .5); aspect-ratio: 360 / 640; }
.cup-drop__stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; outline: none; }
.cup-drop__stage canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--gold); }
.cup-drop__overlay { position: absolute; left: 12px; right: 12px; bottom: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 16px; text-align: center; border: 3px solid #1a1230; border-radius: 16px; background: rgba(28, 23, 70, .92); box-shadow: 0 5px 0 #1a1230; pointer-events: none; }
.cup-drop__hint { position: absolute; left: 50%; top: 14px; translate: -50% 0; padding: 7px 12px; border-radius: 999px; background: rgba(20, 16, 51, .7); color: #fff; font-size: .8rem; font-weight: 800; white-space: nowrap; pointer-events: none; transition: opacity .3s; }
.cup-drop__hint[hidden] { display: none; }
.cup-drop__overlay[hidden] { display: none; }
.cup-drop__overlay h3 { font-size: 1.35rem; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.cup-drop__overlay p { color: #e6e1fb; font-size: .88rem; }
.support-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.support-grid--4 .support-card { padding: 22px; }
.support-card--discord .feature-icon { background: linear-gradient(180deg, #7b88ff, #5865f2 55%); box-shadow: 0 5px 0 #2f3a9e; }
.support-card--discord .feature-icon img { width: 30px; height: 30px; }
@media (max-width: 1040px) { .support-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 880px) { .cup-drop { grid-template-columns: 1fr; } .cup-drop__copy { order: 2; } .cup-drop__stage { width: min(360px, 100%); } }
@media (max-width: 600px) { .support-grid--4 { grid-template-columns: 1fr; } }
