/* ==========================================================================
   IA-MAGIQUE.COM — DESIGN SYSTEM
   Modern, professional, accessible
   ========================================================================== */

/* -----------------------------------------------------------------
   1. DESIGN TOKENS
   ----------------------------------------------------------------- */
:root {
  /* Brand colors */
  --color-primary: #0a1628;       /* Deep navy */
  --color-primary-700: #102134;
  --color-primary-500: #1e3a5f;
  --color-accent: #6366f1;         /* Indigo */
  --color-accent-light: #818cf8;
  --color-accent-dark: #4f46e5;
  --color-magic: #a855f7;          /* Purple - "magique" */
  --color-magic-light: #c084fc;
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --gradient-dark: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
  --gradient-soft: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);

  /* Neutrals */
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0a1628;
  --color-text: #0f172a;
  --color-text-light: #475569;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-border-dark: #cbd5e1;

  /* Semantic */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  /* Spacing 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;
  --space-32: 8rem;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 35px -10px rgba(0,0,0,0.15);
  --shadow-glow: 0 0 50px rgba(99, 102, 241, 0.15);

  /* Transitions */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-nav: 100;
  --z-modal: 200;
}

/* -----------------------------------------------------------------
   2. RESET & BASE
   ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-base);
  overflow-x: hidden;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-accent-dark); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { list-style: none; }

::selection { background: var(--color-accent); color: white; }

/* -----------------------------------------------------------------
   3. TYPOGRAPHY
   ----------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, var(--text-6xl)); }
h2 { font-size: clamp(1.75rem, 4vw, var(--text-5xl)); }
h3 { font-size: clamp(1.5rem, 3vw, var(--text-3xl)); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { color: var(--color-text-light); line-height: 1.7; }
strong { color: var(--color-text); font-weight: 600; }
em { font-style: italic; }

.lead { font-size: clamp(1.125rem, 2vw, 1.375rem); color: var(--color-text-light); line-height: 1.6; }
.eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* -----------------------------------------------------------------
   4. LAYOUT
   ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-6); }

section {
  padding: var(--space-24) 0;
}
section.section-sm { padding: var(--space-16) 0; }
section.section-lg { padding: var(--space-32) 0; }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-16);
}
.section-header h2 { margin-bottom: var(--space-4); }
.section-header p { font-size: var(--text-lg); }

.grid { display: grid; gap: var(--space-8); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }

/* -----------------------------------------------------------------
   5. NAVIGATION
   ----------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.nav-brand:hover { color: var(--color-accent); }
.nav-brand-icon {
  width: 32px; height: 32px;
  background: var(--gradient-brand);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 14px;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: var(--space-2);
}
@media (min-width: 900px) { .nav-menu { display: flex; } }

.nav-link {
  position: relative;
  padding: var(--space-2) var(--space-4);
  color: var(--color-text-light);
  font-weight: 500;
  font-size: var(--text-sm);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--color-text); background: var(--color-bg-alt); }
.nav-link.is-active { color: var(--color-accent); }

.nav-cta {
  display: none;
}
@media (min-width: 900px) { .nav-cta { display: inline-flex; } }

.nav-toggle {
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius);
  color: var(--color-text);
}
@media (min-width: 900px) { .nav-toggle { display: none; } }
.nav-toggle:hover { background: var(--color-bg-alt); }

.nav-mobile {
  display: none;
  padding: var(--space-4) var(--space-6) var(--space-6);
  border-top: 1px solid var(--color-border);
  background: white;
}
.nav-mobile.is-open { display: block; }
.nav-mobile-link {
  display: block;
  padding: var(--space-3);
  color: var(--color-text);
  font-weight: 500;
  border-radius: var(--radius);
}
.nav-mobile-link:hover { background: var(--color-bg-alt); }
.nav-mobile-cta { margin-top: var(--space-4); }

/* -----------------------------------------------------------------
   6. BUTTONS
   ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  white-space: nowrap;
  text-align: center;
  letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); color: white; }

.btn-dark {
  background: var(--color-primary);
  color: white;
}
.btn-dark:hover { background: var(--color-primary-700); color: white; }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-dark);
}
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-ghost {
  background: transparent;
  color: var(--color-text);
}
.btn-ghost:hover { background: var(--color-bg-alt); }

.btn-lg { padding: 1rem 2rem; font-size: var(--text-base); }
.btn-block { display: flex; width: 100%; }

/* -----------------------------------------------------------------
   7. HERO
   ----------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; right: -300px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(168,85,247,0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: var(--space-6);
}
.hero .lead { margin-bottom: var(--space-10); max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

.hero-image {
  margin-top: var(--space-16);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

/* Page hero (smaller, for inner pages) */
.page-hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  text-align: center;
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  z-index: -1;
}
.page-hero h1 { margin-bottom: var(--space-4); }
.page-hero .lead { max-width: 700px; margin: 0 auto; }

