/* Wolf Grounds brand kit: wg-core.css
   THE SAME FILE ON EVERY WOLF GROUNDS SITE: the brand's components, drawn only from the tokens in
   wg-tokens.css and the game's theme. Master: Wolf Grounds API 1.0/brand-kit/css/. Edit it there,
   run `python brand-kit/sync.py`, and never edit a site's copy. Rules: brand-kit/BRAND.md.
   Taken from wolfgrounds.com's shared.css and site_header.php (the reference site), so a page
   built from these classes looks the same as PUBG's, in its own game's colour. */

/* ── Base ─────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
}
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--fg); background: var(--bg);
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: clip; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.wg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { max-width: var(--measure); margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }

/* ── Game tabs strip: one tab per game, the open game marked in its colour ───────
   Written by wgk_game_tabs() (wgk_brand.php), never by hand. Each tab carries its game's
   colour as --c (from the games list), so hovering a tab previews the game you're going to. */
.gtabs { background: var(--strip); border-bottom: 1px solid var(--border); }
.gtabs-in { display: flex; align-items: flex-end; gap: 2px; height: 38px; max-width: var(--measure); margin: 0 auto;
  padding: 6px max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }
@media (min-width: 1300px) { .gtabs-in { max-width: 1260px; } }
.gtabs-l { align-self: center; padding-bottom: 4px; margin-right: 10px; font-size: .68rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.gtab { display: flex; align-items: center; gap: 7px; height: 31px; padding: 0 14px; border: 1px solid transparent; border-bottom: 0;
  border-radius: 9px 9px 0 0; font-size: .78rem; font-weight: 800; letter-spacing: .02em; color: var(--muted); text-decoration: none;
  white-space: nowrap; transition: color .15s; }
.gtab img { display: block; width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.gtab:hover { color: var(--c, var(--fg)); background: rgba(255,255,255,.03); }
.gtab[aria-current] { height: 32px; margin-bottom: -1px; background: var(--bg); color: var(--fg); border-color: var(--border);
  box-shadow: inset 0 2px 0 var(--brand); }
.gtab[aria-current]:hover { color: var(--fg); background: var(--bg); }

/* ── Site header ─────────────────────────────────────────────────────────────────
   Logo lockup (wolf shield, "Wolf Grounds", the game name on a chip in the brand colour), the
   menu, then the account area on the right. Below 720px the menu folds behind the burger. */
.wg-header { position: sticky; top: 0; z-index: 300; background: rgba(11,15,20,.82); backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border); }
.wg-header-in { display: flex; align-items: center; gap: 8px; max-width: var(--measure); margin: 0 auto;
  padding: 10px max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left)); }
@media (min-width: 1300px) { .wg-header-in { max-width: 1260px; } }
.wg-logo { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: 8px; font-weight: 800; font-size: .96rem;
  color: var(--fg); text-decoration: none; white-space: nowrap; }
.wg-logo img { display: block; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--inset); flex-shrink: 0; }
.wg-logo .lt small { font: inherit; color: inherit; }
.wg-logo .lt b { display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 2px 6px; border-radius: 4px; background: var(--brand);
  color: var(--chip-ink); font-size: .66rem; font-weight: 800; letter-spacing: .08em; line-height: 1.35; text-transform: uppercase; }
.wg-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.wg-nav a { color: var(--muted); padding: .32rem .6rem; border-radius: var(--radius-xs); font-size: .82rem; font-weight: 600; white-space: nowrap;
  text-decoration: none; transition: color .15s, background .15s; }
.wg-nav a:hover, .wg-nav a[aria-current] { color: var(--fg); background: var(--glass); }
.wg-header-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.wg-burger { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); flex-shrink: 0; cursor: pointer; }
.wg-burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--fg); }
.wg-avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; overflow: hidden;
  border-radius: 8px; border: 1px solid rgba(var(--brand-rgb),.5); background: var(--inset); color: var(--fg2); font-weight: 800; font-size: .75rem; text-decoration: none; }
.wg-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ── Buttons: primary glows in the brand colour; ghost stays flat ─────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .75rem 1.4rem; border: none;
  border-radius: var(--radius-sm); font-weight: 700; font-size: .9rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: filter .15s, transform .15s, box-shadow .15s, background .15s, color .15s; }
