/* ============================================================================
   ICONIC Human Design Education, PMA — Centralized Design System
   Source of truth for ALL pages. DO NOT override these values in page-specific CSS.

   Typography: JovianArchive.com (Rubik headings + Barlow body)
   Colors: HumanDesignMastery.com (Purple/Teal on Black)
   ============================================================================ */

/* ── Google Fonts ───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

/* ── Design Tokens (CSS Custom Properties) ──────────────────────────────────── */
:root {
  /* ── Warm Cosmic Bento Palette ─────────────────────────────────────────── */
  --bg-cosmic-deep: #1A0F1F;
  --bg-cosmic-mid: #2E1834;
  --purple-rich: #4C275C;
  --purple-accent: #6A3C99;
  --gold-bronze: #A57C00;
  --gold-soft: #D4AF37;
  --teal-primary: #00BFA5;
  --teal-soft: #26A69A;
  --text-cream: #F5F0E9;
  --text-warm: #EDE4D9;

  /* ── Primary Colors — mapped to Warm Cosmic Bento ──────────────────────── */
  --primary: #6A3C99;
  --primary-dark: #4C275C;
  --primary-light: #7a4d9e;
  --accent: #00BFA5;
  --accent-dark: #26A69A;

  /* Legacy aliases (backward compat with existing markup) */
  --gold: #D4AF37;
  --gold-light: #00BFA5;

  /* Backgrounds — Warm Cosmic Deep */
  --bg: #1A0F1F;
  --deep: #120A16;
  --surface: #2E1834;
  --surface-2: #3A2244;
  --surface-3: #4C275C;

  /* Text — Warm Cream */
  --text: #F5F0E9;
  --text-body: #EDE4D9;
  --text-muted: #C4B8A8;
  --text-secondary: #a090b8;

  /* Borders */
  --border: rgba(212, 175, 55, 0.15);
  --border-strong: rgba(212, 175, 55, 0.3);
  --border-subtle: rgba(212, 175, 55, 0.08);

  /* Status */
  --error: #fa3246;
  --success: #00BFA5;
  --warning: #fcd34d;
  --info: #93c5fd;

  /* Typography — Inter body, Playfair Display headings */
  --font-heading: 'Playfair Display', 'Rubik', Georgia, serif;
  --font-body: 'Inter', 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui: 'Inter', 'Rubik', -apple-system, sans-serif;

  /* Spacing */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-bento: 20px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(99, 58, 133, 0.15);
  --shadow-lg: 0 8px 30px rgba(99, 58, 133, 0.35);

  /* ── Warm Cosmic Bento Tokens (Phase 1 + 2) ──────────────────────────── */
  --bg-cosmic-deep:    #07030f;
  --bento-card-1:      #4C275C;
  --bento-card-2:      #3A1E4A;
  --bento-card-3:      #5E3578;
  --bento-card-4:      #2A1240;
  --bento-cream:       #F5F0E9;
  --bento-cream-muted: rgba(245,240,233,0.7);
  --bento-gold:        #D4AF37;
  --bento-gold-light:  #EDD96A;
  --bento-teal:        #00BFA5;
  --bento-teal-dim:    rgba(0,191,165,0.15);
  --bento-radius:      20px;
  --bento-glow-purple: 0 0 40px rgba(76,39,92,0.6), 0 4px 24px rgba(0,0,0,0.4);
  --bento-glow-teal:   0 0 30px rgba(0,191,165,0.2), 0 4px 20px rgba(0,0,0,0.3);
  --font-serif:        'Playfair Display', Georgia, serif;
  --header-height:     68px;
}

