/* ════════════════════════════════════════════════════════════════════════
   Arena Heroes: Survivor — site. Tokens mirror the game's palette: night
   violet panels, gold coins, cyan gems, ink outlines and chunky buttons that
   sit on a dark bottom edge. Page skeleton follows apps/zentilematch.
   ════════════════════════════════════════════════════════════════════════ */

:root {
    --bg: #17122B;
    --bg-2: #261E44;
    --bg-3: #3A2F66;
    --gold: #FFB300;
    --gold-light: #FFD54F;
    --violet: #7C4DFF;
    --gem: #6EF0FF;
    --ink: #0E0A1C;
    --red: #E53935;
    --text-2: rgba(255, 255, 255, .78);
    --text-3: rgba(255, 255, 255, .6);
    --ease: cubic-bezier(.4, 0, .2, 1);
    --r-lg: 24px;
    --r-md: 18px;
    --gutter: 24px;
    --head: 'Lilita One', 'Nunito', system-ui, sans-serif;
    --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    /* Chunky outline for display text (no paint-order needed). */
    --outline: 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 5px 0 var(--ink);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
    font: 600 17px/1.6 var(--body);
    color: #fff;
    background:
        radial-gradient(900px 500px at 85% 40%, rgba(124, 77, 255, .14), transparent 70%),
        radial-gradient(700px 500px at 10% 75%, rgba(110, 240, 255, .06), transparent 70%),
        var(--bg);
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
.container { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gem); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, .h2 { font-family: var(--head); font-weight: 400; line-height: 1.1; letter-spacing: .01em; }
.h2 { font-size: clamp(32px, 4.6vw, 50px); text-shadow: var(--outline); }
.gold-text { color: var(--gold-light); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); }
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section-head { text-align: center; max-width: 740px; margin: 0 auto clamp(36px, 5vw, 56px); }
.section-head .lead { margin-top: 16px; }

/* ── Chunky buttons (in-game: gold face, ink outline, dark bottom edge) ─── */
.btn {
    --face: var(--gold-light); --base: var(--gold); --edge: #A86A00;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px 10px; border: 3px solid var(--ink); border-radius: 16px; cursor: pointer; white-space: nowrap;
    font: 400 18px/1 var(--head); letter-spacing: .02em; color: var(--ink); text-decoration: none;
    background: linear-gradient(var(--face), var(--base) 72%);
    box-shadow: inset 0 -4px 0 var(--edge), inset 0 3px 0 rgba(255, 255, 255, .55), 0 5px 0 var(--ink);
    transition: transform .1s var(--ease), box-shadow .1s var(--ease), filter .2s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 -2px 0 var(--edge), inset 0 3px 0 rgba(255, 255, 255, .55), 0 1px 0 var(--ink); }

/* ── Store badges (official artwork, localized by URL in i18n.js) ──────── */
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.store-badge { display: inline-flex; border-radius: 12px; transition: transform .2s var(--ease), filter .2s; }
.store-badge:hover { transform: translateY(-2px); filter: brightness(1.12); }
.store-badge .badge-apple { height: 48px; width: auto; }
.store-badge.gp { overflow: hidden; }
.store-badge .badge-play { height: 67px; width: auto; max-width: none; margin: -9.5px; }
.soon {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
    font-size: 14px; font-weight: 800; color: var(--gold-light);
}
.soon::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(255, 179, 0, .25); }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(23, 18, 43, .82);
    -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
    border-bottom: 3px solid var(--ink);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 21px var(--head); letter-spacing: .02em; }
