@charset "UTF-8";
/* =====================================================================
   CUTTING FREE — clan site design system
   ---------------------------------------------------------------------
   Hand-written, no build step required. Sections:
     01  Tokens
     02  Reset & base
     03  Typography
     04  Layout primitives
     05  Panels & surfaces
     06  Buttons
     07  Header & navigation
     08  Hero & atmosphere
     09  Stat tiles & counters
     10  Cards (event, news, member, champion)
     11  Leaderboards & tables
     12  Podium / trophies
     13  Timeline & milestones
     14  Gallery & lightbox
     15  Forms
     16  Discord
     17  Footer
     18  Utilities & motion
     19  Admin
     20  Responsive
   ===================================================================== */

/* ── 01  TOKENS ───────────────────────────────────────────────────── */
:root {
  --ink-950: #08080a;
  --ink-950-rgb: 8, 8, 10;
  --ink-900: #0e0e11;
  --ink-850: #121212;
  --ink-800: #17171a;
  --ink-750: #1a1a1e;
  --ink-700: #212126;
  --ink-600: #2b2b31;
  --ink-500: #3a3a42;

  /* The -rgb triplets let glows and translucent borders follow the brand
     colours chosen in Admin → Branding. Keep them in step with the hexes. */
  --ember:        #ff7a00;
  --ember-rgb:    255, 122, 0;
  --ember-bright: #ff9a3c;
  --ember-deep:   #cc5f00;
  --blood:        #b71c1c;
  --blood-rgb:    183, 28, 28;
  --blood-bright: #e03131;

  --gold:        #f5c242;
  --gold-rgb:    245, 194, 66;
  --gold-bright: #ffd97a;
  --gold-deep:   #a97c1b;
  --silver:      #cdd3da;
  --silver-deep: #7d838b;
  --bronze:      #c9803c;
  --bronze-deep: #8a4f22;

  --text:   #ece9e4;
  --text-2: #b8b3ab;
  --muted:  #8b867e;
  --faint:  #5f5b55;

  /* Text on a solid brand-coloured button. Recomputed per palette so a
     dark primary colour gets light text instead of vanishing. */
  --brand-fg:      #180c00;
  --brand-fg-gold: #201400;

  --line:        rgba(255, 255, 255, .07);
  --line-strong: rgba(var(--ember-rgb), .22);
  --line-gold:   rgba(var(--gold-rgb), .3);

  --glow-ember: 0 0 0 1px rgba(var(--ember-rgb),.35), 0 0 24px -4px rgba(var(--ember-rgb),.55);
  --glow-gold:  0 0 0 1px rgba(var(--gold-rgb),.4), 0 0 28px -6px rgba(var(--gold-rgb),.5);
  --shadow-lg:  0 24px 60px -20px rgba(0,0,0,.85);
  --shadow-md:  0 12px 32px -14px rgba(0,0,0,.8);

  --font-display: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius:    4px;
  --radius-lg: 6px;
  --wrap: 1220px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Seasonal themes — set from Admin → Settings */
:root[data-theme='halloween'] { --ember: #ff6a00; --ember-rgb: 255,106,0;  --gold: #ffb347; --gold-rgb: 255,179,71;  --blood: #6b1fa8; --blood-rgb: 107,31,168; }
:root[data-theme='winter']    { --ember: #4aa8ff; --ember-rgb: 74,168,255;  --gold: #cfe9ff; --gold-rgb: 207,233,255; --blood: #1b4f9c; --blood-rgb: 27,79,156; }
:root[data-theme='summer']    { --ember: #ffb02e; --ember-rgb: 255,176,46;  --gold: #ffe066; --gold-rgb: 255,224,102; --blood: #d94f04; --blood-rgb: 217,79,4; }

/* ── 02  RESET & BASE ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--ink-850);
  background-image:
    radial-gradient(900px 520px at 12% -8%, rgba(var(--ember-rgb),.10), transparent 60%),
    radial-gradient(760px 460px at 88% 4%, rgba(var(--blood-rgb),.11), transparent 62%),
    linear-gradient(180deg, #0f0f12 0%, #121212 22%, #0e0e11 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Faint woven texture so large dark areas aren't flat */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 1px, transparent 1px 4px);
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ember-bright); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--gold-bright); }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

::selection { background: rgba(var(--ember-rgb),.32); color: #fff; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--ink-600) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(0,0,0,.3); }
*::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--ink-600), var(--ink-700)); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--ember-deep), var(--ink-600)); background-clip: padding-box; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ember); color: #120a00; padding: .7rem 1.2rem; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ── 03  TYPOGRAPHY ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: .01em;
  margin: 0 0 .6em;
  color: #fff;
}
h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1.1em; }

.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: .92;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
  background: linear-gradient(178deg, #fff 4%, var(--gold-bright) 34%, var(--ember) 68%, var(--blood) 104%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(var(--ember-rgb),.28);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 .9rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.eyebrow.is-centred { justify-content: center; }
.eyebrow.is-centred::after, .eyebrow.is-centred::before {
  content: ''; width: 60px; flex: 0 0 60px; height: 1px;
}
.eyebrow.is-centred::before { background: linear-gradient(270deg, var(--line-strong), transparent); }

.lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--text-2); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.tiny  { font-size: .74rem; }
.mono  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.prose { color: var(--text-2); }
.prose h2, .prose h3 { color: #fff; margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--ember); }
.prose strong { color: var(--text); }
.prose code {
  font-family: var(--font-mono); font-size: .88em;
  background: rgba(var(--ember-rgb),.1); border: 1px solid var(--line-strong);
  padding: .1em .4em; border-radius: 3px; color: var(--ember-bright);
}
.prose blockquote {
  margin: 1.4em 0; padding: .2em 0 .2em 1.2rem;
  border-left: 2px solid var(--ember); color: var(--text-2); font-style: italic;
}
.prose img { border: 1px solid var(--line); border-radius: var(--radius); margin: 1.4em 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--ember-rgb),.4); }

