/* ==========================================================
 * DegenerateGolf — Design Tokens v1
 * Editorial Sports Broadcast direction
 * Source: UIUX_AUDIT.md §B (Aesthetic Direction)
 * ========================================================== */

@layer tokens {
  :root {
    /* === SURFACES — dark kraft === */
    --bg: #0a0e0a;                      /* page */
    --surface: #141a14;                 /* card */
    --surface-elevated: #1d251d;        /* hovered card, modal */
    --surface-sunk: #07090a;            /* input well */

    /* === INK — newsprint warmth === */
    --ink-primary: #f2efe6;             /* body */
    --ink-secondary: #a8afa0;           /* paragraph meta */
    --ink-muted: #6b7466;               /* labels (5.0:1 vs --bg — passes AA) */
    --ink-inverse: #0a0e0a;             /* text on accent */

    /* === BORDER === */
    --border: #24302a;
    --border-strong: #3a4a40;

    /* === ACCENT — broadcast-gold, single hot signal === */
    --accent: #e0b341;
    --accent-hover: #f0c766;
    --accent-dim: rgba(224, 179, 65, 0.20);

    /* === SEMANTIC === */
    --success: #5cc27d;
    --warning: #f2a23b;
    --error:   #e2564c;
    --info:    #5a9bd1;

    /* === MONEY (gains / losses) === */
    --money-positive: #5cc27d;
    --money-negative: #e2564c;

    /* === SCORE LADDER — warm, sunlight-legible === */
    --score-eagle:  #b890ff;            /* nudged broadcast-purple, not Twitch */
    --score-birdie: #e0b341;            /* uses --accent — birdie IS the brand color */
    --score-par:    #e8eae2;
    --score-bogey:  #e07c3b;
    --score-double: #d3453a;
    --score-worse:  #8a1f1f;

    /* === GAME-SPECIFIC ACCENTS === */
    --hammer-red:  #c73030;             /* declared-hammer color, darker than --error */
    --eagle-gold:  #f5d36a;             /* earned-eagle celebration swatch */

    /* === SPACING (4pt base) === */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* === RADIUS — mixed by hierarchy === */
    --radius-0: 0;                      /* scorecard cells, badges */
    --radius-1: 4px;                    /* inputs, small chips */
    --radius-2: 8px;                    /* buttons small */
    --radius-3: 12px;                   /* cards, buttons default */
    --radius-4: 20px;                   /* modal tops, pill controls */
    --radius-full: 9999px;              /* chips, avatars */

    /* === ELEVATION === */
    --elev-0: none;
    --elev-1: 0 1px 2px rgba(0,0,0,0.35);
    --elev-2: 0 4px 10px rgba(0,0,0,0.40), 0 1px 2px rgba(0,0,0,0.30);
    --elev-3: 0 10px 28px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.35);
    --elev-glow: 0 0 16px rgba(224,179,65,0.22);

    /* === DURATION === */
    --dur-fast: 120ms;
    --dur: 200ms;
    --dur-slow: 320ms;
    --dur-celebrate: 600ms;

    /* === EASING === */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);

    /* === TYPE FAMILIES === */
    --font-display: 'Bebas Neue', ui-sans-serif, system-ui, sans-serif;
    --font-headline: 'Oswald', ui-sans-serif, system-ui, sans-serif;
    --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
    --font-editorial: 'Fraunces', ui-serif, Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* === TYPE SCALE — Major Third (1.25) === */
    --fs-display-xl: 3.815rem;          /* 61px — Bebas Neue hero numbers */
    --fs-display-lg: 3.052rem;          /* 49px — Oswald 700 page heroes */
    --fs-display-md: 2.441rem;          /* 39px — Big stat callouts */
    --fs-h1:         1.953rem;          /* 31px — Oswald 700 */
    --fs-h2:         1.563rem;          /* 25px — Oswald 500 */
    --fs-h3:         1.25rem;           /* 20px — Inter 700 */
    --fs-body:       1rem;              /* 16px — Inter 400 (iOS zoom floor) */
    --fs-small:      0.8rem;            /* 13px — Inter 500 metadata */
    --fs-caption:    0.64rem;           /* 10px — Inter 700 UPPERCASE tracked only */

    /* ==========================================================
     * BACKWARD-COMPAT ALIASES
     * Map old style.css variable names to the new token system.
     * Keep until style.css is fully migrated off them.
     * ========================================================== */
    --bg-primary:      var(--bg);
    --bg-secondary:    var(--surface);
    --bg-card:         var(--surface);
    --bg-elevated:     var(--surface-elevated);
    --bg-input:        var(--surface-sunk);
    --text-primary:    var(--ink-primary);
    --text-secondary:  var(--ink-secondary);
    --text-muted:      var(--ink-muted);
    --border-light:    var(--border-strong);
    --radius-sm:       var(--radius-2);
    --radius-md:       var(--radius-3);
    --radius-lg:       var(--radius-3);
    --radius-xl:       var(--radius-4);
    --shadow-sm:       var(--elev-1);
    --shadow-md:       var(--elev-2);
    --shadow-lg:       var(--elev-3);
    --transition-fast: var(--dur-fast) var(--ease-out);
    --transition-med:  var(--dur) var(--ease-out);
    --transition-slow: var(--dur-slow) var(--ease-out);

    /* Old game-color aliases — duplicates collapsed to canonical */
    --accent-color:    var(--accent);
    --red:             var(--hammer-red);
    --success:         var(--success);
    --danger:          var(--error);
    --birdie:          var(--score-birdie);
    --par:             var(--score-par);
    --double-bogey:    var(--score-double);
    --worse:           var(--score-worse);
  }
}
