/* Player-facing site pages: the game's cinematic identity (Impact titles, blood red, darkened art of the town) on top of
   the shared components of app.css. The home page has its own stylesheet (website/css) and does not load this file. */

body.site-page {
  --bg: #070809;
  --surface: rgba(15, 17, 19, .9);
  --surface-2: rgba(22, 25, 28, .92);
  --surface-3: #22262a;
  --line: rgba(222, 226, 223, .11);
  --line-soft: rgba(222, 226, 223, .06);
  --ink: #ecece7;
  --muted: #a6a9a5;
  --dim: #73797a;
  --accent: #bb282c;
  --accent-strong: #e13d3d;
  --accent-soft: rgba(187, 40, 44, .16);
  --radius: 3px;
  --radius-sm: 2px;
  --radius-xs: 2px;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, .9);
  --focus: 0 0 0 2px rgba(225, 61, 61, .55);
  display: flex; flex-direction: column; background: var(--bg);
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; left: 12px; top: -60px; padding: 8px 14px; background: var(--accent); color: #fff; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------------------------------------ backdrop */
.site-backdrop {
  position: absolute; z-index: 0; inset: 0 0 auto; height: min(560px, 70vh); pointer-events: none;
  background-size: cover; background-position: center 35%; opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
}
.site-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 8, 9, .92) 0%, rgba(7, 8, 9, .35) 60%, rgba(7, 8, 9, .7) 100%); }

