/* ============================================================
   responsive.css — ALL @media queries (split out of style.css)
   + the mobile-nav media block. Load AFTER style.css.
   ============================================================ */

@media (max-width: 980px) {
    .header {
        position: sticky;
        top: 0;
        background: var(--white);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transform: none !important;
    }

    .header.is-scrolled {
        background: var(--white);
    }
}

@media (max-width: 900px) {
    .blog-single__row {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .blog-aside {
        position: static;
        grid-template-columns: 1fr 1fr;
        display: grid;
    }
}

@media (max-width: 980px) {
    .phero__inner {
        grid-template-columns: 1fr;
        padding: 48px 0 72px;
        gap: 32px;
    }

    .phero__media {
        order: -1;
        max-width: 460px;
    }
}

@media (min-width: 720px) {
    .products-grid .product-card__media {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 980px) {
    .split-feature__spacer {
        display: none;
    }

    /* stack: machine image on top (in flow), text below on dark section bg */
    .split-feature__media {
        position: relative;
        inset: auto;
        height: auto;
    }

    .split-feature__media img {
        width: 100% !important;
        height: auto;
        transform: none !important;
    }

    /* no veil needed — text no longer overlaps the image */
    .split-feature__media::after {
        display: none;
    }

    .split-feature__inner {
        padding-top: 28px;
    }
}

@media (max-width: 760px) {
    .faq {
        columns: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none;
    }

    .hero__card,
    .hero__float,
    .hero h1 .grad,
    .hero::before,
    .marquee__track {
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

@media (min-width: 981px) and (max-width: 1180px) {

    .header__inner {
        gap: 14px;
    }

    .nav {
        gap: 14px;
    }

    .nav__list {
        gap: 14px;
    }

    .nav__link {
        font-size: .85rem;
    }

    .brand__logo {
        height: 40px;
    }

    /* a touch more side room for the content row */
    .container {
        padding-inline: 28px;
    }
}

@media (max-width: 980px) {

    .hero__inner,
    .split,
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .step:nth-child(2n)::after {
        display: none;
    }

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

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

@media (max-width: 980px) {
    .topbar {
        display: none;
    }

    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 80;
    }

    /* side-slide drawer (off-canvas from the right) */
    .nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 100vw;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--white);
        padding: 88px 24px 28px;
        transform: translateX(105%);
        transition: transform .4s var(--ease);
        box-shadow: -24px 0 70px -24px rgba(0, 0, 0, .45);
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 70;
    }

    .nav.is-open {
        transform: translateX(0);
    }

    /* dim backdrop behind the drawer */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(10, 10, 11, .5);
        opacity: 0;
        visibility: hidden;
        transition: opacity .4s var(--ease), visibility .4s;
        z-index: 65;
    }

    .nav-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }

    body.nav-open {
        overflow: hidden;
    }

    .nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav__link {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
    }

    .nav__cta {
        margin-top: 14px;
        justify-content: center;
    }

    /* Products opens as a SECOND slide-in panel over the drawer */
    .nav__caret {
        display: inline-block;
        margin-left: auto;
        transition: transform .3s var(--ease);
    }

    .has-mega>.nav__link {
        display: flex;
        align-items: center;
    }

    .mega {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 100vw;
        height: 100dvh;
        background: var(--white);
        padding: 18px 20px 28px;
        transform: translateX(105%);
        transition: transform .4s var(--ease);
        box-shadow: -24px 0 70px -24px rgba(0, 0, 0, .45);
        opacity: 1;
        visibility: visible;
        max-height: none;
        border: 0;
        border-radius: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 78;
        display: block;
    }

    .mega::before {
        display: none;
    }

    .has-mega.is-open .mega {
        transform: translateX(0);
    }

    /* back header (mobile only) */
    .mega__back {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        background: none;
        border: 0;
        cursor: pointer;
        padding: 6px 0 14px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--line);
        font: 700 1rem var(--head);
        color: var(--ink);
    }

    /* LEVEL 2 — category list (vertical rows with chevron) */
    .mega.mega--tabs {
        display: block;
        column-gap: 0;
        grid-template-columns: none;
    }

    .mega .mega__tabs {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        margin: 0;
        border-right: 0;
        border-bottom: 0;
        overflow: visible;
    }

    .mega .mega__tab {
        width: 100%;
        justify-content: flex-start;
        font-size: .95rem;
        padding: 15px 12px;
        border-radius: 0;
        background: transparent;
        border-bottom: 1px solid var(--line);
    }

    .mega .mega__tab.is-active {
        background: transparent;
        color: var(--ink);
    }

    .mega .mega__tab .icon {
        color: var(--blue-600);
    }

    .mega__tab-arrow {
        display: inline-block;
        margin-left: auto;
        font-size: 1.4em;
        line-height: 1;
        color: var(--muted);
    }

    /* LEVEL 3 — each category's products slide in over the categories */
    .mega .mega__panels {
        display: block;
        min-width: 0;
    }

    .mega .mega__panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 100vw;
        height: 100dvh;
        background: var(--white);
        padding: 18px 20px 28px;
        transform: translateX(105%);
        transition: transform .35s var(--ease);
        box-shadow: -24px 0 70px -24px rgba(0, 0, 0, .45);
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 80;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        align-content: start;
    }

    .mega .mega__panel.is-active {
        transform: translateX(0);
    }

    .mega__panel-back {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        background: none;
        border: 0;
        cursor: pointer;
        padding: 6px 0 14px;
        margin-bottom: 6px;
        border-bottom: 1px solid var(--line);
        font: 700 1rem var(--head);
        color: var(--ink);
        text-align: left;
    }

    .mega .mega__item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 9px;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
    }

    .mega .mega__thumb {
        width: 52px;
        height: 52px;
        aspect-ratio: auto;
        flex: none;
    }

    .mega .mega__text strong {
        margin-top: 0;
        text-align: left;
        font-size: .88rem;
    }

    .mega .mega__foot {
        display: none;
    }

    .section {
        padding: 60px 0;
    }

    /* tablet: 3-up grids drop to 2 cols; full single-column collapse is phone-only (≤768) */
    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* hero: tighter stack, no cramped overlaps */
    .hero__inner {
        padding: 56px 0 64px;
        gap: 36px;
    }

    .hero__lead {
        font-size: 1.02rem;
        margin: 16px 0 26px;
    }

    .hero__float {
        position: static;
        margin-bottom: 16px;
        width: max-content;
    }

    .hero__actions {
        gap: 12px;
    }

    .hero__actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .hero__stats {
        gap: 22px 30px;
        margin-top: 32px;
    }

    /* steps connector lines off once stacked-ish */
    .steps {
        gap: 18px;
    }

    .cta-band__inner {
        padding: 44px 0;
    }

    .cta-band__actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (max-width: 768px) {

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

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

    /* footer: Quick Links + Product Range stay side-by-side (50/50);
       brand block and Get-in-Touch span the full width */
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
    }

    .footer__col--brand,
    .footer__col:nth-child(4) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {

    .field input,
    .field textarea,
    .field select {
        font-size: 16px;
    }
}

