/* ═══════════════════════════════════════════════════════════
   VEXTALEARN — Premium SaaS Theme Layer
   ───────────────────────────────────────────────────────────
   Purely presentational. Loaded LAST (before rtl.css) so it
   re-tunes the existing design-token layer defined in main.css
   instead of rewriting 14k lines of component CSS.

   Nothing here changes markup, JS hooks, class names or
   behaviour — every rule targets tokens or existing selectors.

   Contents
     1. Token re-tune (light)
     2. Token re-tune (dark)
     3. Base + fluid typography
     4. Motion system
     5. Surfaces & cards
     6. Buttons
     7. Forms
     8. Navbar / dropdowns / footer
     9. Badges, progress, tables, modals
    10. Hero & marketing sections
    11. Responsive + mobile experience
    12. Accessibility & reduced motion
   ═══════════════════════════════════════════════════════════ */

/* ─── 1. Token re-tune (light) ─────────────────────────────
   Vexta Purple with a calm lavender neutral ramp. Same token
   names, so every existing selector picks the official brand
   system up for free. */
:root {
  /* Brand — Vexta Purple, with Gold reserved for premium accents */
  --primary: #6D28D9;
  --primary-dark: #5B21B6;
  --primary-700: #5B21B6;
  --primary-light: #F5F3FF;
  --accent: #F59E0B;
  --accent-warm: #D97706;

  /* Neutrals / surfaces */
  --dark: #17121F;
  --surface: #FFFFFF;
  --surface-2: #F8F7FC;
  --surface-3: #F5F3FF;
  --card-bg: #FFFFFF;
  --overlay-bg: rgba(23, 18, 31, 0.5);
  --border: #E9E4F0;
  --border-light: #F1EDF7;

  /* Text */
  --text-primary: #17121F;
  --text-secondary: #5F5668;
  --text-muted: #776D82;

  /* Semantic colors */
  --success: #16A34A;
  --secondary: #16A34A;
  --secondary-dark: #15803D;
  --secondary-light: #F0FDF4;
  --warning: #D97706;
  --danger: #DC2626;

  /* Compact, consistent geometry for controls, cards and hero panels. */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius: 16px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Elevation — neutral-tinted, layered, never muddy */
  --shadow-sm: 0 1px 2px rgba(11, 16, 32, 0.05);
  --shadow: 0 1px 2px rgba(11, 16, 32, 0.05), 0 8px 24px -12px rgba(11, 16, 32, 0.14);
  --shadow-lg: 0 2px 4px rgba(11, 16, 32, 0.04), 0 24px 48px -20px rgba(11, 16, 32, 0.22);
  --shadow-xl: 0 4px 8px rgba(11, 16, 32, 0.04), 0 40px 80px -28px rgba(11, 16, 32, 0.3);
  --ring: 0 0 0 4px rgba(109, 40, 217, 0.18);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #6D28D9 0%, #5B21B6 100%);
  --gradient-surface: linear-gradient(180deg, #FFFFFF 0%, #F8F7FC 100%);
  --gradient-sheen: linear-gradient(115deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 80%);

  /* Brand alphas */
  --primary-a05: rgba(109, 40, 217, 0.05);
  --primary-a08: rgba(109, 40, 217, 0.08);
  --primary-a10: rgba(109, 40, 217, 0.1);
  --primary-a12: rgba(109, 40, 217, 0.12);
  --primary-a15: rgba(109, 40, 217, 0.15);
  --primary-a20: rgba(109, 40, 217, 0.2);
  --primary-a25: rgba(109, 40, 217, 0.25);
  --primary-a35: rgba(109, 40, 217, 0.35);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 420ms;
  --transition: all var(--dur) var(--ease-out);

  /* Layout rhythm */
  --section-pad-y: clamp(56px, 7vw, 112px);
  --gutter: clamp(16px, 4vw, 32px);
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── 2. Token re-tune (dark) ──────────────────────────────
   True layered dark: elevated surfaces get lighter, borders get
   luminous rather than grey, brand lifts for contrast. */
html[data-theme="dark"] {
  /* Keep the official brand values in dark mode; only surfaces and
     text change to preserve the existing manual theme behavior. */
  --primary: #6D28D9;
  --primary-dark: #5B21B6;
  --primary-700: #5B21B6;
  --primary-light: rgba(109, 40, 217, 0.18);

  --dark: #0E0915;
  --surface: #120D1F;
  --surface-2: #1C1430;
  --surface-3: #25183F;
  --card-bg: #1C1430;
  --panel-bg: #1C1430;
  --modal-bg: #1C1430;
  --dropdown-bg: #1C1430;
  --navbar-bg: rgba(28, 20, 48, 0.9);
  --sidebar-bg: #1C1430;
  --overlay-bg: rgba(0, 0, 0, 0.6);

  --text-primary: #F7F2FF;
  --text-secondary: #C7B9D9;
  --text-muted: #A997BF;
  --border: #3E2D61;
  --border-light: #2F224A;

  --success: #16A34A;
  --secondary: #16A34A;
  --secondary-light: rgba(22, 163, 74, 0.16);
  --danger: #DC2626;
  --warning: #D97706;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 28px -14px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.5), 0 32px 60px -24px rgba(0, 0, 0, 0.9);
  --shadow-xl: 0 40px 90px -30px rgba(0, 0, 0, 0.95);
  --ring: 0 0 0 4px rgba(109, 40, 217, 0.3);

  --gradient-brand: linear-gradient(135deg, #6D28D9 0%, #5B21B6 100%);
  --gradient-surface: linear-gradient(180deg, #25183F 0%, #1C1430 100%);

  --primary-a05: rgba(109, 40, 217, 0.05);
  --primary-a08: rgba(109, 40, 217, 0.08);
  --primary-a10: rgba(109, 40, 217, 0.1);
  --primary-a12: rgba(109, 40, 217, 0.12);
  --primary-a15: rgba(109, 40, 217, 0.15);
  --primary-a20: rgba(109, 40, 217, 0.2);
  --primary-a25: rgba(109, 40, 217, 0.25);
  --primary-a35: rgba(109, 40, 217, 0.35);

  color-scheme: dark;
}

/* ─── 3. Base + fluid typography ──────────────────────────── */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 0.92rem + 0.18vw, 1.0625rem);
  line-height: 1.65;
  letter-spacing: -0.006em;
  background: var(--surface);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums lining-nums;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

h1, h2, h3, h4, h5, h6,
.text-display, .text-h1, .text-h2, .text-h3, .text-h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.028em;
  color: var(--text-primary);
  text-wrap: balance;
}

h1, .text-h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem); }
h2, .text-h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem); }
h3, .text-h3 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); }
h4, .text-h4 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); }