/* ── 04  LAYOUT ───────────────────────────────────────────────────── */
.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - (var(--gutter) * 2), 860px); margin-inline: auto; }

main { position: relative; z-index: 1; }

.section { padding: clamp(3.2rem, 8vw, 6rem) 0; position: relative; }
.section--tight { padding: clamp(2.2rem, 5vw, 3.4rem) 0; }
.section--edge { border-top: 1px solid var(--line); }

.section-head { margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.section-head--split {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.section-head h2 { margin-bottom: .3rem; }
.section-head p  { margin: 0; color: var(--muted); max-width: 58ch; }
.section-head--centred { text-align: center; }
.section-head--centred p { margin-inline: auto; }

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.6rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .grid-sidebar { grid-template-columns: minmax(0, 1fr) 330px; gap: 2.4rem; } }

.stack   { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm{ display: flex; flex-direction: column; gap: .5rem; }
.row     { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.row-tight { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.push    { margin-left: auto; }

/* ── 05  PANELS & SURFACES ────────────────────────────────────────── */
.panel {
  position: relative;
  background:
    linear-gradient(158deg, rgba(255,255,255,.035), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, var(--ink-800), var(--ink-900));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.05);
  padding: clamp(1.15rem, 2.4vw, 1.7rem);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .3s var(--ease);
}

/* Corner brackets — the OSRS interface tell */
.panel::before, .panel::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--line-strong);
  opacity: .8;
  pointer-events: none;
  transition: border-color .3s var(--ease), opacity .3s var(--ease);
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.panel--glow:hover,
.panel--interactive:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 0 34px -14px rgba(var(--ember-rgb),.7), inset 0 1px 0 rgba(255,255,255,.07);
}
.panel--interactive:hover::before,
.panel--interactive:hover::after { border-color: var(--gold); opacity: 1; }

.panel--flush { padding: 0; overflow: hidden; }
.panel--gold  { border-color: var(--line-gold); }
.panel--gold::before, .panel--gold::after { border-color: var(--gold); }

.panel-head {
  display: flex; align-items: center; gap: .7rem;
  padding: .85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(var(--ember-rgb),.06), transparent);
}
.panel-head h3 { margin: 0; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; }
.panel-body { padding: clamp(1rem, 2.2vw, 1.5rem); }

.divider-rune {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong) 25%, var(--line-gold) 50%, var(--line-strong) 75%, transparent);
}

/* ── 06  BUTTONS ──────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--ink-700);
  --btn-fg: var(--text);
  --btn-line: var(--line);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .78rem 1.55rem;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-line);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .28s var(--ease),
              border-color .25s var(--ease), color .2s var(--ease), background .25s var(--ease);
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: linear-gradient(180deg, var(--ember-bright), var(--ember) 55%, var(--ember-deep));
  --btn-fg: var(--brand-fg);
  --btn-line: rgba(255,180,90,.6);
  box-shadow: 0 8px 26px -10px rgba(var(--ember-rgb),.9), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn--primary:hover { box-shadow: 0 14px 34px -10px rgba(var(--ember-rgb),1), inset 0 1px 0 rgba(255,255,255,.45); color: var(--brand-fg); }

.btn--blood {
  --btn-bg: linear-gradient(180deg, #d32626, var(--blood) 60%, #7d1010);
  --btn-fg: #fff;
  --btn-line: rgba(255,120,120,.4);
  box-shadow: 0 8px 26px -12px rgba(var(--blood-rgb),.95);
}
.btn--blood:hover { color: #fff; }

/* Used for the "Record winners" action — gold reads as a trophy without
   competing with the primary button next to it. */
.btn--gold {
  --btn-bg: linear-gradient(180deg, var(--gold-bright), var(--gold) 60%, var(--gold-deep));
  --btn-fg: var(--brand-fg-gold);
  --btn-line: var(--gold-bright);
  box-shadow: 0 8px 26px -12px rgba(var(--gold-rgb),.9);
}
.btn--gold:hover { color: var(--brand-fg-gold); box-shadow: 0 12px 30px -12px rgba(var(--gold-rgb),1); }

.btn--ghost {
  --btn-bg: rgba(255,255,255,.02);
  --btn-line: var(--line-strong);
  --btn-fg: var(--text);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { --btn-line: var(--gold); color: var(--gold-bright); box-shadow: 0 0 26px -10px rgba(var(--gold-rgb),.8); }

.btn--discord {
  --btn-bg: linear-gradient(180deg, #5d6ef0, #4752c4);
  --btn-fg: #fff;
  --btn-line: rgba(160,175,255,.45);
  box-shadow: 0 8px 26px -12px rgba(88,101,242,.95);
}
.btn--discord:hover { color: #fff; }

.btn--sm  { padding: .5rem 1rem; font-size: .72rem; letter-spacing: .1em; }
.btn--xs  { padding: .34rem .7rem; font-size: .66rem; letter-spacing: .08em; }
.btn--full{ width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-display); font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ember);
}
.link-arrow svg { transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* Chip / tag / filter */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .68rem;
  font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-2);
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: all .2s var(--ease);
}
a.chip:hover, .chip--active { color: var(--ember-bright); border-color: var(--line-strong); background: rgba(var(--ember-rgb),.1); }
.chip--gold { color: var(--gold); border-color: var(--line-gold); background: rgba(var(--gold-rgb),.08); }
.chip--blood{ color: #ff8b8b; border-color: rgba(var(--blood-rgb),.4); background: rgba(var(--blood-rgb),.12); }
.chip--live { color: #6ee7a8; border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.1); }

.chip-row { display: flex; gap: .5rem; flex-wrap: wrap; }

.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.7);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(52,211,153,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

/* ── 07  HEADER & NAV ─────────────────────────────────────────────── */
.announce {
  position: relative; z-index: 60;
  background: linear-gradient(90deg, rgba(var(--blood-rgb),.35), rgba(var(--ember-rgb),.28), rgba(var(--blood-rgb),.35));
  border-bottom: 1px solid var(--line-strong);
  font-size: .78rem; text-align: center;
  padding: .5rem var(--gutter);
  color: #ffe8cf;
}
.announce a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
}
.site-header.is-stuck {
  background: rgba(10,10,12,.86);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -18px #000;
}
.header-inner { display: flex; align-items: center; gap: 1.2rem; padding: .85rem 0; }

.brand { display: flex; align-items: center; gap: .8rem; flex-shrink: 0; }
.brand__mark { width: 44px; height: 44px; filter: drop-shadow(0 0 12px rgba(var(--ember-rgb),.55)); transition: transform .4s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.06); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display); font-size: 1.12rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: #fff;
}
.brand__sub { font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ember); margin-top: .28rem; }