@media (max-width: 520px) {

    .grid--4,
    .stats,
    .gallery-grid,
    .steps {
        grid-template-columns: 1fr;
    }

    .step::after {
        display: none;
    }

    .cta-band__inner,
    .footer__bar-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer__bar-inner {
        padding-bottom: 70px;
    }

    .cta-band__actions {
        width: 100%;
    }

    .hero__inner {
        padding: 44px 0 52px;
    }

    .hero__stats {
        gap: 18px 26px;
    }

    .hero__stat strong {
        font-size: 1.45rem;
    }

    .card,
    .step,
    .ind-card,
    .quote-card {
        padding: 22px;
    }

    .section-head {
        margin-bottom: 36px;
    }
}

@media (max-width: 400px) {
    .container {
        padding-inline: 16px;
    }

    .hero h1 {
        font-size: 1.95rem;
    }

    .hero__stats {
        gap: 14px 20px;
    }

    .hero__stat {
        flex: 1 1 40%;
    }

    .btn {
        padding: 13px 20px;
    }

    .marquee__track {
        gap: 36px;
    }

    .marquee__item {
        font-size: .95rem;
    }
}

@media (max-width: 520px) {
    .quote-modal {
        /* centered card on mobile (not a bottom sheet) */
        padding: 16px;
        align-items: center;
    }

    .quote-modal__dialog {
        max-width: 100%;
        max-height: 90vh;
        max-height: 90dvh;
        border-radius: var(--radius);
        /* keep the notch/home-indicator clear of the submit button */
        padding: 26px 18px calc(20px + env(safe-area-inset-bottom));
    }

    .quote-modal__title {
        font-size: 1.4rem;
    }

    /* drop the descriptive subline on mobile — keeps the popup short */
    .quote-modal__sub {
        display: none;
    }
}

@media (max-width: 560px) {
    .blog-author-card {
        flex-direction: column;
        gap: 16px;
        padding: 22px;
    }

    .blog-author-card__imgwrap {
        width: 78px;
        height: 78px;
    }
}