.btn:active { transform: translateY(0) !important; }
.btn-primary { background: var(--brand-fill); color: var(--on-brand); box-shadow: 0 4px 20px var(--brand-glow); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 8px 32px var(--brand-glow); color: var(--on-brand); }
.btn-ghost { background: var(--glass); color: var(--fg2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--glass-hover); color: var(--fg); }
.btn-discord { background: var(--discord); color: #fff; box-shadow: 0 4px 20px rgba(88,101,242,.3); }
.btn-discord:hover { filter: brightness(1.1); transform: translateY(-2px); color: #fff; }
.btn-twitch { background: var(--twitch); color: #fff; box-shadow: 0 4px 20px rgba(145,70,255,.3); }
.btn-twitch:hover { filter: brightness(1.1); transform: translateY(-2px); color: #fff; }
.btn-sm { padding: .5rem 1rem; font-size: .84rem; }

/* ── Glass, content frame and panels ─────────────────────────────────────────────
   The page body is one glass frame holding section panels, each opened by a small-caps heading
   row whose right side takes a link or a count. .wg-stack spaces a panel's children 12px apart. */
.glass { background-color: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); }
.wg-frame { display: flex; flex-direction: column; gap: 14px; padding: 22px; background-color: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius); }
.wg-panel { min-width: 0; padding: 18px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.wg-frame[hidden], .wg-panel[hidden] { display: none; }
.wg-panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.wg-panel-h h2, .wg-panel-t { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .6875rem; font-weight: 800;
  letter-spacing: .1em; line-height: 1.4; text-transform: uppercase; color: var(--fg2); }
.wg-panel-h small { color: var(--muted); font-size: .78rem; }
.wg-panel-h a { font-size: .8rem; font-weight: 600; }
.wg-stack { display: flex; flex-direction: column; gap: 12px; }
.wg-stack > .wg-panel-h { margin-bottom: 0; }
@media (max-width: 640px) { .wg-frame { padding: 14px; } .wg-panel { padding: 12px; } }

/* ── Labels and stat pills: a heavy value over an uppercase micro-label ───────── */
.wg-label { font-size: .7rem; font-weight: 700; letter-spacing: .07em; line-height: 1.2; text-transform: uppercase; color: var(--muted); }
.stat-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
.stat-pill { min-width: 0; padding: 14px 16px; text-align: center; background: var(--pill-bg, var(--inset));
  border: 1px solid var(--pill-border, var(--inset-border)); border-radius: .7rem; }
.stat-pill .label { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stat-pill .val { margin-top: .25rem; font-size: 1.45rem; font-weight: 800; line-height: 1.15; color: var(--fg); font-variant-numeric: tabular-nums; }
.stat-pill .pct { margin-top: .2rem; font-size: .6875rem; font-weight: 700; color: var(--muted); }
.stat-pill--brand { border-color: rgba(var(--brand-rgb),.35); }
.stat-pill--brand .val { color: var(--brand); }
.stat-pill--trophy { border-color: rgba(242,169,0,.45); background: rgba(242,169,0,.07); }
.stat-pill--trophy .val, .stat-pill--trophy .label { color: var(--gold); }
@media (max-width: 720px) { .stat-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-pill .val { font-size: 1.2rem; } }

/* ── First place: gold AND the crown, on every site ──────────────────────────────
   Gold is close to some games' brand colour (Call of Duty), so the meaning never rides on colour
   alone. Add .wg-first to anything that marks first place; the crown comes with it. */
.wg-first { color: var(--gold); }
.wg-first::before { content: ""; display: inline-block; width: .85em; height: .85em; margin-right: .3em; vertical-align: -.05em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 7l5 4.5L12 4l5 7.5L22 7l-2.4 13H4.4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 7l5 4.5L12 4l5 7.5L22 7l-2.4 13H4.4z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ── Page header: the glass card every section page opens with ───────────────── */
.pagehead { max-width: var(--measure); margin: 0 auto; padding: 28px max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }
.pagehead-in { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); grid-template-areas: "main slot" "ro slot"; align-items: center;
  column-gap: 28px; padding: 28px; border: 1px solid var(--border-brand); border-radius: 16px;
  background: linear-gradient(120deg, rgba(var(--brand-rgb),.12), rgba(var(--brand-rgb),.02) 60%); }
.pagehead--solo .pagehead-in { grid-template-columns: minmax(0,1fr); grid-template-areas: "main" "ro"; }
.pagehead-main { grid-area: main; min-width: 0; }
.pagehead-label { margin: 0 0 8px; font-size: .7rem; font-weight: 700; letter-spacing: .07em; line-height: 1; text-transform: uppercase; color: var(--brand); }
.pagehead-title { margin: 0 0 6px; font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; color: var(--fg); text-wrap: balance; }
.pagehead-sub { margin: 0; max-width: 62ch; font-size: .95rem; line-height: 1.7; color: var(--muted); }
.pagehead-slot { grid-area: slot; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 0; }
.pagehead-readouts { grid-area: ro; display: flex; flex-wrap: wrap; gap: 6px 0; margin: 16px 0 0; }
.pagehead-ro { display: flex; flex-direction: column-reverse; gap: 4px; padding: 0 18px; border-left: 1px solid var(--border); }
.pagehead-ro:first-child { padding-left: 0; border-left: 0; }
.pagehead-ro dt { font-size: .7rem; font-weight: 700; letter-spacing: .07em; line-height: 1; text-transform: uppercase; color: var(--muted); }
.pagehead-ro dd { display: flex; align-items: center; gap: 6px; min-height: 1.9rem; margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .pagehead { padding: 18px max(var(--gutter-phone), env(safe-area-inset-right)) 0 max(var(--gutter-phone), env(safe-area-inset-left)); }
  .pagehead-in, .pagehead--solo .pagehead-in { grid-template-columns: minmax(0,1fr); grid-template-areas: "main" "slot" "ro"; padding: 22px 16px; text-align: center; }
  .pagehead-sub { margin-inline: auto; }
  .pagehead-slot { align-items: stretch; margin-top: 16px; text-align: left; }
  .pagehead-readouts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .pagehead-ro, .pagehead-ro:first-child { align-items: center; padding: 8px; border: 0; border-radius: 10px; background: var(--glass); }
  .pagehead-ro dd { justify-content: center; }
}

/* ── Hero art: the game's picture slot and faint pattern ─────────────────────────
   .wg-patterned lays the theme's pattern over a band. .wg-pic is the picture slot: set
   --wg-pic: url(...) on it (or leave it empty and the pattern shows). */
.wg-patterned { background-image: var(--wg-pattern); background-size: var(--wg-pattern-size); }
.wg-pic { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); border: 1px solid rgba(var(--brand-rgb),.3);
  background-color: var(--bg2); background-image: var(--wg-pic, var(--wg-pattern)); background-size: var(--wg-pic-size, var(--wg-pattern-size));
  background-position: center; }

/* ── Call-to-action band, at the foot of a section page ──────────────────────── */
.wg-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 20px;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); }
.wg-cta-t { font-size: 1rem; font-weight: 800; }
.wg-cta-s { margin: .3rem 0 0; font-size: .88rem; color: var(--muted); }
.wg-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Tier badges: the same four tiers, colours and glow on every site ─────────── */
@keyframes hero-badge-in { from { opacity: 0; transform: translateY(-8px) scale(.85); } to { opacity: 1; transform: translateY(0) scale(1); } }
.hero-badge { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem 1rem; border-radius: 999px; font-size: .76rem; font-weight: 900;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; cursor: default; animation: hero-badge-in .35s cubic-bezier(.34,1.56,.64,1) both; }
.hero-badge--alpha { background: linear-gradient(135deg,#c8820a,#f5c518 45%,#e6a800); border: 1px solid rgba(255,220,80,.7); color: #1a1000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 14px 3px rgba(255,205,0,.45), 0 0 30px 6px rgba(255,165,0,.25), 0 2px 8px rgba(0,0,0,.5); }
.hero-badge--packleader { background: linear-gradient(135deg,#5b21b6,#8b5cf6 45%,#7c3aed); border: 1px solid rgba(196,181,253,.5); color: #fff;
  box-shadow: 0 0 14px 3px rgba(139,92,246,.5), 0 0 30px 6px rgba(109,40,217,.25), 0 2px 8px rgba(0,0,0,.5); }
.hero-badge--packmate { background: linear-gradient(135deg,#0e6ea8,#32a7eb 45%,#1d8fd1); border: 1px solid rgba(147,214,255,.55); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 0 12px 3px rgba(50,167,235,.42), 0 0 26px 5px rgba(20,120,180,.22), 0 2px 8px rgba(0,0,0,.5); }
.hero-badge--recruit { background: linear-gradient(135deg,#047857,#34d399 45%,#10b981); border: 1px solid rgba(167,243,208,.5); color: #04241a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 0 11px 3px rgba(52,211,153,.38), 0 0 24px 5px rgba(5,150,105,.2), 0 2px 8px rgba(0,0,0,.5); }

/* ── Placeholders: grey pulsing stand-ins in the real content's shape ────────── */
.wg-sk { color: transparent !important; background: rgba(255,255,255,.07) !important; border-color: transparent !important; box-shadow: none !important;
  border-radius: .4rem; animation: wg-sk-pulse 1.4s ease-in-out infinite; pointer-events: none; user-select: none; }
.wg-sk * { visibility: hidden; }
@keyframes wg-sk-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* ── Footer: brand block, link columns, the games row, the legal line ─────────── */
.wg-footer { margin-top: 30px; padding: 40px 0 calc(26px + env(safe-area-inset-bottom, 0px)); background: var(--bg2); border-top: 1px solid var(--border);
  color: var(--muted); font-size: .87rem; }
.wg-footer-grid { display: grid; grid-template-columns: minmax(0,1.4fr); grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 28px; }   /* the brand block, then one column per link group, however many */
.wg-footer-brand { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 800; color: var(--fg); text-decoration: none; }
.wg-footer-brand img { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border); background: var(--inset); }
.wg-footer-tagline { margin: 10px 0 0; max-width: 46ch; font-size: .86rem; line-height: 1.55; color: var(--muted); }
.wg-footer h2 { margin: 0 0 10px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fg2); }
.wg-footer-links { display: flex; flex-direction: column; gap: 8px; }
.wg-footer-links a { color: var(--muted); overflow-wrap: anywhere; transition: color .15s; }
.wg-footer-links a:hover { color: var(--fg); }
.wg-footer-games { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.wg-footer-games a { display: inline-flex; align-items: center; gap: 7px; color: var(--fg2); font-weight: 600; }
.wg-footer-games a::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--c, var(--brand)); }
.wg-footer-games a:hover { color: var(--fg); }
.wg-footer-games a[aria-current] { color: var(--fg); }
.wg-footer-legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: .75rem; color: var(--muted); }

/* ── Phones (one breakpoint: 720px) ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .container { padding-left: max(var(--gutter-phone), env(safe-area-inset-left)); padding-right: max(var(--gutter-phone), env(safe-area-inset-right)); }
  .gtabs-in { height: 36px; padding: 5px max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); }
  .gtabs-l { display: none; }
  .gtab { flex: 1 1 auto; justify-content: center; padding: 0 6px; font-size: .74rem; }
  .gtab img { display: none; }
  .wg-header { position: relative; }
  .wg-header-in { flex-wrap: wrap; padding: 8px max(var(--gutter-phone), env(safe-area-inset-right)) 8px max(var(--gutter-phone), env(safe-area-inset-left)); }
  .wg-logo { gap: 8px; margin-right: 0; }
  .wg-logo .lt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.1; }
  .wg-logo .lt small { font-size: .7rem; font-weight: 700; color: var(--muted); }
  .wg-logo .lt b { margin-left: 0; vertical-align: 0; }
  .wg-burger { display: flex; }
  .wg-nav { display: none; order: 9; flex: 1 1 100%; flex-direction: column; align-items: stretch; padding-top: 6px; }
  .wg-nav.open { display: flex; }
  .wg-nav a { display: flex; align-items: center; min-height: 44px; font-size: .95rem; }
  .wg-footer-grid { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; gap: 22px; }
  .wg-footer-links a { display: flex; align-items: center; min-height: 40px; }
}

/* ── Reduced motion, everywhere: every animation runs once, instantly, and holds its
   last frame (not animation:none, which would leave fade-ins invisible). ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
}