.brand img { width: 38px; height: 38px; border-radius: 11px; border: 2px solid var(--ink); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 800; font-size: 15px; color: var(--text-2); transition: background .2s, color .2s; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav .btn { padding: 9px 15px 8px; font-size: 16px; }

.lang-pick select {
    appearance: none; padding: 8px 34px 8px 14px; border-radius: 12px; cursor: pointer;
    font: 700 14px var(--body); color: #fff; border: 2px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23FFD54F' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 12px no-repeat;
}
.lang-pick select option { color: #000; }
.nav-lang select { max-width: 150px; }

/* While a non-English page loads its strings, hide the English text (i18n.js lifts this after 2.5 s at most). */
.i18n-pending body { visibility: hidden; }

/* ── Hero: key art full bleed, wordmark over its calm left third ───────── */
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: clamp(560px, 82vh, 760px); }
.hero-art { position: absolute; inset: 0; z-index: -2; display: block; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(23, 18, 43, .94) 0%, rgba(23, 18, 43, .78) 28%, rgba(23, 18, 43, 0) 60%),
        linear-gradient(0deg, var(--bg) 0%, rgba(23, 18, 43, 0) 22%);
}
.hero-copy { padding: 40px 0 64px; max-width: 500px; }
.wordmark { margin-bottom: 18px; }
.wordmark img { width: min(430px, 100%); height: auto; filter: drop-shadow(0 10px 20px rgba(14, 10, 28, .6)); }
.hero .lead { color: rgba(255, 255, 255, .88); text-shadow: 0 2px 10px rgba(14, 10, 28, .8); }
.hero .store-row { margin-top: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.chips li {
    padding: 6px 12px 5px; border-radius: 12px; border: 2px solid var(--ink);
    background: rgba(38, 30, 68, .88); font: 400 16px var(--head); letter-spacing: .02em; box-shadow: 0 3px 0 var(--ink);
}
.chips b { font-weight: 400; color: var(--gold-light); }

/* Gold sparkles drifting over the hero and CTA. */
.spark {
    position: absolute; z-index: 0; left: var(--x); top: var(--y); width: var(--s, 16px); aspect-ratio: 1;
    background: var(--gold-light); pointer-events: none;
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
    filter: drop-shadow(0 0 6px rgba(255, 213, 79, .9));
    animation: twinkle var(--d, 3s) ease-in-out infinite; animation-delay: var(--dl, 0s);
}
.spark.gem { background: var(--gem); filter: drop-shadow(0 0 6px rgba(110, 240, 255, .9)); }
@keyframes twinkle {
    0%, 100% { transform: scale(.35) rotate(0deg); opacity: .2; }
    50% { transform: scale(1) rotate(45deg); opacity: 1; }
}

/* ── Panels (in-game cards: violet face, ink outline, dark bottom edge) ── */
.panel {
    position: relative; border-radius: var(--r-lg); border: 3px solid var(--ink);
    background: linear-gradient(var(--bg-3), var(--bg-2) 70%);
    box-shadow: 0 6px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, .1);
}

/* ── What is it ─────────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 26px 24px 24px; }
.step h3 { font-size: 24px; margin: 14px 0 6px; }
.step p { color: var(--text-2); font-size: 16px; }
.step-num {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; border: 3px solid var(--ink);
    background: linear-gradient(var(--gold-light), var(--gold)); color: var(--ink); font: 400 24px/1 var(--head);
    box-shadow: inset 0 -3px 0 #A86A00, 0 4px 0 var(--ink);
}
.horde {
    display: flex; justify-content: center; align-items: flex-end; gap: clamp(4px, 2vw, 22px);
    margin-top: clamp(36px, 5vw, 56px); padding: 18px 12px 10px;
    border-radius: 999px; background: radial-gradient(60% 70% at 50% 100%, rgba(124, 77, 255, .28), transparent 70%);
}
.horde img { height: clamp(50px, 8vw, 84px); width: auto; animation: bob 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.2s); }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ── Features ───────────────────────────────────────────────────────────── */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { padding: 22px 22px 24px; }
.feature .num { display: block; font: 400 50px/1 var(--head); color: var(--gold-light); text-shadow: var(--outline); }
.feature h3 { font-size: 22px; margin: 14px 0 6px; }
.feature p { color: var(--text-2); font-size: 15.5px; }
.feature.wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; }
.feature.wide img { width: 64px; height: 64px; border-radius: 16px; border: 3px solid var(--ink); flex: none; }
.feature.wide h3 { margin-top: 0; }

