/* =====================================================================
   RESPONSIVE RULES — loaded last on every page
   Breakpoints:  1100px (tablet / mobile nav)  ·  900px (stack)  ·  600px (phone)
   ===================================================================== */

/* ---------- ≤ 1240px ---------- */
@media (max-width: 1240px) {
    .site-nav__link { padding-inline: 10px; }
    .site-nav__link::after { left: 10px; right: 10px; }
    .mega__inner { grid-template-columns: 1fr; }
    .mega__feature { display: none; }
}

/* ---------- ≤ 1100px : mobile navigation ---------- */
@media (max-width: 1100px) {
    :root { --header-h: 72px; }
    .site-logo img { width: 160px; }

    .nav-toggle { display: inline-flex; position: relative; z-index: 3; }
    .site-header__actions { position: relative; z-index: 3; }

    .site-nav {
        position: fixed;
        top: 0; right: 0;
        z-index: 2;
        width: min(440px, 100%);
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: calc(var(--header-h) + 16px) 24px 32px;
        overflow-y: auto;
        background: var(--white);
        box-shadow: -20px 0 40px -20px rgba(20, 26, 34, 0.35);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.4s var(--ease), visibility 0s linear 0.4s;
    }
    .site-nav.is-open { transform: none; visibility: visible; transition: transform 0.4s var(--ease), visibility 0s; }
    body.nav-open { overflow: hidden; }
    body.nav-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 90;
        background: rgba(20, 26, 34, 0.45);
    }

    .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav__item { border-bottom: 1px solid var(--line); }
    .site-nav__link { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 1.08rem; }
    .site-nav__link::after { display: none; }
    .site-nav__link.is-active { color: var(--orange-ink); }

    .mega {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: 0;
        box-shadow: none;
        transition: none;
    }
    .has-mega.is-open .mega { display: block; }
    .mega__inner { padding: 0 0 16px; }
    .mega .container { padding: 0; }
    .mega__columns { grid-template-columns: 1fr; gap: 18px; }
    .mega__heading { margin-bottom: 6px; padding-bottom: 6px; }

    .site-nav__mobile-footer { display: grid; gap: 10px; margin-top: 28px; }
    .site-header__call span { display: none; }
    .site-header__call { min-height: 46px; width: 46px; padding: 0; }

    .topbar__note { display: none; }
    .topbar__inner { justify-content: center; }

    /* Components */
    .related__grid { grid-template-columns: repeat(2, 1fr); }
    .process { grid-template-columns: repeat(2, 1fr); }
    .task-groups, .task-groups--four { grid-template-columns: repeat(2, 1fr); }
    .brand-strip { grid-template-columns: repeat(2, 1fr); }
    .brand-strip__item:nth-child(3) { border-left: 0; }
    .brand-strip__item:nth-child(n + 3) { border-top: 1px solid var(--line); }

    /* Home */
    .season-grid { grid-template-columns: repeat(2, 1fr); }
    .support-strip { grid-template-columns: repeat(3, 1fr); }
    .support-strip li:nth-child(4) { border-left: 0; }
    .support-strip li:nth-child(n + 4) { border-top: 1px solid var(--line-dark); }
    .site-footer__links { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- ≤ 900px : stack layouts ---------- */
@media (max-width: 900px) {
    .split,
    .split--wide-left,
    .split--wide-right,
    .page-hero__inner,
    .faq__layout,
    .home-remodel__grid,
    .home-handyman__grid,
    .home-commercial__grid,
    .home-lighting__inner,
    .home-yard__head { grid-template-columns: 1fr; }

    .page-hero--split { background: var(--paper); }
    .page-hero__figure::before { inset: 14px -10px -14px 14px; }
    .page-hero__figure { margin-right: 10px; }
    .faq__head { position: static; }
    .cta-band__inner { flex-direction: column; align-items: flex-start; }

    .home-remodel__badge { right: 12px; bottom: 12px; }
    .home-cleaning .media-stack { margin-right: 18px; }
    .light-compare { grid-row: auto; }
    .home-lighting__inner > .btn { grid-column: auto; }
    .home-gallery__head { flex-direction: column; align-items: flex-start; }
    .gallery-slider { --slide-w: 72%; }


    .site-footer__top { grid-template-columns: 1fr; }
    .site-footer__contact { justify-self: start; }
}

/* ---------- ≤ 600px : phones ---------- */
@media (max-width: 600px) {
    :root { --fs-body: 1rem; }
    .topbar { display: none; }
    .site-logo img, .site-header.is-scrolled .site-logo img { width: 140px; }

    .btn-row .btn { flex: 1 1 100%; }
    .check-list--two { grid-template-columns: 1fr; }
    .related__grid,
    .process,
    .process--three,
    .task-groups,
    .task-groups--two,
    .task-groups--four,
    .brand-strip { grid-template-columns: 1fr; }
    .brand-strip__item { border-left: 0 !important; }
    .brand-strip__item + .brand-strip__item { border-top: 1px solid var(--line); }
    .accordion__inner p { padding-right: 0; }
    .media-stack__inset { right: -12px; bottom: -20px; }

    .remodel-list a { grid-template-columns: 36px 1fr 20px; }
    .remodel-list__desc { display: none; }
    .task-board { grid-template-columns: 1fr 1fr; }
    .task-board li { min-height: 110px; padding: 18px; font-size: 0.95rem; }
    .clean-columns { grid-template-columns: 1fr; }
    .season-grid { grid-template-columns: 1fr; }
    .pest-grid { grid-template-columns: 1fr; }
    .light-compare { grid-template-columns: 1fr; }
    .audience { grid-template-columns: 1fr; }
    .support-strip { grid-template-columns: 1fr; }
    .support-strip li { flex-direction: row; align-items: center; border-left: 0 !important; border-top: 1px solid var(--line-dark); }
    .support-strip li:first-child { border-top: 0; }
    .gallery-slider { --slide-w: 86%; }
    .slider__more { margin-left: 0; width: 100%; }
    .slider__controls { flex-wrap: wrap; }
    .home-pest__brands .brand-logo { height: 76px; }

    .site-footer__links { grid-template-columns: 1fr; }
    .site-footer__phone { font-size: 1.45rem; }

    /* Sticky call bar on phones */
    .mobile-callbar {
        position: fixed;
        left: 12px; right: 12px; bottom: 12px;
        z-index: 80;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 52px;
        background: var(--orange);
        color: var(--ink);
        border-radius: var(--radius-sm);
        box-shadow: 0 10px 24px -8px rgba(20, 26, 34, 0.45);
        font-family: var(--font-head);
        font-weight: var(--fw-semibold);
        text-decoration: none;
    }
    .mobile-callbar:hover { color: var(--ink); }
    .site-footer { padding-bottom: 76px; }
}
