/* ==========================================================================
   AMAZING INC. — MOBILE-FIRST RESPONSIVE DESIGN SYSTEM
   Tested Viewports: 320px, 360px, 375px, 390px, 412px, 430px, 768px, 1024px, 1440px
   ========================================================================== */

/* Strict viewport constraints */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

/* Touch Targets: minimum 44x44px for thumb reach */
.btn, .mobile-nav-toggle, .mobile-nav-link, .share-target-item, .detail-tab-btn {
  min-height: 44px;
  touch-action: manipulation;
}

/* Mobile Nav Drawer Overlay */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 10, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 99;
  flex-direction: column;
  padding: 1.5rem 1.25rem 2.5rem 1.25rem;
  overflow-y: auto;
  border-bottom: 1px solid var(--border-subtle);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
  pointer-events: none;
}

.mobile-nav-drawer.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.75rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--neon-purple);
}

/* Header Height: compact 60px (< 10% of 667px iPhone SE) */
.site-header {
  height: 60px;
}

/* Tablets and Laptops */
@media (max-width: 992px) {
  .site-nav {
    display: none;
  }
  
  .header-action {
    display: none;
  }
  
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  
  .footer-brand {
    grid-column: span 2;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
    text-align: left;
  }

  .hero-visual {
    max-width: 460px;
    margin: 0 auto;
  }
}

/* Smartphones and Mobile Viewports */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  
  .site-header {
    height: 58px;
  }
  
  .mobile-nav-drawer {
    top: 58px;
  }
  
  /* Hero Section */
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  .hero-visual {
    order: 2;
    max-width: 100%;
    margin: 1.5rem auto 0 auto;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* App Cards Grid */
  .apps-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Zero Ads Banner */
  .zero-ads-banner {
    padding: 1.75rem 1.25rem !important;
  }

  .zero-ads-grid {
    grid-template-columns: 1fr !important;
  }

  /* Share to Queue Steps */
  .share-flow-grid {
    grid-template-columns: 1fr !important;
  }

  .share-preview-split {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Spotlights */
  .spotlight-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .spotlight-card {
    padding: 1.75rem 1.25rem !important;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-brand {
    grid-column: span 1;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Small Smart Phones (<= 375px and 320px) */
@media (max-width: 375px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  
  .brand-header-img {
    height: 30px;
    max-width: 170px;
  }

  .zero-ads-app-chip {
    padding: 0.65rem 0.85rem;
    gap: 0.65rem;
  }

  .share-flow-step {
    padding: 1.25rem 1rem !important;
  }
}
