/**
 * Anime Phoenix — Design Tokens System
 * Signature Crimson Red & Deep Obsidian Black Palette (Aligned with Main Website)
 *
 * Contrast policy (WCAG 2.1 AA against --bg-primary #0a0a0c):
 *   --color-primary        #b6092d   2.89:1  surfaces, borders, glows ONLY
 *   --color-primary-hover  #d3123b   3.69:1  large text (>=24px or >=18.66px bold)
 *   --color-primary-text   #ef2b56   4.85:1  body-size text and links
 *   --text-dim             #7c7c90   4.84:1  smallest supporting text
 * Never use --color-primary for body-size text; it fails AA by a wide margin.
 */

:root {
  /* Surface & Background Palette (Deep Pitch Black & Charcoal) */
  --bg-primary: #0a0a0c;
  --bg-secondary: #0f0f14;
  --bg-tertiary: #15151c;
  --bg-card: rgba(18, 18, 24, 0.75);
  --bg-card-hover: rgba(26, 26, 36, 0.9);
  --bg-card-solid: #161620;
  --bg-elevated: #1e1e28;
  --bg-glass: rgba(10, 10, 14, 0.8);
  --bg-glass-heavy: rgba(8, 8, 11, 0.95);
  --bg-footer: #020202;
  --bg-footer-bottom: rgba(8, 8, 8, 0.9);

  /* Michi section scale - fills the gaps between 6rem and 8rem steps.
     (michi.css composes spacing from these; missing values collapse to 0.) */
  --space-7: 1.75rem; /* 28px */
  --space-9: 2.25rem; /* 36px */

  /* Brand alias - michi.css refers to the crimson by name. */
  --phoenix-red: #b6092d;
  --phoenix-red-dark: #8a0621;

  /* Primary Crimson Red Palette (Official Anime Phoenix Brand: #b6092d) */
  --color-primary: #b6092d;
  --color-primary-hover: #d3123b;
  --color-primary-text: #ef2b56;
  --color-primary-dark: #8a0621;
  --color-primary-deep: #5e0417;
  --color-crimson: #b6092d;
  --color-crimson-light: #d3123b;
  --color-crimson-dark: #8a0621;
  --color-accent: #e21844;

  /* Complementary Golden & Ember Sparks */
  --color-gold: #ffb700;
  --color-gold-light: #ffd000;
  --color-ember: #c90e36;

  /* Typography / Content Contrast */
  --text-primary: #ffffff;
  --text-secondary: #dcdce6;
  --text-muted: #9494a6;
  --text-dim: #7c7c90;
  --text-accent: #ef2b56;
  --text-flame: #ef2b56;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-active: rgba(182, 9, 45, 0.45);
  --border-red: rgba(182, 9, 45, 0.75);
  --border-gold: rgba(255, 183, 0, 0.5);
  --border-footer: rgba(182, 9, 45, 0.2);

  /* Gradients (Red & Black Cinematic Identity) */
  --grad-red-primary: linear-gradient(135deg, #b6092d 0%, #8a0621 100%);
  --grad-red-glow: linear-gradient(135deg, #d3123b 0%, #b6092d 50%, #5e0417 100%);
  --grad-red-dark: linear-gradient(180deg, rgba(182, 9, 45, 0.15) 0%, rgba(10, 10, 12, 0.8) 100%);
  --grad-gold-royal: linear-gradient(135deg, #ffd000 0%, #ffb700 45%, #c98600 100%);
  --grad-hero-radial: radial-gradient(circle at 50% 30%, rgba(182, 9, 45, 0.18) 0%, rgba(94, 4, 23, 0.06) 45%, transparent 75%);
  --grad-ascension: radial-gradient(ellipse at 50% 50%, rgba(182, 9, 45, 0.22) 0%, rgba(138, 6, 33, 0.08) 50%, transparent 80%);
  --grad-card-overlay: linear-gradient(180deg, rgba(182, 9, 45, 0.05) 0%, transparent 100%);

  /* Radiance & Red Glows */
  --glow-red-sm: 0 0 15px rgba(182, 9, 45, 0.3);
  --glow-red-md: 0 0 28px rgba(182, 9, 45, 0.45);
  --glow-red-lg: 0 0 50px rgba(182, 9, 45, 0.65);
  --glow-sunfire: 0 0 45px rgba(182, 9, 45, 0.6), 0 0 20px rgba(255, 183, 0, 0.5);
  --glow-gold-md: 0 0 26px rgba(255, 183, 0, 0.45);
  --shadow-card: 0 12px 32px -4px rgba(0, 0, 0, 0.7);
  --shadow-elevated: 0 20px 48px -6px rgba(0, 0, 0, 0.85);

  /* Typography Systems (self-hosted variable fonts, see fonts.css) */
  --font-arabic: 'Cairo', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', 'Cairo', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;

  /* Font Sizes */
  --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: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 3.75rem;   /* 60px */
  --text-7xl: 4.5rem;    /* 72px */

  /* Spacing Scale */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */
  --space-32: 8rem;    /* 128px */

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Animation Timings */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 180ms var(--ease-smooth);
  --transition-normal: 300ms var(--ease-smooth);
  --transition-slow: 500ms var(--ease-smooth);

  /* Layout Constraints */
  --max-width-container: 1280px;
  --max-width-narrow: 960px;
  --max-width-wide: 1440px;

  /* Fixed header height, used for scroll-margin on anchor targets */
  --header-height: 74px;
  --header-height-scrolled: 66px;

  /* Z-Index Hierarchy */
  --z-negative: -1;
  --z-normal: 1;
  --z-above: 10;
  --z-sticky: 100;
  --z-drawer: 500;
  --z-modal: 1000;
  --z-toast: 1100;
}