/* Article hero with cover image (for blog articles) */
.article-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
  color: white;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
  z-index: -2;
}
.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,22,40,0.4) 0%, rgba(10,22,40,0.85) 100%);
  z-index: -1;
}
.article-hero h1, .article-hero .lead, .article-hero .eyebrow {
  color: white;
}
.article-hero .lead { color: rgba(255,255,255,0.92); max-width: 800px; margin: 0 auto; }
.article-hero .eyebrow { color: var(--color-accent-light); }
.article-hero .article-meta { color: rgba(255,255,255,0.8); justify-content: center; }

/* Cover image fallback (gradient) for articles without image */
.cover-gradient {
  background: var(--gradient-dark) !important;
}

/* Featured image inside article body */
.featured-image {
  margin: var(--space-10) calc(-1 * var(--space-6));
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.featured-image img { width: 100%; display: block; }
.featured-image figcaption {
  padding: var(--space-3) var(--space-6);
  background: var(--color-bg-alt);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  font-style: italic;
  text-align: center;
}

/* Author card at the end of articles */
.author-card {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--color-bg-alt);
  border-radius: var(--radius-xl);
  margin-top: var(--space-10);
  align-items: center;
}
.author-avatar {
  width: 72px; height: 72px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: var(--text-2xl);
  flex-shrink: 0;
}
.author-name { font-weight: 700; color: var(--color-text); margin-bottom: var(--space-1); }
.author-bio { font-size: var(--text-sm); color: var(--color-text-light); }

/* -----------------------------------------------------------------
   8. CARDS
   ----------------------------------------------------------------- */
.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent-light);
  box-shadow: var(--shadow-lg);
}

.card-image {
  aspect-ratio: 16 / 10;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.card-image img { width: 100%; height: 100%; transition: transform var(--transition-slow); }
.card:hover .card-image img { transform: scale(1.05); }

.card-body { padding: var(--space-6); flex: 1; display: flex; flex-direction: column; }
.card-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: 1.3;
}
.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--color-accent); }
.card-text { color: var(--color-text-light); font-size: var(--text-sm); flex: 1; }
.card-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex; gap: var(--space-3); align-items: center;
}

/* Feature card (compact) */
.feature {
  padding: var(--space-8);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition);
}
.feature:hover {
  border-color: var(--color-accent-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.feature-icon {
  width: 56px; height: 56px;
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 28px;
  margin-bottom: var(--space-5);
  overflow: hidden;
}
.feature-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* When feature-icon contains an image (Higgsfield-generated icons),
   we remove the gradient since the image already has it baked in */
.feature-icon:has(img) {
  background: transparent;
  width: 72px; height: 72px;
}

/* Card image with AI-generated icon (replaces emoji + gradient bg) */
.card-image.is-icon {
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.card-image.is-icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}
.feature h3 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.feature p { font-size: var(--text-base); }

/* -----------------------------------------------------------------
   9. METHOD STEPS (DAC)
   ----------------------------------------------------------------- */
.method-steps { display: grid; gap: var(--space-6); }
@media (min-width: 900px) { .method-steps { grid-template-columns: repeat(3, 1fr); } }

.method-step {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  position: relative;
  transition: all var(--transition);
}
.method-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-accent-light);
}
.method-step-number {
  position: absolute;
  top: -24px; left: var(--space-10);
  width: 56px; height: 56px;
  background: var(--gradient-brand);
  color: white;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: var(--text-2xl);
  box-shadow: var(--shadow-md);
}
.method-step h3 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  font-size: var(--text-2xl);
}

/* -----------------------------------------------------------------
   10. CTA BANNER
   ----------------------------------------------------------------- */
.cta-banner {
  background: var(--gradient-dark);
  color: white;
  border-radius: var(--radius-2xl);
  padding: clamp(2.5rem, 6vw, 5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 70%);
}
.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(168,85,247,0.3) 0%, transparent 70%);
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { color: white; margin-bottom: var(--space-4); }
.cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: var(--space-8); font-size: var(--text-lg); }
.cta-banner .btn-primary { background: white; color: var(--color-primary); }
.cta-banner .btn-primary:hover { background: rgba(255,255,255,0.9); color: var(--color-primary); }

/* -----------------------------------------------------------------
   11. TESTIMONIALS
   ----------------------------------------------------------------- */
.testimonials { display: grid; gap: var(--space-6); }
@media (min-width: 900px) { .testimonials { grid-template-columns: repeat(3, 1fr); } }

.testimonial {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
}
.testimonial::before {
  content: '"';
  position: absolute;
  top: var(--space-4); right: var(--space-6);
  font-size: 80px;
  font-family: Georgia, serif;
  color: var(--color-accent-light);
  opacity: 0.3;
  line-height: 1;
}
.testimonial-text {
  font-style: italic;
  color: var(--color-text);
  margin-bottom: var(--space-5);
  position: relative;
  z-index: 1;
}
.testimonial-author {
  font-weight: 600;
  color: var(--color-text);
  font-size: var(--text-sm);
}

