/* ==========================================================================
   Plumbix — Responsive layer
   Breakpoints: 1440 (large) · 1200 (laptop) · 1024 (tablet L) · 860 (tablet)
                640 (mobile L) · 420 (mobile S) · 1800 (ultra-wide)
   ========================================================================== */

/* ---- Ultra-wide ---- */
@media (min-width: 1800px) {
  :root { --shell: 1360px; --shell-wide: 1720px; }
  .hero { padding-block: 10rem 9rem; }
}

/* ---- Laptop ---- */
@media (max-width: 1200px) {
  .footer-top { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); row-gap: var(--sp-7); }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dropdown { min-width: 520px; }
}

/* ---- Tablet landscape ---- */
@media (max-width: 1024px) {
  :root { --header-h: 68px; }

  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--sp-5) var(--gutter) var(--sp-7);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-lg);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility var(--t-med);
  }
  .nav-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  .nav-link { padding: 0.85rem 0; font-size: 1.02rem; border-bottom: 1px solid var(--line); border-radius: 0; justify-content: space-between; }
  .nav-link:hover { background: transparent; }
  .nav-item { width: 100%; }
  .dropdown {
    position: static; transform: none; min-width: 0; width: 100%;
    grid-template-columns: 1fr; padding: 0 0 var(--sp-3) 0;
    border: 0; box-shadow: none; background: transparent;
    display: none; opacity: 1; visibility: visible;
  }
  .nav-item.is-open .dropdown { display: grid; }
  .nav-item:hover .dropdown { display: none; }
  .nav-item.is-open:hover .dropdown { display: grid; }
  .dropdown a { padding-left: var(--sp-4); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-actions .btn { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero .lead { max-width: 60ch; }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .layout-doc { grid-template-columns: 1fr; }
  .toc { position: static; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-left: 0; border-top: 1px solid var(--line); padding-inline: 0; }
  .stat:nth-child(-n+2) { border-top: 0; }
  .invert .stat, .section-dark .stat { border-color: var(--line-invert); }
  .step { grid-template-columns: 60px minmax(0, 1fr); }
  .step > *:last-child { grid-column: 2; }
  .row-item { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--sp-3); }
  .row-item .meta { grid-column: 1; }
}

/* ---- Tablet portrait ---- */
@media (max-width: 860px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .cta-band { text-align: left; }
  .quote blockquote { font-size: 1.15rem; }
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .partner-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: 1fr; }
  .stat { border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .btn-group .btn { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cookie-bar { left: var(--sp-3); right: var(--sp-3); bottom: var(--sp-3); }
  .slider-nav { flex-direction: column-reverse; align-items: stretch; gap: var(--sp-4); }
  .slider-dots { justify-content: center; }
  .slider-arrows { justify-content: center; }
  .row-item { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .footer-top { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; }
  .step > *:last-child { grid-column: 1; }
  .panel { padding: var(--sp-4); }
}

/* ---- Print ---- */
@media print {
  .site-header, .site-footer, .cookie-bar, .btn, .slider-nav, .nav-toggle { display: none !important; }
  body { color: #000; background: #fff; }
  .hero, .page-head, .section-dark, .cta-band { background: #fff !important; color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
