/* ==========================================================================
   BASE — tokens, reset, typography, buttons, forms, shell.
   Black + gold/orange "arcade collector" look. Pure CSS, no JavaScript.
   Performance rules used across the stylesheets:
     • animate only transform / opacity (compositor-friendly), never layout or big gradients
     • no blend modes, no backdrop-filter, no box-shadow animation
     • off-screen grid cells use content-visibility:auto
     • body.fx-lite (Settings) and prefers-reduced-motion switch every animation off
   ========================================================================== */
/* Self-hosted fonts (SIL OFL). `font-display: swap` keeps text visible while they load. */
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/bebas-neue.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("../fonts/inter-var.woff2") format("woff2"); }

:root {
    --bg: #060607;
    --bg2: #0b0b0e;
    --panel: #101013;
    --panel2: #16161b;
    --line: rgba(255, 255, 255, .08);
    --line2: rgba(255, 255, 255, .17);
    --text: #f4f2ee;
    --muted: #8e8e99;
    --gold: #f5b53d;
    --gold2: #ffd98a;
    --orange: #ff7a1a;
    --red: #ff3d57;
    --green: #3ddc84;
    --cyan: #46d6ff;
    --violet: #a66bff;
    --pink: #ff5fa2;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --display: "Bebas Neue", "Oswald", "Anton", "League Gothic", Impact, "Haettenschweiler", "Arial Narrow Bold", sans-serif;
    --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --nav-h: 62px;
    --wrap: 1380px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    font: 400 15.5px/1.55 var(--body); color: var(--text);
    background: radial-gradient(1100px 420px at 50% -8%, rgba(255, 122, 26, .10), transparent 65%), var(--bg);
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold2); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; text-transform: uppercase; margin: 0 0 .5rem; line-height: 1; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1rem; }
code { background: rgba(255, 255, 255, .06); padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; font-size: .85em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--orange); color: #000; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.tight { gap: .3rem; flex-wrap: nowrap; }
.inline { display: inline; margin: 0; }
.stack > * + * { margin-top: 1.2rem; }
.grow { flex: 1; }
.grad { background: linear-gradient(90deg, #ffd98a 0%, #ff9a5a 48%, #ff6fb5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.2em; }
.ico.fill { fill: currentColor; stroke: none; }

/* ---- Buttons: rectangular, spaced caps ---------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem; --py: .78rem; --px: 1.25rem; padding: var(--py) var(--px); max-width: 100%;
    border: 1px solid var(--line2); border-radius: 2px; background: #0d0d10; color: #fff; cursor: pointer; text-align: center;
    font: 700 .74rem/1 var(--body); letter-spacing: .15em; text-transform: uppercase;
    transition: background .2s, border-color .2s, transform .2s var(--ease), color .2s;
}
.btn:hover { border-color: var(--gold); background: #17171c; color: #fff; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.primary, .btn.gold { background: linear-gradient(180deg, #ffe0a0, #f2b53f); border-color: #f2b53f; color: #1a1100; }
.btn.primary:hover, .btn.gold:hover { background: linear-gradient(180deg, #fff0c4, #ffc553); color: #1a1100; }
.btn.danger { background: #3a0f17; border-color: var(--red); color: #ffb3bf; }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn.small { --py: .5rem; --px: .85rem; font-size: .68rem; }
.btn.large { --py: 1rem; --px: 1.7rem; font-size: .8rem; }
.btn.block { width: 100%; }
.btn .cost { display: inline-flex; align-items: center; gap: .35rem; margin: -.25rem -.5rem -.25rem .35rem; padding: .45rem .7rem; border-radius: 2px; background: rgba(0, 0, 0, .78); color: #fff; letter-spacing: .02em; font-size: .78rem; white-space: nowrap; }
.btn .cost .ico { color: var(--gold); } .btn .cost.gems .ico { color: var(--orange); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; pointer-events: none; }

/* ---- Forms ---------------------------------------------------------------- */
.field { display: block; margin: 0 0 1.1rem; border: 0; padding: 0; min-width: 0; }
.field > input, .field > select, .field > textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
.field > select { text-overflow: ellipsis; }
.field > span, .field > legend { display: block; font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .45rem; padding: 0; color: #cfcfd6; }
.hint { color: var(--muted); font-weight: 400; font-style: normal; text-transform: none; letter-spacing: 0; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
    width: 100%; background: #0a0a0c; border: 1px solid var(--line2); color: var(--text); border-radius: 2px;
    font: inherit; padding: .72rem .9rem; transition: border-color .2s, box-shadow .2s;
}
select { width: auto; cursor: pointer; }
.row input[type=text], .row input[type=search] { width: auto; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 181, 61, .18); }
textarea { resize: vertical; min-height: 5.5rem; }
.err { color: #ff8a9b; display: block; margin-top: .3rem; font-size: .85rem; }

/* ---- Layout shell ----------------------------------------------------------- */
.shell { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 1.4rem 1.4rem 4rem; }
.page { min-width: 0; }
.page > * + * { margin-top: 1.4rem; }
.foot { text-align: center; color: var(--muted); font-size: .78rem; letter-spacing: .04em; padding: 1.4rem 1rem 5.5rem; border-top: 1px solid var(--line); }

/* light entrance, opacity + transform only */
.page > * { animation: rise .45s var(--ease) both; }
.page > *:nth-child(2) { animation-delay: .05s; } .page > *:nth-child(3) { animation-delay: .1s; } .page > *:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
body.fx-lite *, body.fx-lite *::before, body.fx-lite *::after { animation: none !important; }
@media (max-width: 980px) { .shell { padding: 1rem .9rem 4rem; } }