p, li { text-wrap: pretty; }

.lead, .section-subtitle, .hero-subtitle {
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.175rem);
  line-height: 1.7;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}

.section-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-a12);
}

.section-pad { padding: var(--section-pad-y) 0; }
.section-header { margin-bottom: clamp(2rem, 4vw, 3.25rem); }

a { text-underline-offset: 0.22em; transition: color var(--dur-fast) var(--ease-out); }

::selection { background: var(--primary-a20); color: var(--text-primary); }

/* Refined scrollbars (desktop only) */
@media (hover: hover) and (pointer: fine) {
  * { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-track { background: transparent; }
  *::-webkit-scrollbar-thumb {
    background: var(--border);
    border: 3px solid transparent;
    background-clip: content-box;
    border-radius: var(--radius-pill);
  }
  *::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: content-box; }
}

/* ─── 4. Motion system ─────────────────────────────────────
   One shared entrance curve, applied opt-in to sections that
   already exist. No layout shift, no JS required. */
@keyframes vxtRise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes vxtSheen {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

.section-header,
.hero-title,
.hero-subtitle,
.hero-actions,
.hero-visual {
  animation: vxtRise var(--dur-slow) var(--ease-out) both;
}
.hero-subtitle { animation-delay: 60ms; }
.hero-actions { animation-delay: 120ms; }
.hero-visual { animation-delay: 180ms; }

/* ─── 5. Surfaces & cards ─────────────────────────────────── */
.card,
.vxt-card,
.course-card,
.category-card,
.category-tile,
.stat-card,
.pricing-card,
.testimonial-card,
.success-card,
.instructor-card,
.platform-card,
.newsletter-card,
.continue-card,
.course-continue-card,
.vxt-table-card,
.pmt-summary-card,
.pmt-table-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .vxt-card--interactive:hover,
  .course-card:hover,
  .category-card:hover,
  .category-tile:hover,
  .pricing-card:hover,
  .testimonial-card:hover,
  .success-card:hover,
  .instructor-card:hover,
  .continue-card:hover,
  .course-continue-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-a20);
  }
}