.nav { display: flex; align-items: center; gap: .1rem; margin-left: auto; }
.nav a {
  position: relative;
  padding: .55rem .8rem;
  font-family: var(--font-display);
  font-size: .78rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-2);
  border-radius: var(--radius);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 50%; bottom: .28rem;
  width: 0; height: 2px; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--ember), var(--gold));
  box-shadow: 0 0 10px rgba(var(--ember-rgb),.8);
  transition: width .28s var(--ease);
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav a:hover::after, .nav a.is-active::after { width: calc(100% - 1.6rem); }
.nav a.is-active { color: var(--gold-bright); }

.header-cta { display: flex; align-items: center; gap: .6rem; margin-left: .6rem; }

/* The in-nav Discord button is for the mobile drawer only. */
.nav > .btn { display: none; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ember); position: relative; transition: .3s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ember); transition: .3s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-open span::after  { top: 0; transform: rotate(-45deg); }

/* ── 08  HERO & ATMOSPHERE ────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex; align-items: center;
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(68% 62% at 50% 42%,
      transparent 30%,
      rgba(var(--ink-950-rgb), .45) 72%,
      rgba(var(--ink-950-rgb), 0) 100%);
}
.hero__glyphs {
  position: absolute; inset: 0; z-index: -3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23ff7a00' stroke-opacity='.07' stroke-width='1'%3E%3Cpath d='M20 20h20v20H20zM80 60l12 12-12 12-12-12z'/%3E%3Ccircle cx='95' cy='22' r='9'/%3E%3Cpath d='M18 82h24M30 70v24'/%3E%3C/g%3E%3C/svg%3E");
  opacity: .75;
  animation: drift 90s linear infinite;
}
@keyframes drift { to { background-position: 480px 360px; } }

#embers {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  /* A canvas is a replaced element: `inset: 0` alone leaves it at its
     default 300x150. Without these it draws in the top-left corner. */
  display: block; width: 100%; height: 100%;
}

.hero__content { position: relative; text-align: center; }
.hero__crest { width: clamp(96px, 15vw, 148px); margin: 0 auto 1.4rem; filter: drop-shadow(0 0 30px rgba(var(--ember-rgb),.6)); animation: crest-float 7s ease-in-out infinite; }
@keyframes crest-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero__motto {
  font-family: var(--font-display);
  font-size: clamp(.82rem, 1.9vw, 1.05rem);
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold);
  margin: 1.3rem 0 .5rem;
}
.hero__blurb { max-width: 60ch; margin: 1.1rem auto 2.1rem; color: var(--text-2); font-size: clamp(1rem, 1.7vw, 1.13rem); }
.hero__actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero__meta {
  display: flex; gap: clamp(1rem, 3vw, 2.4rem); justify-content: center; flex-wrap: wrap;
  margin-top: 2.6rem; padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.hero__meta div { text-align: center; }
.hero__meta dt { font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.hero__meta dd { margin: .3rem 0 0; font-family: var(--font-display); font-size: 1.1rem; color: var(--gold-bright); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: var(--faint);
}
.scroll-cue i {
  display: block; width: 1px; height: 34px;
  background: linear-gradient(180deg, var(--ember), transparent);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { 0%,100% { opacity: .25; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ── 09  STAT TILES & COUNTERS ────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat {
  position: relative;
  padding: clamp(1.2rem, 2.6vw, 1.8rem) 1.2rem;
  background: linear-gradient(180deg, var(--ink-800), var(--ink-900));
  text-align: center;
  transition: background .3s var(--ease);
  overflow: hidden;
}
.stat::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  opacity: 0; transition: opacity .3s var(--ease);
}
.stat:hover { background: linear-gradient(180deg, #1d1a17, var(--ink-900)); }
.stat:hover::after { opacity: 1; }
.stat__icon { width: 26px; height: 26px; margin: 0 auto .7rem; color: var(--ember); }
.stat__value {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.35rem); line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px rgba(var(--ember-rgb),.35);
}
.stat__value small { font-size: .5em; color: var(--gold); margin-left: .1em; }
.stat__label { margin-top: .55rem; font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.stat__hint  { margin-top: .3rem; font-size: .7rem; color: var(--faint); }

/* ── 10  CARDS ────────────────────────────────────────────────────── */
.card-media {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(140deg, var(--ink-700), var(--ink-900));
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; }
.panel--interactive:hover .card-media img { transform: scale(1.06); filter: brightness(1.08); }
.card-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,10,12,.9));
}
/* Generated banner for events with no artwork of their own */
.card-media__gen {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 150% at 22% -10%, hsl(var(--h, 28) 62% 24%), transparent 62%),
    radial-gradient(90% 120% at 88% 110%, hsl(var(--h, 28) 55% 18%), transparent 58%),
    linear-gradient(180deg, #16161a, #0b0b0e);
}
.card-media__gen::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 2px, transparent 2px 9px);
  opacity: .7;
}
.card-media__glyph {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 700;
  letter-spacing: .08em;
  color: hsl(var(--h, 28) 90% 72% / .3);
  text-shadow: 0 0 40px hsl(var(--h, 28) 90% 60% / .35);
  transform: translateY(6%);
}

.card-media__badges { position: absolute; top: .8rem; left: .8rem; z-index: 2; display: flex; gap: .4rem; flex-wrap: wrap; }
.card-media__title { position: absolute; left: 1rem; right: 1rem; bottom: .85rem; z-index: 2; margin: 0; font-size: 1.15rem; }

.event-card { display: flex; flex-direction: column; height: 100%; }
.event-card .panel-body { flex: 1; display: flex; flex-direction: column; gap: .8rem; }
.event-card__dates { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: .45rem; }
.event-card__excerpt { color: var(--text-2); font-size: .92rem; margin: 0; }
.event-card__foot { margin-top: auto; padding-top: .5rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }

.progress {
  position: relative; height: 6px; border-radius: 100px; overflow: hidden;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
}
.progress__fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--ember-deep), var(--ember) 55%, var(--gold));
  box-shadow: 0 0 14px rgba(var(--ember-rgb),.7);
  border-radius: 100px;
  width: 0;
  transition: width 1.2s var(--ease);
}
.progress--gold .progress__fill { background: linear-gradient(90deg, var(--gold-deep), var(--gold) 60%, var(--gold-bright)); box-shadow: 0 0 14px rgba(var(--gold-rgb),.6); }
.progress--slim { height: 4px; }