/* ------------------------------------------------------------------------------------------------ header */
.site-top { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s; }
.site-top.scrolled { background: rgba(7, 8, 9, .9); border-bottom-color: rgba(255, 255, 255, .08); backdrop-filter: blur(10px); }
.site-top-inner { display: flex; align-items: center; gap: 32px; width: min(100% - 48px, 1320px); min-height: 76px; margin: 0 auto; }
.site-brand { display: inline-flex; align-items: center; gap: 12px; flex: none; font: 400 21px/1 var(--font-display); letter-spacing: .03em; color: #fff; }
.site-brand b { font-weight: 400; color: var(--accent-strong); }
.site-menu { display: flex; align-items: center; gap: 28px; flex: 1; min-width: 0; }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); margin-right: auto; }
.site-nav a { position: relative; padding: 8px 0; font-size: 12px; font-weight: 700; letter-spacing: .13em; color: #c3c8c4; transition: color .2s; }
.site-nav a:hover, .site-nav a.active { color: #fff; }
.site-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent-strong); }
.site-account { display: flex; align-items: center; gap: 14px; }
.site-account form { margin: 0; }
.site-balance {
  padding: 7px 12px; border: 1px solid rgba(232, 184, 74, .4); background: rgba(232, 184, 74, .07); color: var(--gold);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.site-balance:hover { border-color: var(--gold); color: #f5cd6c; }
.site-user { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: #d9dcd8; font-size: 13px; font-weight: 600; }
.site-user:hover { color: #fff; }
.site-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 1px solid rgba(225, 61, 61, .5); color: var(--accent-strong); font-weight: 800; font-size: 13px; }
.site-user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-link-button { padding: 8px 2px; background: none; border: 0; font-size: 12px; font-weight: 700; letter-spacing: .13em; color: #c3c8c4; }
.site-link-button:hover, .site-link-button.active { color: #fff; }
.site-cta {
  padding: 11px 18px; border: 1px solid rgba(222, 66, 66, .75); background: rgba(124, 18, 21, .25); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .13em; white-space: nowrap; transition: background .2s, border-color .2s;
}
.site-cta:hover, .site-cta.active { background: var(--accent); border-color: var(--accent); }
.site-menu-button { display: none; }

/* ------------------------------------------------------------------------------------------------ page */
.site-page .panel-main { position: relative; z-index: 1; flex: 1; width: min(100% - 48px, 1320px); padding: clamp(28px, 5vw, 64px) 0 96px; }
.site-page .page-head { align-items: flex-end; margin-bottom: 32px; }
.site-page .page-head > div:first-child { display: grid; gap: 10px; }
.site-page .page-head h1 { font: 400 clamp(46px, 6.5vw, 92px)/.9 var(--font-display); letter-spacing: .005em; text-transform: uppercase; color: #f3f3ee; }
.site-page .page-head h1 span { color: var(--accent-strong); }
.site-page .page-head h1.page-name { text-transform: none; letter-spacing: .01em; }
.site-page .details { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.site-page .kicker { display: flex; align-items: center; gap: 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .2em; color: #c9cdc9; }
.site-page .kicker::before { content: ""; width: 34px; height: 2px; background: var(--accent-strong); }
.site-page .page-head > .badge, .site-page .page-head > .muted { margin-bottom: 6px; }

.site-page .card { backdrop-filter: blur(6px); }
.site-page .card-head h2 { font-size: 11.5px; letter-spacing: .16em; }
.site-page .stat { min-height: 120px; padding: 18px 20px; }
.site-page .stat > span { font-size: 11px; letter-spacing: .16em; }
.site-page .stat strong { font: 400 clamp(30px, 3vw, 42px)/1 var(--font-display); letter-spacing: .01em; }
.site-page th { font-size: 10.5px; letter-spacing: .14em; }
.site-page .badge { border-radius: 2px; letter-spacing: .1em; }
.site-page .tag { border-radius: 2px; }
.site-page .button-primary, .site-page .button-ghost, .site-page .button-danger, .site-page .toolbar button {
  min-height: 42px; padding: 11px 20px; font-size: 12px; letter-spacing: .14em;
}
.site-page .button-ghost { background: transparent; border-color: rgba(255, 255, 255, .22); }
.site-page .button-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .05); }
.site-page .panel-main input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .site-page .panel-main select { background: rgba(5, 6, 7, .75); min-height: 46px; font-size: 15px; }
.site-page .filters a { border-radius: 2px; letter-spacing: .1em; }
.site-page .flash { border-radius: 2px; }

/* ------------------------------------------------------------------------------------------------ auth (login, register, setup) */
.auth-split {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: min(640px, calc(100vh - 220px));
  margin: 0 auto; max-width: 1120px; border: 1px solid var(--line); background: rgba(10, 11, 13, .88); box-shadow: var(--shadow);
}
.auth-art { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 40px; background: #050607 center / cover no-repeat; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 6, 7, .95) 0%, rgba(5, 6, 7, .45) 55%, rgba(5, 6, 7, .2) 100%); }
.auth-art > div { position: relative; display: grid; gap: 14px; }
.auth-art strong { font: 400 clamp(38px, 4.4vw, 60px)/.92 var(--font-display); color: #f3f3ee; text-transform: uppercase; }
.auth-art strong em { font-style: normal; color: var(--accent-strong); }
.auth-art p { margin: 0; max-width: 40ch; color: #c9cdc9; font-size: 15px; }
.auth-art ul { display: grid; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: #b5b9b5; }
.auth-art li { display: flex; gap: 10px; }
.auth-art li::before { content: "—"; color: var(--accent-strong); }
.auth-split .auth-card { width: 100%; margin: 0; padding: clamp(28px, 4vw, 52px); border: 0; box-shadow: none; background: transparent; align-self: center; }
.site-page .auth-card h1 { font: 400 clamp(44px, 5vw, 64px)/.92 var(--font-display); text-transform: uppercase; margin: 10px 0 12px; }
.site-page .auth-card h1 span { color: var(--accent-strong); }
.site-page .auth-card .kicker { margin-bottom: 4px; }
.site-page .auth-card > .muted { font-size: 14.5px; line-height: 1.6; }
.site-page .auth-card .stack-form { gap: 18px; }
.site-page .auth-card .button-primary { width: 100%; min-height: 50px; margin-top: 6px; font-size: 13px; }
.site-page .stack-form label > span { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: #b9bdb9; }
.site-page .auth-card:not(.auth-split .auth-card) { background: rgba(10, 11, 13, .9); border: 1px solid var(--line); border-top: 2px solid var(--accent); }

/* ------------------------------------------------------------------------------------------------ footer */
.site-footer { position: relative; z-index: 1; border-top: 1px solid rgba(255, 255, 255, .08); background: #050607; }
.site-footer-inner {
  display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 18px 40px; align-items: center;
  width: min(100% - 48px, 1320px); margin: 0 auto; padding: 36px 0 30px;
}
.site-footer-logo { font: 400 28px/1 var(--font-display); letter-spacing: .03em; color: #f3f3ee; }
.site-footer-logo b { font-weight: 400; color: var(--accent-strong); }
.site-footer-brand p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.site-footer-brand strong { color: #e3e5e1; }
.site-footer-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: flex-end; }
.site-footer-nav a { font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: #a9ada9; }
.site-footer-nav a:hover { color: #fff; }
.site-footer-copy { grid-column: 1 / -1; margin: 6px 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 12px; color: var(--dim); }

/* ------------------------------------------------------------------------------------------------ narrow screens */
@media (max-width: 960px) {
  .site-top { background: rgba(7, 8, 9, .92); backdrop-filter: blur(10px); }
  .site-top-inner { width: min(100% - 32px, 1320px); min-height: 64px; gap: 12px; }
  .site-brand { font-size: 18px; }
  .site-menu-button {
    display: inline-grid; place-items: center; width: 42px; height: 42px; margin-left: auto; padding: 0; background: none;
    border: 1px solid rgba(255, 255, 255, .18);
  }
  .site-menu-button span[aria-hidden] { width: 18px; height: 2px; background: #fff; box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff; }
  .site-menu {
    position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px 16px 18px; background: rgba(7, 8, 9, .98); border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .site-menu-open .site-menu { display: flex; }
  .site-nav { flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
  .site-nav a { padding: 14px 0; font-size: 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .site-nav a.active::after { display: none; }
  .site-nav a.active { color: var(--accent-strong); }
  .site-account { flex-wrap: wrap; gap: 12px; padding-top: 16px; }
  .site-page .panel-main { width: min(100% - 32px, 1320px); }
  .auth-split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-art { min-height: 220px; padding: 28px 24px; }
  .site-footer-inner { grid-template-columns: minmax(0, 1fr); width: min(100% - 32px, 1320px); }
  .site-footer-nav { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .site-page .page-head h1 { font-size: clamp(40px, 12vw, 56px); }
  .auth-art ul { display: none; }
  .site-page .stat { min-height: 100px; padding: 14px; }
  .site-page .stat strong { font-size: 28px; }
  .site-page .details { grid-template-columns: 1fr 1fr; }
  .site-page .eco-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
}
