/* ============================================================
   Lumina — Minimal LMS landing page
   Mobile-first · CSS variables · accessible · reduced-motion safe
   ============================================================ */

:root {
  --bg: #fafaf9;
  --bg-alt: #f4f4f2;
  --surface: #ffffff;
  --ink: #18181b;
  --ink-hover: #2c2c31;
  --ink-soft: #52525b;
  --ink-faint: #66666e;
  --line: #e7e7e4;
  --accent: #4f46e5;
  --accent-ink: #4338ca;
  --accent-tint: #eef0ff;
  --accent-soft: #e4e6ff;
  --success: #059669;
  --success-tint: #ecfdf5;
  --error: #dc2626;
  --error-border: #f87171;
  --error-ring: rgba(248, 113, 113, 0.18);
  --logo-gray: #a1a1aa;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05), 0 4px 14px rgba(24, 24, 27, 0.05);
  --shadow-md: 0 2px 4px rgba(24, 24, 27, 0.05), 0 18px 44px -12px rgba(24, 24, 27, 0.14);
  --container: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font: inherit; }
em { font-style: normal; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.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;
}

[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: clamp(72px, 10vw, 120px); }
.section-alt { background: var(--bg-alt); }

/* ---------- Utilities ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.card-lift {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #dadad6;
}

.icon-box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.icon-box-lg { width: 46px; height: 46px; border-radius: 12px; transition: transform 0.3s var(--ease); }
.icon-box-sm { width: 36px; height: 36px; border-radius: var(--radius-sm); }

/* Icons: reserve space before Lucide injects SVGs (prevents CLS) */
[data-lucide] { display: inline-block; }
[data-lucide]:not(.icon-sm) { width: 24px; height: 24px; }
.icon-sm { width: 16px; height: 16px; }

.hide-mobile { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(24, 24, 27, 0.35);
}
.btn-primary:hover { background: var(--ink-hover); box-shadow: 0 10px 26px -8px rgba(24, 24, 27, 0.4); }

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

.btn-soft {
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.btn-soft:hover { background: var(--accent-soft); }

.btn-light {
  background: #fff;
  color: var(--ink);
}
.btn-light:hover { box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.3); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(250, 250, 249, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(250, 250, 249, 0.92);
}
@supports not ((backdrop-filter: blur(14px)) or (-webkit-backdrop-filter: blur(14px))) {
  .site-header { background: rgba(250, 250, 249, 0.97); }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  background: var(--ink);
  color: #fff;
  border-radius: 9px;
}

.nav-links {
  display: none;
  gap: 6px;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-signin { display: none; }

/* Hamburger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu panel */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 68px; left: 16px; right: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 10px;
  gap: 4px;
}
.nav-links.open a { padding: 13px 14px; font-size: 15.5px; }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(130px, 18vh, 176px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.hero-grid {
  display: grid;
  gap: clamp(44px, 6vw, 72px);
}

.hero-copy { max-width: 600px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-tint);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(79, 70, 229, 0); }
}

h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 22px;
  text-wrap: balance;
}
h1 em {
  color: var(--accent);
  position: relative;
}
h1 em::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 4px;
  height: 10px;
  background: var(--accent-soft);
  border-radius: 4px;
  z-index: -1;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 38px;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-avatars { display: flex; }
.hero-avatars img {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  object-fit: cover;
  margin-left: -9px;
}
.hero-avatars img:first-child { margin-left: 0; }
.trust-text { font-size: 13.5px; color: var(--ink-soft); }
.stars { display: inline-flex; gap: 1px; color: #f59e0b; margin-right: 8px; }

/* Hero visual */
.hero-visual { position: relative; }

.app-window {
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.app-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.app-dot:nth-child(2) { background: #e9e9e6; }
.app-title {
  margin-left: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player { position: relative; }
.player img { width: 100%; aspect-ratio: 16 / 9.2; object-fit: cover; }
.player::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(24, 24, 27, 0.35), transparent 45%);
  pointer-events: none;
}
.player-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 62px; height: 62px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border-radius: 50%;
  box-shadow: 0 10px 30px -6px rgba(24, 24, 27, 0.4);
  z-index: 1;
}
.player-time {
  position: absolute;
  right: 14px; bottom: 12px;
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(24, 24, 27, 0.55);
  padding: 4px 9px;
  border-radius: 7px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.player-bottom { padding: 18px 20px 20px; }
.player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}
.player-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.player-pct { color: var(--accent-ink); }
.progress-track {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #7c74f3);
}
.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--success);
  background: var(--success-tint);
  padding: 6px 11px;
  border-radius: 999px;
}
.player-chip-ghost {
  color: var(--ink-soft);
  background: var(--bg-alt);
}

/* Floating cards */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.35;
  animation: float 5.5s ease-in-out infinite;
}
.float-card strong { display: block; font-size: 13.5px; font-weight: 700; }
.float-card span { color: var(--ink-faint); font-size: 12px; }

