/* ========================================
   Responsive — Tablet ≈ Desktop, Mobile simplifies
   ======================================== */

/* --- Hamburger toggle (hidden on desktop) --- */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 200;
}
.nav-mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #d8dbe9;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-mobile-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Tablet (<=900px): keep layout, just adjust spacing & nav --- */
@media (max-width: 900px) {
  .nav-mobile-toggle {
    display: flex !important;
  }

  .site-header .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #000000;
    z-index: 150;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 80px 24px 24px;
  }
  .site-header .nav-links.is-open {
    display: flex !important;
  }
  .site-header .nav-links a,
  .site-header .nav-links .nav-dropdown-toggle {
    font-size: 1.3rem;
    padding: 12px 0;
  }
  .site-header .nav-dropdown-menu {
    position: static;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0 0 16px;
    opacity: 1;
    transform: none;
    visibility: visible;
    background: none;
    border: none;
    box-shadow: none;
  }
  .site-header .nav-dropdown:hover .nav-dropdown-menu,
  .site-header .nav-dropdown.is-open .nav-dropdown-menu {
    display: flex;
  }

  .site-header .container {
    justify-content: space-between;
  }
  .nav-actions .btn-ghost {
    display: none;
  }

  /* hero — keep 2-col grid but scale images down */
  .hero-grid.hero-grid-editorial {
    grid-template-columns: 1fr !important;
    gap: 24px;
    text-align: center;
  }
  .hero-grid.hero-grid-editorial .editorial-stack {
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
  }
  .hero-grid.hero-grid-editorial .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* pricing — 2 col stays */
  .pricing-card-grid,
  .pricing-card-grid-shot {
    max-width: 100%;
  }

  /* feature cards — 2-col stays */
  .features-section-demo {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* manifesto — stack to 1 col */
  .manifesto-grid {
    grid-template-columns: 1fr !important;
  }

  /* sticky feature section — stack */
  .feature-sticky-section .feature-section-shell {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  .feature-sticky-section .sticky-side {
    position: static !important;
    top: auto !important;
  }

  /* footer — stack columns */
  .site-footer .footer-columns {
    grid-template-columns: 1fr !important;
  }
  .site-footer .footer-meta {
    grid-template-columns: 1fr !important;
  }
  .site-footer .footer-side-right {
    padding-left: 0 !important;
  }

  /* hero image scale */
  .hero-image-stage {
    min-height: 400px !important;
  }
  .hero-image-card-back,
  .hero-image-card-front {
    scale: 0.8 !important;
  }

  /* product preview */
  .real-journal-preview-frame {
    --journal-preview-scale: 0.52;
  }
}

/* --- Mobile (<=640px) --- */
@media (max-width: 640px) {
  .hero {
    padding-top: 76px !important;
  }
  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    line-height: 1.05;
  }
  .hero-text {
    font-size: 0.95rem !important;
  }
  .hero-grid.hero-grid-editorial {
    gap: 16px;
  }
  .hero-grid.hero-grid-editorial .hero-visual {
    display: none;
  }
  .hero-star-btn {
    padding: 12px 20px !important;
    font-size: 0.8rem !important;
  }
  .hero-star-btn .hero-star {
    width: 14px !important;
    height: 14px !important;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .features-section-demo {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
  }
  .feature-demo-card {
    padding: 18px !important;
  }
  .feature-demo-card .feature-demo-icon {
    width: 36px !important;
    height: 36px !important;
  }

  .section-heading {
    font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
  }

  .pricing-tier,
  .pricing-tier-shot {
    padding: 24px 16px !important;
  }
  .pricing-amount-row {
    flex-wrap: wrap;
    gap: 4px;
  }
  .pricing-controls {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .pricing-billing-toggle {
    justify-content: center;
  }

  .cta-band {
    padding: 40px 0 !important;
  }
  .cta-panel {
    padding: 28px 18px !important;
    border-radius: 18px !important;
  }
  .cta-panel h2,
  .cta-panel .section-heading {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
  }
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-actions .btn {
    width: 100%;
    text-align: center;
  }

  .product-preview-heading {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
  }

  .footer-wordmark {
    font-size: clamp(2rem, 10vw, 3rem) !important;
  }
  .site-footer .footer-brand-lockup {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .manifesto-copy h2 {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
  }
  .manifesto-benefits li {
    font-size: 0.88rem;
  }

  .standard-uiverse-btn,
  .premium-uiverse-btn,
  .nav-neon-btn,
  .cta-neon-btn {
    padding: 10px 18px !important;
    font-size: 0.78rem !important;
  }

  .btn-lg {
    padding: 11px 22px !important;
    font-size: 0.85rem !important;
  }

  .editorial-card {
    padding: 18px !important;
  }

  .container {
    width: min(100% - 32px, 1200px) !important;
  }

  .site-header .container {
    padding: 10px 14px !important;
  }

  .real-journal-preview-frame {
    --journal-preview-scale: 0.38;
  }
}

/* --- Small mobile (<=400px) --- */
@media (max-width: 400px) {
  .hero h1 { font-size: 1.7rem !important; }
  .pricing-tier { padding: 16px 12px !important; }
  .feature-demo-card { padding: 14px !important; }
  .cta-panel { padding: 22px 14px !important; }
}

/* ========================================
   Tablet overrides: restore 2-col on 641-900px
   Cancel the aggressive 1180px stacking
   ======================================== */
@media (min-width: 641px) and (max-width: 1180px) {
  /* Keep hero as single-col but with centered content (already in 900 breakpoint) */

  /* Keep pricing 2-col */
  .pricing-card-grid,
  .pricing-card-grid-shot {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: none !important;
  }

  /* Keep features 2-col */
  .features-section-demo {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Keep footer columns 2-col */
  .site-footer .footer-columns {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .site-footer .footer-meta {
    grid-template-columns: 2fr 1fr !important;
  }
  .site-footer .footer-side-right {
    padding-left: 40px !important;
  }
}
