/*
 * tokens.css — Rivalitas design system tokens
 *
 * Used by: public pages (RivalitasPublic* components) exclusively for typography,
 * z-index, transitions, and breakpoints. Color / spacing / radius / shadow tokens
 * are shared across public and admin surfaces (identical values).
 *
 * Admin components use MudBlazor's C# theme for their styling and never reference
 * the typography, z-index, or transition tokens below — adding them here is safe.
 *
 * Breakpoints are declared as custom properties for JavaScript use only.
 * CSS media queries cannot use var() — copy the raw values into your @media rules.
 */

:root {
  /* Brand Blue */
  --color-blue-50:  #EFF8FD;
  --color-blue-100: #D9F0FA;
  --color-blue-200: #B3E1F5;
  --color-blue-300: #7CCBEE;
  --color-blue-400: #36A9E1;
  --color-blue-500: #1A8EC4;
  --color-blue-600: #1372A0;
  --color-blue-700: #0F5A80;
  --color-blue-800: #0B4260;
  --color-blue-900: #082D42;

  /* Slate */
  --color-slate-50:  #F8FAFC;
  --color-slate-100: #F1F5F9;
  --color-slate-200: #E2E8F0;
  --color-slate-300: #CBD5E1;
  --color-slate-400: #94A3B8;
  --color-slate-500: #64748B;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1E293B;
  --color-slate-900: #1B2A3B;

  /* Amber */
  --color-amber-400: #FBBF24;
  --color-amber-500: #F59E0B;
  --color-amber-600: #D97706;

  /* Semantic */
  --color-success: #16A34A;
  --color-warning: #D97706;
  --color-error:   #DC2626;
  --color-info:    #0284C7;

  /* Semantic Aliases — mapped to raw scale tokens above */
  --color-primary:       var(--color-blue-400);
  --color-primary-dark:  var(--color-blue-600);
  --color-text-heading:  var(--color-slate-900);
  --color-text-body:     var(--color-slate-700);
  --color-text-muted:    var(--color-slate-500);
  --color-border:        var(--color-slate-200);
  --color-surface-hover: var(--color-slate-100);

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Elevation */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-2: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-3: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-4: 0 8px 32px rgba(0,0,0,0.12);

  /* ─── Typography ────────────────────────────────────────────────────────────
   * Used by public RivalitasPublic* components only.
   * Admin uses MudBlazor's C# Typography object (RivalitasTheme.cs).
   * ────────────────────────────────────────────────────────────────────────── */

  /* Font sizes — matches design system scale */
  --font-size-display-l: 48px;   /* Public hero headline */
  --font-size-display-m: 36px;   /* Public section hero */
  --font-size-h1:        28px;
  --font-size-h2:        22px;
  --font-size-h3:        18px;
  --font-size-h4:        16px;
  --font-size-h5:        14px;
  --font-size-body-l:    17px;   /* Lead paragraphs */
  --font-size-body-m:    15px;   /* Standard body */
  --font-size-body-s:    13px;   /* Supporting / footnote */
  --font-size-label:     12px;   /* Form labels, table headers */
  --font-size-caption:   11px;   /* Timestamps, IDs, metadata */
  --font-size-button:    14px;

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

  /* Line heights */
  --line-height-tighter:  1.1;   /* Display headings */
  --line-height-tight:    1.2;   /* H1 */
  --line-height-snug:     1.35;  /* H3 */
  --line-height-normal:   1.4;   /* H2, H4, labels */
  --line-height-relaxed:  1.5;   /* Body S */
  --line-height-loose:    1.6;   /* Body M / L */

  /* Letter spacing */
  --letter-spacing-tighter: -0.02em;  /* Display */
  --letter-spacing-tight:   -0.01em;  /* H1 */
  --letter-spacing-normal:   0;
  --letter-spacing-wide:     0.01em;  /* Button */
  --letter-spacing-wider:    0.02em;  /* Caption */
  --letter-spacing-widest:   0.04em;  /* Label (uppercase) */

  /* ─── Breakpoints ───────────────────────────────────────────────────────────
   * Values are exposed as custom properties for JavaScript only (e.g. carousel,
   * hamburger menu). CSS @media rules must use the raw px values — var() is not
   * supported inside media query conditions.
   *
   *   Breakpoint reference for CSS:
   *     @media (min-width: 480px)  { }   --breakpoint-sm
   *     @media (min-width: 768px)  { }   --breakpoint-md
   *     @media (min-width: 1280px) { }   --breakpoint-lg
   *     @media (min-width: 1536px) { }   --breakpoint-xl
   * ────────────────────────────────────────────────────────────────────────── */
  --breakpoint-sm:  480px;
  --breakpoint-md:  768px;
  --breakpoint-lg: 1280px;
  --breakpoint-xl: 1536px;

  /* ─── Z-index scale ─────────────────────────────────────────────────────────
   * Semantic layers for public page stacking contexts.
   * Admin uses MudBlazor's internal z-index values for its own overlays.
   * ────────────────────────────────────────────────────────────────────────── */
  --z-dropdown:       100;
  --z-sticky:         200;
  --z-modal-backdrop: 300;
  --z-modal:          400;
  --z-toast:          500;
  --z-tooltip:        600;

  /* ─── Transitions ───────────────────────────────────────────────────────────
   * Use with @media (prefers-reduced-motion: reduce) { transition: none; }
   * ────────────────────────────────────────────────────────────────────────── */
  --duration-fast:   100ms;
  --duration-base:   200ms;
  --duration-slow:   350ms;

  /* Easing — exponential out preferred for UI motion (enter fast, settle soft) */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}