/* ── Heroes ─────────────────────────────────────────────────────────────── */
.heroes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.hero-card { padding: 14px 14px 18px; text-align: center; display: flex; flex-direction: column; }
.hero-card .portrait {
    margin: 0 auto 8px; width: 100%; aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center;
    background: radial-gradient(closest-side, rgba(124, 77, 255, .55), rgba(124, 77, 255, 0) 90%), rgba(14, 10, 28, .35);
}
.hero-card .portrait img { height: 86%; width: auto; transition: transform .25s var(--ease); }
.hero-card:hover .portrait img { transform: translateY(-4px) scale(1.04); }
.hero-card h3 { font-size: 23px; }
.hero-card p { margin-top: 6px; color: var(--text-2); font-size: 14.5px; line-height: 1.45; }
.hero-card .passive { margin-top: auto; padding-top: 12px; color: var(--gold-light); font-weight: 800; font-size: 13.5px; }

/* ── Maps (themed with maps.json ground/outside colors and boss glow) ──── */
.maps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.map-card { overflow: hidden; display: flex; flex-direction: column; }
.map-card .scene {
    aspect-ratio: 1; display: grid; place-items: end center; padding: 10px 8px 4px; border-bottom: 3px solid var(--ink);
    background:
        radial-gradient(55% 45% at 50% 62%, color-mix(in srgb, var(--glow) 45%, transparent), transparent 75%),
        linear-gradient(var(--outside), var(--ground));
}
.map-card .scene img { width: 92%; height: auto; filter: drop-shadow(0 6px 0 rgba(14, 10, 28, .35)); }
.map-card .text { padding: 14px 16px 18px; }
.map-card h3 { font-size: 22px; }
.map-card p { margin-top: 6px; color: var(--text-2); font-size: 14.5px; line-height: 1.45; }

/* ── Screenshots: shown only once img/screens/ images are placed inside ── */
#screens:not(:has(img)) { display: none; }
.shots {
    display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 10px var(--gutter) 24px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots > * { flex: 0 0 auto; width: clamp(200px, 24vw, 260px); scroll-snap-align: center; }
.shots img { width: 100%; height: auto; border-radius: 22px; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }

/* ── Trailer: poster button, replaced by the YouTube player on click ── */
.trailer {
    position: relative; max-width: 860px; margin: 0 auto clamp(28px, 4vw, 44px); aspect-ratio: 16 / 9;
    border-radius: 22px; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); overflow: hidden; background: var(--ink);
}
.trailer-play, .trailer iframe { display: block; width: 100%; height: 100%; border: 0; padding: 0; background: none; }
.trailer-play { position: relative; cursor: pointer; }
.trailer-play img { width: 100%; height: 100%; object-fit: cover; }
.trailer-icon {
    position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; translate: -50% -50%; border-radius: 50%;
    background: var(--gold); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); transition: scale .15s;
}
.trailer-icon::after {
    content: ""; position: absolute; left: 34px; top: 24px; border-style: solid;
    border-width: 15px 0 15px 24px; border-color: transparent transparent transparent var(--ink);
}
.trailer-play:hover .trailer-icon, .trailer-play:focus-visible .trailer-icon { scale: 1.08; }
.trailer-play:focus-visible { outline: 3px solid var(--gold-light); outline-offset: -6px; }
@media (prefers-reduced-motion: reduce) { .trailer-icon { transition: none; } }

