/* ==========================================================================
   MOBILE OPTIMIZATIONS (Phase 2 & Phase 3)
   ========================================================================== */

/* Hamburger Button & Mobile Menu Defaults (Hidden on Desktop) */
html, body {
  overflow-x: hidden;
  width: 100%;
}

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
}

.mobile-menu.active {
  pointer-events: auto;
  visibility: visible;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 20, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mobile-menu.active .mobile-menu-backdrop {
  opacity: 1;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 320px;
  height: 100%;
  background: var(--bg-dark);
  border-left: 1px solid rgba(255,255,255,0.1);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-menu.active .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 5%;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.close-menu-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-content {
  padding: 32px 5%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  overflow-y: auto;
}

.mobile-menu-content > a {
  color: #fff;
  text-decoration: none;
  font-size: 24px;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mobile-menu-actions {
  margin-top: auto;
  padding-top: 32px;
}

/* ==========================================================================
   MOBILE MEDIA QUERIES (<= 768px)
   ========================================================================== */

/* Desktop nav fits only above ~1180px (7 links + actions in a 1080px box);
   below that, collapse to the hamburger. Also closes the old 769–1024px
   gap where links hid but the hamburger never appeared. */
@media (max-width: 1180px) {
  .nav-links, .nav-actions {
    display: none !important;
  }
  .hamburger-btn {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  /* Navigation */
  .nav-links, .nav-actions {
    display: none !important;
  }
  .hamburger-btn {
    display: flex;
  }

  /* Safe Area / Env */
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .site-nav {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  /* Typography & Spacing */
  .section-padding {
    padding: 80px 0 !important;
  }
  
  h1, h2, h3, h4 {
    overflow-wrap: break-word;
  }

  .hero-title {
    font-size: clamp(40px, 10vw, 60px) !important;
  }
  
  .split-content h2, .section-header h2, .dark-heading, .footer-cta h2, .refer-box h2 {
    font-size: clamp(40px, 9vw, 56px) !important;
  }

  .hero-desc, .split-content p, .sleek-desc, .scroll-block p, .test-text, .refer-box p {
    font-size: 16px !important;
  }

  /* Touch Targets */
  a, button, .wizard-option, input {
    min-height: 44px;
  }

  /* Grids to Single Column */
  .bento-cards, .metrics-grid, .wizard-grid, .footer-grid, .footer-links {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    gap: 24px !important;
  }
  
  .bento-creative-card {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    min-height: 300px;
    padding: 24px !important;
  }
  
  .bento-creative-card h3 {
    font-size: 32px !important;
  }
  
  .bento-creative-card p {
    font-size: 16px !important;
  }

  .metrics-card .tilt-element {
    padding: 32px !important;
  }

  /* Hero Section */
  .hero-section {
    min-height: auto !important;
    padding-top: 140px !important;
    padding-bottom: 60px !important;
  }

  .hero-visual {
    margin-top: 40px;
  }

  /* Buttons */
  .hero-buttons, .footer-cta .hero-buttons {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .btn-solid, .btn-outline, .btn-glass, .btn-solid-dark {
    width: 100%;
    justify-content: center;
  }

  /* Images & Media */
  .main-portrait, .split-visual img, .sticky-image {
    aspect-ratio: 1 / 1 !important;
    width: 100%;
    height: auto;
  }
  
  .float-pos, .float-funding {
    display: none !important;
  }

  /* Apple-Style Sticky Scroll (Stacking for Mobile) */
  .sticky-container {
    flex-direction: column !important;
    gap: 40px !important;
  }

  .sticky-text-col {
    width: 100% !important;
    padding-bottom: 0 !important;
  }
  
  .scroll-block {
    min-height: auto !important;
    opacity: 1 !important;
    margin-bottom: 40px;
    text-align: center;
  }
  
  .scroll-icon {
    margin: 0 auto 24px !important;
  }

  .sticky-visual-col {
    position: relative !important;
    width: 100% !important;
    top: 0 !important;
    height: 350px !important;
  }

  .sticky-image {
    position: absolute;
    opacity: 0 !important;
  }
  
  .sticky-image.s-img-0 {
    opacity: 1 !important; /* Just show the first image on mobile, or handle via JS */
  }

  /* Sleek Gallery - Convert to Vertical or Native Native Scroll */
  .sleek-gallery-section {
    height: auto !important;
    padding: 80px 0;
  }
  
  .gallery-track {
    flex-direction: column;
    width: 100% !important;
    height: auto !important;
    padding-left: 5% !important;
    padding-right: 5% !important;
    transform: none !important;
  }
  
  .gallery-panel {
    width: 100% !important;
    padding-right: 0 !important;
    margin-bottom: 40px;
  }
  
  .ultra-sleek-title {
    font-size: clamp(56px, 12vw, 80px) !important;
  }
  
  .product-card-sleek {
    height: 400px !important;
  }

  .sleek-img {
    filter: grayscale(0%) !important;
    opacity: 1 !important;
    transform: scale(1) !important;
  }

  /* Live ROI Calculator */
  .calc-sleek-glass {
    padding: 32px !important;
  }
  
  .calc-comparison-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  
  .calc-box {
    padding: 24px !important;
  }

  .calc-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 24px;
  }

  .recommendation-panel {
    width: 100% !important;
    margin-top: 40px;
  }

  .calc-animation-container {
    flex-direction: column;
  }
  
  /* Timeline */
  .timeline-container {
    padding-left: 24px !important;
  }
  
  .step-number {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    left: -42px !important;
  }
  
  /* Hover Showcase Reveal */
  .hover-reveal-img {
    display: none !important; /* Hide floating image on mobile */
  }
  
  .hover-item h3 {
    font-size: 32px !important;
  }

  /* Footer */
  .footer-cta {
    padding: 80px 0 !important;
  }

  .footer-grid {
    padding: 60px 0 40px !important;
  }
  
  .link-col {
    text-align: center;
  }
}
