/* ==========================================================================
   SOLIDFORM 3D — DESIGN SYSTEM TOKENS
   Aesthetic: Premium Industrial Design × Editorial Web Design × Interactive Manufacturing
   Visual Reference: Precision Lab × Mixpanel Editorial Plum & High-Contrast Porcelain
   WCAG 2.2 AA Contrast Calibrated
   ========================================================================== */

:root {
  /* ==========================================================================
     1. Core Canonical Brand Palette (WCAG 2.2 AA Contrast Calibrated)
     ========================================================================== */
  --color-ink-plum: #20152D;
  --color-deep-aubergine: #2A1B3B;
  --color-electric-violet: #7048F5;
  --color-soft-violet: #B7A3FF;
  --color-pale-lavender: #E9E2FF;
  --color-porcelain: #F7F5F8;
  --color-pure-white: #FFFFFF;
  --color-primary-text: #211A2B;
  --color-secondary-text: #625B6B;
  --color-muted-text: #746C7D;
  --color-border: #E2DCE8;
  --color-border-grey: #E2DCE8;
  --color-neutral-surface: #F0EDF3;

  /* Semantic High-Contrast Functional Status Colors */
  --color-success: #167D65;
  --color-success-bg: #E6F5EF;
  --color-warning: #946200;
  --color-warning-bg: #FFF3D7;
  --color-error: #B42335;
  --color-error-bg: #FDEBED;

  /* Legacy & Browser QA Test Compatibility Tokens */
  --color-deep-plum: #190D2B;
  --color-dark-aubergine: #2A1B3B;
  --color-primary-violet: #7652F6;
  --color-soft-lavender: #A995FF;
  --color-warm-porcelain: #F5F2F3;
  --color-success-mint: #B5E8D5;

  /* ==========================================================================
     2. Semantic Surface & Ink Tokens (High Contrast)
     ========================================================================== */
  --surface-page: var(--color-porcelain);           /* #F7F5F8 */
  --surface-card: var(--color-pure-white);           /* #FFFFFF */
  --surface-subtle: var(--color-neutral-surface);    /* #F0EDF3 */
  --surface-lavender-tint: #F3EFFC;
  --surface-plum: var(--color-ink-plum);             /* #20152D */
  --surface-aubergine: var(--color-deep-aubergine);  /* #2A1B3B */
  --surface-plum-elevated: #2E1B44;
  --surface-plum-border: #422668;

  --ink-primary: var(--color-primary-text);          /* #211A2B - Contrast 14:1 on white */
  --ink-secondary: var(--color-secondary-text);      /* #625B6B - Contrast 5.8:1 on white */
  --ink-muted: var(--color-muted-text);              /* #746C7D - Contrast 4.6:1 on white */
  --ink-on-plum: var(--color-pure-white);            /* #FFFFFF - Contrast 14.8:1 on plum */
  --ink-on-plum-secondary: #D8CCE8;                  /* #D8CCE8 - Contrast 10.3:1 on plum */

  /* ==========================================================================
     3. Interactive Accent States (Violet-Led, Zero Competing Orange)
     ========================================================================== */
  --accent-violet: var(--color-electric-violet);      /* #7048F5 */
  --accent-violet-hover: #5E34EB;
  --accent-violet-active: #4F25DC;
  --accent-lavender: var(--color-soft-violet);       /* #B7A3FF */
  --accent-pale: var(--color-pale-lavender);         /* #E9E2FF */

  /* ==========================================================================
     4. Semantic Validation & Operational Status Tokens
     ========================================================================== */
  --status-success-bg: var(--color-success-bg);      /* #E6F5EF */
  --status-success-border: var(--color-success);     /* #167D65 */
  --status-success-ink: #0F5C4A;
  --status-success-surface: var(--color-success-bg);

  --status-warning-bg: var(--color-warning-bg);      /* #FFF3D7 */
  --status-warning-border: var(--color-warning);     /* #946200 */
  --status-warning-ink: #664300;

  --status-error-bg: var(--color-error-bg);          /* #FDEBED */
  --status-error-border: var(--color-error);         /* #B42335 */
  --status-error-ink: #801422;

  --status-info-bg: var(--color-pale-lavender);      /* #E9E2FF */
  --status-info-border: var(--color-soft-violet);    /* #B7A3FF */
  --status-info-ink: #28165A;

  /* ==========================================================================
     5. Typography Families
     ========================================================================== */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ==========================================================================
     6. Responsive Type Scale
     ========================================================================== */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: clamp(1.85rem, 2.5vw + 0.8rem, 2.5rem);
  --text-4xl: clamp(2.25rem, 3.2vw + 1rem, 3.25rem);
  --text-display: clamp(2.65rem, 4.5vw + 1rem, 4.35rem);

  /* ==========================================================================
     7. Spacing & Layout Scale
     ========================================================================== */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ==========================================================================
     8. Shape Language
     ========================================================================== */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;

  /* ==========================================================================
     9. Subtle Shadows & Calibrated Gradients
     ========================================================================== */
  --shadow-xs: 0 1px 3px rgba(32, 21, 45, 0.05);
  --shadow-card: 0 10px 30px -5px rgba(32, 21, 45, 0.07), 0 2px 6px rgba(32, 21, 45, 0.04);
  --shadow-card-hover: 0 18px 40px -8px rgba(112, 72, 245, 0.16), 0 4px 12px rgba(32, 21, 45, 0.08);
  --shadow-modal: 0 24px 60px rgba(32, 21, 45, 0.32);

  --gradient-plum-hero: radial-gradient(circle at 78% 24%, rgba(112, 72, 245, 0.24) 0%, rgba(42, 27, 59, 0.95) 52%, #20152D 100%);
  --gradient-plum-cta: linear-gradient(135deg, #20152D 0%, #2A1B3B 60%, #381E60 100%);
  --gradient-lavender-soft: linear-gradient(180deg, #FFFFFF 0%, #F5F1FD 100%);

  /* ==========================================================================
     10. Motion
     ========================================================================== */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 260ms;
  --duration-slow: 450ms;

  --container-max: 1340px;
  --header-height: 72px;

  /* ==========================================================================
     11. Compatibility Aliases
     ========================================================================== */
  --color-mint: var(--color-success-mint);
  --color-warning: var(--status-warning-border);
  --color-danger: var(--status-error-border);
  --font-body: var(--font-sans);
  --radius-full: var(--radius-pill);
  --surface-plum-translucent: rgba(42, 27, 59, 0.75);
  --transition-fast: var(--duration-fast);
}

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