/* ── Light Mode Overrides ────────────────────────────────────────────────────── */
/* Modeled after JovianArchive.com: white/off-white bg, dark text, clean readable typography */
[data-theme="light"] {
  /* Backgrounds — warm off-white (JovianArchive-inspired) */
  --bg: #FAFAFA;
  --deep: #F5F2EE;
  --surface: #FFFFFF;
  --surface-2: #F5F2EE;
  --surface-3: #EDE8E2;

  /* Text — high contrast, dark and readable */
  --text: #1a1a1a;
  --text-body: #2d2d2d;
  --text-muted: #555555;
  --text-secondary: #777777;

  /* Headings — deep purple (brand) instead of gold on light */
  --gold-soft: #3d1f5c;
  --gold-bronze: #5a3d00;
  --text-cream: #1a1a1a;
  --text-warm: #2d2d2d;

  /* Bento tokens — light mode */
  --bg-cosmic-deep: #FAFAFA;
  --bg-cosmic-mid: #F5F2EE;
  --bento-card-1: #FFFFFF;
  --bento-card-2: #F8F6F3;
  --bento-card-3: #F0EDE8;
  --bento-card-4: #FAFAFA;
  --bento-cream: #2d2d2d;
  --bento-cream-muted: rgba(45,45,45,0.65);
  --bento-gold: #3d1f5c;
  --bento-gold-light: #6A3C99;
  --bento-teal: #0d8f80;
  --bento-teal-dim: rgba(13,143,128,0.1);
  --bento-glow-purple: 0 2px 20px rgba(106,60,153,0.08);
  --bento-glow-teal: 0 2px 20px rgba(0,191,165,0.08);

  /* Primary — keep brand purple legible on light */
  --primary: #5938C8;
  --primary-dark: #3d1f5c;
  --primary-light: #7a5dbb;
  --accent: #0d8f80;
  --accent-dark: #0a7a6d;

  /* Legacy aliases */
  --gold: #5938C8;
  --gold-light: #0d8f80;

  /* Borders — subtle, elegant */
  --border: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.20);
  --border-subtle: rgba(0, 0, 0, 0.06);

  /* Shadows — soft, light */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

  /* Status colors adjusted for light bg */
  --error: #dc2626;
  --success: #059669;
  --warning: #d97706;
  --info: #2563eb;
}

/* ── Light Mode: Hide dark-theme decorative elements ───────────────────────── */
[data-theme="light"] .cosmic-stars,
[data-theme="light"] .cosmic-nebula,
[data-theme="light"] .cosmic-bg::before,
[data-theme="light"] .bg-glow,
[data-theme="light"] .bg-glow-2,
[data-theme="light"] .bg-glow-nebula,
[data-theme="light"] #galaxy-canvas,
[data-theme="light"] #hd-bg-canvas {
  display: none !important;
}