@media (max-width: 768px) {
    .pv-section {
        padding: 48px 0;
    }

    .pv-grid {
        gap: 18px;
    }

    .pv-play {
        width: 56px;
        height: 56px;
    }

    .pv-play::before {
        border-left-width: 16px;
        border-top-width: 10px;
        border-bottom-width: 10px;
    }

    .pv-caption {
        font-size: 13px;
        padding: 13px 16px;
    }

    .pv-lightbox-inner {
        width: 94vw;
    }

    .pv-lightbox-close {
        top: -42px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .site-loader__liquid,
    .site-loader__wave,
    .site-loader__bubbles circle,
    .site-loader__bar span,
    .site-loader__stage {
        animation: none;
    }

    .site-loader__liquid {
        transform: translateY(40px);
    }
}

/* ---------- mobile menu (.mnav*) ---------- */
@media (max-width: 980px) {

    /* --- silence the desktop nav entirely on mobile --- */
    .header .nav,
    .header .nav-toggle,
    .nav-overlay { display: none !important; }

    /* --- hamburger --- */
    .mnav-open {
        display: flex; flex-direction: column; justify-content: center; gap: 5px;
        width: 44px; height: 44px; padding: 9px; border: 0; background: none; cursor: pointer;
        position: fixed; top: 15px; right: 14px; z-index: 60;
    }
    .mnav-open span { display: block; height: 2.5px; width: 26px; border-radius: 2px; background: var(--ink); transition: .3s; }
    .mnav-open.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    .mnav-open.is-open span:nth-child(2) { opacity: 0; }
    .mnav-open.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

    /* --- backdrop --- */
    .mnav-overlay {
        display: block; position: fixed; inset: 0; background: rgba(10,10,11,.5);
        opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s; z-index: 90;
    }
    .mnav-overlay.is-open { opacity: 1; visibility: visible; }
    body.mnav-lock { overflow: hidden; }

    /* --- drawer (full width) --- */
    .mnav {
        display: flex; flex-direction: column;
        position: fixed; top: 0; right: 0; bottom: 0; left: 0;
        width: 100vw; height: 100dvh; background: var(--white);
        transform: translateX(100%); transition: transform .38s var(--ease);
        z-index: 95;
    }
    .mnav.is-open { transform: translateX(0); }

    .mnav__bar {
        display: flex; align-items: center; justify-content: space-between;
        height: 64px; padding: 0 18px; border-bottom: 1px solid var(--line); flex: none;
    }
    .mnav__logo { height: 40px; width: auto; }
    .mnav__close { background: none; border: 0; font-size: 2rem; line-height: 1; color: var(--ink); cursor: pointer; padding: 0 6px; }

    /* viewport holds the stacked levels */
    .mnav__viewport { position: relative; flex: 1; overflow: hidden; }
    .mnav__level {
        position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
        padding: 10px 18px 28px; display: flex; flex-direction: column;
        transform: translateX(100%); transition: transform .32s var(--ease);
        background: var(--white);
    }
    .mnav__level.is-active { transform: translateX(0); }
    /* level 1 sits in place (no slide-in from right on first open) */
    .mnav__level[data-key="main"] { transform: translateX(0); }
    .mnav__level[data-key="main"]:not(.is-active) { transform: translateX(-30%); opacity: 0; pointer-events: none; }

    /* rows */
    .mnav__row {
        display: flex; align-items: center; gap: 12px; width: 100%;
        padding: 16px 4px; border: 0; border-bottom: 1px solid var(--line);
        background: none; cursor: pointer; text-align: left;
        font: 600 1.05rem var(--head); color: var(--ink);
    }
    .mnav__row .mnav__chev { margin-left: auto; font-size: 1.5em; line-height: 1; color: var(--muted); }
    .mnav__ico { display: inline-flex; }
    .mnav__ico .icon { width: 22px; height: 22px; color: var(--blue-600); }
    .mnav__row--all { color: var(--blue-600); font-weight: 700; }
    .mnav__cta { margin-top: 18px; justify-content: center; }

    /* back + heading */
    .mnav__back {
        display: flex; align-items: center; gap: 6px; width: 100%;
        padding: 6px 4px 14px; margin-bottom: 6px; border: 0; border-bottom: 1px solid var(--line);
        background: none; cursor: pointer; font: 700 1rem var(--head); color: var(--ink); text-align: left;
    }
    .mnav__chev--back { font-size: 1.5em; line-height: 1; color: var(--blue-600); }
    .mnav__heading { font: 700 .78rem var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 4px 4px 10px; }

    /* product rows (level 3) */
    .mnav__prod {
        display: flex; align-items: center; gap: 14px; padding: 10px 4px; border-bottom: 1px solid var(--line);
    }
    .mnav__prod-thumb { flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--line); }
    .mnav__prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .mnav__prod-name { font: 600 .95rem var(--head); color: var(--ink); line-height: 1.3; }
}

/* Go-live polish: touch targets ≥ 44px tall, 2-up photo grids on phones */
@media (max-width: 980px) {
    .footer__legal a {
        display: inline-block;
        padding: 12px 4px;
    }

    a.product-card__link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

@media (max-width: 520px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-item::after {
        font-size: .75rem;
        padding: 8px;
    }

    .gallery-item--photo img {
        padding: 8px 8px 44px;
    }
}

@media (max-width: 980px) {
    .mnav__close,
    .quote-modal__close,
    .cn-cb-close {
        min-width: 44px;
        min-height: 44px;
    }
}
