/* =============================================================
   ImmersIA — Colors & Type
   "Luminous Purple" — One vision. One color. Infinite possibilities.
   ============================================================= */

/* ---- Google Fonts (substitutions; flag to brand team) -------- */
/* Brand guide lists Inter Display, GT Walsheim, or DM Sans.
   DM Sans + Inter are freely available — used here as defaults.
   Roboto Slab approximates the serif wordmark "immersIA" for cases
   where the logo is rebuilt in HTML. Always prefer the supplied
   logo PNG/SVG. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&family=Inter:wght@400;500;600;700;800&family=Roboto+Slab:wght@400;500;600;700&display=swap');

:root {
  /* =====================================================
     COLOR — Luminous Purple system
     ===================================================== */

  /* Brand core (from brand guide) */
  --immersia-purple: #5B21B6;        /* Dominant Surface — 60% */
  --immersia-white:  #FFFFFF;        /* Main Contrast — 30% */
  --immersia-blue:   #1E40AF;        /* Selective Accent — 10% (links, data, CTAs) */

  /* Extended purple scale (derived; harmonious with #5B21B6) */
  --purple-50:  #F5F3FF;
  --purple-100: #EDE9FE;
  --purple-200: #DDD6FE;
  --purple-300: #C4B5FD;
  --purple-400: #A78BFA;
  --purple-500: #8B5CF6;
  --purple-600: #7C3AED;             /* Tagline accent — "L'IA pour tous" */
  --purple-700: #6D28D9;
  --purple-800: #5B21B6;             /* = brand purple */
  --purple-900: #4C1D95;
  --purple-950: #2E1065;

  /* Extended blue scale (around #1E40AF) */
  --blue-50:  #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-300: #93C5FD;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #1E40AF;               /* = brand blue */
  --blue-900: #1E3A8A;

  /* Neutrals (warm-neutral, leaning slate) */
  --ink-0:    #FFFFFF;
  --ink-50:   #FAFAFB;
  --ink-100:  #F4F4F6;
  --ink-200:  #E6E6EC;
  --ink-300:  #CDCDD6;
  --ink-400:  #9A9AA8;
  --ink-500:  #6E6E80;
  --ink-600:  #4A4A57;
  --ink-700:  #2F2F38;
  --ink-800:  #1B1B22;
  --ink-900:  #0E0E13;

  /* Semantic */
  --color-success: #15803D;
  --color-warning: #B45309;
  --color-danger:  #B91C1C;
  --color-info:    var(--blue-800);

  /* =====================================================
     SEMANTIC TOKENS — surfaces, text, lines
     ===================================================== */

  /* Surfaces */
  --bg-canvas:    var(--ink-0);
  --bg-subtle:    var(--ink-50);
  --bg-muted:     var(--ink-100);
  --bg-tinted:    var(--purple-50);          /* Pale purple wash */
  --bg-inverted:  var(--purple-800);         /* Hero / dark surface */
  --bg-inverted-deep: var(--purple-950);

  /* Foreground / text */
  --fg-1: var(--ink-900);                    /* Primary text */
  --fg-2: var(--ink-700);                    /* Secondary text */
  --fg-3: var(--ink-500);                    /* Tertiary / meta */
  --fg-on-purple: var(--ink-0);              /* Text on purple surfaces */
  --fg-on-purple-muted: rgba(255,255,255,0.72);

  /* Accent / interactive */
  --accent: var(--blue-800);                 /* Links, key actions */
  --accent-hover: var(--blue-700);
  --brand: var(--purple-800);
  --brand-hover: var(--purple-700);
  --brand-press: var(--purple-900);
  --tagline: var(--purple-600);              /* Bright purple for the "L'IA POUR TOUS" energy */

  /* Lines */
  --line-1: var(--ink-200);
  --line-2: var(--ink-300);
  --line-on-purple: rgba(255,255,255,0.18);

  /* =====================================================
     TYPE
     ===================================================== */
  --font-display: 'DM Sans', 'Inter Display', 'GT Walsheim', system-ui, sans-serif;
  --font-sans:    'DM Sans', 'Inter', system-ui, sans-serif;
  --font-serif:   'Roboto Slab', 'Source Serif Pro', Georgia, serif; /* logo-style wordmark only */
  --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Type scale — modular, 1.25 */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   20px;
  --fs-xl:   24px;
  --fs-2xl:  30px;
  --fs-3xl:  38px;
  --fs-4xl:  48px;
  --fs-5xl:  64px;
  --fs-6xl:  84px;
  --fs-display: 112px;

  --lh-tight: 1.05;
  --lh-snug:  1.2;
  --lh-base:  1.5;
  --lh-loose: 1.65;

  --tracking-tight: -0.02em;
  --tracking-snug:  -0.01em;
  --tracking-normal: 0;
  --tracking-wide:  0.04em;
  --tracking-caps:  0.12em;

  /* =====================================================
     SPACING — 4pt grid
     ===================================================== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* =====================================================
     RADII — soft-rounded, never pill unless functional
     ===================================================== */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 999px;

  /* =====================================================
     SHADOWS — restrained, mostly flat
     ===================================================== */
  --shadow-sm: 0 1px 2px rgba(46, 16, 101, 0.06);
  --shadow-md: 0 4px 12px rgba(46, 16, 101, 0.08), 0 1px 2px rgba(46, 16, 101, 0.05);
  --shadow-lg: 0 12px 32px rgba(46, 16, 101, 0.12), 0 2px 6px rgba(46, 16, 101, 0.06);
  --shadow-glow: 0 0 0 4px rgba(124, 58, 237, 0.20);

  /* =====================================================
     MOTION
     ===================================================== */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 220ms;
  --dur-slow: 420ms;
}

/* =====================================================
   SEMANTIC ELEMENT STYLES
   ===================================================== */
html, body {
  font-family: var(--font-sans);
  color: var(--fg-1);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(var(--fs-4xl), 6vw, var(--fs-6xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
  text-wrap: balance;
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl));
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
  text-wrap: balance;
}

h3, .h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
  color: var(--fg-1);
}

h4, .h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  color: var(--fg-1);
}

h5, .h5 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  color: var(--fg-1);
}

p, .p {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--fg-2);
  text-wrap: pretty;
}

.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-base);
  color: var(--fg-2);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--tagline);
}

.tagline {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--tagline);
  font-size: var(--fs-sm);
}

small, .small { font-size: var(--fs-sm); color: var(--fg-3); }
code, .mono { font-family: var(--font-mono); font-size: 0.95em; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--accent-hover); }
