/* ==========================================================================
   responsive.css — 1440 / 1024 / 768 / 480 / 360
   Loaded last so its overrides win.
   ========================================================================== */

/* ---------- ≤1200px : tighten the service grid ---------- */
@media (max-width: 1200px) {
  .dropdown { min-width: 480px; }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- ≤1024px : tablet ---------- */
@media (max-width: 1024px) {
  :root { --header-h: 70px; --header-h-shrunk: 58px; }

  .svc-grid { grid-template-columns: repeat(4, 1fr); }
  .svc, .svc--feature { grid-column: span 2; }

  .split { grid-template-columns: 1fr; gap: var(--s-6); }
  .split__sticky { position: static; }

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

  .steps { grid-template-columns: repeat(2, 1fr); gap: var(--s-6); }
  .steps__rail { display: none; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
  .footer__brand { grid-column: 1 / -1; }

  .hero__art { width: 62vw; right: -14%; opacity: .5; }
  .hero__content { max-width: 100%; }
}

/* ---------- ≤860px : nav collapses ---------- */
@media (max-width: 860px) {
  .nav, .header__actions .btn { display: none; }
  .burger { display: grid; }

  .topbar__group--left .topbar__item--addr { display: none; }
}

/* ---------- ≤768px : mobile ---------- */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    /* Clear the sticky action bar so it never covers the footer */
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .stickybar { display: flex; }

  .topbar { font-size: .78rem; }
  .topbar__inner { justify-content: center; }
  .topbar__group--right { display: none; }
  .topbar__item--addr { display: none; }

  .hero { min-height: auto; padding-block: 56px 72px; }
  .hero__art { display: none; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .scroll-cue { display: none; }

  .svc-grid { grid-template-columns: 1fr; }
  .svc, .svc--feature { grid-column: span 1; }

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

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

  .reviews__head { flex-direction: column; align-items: flex-start; }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; gap: var(--s-3); }

  .ctaband__actions { flex-direction: column; }
  .ctaband__actions .btn { width: 100%; }

  /* Chips scroll horizontally instead of wrapping into a tall block */
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }

  .modal { padding: var(--s-4); align-items: flex-end; }
  .modal__panel { width: 100%; }
}

/* ---------- ≤480px ---------- */
@media (max-width: 480px) {
  :root { --gutter: 18px; }

  h1 { font-size: clamp(2.1rem, 10vw, 2.8rem); }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .gscore { width: 100%; }
  .stickybar__btn { font-size: .9rem; }
  .drawer__link { font-size: 1.2rem; }
}

/* ---------- ≤360px : smallest supported ---------- */
@media (max-width: 360px) {
  .stat__num { font-size: 1.3rem; }
  .stickybar__btn { gap: 7px; font-size: .84rem; }
  .btn { padding: 13px 18px; font-size: .9rem; }
}

/* ---------- Short viewports ----------
   Laptops at 1366x768 and below leave roughly 600-660px of usable height once
   browser chrome is taken out. The hero is tuned by viewport HEIGHT here, so
   the primary call-to-action stays above the fold on those screens. */
@media (min-width: 861px) and (max-height: 860px) {
  .hero { padding-block: clamp(20px, 2.5vw, 36px); }
  .hero h1 { font-size: clamp(1.95rem, 3.7vw, 3rem); margin-bottom: var(--s-3); }
  .hero__sub { font-size: 1.02rem; margin-bottom: var(--s-4); }
  .hero__cta { margin-bottom: var(--s-4); }
  .hero .eyebrow { margin-bottom: var(--s-3); }
  .stat { padding: 12px 10px; }
  .stat__num { font-size: clamp(1.2rem, 1.7vw, 1.5rem); }
  .stat__label { margin-top: 5px; }
}

@media (min-width: 861px) and (max-height: 780px) {
  /* Not enough room below the stat strip — the cue would sit on top of it,
     and the fold is close enough that the page reads as scrollable anyway. */
  .scroll-cue { display: none; }
}

@media (min-width: 861px) and (max-height: 700px) {
  .hero { padding-block: 16px; min-height: 0; }
  .hero h1 { font-size: clamp(1.75rem, 3.1vw, 2.5rem); }
  .hero__sub { font-size: .97rem; margin-bottom: var(--s-3); }
  .hero__cta { margin-bottom: var(--s-3); }
}

/* ---------- Hover-capable pointers only ---------- */
@media (hover: none) {
  .tilt { transform: none !important; }
  .card:hover { box-shadow: var(--sh-2); }
  .map-embed { filter: none; }
}

/* ---------- Wide desktop ---------- */
@media (min-width: 1600px) {
  :root { --container: 1360px; }
  .hero__art { width: min(48vw, 820px); right: 0; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .header, .stickybar, .modal, .scroll-cue, .marquee, .drawer { display: none !important; }
  body { background: #fff; color: #000; padding-bottom: 0; }
  .card, .frame { border-color: #ccc; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
