/* ============================================================
   LIXA – MOBILE ENHANCEMENTS
   Burger menu, swipe carousels, infinite scroll, footer fixes
   ============================================================ */

/* ── BURGER BUTTON ──────────────────────────────────────── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.nav-burger:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #e8eaed;
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1),
              opacity 0.18s ease,
              width 0.22s ease;
  transform-origin: center;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE NAV DRAWER ──────────────────────────────────── */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  pointer-events: none;
}
.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 82vw);
  background: linear-gradient(180deg, #0e0f12 0%, #080909 100%);
  border-left: 1px solid rgba(255,255,255,0.08);
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: 64px;
  flex-shrink: 0;
}
.nav-drawer-close {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #e8eaed;
  -webkit-tap-highlight-color: transparent;
}
.nav-drawer-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}
.nav-drawer-links {
  padding: 12px 0;
  flex: 1;
}
.nav-drawer-links a {
  display: flex;
  align-items: center;
  padding: 13px 22px;
  color: rgba(237,237,237,0.82);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav-drawer-links a:last-child { border-bottom: none; }
.nav-drawer-links a:hover,
.nav-drawer-links a:active { color: #fff; background: rgba(255,255,255,0.04); }
.nav-drawer-footer {
  padding: 16px 20px 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav-drawer-footer .btn {
  width: 100% !important;
  text-align: center !important;
  justify-content: center !important;
  padding: 14px 20px !important;
  font-size: 14px !important;
}

/* ── DRAWER OPEN STATE ──────────────────────────────────── */
body.nav-open {
  overflow: hidden;
}
body.nav-open .nav-drawer {
  pointer-events: auto;
}
body.nav-open .nav-drawer-backdrop {
  opacity: 1;
}
body.nav-open .nav-drawer-panel {
  transform: translateX(0);
}

/* ================================================================
   MOBILE BREAKPOINT
   ================================================================ */
@media (max-width: 768px) {

  /* Show burger, hide desktop nav-actions login link */
  .nav-burger { display: flex; }
  .nav-drawer  { display: block; }

  /* Hide the Log In text link in nav-actions on mobile */
  .nav-actions > .nav-link {
    display: none !important;
  }

  /* Make Get Started button smaller */
  .nav-actions .btn-sm {
    padding: 9px 14px !important;
    font-size: 12px !important;
    min-width: 0 !important;
  }

  /* Nav content: flex row – logo on left, actions+burger on right */
  .nav-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
    min-height: 60px !important;
    gap: 0 !important;
  }

  /* Keep nav-links hidden (desktop) */
  .nav-links {
    display: none !important;
  }

  /* nav-actions aligns to end with the burger */
  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-right: 0 !important;
    margin-left: auto !important;
  }

  /* Burger sits after nav-actions */
  .nav-burger {
    margin-left: 8px;
    flex-shrink: 0;
  }

  /* ── HERO MOBILE ──────────────────────────────────────── */
  .premium-hero {
    padding: 90px 0 52px !important;
    min-height: auto !important;
  }

  .hero-shell {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    min-height: auto !important;
    padding-bottom: 0 !important;
  }

  .hero-copy {
    text-align: left !important;
    padding-top: 0 !important;
    max-width: none !important;
  }

  .hero-title {
    font-size: clamp(34px, 11vw, 52px) !important;
    line-height: 1.02 !important;
    max-width: none !important;
    word-break: normal !important;
    margin-bottom: 14px !important;
  }

  .hero-subtitle {
    font-size: 15px !important;
    line-height: 1.6 !important;
    max-width: none !important;
    margin-bottom: 20px !important;
  }

  .hero-cta {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .hero-cta .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
  }

  /* Hero panel - hide the code terminal on mobile to keep it clean */
  .hero-visual {
    display: none !important;
  }

  /* Trust strip - scrollable row */
  .trust-strip-inner {
    display: flex !important;
    overflow-x: auto !important;
    gap: 0 !important;
    padding: 12px 0 !important;
    scrollbar-width: none !important;
  }
  .trust-strip-inner::-webkit-scrollbar { display: none; }
  .trust-strip-inner span {
    flex: 0 0 auto;
    padding: 6px 16px;
    border-right: 1px solid rgba(255,255,255,0.06);
    font-size: 11px !important;
    white-space: nowrap;
  }
  .trust-strip-inner span:last-child { border-right: none; }

  /* ── SECTIONS ──────────────────────────────────────────── */
  .section { padding: 52px 0 !important; }

  .section-header-center {
    text-align: left !important;
    max-width: none !important;
    margin-bottom: 28px !important;
  }

  .section-header-center h2 { font-size: clamp(24px, 7vw, 36px) !important; }
  .section-header-center p  { font-size: 15px !important; }

  /* ── PROBLEM / SOLUTION SWIPE CAROUSEL ─────────────────── */
  /* Wrap split-grid sections on mobile into horizontal swipe */
  .problem-solution-swipe {
    overflow-x: auto;
    display: flex;
    gap: 14px;
    padding: 4px 18px 16px;
    margin: 0 -18px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .problem-solution-swipe::-webkit-scrollbar { display: none; }

  .swipe-card-item {
    flex: 0 0 82vw;
    max-width: 310px;
    scroll-snap-align: start;
  }

  /* Collapse split-grid into single column */
  .split-grid,
  .split-grid-reverse {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .section-content h2 { font-size: clamp(22px, 7vw, 32px) !important; }
  .section-content p  { font-size: 15px !important; }

  .icon-list-card,
  .showcase-copy {
    padding: 20px !important;
  }

  .modern-list { gap: 14px !important; }
  .modern-list li {
    grid-template-columns: 36px 1fr !important;
    gap: 10px !important;
  }
  .inline-icon {
    width: 36px !important;
    height: 36px !important;
  }

  /* ── WORKFLOW / SHOWCASE SECTION ────────────────────────── */
  .showcase-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .code-shell { border-radius: 16px !important; }

  .code-shell-top {
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }

  .code-tabs {
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  .code-tab {
    padding: 5px 10px !important;
    font-size: 11px !important;
  }

  .code-shell-body {
    grid-template-columns: 1fr !important;
  }

  .code-block {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
    padding: 16px !important;
  }

  .code-block pre {
    font-size: 11.5px !important;
    line-height: 1.65 !important;
  }

  .browser-url {
    font-size: 11px !important;
    padding: 5px 8px !important;
  }

  /* ── METRICS ────────────────────────────────────────────── */
  .metrics-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .metric-panel {
    padding: 18px 16px !important;
    min-height: 110px !important;
    border-radius: 16px !important;
  }

  .big-metric { font-size: 34px !important; }
  .metric-panel span:last-child { font-size: 12px !important; }

  /* ── PLATFORM CAPABILITIES INFINITE SCROLL ─────────────── */
  /* JS will add .feature-marquee-wrap class + duplicate items */
  .feature-marquee-wrap {
    overflow: hidden;
    position: relative;
    margin: 0 -18px;
    padding: 4px 0 16px;
  }

  .feature-marquee-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: featureScroll 28s linear infinite;
  }

  .feature-marquee-track .feature-card {
    flex: 0 0 72vw !important;
    max-width: 260px !important;
    width: 72vw !important;
    border-radius: 18px !important;
    padding: 18px !important;
  }

  .feature-marquee-wrap:hover .feature-marquee-track,
  .feature-marquee-wrap:focus-within .feature-marquee-track {
    animation-play-state: paused;
  }

  @keyframes featureScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }

  .feature-card h3 { font-size: 15px !important; }
  .feature-card p  { font-size: 13px !important; }
  .feature-icon {
    width: 38px !important;
    height: 38px !important;
    margin-bottom: 12px !important;
    border-radius: 10px !important;
  }

  /* ── WHO IT IS FOR / USE CASE SWIPE CARDS ───────────────── */
  .use-case-swipe-wrap {
    overflow-x: auto;
    display: flex;
    gap: 12px;
    padding: 4px 18px 20px;
    margin: 0 -18px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .use-case-swipe-wrap::-webkit-scrollbar { display: none; }

  .use-case-swipe-wrap .use-case-card {
    flex: 0 0 76vw !important;
    max-width: 270px !important;
    width: 76vw !important;
    scroll-snap-align: start !important;
    padding: 20px !important;
    border-radius: 18px !important;
    flex-shrink: 0 !important;
  }

  .use-case-card h3 { font-size: 16px !important; }
  .use-case-card p  { font-size: 14px !important; }
  .metric-value { font-size: 30px !important; }

  /* ── PRICING SWIPE (index page preview) ─────────────────── */
  .pricing-preview-swipe-wrap {
    overflow-x: auto;
    display: flex;
    gap: 12px;
    padding: 16px 18px 20px;
    margin: 0 -18px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pricing-preview-swipe-wrap::-webkit-scrollbar { display: none; }

  .pricing-preview-swipe-wrap .pricing-preview-card {
    flex: 0 0 76vw !important;
    max-width: 260px !important;
    width: 76vw !important;
    scroll-snap-align: start !important;
    flex-shrink: 0 !important;
    padding: 22px !important;
    border-radius: 18px !important;
    transform: none !important;
  }

  /* Keep featured card styled but no scale transform */
  .pricing-preview-card.featured {
    transform: none !important;
    border-color: rgba(255,255,255,0.22) !important;
  }

  /* ── REVIEWS MARQUEE ─────────────────────────────────────── */
  .review-card {
    width: 270px !important;
    flex-basis: 270px !important;
    padding: 18px !important;
    border-radius: 16px !important;
  }
  .review-copy { font-size: 13.5px !important; }

  /* ── DOCS CTA ────────────────────────────────────────────── */
  .docs-cta {
    flex-direction: column !important;
    padding: 22px !important;
    gap: 18px !important;
    border-radius: 18px !important;
  }

  .docs-cta h2  { font-size: clamp(20px, 6vw, 28px) !important; }
  .docs-cta p   { font-size: 14px !important; max-width: none !important; }

  .docs-cta-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .docs-cta-actions .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* ── FOOTER MOBILE ───────────────────────────────────────── */
  .footer {
    padding: 44px 0 24px !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px 20px !important;
  }

  .footer-brand {
    grid-column: 1 / -1 !important;
    margin-bottom: 4px;
  }

  .footer-brand p {
    font-size: 13px !important;
    margin-top: 8px;
    margin-bottom: 0;
    max-width: 240px;
  }

  .footer-col h4 {
    font-size: 12px !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px !important;
  }

  .footer-col ul { list-style: none; }
  .footer-col ul li { margin-bottom: 8px; }
  .footer-col ul li a {
    font-size: 14px !important;
    color: rgba(237,237,237,0.7);
  }
  .footer-col ul li a:hover { color: #fff; }

  .footer-bottom {
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    padding-top: 20px !important;
    margin-top: 20px !important;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
  }

  .footer-bottom p { font-size: 12px !important; }
  .footer-powered { font-size: 12px !important; margin-top: 0 !important; }

  /* ── PRICING PAGE SPECIFIC ───────────────────────────────── */
  .pricing-hero {
    padding: 100px 0 40px !important;
    text-align: left !important;
  }

  .pricing-tiers {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .pricing-card {
    padding: 22px !important;
    border-radius: 18px !important;
  }

  .pricing-card.featured {
    transform: none !important;
    border-color: rgba(255,255,255,0.22) !important;
    order: -1;
  }

  .pricing-price {
    font-size: 42px !important;
  }

  /* Comparison table scroll */
  .comparison-table {
    overflow-x: auto !important;
    border-radius: 14px !important;
  }

  .comparison-table table {
    min-width: 500px;
  }

  /* ── ABOUT / OTHER PAGE HEROES ───────────────────────────── */
  body:not(.home-page) .hero {
    padding: 100px 0 52px !important;
  }

  body:not(.home-page) .hero h1 {
    font-size: clamp(32px, 11vw, 48px) !important;
    max-width: none !important;
    line-height: 1.05 !important;
  }

  body:not(.home-page) .hero-subtitle {
    font-size: 15px !important;
    max-width: none !important;
  }

  body:not(.home-page) .hero-content {
    max-width: none !important;
  }

  body:not(.home-page) .section {
    padding: 52px 0 !important;
  }

  /* ── DOCS PAGE ───────────────────────────────────────────── */
  .docs-layout {
    grid-template-columns: 1fr !important;
  }

  .docs-sidebar {
    display: none !important;
  }

  .docs-content {
    padding-top: 100px !important;
  }

  /* ── UTILITY ─────────────────────────────────────────────── */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Swipe hint dot indicators */
  .swipe-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
  }

  .swipe-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .swipe-dot.active {
    background: rgba(255,255,255,0.7);
    transform: scale(1.3);
  }

  /* ── SMALL SCREENS ───────────────────────────────────────── */
}

@media (max-width: 400px) {
  .hero-title { font-size: clamp(30px, 10vw, 38px) !important; }
  .feature-marquee-track .feature-card { flex: 0 0 80vw !important; max-width: 240px !important; width: 80vw !important; }
  .use-case-swipe-wrap .use-case-card { flex: 0 0 82vw !important; max-width: 240px !important; width: 82vw !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 22px !important; }
  .metrics-grid { grid-template-columns: 1fr 1fr !important; }
}