/* ── CTA ────────────────────────────────────────────────────────────────── */
.cta { position: relative; overflow: hidden; text-align: center; padding: clamp(80px, 11vw, 130px) 0; }
.cta .container { position: relative; z-index: 1; display: grid; justify-items: center; }
.cta-mark { position: relative; width: 150px; height: 150px; margin-bottom: 30px; }
.cta-mark .rays {
    position: absolute; inset: -90px; border-radius: 50%;
    background: repeating-conic-gradient(rgba(255, 213, 79, .3) 0 10deg, transparent 10deg 30deg);
    -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent);
    animation: spin 26s linear infinite;
}
.cta-mark img { position: relative; width: 100%; height: 100%; border-radius: 34px; border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.cta .lead { margin-top: 14px; max-width: 560px; }
.cta .store-row { justify-content: center; margin-top: 30px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 12px; }
.faq details { border-radius: var(--r-md); border: 3px solid var(--ink); background: var(--bg-2); box-shadow: 0 4px 0 var(--ink); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 54px 18px 22px; position: relative; font: 400 20px var(--head); letter-spacing: .01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 20px; top: 50%; translate: 0 -50%; font: 400 28px var(--head); color: var(--gold-light); transition: rotate .25s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 22px 20px; color: var(--text-2); }
.faq a { color: var(--gem); font-weight: 800; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { padding: 40px 0 46px; border-top: 3px solid var(--ink); background: rgba(14, 10, 28, .35); color: var(--text-3); font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }

/* ── Document pages (privacy, terms, support, account deletion) ─────────── */
.doc-wrap { padding: clamp(40px, 7vw, 80px) 0 clamp(64px, 9vw, 100px); }
.doc { max-width: 820px; }
.doc h1 { font-size: clamp(38px, 5.4vw, 56px); text-shadow: var(--outline); }
.doc-date { margin-top: 10px; color: var(--text-3); font-size: 15px; }
.doc-card { margin-top: 28px; padding: clamp(22px, 4vw, 38px); font-size: 16.5px; color: rgba(255, 255, 255, .86); }
.doc-card h3 { font-size: 23px; margin: 30px 0 8px; color: var(--gold-light); }
.doc-card > :first-child { margin-top: 0; }
.doc-card p + p { margin-top: 12px; }
.doc-card ul, .doc-card ol { padding-left: 1.3em; display: grid; gap: 10px; margin: 10px 0; }
.doc-card b { color: #fff; font-weight: 800; }
.doc-card a { color: var(--gem); font-weight: 800; overflow-wrap: anywhere; }
.doc-card .muted { color: var(--text-3); font-size: 15px; margin-top: 16px; }
.doc-sub { font-size: 30px; margin: 44px 0 18px; text-shadow: var(--outline); }
.doc-note { margin-top: 22px; color: var(--text-3); font-size: 14px; }
.doc-note:empty { display: none; }

/* ── Scroll reveal ──────────────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1080px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .heroes { grid-template-columns: repeat(3, 1fr); }
    .maps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-lang { margin-left: auto; }
    .steps { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
    /* Key art becomes a banner above the copy, cropped around the heroes. */
    .hero { display: block; min-height: 0; }
    .hero-art { position: relative; aspect-ratio: 1; max-height: 64vh; width: 100%; }
    .hero-art img { object-position: 64% center; }
    .hero::before { content: none; }
    .hero-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 2%, rgba(23, 18, 43, 0) 45%); }
    .hero-copy { margin: -84px auto 0; padding: 0 0 56px; text-align: center; position: relative; }
    .wordmark img { width: min(340px, 82%); margin-inline: auto; }
    .hero .store-row, .chips { justify-content: center; }
}
@media (max-width: 640px) {
    :root { --gutter: 16px; }
    .nav .brand span, .nav .btn { display: none; }
    .features { grid-template-columns: 1fr; }
    .feature { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; }
    .feature .num { grid-row: span 2; min-width: 56px; font-size: 42px; text-align: center; }
    .feature h3 { margin-top: 2px; }
    .feature.wide { flex-direction: column; align-items: flex-start; display: flex; }
    .heroes { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hero-card { padding: 10px 10px 14px; }
    .maps { grid-template-columns: 1fr; gap: 12px; }
    .map-card { flex-direction: row; }
    .map-card .scene { aspect-ratio: auto; width: 116px; flex: none; place-items: center; border-bottom: 0; border-right: 3px solid var(--ink); }
    .map-card .text { padding: 14px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer nav { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}
