/* ==========================================================================
   PARSANA — Responsive Fixes & Mobile Overrides
   Supplements existing CSS files with any gaps in mobile/tablet coverage.
   ========================================================================== */

/* ── Hero: smaller min-height on phones ─────── */
@media (max-width: 640px) {
  .hero { min-height: 600px; }
}

/* ── Hamburger button ────────────────────────── */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  margin-left: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
              opacity 0.25s ease;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav__hamburger { display: flex; }
}

/* ── Mobile nav drawer ───────────────────────── */
.nav__mobile-menu {
  position: fixed;
  top: var(--nav-h, 64px);
  left: 0; right: 0;
  background: var(--black, #0b0b0b);
  padding: 12px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 98;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  /* slide-in animation */
  animation: mobileMenuIn 0.28s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
}
@keyframes mobileMenuIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav.inverse .nav__mobile-menu,
.nav.solid .nav__mobile-menu {
  background: var(--white, #fff);
  border-top-color: rgba(11, 11, 11, 0.08);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.12);
}

.nav__mobile-link {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-body, sans-serif);
  color: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.nav__mobile-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav__mobile-link.active { color: #fff; font-weight: 600; }

.nav.inverse .nav__mobile-link,
.nav.solid .nav__mobile-link {
  color: rgba(11, 11, 11, 0.68);
}
.nav.inverse .nav__mobile-link:hover,
.nav.solid .nav__mobile-link:hover {
  background: rgba(11, 11, 11, 0.04);
  color: var(--ink, #0b0b0b);
}
.nav.inverse .nav__mobile-link.active,
.nav.solid .nav__mobile-link.active {
  color: var(--ink, #0b0b0b);
}

.nav__mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  height: 50px;
  border-radius: 999px;
  background: var(--orange, #E84E1B);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.3s;
}
.nav__mobile-cta:hover { background: var(--orange-soft, #FF6132); }
.nav__mobile-cta svg { width: 12px; height: 12px; }

/* ── Store header (ProductListing) ───────────── */
@media (max-width: 980px) {
  .store-header { padding-top: calc(var(--nav-h, 64px) + 48px) !important; padding-bottom: 56px !important; }
  .store-header .container > div { flex-direction: column !important; align-items: flex-start !important; gap: 24px !important; }
  .store-header .container > div > div:last-child { flex-shrink: 1 !important; align-items: flex-start !important; }
}
@media (max-width: 640px) {
  .store-header { padding-top: calc(var(--nav-h, 64px) + 32px) !important; padding-bottom: 40px !important; }
}

/* ── Store product grid ──────────────────────── */
/* 2-col is the default via inline style; collapse to 1-col on phones */
@media (max-width: 640px) {
  .store-grid { grid-template-columns: 1fr !important; }
}

/* ── ElixirAI section grid (ProductListing) ──── */
/* class "store-elixir-grid" added in TSX */
@media (max-width: 980px) {
  .store-elixir-grid { grid-template-columns: 1fr !important; gap: 48px !important; }
}

/* ── What's in the box grid (ProductDetail) ──── */
/* class "box-items-grid" added in TSX */
@media (max-width: 980px) {
  .box-items-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .box-items-grid { grid-template-columns: 1fr !important; }
}

/* ── Footer: 1-col on mobile ─────────────────── */
@media (max-width: 640px) {
  .foot { padding: 64px 0 28px; }
  .foot__grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .foot__brand { grid-column: auto !important; }
  .foot__bot { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ── Comparison table: always scrollable ─────── */
.compare-section table,
.pdp-compare table {
  min-width: 480px;
}

/* ── Final CTA buttons: full-width on phones ─── */
@media (max-width: 640px) {
  .final-cta .btn,
  .final-cta a.btn {
    width: 100%;
    justify-content: center;
  }
  .hero__ctas { flex-direction: column; width: 100%; max-width: 320px; }
  .hero__ctas .btn,
  .hero__ctas a.btn { width: 100%; justify-content: center; }
}

/* ── Trust bar: items stack nicely ─────────────  */
@media (max-width: 480px) {
  .trust__item { flex-direction: column; text-align: center; gap: 8px; }
}

/* ── Hero headline: tighter on very small ──────  */
@media (max-width: 390px) {
  .hero__hl { font-size: clamp(36px, 11vw, 48px) !important; }
}

/* ── General: prevent horizontal overflow ───────  */
.hero__video { object-fit: cover !important; }

/* ── Body Locks & Unlocks: keep image + content visible together on tablet/mobile ─── */
@media (max-width: 980px) {
  /* Keep the sticky scroll-pin behavior; switch to stacked layout inside the viewport */
  .locks__pin,
  .unlocks__pin { height: 500vh; }

  .locks__sticky,
  .unlocks__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 20px;
    padding: 72px 24px 32px;
    align-items: stretch;
    align-content: stretch;
  }

  /* Image on top, fits within the upper row */
  .locks__visual,
  .unlocks__visual {
    grid-row: 1;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }

  /* Text below the image */
  .locks__left,
  .unlocks__right {
    grid-row: 2;
    padding: 0;
    min-height: 220px;
    position: relative;
  }

  /* Hide vertical progress rail (replaced by panel content) */
  .locks__progress,
  .unlocks__progress { display: none; }

  /* Re-pin panels absolutely so only the active one shows (same UX as desktop) */
  .locks__panel,
  .unlocks__panel {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 0;
  }

  .locks__panel h3,
  .unlocks__panel h3 { font-size: clamp(32px, 6.5vw, 48px); margin: 8px 0 12px; }
  .locks__panel p,
  .unlocks__panel p { font-size: 15px; max-width: 100%; }
}

@media (max-width: 640px) {
  .locks__sticky,
  .unlocks__sticky { padding: 64px 18px 24px; gap: 16px; }
  .locks__left,
  .unlocks__right { min-height: 200px; }
}
