/**
 * LexiCoil Design System v1.1
 * Official brand: Primary Blue #2563EB, Teal #06B6D4, Dark Navy #0F172A, Light Gray #E2E8F0
 * Typography: Poppins SemiBold (600) + Bold (700)
 */

/* ?? LIGHT (default) ?? */
:root,
[data-theme='light'] {
  --lc-font: 'Poppins', system-ui, -apple-system, sans-serif;

  --lc-blue: #2563eb;
  --lc-blue-dark: #1d4ed8;
  --lc-blue-light: #dbeafe;
  --lc-teal: #06b6d4;
  --lc-teal-light: rgba(6, 182, 212, 0.12);
  --lc-navy: #0f172a;
  --lc-gray: #e2e8f0;
  --lc-gray-dark: #94a3b8;

  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --brand: var(--lc-blue);
  --brand-dark: var(--lc-blue-dark);
  --brand-light: var(--lc-blue-light);
  --teal: var(--lc-teal);
  --teal-light: var(--lc-teal-light);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --info: var(--lc-teal);
  --info-bg: var(--lc-teal-light);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --shadow-hero: 0 24px 64px rgba(37, 99, 235, 0.12);

  --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;

  /* App structural aliases (bg/surface/semantic — migrate in later pass) */
  --bg: var(--bg-base);
  --bg2: var(--bg-surface);
  --bg3: var(--bg-elevated);
  --surface: var(--bg-elevated);
  --surface2: var(--lc-gray);
  --border2: var(--border-strong);
  --text: var(--text-primary);
  --red: var(--error);
  --red-bg: var(--error-bg);
  --green: var(--success);
  --green-bg: var(--success-bg);
  --blue: var(--lc-teal);
  --blue-bg: var(--teal-light);
  --purple: #6366f1;
  --purple-bg: rgba(99, 102, 241, 0.1);
  --orange: var(--warning);
  --orange-bg: var(--warning-bg);
  --amber: var(--warning);

  --art-masc: var(--lc-blue);
  --art-fem: var(--red);
  --art-neut: var(--green);
}

/* ?? DARK ?? */
[data-theme='dark'] {
  --bg-base: #0e0e10;
  --bg-surface: #16161a;
  --bg-elevated: #1e1e24;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text-primary: #f2f2f0;
  --text-secondary: #9a9a94;
  --text-muted: #5a5a56;

  --brand: #3b82f6;
  --brand-dark: #2563eb;
  --brand-light: rgba(59, 130, 246, 0.12);

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hero: 0 24px 64px rgba(37, 99, 235, 0.15);

  --surface: #242429;
  --surface2: #2c2c33;

  --art-masc: var(--brand);
  --art-fem: #f87171;
  --art-neut: var(--green);
}

/* ?? BASE ?? */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--lc-font);
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ?? BUTTONS ?? */
.lc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--lc-font);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  border: none;
  text-decoration: none;
}
.lc-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.lc-btn--primary {
  background: var(--brand);
  color: #fff;
}
.lc-btn--primary:hover:not(:disabled) {
  background: var(--brand-dark);
}
.lc-btn--secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.lc-btn--secondary:hover:not(:disabled) {
  background: var(--bg-elevated);
}
.lc-btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.lc-btn--ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ?? CARDS ?? */
.lc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.lc-card--highlight {
  border-color: var(--brand);
  box-shadow: var(--shadow-hero);
}
.lc-card--pricing {
  padding: var(--space-8);
}

/* ?? FORMS ?? */
.lc-input,
.lc-select,
.lc-textarea {
  width: 100%;
  font-family: var(--lc-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.15s ease;
}
.lc-input:focus,
.lc-select:focus,
.lc-textarea:focus {
  border-color: var(--brand);
}
.lc-input::placeholder,
.lc-textarea::placeholder {
  color: var(--text-muted);
}

/* ?? BADGES ?? */
.lc-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.lc-badge--brand {
  background: var(--brand-light);
  color: var(--brand);
}
.lc-badge--teal {
  background: var(--teal-light);
  color: var(--teal);
}
.lc-badge--pro {
  background: linear-gradient(135deg, var(--brand), var(--teal));
  color: #fff;
}

/* ?? PROGRESS ?? */
.lc-progress {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.lc-progress__fill {
  height: 100%;
  background: var(--brand);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ?? MODALS ?? */
.lc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lc-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: lc-scale-in 0.3s ease;
}

/* ?? TYPOGRAPHY ?? */
.lc-display {
  font-family: var(--lc-font);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}
.lc-display em,
.lc-display .lc-accent {
  color: var(--brand);
  font-style: normal;
}
.lc-tagline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

@keyframes lc-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes lc-scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
