/* ============================================
   Bagel University — Design Tokens
   ============================================
   Single source of truth for all visual values.
   Import this file at the top of any page or
   include it in the <head> before component styles.
   ============================================ */

/* --- Fonts (load in HTML <head>) ---
   <link href="https://fonts.googleapis.com/css2?family=Graduate&family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap" rel="stylesheet">
*/

:root {
  /* ── Brand Colors ── */
  --brand-navy:        #0F1D3D;
  --brand-blue:        #1E3A8A;
  --brand-blue-hover:  #1E40AF;
  --brand-blue-bright: #3B82F6;
  --brand-blue-light:  #DBEAFE;
  --brand-blue-glow:   rgba(30, 58, 138, 0.08);

  /* ── Neutral Colors ── */
  --color-bg:            #F5F7FA;
  --color-surface:       #FFFFFF;
  --color-border:        #DDE3EC;
  --color-border-focus:  #1E3A8A;
  --color-text:          #1A1F36;
  --color-text-secondary:#5A6178;
  --color-text-disabled: #94A3B8;
  --color-text-inverse:  #FFFFFF;

  /* ── Semantic / Status ── */
  --color-success:     #16A34A;
  --color-success-bg:  #DCFCE7;
  --color-error:       #DC2626;
  --color-error-bg:    #FEE2E2;
  --color-warning:     #D97706;
  --color-warning-bg:  #FEF3C7;
  --color-info:        #2563EB;
  --color-info-bg:     #DBEAFE;
  --color-pending:     #94A3B8;
  --color-pending-bg:  #F1F5F9;

  /* ── Station Colors ── */
  --station-counter:  #3B82F6;
  --station-grill:    #EF4444;
  --station-prep:     #10B981;
  --station-baker:    #F59E0B;
  --station-coffee:   #8B5CF6;
  --station-dish:     #6B7280;

  /* ── Typography ── */
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-logo:    'Graduate', 'Impact', cursive;

  --text-display:      2rem;       /* 32px — app title */
  --text-h1:           1.5rem;     /* 24px — page titles */
  --text-h2:           1.25rem;    /* 20px — section headings */
  --text-h3:           1.1rem;     /* 17.6px — subsections */
  --text-body:         1rem;       /* 16px — default */
  --text-small:        0.875rem;   /* 14px — secondary */
  --text-xs:           0.75rem;    /* 12px — badges, tags */

  --leading-tight:     1.2;
  --leading-snug:      1.35;
  --leading-normal:    1.65;

  /* ── Spacing (4px base) ── */
  --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;

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

  /* ── Shadows ── */
  --shadow-sm:    0 1px 3px rgba(15, 29, 61, 0.06);
  --shadow-md:    0 4px 12px rgba(15, 29, 61, 0.08);
  --shadow-lg:    0 8px 24px rgba(15, 29, 61, 0.12);
  --shadow-focus: 0 0 0 3px var(--brand-blue-glow);

  /* ── Motion ── */
  --duration-fast:      120ms;
  --duration-normal:    200ms;
  --duration-slow:      350ms;
  --duration-entrance:  500ms;
  --easing-default:     cubic-bezier(0.4, 0, 0.2, 1);
  --easing-entrance:    cubic-bezier(0, 0, 0.2, 1);
  --easing-exit:        cubic-bezier(0.4, 0, 1, 1);

  /* ── Layout ── */
  --content-max-width:      720px;
  --content-max-width-wide: 1080px;
  --content-padding:        20px;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Base ── */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