/* -----------------------------------------------------------------
   12. STATS / BENTO
   ----------------------------------------------------------------- */
.stats {
  display: grid;
  gap: var(--space-6);
  text-align: center;
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat-value {
  font-size: clamp(2rem, 4vw, var(--text-5xl));
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-2);
}
.stat-label { font-size: var(--text-sm); color: var(--color-text-light); }

/* -----------------------------------------------------------------
   13. CONTENT (article / blog)
   ----------------------------------------------------------------- */
.prose {
  max-width: var(--container-narrow);
  margin: 0 auto;
}
.prose h2 { margin-top: var(--space-12); margin-bottom: var(--space-4); }
.prose h3 { margin-top: var(--space-10); margin-bottom: var(--space-4); }
.prose h4 { margin-top: var(--space-8); margin-bottom: var(--space-3); }
.prose p { margin-bottom: var(--space-5); font-size: var(--text-lg); line-height: 1.75; }
.prose ul, .prose ol { margin-bottom: var(--space-6); padding-left: var(--space-6); }
.prose ul li { list-style: disc; margin-bottom: var(--space-2); color: var(--color-text-light); }
.prose ol li { list-style: decimal; margin-bottom: var(--space-2); color: var(--color-text-light); }
.prose blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-6) var(--space-8);
  border-left: 4px solid var(--color-accent);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text);
}
.prose img, .prose video, .prose iframe {
  margin: var(--space-8) 0;
  border-radius: var(--radius-lg);
  width: 100%;
}
.prose a { color: var(--color-accent); font-weight: 500; border-bottom: 1px solid currentColor; }
.prose a:hover { color: var(--color-accent-dark); }
.prose hr { border: none; height: 1px; background: var(--color-border); margin: var(--space-12) 0; }

/* -----------------------------------------------------------------
   14. FORMS
   ----------------------------------------------------------------- */
.form { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: var(--space-5); }
.form-label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--color-text);
  background: white;
  border: 1.5px solid var(--color-border-dark);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
textarea.form-control { resize: vertical; min-height: 140px; }
.form-success, .form-error {
  padding: var(--space-4);
  border-radius: var(--radius);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
}
.form-success { background: #d1fae5; color: #065f46; }
.form-error { background: #fee2e2; color: #991b1b; }

/* -----------------------------------------------------------------
   15. MEDIA EMBEDS
   ----------------------------------------------------------------- */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-lg);
}
.video-embed iframe, .video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.audio-embed {
  width: 100%;
  padding: var(--space-4);
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  margin: var(--space-4) 0;
}
.audio-embed audio { width: 100%; }

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin: var(--space-8) 0;
}
.image-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  transition: transform var(--transition);
  cursor: pointer;
}
.image-gallery img:hover { transform: scale(1.03); }

/* -----------------------------------------------------------------
   16. FOOTER
   ----------------------------------------------------------------- */
.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  padding: var(--space-20) 0 var(--space-8);
  margin-top: var(--space-24);
}
.footer-grid {
  display: grid;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand { color: white; font-weight: 800; font-size: var(--text-xl); margin-bottom: var(--space-4); display: inline-flex; align-items: center; gap: var(--space-2); }
.footer-tagline { font-size: var(--text-sm); max-width: 320px; line-height: 1.6; }

.footer h4 {
  color: white;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-5);
}
.footer-links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-links a { color: rgba(255,255,255,0.7); font-size: var(--text-sm); transition: color var(--transition); }
.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
}
.footer-social { display: flex; gap: var(--space-4); }
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  color: white;
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--color-accent); transform: translateY(-2px); }

/* -----------------------------------------------------------------
   17. PILL / BADGES / EMOJI HEADINGS
   ----------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(99,102,241,0.1);
  color: var(--color-accent-dark);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
}
.pill-dot {
  width: 8px; height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.emoji-heading {
  display: inline-flex;
  width: 64px; height: 64px;
  align-items: center; justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  font-size: 32px;
  margin-bottom: var(--space-5);
}

/* -----------------------------------------------------------------
   18. UTILITIES
   ----------------------------------------------------------------- */
.bg-alt { background: var(--color-bg-alt); }
.bg-dark { background: var(--color-primary); color: white; }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: white; }
.bg-dark p { color: rgba(255,255,255,0.8); }

.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Scroll-up button */
.scroll-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 48px; height: 48px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: var(--z-nav);
}
.scroll-top.is-visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--color-accent); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* -----------------------------------------------------------------
   19. BLOG LIST
   ----------------------------------------------------------------- */
.blog-grid {
  display: grid;
  gap: var(--space-8);
}
@media (min-width: 700px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

/* Article meta */
.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

/* -----------------------------------------------------------------
   20. RESPONSIVE OVERRIDES
   ----------------------------------------------------------------- */
@media (max-width: 700px) {
  section { padding: var(--space-16) 0; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .footer { padding-top: var(--space-12); margin-top: var(--space-16); }
  .footer-bottom { flex-direction: column; text-align: center; }
}
