/**
 * New Media Animation (NMA) — Design Tokens System
 * Adheres strictly to PRD Section 9, 10, 11 (Yellow, Red, Dark, Light Contrast)
 */

:root {
  /* Brand Palette */
  --nma-yellow: #FFC928;
  --nma-yellow-hover: #EBB61E;
  --nma-yellow-light: #FFF4D0;
  --nma-red: #E6392F;
  --nma-red-hover: #CD2F26;
  --nma-red-light: #FDE8E7;

  /* Neutrals & Contrast Base — DEFAULT PRIMARY IS LIGHT MODE */
  --nma-dark: #F8F9FA;
  --nma-dark-surface: #FFFFFF;
  --nma-dark-card: #FFFFFF;
  --nma-dark-border: #CBD5E1;
  --nma-text-dark: #0F172A;
  --nma-text-muted: #334155;
  --nma-text-light: #0F172A;
  --nma-text-subtle: #334155;

  --nma-bg-light: #FFF9E8;
  --nma-bg-neutral: #F1F5F9;
  --nma-bg-white: #FFFFFF;
  --nma-border-light: #CBD5E1;

  /* Typography — Inspired by Premier Creative & Animation Academies (Poppins & Plus Jakarta Sans) */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Poppins', sans-serif;
  --font-accent: 'Permanent Marker', cursive;
  
  --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 */

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-glow-yellow: 0 0 25px rgba(255, 201, 40, 0.35);
  --shadow-glow-red: 0 0 25px rgba(230, 57, 47, 0.35);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Container */
  --container-max: 1280px;
}

[data-theme="light"] {
  --nma-dark: #F8F9FA;
  --nma-dark-surface: #FFFFFF;
  --nma-dark-card: #FFFFFF;
  --nma-dark-border: #CBD5E1;
  --nma-text-dark: #0F172A;
  --nma-text-muted: #334155;
  --nma-text-light: #0F172A;
  --nma-text-subtle: #334155;
  --nma-bg-neutral: #F1F5F9;
  --nma-border-light: #CBD5E1;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --nma-dark: #0C0C0F;
  --nma-dark-surface: #141419;
  --nma-dark-card: #1A1A22;
  --nma-dark-border: #334155;
  --nma-text-dark: #FFFFFF;
  --nma-text-muted: #94A3B8;
  --nma-text-light: #F8F9FA;
  --nma-text-subtle: #CBD5E1;
  --nma-bg-light: #1A1A22;
  --nma-bg-neutral: #171720;
  --nma-bg-white: #141419;
  --nma-border-light: #334155;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
}

/* Base Reset & Core Standards */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--nma-text-dark);
  background-color: var(--nma-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Shared administrative and learning portal typography */
body.admin-body,
body.trainer-body,
body.student-body {
  --font-family-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, picture, svg, video {
  max-width: 100%;
  display: block;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

/* Accessibility: Focus outlines */
:focus-visible {
  outline: 2px solid var(--nma-yellow);
  outline-offset: 3px;
}

/* Reduced Motion Override (WCAG compliance) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