.float-card-progress { top: 12%; left: -14px; }
.float-card-cert { bottom: 18%; right: -10px; animation-delay: 1.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* Logo strip */
.logo-strip {
  margin-top: clamp(56px, 7vw, 84px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.logo-strip-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.logo-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 34px;
}
.logo-list li {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--logo-gray);
  transition: color 0.25s ease;
}
.logo-list li:hover { color: var(--ink-soft); }

/* ---------- Section heads ---------- */
.section-head { margin-bottom: clamp(40px, 6vw, 60px); max-width: 640px; }
.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  max-width: none;
}
.section-head .eyebrow { margin-bottom: 14px; }

h2 {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.12;
  margin-bottom: 14px;
  text-wrap: balance;
}

.section-sub { color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.1rem); max-width: 540px; }

/* ---------- Stats ---------- */
.stats { padding-block: clamp(48px, 6vw, 72px); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 24px;
}
.stat { text-align: left; }
.stat-num {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 4px;
}
.stat-label { font-size: 14px; color: var(--ink-faint); font-weight: 500; }

/* ---------- Features (bento) ---------- */
.features-grid {
  display: grid;
  gap: 18px;
}
.feature-card {
  padding: clamp(26px, 3.4vw, 36px);
}
.feature-icon { margin-bottom: 20px; }
.feature-card:hover .icon-box-lg { transform: scale(1.06) rotate(-3deg); }

.feature-card h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; color: var(--ink-soft); }

/* Path demo inside wide card */
.feature-demo {
  margin-top: 22px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 18px 18px 8px;
}
.demo-node {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  padding-bottom: 12px;
  position: relative;
}
.demo-node:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px; top: 18px; bottom: 2px;
  width: 2px;
  background: var(--line);
}
.demo-node span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  z-index: 1;
  flex-shrink: 0;
}
.demo-node.done { color: var(--ink-soft); }
.demo-node.done span { background: var(--accent); border-color: var(--accent); }
.demo-node.done::after { background: var(--accent-soft); }
.demo-node.active { color: var(--ink); font-weight: 600; }
.demo-node.active span {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 40px;
}
.step {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.step-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  background: var(--accent-tint);
  padding: 5px 10px;
  border-radius: 8px;
}
.step h3 { font-size: 1.22rem; font-weight: 700; margin: 14px 0 8px; letter-spacing: -0.015em; }
.step p { color: var(--ink-soft); font-size: 15px; max-width: 380px; }

/* ---------- Courses ---------- */
.course-grid {
  display: grid;
  gap: 26px;
}
.course-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.course-thumb { position: relative; display: block; }
.course-thumb-link { display: block; overflow: hidden; }
.course-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.course-card:hover .course-thumb img { transform: scale(1.05); }

.course-level {
  position: absolute;
  top: 14px; left: 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  padding: 5px 11px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.course-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 22px 20px;
}
.course-body h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 8px; }
.course-body h3 a:hover { color: var(--accent-ink); }
.course-body > p { font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 18px;
  margin-top: auto;
}
.course-meta li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-faint);
}
.icon-star { color: #f59e0b; fill: #f59e0b; }

.course-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.course-price { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  gap: 18px;
}
.testimonial {
  padding: clamp(24px, 3vw, 32px);
  display: flex;
  flex-direction: column;
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  color: #f59e0b;
  margin-bottom: 16px;
}
.testimonial blockquote {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 22px;
}
.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.testimonial figcaption img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.testimonial figcaption strong { display: block; font-size: 14px; font-weight: 700; }
.testimonial figcaption span { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- Pricing ---------- */
.billing-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-top: 8px;
}
.toggle-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 18px;
  border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.toggle-btn.active {
  background: var(--ink);
  color: #fff;
}
.toggle-save {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-tint);
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 5px;
}

