/* ============================================================
   Voca-Voca Design Tokens
   Typography + Colors + Spacing + Radii + Shadow + Motion
   Reference this file from any prototype: <link rel="stylesheet" href="colors_and_type.css">
   ============================================================ */

/* Fonts (Bricolage Grotesque + Crimson Pro) loaded via Google Fonts CDN in index.html */

:root {
  /* ---------- Brand colors ---------- */
  --indigo-50:  #eef0ff;
  --indigo-100: #e0e3ff;
  --indigo-200: #c3c8fe;
  --indigo-300: #a5abfc;
  --indigo-400: #818cf8;
  --indigo-500: #6366f1;   /* indigo-light */
  --indigo-600: #4f46e5;   /* PRIMARY brand */
  --indigo-700: #4338ca;
  --indigo-800: #3730a3;   /* indigo-dark */
  --indigo-900: #1f1147;

  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;   /* premium accent */
  --violet-600: #7c3aed;

  /* Premium gradient */
  --gradient-premium: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-hero:    linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);

  /* ---------- Neutrals ---------- */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* ---------- Semantic ---------- */
  --success: #10b981;
  --success-soft: #d1fae5;
  --warning: #f59e0b;       /* amber — context highlight */
  --warning-soft: #fef3c7;
  --warning-bg: #fffbeb;
  --warning-border: #fcd34d;
  --danger:  #ef4444;
  --danger-soft: #fee2e2;
  --info:    #3b82f6;
  --info-soft: #dbeafe;

  /* Mastery / SR states */
  --state-new:      #3b82f6;
  --state-new-bg:   #dbeafe;
  --state-learning: #f59e0b;
  --state-learning-bg: #fef3c7;
  --state-mastered:    #8b5cf6;
  --state-mastered-bg: #ede9fe;

  /* ---------- Surfaces (light) ---------- */
  --bg:         #ffffff;
  --bg-muted:   var(--gray-50);
  --surface:    #ffffff;
  --surface-2:  var(--gray-50);
  --surface-3:  var(--gray-100);
  --border:     var(--gray-200);
  --border-strong: var(--gray-300);

  /* Foreground */
  --fg-1: var(--gray-900);    /* primary text */
  --fg-2: var(--gray-700);    /* body */
  --fg-3: var(--gray-500);    /* secondary */
  --fg-4: var(--gray-400);    /* placeholder */
  --fg-on-brand: #ffffff;
  --link: var(--indigo-600);
  --link-hover: var(--indigo-700);

  /* ---------- Typography ---------- */
  --font-sans:  "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Crimson Pro", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Scale (modular ~1.2) */
  --fs-2xs: 11px;
  --fs-xs:  12px;
  --fs-sm:  14px;
  --fs-base:16px;
  --fs-md:  18px;
  --fs-lg:  20px;
  --fs-xl:  24px;
  --fs-2xl: 30px;
  --fs-3xl: 36px;
  --fs-4xl: 48px;
  --fs-5xl: 64px;
  --fs-6xl: 80px;

  --lh-tight: 1.1;
  --lh-snug:  1.25;
  --lh-base:  1.5;
  --lh-relaxed: 1.65;

  --ls-tight: -0.025em;
  --ls-base:  -0.01em;
  --ls-wide:  0.04em;
  --ls-caps:  0.08em;

  /* ---------- Spacing (4pt grid) ---------- */
  --space-0: 0;
  --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;

  /* ---------- Radii ---------- */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  12px;   /* cards */
  --radius-xl:  16px;   /* large cards */
  --radius-2xl: 20px;
  --radius-pill: 999px;

  /* ---------- Shadows ---------- */
  --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 4px 12px rgba(17, 24, 39, 0.06), 0 2px 4px rgba(17, 24, 39, 0.04);
  --shadow-lg: 0 12px 32px rgba(17, 24, 39, 0.08), 0 4px 8px rgba(17, 24, 39, 0.04);
  --shadow-xl: 0 24px 48px rgba(17, 24, 39, 0.12), 0 8px 16px rgba(17, 24, 39, 0.06);
  --shadow-focus: 0 0 0 3px rgba(79, 70, 229, 0.25);
  --shadow-focus-amber: 0 0 0 3px rgba(245, 158, 11, 0.25);

  /* ---------- Motion ---------- */
  --ease-out:  cubic-bezier(.2,.7,.2,1);
  --ease-in-out: cubic-bezier(.4,0,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --dur-fast:   120ms;
  --dur-base:   200ms;
  --dur-slow:   320ms;
}

/* ---------- Dark mode ---------- */
:root[data-theme="dark"],
.theme-dark {
  --bg:         #0f1219;
  --bg-muted:   #131725;
  --surface:    #171c28;
  --surface-2:  #1d2333;
  --surface-3:  #232a3d;
  --border:     #252d3d;
  --border-strong:#323a52;

  --fg-1: #eef0f4;
  --fg-2: #c5cad7;
  --fg-3: #8892a4;
  --fg-4: #5a657a;

  --indigo-600: #818cf8;   /* primary shifts lighter on dark */
  --link: #a5abfc;
  --link-hover: #c3c8fe;

  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.55);

  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0,0,0,0.3);
}

/* ============================================================
   Semantic element styles — use these as defaults
   ============================================================ */
html, body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--fg-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, .h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(40px, 5vw, var(--fs-5xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
  margin: 0;
}
h2, .h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, var(--fs-3xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
  margin: 0;
}
h3, .h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
  margin: 0;
}
h4, .h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0;
}
h5, .h5 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0;
}

p, .p {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
  margin: 0;
}

.subtitle, .tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  color: var(--fg-2);
}

.definition {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--fg-1);
}

.example {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--fg-3);
}

.pronunciation {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-md);
  color: var(--fg-3);
}

.eyebrow, .overline {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--fg-3);
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  color: var(--fg-1);
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* Context highlight motif — recurring across the product */
.context-highlight {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--gray-800);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
}

/* Definition card motif — left indigo accent */
.def-card {
  background: var(--surface-2);
  border-left: 4px solid var(--indigo-600);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm) var(--radius-md) var(--radius-md) var(--radius-sm);
}

/* Premium pill */
.premium-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gradient-premium);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
