/* ==========================================================================
   AEG Equipamiento y Proyectos — Design Tokens
   Palette anchored directly to the AEG schematic emblem:
   - Obsidian / Graphite Slate (#0c0f16, #161b24, #222834)
   - Electric Amber Gold (#fdb913)
   - Signal Crimson (#e82c4a / #ff4f6b)
   - Technical Silver (#f3f5f9 / #b2bccd)
   ========================================================================== */

@layer reset, base, theme, layout, components, effects;

@layer theme {
  :root {
    color-scheme: dark;

    /* Gradient color-space progressive enhancement */
    --in-oklab: ;
    --in-oklch: ;

    /* Brand Palette (Literal + Semantic Tokens) */
    --bg-canvas: #0b0e14;
    --bg-surface: #141923;
    --bg-elevated: #1c2230;
    --bg-logo-slate: #262a33;
    --bg-glass: rgb(20 25 35 / 0.78);
    --bg-glass-strong: rgb(14 18 26 / 0.9);

    --text-primary: #f3f5f9;
    --text-secondary: #b4bfd1;
    --text-muted: #8b97ab;

    --accent-amber: #fdb913;
    --accent-amber-bright: #ffd154;
    --accent-amber-text: #0b0e14;
    --accent-crimson: #e82c4a;
    --accent-crimson-text: #ff6b81;

    --border-subtle: rgb(243 245 249 / 0.12);
    --border-strong: rgb(243 245 249 / 0.24);
    --border-amber: rgb(253 185 19 / 0.48);
    --border-crimson: rgb(232 44 74 / 0.48);

    --status-valid: #22c55e;
    --status-error: #ff5c74;
    --status-error-bg: rgb(232 44 74 / 0.14);

    /* Typography */
    --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    /* Fluid Type Scale */
    --text-xs: clamp(0.75rem, 0.71rem + 0.15vw, 0.84rem);
    --text-sm: clamp(0.875rem, 0.83rem + 0.2vw, 0.96rem);
    --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
    --text-xl: clamp(1.35rem, 1.2rem + 0.65vw, 1.75rem);
    --text-2xl: clamp(1.75rem, 1.45rem + 1.4vw, 2.6rem);
    --text-hero: clamp(2.35rem, 1.7rem + 2.8vw, 4.1rem);

    /* Layout & Spacing */
    --container-max: 80rem;
    --gutter: clamp(1rem, 3vw, 2.5rem);
    --header-height: 4.75rem;
    --radius-sm: 0.5rem;
    --radius-md: 0.9rem;
    --radius-lg: 1.35rem;
    --radius-pill: 999px;

    /* Shadows & Glows */
    --shadow-card: 0 18px 42px -18px rgb(0 0 0 / 0.72);
    --shadow-glow-amber: 0 0 36px -8px rgb(253 185 19 / 0.35);
    --shadow-glow-crimson: 0 0 36px -8px rgb(232 44 74 / 0.35);

    /* Motion */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  }

  @supports (linear-gradient(in oklab, white, black)) {
    :root {
      --in-oklab: in oklab;
      --in-oklch: in oklch;
    }
  }

  @media (forced-colors: active) {
    :root {
      --bg-canvas: Canvas;
      --bg-surface: Canvas;
      --bg-elevated: Canvas;
      --text-primary: CanvasText;
      --text-secondary: CanvasText;
      --text-muted: GrayText;
      --accent-amber: Highlight;
      --accent-crimson: LinkText;
      --accent-crimson-text: LinkText;
      --border-subtle: ButtonBorder;
      --border-strong: ButtonBorder;
      --border-amber: Highlight;
    }
  }
}
