/* ==========================================================================
   Game Center — Global Typography System
   --------------------------------------------------------------------------
   The single source of truth for fonts across the whole app. This file is
   linked in index.html BEFORE styles.css, so every component can reference
   these variables and classes. Do not hardcode a font family, size, or
   weight in styles.css or in app.js markup — use a variable or a class
   from this file instead.

   Fonts (Google Fonts, with system fallbacks if they fail to load):
     Barlow Condensed  — athletic display face: page + section headings
     Montserrat        — interface face: stats, navigation, buttons
     Inter             — body face: readable text, tables, labels
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800&family=Montserrat:wght@600;800&family=Inter:wght@400;500&display=swap');

:root {
  /* Font families — each ends in a system fallback so the app still reads
     correctly if Google Fonts is unreachable. */
  --font-display: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue Condensed', sans-serif;
  --font-interface: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Font weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Typography sizes (desktop) */
  --text-page-title: 36px;      /* Barlow Condensed 800, 32–40px */
  --text-section-title: 24px;   /* Barlow Condensed 700, 22–26px */
  --text-panel-title: 20px;     /* Barlow Condensed 700, 18–20px */
  --text-stat: 32px;            /* Montserrat 800, 28–36px */
  --text-stat-sm: 28px;         /* Montserrat 800, smaller stat values */
  --text-navigation: 15px;      /* Montserrat 600, 14–15px */
  --text-body: 15px;            /* Inter 400, 14–16px */
  --text-label: 13px;           /* Inter 500, 12–13px */

  /* Line heights + letter spacing */
  --lh-tight: 1.15;
  --lh-heading: 1.25;
  --lh-body: 1.5;
  --ls-heading: .01em;
  --ls-label: .05em;
}

/* ---------------- Base: body text is Inter everywhere ---------------- */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
}
input, select, textarea { font-family: var(--font-body); }
button { font-family: var(--font-interface); font-weight: var(--weight-semibold); }

/* ---------------- Headings: Barlow Condensed ------------------------- */
h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-page-title);
  line-height: var(--lh-tight);
  text-transform: uppercase;
  letter-spacing: var(--ls-heading);
}
h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-section-title);
  line-height: var(--lh-heading);
  text-transform: uppercase;
  letter-spacing: var(--ls-heading);
}
h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-panel-title);
  line-height: var(--lh-heading);
}

/* ---------------- Reusable classes ----------------------------------- */
/* Primary page headings (Overview, Schedule, Roster, Team Stats, …) */
.page-title {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-page-title);
  line-height: var(--lh-tight);
  text-transform: uppercase;
  letter-spacing: var(--ls-heading);
}
/* Section headings (Next Game, Recent Games, AI Insights, …) */
.section-title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-section-title);
  line-height: var(--lh-heading);
  text-transform: uppercase;
  letter-spacing: var(--ls-heading);
}
/* Panel headings */
.panel-title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-panel-title);
  line-height: var(--lh-heading);
}
/* Statistical values (records, PPG, scores, metrics) */
.stat-value {
  font-family: var(--font-interface);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-stat);
  line-height: var(--lh-tight);
  font-variant-numeric: tabular-nums;
}
/* Navigation labels, buttons, tabs, filters, interactive controls */
.nav-label {
  font-family: var(--font-interface);
  font-weight: var(--weight-semibold);
  font-size: var(--text-navigation);
  line-height: 1.4;
}
/* Standard body text */
.body-text {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-body);
  line-height: var(--lh-body);
}
/* Supporting labels (dates, table headers, status indicators) */
.supporting-label {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-label);
  line-height: 1.4;
}

/* ---------------- Responsive: keep the hierarchy, shrink the scale --- */
@media (max-width: 560px) {
  :root {
    --text-page-title: 28px;
    --text-section-title: 22px;
    --text-panel-title: 18px;
    --text-stat: 28px;
    --text-stat-sm: 24px;
  }
}
