/*
 * Zilla Engine · B+ broadcast design tokens
 * ──────────────────────────────────────────
 * Dark-only, near-black surfaces, one league accent, red reserved for live.
 * Components never use raw hex — only these properties.
 */

/* ── Neutrals ──
 * Also declared on .bp-page so B+ pages win over base.css's legacy :root
 * values (base.css loads after this file and redefines --bg/--text…).
 */
:root, .bp-page {
  --bg:         #050506;   /* page                          */
  --bg-2:       #0a0b0c;   /* footer, panels                */
  --surface:    #0e0f11;   /* rows, cards                   */
  --surface-2:  #141517;   /* inactive tabs, inputs          */
  --surface-3:  #1a1b1e;   /* secondary buttons              */
  --line:       #1d1e21;   /* dividers                      */
  --line-2:     #2a2b2e;   /* score box border, dashed rules */
  --strip:      #08090a;   /* score-chip strip, ticker       */
  --panel:      #0c0d0f;   /* leaders panel                  */
  --plate:      #111214;   /* date strip, navbar top         */

  /* ── States ── */
  --engine:   #F26B1D;  /* Zilla Engine pages + "Powered by" only */
  --live:     #ff3b30;  /* LIVE tags, live row edges      */
  --win:      #30d158;  /* W badges, "Synced"             */
  --loss:     #ff3b30;  /* L badges                       */
  --champion: #fde68a;  /* champion crown, title cards    */

  /* ── Text ── */
  --text:    #f4f4f5;   /* primary text                   */
  --muted:   #8e9099;   /* labels, meta                   */
  --dim:     #6b6e76;   /* subtle, disabled, losing side  */
  --sub:     #a1a1aa;   /* secondary text, upcoming time  */
  --black:   #000;      /* score box, white-plate text    */
  --white:   #fff;      /* 1st-place plate, Watch live    */

  /* ── Team (overridden per match/row) ── */
  --team-color: #8e9099;

  /* ── Type ──
   * --bp-* are the fixed B+ faces. --font-* may be overridden by league
   * settings on legacy pages; B+ chrome and pages pin them back to --bp-*. */
  --bp-display: 'Barlow Condensed', 'Oswald', sans-serif;
  --bp-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-display: var(--bp-display);
  --font-body:    var(--bp-body);

  /* ── Spacing (8px grid) — DS names + legacy aliases ── */
  --space-row:     8px;
  --space-card:    16px;
  --space-gutter:  32px;
  --space-section: 40px;
  --space-grid:    8px;
  --gutter:      var(--space-gutter);
  --row-gap:     var(--space-row);
  --section-gap: var(--space-section);

  color-scheme: dark;
}

/* ── League accent ──
 * Only on :root: league settings override it there (org_context prints a
 * :root block after this file). Not redeclared on .bp-page, otherwise the
 * page element would reset it to the default orange.
 * --acc is the design-system name; --league-accent the long form.
 */
:root {
  --league-accent: #E5622A;            /* FloorGeneral default           */
  --accent-ink:    #140a03;            /* text on accent plates          */
  --acc:           var(--league-accent);
  --ink:           var(--accent-ink);  /* legacy alias                   */
}

/* ── Fonts ── */
/* Loaded via <link> in base.html:
   Barlow Condensed 600/700/800 + italic 700/800
   Inter 400–800
*/

/* ── Reset / base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Display type (Barlow Condensed 800 italic) ── */
.bc {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1;
}

/* ── Label type (Barlow Condensed 700 upright uppercase) ── */
.bcu {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1;
}

/* ── Tabular numbers (scores, clocks, stats) ── */
.num {
  font-variant-numeric: tabular-nums;
}

/* ── Slant 12° ── */
.skew {
  transform: skewX(-12deg);
}
.unskew {
  transform: skewX(12deg);
}

/* ── Scanlines (hero + team cards) ── */
.scan {
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, .025) 0 1px,
    transparent 1px 3px
  );
}

/* ── Light sweep (hero only) ── */
@keyframes sweep {
  from { transform: translateX(-120%) skewX(-20deg); }
  to   { transform: translateX(320%) skewX(-20deg); }
}

.sweep {
  position: relative;
  overflow: hidden;
}
.sweep::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 180px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, .06),
    transparent
  );
  animation: sweep 4s ease infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .sweep::after { animation: none; }
}

/* ── LIVE pulse ── */
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .7); }
  100%     { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
}
@keyframes blink {
  50% { opacity: .3; }
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  display: inline-block;
  animation: live-pulse 1.4s infinite;
}
.live-dot--sm {
  width: 6px;
  height: 6px;
  animation: blink 1.5s ease-in-out infinite;
}

/* ── Section header (h2 in accent slanted plate) ── */
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head__plate {
  display: inline-flex;
  align-items: center;
  padding: 6px 20px;
  background: var(--league-accent);
  transform: skewX(-12deg);
}
.section-head__plate span {
  transform: skewX(12deg);
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 40px;
  text-transform: uppercase;
  color: var(--accent-ink);
  line-height: 1;
}
.section-head__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.section-head__sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ── Buttons ── */
.btn-b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transform: skewX(-12deg);
  transition: filter .15s;
  line-height: 1;
}
.btn-b > * {
  transform: skewX(12deg);
}
.btn-b:hover {
  filter: brightness(1.15);
}
.btn-b--primary {
  background: var(--league-accent);
  color: var(--accent-ink);
}
.btn-b--secondary {
  background: var(--surface-2);
  color: var(--text);
}
.btn-b--watch {
  background: var(--white);
  color: var(--black);
}
.btn-b--live {
  background: var(--live);
  color: var(--white);
}
.btn-b--sm { padding: 6px 14px; font-size: 12px; }
.btn-b--lg { padding: 14px 28px; font-size: 18px; }

/* ── Tabs (slanted) ── */
.tabs-b {
  display: flex;
  gap: 4px;
}
.tab-b {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--muted);
  background: var(--surface-2);
  transform: skewX(-12deg);
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  line-height: 1;
}
.tab-b > * {
  transform: skewX(12deg);
}
.tab-b:hover {
  color: var(--text);
  background: var(--surface-3);
}
.tab-b.active,
.tab-b--active {
  background: var(--league-accent);
  color: var(--accent-ink);
}

/* ── Layout helpers ── */
.container-b {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── Radius 0 (no rounded corners except crests) ── */
/* Border-radius is explicitly 0 on everything; crests get border-radius: 50% */