/* ============================================================
   PRIME CLEAN SOLUTIONS — Responsive Layer (mobile-first up)
   Breakpoints: 1180 / 1024 / 860 / 640 / 420
   ============================================================ */

@media (max-width: 1180px) {
  :root { --wrap: 1080px; }

  .photo-strip { gap: var(--s-2); }

  .float-card--tl { left: -12px; }
  .float-card--br { right: -8px; }
  .float-card--bl { left: -16px; }

  .gallery { grid-template-columns: repeat(3, 1fr); }
  .quote-card { flex: 0 0 calc((100% - var(--s-3)) / 2); }
  .photo-slide { flex: 0 0 calc((100% - var(--s-3)) / 2); }
}

@media (max-width: 1024px) {
  :root { --header-h: 92px; }

  .nav,
  .header-phone { display: none; }

  .nav-toggle { display: block; }

  .section { padding-block: var(--s-10); }

  .hero-inner,
  .page-hero.has-visual .page-hero-inner,
  .split,
  .split--wide-left,
  .split--wide-right,
  .cta-split,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  .hero { padding-top: calc(var(--header-h) + var(--s-8)); }
  .hero-visual { max-width: 520px; margin-inline: auto; width: 100%; }
  .hero-frame { aspect-ratio: 4 / 3; }

  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat { border-top: 1px solid rgba(234, 244, 246, .12); }
  .stat:nth-child(1),
  .stat:nth-child(2) { border-top: 0; }

  .featured-post { grid-template-columns: 1fr; }
  .featured-post .fp-media { min-height: 280px; }
  .featured-post .fp-body { padding: var(--s-4); }

  .service-card--feature { grid-column: span 1; }

  .step:not(:last-child)::after { display: none; }

  .media-stack .ms-inset { right: -8px; bottom: -24px; }
  .media-stack .ms-badge { left: -8px; top: -16px; }

  .form-card { padding: var(--s-4); }
  .appt-help { grid-template-columns: 1fr; }

  .ghl-card-head { padding: var(--s-3) var(--s-3) var(--s-2); }
  .ghl-frame { min-height: 700px; padding: 8px; }
  .ghl-frame iframe { min-height: 690px; }
  .ghl-card-foot { padding: var(--s-2) var(--s-3) var(--s-3); }
}

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--wide { grid-column: span 2; }
  .gallery-item--tall { grid-row: span 1; aspect-ratio: 1 / 1; }

  .trust-track { justify-content: flex-start; gap: var(--s-2) var(--s-4); }

  .row-card { grid-template-columns: 140px 1fr; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
}

@media (max-width: 640px) {
  :root {
    --header-h: 84px;
    --s-12: 64px;
    --s-16: 80px;
  }

  .section { padding-block: var(--s-8); }
  .cta-band { padding-block: var(--s-8); }

  .container { padding-inline: var(--s-2); }

  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid { grid-template-columns: 1fr; }

  .brand img { width: 58px; height: 58px; }
  .brand-name { font-size: 1.1875rem; }
  .brand-sub { font-size: .625rem; letter-spacing: .18em; }
  .footer-brand img { width: 72px; height: 72px; }
  .footer-brand .brand-name { font-size: 1.375rem; }

  .hero { padding-bottom: var(--s-10); }
  .hero-frame { aspect-ratio: 3 / 2; }

  .float-card { position: static; margin-top: var(--s-2); width: 100%; }
  .float-card--tl,
  .float-card--bl,
  .float-card--br { inset: auto; }

  .hero-float-stack { display: grid; gap: var(--s-2); margin-top: var(--s-3); }

  .btn { width: 100%; }
  .btn-group { flex-direction: column; align-items: stretch; }
  .btn-group .btn { width: 100%; }

  /* the header CTA must stay inline next to the hamburger */
  .header-actions .btn { width: auto; padding: 10px 16px; font-size: .875rem; }
  .header-inner { gap: var(--s-1); padding-inline: var(--s-2); }

  .quote-card { flex: 0 0 88%; }
  .photo-slide { flex: 0 0 86%; }

  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery-item--wide { grid-column: span 2; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: var(--s-2); }
  .stat { padding: var(--s-2) var(--s-1); }
  .stat + .stat { border-left: 0; }

  .steps { grid-template-columns: 1fr; }

  .faq-q { font-size: 1.0625rem; padding: var(--s-2); }
  .faq-a > * { padding-inline: var(--s-2); }

  .row-card { grid-template-columns: 1fr; }
  .row-card img { aspect-ratio: 16 / 9; }

  .author-box { flex-direction: column; text-align: center; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }

  .media-stack .ms-inset { position: static; width: 100%; margin-top: var(--s-2); border: 0; aspect-ratio: 16 / 9; }
  .media-stack .ms-badge { position: static; display: inline-block; margin-bottom: var(--s-2); }

  .slider-nav { justify-content: center; }
}

/* ---- Phones: the header must never be wider than the screen ---- */
@media (max-width: 560px) {
  :root { --header-h: 76px; }

  .header-inner { gap: 8px; padding-inline: 16px; }

  .brand { gap: 10px; }
  .brand img { width: 50px; height: 50px; border-radius: var(--r-sm); }
  .brand-name { font-size: 1.0625rem; letter-spacing: .04em; }
  .brand-sub { font-size: .5625rem; letter-spacing: .12em; }

  /* the text CTA is replaced by a compact tap-to-call button */
  .header-cta { display: none; }

  .header-call {
    display: inline-flex;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    flex: none;
  }

  .header-call svg { width: 20px; height: 20px; }
  .nav-toggle { width: 46px; height: 46px; }
  .nav-toggle span { left: 12px; }
  .nav-toggle span:nth-child(1) { top: 15px; }
  .nav-toggle span:nth-child(2) { top: 22px; }
  .nav-toggle span:nth-child(3) { top: 29px; }

  .hero-rating { flex-wrap: wrap; gap: var(--s-1); }
  .hero { padding-top: calc(var(--header-h) + var(--s-6)); }

  /* keep clear of the chat bubble on small screens too */
  .back-to-top { width: 46px; height: 46px; bottom: 16px; right: 16px; }
}

@media (max-width: 420px) {
  .container { padding-inline: 20px; }
  .card { padding: var(--s-3); }
  .gallery { grid-template-columns: 1fr; }
  .gallery-item--wide { grid-column: span 1; }
  .pill { font-size: .75rem; padding: 6px 12px; }
}

/* ---- Print ---- */
@media print {
  .site-header,
  .mobile-panel,
  .scrim,
  .back-to-top,
  .cta-band,
  .slider-nav { display: none !important; }

  body { background: #fff; color: #000; }
  .section { padding-block: 16px; }
  a { text-decoration: underline; }
}