.vxt-card--elevated { box-shadow: var(--shadow); }
.vxt-card--flat { box-shadow: none; background: var(--surface-2); }

.pricing-card-featured,
.success-card-featured {
  border-color: var(--primary-a25);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.pricing-card-featured::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

.bg-soft { background: var(--surface-2); }
.bg-dark-section { background: var(--dark); }

.vxt-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
}
.vxt-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-sheen);
  animation: vxtSheen 1.4s var(--ease-in-out) infinite;
}

/* ─── 6. Buttons ───────────────────────────────────────────
   Crisper geometry, tactile press, accessible focus ring.
   Applies to both the vxt-* system and Bootstrap fallbacks. */
.vxt-btn,
.btn,
.hero-cta,
.vxt-ft__cta-btn {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-pill);
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
  will-change: transform;
}

.vxt-btn:active,
.btn:active { transform: translateY(1px) scale(0.995); }

.vxt-btn-primary,
.btn-primary,
.hero-cta {
  background: var(--gradient-brand);
  border: 1px solid transparent;
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 16, 32, 0.12), 0 10px 24px -12px var(--primary-a35);
}
.vxt-btn-primary:hover,
.btn-primary:hover,
.hero-cta:hover {
  color: #fff;
  filter: saturate(1.05) brightness(1.05);
  box-shadow: 0 2px 4px rgba(11, 16, 32, 0.12), 0 16px 34px -14px var(--primary-a35);
  transform: translateY(-1px);
}

.vxt-btn-secondary { background: var(--secondary); border-color: transparent; color: #fff; }
.vxt-btn-secondary:hover { background: var(--secondary-dark); color: #fff; }

.vxt-btn-outline,
.btn-outline-primary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.vxt-btn-outline:hover,
.btn-outline-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-a25);
  color: var(--primary);
}

.vxt-btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.vxt-btn-ghost:hover { background: var(--surface-2); color: var(--text-primary); }

.vxt-btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.vxt-btn-danger-soft { background: var(--danger-a14, rgba(225, 29, 72, 0.14)); color: var(--danger); border-color: transparent; }

.vxt-btn-icon {
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

.vxt-btn:disabled,
.btn:disabled,
.vxt-btn--loading { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* Universal focus ring */
:where(a, button, .btn, .vxt-btn, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
  outline-offset: 2px;
}

/* ─── 7. Forms ─────────────────────────────────────────────
   Comfortable 44px+ targets, calm borders, clear focus. */
.vxt-input,
.vxt-select,
.vxt-textarea,
.form-control,
.form-select,
.hero-search input,
.newsletter-form input,
.pmt-search input {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-size: 1rem; /* prevents iOS zoom-on-focus */
  font-family: var(--font-body);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.vxt-textarea, textarea.form-control { min-height: 120px; line-height: 1.6; }

.vxt-input::placeholder,
.form-control::placeholder,
.vxt-textarea::placeholder { color: var(--text-muted); }

.vxt-input:focus,
.vxt-select:focus,
.vxt-textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
  background: var(--card-bg);
  color: var(--text-primary);
}

.vxt-input--error, .vxt-select--error, .vxt-textarea--error, .form-control.is-invalid {
  border-color: var(--danger);
}
.vxt-input--error:focus, .form-control.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.16);
}
.vxt-input--success, .form-control.is-valid { border-color: var(--success); }

.vxt-label, .form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  margin-bottom: 0.4rem;
}
.vxt-form-hint, .form-text { color: var(--text-muted); font-size: 0.82rem; }
.vxt-form-hint--error, .invalid-feedback { color: var(--danger); }
.vxt-form-hint--success, .valid-feedback { color: var(--success); }

.form-check-input { border-color: var(--border); background-color: var(--card-bg); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: var(--ring); border-color: var(--primary); }

