/* ==========================================================================
   LANDING PAGE — v6 "Besqala Violet"
   Rebuilt to match the product owner's reference index.html mockup:
   a conventional modern SaaS marketing layout (sticky blur navbar, big
   hero with floating product image, trust bar, category cards, course
   card grid, feature grid, instructor cards, numbered steps,
   testimonial, CTA, footer) — a deliberate replacement of the previous
   version's asymmetric editorial/hairline layout, since the new brief
   is a literal, exact mockup rather than a style described in words.

   Dynamic sections (categories, courses, teachers, testimonials, FAQ)
   keep their existing container IDs — see static/js/landing-content.js
   — so the real API-driven data wiring (and its "hide the section if
   there's nothing real to show" rule) carries over unchanged; only the
   HTML each one renders, and the CSS below, are new.
   ========================================================================== */

.ld { background: var(--background); }

.ld-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .ld-wrap { padding: 0 20px; } }

.ld h1, .ld h2, .ld h3, .ld h4 { color: var(--text); line-height: 1.2; letter-spacing: -0.02em; }
.ld-section-title { font-size: 2.25rem; font-weight: 700; margin-bottom: 12px; }
.ld-section-text { color: var(--text-secondary); font-size: 1.0625rem; max-width: 56ch; }
.ld-section-head { margin-bottom: 40px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* ---- Buttons (mirrors components.css .btn-*, kept local so this
   file matches the reference 1:1 without a cross-file dependency) ---- */
.ld-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--control-pad-y) var(--control-pad-x);
  border-radius: var(--control-radius);
  font-weight: 600; font-size: var(--control-font);
  cursor: pointer; transition: all var(--dur-base) var(--ease-out);
  border: none; white-space: nowrap;
}
.ld-btn-solid, .ld-btn-accent { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary-sm); }
.ld-btn-solid:hover, .ld-btn-accent:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-primary-md); }
.ld-btn-line { background: transparent; color: var(--text); border: 1px solid var(--border); }
.ld-btn-line:hover { border-color: var(--primary); color: var(--primary); }
.ld-btn-on-dark { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.ld-btn-on-dark:hover { background: rgba(255,255,255,0.25); }
.ld-btn-lg { padding: var(--control-pad-y-lg) var(--control-pad-x-lg); font-size: var(--control-font-lg); border-radius: var(--radius-lg); }
.ld-btn-sm { padding: var(--control-pad-y-sm) var(--control-pad-x-sm); font-size: var(--control-font-sm); }
.ld-btn-icon { padding: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }

/* ---- Nav ---- */
.ld-nav {
  position: fixed; top: 0; left: 0; width: 100%; height: 76px; z-index: 1000;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent; transition: all var(--dur-base) var(--ease-out);
  display: flex; align-items: center;
}
.ld-nav.is-scrolled { background: rgba(255,255,255,0.95); border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.ld-nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.ld-logo { display: flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.ld-logo::before {
  content: 'B'; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin-right: 4px; border-radius: 9px;
  background: var(--primary); color: #fff; font-size: 1rem; font-weight: 800;
}
.ld-logo-tag { color: var(--text-muted); font-weight: 500; }
.ld-nav-links { display: flex; gap: 32px; }
.ld-nav-link { font-weight: 500; font-size: 14.5px; color: var(--text-secondary); }
.ld-nav-link:hover { color: var(--primary); }
.ld-nav-actions { display: flex; align-items: center; gap: 12px; }
.ld-burger { display: none; }

@media (max-width: 860px) {
  .ld-nav-links { display: none; }
  .ld-burger { display: inline-flex; }
  .ld-nav.is-open .ld-nav-links {
    display: flex; flex-direction: column; gap: 4px; position: absolute; top: 76px; left: 0; right: 0;
    background: var(--surface); padding: 16px 20px 24px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .ld-nav.is-open .ld-nav-link { padding: 12px 4px; border-bottom: 1px solid var(--surface-soft); }
}

/* ---- Hero ---- */
.ld-hero { padding: 160px 0 64px; }
.ld-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ld-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary);
}
.ld-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ld-hero-title { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.ld-hero-title em { font-style: normal; color: var(--primary); }
.ld-hero-text { font-size: 1.0625rem; color: var(--text-secondary); margin-bottom: 32px; max-width: 46ch; }
.ld-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.ld-hero-visual { display: flex; align-items: center; justify-content: center; animation: ld-float 6s ease-in-out infinite; }
.ld-hero-visual img { width: 100%; max-width: 460px; border-radius: var(--radius-xl); box-shadow: var(--shadow-primary-lg); }
@keyframes ld-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@media (prefers-reduced-motion: reduce) { .ld-hero-visual { animation: none; } }

/* ---- Sections shared rhythm ---- */
.ld-section { padding: 72px 0; }
.ld-section.on-surface { background: var(--surface); }

/* ---- Categories (dynamic: #category-grid) ---- */
.ld-category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ld-category-card {
  padding: 28px 20px; border-radius: var(--radius-lg); background: var(--background);
  border: 1px solid var(--border); text-align: center; font-weight: 600; font-size: 1.05rem;
  transition: all var(--dur-base) var(--ease-out); display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ld-category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ld-category-count { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }

/* ---- Course cards (dynamic: #featured-courses-grid) ---- */
.ld-course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.ld-course-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; transition: all var(--dur-base) var(--ease-out);
}
.ld-course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-primary-lg); border-color: var(--primary-light); }
.ld-course-image { height: 160px; width: 100%; background: var(--surface-soft); overflow: hidden; }
.ld-course-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.ld-course-card:hover .ld-course-image img { transform: scale(1.05); }
.ld-course-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.ld-course-badge {
  display: inline-block; padding: 4px 12px; background: var(--primary-soft); color: var(--primary-dark);
  font-size: 0.75rem; font-weight: 600; border-radius: 20px; margin-bottom: 10px; width: fit-content;
}
.ld-course-title { font-size: 1.05rem; margin-bottom: 6px; }
.ld-course-by { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 14px; flex-grow: 1; }
.ld-course-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.ld-course-foot { display: flex; justify-content: space-between; align-items: center; }
.ld-course-price { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.ld-course-price.is-free { color: var(--success); }

/* ---- Trust / stats bar (dynamic: #stats-section) ---- */
.ld-figures { padding: 8px 0 64px; }
.ld-figures-inner {
  display: flex; align-items: center; gap: 40px; background: var(--surface);
  padding: 36px 40px; border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.ld-figures-lead { flex: 1; min-width: 220px; font-size: 1.15rem; font-weight: 600; color: var(--text-secondary); }
.ld-figures-grid { display: flex; gap: 40px; flex-wrap: wrap; }
.stat { min-width: 90px; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-value .unit { color: var(--primary); }
.stat-label { color: var(--text-muted); font-weight: 500; font-size: 13.5px; margin-top: 2px; }

/* ---- Features ("why us") ---- */
.ld-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.ld-feature { padding: 28px; background: var(--background); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.ld-feature h3 { font-size: 1.15rem; margin-bottom: 10px; }
.ld-feature p { color: var(--text-secondary); font-size: 0.95rem; }

/* ---- Teachers (dynamic: #teacher-grid) ---- */
.ld-people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ld-person { background: var(--surface); padding: 28px; border-radius: var(--radius-lg); text-align: center; border: 1px solid var(--border); }
.ld-person-avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--primary-light); margin: 0 auto 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary-dark); font-size: 1.4rem; }
.ld-person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ld-person-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 2px; }
.ld-person-field { color: var(--primary); font-size: 0.85rem; font-weight: 500; }

/* ---- Steps ("how it works") ---- */
.ld-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.ld-step { text-align: center; }
.ld-step-num { font-size: 2.75rem; font-weight: 800; color: var(--primary-soft); margin-bottom: 12px; }
.ld-step-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.ld-step-text { color: var(--text-secondary); font-size: 0.9rem; max-width: 34ch; }

/* ---- Testimonials (dynamic: #testimonial-grid) ---- */
.ld-voices { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.ld-voice { background: var(--primary-soft); padding: 36px; border-radius: var(--radius-xl); }
.ld-voice-text { font-size: 1.05rem; font-weight: 500; color: var(--primary-dark); margin-bottom: 16px; font-style: italic; }
.ld-voice-by { color: var(--text-secondary); font-size: 0.9rem; }

/* ---- FAQ (dynamic: #faq-list) ---- */
.ld-faq { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; background: none; border: none; text-align: left; font-size: 1rem; font-weight: 600; color: var(--text); cursor: pointer; }
.faq-q .mark { color: var(--primary); font-size: 1.3rem; font-weight: 400; transition: transform var(--dur-base) var(--ease-out); }
.faq-item.is-open .faq-q .mark { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur-base) var(--ease-out); }
.faq-item.is-open .faq-a { max-height: 300px; }
.faq-a-inner { padding-bottom: 20px; color: var(--text-secondary); font-size: 0.95rem; max-width: 62ch; line-height: 1.7; }

/* ---- Closing CTA ---- */
.ld-close {
  padding: 80px 0; margin: 16px 24px; border-radius: var(--radius-xl); text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.ld-close-title { color: #fff; font-size: 2.5rem; margin-bottom: 28px; }
.ld-close-title em { font-style: normal; opacity: 0.85; }

/* ---- Footer ---- */
.ld-foot { padding: 40px 0; border-top: 1px solid var(--border); }
.ld-foot-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.ld-foot-note { color: var(--text-muted); font-size: 0.9rem; }
.ld-foot-links { display: flex; gap: 24px; }
.ld-foot-links a { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.ld-foot-links a:hover { color: var(--primary); }

/* ---- Skeleton loading states (kept from the previous version — the
   reference mockups are static HTML with no loading state to draw
   from, but the real page fetches live data and needs one) ---- */
.ld-skel { background: linear-gradient(90deg, var(--surface-soft) 25%, var(--border) 50%, var(--surface-soft) 75%); background-size: 200% 100%; animation: ld-shimmer 1.4s ease-in-out infinite; border-radius: var(--radius-md); }
@keyframes ld-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.ld-skel-line { height: 52px; margin-bottom: 12px; }
.ld-skel-col { height: 280px; }
.ld-skel-person { height: 220px; }
.ld-skel-voice { height: 160px; }
.ld-skel-faq { height: 56px; margin-bottom: 8px; }
.ld-empty { padding: 32px; text-align: center; }
.ld-empty-text { color: var(--text-muted); font-size: 0.95rem; }

/* ---- Scroll reveal (landing.js toggles .is-in via IntersectionObserver) ---- */
.ld-reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.ld-reveal.is-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .ld-reveal { opacity: 1; transform: none; } }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .ld-hero-grid { grid-template-columns: 1fr; }
  .ld-hero-visual { order: -1; max-width: 380px; margin: 0 auto; }
  .ld-category-grid, .ld-features-grid, .ld-people, .ld-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ld-hero { padding: 140px 0 48px; }
  .ld-hero-title { font-size: 2.25rem; }
  .ld-category-grid, .ld-features-grid, .ld-people, .ld-steps { grid-template-columns: 1fr; }
  .ld-course-grid { grid-template-columns: 1fr; }
  .ld-figures-inner { flex-direction: column; align-items: flex-start; }
}
