/* ============================================================================
   Onești City — Design Tokens
   Single source of truth. Every component references these.
   ========================================================================= */

:root {
  /* Neutral scale (slate) */
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;
  --slate-950: #020617;

  /* Civic accent — Romanian flag red, muted for UI */
  --accent-50:  #FEF2F2;
  --accent-100: #FEE2E2;
  --accent-500: #DC2626;
  --accent-600: #C8102E;
  --accent-700: #991B1B;

  /* Semantic status (light theme base) */
  --success-500: #16A34A;
  --warning-500: #D97706;
  --danger-500:  #DC2626;
  --info-500:    #2563EB;

  /* ----- Theme-aware tokens (light default) ----- */
  --bg-page:        #FFFFFF;
  --bg-elevated:    var(--slate-50);
  --bg-muted:       var(--slate-100);
  --bg-overlay:     rgba(15, 23, 42, 0.5);

  --surface-card:   #FFFFFF;
  --surface-hover:  var(--slate-50);
  --surface-sunken: var(--slate-100);

  --border-default: var(--slate-200);
  --border-strong:  var(--slate-300);
  --border-subtle:  var(--slate-100);

  --text-primary:   var(--slate-900);
  --text-secondary: var(--slate-600);
  --text-muted:     var(--slate-500);
  --text-inverse:   #FFFFFF;
  --text-accent:    var(--accent-600);
  --text-link:      var(--accent-600);
  --text-link-hover: var(--accent-700);

  --focus-ring:     var(--accent-500);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --fs-xs: 0.75rem;   /* 12 */
  --fs-sm: 0.875rem;  /* 14 */
  --fs-base: 1rem;    /* 16 */
  --fs-md: 1.0625rem; /* 17 */
  --fs-lg: 1.125rem;  /* 18 */
  --fs-xl: 1.25rem;   /* 20 */
  --fs-2xl: 1.5rem;   /* 24 */
  --fs-3xl: 1.875rem; /* 30 */
  --fs-4xl: 2.25rem;  /* 36 */
  --fs-5xl: 3rem;     /* 48 */
  --fs-6xl: 3.75rem;  /* 60 */

  --lh-tight:  1.2;
  --lh-snug:   1.35;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md:  0 2px 4px -1px rgba(15, 23, 42, 0.06), 0 4px 6px -1px rgba(15, 23, 42, 0.08);
  --shadow-lg:  0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl:  0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);

  /* Transitions */
  --trans-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --trans-med:  200ms cubic-bezier(0.4, 0, 0.2, 1);
  --trans-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index layers */
  --z-base: 1;
  --z-sticky: 100;
  --z-nav: 200;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 600;

  /* Layout widths */
  --content-narrow: 720px;
  --content-default: 1040px;
  --content-wide: 1280px;
  --content-full: 1440px;

  /* Breakpoints (for reference — used in @media queries) */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}

/* Dark theme */
[data-theme='dark'],
.dark {
  --bg-page:        var(--slate-950);
  --bg-elevated:    var(--slate-900);
  --bg-muted:       var(--slate-800);
  --bg-overlay:     rgba(0, 0, 0, 0.65);

  --surface-card:   var(--slate-900);
  --surface-hover:  var(--slate-800);
  --surface-sunken: var(--slate-950);

  --border-default: var(--slate-800);
  --border-strong:  var(--slate-700);
  --border-subtle:  var(--slate-800);

  --text-primary:   var(--slate-50);
  --text-secondary: var(--slate-300);
  --text-muted:     var(--slate-400);
  --text-inverse:   var(--slate-900);
  --text-accent:    #F87171;
  --text-link:      #F87171;
  --text-link-hover: #FCA5A5;

  --shadow-sm:  0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md:  0 2px 4px -1px rgba(0, 0, 0, 0.5), 0 4px 6px -1px rgba(0, 0, 0, 0.35);
  --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.55), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl:  0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