/* ─── 8. Navbar / dropdowns / footer ──────────────────────── */
.vxt-navbar,
.navbar {
  background: color-mix(in srgb, var(--navbar-bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: none;
  transition: box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.vxt-navbar.scrolled,
.navbar.scrolled { box-shadow: var(--shadow); border-bottom-color: var(--border); }

.vx-navbar-wordmark { letter-spacing: -0.035em; font-weight: 800; }
.vx-navbar-wordmark-accent { color: var(--primary); }
.vx-navbar-wordmark-learn { color: var(--secondary); }

.navbar .nav-link {
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--text-primary); background: var(--surface-2); }

.navbar-toggler {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 44px;
  min-width: 44px;
}
.navbar-toggler:focus { box-shadow: var(--ring); }

.dropdown-menu,
.vxt-dropdown {
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  animation: vxtRise var(--dur) var(--ease-out) both;
}
.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: var(--surface-2);
  color: var(--text-primary);
}
.dropdown-divider { border-color: var(--border-light); }

.nav-avatar { border: 2px solid var(--border); border-radius: var(--radius-pill); }
.notification-badge { background: var(--danger); color: #fff; border-radius: var(--radius-pill); }

.vxt-ft { background: var(--dark); color: #C7CDDD; }
.vxt-ft__heading { color: #fff; letter-spacing: -0.01em; }
.vxt-ft__links a { color: #A7AFC4; transition: color var(--dur-fast) var(--ease-out); }
.vxt-ft__links a:hover { color: #fff; }
.vxt-ft__social a {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: var(--transition);
}
.vxt-ft__social a:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.vxt-ft__bottom, .vxt-ft__legal { border-color: rgba(255, 255, 255, 0.08); }

/* ─── 9. Badges, progress, tables, modals ─────────────────── */
.vxt-badge,
.badge,
.course-badge,
.job-tag,
.pmt-badge,
.hero-badge,
.pmt-filter-chip,
.hero-popular-chip {
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.75rem;
  border: 1px solid transparent;
}
.vxt-badge--success, .pmt-badge-success { background: var(--secondary-light); color: var(--secondary-dark); }
.vxt-badge--danger, .pmt-badge-failed { background: rgba(225, 29, 72, 0.12); color: var(--danger); }
.vxt-badge--warning, .pmt-badge-pending { background: rgba(217, 119, 6, 0.12); color: var(--warning); }
.vxt-badge--info { background: var(--primary-light); color: var(--primary); }
.vxt-badge--neutral, .pmt-badge-default { background: var(--surface-3); color: var(--text-secondary); }
.badge-premium { background: var(--gradient-brand); color: #fff; }

.vxt-progress,
.progress-bar-wrapper,
.course-progress,
.continue-progress-wrapper {
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  overflow: hidden;
  height: 8px;
}
.vxt-progress-fill,
.progress-fill,
.course-progress-fill {
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
  transition: width var(--dur-slow) var(--ease-out);
}

.vxt-table-wrapper, .pmt-table-scroll {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.vxt-table, .pmt-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.vxt-table th, .pmt-table th {
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1;
}
.vxt-table td, .pmt-table td {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.vxt-table tbody tr:hover, .pmt-table tbody tr:hover { background: var(--surface-2); }

.modal-content {
  background: var(--modal-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  color: var(--text-primary);
}
.modal-header, .modal-footer { border-color: var(--border-light); }
.modal-backdrop.show { background: var(--overlay-bg); opacity: 1; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

.vxt-alert { border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); }

.vxt-tabs { gap: 0.25rem; border-bottom: 1px solid var(--border); }
.vxt-tab {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.7rem 1rem;
  transition: var(--transition);
}
.vxt-tab:hover { color: var(--text-primary); background: var(--surface-2); }
.vxt-tab--active { color: var(--primary); box-shadow: inset 0 -2px 0 0 var(--primary); }

.empty-state, .vxt-empty, .pmt-empty {
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

/* ─── 10. Hero & marketing sections ───────────────────────── */
.hero-section {
  position: relative;
  isolation: isolate;
  background: var(--surface);
  overflow: hidden;
}
.hero-section::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120%;
  z-index: -1;
  background:
    radial-gradient(48rem 28rem at 18% 8%, var(--primary-a12), transparent 60%),
    radial-gradient(38rem 24rem at 88% 0%, rgba(245, 158, 11, 0.1), transparent 62%);
  pointer-events: none;
}
.hero-title { letter-spacing: -0.035em; }
.hero-title-accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-badge {
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
}
.hero-search {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}
.hero-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--gradient-surface);
  box-shadow: var(--shadow-xl);
}
.hero-stat-number, .stat-number, .vxt-kpi-value {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hero-stat-label, .stat-label, .vxt-kpi-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.trust-logos { gap: clamp(1.5rem, 4vw, 3rem); }
.trust-logo { filter: grayscale(1); opacity: 0.55; transition: var(--transition); }
.trust-logo:hover { filter: none; opacity: 1; }

.cta-section {
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-title { color: #fff; }
.cta-subtitle, .cta-note { color: rgba(255, 255, 255, 0.82); }

.vxt-kpi-icon,
.stat-icon,
.category-icon,
.how-icon,
.pmt-summary-icon,
.category-tile-icon {
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vxt-kpi-icon--success { background: var(--secondary-light); color: var(--secondary); }
.vxt-kpi-icon--danger { background: rgba(225, 29, 72, 0.12); color: var(--danger); }
.vxt-kpi-icon--warning { background: rgba(217, 119, 6, 0.12); color: var(--warning); }

.testimonial-text, .success-quote { font-size: 1.02rem; line-height: 1.7; color: var(--text-secondary); }
.testimonial-stars { color: var(--accent); letter-spacing: 0.06em; }

.course-thumbnail, .continue-thumbnail, .pmt-course-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-3);
}
.course-title { letter-spacing: -0.02em; }
.price-current { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }
.price-original { color: var(--text-muted); }

/* ─── 11. Responsive + mobile experience ─────────────────── */
.container, .container-fluid, .container-lg, .container-xl {
  padding-inline: var(--gutter);
}

img, svg, video { max-width: 100%; height: auto; }

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem;
    margin-top: 0.75rem;
  }
  .navbar .nav-link { padding: 0.75rem 0.9rem; }
}

@media (max-width: 767.98px) {
  :root { --section-pad-y: clamp(40px, 9vw, 64px); --radius-lg: 22px; }

  .section-header { text-align: left; margin-bottom: 1.75rem; }
  .section-subtitle { margin-inline: 0; }

  /* Full-width, thumb-friendly primary actions */
  .hero-actions, .cta-actions { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; }
  .hero-actions > .vxt-btn,
  .hero-actions > .btn,
  .hero-actions > .hero-cta,
  .cta-actions > .vxt-btn,
  .cta-actions > .btn { width: 100%; }

  /* Cards breathe less on small screens */
  .card, .vxt-card, .course-card, .pricing-card, .testimonial-card { border-radius: var(--radius-md); }

  /* Horizontal chip rails instead of wrapped clutter */
  .hero-popular-searches,
  .pmt-filters,
  .vxt-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hero-popular-searches::-webkit-scrollbar,
  .pmt-filters::-webkit-scrollbar,
  .vxt-tabs::-webkit-scrollbar { display: none; }
  .hero-popular-chip, .pmt-filter-chip, .vxt-tab { flex: 0 0 auto; scroll-snap-align: start; }

  /* Safe-area padding for notched devices */
  body { padding-bottom: env(safe-area-inset-bottom); }
  .vxt-navbar, .navbar { padding-inline: max(var(--gutter), env(safe-area-inset-left)); }

  /* Tables become scrollable without breaking layout */
  .vxt-table, .pmt-table { min-width: 640px; }
}

@media (max-width: 400px) {
  body { font-size: 0.95rem; }
  .vxt-btn, .btn { padding: 0.7rem 1.1rem; }
}

@media (min-width: 1440px) {
  :root { --gutter: 40px; }
}

/* Larger touch targets on any touch device */
@media (pointer: coarse) {
  .vxt-btn, .btn, .nav-link, .dropdown-item, .vxt-tab { min-height: 44px; }
}

/* ─── 12. Accessibility & reduced motion ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  :root { --border: #B09ACB; --text-secondary: #3F344A; }
  html[data-theme="dark"] { --border: #8D70B4; --text-secondary: #E8DDF5; }
}

@media print {
  .vxt-navbar, .navbar, .vxt-ft, .cta-section, .newsletter-section { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .vxt-card { box-shadow: none; border: 1px solid #ccc; }
}