.price-grid {
  display: grid;
  gap: 18px;
  align-items: stretch;
}
.price-card {
  padding: clamp(26px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card-featured {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.price-tag {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.price-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.price-desc { font-size: 13.5px; color: var(--ink-faint); margin-bottom: 22px; }
.price-card-featured .price-desc { color: #a1a1aa; }

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}
.price-amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; }
.price-per { font-size: 13.5px; color: var(--ink-faint); font-weight: 500; }
.price-card-featured .price-per { color: #a1a1aa; }

.price-list { margin-bottom: 28px; display: grid; gap: 12px; }
.price-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.price-list li [data-lucide] { color: var(--success); flex-shrink: 0; }
.price-card-featured .price-list li { color: #d4d4d8; }
.price-list li.muted { color: #9b9ba3; }
.price-card-featured .price-list li.muted { color: #8b8b95; }
.price-list li.muted [data-lucide] { color: #9b9ba3; }
.price-card-featured .price-list li.muted [data-lucide] { color: #c2c2c8; }

.price-card .btn { margin-top: auto; }

.price-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  font-size: 13.5px;
  color: var(--ink-faint);
  text-align: center;
  flex-wrap: wrap;
}
.price-note [data-lucide] { color: var(--success); }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 760px; }
.faq-list { display: grid; gap: 12px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item:hover { border-color: #dadad6; }
.faq-item.open { border-color: #d4d4e8; box-shadow: var(--shadow-sm); }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 20px 22px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.faq-q:hover { color: var(--accent-ink); }

.faq-icon {
  flex-shrink: 0;
  color: var(--ink-faint);
  transition: transform 0.35s var(--ease), color 0.3s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent-ink); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease), visibility 0s linear 0.4s;
  visibility: hidden;
}
.faq-item.open .faq-a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.4s var(--ease), visibility 0s;
}
.faq-a-inner { overflow: hidden; }
.faq-a-inner p {
  padding: 0 22px 22px;
  font-size: 14.5px;
  color: var(--ink-soft);
  max-width: 640px;
}

/* ---------- CTA ---------- */
.cta-card {
  background:
    radial-gradient(700px 340px at 85% -20%, rgba(124, 116, 243, 0.5), transparent 60%),
    radial-gradient(520px 300px at 0% 110%, rgba(79, 70, 229, 0.28), transparent 55%),
    var(--ink);
  color: #fff;
  border-radius: calc(var(--radius-lg) + 6px);
  padding: clamp(40px, 7vw, 80px) clamp(24px, 5vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.eyebrow-light {
  background: rgba(255, 255, 255, 0.12);
  color: #cdcaff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cta-card h2 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  margin-bottom: 14px;
  letter-spacing: -0.03em;
  position: relative;
}
.cta-card > p {
  color: #a1a1aa;
  font-size: clamp(1rem, 1.5vw, 1.13rem);
  max-width: 520px;
  margin: 0 auto 34px;
  position: relative;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 16px;
  position: relative;
}
.cta-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.cta-form input {
  flex: 1;
  width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 999px;
  padding: 15px 24px;
  font-size: 15px;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.cta-form input::placeholder { color: #71717a; }
.cta-form input:focus {
  outline: none;
  border-color: #a5a0f5;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(165, 160, 245, 0.45);
}
.cta-form input.is-invalid {
  border-color: var(--error-border);
  box-shadow: 0 0 0 4px var(--error-ring);
}
.cta-error {
  color: #fca5a5;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  padding-left: 24px;
}

.cta-note {
  font-size: 13px;
  color: #71717a;
  position: relative;
}
.cta-note.success { color: #6ee7b7; }

/* ---------- Footer ---------- */
.footer {
  background: #f1f1ef;
  border-top: 1px solid var(--line);
  padding-top: clamp(56px, 7vw, 84px);
}
.footer-grid {
  display: grid;
  gap: 40px 32px;
  grid-template-columns: 1fr 1fr;
  padding-bottom: 48px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 260px;
  margin: 16px 0 20px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: color 0.25s ease, transform 0.25s var(--ease), border-color 0.25s ease;
}
.footer-social a:hover { color: var(--accent-ink); border-color: var(--accent); transform: translateY(-2px); }

.footer-col h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a {
  font-size: 14.5px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--ink); }

.footer-newsletter { font-size: 13.5px; color: var(--ink-faint); margin-bottom: 14px; }
.footer-form {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  max-width: 280px;
}
.footer-form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 8px 4px 8px 14px;
  font-size: 14px;
  color: var(--ink);
}
.footer-form input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.footer-form input.is-invalid { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); }
.footer-form .btn { border-radius: 999px; padding: 9px 13px; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 40;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease), visibility 0.3s;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--ink-hover); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Content visible without JS */
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ---------- Render below-the-fold sections lazily ---------- */
.stats, .features, .how, .courses, .testimonials, .pricing, .faq, .cta, .footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

/* ---------- Responsive: tablet ---------- */
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card-wide { grid-column: span 2; }
  .feature-card-tall { grid-column: span 2; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .price-card-featured { order: -1; grid-column: span 2; }
  .cta-form { flex-direction: row; }
  .cta-form input { padding: 16px 26px; }
}

/* ---------- Responsive: desktop ---------- */
@media (min-width: 900px) {
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .nav-signin { display: inline-flex; }
  .nav-toggle { display: none; }

  .hero-grid {
    grid-template-columns: 1.02fr 1fr;
    align-items: center;
  }
  .hero-copy { max-width: none; }

  .logo-strip { flex-direction: row; justify-content: space-between; }

  .features-grid { grid-template-columns: repeat(6, 1fr); }
  .feature-card-wide { grid-column: span 3; grid-row: span 2; }
  .feature-card-tall { grid-row: span 2; }
  .feature-card { grid-column: span 3; }
  .feature-card-tall,
  .feature-card-wide { display: flex; flex-direction: column; }

  .course-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .price-card-featured { order: 0; grid-column: auto; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; }
  .hide-mobile { display: inline; }
}

/* ---------- Responsive: very small screens ---------- */
@media (max-width: 420px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
