/* ==========================================================================
   VANTIX — responsive.css
   Mobile-first base lives in style.css / components.css.
   This file layers on progressive enhancement for wider viewports.
   Breakpoints: 560 (large phone), 768 (tablet), 1024 (laptop), 1280 (desktop)
   ========================================================================== */

/* --- ~560px: large phone / small tablet --------------------------------- */
@media (min-width: 560px) {
  .card-grid--2up {
    grid-template-columns: repeat(2, 1fr);
  }

  .gadget-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- 768px: tablet --------------------------------------------------------- */
@media (min-width: 768px) {
  :root {
    --container-pad: var(--space-6);
    --header-height: 72px;
  }

  .hero-headline {
    font-size: 3.25rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid--3up {
    grid-template-columns: repeat(3, 1fr);
  }

  .gadget-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .auth-card {
    padding: var(--space-8) var(--space-7);
  }
}

/* --- 1024px: laptop — primary nav replaces the hamburger -------------------- */
@media (min-width: 1024px) {
  .main-nav {
    display: block;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-nav {
    display: none;
  }

  .login-link {
    display: inline-flex;
    align-items: center;
  }

  .hero-grid {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }

  .hero-headline {
    font-size: var(--fs-900);
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid--4up {
    grid-template-columns: repeat(4, 1fr);
  }

  .gadget-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .ai-promo {
    padding-inline: var(--space-9);
  }
}

/* --- 1280px: desktop --------------------------------------------------------- */
@media (min-width: 1280px) {
  :root {
    --container-pad: var(--space-7);
  }

  .section {
    padding-block: var(--space-9);
  }
}

/* --- No horizontal scroll guard ------------------------------------------------ */
/* `overflow-x: hidden` on html/body turns them into scroll containers, which silently breaks
   `position: sticky` on the header. `clip` prevents horizontal scroll without doing that. */
html, body {
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}


/* Article reading experience: narrow screens first, then wider layouts. */
.article-header--editorial, .article-body--editorial { min-width: 0; }
.article-header--editorial .article-title { max-width: 100%; }
.article-body--editorial :is(img, video, iframe) { max-width: 100%; }
.article-body--editorial .table-wrap { max-width: 100%; }
@media (max-width: 640px) {
  .article-header--editorial { padding-inline: 0; }
  .article-header--editorial .article-title {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
    line-height: 1.12;
  }
  .article-header--editorial .article-byline { align-items: flex-start; }
  .article-body--editorial { font-size: 1.05rem; line-height: 1.72; }
  .article-glossary-grid { gap: .65rem; }
  .article-glossary-card { padding: .9rem; }
}
