/**
 * NAANPLAN RESPONSIVE STYLES
 * Mobile-First Breakpoints: 390px, 430px, 768px, 1024px, 1280px, 1440px, 1920px
 * Strictly zero horizontal overflow, intentional mobile UX.
 */

/* ==========================================================================
   Desktop Large Screens (1440px - 1920px+)
   ========================================================================== */
@media (min-width: 1441px) {
  .hero-section {
    padding-top: calc(78px + 4.5rem);
    padding-bottom: 5.5rem;
  }

  .device-composition {
    min-height: 640px;
  }

  .mockup-laptop {
    max-width: 620px;
  }

  .mockup-phone-grocery {
    width: 260px;
  }

  .mockup-phone-multiservice {
    width: 265px;
  }
}

/* ==========================================================================
   Desktop Standard (1280px - 1440px)
   ========================================================================== */
@media (max-width: 1280px) {
  .hero-grid {
    gap: 2.5rem;
    grid-template-columns: 1fr 1.1fr;
  }

  .mockup-laptop {
    max-width: 520px;
  }

  .mockup-phone-grocery {
    width: 230px;
  }

  .mockup-phone-multiservice {
    width: 240px;
    right: 5px;
  }

  /* Solutions cards: slightly tighter padding so four columns stay readable */
  .skeleton-card {
    padding: 1.75rem 1.5rem 1.5rem;
  }

  .footer-top-grid {
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   Tablet Landscape & Medium Screens (1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  /* Navigation switch to hamburger */
  .nav-menu,
  .nav-actions {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

  .mobile-nav-drawer {
    display: block;
  }

  /* Hero Layout: Stack vertically with clear hierarchy */
  .hero-section {
    padding-top: calc(78px + 2.5rem);
    padding-bottom: 3.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .hero-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    align-items: center;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-ecosystem-pills {
    justify-content: center;
  }

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

  .device-composition {
    min-height: 540px;
  }

  .mockup-laptop {
    max-width: 540px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }

  .mockup-laptop:hover {
    transform: translateX(-50%) translateY(-4px);
  }

  .mockup-phone-grocery {
    left: 10px;
    bottom: -15px;
    width: 220px;
  }

  .mockup-phone-multiservice {
    right: 10px;
    bottom: 10px;
    width: 230px;
  }

  .floating-dispatch-card {
    left: 5px;
    top: 140px;
  }

  /* Solutions Section */
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer layout */
  .footer-top-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .footer-brand-col {
    grid-column: span 3;
    max-width: 540px;
  }
}

/* ==========================================================================
   Tablet Portrait (768px)
   ========================================================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(2.15rem, 6vw, 3rem);
  }

  .hero-lead {
    font-size: 1.05rem;
  }

  .device-composition {
    min-height: 480px;
  }

  .mockup-laptop {
    width: 95%;
  }

  .admin-metrics-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .metric-card {
    padding: 0.5rem 0.6rem;
  }

  .metric-value {
    font-size: 0.9rem;
  }

  .mockup-phone-grocery {
    width: 200px;
    left: 0;
    bottom: -10px;
  }

  .mockup-phone-multiservice {
    width: 210px;
    right: 0;
    bottom: 5px;
  }

  /* Support chips: keep only the title line so they stay compact */
  .support-badge-sub {
    display: none;
  }

  .floating-dispatch-card {
    display: none; /* Hide floating secondary tag on small tablets to preserve focal clarity */
  }

  .skeleton-preview-section {
    padding: 4.5rem 0;
  }

  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer-brand-col {
    grid-column: span 2;
  }
}

/* ==========================================================================
   Mobile Landscape & Large Mobile (430px - iPhone 14/15 Pro Max)
   ========================================================================== */
@media (max-width: 480px) {
  :root {
    --container-gutter: 1.15rem;
  }

  .navbar {
    height: 70px;
    width: 100%;
  }

  .nav-logo-img {
    height: 32px;
  }

  .hero-section {
    padding-top: calc(70px + 1.75rem);
    padding-bottom: 2.5rem;
    overflow-x: hidden;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
    text-align: center;
    align-items: center;
  }

  .hero-eyebrow {
    margin-bottom: 1rem;
  }

  .hero-eyebrow .badge {
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
  }

  .hero-title {
    font-size: clamp(1.85rem, 7.5vw, 2.25rem);
    line-height: 1.15;
    margin-bottom: 1rem;
  }

  .hero-lead {
    font-size: 0.975rem;
    margin-bottom: 1.75rem;
  }

  .hero-cta-group {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .hero-ecosystem-wrapper {
    padding-top: 1.25rem;
    width: 100%;
  }

  .hero-ecosystem-pills {
    gap: 0.45rem;
    justify-content: center;
  }

  .ecosystem-pill {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  /* Intentionally crafted Mobile Device Presentation */
  .device-composition {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    padding: 0.5rem 0 2rem; /* extra bottom room so the last phone's shadow is not clipped */
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .composition-glow {
    display: none;
  }

  .floating-dispatch-card {
    display: none;
  }

  /* Decorative support chips are hidden on mobile so they never become
     separate blocks in the vertical device stack */
  .hero-support-badge {
    display: none;
  }

  /* Laptop mockup in mobile view: sits on top as the platform master hub */
  .mockup-laptop {
    position: relative;
    width: 100%;
    max-width: 100%;
    left: auto;
    right: auto;
    transform: none;
    top: auto;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
  }

  .mockup-laptop:hover {
    transform: none;
  }

  .browser-header {
    padding: 0.5rem 0.65rem;
  }

  .browser-url-bar {
    max-width: 150px;
    font-size: 0.625rem;
    padding: 0.15rem 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .browser-actions {
    display: none;
  }

  .admin-ui {
    grid-template-columns: 50px 1fr;
    min-height: auto;
  }

  .admin-sidebar {
    padding: 0.5rem 0.2rem;
    gap: 0.4rem;
  }

  .admin-nav-item span {
    display: none; /* Icon only on mobile admin sidebar */
  }

  .admin-main {
    padding: 0.65rem 0.75rem;
    gap: 0.65rem;
  }

  .admin-topbar {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .admin-heading-title {
    font-size: 0.8rem;
  }

  .admin-heading-sub {
    display: none;
  }

  .badge-live-dot {
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
  }

  .admin-metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .metric-card {
    padding: 0.45rem 0.6rem;
  }

  .metric-value {
    font-size: 0.9rem;
  }

  .metric-card:last-child {
    grid-column: span 2;
  }

  .admin-table-container {
    display: none; /* Keep admin card focused and clean on mobile */
  }

  /* Side-by-side or stacked phones in mobile */
  .mockup-phone-grocery {
    position: relative;
    width: 100%;
    max-width: 285px;
    margin: 0 auto;
    bottom: auto;
    left: auto;
    animation: none;
    box-shadow: var(--shadow-md); /* smaller shadow so it is not cropped by the composition */
  }

  .mockup-phone-multiservice {
    position: relative;
    width: 100%;
    max-width: 285px;
    margin: 0 auto;
    bottom: auto;
    right: auto;
    animation: none;
    box-shadow: var(--shadow-md);
  }

  /* Solutions Section */
  .skeleton-preview-section {
    padding: 4rem 0;
  }

  .skeleton-title {
    font-size: clamp(1.75rem, 7vw, 2rem);
  }

  .skeleton-desc {
    font-size: 1rem;
    margin-bottom: 2.25rem;
  }

  .skeleton-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skeleton-card {
    padding: 1.5rem;
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand-col {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ==========================================================================
   Small Mobile Devices (390px - iPhone 12/13/14)
   ========================================================================== */
@media (max-width: 390px) {
  :root {
    --container-gutter: 1rem;
  }

  .hero-title {
    font-size: 1.95rem;
  }

  .hero-lead {
    font-size: 0.925rem;
  }

  .btn-lg {
    padding: 0.85rem 1.4rem;
    font-size: 0.95rem;
  }

  .mockup-phone-grocery,
  .mockup-phone-multiservice {
    max-width: 100%;
    border-radius: 28px;
    padding: 6px;
  }

  .phone-screen {
    border-radius: 22px;
  }

  .grocery-categories-row {
    gap: 0.2rem;
  }

  .cat-circle {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  .cat-name {
    font-size: 0.525rem;
  }
}















/* =========================================
   NAANPLAN MOBILE MENU
========================================= */

.hamburger-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
  position: relative;
  z-index: 10001;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 2px;
  transition: all .25s ease;
}


/* Hamburger animation */

.hamburger-btn.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* Mobile drawer */

.mobile-nav-drawer {
  display: none;
}


/* Mobile */

@media (max-width: 1024px) {

  .hamburger-btn {
    display: block;
  }

  .nav-menu,
  .nav-actions {
    display: none !important;
  }

  .mobile-nav-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;

    background: #ffffff;

    padding: 90px 22px 30px;

    overflow-y: auto;

    transform: translateX(100%);
    visibility: hidden;
    opacity: 0;

    transition:
      transform .3s ease,
      opacity .25s ease,
      visibility .3s ease;

    z-index: 10000;
  }

  .mobile-nav-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
  }

  .mobile-menu-list {
    width: 100%;
  }

  .mobile-nav-item {
    border-bottom: 1px solid #e5e7eb;
  }

  .mobile-nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 17px 4px;

    background: transparent;
    border: 0;

    color: #101828;

    font-size: 16px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;
    text-align: left;
  }

  .mobile-dropdown-trigger svg {
    transition: transform .25s ease;
  }

  .mobile-dropdown-trigger.is-expanded svg {
    transform: rotate(180deg);
  }

  .mobile-sub-menu {
    display: none;
    padding: 0 0 10px 15px;
  }

  .mobile-sub-menu.is-expanded {
    display: block;
  }

  .mobile-sub-link {
    display: block;

    padding: 12px 5px;

    color: #667085;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;
  }

  .mobile-sub-link:hover {
    color: #0b7a43;
  }

  .mobile-drawer-cta {
    padding-top: 25px;
  }

}


/* Smaller phones */

@media (max-width: 600px) {

  .mobile-nav-drawer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hamburger-btn {
    width: 42px;
    height: 42px;
  }

}