/* ==========================================================================
   IC7 — Design Tokens  ("Crimson Circuit")
   Single source of truth for colour, type, space, motion and elevation.
   ========================================================================== */

:root {
  /* ---------- Core surfaces ---------- */
  --color-bg:             #0A0A0C;
  --color-bg-alt:         #120A0D;
  --color-surface:        #161213;
  --color-surface-2:      #1E1618;
  --color-surface-3:      #261C1F;
  --color-border:         #2B1F22;
  --color-border-strong:  #433035;

  /* ---------- Brand red ---------- */
  --color-red:            #E8102B;
  --color-red-bright:     #FF1F3D;
  --color-red-deep:       #8C0A1C;
  --color-red-ink:        #4A0510;

  /* ---------- Text ---------- */
  --color-white:          #FFFFFF;
  --color-text-primary:   #F5F3F4;
  --color-text-secondary: #B8AEB1;
  --color-text-muted:     #6E6468;

  /* ---------- Status ---------- */
  --color-success:        #21D07A;
  --color-warning:        #FFB020;
  --color-error:          #FF3B4E;

  /* ---------- Gradients ---------- */
  --gradient-primary: linear-gradient(135deg, #E8102B 0%, #8C0A1C 60%, #0A0A0C 100%);
  --gradient-button:  linear-gradient(135deg, #FF1F3D 0%, #E8102B 45%, #8C0A1C 100%);
  --gradient-glow:    radial-gradient(circle, rgba(232, 16, 43, 0.35) 0%, rgba(232, 16, 43, 0) 70%);
  --gradient-band:    linear-gradient(120deg, #8C0A1C 0%, #E8102B 50%, #4A0510 100%);
  --gradient-text:    linear-gradient(100deg, #FFFFFF 0%, #FFC6CD 40%, #FF1F3D 100%);
  --gradient-fade-r:  linear-gradient(90deg, rgba(10, 10, 12, 0) 0%, rgba(10, 10, 12, 1) 100%);
  --gradient-fade-l:  linear-gradient(270deg, rgba(10, 10, 12, 0) 0%, rgba(10, 10, 12, 1) 100%);

  /* ---------- Elevation / glow ---------- */
  --shadow-red-glow:        0 0 24px rgba(232, 16, 43, 0.35);
  --shadow-red-glow-strong: 0 0 48px rgba(232, 16, 43, 0.55);
  --shadow-card:            0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-card-hover:      0 18px 40px rgba(0, 0, 0, 0.65);
  --shadow-header:          0 6px 30px rgba(0, 0, 0, 0.55);
  --shadow-inset-top:       inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* ---------- Typography ---------- */
  --font-display: 'Rajdhani', 'Saira Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body:    'Inter', 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', 'Consolas', monospace;

  /* Fluid type scale — mobile-first, clamps up to desktop */
  --fs-display:  clamp(2.4rem, 7vw, 4.75rem);
  --fs-h1:       clamp(2rem, 5.4vw, 3.5rem);
  --fs-h2:       clamp(1.65rem, 4vw, 2.6rem);
  --fs-h3:       clamp(1.3rem, 2.6vw, 1.75rem);
  --fs-h4:       clamp(1.1rem, 2vw, 1.3rem);
  --fs-lead:     clamp(1.02rem, 1.6vw, 1.2rem);
  --fs-body:     1rem;
  --fs-sm:       0.9rem;
  --fs-xs:       0.8rem;
  --fs-stat:     clamp(1.9rem, 4.6vw, 3rem);

  --lh-tight:  1.1;
  --lh-snug:   1.3;
  --lh-body:   1.75;
  --lh-loose:  1.85;

  --ls-display: 0.02em;
  --ls-caps:    0.14em;
  --ls-caps-wide: 0.22em;

  /* ---------- Spacing scale ---------- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  2.75rem;
  --space-8:  3.5rem;
  --space-9:  4.5rem;
  --space-10: 6rem;
  --space-11: 8rem;

  --section-y: clamp(3.5rem, 8vw, 7rem);

  /* ---------- Layout ---------- */
  --container:      1240px;
  --container-wide: 1440px;
  --container-text: 760px;
  --gutter:         clamp(1rem, 4vw, 2rem);
  --header-h:       72px;

  /* ---------- Radii ---------- */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   26px;
  --radius-pill: 999px;

  /* ---------- Motion ---------- */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:   160ms;
  --dur-base:   280ms;
  --dur-slow:   520ms;
  --dur-reveal: 720ms;

  /* ---------- Z-index ---------- */
  --z-bg:      0;
  --z-content: 1;
  --z-sticky:  50;
  --z-header:  100;
  --z-drawer:  200;
  --z-top:     300;
}

/* Motion kill-switch — every animated rule in the system reads these. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 1ms;
    --dur-base: 1ms;
    --dur-slow: 1ms;
    --dur-reveal: 1ms;
  }
}