.countdown { display: flex; gap: .5rem; }
.countdown div {
  min-width: 56px; padding: .5rem .4rem; text-align: center;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: var(--radius);
}
.countdown b { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* Member card */
.member-card { display: flex; align-items: center; gap: .9rem; }
.member-card__body { min-width: 0; flex: 1; }
.member-card__name { font-family: var(--font-display); font-size: 1rem; color: #fff; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-card__rank { font-size: .72rem; color: var(--muted); }

.avatar {
  position: relative; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: var(--radius);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: .92rem; font-weight: 700; color: #fff;
  background: linear-gradient(145deg, hsl(var(--h, 28) 55% 26%), hsl(var(--h, 28) 60% 12%));
  border: 1px solid hsl(var(--h, 28) 60% 40% / .5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 84px; height: 84px; font-size: 1.6rem; border-radius: var(--radius-lg); }
.avatar--xl { width: 120px; height: 120px; font-size: 2.4rem; border-radius: var(--radius-lg); }
.avatar--sm { width: 34px; height: 34px; font-size: .72rem; }

/* Clan rank badge */
.rank-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .18rem .5rem .18rem .35rem;
  font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.rank-badge svg { width: 12px; height: 12px; }
.rank-owner      { color: var(--gold-bright); }
.rank-leadership { color: var(--ember-bright); }
.rank-staff      { color: #ff8b8b; }
.rank-veteran    { color: #9fb4ff; }
.rank-member     { color: var(--text-2); }
.rank-recruit    { color: var(--faint); }

/* Metric tile (skill / boss icon substitute) */
.metric-tile {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: var(--radius);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: .66rem; font-weight: 700; letter-spacing: .02em;
  color: hsl(var(--h, 28) 90% 78%);
  background: linear-gradient(150deg, hsl(var(--h, 28) 60% 20%), hsl(var(--h, 28) 55% 9%));
  border: 1px solid hsl(var(--h, 28) 70% 45% / .45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.metric-tile--sm { width: 28px; height: 28px; font-size: .56rem; }
.metric-tile--lg { width: 52px; height: 52px; font-size: .86rem; }

/* News card */
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card__meta { display: flex; gap: .6rem; align-items: center; font-size: .72rem; color: var(--muted); margin-bottom: .5rem; }
.news-card h3 { font-size: 1.12rem; margin-bottom: .5rem; transition: color .2s var(--ease); }
.panel--interactive:hover .news-card h3 { color: var(--gold-bright); }
.news-card p { color: var(--text-2); font-size: .9rem; margin: 0 0 1rem; }
.news-card__foot { margin-top: auto; }

/* ── 11  LEADERBOARDS & TABLES ────────────────────────────────────── */
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1.4rem; padding-bottom: .1rem; }
.tab {
  padding: .55rem 1rem;
  font-family: var(--font-display); font-size: .74rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .22s var(--ease);
}
.tab:hover { color: var(--text); background: rgba(255,255,255,.04); }
.tab.is-active {
  color: var(--brand-fg);
  background: linear-gradient(180deg, var(--ember-bright), var(--ember));
  border-color: rgba(255,180,90,.5);
  box-shadow: 0 6px 20px -8px rgba(var(--ember-rgb),.9);
}

.board { width: 100%; border-collapse: collapse; font-size: .9rem; }
.board thead th {
  padding: .6rem .8rem;
  font-family: var(--font-display); font-size: .64rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  text-align: left; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.board tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease);
}
.board tbody tr:hover { background: rgba(var(--ember-rgb),.055); }
.board tbody tr:last-child { border-bottom: 0; }
.board td { padding: .62rem .8rem; vertical-align: middle; }
.board .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.board .gain { color: #6ee7a8; font-weight: 600; }

.rank-pos {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: var(--radius);
  font-family: var(--font-display); font-size: .82rem; font-weight: 700;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.rank-pos--1 { color: var(--brand-fg-gold); background: linear-gradient(160deg, var(--gold-bright), var(--gold) 60%, var(--gold-deep)); border-color: var(--gold-bright); box-shadow: 0 0 18px -4px rgba(var(--gold-rgb),.85); }
.rank-pos--2 { color: #16181b; background: linear-gradient(160deg, #eef1f5, var(--silver) 60%, var(--silver-deep)); border-color: var(--silver); box-shadow: 0 0 16px -6px rgba(205,211,218,.7); }
.rank-pos--3 { color: #1c1005; background: linear-gradient(160deg, #e5a76a, var(--bronze) 60%, var(--bronze-deep)); border-color: var(--bronze); box-shadow: 0 0 16px -6px rgba(201,128,60,.7); }

.player-cell { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.player-cell__name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-cell a.player-cell__name:hover { color: var(--gold-bright); }
.player-cell__sub { font-size: .7rem; color: var(--muted); }

.type-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.type-regular  { background: var(--muted); }
.type-ironman  { background: var(--silver); }
.type-hardcore { background: var(--blood-bright); }
.type-ultimate { background: #8fd3ff; }
.type-group    { background: #b39ddb; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty-state svg { width: 44px; height: 44px; margin: 0 auto 1rem; color: var(--faint); }

/* WOM unavailable notice */
.notice {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .9rem 1.1rem; margin-bottom: 1.4rem;
  border: 1px solid rgba(var(--gold-rgb),.3);
  border-left: 3px solid var(--gold);
  background: rgba(var(--gold-rgb),.07);
  border-radius: var(--radius);
  font-size: .88rem; color: #f3e2bd;
}
.notice svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--gold); margin-top: .1rem; }
.notice--error { border-color: rgba(var(--blood-rgb),.45); border-left-color: var(--blood-bright); background: rgba(var(--blood-rgb),.1); color: #ffd0d0; }
.notice--error svg { color: var(--blood-bright); }
.notice--ok { border-color: rgba(52,211,153,.35); border-left-color: #34d399; background: rgba(52,211,153,.08); color: #c6f4e0; }
.notice--ok svg { color: #34d399; }

/* ── 12  PODIUM / TROPHIES ────────────────────────────────────────── */
.podium { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: end; }
@media (min-width: 820px) {
  .podium { grid-template-columns: 1fr 1.15fr 1fr; }
  .podium > *:nth-child(1) { order: 2; }
  .podium > *:nth-child(2) { order: 1; }
  .podium > *:nth-child(3) { order: 3; }
}

.champion {
  position: relative; text-align: center; padding: 1.6rem 1.2rem 1.3rem;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0) 45%), linear-gradient(180deg, var(--ink-800), var(--ink-900));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.champion:hover { transform: translateY(-4px); }
.champion::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.14) 48%, transparent 58%);
  transform: translateX(-140%);
  animation: sheen 5.5s var(--ease) infinite;
}
@keyframes sheen { 0%, 65% { transform: translateX(-140%); } 100% { transform: translateX(140%); } }

.champion--1 { border-color: var(--gold); box-shadow: var(--shadow-md), 0 0 40px -14px rgba(var(--gold-rgb),.85); padding-top: 2.1rem; }
.champion--2 { border-color: var(--silver-deep); box-shadow: var(--shadow-md), 0 0 34px -16px rgba(205,211,218,.7); }
.champion--3 { border-color: var(--bronze-deep); box-shadow: var(--shadow-md), 0 0 34px -16px rgba(201,128,60,.7); }
.champion--1 .champion__place { color: var(--gold-bright); }
.champion--2 .champion__place { color: var(--silver); }
.champion--3 .champion__place { color: var(--bronze); }

.champion__trophy { width: 54px; height: 54px; margin: 0 auto .8rem; }
.champion--1 .champion__trophy { width: 68px; height: 68px; animation: trophy-glow 3.5s ease-in-out infinite; }
@keyframes trophy-glow {
  0%,100% { filter: drop-shadow(0 0 10px rgba(var(--gold-rgb),.5)); }
  50%     { filter: drop-shadow(0 0 24px rgba(var(--gold-rgb),.95)); }
}
.champion__place { font-family: var(--font-display); font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; }
.champion__name { font-family: var(--font-display); font-size: 1.3rem; color: #fff; margin: .5rem 0 .2rem; }
.champion__score { font-size: .82rem; color: var(--gold); font-family: var(--font-mono); }
.champion__prize { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--text-2); }
.champion__note { margin-top: .6rem; font-size: .78rem; color: var(--muted); font-style: italic; }
.champion__shot { margin-top: .9rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

.hall-entry { margin-bottom: clamp(2rem, 4vw, 3rem); }
.hall-entry__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hall-entry__head h3 { margin: 0; }

.cabinet { display: grid; gap: .6rem; }
.cabinet__row {
  display: flex; align-items: center; gap: .8rem;
  padding: .65rem .85rem;
  background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: var(--radius);
  transition: all .22s var(--ease);
}
.cabinet__row:hover { border-color: var(--line-gold); background: rgba(var(--gold-rgb),.06); }
.cabinet__medals { margin-left: auto; display: flex; gap: .5rem; font-family: var(--font-mono); font-size: .8rem; }
.cabinet__medals span { display: inline-flex; align-items: center; gap: .22rem; }
.medal-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.medal-gold   { background: linear-gradient(160deg, var(--gold-bright), var(--gold-deep)); box-shadow: 0 0 8px rgba(var(--gold-rgb),.7); }
.medal-silver { background: linear-gradient(160deg, #fff, var(--silver-deep)); }
.medal-bronze { background: linear-gradient(160deg, #e5a76a, var(--bronze-deep)); }

/* Achievement / drop showcase */
.showcase { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.drop-card {
  position: relative; display: flex; gap: .85rem; align-items: center;
  padding: .95rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-800), var(--ink-900));
  overflow: hidden;
  transition: all .25s var(--ease);
}
.drop-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--rarity, var(--muted)); box-shadow: 0 0 14px var(--rarity, transparent);
}
.drop-card:hover { transform: translateX(3px); border-color: var(--line-strong); }
.rarity-common    { --rarity: #8b867e; }
.rarity-rare      { --rarity: #5aa9ff; }
.rarity-epic      { --rarity: #b57bff; }
.rarity-legendary { --rarity: var(--gold); }
.drop-card__title { font-weight: 600; color: #fff; font-size: .95rem; }
.drop-card__meta  { font-size: .74rem; color: var(--muted); }

/* A card with an uploaded screenshot shows it in place of the metric tile
   and opens the lightbox on click. */
.drop-card__thumb {
  position: relative; flex-shrink: 0; display: block;
  width: 76px; height: 76px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
  background: var(--ink-950);
}
.drop-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.drop-card__thumb:hover img { transform: scale(1.08); }
.drop-card__zoom {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(var(--ink-950-rgb), .55); color: #fff;
  opacity: 0; transition: opacity .22s var(--ease);
}
.drop-card__thumb:hover .drop-card__zoom,
.drop-card__thumb:focus-visible .drop-card__zoom { opacity: 1; }
.drop-card--shot { cursor: pointer; }

/* ── 13  TIMELINE ─────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: .5rem; bottom: .5rem; width: 1px;
  background: linear-gradient(180deg, var(--ember), var(--line-strong), transparent);
}
.timeline__item { position: relative; padding-bottom: 1.6rem; }
.timeline__item::before {
  content: ''; position: absolute; left: -2.2rem; top: .42rem;
  width: 11px; height: 11px; margin-left: 4px;
  border-radius: 50%;
  background: var(--ink-850);
  border: 2px solid var(--ember);
  box-shadow: 0 0 12px rgba(var(--ember-rgb),.8);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__date { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ember); }
.timeline__title { font-family: var(--font-display); font-size: 1.02rem; color: #fff; margin: .2rem 0 .2rem; }
.timeline__desc { font-size: .87rem; color: var(--muted); margin: 0; }

/* ── 14  GALLERY & LIGHTBOX ───────────────────────────────────────── */
.masonry { columns: 3 280px; column-gap: 1rem; }
.masonry > * { break-inside: avoid; margin-bottom: 1rem; }

.shot {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--ink-800);
  cursor: zoom-in;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .3s var(--ease);
}
.shot img { width: 100%; display: block; transition: transform .7s var(--ease), filter .4s; }
.shot:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 0 30px -14px rgba(var(--ember-rgb),.8); }
.shot:hover img { transform: scale(1.05); }
.shot__overlay {
  position: absolute; inset: auto 0 0 0;
  padding: 2.4rem .9rem .8rem;
  background: linear-gradient(180deg, transparent, rgba(var(--ink-950-rgb),.94));
  opacity: 0; transform: translateY(8px);
  transition: all .3s var(--ease);
}
.shot:hover .shot__overlay { opacity: 1; transform: translateY(0); }
.shot__title { font-family: var(--font-display); font-size: .92rem; color: #fff; }
.shot__caption { font-size: .76rem; color: var(--text-2); margin-top: .15rem; }
.shot__badge {
  position: absolute; top: .7rem; right: .7rem; z-index: 2;
  padding: .18rem .5rem;
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: rgba(100, 65, 165, .85);
  border: 1px solid rgba(180, 140, 255, .5); border-radius: 3px;
}

.shot__play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; text-shadow: 0 0 20px rgba(0,0,0,.9);
}
.shot__play svg { width: 46px; height: 46px; filter: drop-shadow(0 0 14px rgba(var(--ember-rgb),.9)); }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(var(--ink-950-rgb),.96);
  backdrop-filter: blur(10px);
}
.lightbox.is-open { display: grid; animation: fade-in .25s var(--ease); }
.lightbox__figure { max-width: min(1100px, 100%); max-height: 100%; text-align: center; }
.lightbox__figure img { max-height: 78vh; width: auto; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox__frame { width: min(960px, 100%); aspect-ratio: 16/9; border: 1px solid var(--line-strong); border-radius: var(--radius); }
/* Vertical sources (YouTube Shorts) get a portrait frame instead of bars */
.lightbox__frame.is-portrait { width: min(420px, 100%); aspect-ratio: 9/16; }
.lightbox__cap { margin-top: 1rem; color: var(--text-2); font-size: .92rem; }
.lightbox__cap b { display: block; font-family: var(--font-display); color: #fff; font-size: 1.05rem; margin-bottom: .2rem; }
.lightbox__close, .lightbox__nav {
  position: absolute; z-index: 2;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--line-strong);
  border-radius: var(--radius); color: var(--text); cursor: pointer;
  transition: all .2s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(var(--ember-rgb),.18); border-color: var(--ember); color: #fff; }
.lightbox__close { top: 1.1rem; right: 1.1rem; }
.lightbox__nav--prev { left: 1.1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1.1rem; top: 50%; transform: translateY(-50%); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.gallery-sentinel { height: 1px; }
.loading-dots { display: flex; gap: .35rem; justify-content: center; padding: 2rem 0; }
.loading-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); animation: bounce 1.2s infinite; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,80%,100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* ── 15  FORMS ────────────────────────────────────────────────────── */
.field { margin-bottom: 1.1rem; }
/* Checkbox rows carry their own sentence-case wording, so they opt out of
   the small-caps treatment the field headings get. */
.field > label:not(.check), .label {
  display: block; margin-bottom: .4rem;
  font-family: var(--font-display); font-size: .7rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-2);
}
.field > label.check { margin-bottom: .45rem; }
.field .hint { display: block; margin-top: .35rem; font-size: .76rem; color: var(--muted); }
.field .req { color: var(--ember); }

.input, .select, .textarea {
  width: 100%;
  padding: .7rem .85rem;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .94rem;
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), background .2s;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ember);
  background: rgba(0,0,0,.55);
  box-shadow: 0 0 0 3px rgba(var(--ember-rgb),.14), 0 0 22px -8px rgba(var(--ember-rgb),.7);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23ff7a00' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.2rem;
}
.field--error .input, .field--error .select, .field--error .textarea { border-color: var(--blood-bright); }
.field-error { margin-top: .35rem; font-size: .78rem; color: #ff9c9c; }

.check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-size: .9rem; color: var(--text-2); }
.check input { width: 18px; height: 18px; accent-color: var(--ember); margin-top: .15rem; flex-shrink: 0; }

.form-grid { display: grid; gap: 0 1.1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* Honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* ── 16  DISCORD ──────────────────────────────────────────────────── */
.discord-panel {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px 260px at 15% 0%, rgba(88,101,242,.22), transparent 65%),
    linear-gradient(180deg, var(--ink-800), var(--ink-900));
  border: 1px solid rgba(88,101,242,.28);
}
.discord-panel::before, .discord-panel::after { border-color: rgba(120,135,255,.5); }
.discord-online { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: #a8b3ff; }
.discord-members { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.discord-member {
  display: flex; align-items: center; gap: .4rem;
  padding: .28rem .55rem .28rem .3rem;
  background: rgba(88,101,242,.1); border: 1px solid rgba(88,101,242,.22);
  border-radius: 100px; font-size: .76rem; color: #d5daff;
}
.discord-member img { width: 20px; height: 20px; border-radius: 50%; }
.stream-frame { width: 100%; aspect-ratio: 16/9; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #000; }

/* Shown instead of the Twitch player when the page is not on HTTPS —
   Twitch blocks its own embed there, so a link beats a broken frame. */
.stream-fallback {
  display: flex; gap: .9rem; align-items: center; justify-content: center;
  /* Match the player it replaces, so the panel keeps its shape. */
  width: 100%; aspect-ratio: 16/9; min-height: 180px;
  padding: 1.6rem 1.3rem;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-800), var(--ink-900));
  color: var(--text); text-decoration: none;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.stream-fallback:hover { border-color: var(--ember); transform: translateY(-2px); }
.stream-fallback svg { color: var(--ember); flex-shrink: 0; }
.stream-fallback b { display: block; font-family: var(--font-display); letter-spacing: .04em; }
.stream-fallback span { font-size: .8rem; color: var(--muted); }

.discord-widget-frame { width: 100%; height: 420px; border: 0; border-radius: var(--radius); }

/* ── 17  FOOTER ───────────────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 1;
  margin-top: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(var(--ink-950-rgb),.6), var(--ink-950));
  padding: clamp(2.4rem, 5vw, 3.6rem) 0 1.6rem;
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-grid h4 { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ember); margin-bottom: .9rem; }
.footer-links { display: flex; flex-direction: column; gap: .45rem; }
.footer-links a { color: var(--text-2); font-size: .88rem; }
.footer-links a:hover { color: var(--gold-bright); }
.footer-bottom {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .76rem; color: var(--faint);
}

/* ── 18  UTILITIES & MOTION ───────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; } .mt-4 { margin-top: 2.4rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.6rem; } .mb-4 { margin-bottom: 2.4rem; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Only hide reveal elements when JavaScript is actually running, so the site
   is fully readable with JS disabled or blocked. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal-1 { transition-delay: .06s; } .reveal-2 { transition-delay: .12s; }
.reveal-3 { transition-delay: .18s; } .reveal-4 { transition-delay: .24s; }
.reveal-5 { transition-delay: .3s; }  .reveal-6 { transition-delay: .36s; }

.toast-stack { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 300; display: flex; flex-direction: column; gap: .6rem; max-width: 340px; }
.toast {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .85rem 1rem;
  background: linear-gradient(180deg, var(--ink-700), var(--ink-900));
  border: 1px solid var(--line-gold); border-left: 3px solid var(--gold);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: .86rem;
  animation: toast-in .45s var(--ease);
}
.toast svg { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; }
.toast b { display: block; font-family: var(--font-display); color: #fff; font-size: .82rem; letter-spacing: .06em; }
.toast span { color: var(--text-2); }

/* Milestones come live from Wise Old Man; drops are posted by staff. The
   left edge and icon colour tell them apart without needing a label. */
.toast--milestone { border-left-color: var(--ember); border-color: var(--line-strong); }
.toast--milestone svg { color: var(--ember); }

/* Clickable toasts link to the player's profile. */
a.toast { text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
a.toast:hover { transform: translateX(-3px); box-shadow: var(--shadow-lg), var(--glow-ember); }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .toast-stack { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; }
}

.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.4rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; padding: .45rem .7rem; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .84rem; color: var(--text-2);
}
.pagination a:hover { border-color: var(--line-strong); color: var(--gold-bright); }
.pagination .is-current { background: rgba(var(--ember-rgb),.14); border-color: var(--line-strong); color: var(--ember-bright); }
.pagination .is-disabled { opacity: .35; }
.pagination .is-gap { border-color: transparent; color: var(--faint); min-width: 20px; padding-inline: .2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ── 19  ADMIN ────────────────────────────────────────────────────── */
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  background: linear-gradient(180deg, var(--ink-900), var(--ink-950));
  border-right: 1px solid var(--line);
  padding: 1.4rem 1rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side .brand { margin-bottom: 1.6rem; }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; }
.admin-nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .7rem; border-radius: var(--radius);
  font-size: .87rem; color: var(--text-2);
  transition: all .2s var(--ease);
}
.admin-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.admin-nav a.is-active { background: rgba(var(--ember-rgb),.14); color: var(--ember-bright); box-shadow: inset 2px 0 0 var(--ember); }
.admin-nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-nav .count { margin-left: auto; font-size: .7rem; padding: .05rem .4rem; border-radius: 100px; background: var(--blood); color: #fff; }
.admin-nav__label { margin: 1.2rem 0 .4rem; padding-left: .7rem; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }

.admin-main { padding: clamp(1.2rem, 3vw, 2.2rem); min-width: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.admin-head h1 { font-size: 1.6rem; margin: 0; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.admin-table th {
  text-align: left; padding: .55rem .7rem; font-size: .64rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.admin-table td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.admin-table .actions { display: flex; gap: .35rem; justify-content: flex-end; }

.select-search { display: flex; flex-direction: column; gap: .4rem; }
.select-search input[type='search'] { font-size: .85rem; padding: .45rem .7rem; }

.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.admin-login .panel { width: min(420px, 100%); }

.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1.8rem; }
.stat-mini { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--ink-800), var(--ink-900)); }
.stat-mini b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: #fff; line-height: 1; }
.stat-mini span { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* Hall of Champions filter rows — type on one line, year on the next, so a
   clan with several years of events does not get one unreadable long row. */
.hall-filters { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.4rem; }
.hall-filters .tabs { margin: 0; }

/* Shown only on a staff preview of an unpublished post. */
.preview-bar {
  background: linear-gradient(180deg, var(--ink-800), var(--ink-900));
  border-bottom: 2px solid var(--gold);
  font-size: .85rem; color: var(--text-2);
}
.preview-bar .wrap { display: flex; align-items: center; gap: .5rem; padding: .6rem var(--gutter); }
.preview-bar b { color: var(--gold); letter-spacing: .06em; text-transform: uppercase; font-size: .74rem; }
.preview-bar a { color: var(--gold); }

/* ── 19a  STAFF BAR ───────────────────────────────────────────────── */
/* Only ever rendered for signed-in staff, so regular visitors get no markup
   at all and the page is byte-identical to before. */
.staff-bar {
  background: linear-gradient(180deg, var(--ink-900), var(--ink-950));
  border-bottom: 1px solid var(--line-strong);
  font-size: .78rem;
  position: relative;
  z-index: 60;
}
.staff-bar__inner {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 1rem; padding: .4rem var(--gutter); min-height: 34px;
}
.staff-bar__who { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-2); }
.staff-bar__who svg { color: var(--ember); }
.staff-bar__who b { color: #fff; }
.staff-bar__role { margin-left: .1rem; }

.staff-bar__actions { display: inline-flex; align-items: center; gap: .8rem; }
.staff-bar__actions a,
.staff-bar__actions button {
  color: var(--gold); text-decoration: none;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; letter-spacing: .02em;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.staff-bar__actions a:hover,
.staff-bar__actions button:hover { color: var(--gold-bright); border-bottom-color: currentColor; }
.staff-bar__actions form { display: inline; margin: 0; }

@media (max-width: 640px) {
  .staff-bar__inner { justify-content: space-between; gap: .5rem; font-size: .74rem; }
  .staff-bar__role { display: none; }
}

/* ── 19b  BRANDING PANEL ──────────────────────────────────────────── */
.colour-row { display: flex; gap: .5rem; align-items: center; }
.colour-row input[type="color"] {
  width: 46px; height: 42px; padding: 0; border: 1px solid var(--line);
  border-radius: 8px; background: var(--ink-900); cursor: pointer;
}
.colour-row .input { flex: 1; text-transform: lowercase; }

.preset-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: .5rem; }
.preset {
  display: flex; flex-direction: column; gap: .35rem; align-items: center;
  padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--ink-900); color: var(--text-dim); cursor: pointer;
  font: inherit; font-size: .74rem; transition: border-color .18s, transform .18s;
}
.preset:hover { border-color: var(--ember); transform: translateY(-2px); color: var(--text); }
.preset__swatches { display: flex; gap: 2px; }
.preset__swatches i { width: 14px; height: 14px; border-radius: 3px; display: block; }
.preset__label { letter-spacing: .02em; }

.brand-preview { text-align: center; }
.brand-preview__crest { min-height: 170px; display: grid; place-items: center; }
.brand-preview__crest svg { width: 140px; height: auto; }
.brand-preview__mark { margin-top: .4rem; }
.brand-preview__mark svg { width: 46px; height: 46px; }

/* ── 20  RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .masonry { columns: 2 260px; }
}

/* Below this the header runs out of room: brand + nav + both CTA buttons
   need about 1150px, and the overflow was being clipped rather than wrapped. */
@media (max-width: 1279px) {
  .header-cta { display: none; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: 0 0 auto; top: 0;
    flex-direction: column; align-items: stretch; gap: .2rem;
    padding: 5.6rem var(--gutter) 2rem;
    background: rgba(var(--ink-950-rgb),.98);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line-strong);
    transform: translateY(-110%);
    transition: transform .38s var(--ease);
    max-height: 100vh; overflow-y: auto;
    z-index: 40;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: .9rem .6rem; font-size: .95rem; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav > .btn { display: inline-flex; margin-top: 1rem; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .masonry { columns: 1; }
  .hero { min-height: auto; }
  .hero__meta { gap: 1.2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .board { font-size: .82rem; }
  .board td, .board thead th { padding: .5rem .5rem; }
  .countdown div { min-width: 48px; }
  .section { padding: 2.6rem 0; }
  .lightbox__nav { display: none; }
  .footer-bottom { flex-direction: column; }
}

@media print {
  .site-header, .site-footer, .btn, #embers, .scroll-cue { display: none !important; }
  body { background: #fff; color: #000; }
}