/* ── Light Mode: Navigation ────────────────────────────────────────────────── */
[data-theme="light"] .site-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .site-nav .logo { color: #3d1f5c; }
[data-theme="light"] .site-nav .nav-links a { color: #555; }
[data-theme="light"] .site-nav .nav-links a:hover { color: #5938C8; }

/* ── Light Mode: Blog Nav ──────────────────────────────────────────────────── */
[data-theme="light"] .blog-nav {
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .blog-nav-logo { color: #3d1f5c !important; }
[data-theme="light"] .blog-nav-links a { color: #555 !important; }
[data-theme="light"] .blog-nav-links a:hover,
[data-theme="light"] .blog-nav-links a.active { color: #5938C8 !important; }

/* ── Light Mode: Bento components ──────────────────────────────────────────── */
[data-theme="light"] .bento-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .bento-card::before { background: none; }
[data-theme="light"] .bento-card:hover {
  border-color: rgba(89, 56, 200, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .bento-card p,
[data-theme="light"] .bento-card li { color: #2d2d2d; }
[data-theme="light"] .bento-card-teal {
  background: #F8FFFE;
  border-color: rgba(13, 143, 128, 0.15);
}
[data-theme="light"] .bento-card-hero {
  background: linear-gradient(135deg, #F8F6FF 0%, #FFFFFF 100%);
  border-color: rgba(89, 56, 200, 0.12);
}

/* ── Light Mode: Bento Hero ────────────────────────────────────────────────── */
[data-theme="light"] .bento-hero {
  background: linear-gradient(180deg, #F5F2FF 0%, #FAFAFA 100%);
}
[data-theme="light"] .bento-hero::before { background: none; }
[data-theme="light"] .bento-hero h1,
[data-theme="light"] .bento-hero .bento-hero-title { color: #1a1a1a !important; }
[data-theme="light"] .bento-hero p,
[data-theme="light"] .bento-hero .bento-hero-sub { color: #555 !important; opacity: 1; }

/* ── Light Mode: Bento Labels & Tags ──────────────────────────────────────── */
[data-theme="light"] .wcb-heading,
[data-theme="light"] .bento-heading { color: #1a1a1a; }
[data-theme="light"] .wcb-body,
[data-theme="light"] .bento-body { color: #2d2d2d; }
[data-theme="light"] .wcb-muted { color: #777; }
[data-theme="light"] .wcb-label,
[data-theme="light"] .bento-label { color: #0d8f80; }
[data-theme="light"] .bento-tag {
  background: rgba(89, 56, 200, 0.06);
  border-color: rgba(89, 56, 200, 0.15);
  color: #5938C8;
}
[data-theme="light"] .bento-tag-teal {
  background: rgba(13, 143, 128, 0.06);
  border-color: rgba(13, 143, 128, 0.15);
  color: #0d8f80;
}
[data-theme="light"] .bento-divider {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent);
}

/* ── Light Mode: Buttons ───────────────────────────────────────────────────── */
[data-theme="light"] .btn-gold {
  background: #5938C8;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(89, 56, 200, 0.25);
}
[data-theme="light"] .btn-gold:hover {
  background: #4a2db0;
  box-shadow: 0 4px 16px rgba(89, 56, 200, 0.35);
  color: #ffffff !important;
}
[data-theme="light"] a.btn-gold,
[data-theme="light"] a.btn-gold:visited { color: #ffffff !important; }
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-purple {
  background: #5938C8;
  color: #ffffff !important;
}
[data-theme="light"] a.btn-primary,
[data-theme="light"] a.btn-purple,
[data-theme="light"] a.btn-primary:visited { color: #ffffff !important; }
[data-theme="light"] .btn-accent,
[data-theme="light"] .btn-teal {
  background: #0d8f80;
  color: #ffffff !important;
}
[data-theme="light"] a.btn-accent,
[data-theme="light"] a.btn-teal,
[data-theme="light"] a.btn-accent:visited { color: #ffffff !important; }
[data-theme="light"] .btn-wcb {
  background: #5938C8;
  color: #ffffff;
}
[data-theme="light"] .btn-wcb:hover {
  background: #4a2db0;
  color: #ffffff;
}
[data-theme="light"] .btn-wcb-gold {
  background: linear-gradient(135deg, #5938C8, #7a5dbb);
  color: #ffffff;
}
[data-theme="light"] .btn-wcb-outline {
  border-color: rgba(89, 56, 200, 0.3);
  color: #5938C8;
}
[data-theme="light"] .btn-wcb-outline:hover {
  background: rgba(89, 56, 200, 0.06);
  border-color: #5938C8;
  color: #5938C8;
}
[data-theme="light"] .btn-outline {
  border-color: rgba(89, 56, 200, 0.3);
  color: #5938C8;
}
[data-theme="light"] .btn-outline:hover {
  background: rgba(89, 56, 200, 0.06);
  border-color: #5938C8;
}
[data-theme="light"] .btn-outline-pill {
  border-color: rgba(89, 56, 200, 0.3);
  color: #5938C8;
}
[data-theme="light"] .btn-outline-pill:hover {
  background: rgba(89, 56, 200, 0.06);
  border-color: #5938C8;
}
[data-theme="light"] .btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}
[data-theme="light"] .nav-cta {
  color: #5938C8 !important;
  border-color: rgba(89, 56, 200, 0.3);
}
[data-theme="light"] .nav-cta:hover {
  background: rgba(89, 56, 200, 0.06);
  border-color: #5938C8;
}

/* ── Light Mode: Alerts ────────────────────────────────────────────────────── */
[data-theme="light"] .alert-success { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
[data-theme="light"] .alert-error   { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
[data-theme="light"] .alert-info    { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
[data-theme="light"] .alert-warning { background: #fffbeb; border-color: #fcd34d; color: #78350f; }

/* ── Light Mode: Badges ────────────────────────────────────────────────────── */
[data-theme="light"] .badge-published,
[data-theme="light"] .badge-completed,
[data-theme="light"] .badge-active { background: #ecfdf5; color: #059669; }
[data-theme="light"] .badge-draft,
[data-theme="light"] .badge-refunded,
[data-theme="light"] .badge-trialing { background: #ede9fe; color: #5b21b6; }
[data-theme="light"] .badge-pending,
[data-theme="light"] .badge-past_due { background: #fef3c7; color: #92400e; }
[data-theme="light"] .badge-failed,
[data-theme="light"] .badge-canceled { background: #fee2e2; color: #991b1b; }

/* ── Light Mode: Forms ─────────────────────────────────────────────────────── */
[data-theme="light"] .form-input,
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.15);
  color: #1a1a1a;
}
[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
  border-color: #5938C8;
  box-shadow: 0 0 0 3px rgba(89, 56, 200, 0.1);
}
[data-theme="light"] .form-group select option {
  background: #FFFFFF;
  color: #1a1a1a;
}

/* ── Light Mode: Text Size Control ─────────────────────────────────────────── */
[data-theme="light"] #text-size-ctrl {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .tsc-btn { color: #777; }
[data-theme="light"] .tsc-btn:hover { background: rgba(89, 56, 200, 0.08); color: #5938C8; }
[data-theme="light"] .tsc-btn.tsc-active { background: rgba(13, 143, 128, 0.1); color: #0d8f80; box-shadow: none; }
[data-theme="light"] .tsc-divider { background: rgba(0, 0, 0, 0.1); }

/* ── Light Mode: Footer ────────────────────────────────────────────────────── */
[data-theme="light"] footer { border-top-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] footer p { color: #777; }
[data-theme="light"] footer a { color: #5938C8; }
[data-theme="light"] footer a:hover { color: #0d8f80; }

/* ── Light Mode: Headings use dark color for readability ───────────────────── */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 { color: #1a1a1a; }

/* ── Light Mode: Links ─────────────────────────────────────────────────────── */
[data-theme="light"] a { color: #5938C8; }
[data-theme="light"] a:hover { color: #4a2db0; }

/* ── Light Mode: Strong / Bold ─────────────────────────────────────────────── */
[data-theme="light"] strong { color: #1a1a1a; }

/* ── Light Mode: Blog-specific (overriding page inline CSS vars) ───────────── */
[data-theme="light"] .blog-card { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .blog-card:hover { border-color: rgba(89,56,200,0.25); }
[data-theme="light"] .blog-card h2 a { color: #1a1a1a; }
[data-theme="light"] .blog-card h2 a:hover { color: #5938C8; }
[data-theme="light"] .blog-card-excerpt { color: #555; }
[data-theme="light"] .blog-card-cat { color: #5938C8; background: rgba(89,56,200,0.06); border-color: rgba(89,56,200,0.15); }
[data-theme="light"] .sidebar-widget { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .sidebar-heading { color: #5938C8; border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .tag-chip { background: #F5F2EE; border-color: rgba(0,0,0,0.08); color: #555; }
[data-theme="light"] .tag-chip:hover,
[data-theme="light"] .tag-chip.tag-active { background: rgba(89,56,200,0.06); border-color: rgba(89,56,200,0.25); color: #5938C8; }
[data-theme="light"] .cat-count { background: #F5F2EE; }

/* ── Light Mode: Type cards, contrast grids (CMS content) ──────────────────── */
[data-theme="light"] .type-card {
  background: #FFFFFF !important;
  border-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .type-name { color: #5938C8 !important; }
[data-theme="light"] .contrast-grid { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .contrast-col { background: #FFFFFF; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .contrast-label { color: #5938C8; }

/* ── Light Mode: Section heroes & CTAs ─────────────────────────────────────── */
[data-theme="light"] .page-hero,
[data-theme="light"] .section-hero {
  background: linear-gradient(180deg, #F5F2FF 0%, #FAFAFA 100%) !important;
}
[data-theme="light"] .page-hero h1,
[data-theme="light"] .section-hero h1 { color: #1a1a1a !important; }
[data-theme="light"] .page-hero p,
[data-theme="light"] .section-hero p { color: #555 !important; }

/* ── Light Mode: Testimonials ──────────────────────────────────────────────── */
[data-theme="light"] .testimonial {
  background: #F8F6FF;
  border-left-color: #5938C8;
}
[data-theme="light"] .testimonial .quote { color: #1a1a1a; }
[data-theme="light"] .testimonial .attribution { color: #777; }

/* ── Light Mode: Auth grid items ───────────────────────────────────────────── */
[data-theme="light"] .auth-item {
  background: #FFFFFF !important;
  border-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .auth-label { color: #5938C8 !important; }

/* ── Light Mode: Aura glows — soften for light bg ──────────────────────────── */
[data-theme="light"] .aura-glow-gold { filter: drop-shadow(0 0 8px rgba(89,56,200,0.15)); }
[data-theme="light"] .aura-glow-teal { filter: drop-shadow(0 0 8px rgba(13,143,128,0.15)); }
[data-theme="light"] .aura-glow-purple { filter: drop-shadow(0 0 8px rgba(89,56,200,0.2)); }

/* ── Light Mode: Global style override for WCB Phase 4 headings ────────────── */
[data-theme="light"] .bento-hero h1,
[data-theme="light"] .bento-hero h2,
[data-theme="light"] .page-hero h1,
[data-theme="light"] .page-hero h2,
[data-theme="light"] .section-title-display,
[data-theme="light"] h1.gold-heading,
[data-theme="light"] h2.gold-heading { color: #1a1a1a !important; }

/* ── Light Mode: Cosmic BG utility ─────────────────────────────────────────── */
[data-theme="light"] .cosmic-bg { background: #FAFAFA; }

/* ── Light Mode: Feature list icons ────────────────────────────────────────── */
[data-theme="light"] .feature-list li { color: #555; }
[data-theme="light"] .feature-list li::before { color: #5938C8; }

/* ── Light Mode: CMS sections with dark inline backgrounds ─────────────────── */
[data-theme="light"] .cms-section { background-color: transparent !important; }

/* ── Theme Transition ────────────────────────────────────────────────────────── */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}
body,
body *:not(script):not(style) {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ── Theme Toggle Button ─────────────────────────────────────────────────────── */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}
.theme-toggle-btn:hover {
  background: rgba(99, 58, 133, 0.10);
  color: var(--primary);
  border-color: var(--primary);
}
.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
/* Dark mode → show sun (click = go light) */
.theme-toggle-btn .icon-moon { display: none; }
.theme-toggle-btn .icon-sun  { display: block; }
/* Light mode → show moon (click = go dark) */
[data-theme="light"] .theme-toggle-btn .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle-btn .icon-moon { display: block; }

/* ── Floating Theme Toggle Pill (bottom-left, persistent across all pages) ───── */
.theme-toggle-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(26, 15, 31, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  color: rgba(212, 175, 55, 0.7);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(212, 175, 55, 0);
  padding: 0;
  line-height: 1;
  /* iOS Safari: force GPU layer so position:fixed sticks to viewport even when body has overflow-x:hidden */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}
.theme-toggle-float:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.7);
  color: var(--gold-soft);
  transform: scale(1.09);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(212, 175, 55, 0.12), var(--glow-gold);
}
.theme-toggle-float:active {
  transform: scale(0.96);
}
.theme-toggle-float svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
/* Dark mode → show sun (click = go light) */
.theme-toggle-float .icon-moon { display: none; }
.theme-toggle-float .icon-sun  { display: block; }
/* Light mode → show moon (click = go dark) */
[data-theme="light"] .theme-toggle-float .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle-float .icon-moon { display: block; }
/* Light mode pill appearance */
[data-theme="light"] .theme-toggle-float {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(99, 58, 133, 0.28);
  color: #5a4570;
  box-shadow: 0 2px 14px rgba(99, 58, 133, 0.12);
}
[data-theme="light"] .theme-toggle-float:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(99, 58, 133, 0.55);
  color: #633a85;
  box-shadow: 0 4px 18px rgba(99, 58, 133, 0.2), 0 0 0 3px rgba(99, 58, 133, 0.1);
}

/* Light mode: flip static colors that aren't via CSS variables */
[data-theme="light"] .site-nav {
  background: rgba(250, 246, 240, 0.94);
  border-bottom-color: rgba(165, 124, 0, 0.15);
}
[data-theme="light"] .alert-success { background: rgba(0,191,165,0.08); border-color: rgba(0,191,165,0.25); color: #00BFA5; }
[data-theme="light"] .alert-error   { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
[data-theme="light"] .alert-info    { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
[data-theme="light"] .alert-warning { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
[data-theme="light"] .badge-published, [data-theme="light"] .badge-completed, [data-theme="light"] .badge-active { background: rgba(0,191,165,0.1); color: #00BFA5; }
[data-theme="light"] .badge-draft, [data-theme="light"] .badge-refunded, [data-theme="light"] .badge-trialing    { background: #ede9fe; color: #5b21b6; }
[data-theme="light"] .badge-pending, [data-theme="light"] .badge-past_due { background: #fef3c7; color: #92400e; }
[data-theme="light"] .badge-failed, [data-theme="light"] .badge-canceled  { background: #fee2e2; color: #991b1b; }

/* ── Text Size Scaling ───────────────────────────────────────────────────────── */
html {
  font-size: 18px; /* Base: comfortable reading size */
}
html[data-text-size="default"] {
  font-size: 18px; /* Normal */
}
html[data-text-size="lg"] {
  font-size: 20px; /* Large */
}
html[data-text-size="xl"] {
  font-size: 22px; /* Extra Large */
}

/* ── Text Size Control Widget ────────────────────────────────────────────────── */
#text-size-ctrl {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(26, 15, 31, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 100px;
  padding: 5px 8px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 0 0 0 rgba(212, 175, 55, 0);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}
.tsc-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(212, 175, 55, 0.6);
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: 100px;
  padding: 3px 7px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
  user-select: none;
}
.tsc-btn:nth-child(1) { font-size: 0.72rem; }
.tsc-btn:nth-child(2) { font-size: 0.88rem; }
.tsc-btn:nth-child(3) { font-size: 1.05rem; }
.tsc-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-soft);
}
.tsc-btn.tsc-active {
  background: rgba(0, 191, 165, 0.2);
  color: var(--teal-primary);
  box-shadow: 0 0 8px rgba(0, 191, 165, 0.2);
}
.tsc-divider {
  width: 1px;
  height: 14px;
  background: rgba(212, 175, 55, 0.25);
  margin: 0 2px;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Base Typography ────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: 0.015em;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Comfortable reading width for content blocks */
.content-block, article, .prose {
  max-width: 700px;
}

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

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.5rem, 2.5vw, 1.9rem); font-weight: 600; }
h4 { font-size: clamp(1.2rem, 2vw, 1.4rem); font-weight: 600; }

p {
  color: var(--text-body);
  line-height: 1.8;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

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

strong {
  color: var(--text);
  font-weight: 500;
}

/* Rubik utility class */
.syne, .rubik { font-family: var(--font-heading); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1.4;
}
.btn:hover { opacity: 0.88; text-decoration: none; }

.btn-primary,
.btn-purple {
  background: var(--teal-primary);
  color: var(--gold-soft);
  box-shadow: var(--shadow-teal);
}
.btn-primary:hover,
.btn-purple:hover {
  background: var(--teal-soft);
  box-shadow: var(--glow-teal);
  transform: scale(var(--hover-scale));
}

.btn-accent,
.btn-teal {
  background: var(--teal-primary);
  color: var(--gold-soft);
  font-weight: 700;
}
.btn-accent:hover,
.btn-teal:hover {
  background: var(--teal-soft);
  box-shadow: var(--glow-teal);
  transform: scale(var(--hover-scale));
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: var(--teal-primary);
  color: var(--gold-soft);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-glow);
  box-shadow: var(--shadow-teal);
}
.btn-gold:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--glow-teal), 0 8px 30px rgba(0, 191, 165, 0.35);
  color: var(--gold-soft);
  text-decoration: none;
  background: var(--teal-soft);
}
.btn-gold:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
/* Belt-and-suspenders: prevent link color inheritance from overriding button text */
a.btn-gold, a.btn-gold:visited { color: var(--gold-soft); }
a.btn-primary, a.btn-purple, a.btn-primary:visited { color: var(--gold-soft); }
a.btn-accent, a.btn-teal, a.btn-accent:visited { color: var(--gold-soft); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: transparent;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-outline:hover {
  background: rgba(99, 58, 133, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.btn-outline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}
.btn-outline-pill:hover {
  background: rgba(99, 58, 133, 0.1);
  border-color: var(--primary);
}

.btn-danger {
  background: #7f1d1d;
  color: #fca5a5;
  border: none;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid transparent;
  border-radius: 4px;
}
.btn-ghost:hover {
  background: rgba(99, 58, 133, 0.08);
  color: var(--text);
  border-color: var(--border);
}

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.card:hover {
  border-color: var(--border-strong);
}
.card-sm { padding: 1rem; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-label,
.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.form-input,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-body);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}
.form-input::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}
.form-group select option {
  background: var(--surface-2);
  color: var(--text-body);
}
textarea.form-input { min-height: 130px; resize: vertical; }

.form-hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}
.form-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
}

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-success { background: rgba(0,191,165,0.1); border: 1px solid rgba(0,191,165,0.25); color: #00BFA5; }
.alert-error   { background: #2d0a0a; border: 1px solid #5a1a1a; color: #fca5a5; }
.alert-info    { background: #0d1a2e; border: 1px solid #1a3a5a; color: #93c5fd; }
.alert-warning { background: #1a1200; border: 1px solid #5a4000; color: #c9a84c; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-published, .badge-completed, .badge-active { background: rgba(0,191,165,0.15); color: #00BFA5; }
.badge-draft, .badge-refunded, .badge-trialing    { background: #1e0e2e; color: #a5b4fc; }
.badge-pending, .badge-past_due                     { background: #78350f; color: #fde68a; }
.badge-failed, .badge-canceled                      { background: #7f1d1d; color: #fecaca; }

/* ── Section Labels / Overlines ─────────────────────────────────────────────── */
.section-label,
.hero-overline {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ── Dividers ───────────────────────────────────────────────────────────────── */
.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* ── Ambient Glow Backgrounds ───────────────────────────────────────────────── */
.bg-glow {
  position: fixed;
  top: -30%;
  left: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(106, 60, 153, 0.10) 0%, rgba(165, 124, 0, 0.04) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.bg-glow-2 {
  position: fixed;
  bottom: -20%;
  right: -15%;
  width: 55%;
  height: 55%;
  background: radial-gradient(ellipse, rgba(0, 191, 165, 0.06) 0%, rgba(212, 175, 55, 0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.bg-glow-nebula {
  position: fixed;
  top: 40%;
  left: 30%;
  width: 40%;
  height: 40%;
  background: radial-gradient(ellipse, rgba(165, 124, 0, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.site-nav {
  background: rgba(26, 15, 31, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.site-nav .logo {
  font-family: var(--font-heading);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}
.site-nav .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav .nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}
.nav-btn {
  background: var(--primary);
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-btn:hover { opacity: 0.88; text-decoration: none; }
.nav-btn-teal {
  background: var(--accent) !important;
  color: #000 !important;
}
.nav-btn-teal:hover { background: var(--accent-dark) !important; }

.nav-cta {
  font-size: 0.8rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
  color: var(--primary) !important;
  border: 1px solid var(--border-strong);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-pill);
  transition: all 0.3s !important;
}
.nav-cta:hover {
  background: rgba(99, 58, 133, 0.1);
  border-color: var(--primary);
}

/* ── Page Headers ───────────────────────────────────────────────────────────── */
.page-hdr { margin-bottom: 1.5rem; }
.page-hdr h1 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.3rem;
}
.page-hdr .subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Breadcrumbs ────────────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent);
}

/* ── Feature Lists ──────────────────────────────────────────────────────────── */
.feature-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.feature-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: '✦';
  color: var(--primary);
  font-size: 0.7rem;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

/* ── Testimonials ───────────────────────────────────────────────────────────── */
.testimonial {
  background: var(--surface-2);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.5rem 2rem;
  margin: 1rem 0;
}
.testimonial .quote {
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.testimonial .attribution {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
footer a {
  color: var(--primary);
  text-decoration: none;
}
footer a:hover {
  color: var(--accent);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  html { font-size: 17px; } /* Slightly smaller on mobile but still readable */
  .form-row { grid-template-columns: 1fr; }
  .site-nav { height: auto; padding: 0.75rem 1rem; gap: 0.5rem; flex-wrap: wrap; }
  .site-nav .nav-links { gap: 0.75rem; font-size: 0.82rem; }
}

@media (max-width: 640px) {
  .site-nav .nav-links { gap: 0.5rem; }
}

/* ── HD Animated Background Canvas ─────────────────────────────────────────── */
#hd-bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* ── Galaxy Starfield Canvas ──────────────────────────────────────────────── */
#galaxy-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================================
   WARM COSMIC BENTO — Phase 4 Component Library
   Global bento grid, card, and cosmic background utilities.
   ============================================================================ */

/* ── Bento Typography ────────────────────────────────────────────────────── */
.wcb-heading, .bento-heading {
  font-family: var(--font-display);
  color: var(--wcb-gold);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.wcb-body, .bento-body {
  font-family: var(--font-sans);
  color: var(--wcb-cream);
  line-height: 1.7;
  font-weight: 400;
}
.wcb-muted {
  font-family: var(--font-sans);
  color: var(--wcb-cream-muted);
  font-size: 0.9rem;
}
.wcb-label, .bento-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wcb-teal);
  margin-bottom: 0.75rem;
  display: block;
}

/* ── Bento Grid ──────────────────────────────────────────────────────────── */
.bento-grid {
  display: grid;
  gap: var(--bento-gap);
  width: 100%;
}
.bento-grid-2 { grid-template-columns: repeat(2, 1fr); }
.bento-grid-3 { grid-template-columns: repeat(3, 1fr); }
.bento-grid-4 { grid-template-columns: repeat(4, 1fr); }
.bento-grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Span helpers */
.bento-span-2 { grid-column: span 2; }
.bento-span-3 { grid-column: span 3; }
.bento-row-2   { grid-row: span 2; }

/* ── Bento Card ──────────────────────────────────────────────────────────── */
.bento-card {
  background: var(--wcb-purple-card);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--radius-bento);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-bento);
  background: radial-gradient(ellipse at top left, rgba(212, 175, 55, 0.04) 0%, transparent 60%);
  pointer-events: none;
}
.bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.28);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.08), 0 4px 16px rgba(0,0,0,0.4);
}
.bento-card-teal {
  background: var(--wcb-purple-card2);
  border-color: rgba(0, 191, 165, 0.15);
}
.bento-card-teal::before {
  background: radial-gradient(ellipse at top right, rgba(0, 191, 165, 0.06) 0%, transparent 60%);
}
.bento-card-teal:hover {
  border-color: rgba(0, 191, 165, 0.32);
  box-shadow: 0 12px 40px rgba(0, 191, 165, 0.08), 0 4px 16px rgba(0,0,0,0.4);
}
.bento-card-hero {
  background: linear-gradient(135deg, var(--wcb-purple-mid) 0%, var(--wcb-purple-card) 100%);
  border-color: rgba(212, 175, 55, 0.2);
}

/* ── Bento Hero Section ──────────────────────────────────────────────────── */
.bento-hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--wcb-purple);
}
.bento-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 175, 55, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 191, 165, 0.04) 0%, transparent 60%);
  pointer-events: none;
}
.bento-hero h1, .bento-hero .bento-hero-title {
  font-family: var(--font-display);
  color: var(--wcb-gold);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
.bento-hero p, .bento-hero .bento-hero-sub {
  font-family: var(--font-sans);
  color: var(--wcb-cream);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 640px;
  margin: 0 auto 2rem;
  opacity: 0.88;
  position: relative;
  z-index: 1;
}

/* ── Bento Section Wrapper ───────────────────────────────────────────────── */
.bento-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.bento-section-full {
  padding: 4rem 2rem;
  position: relative;
  z-index: 1;
}

/* ── Bento Icon ──────────────────────────────────────────────────────────── */
.bento-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
}
.bento-icon-teal {
  filter: drop-shadow(0 0 8px rgba(0, 191, 165, 0.3));
}

/* ── Bento CTA Buttons ───────────────────────────────────────────────────── */
.btn-wcb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--wcb-teal);
  color: #0A0A12;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.02em;
}
.btn-wcb:hover {
  background: var(--wcb-teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 191, 165, 0.3);
  color: #0A0A12;
  text-decoration: none;
}
.btn-wcb-gold {
  background: linear-gradient(135deg, var(--wcb-gold), var(--wcb-gold-light));
  color: #0A0A12;
}
.btn-wcb-gold:hover {
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.35);
  color: #0A0A12;
}
.btn-wcb-outline {
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--wcb-gold);
}
.btn-wcb-outline:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--wcb-gold);
  color: var(--wcb-gold);
  text-decoration: none;
}

/* ── Cosmic Background Utilities ─────────────────────────────────────────── */
.cosmic-bg {
  background: var(--wcb-purple);
  position: relative;
  overflow: hidden;
}
.cosmic-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(99,58,133,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(0,191,165,0.04) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(212,175,55,0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Cosmic star-field SVG overlay (lightweight, no images) */
.cosmic-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(245,240,233,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 40%, rgba(245,240,233,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 8%, rgba(212,175,55,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 65%, rgba(245,240,233,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 25%, rgba(0,191,165,0.35) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 80% 75%, rgba(245,240,233,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 45%, rgba(212,175,55,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 80%, rgba(245,240,233,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 55%, rgba(0,191,165,0.25) 0%, transparent 100%),
    radial-gradient(2px 2px at 60% 35%, rgba(245,240,233,0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 90%, rgba(212,175,55,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 5% 60%, rgba(245,240,233,0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 48% 88%, rgba(0,191,165,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 12%, rgba(245,240,233,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 20% 95%, rgba(212,175,55,0.25) 0%, transparent 100%);
}

/* Nebula glow overlay */
.cosmic-nebula {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(99,58,133,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 75% 60%, rgba(212,175,55,0.03) 0%, transparent 65%),
    radial-gradient(ellipse 50% 30% at 50% 90%, rgba(0,191,165,0.03) 0%, transparent 60%);
}

/* ── Bento Focus Accessibility ───────────────────────────────────────────── */
.bento-card:focus-within,
.btn-wcb:focus-visible,
.btn-wcb-gold:focus-visible,
.btn-wcb-outline:focus-visible {
  outline: 2px solid var(--wcb-teal);
  outline-offset: 3px;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--wcb-teal);
  outline-offset: 2px;
}

/* ── Bento Tag / Badge ───────────────────────────────────────────────────── */
.bento-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--wcb-gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.bento-tag-teal {
  background: rgba(0, 191, 165, 0.08);
  border-color: rgba(0, 191, 165, 0.2);
  color: var(--wcb-teal);
}

/* ── Bento Divider ───────────────────────────────────────────────────────── */
.bento-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.15), transparent);
  margin: 3rem 0;
}

/* ── Mobile Bento ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .bento-grid-2, .bento-grid-3, .bento-grid-4 { grid-template-columns: 1fr; }
  .bento-span-2, .bento-span-3 { grid-column: span 1; }
  .bento-row-2 { grid-row: span 1; }
  .bento-hero { padding: 3.5rem 1.25rem 3rem; }
  .bento-section { padding: 2.5rem 1.25rem; }
  .bento-card { padding: 1.5rem; }
}
@media (max-width: 480px) {
  .bento-hero h1, .bento-hero .bento-hero-title { font-size: 1.8rem; }
  .bento-grid { gap: 1rem; }
  .bento-card { padding: 1.25rem; }
  .btn-wcb, .btn-wcb-gold, .btn-wcb-outline {
    padding: 0.7rem 1.35rem;
    font-size: 0.85rem;
    min-height: 44px;
  }
}

/* ── Touch Target Minimum ────────────────────────────────────────────────── */
.btn-wcb, .btn-wcb-gold, .btn-wcb-outline,
.btn-gold, .btn-primary, .btn-accent, .btn-outline,
a.btn-gold, a.btn-primary {
  min-height: 44px;
}

/* ── BodyGraph Aura Glow (decorative SVG overlay) ───────────────────────── */
.aura-glow-gold {
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.25)) drop-shadow(0 0 4px rgba(212, 175, 55, 0.15));
}
.aura-glow-teal {
  filter: drop-shadow(0 0 12px rgba(0, 191, 165, 0.2)) drop-shadow(0 0 4px rgba(0, 191, 165, 0.1));
}
.aura-glow-purple {
  filter: drop-shadow(0 0 12px rgba(99, 58, 133, 0.3)) drop-shadow(0 0 4px rgba(99, 58, 133, 0.15));
}
