/* ILUSTILE Design System Tokens — Tactical Pixel Craft (Official Palette & Local Space Grotesk) */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('../vendor/fonts/space-grotesk/space-grotesk-latin-ext-wght-normal.woff2') format('woff2-variations'),
       url('../vendor/fonts/space-grotesk/space-grotesk-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('../vendor/fonts/space-grotesk/space-grotesk-latin-wght-normal.woff2') format('woff2-variations'),
       url('../vendor/fonts/space-grotesk/space-grotesk-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* Official Brand Palette (UI_UX.md) */
  --palette-night: #0C171B;
  --palette-graphite: #26383E;
  --palette-deep-teal: #004F56;
  --palette-forest-green: #005B4D;
  --palette-creative-gold: #C7A422;
  --palette-off-white: #F2F2F2;

  /* 4-Plane Studio Depth Hierarchy */
  --surface-void: #070E11;
  --surface-canvas: var(--palette-night);
  --surface-shell: #101D22;
  --surface-rail: #122127;
  --surface-panel: #16252B;
  --surface-panel-recessed: #0F1B20;
  --surface-elevated: #21343A;
  --surface-elevated-hover: #2C434B;
  --surface-nav: #0A2E33;
  --surface-nav-accent: var(--palette-deep-teal);
  --surface-active: var(--palette-forest-green);
  --surface-active-soft: rgba(0, 91, 77, 0.30);
  --surface-selection: rgba(199, 164, 34, 0.16);
  --surface-glass: rgba(10, 22, 27, 0.88);
  --surface-overlay: rgba(6, 13, 16, 0.78);

  /* Tactile Pixel-Craft Micro-Bevels */
  --bevel-raised: inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 -1px 0 rgba(0, 0, 0, 0.34);
  --bevel-raised-strong: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.40);
  --bevel-recessed: inset 0 1px 2px rgba(0, 0, 0, 0.48), 0 1px 0 rgba(255, 255, 255, 0.04);
  --bevel-gold: inset 0 1px 0 rgba(255, 244, 196, 0.45), inset 0 -1px 0 rgba(92, 68, 4, 0.45);

  /* Text Hierarchy (WCAG AA compliant on Night & Graphite) */
  --text-primary: var(--palette-off-white);
  --text-secondary: #C2D4DA;
  --text-muted: #8AA3AC;
  --text-disabled: #5C747D;
  --text-on-gold: #0C171B;

  /* Accents & Semantic Status */
  --accent-primary: var(--palette-creative-gold);
  --accent-primary-hover: #DDB935;
  --accent-primary-glow: rgba(199, 164, 34, 0.28);
  --accent-teal: var(--palette-deep-teal);
  --accent-teal-bright: #3EC6D3;
  --accent-green: var(--palette-forest-green);
  --status-success: #2EA887;
  --status-warning: #E0B83A;
  --status-error: #F06A6A;
  --status-error-bg: #3A191D;
  --status-error-border: #8B343D;
  --status-info: #4DB8C4;

  /* Semantic Layer Type Dots */
  --layer-tile: #3EC6D3;
  --layer-collision: #F06A6A;
  --layer-entity: #E0B83A;

  /* Crisp Hairline Borders */
  --hairline-dark: rgba(4, 10, 12, 0.72);
  --border-subtle: rgba(242, 242, 242, 0.08);
  --border-default: rgba(242, 242, 242, 0.14);
  --border-strong: rgba(242, 242, 242, 0.24);
  --border-focus: var(--palette-creative-gold);

  /* Typography */
  --font-sans: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Mono', 'Consolas', 'Courier New', monospace;
  --text-2xs: 0.6875rem;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --line-height-tight: 1.25;
  --line-height-normal: 1.45;

  /* Spacing Scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

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

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.38);
  --shadow-sm: 0 3px 10px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.56);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.72);

  /* Layout Dimensions (preserving existing studio geometry & test constraints) */
  --topbar-height: 46px;
  --toolbar-width: 52px;
  --statusbar-height: 28px;
  --splitter-size: 5px;
  --panel-min-width: 220px;
  --panel-max-width: 440px;

  /* Motion */
  --transition-fast: 110ms ease;
  --transition-normal: 170ms ease;

  /* Z-index Layers */
  --z-base: 1;
  --z-splitter: 15;
  --z-topbar: 30;
  --z-dropdown: 60;
  --z-tooltip: 80;
  --z-banner: 90;
  --z-dialog: 120;
  --z-loading: 150;
}
