/* Desktop header with 8 links + CTA: tighten between tablet and wide screens */
@media (min-width: 1025px) and (max-width: 1280px) {
    .brand img { width: 160px; }
    .main-nav a { font-size: 15px; padding: 11px 8px; }
    .main-nav .nav-cta { padding-inline: 13px; }
}

@media (max-width: 1024px) {
    .catalog-assurance-inner { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
    .catalog-assurance-inner > div:nth-child(2n) { border-right: 0; }
    .catalog-assurance-inner > div:nth-child(2n+1) { padding-left: 0; }
    .leadership-grid { grid-template-columns: repeat(2, 1fr); }
    .catalog-heading { grid-template-columns: 1fr 360px; gap: 45px; }
    .machine-section-heading { grid-template-columns: 1fr 360px; gap: 45px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-card:last-child { grid-column: 1 / -1; width: calc(50% - 10px); }
    .detail-hero-inner { grid-template-columns: minmax(0,1fr) 390px; gap: 45px; }
    .detail-hero-image, .detail-hero-image img { width: 390px; height: 473px; }
    .detail-hero-inner:has(.detail-hero-image.is-wide) { grid-template-columns: minmax(0,1fr) 470px; }
    .detail-hero-image.is-wide, .detail-hero-image.is-wide img { width: 470px; height: 320px; }
    .product-detail-banner .breadcrumbs { margin-bottom: 38px; }
    .site-header::before { display: none; }
    .container { width: min(100% - 36px, 940px); }
    /* The fixed mobile drawer must be allowed to extend below the header. */
    .site-header { padding: 16px 0; overflow: visible; }
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 88vw);
        /* Closed drawer slides off with transform and is hidden, so it never widens the page. */
        transform: translateX(100%);
        visibility: hidden;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 82px 22px 30px;
        border: 0;
        border-radius: 0;
        background: #101a2c;
        transition: transform .3s ease, visibility 0s linear .3s;
        z-index: 80;
        overflow-y: auto;
    }
    .main-nav.open { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }
    .main-nav a { padding: 13px 14px; color: rgba(255,255,255,.9); }
    .main-nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
    .main-nav a.active { background: transparent; color: #fff; }
    .main-nav .nav-cta { color: #fff; background: var(--blue); }
    .nav-toggle[aria-expanded="true"] span { background: #fff; }
    .main-nav .nav-cta { margin-top: 8px; text-align: center; }
    .nav-toggle { position: relative; z-index: 90; }
    .hero { min-height: 650px; background-position: 58% center; }
    .about-grid { gap: 58px; }
    .counter-float { right: -10px; }
    .about-right h2 { font-size: clamp(38.25px, 4.25vw, 51px); }
    .trust-cards { grid-template-columns: repeat(3, 1fr); margin-top: 55px; }
    .project-grid { grid-template-columns: 1fr 390px; gap: 40px; }
    .inner-banner { min-height: 480px; }
    .product-details-layout { grid-template-columns: 1fr; }
    .product-sidebar { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    .catalog-hero-stat { display: none; }
    .catalog-heading, .detail-performance-grid { grid-template-columns: 1fr; gap: 25px; }
    .machine-section-heading, .detail-gallery-layout { grid-template-columns: 1fr; gap: 30px; }
    .making-machine-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .making-machine-card:last-child { grid-column: 1 / -1; width: calc(50% - 10px); }
    .detail-hero-inner { grid-template-columns: 1fr; }
    .detail-hero-copy { max-width: 680px; }
    .detail-hero-image { width: 420px; height: 509px; max-width: 100%; justify-self: start; }
    .detail-hero-image img { width: 100%; height: 100%; }
    .detail-hero-inner:has(.detail-hero-image.is-wide) { grid-template-columns: 1fr; }
    .detail-hero-image.is-wide { width: 100%; max-width: 600px; height: auto; aspect-ratio: 3 / 2; }
    .detail-hero-image.is-wide img { width: 100%; height: 100%; }
    .product-photo-slide { height: 440px; }
    .detail-spec-grid { grid-template-columns: 1fr; }
    .detail-facts-grid { grid-template-columns: 1fr; }
    .detail-facts-grid > div, .detail-facts-grid > div:first-child { padding: 17px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
    .detail-facts-grid > div:last-child { border: 0; }
    .section { padding: 70px 0; }
    .hero { min-height: 610px; }
    .hero-content { padding-top: 80px; }
    .about-grid { grid-template-columns: 1fr; gap: 54px; }
    .about-right { padding-top: 0; }
    .about-quote-copy { max-width: 650px; }
    .about-right h2 { font-size: clamp(39.95px, 5.95vw, 54.4px); }
    .about-secondary-photo-wrap { justify-content: flex-start; padding-top: 38px; }
    .about-small-img { width: min(58%, 360px); aspect-ratio: .92 / 1; }
    .trust-section { padding: 68px 0 35px; }
    .trust-cards { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: 1fr; }
    .board-grid { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: 1fr; }
    .project-copy { max-width: 620px; }
    .quote-card { max-width: 620px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-title span { display: block; margin-left: 0; margin-top: 8px; }
    .bottom-cta-inner { justify-content: space-between; gap: 25px; }
    .inner-banner { min-height: 450px; }
    .about-company-grid, .facility-story-grid, .quality-story-grid { grid-template-columns: 1fr; }
    .about-purpose-heading, .about-strength-inner { grid-template-columns: 1fr; gap: 20px; }
    .purpose-cards { grid-template-columns: 1fr; }
    .purpose-card, .purpose-card:nth-child(4), .purpose-card:nth-child(5) { grid-column: auto; }
    .about-company-image { max-width: 650px; }
    .quality-visual { order: 2; }
    .product-overview-grid { grid-template-columns: 1fr; }
    .product-main-placeholder { min-height: 440px; }
    .product-main-image, .product-main-image > img { min-height: 440px; height: 440px; }
}

@media (max-width: 600px) {
    .product-catalog-hero { min-height: 430px; }
    .product-catalog-hero-inner { padding: 54px 0; }
    .product-catalog-hero .breadcrumbs { margin-bottom: 44px; }
    .product-catalog-hero h1 { font-size: clamp(40.8px, 11.05vw, 55.25px); letter-spacing: -3px; }
    .product-detail-banner { min-height: 300px; }
    .product-detail-banner-content { padding: 44px 0; }
    .product-detail-banner .breadcrumbs { margin-bottom: 34px; }
    .product-detail-banner h1 { font-size: clamp(35.7px, 9.35vw, 46.75px); letter-spacing: -2.2px; }
    .product-grid { grid-template-columns: 1fr; }
    .making-machine-grid { grid-template-columns: 1fr; }
    .making-machine-card:last-child { grid-column: auto; width: auto; }
    .making-machine-photo { height: 260px; }
    .catalog-card:last-child { grid-column: auto; width: auto; }
    .catalog-card h3 { min-height: 0; }
    .catalog-card-view { opacity: 1; transform: none; }
    .catalog-assurance-inner { grid-template-columns: 1fr; gap: 0; }
    .catalog-assurance-inner > div, .catalog-assurance-inner > div:first-child { padding: 17px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
    .catalog-assurance-inner > div:last-child { border: 0; }
    .detail-hero { padding: 48px 0 58px; }
    .detail-hero-copy h2 { font-size: clamp(33.15px, 8.5vw, 43.35px); letter-spacing: -1.8px; }
    .detail-image-tag { left: 12px; top: 12px; }
    .detail-hero-image { width: min(100%, 340px); height: auto; aspect-ratio: 420 / 509; }
    .detail-hero-image.is-wide { width: 100%; aspect-ratio: 3 / 2; }
    .product-photo-slide { height: 340px; }
    .detail-spec-card dl { padding-inline: 19px; }
    .detail-spec-title { padding: 22px 20px; }
    .detail-spec-card dl > div { gap: 14px; }
    .container { width: min(100% - 28px, 560px); }
    .section { padding: 58px 0; }
    .section-title { margin-bottom: 30px; }
    .brand { padding: 4px 8px; }
    .brand img { width: 145px; height: 40px; }
    .hero { min-height: 580px; background-position: 62% center; }
    .hero-overlay { background: linear-gradient(90deg, rgba(4,12,23,.94) 0%, rgba(6,15,27,.77) 55%, rgba(7,15,28,.25) 100%); }
    .hero h1 { letter-spacing: -2.1px; }
    .hero h1 span { letter-spacing: -.8px; }
    .about-grid { gap: 44px; }
    .about-photo { aspect-ratio: 1 / 1.05; border-radius: 14px; }
    .counter-float { right: 12px; bottom: 18px; min-width: 0; padding: 6px 10px 5px; }
    .certificate-card img { width: 200px; }
    .counter-float strong { font-size: 23px; }
    .about-left-content { padding-top: 24px; }
    .about-actions { flex-wrap: wrap; }
    .about-right h2 { margin-bottom: 20px; font-size: clamp(36.55px, 8.5vw, 49.3px); letter-spacing: -2.2px; }
    .about-right .about-quote-copy > p { margin-bottom: 30px; font-size: 16px; }
    .about-desktop-break { display: none; }
    .stats { gap: 18px; }
    .stat-value { font-size: clamp(44.2px, 11.05vw, 59.5px); letter-spacing: -3px; }
    .stat-label { margin-top: 8px; font-size: 14px; }
    .about-secondary-photo-wrap { padding-top: 32px; }
    .about-small-img { width: min(70%, 330px); border-radius: 14px; }
    .trust-section { min-height: auto; background-position: 55% center; }
    .trust-overlay { background: rgba(3,10,18,.72); }
    .trust-cards { grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 40px; }
    .trust-card { min-height: 150px; padding: 18px 15px; }
    .trust-card h3 { font-size: 14.45px; }
    .line-icon { font-size: 34px; }
    .service-card { grid-template-columns: 1fr 40%; min-height: 215px; }
    .service-copy { padding: 25px 15px 20px 20px; }
    .service-no { font-size: 45.05px; margin-bottom: 10px; }
    .service-card h3 { font-size: 19.55px; }
    .service-card p { font-size: 15px; }
    .service-card img { min-height: 215px; }
    .service-visual { min-height: 215px; padding: 20px; }
    .service-visual .svc-icon { width: 78%; }
    .service-visual .svc-icon.svc-ev-systems { width: 100%; }
    .project-quote { padding: 58px 0; }
    .quote-card { padding: 20px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .logo-card { width: 170px; height: 120px; }
    .logo-card-wide { width: 300px; }
    .logo-card-wide img { padding: 0 18px; }
    .logo-card-mid { width: 230px; }
    .logo-card-mid img { max-height: 70px; padding: 0 16px; }
    .testimonial { padding: 36px 22px 30px; }
    .testimonial p { font-size: 17px; }
    .bottom-cta-inner { flex-direction: column; text-align: center; gap: 14px; }
    .footer-grid { grid-template-columns: 1fr; gap: 22px; }
    .footer-bottom { grid-template-columns: 1fr; justify-items: center; gap: 10px; text-align: center; }
    .footer-bottom > span:last-child { text-align: center; }
    .inner-banner { min-height: 430px; }
    .inner-banner .breadcrumbs { margin-bottom: 44px; }
    .inner-banner-content { padding: 48px 0; }
    .breadcrumbs { margin-bottom: 34px; }
    .inner-banner h1 { font-size: clamp(38.25px, 10.2vw, 49.3px); letter-spacing: -2.3px; }
    .about-company-image { padding: 0 12px 42px 0; }
    .about-company-image > img { min-height: 330px; }
    .experience-chip { padding: 14px 17px; }
    .experience-chip strong { font-size: 33.15px; }
    .about-fact-grid { grid-template-columns: 1fr; }
    .leadership-grid { grid-template-columns: 1fr; }
    .facility-gallery { padding: 0 0 60px 34px; }
    .facility-gallery-main { height: 350px; }
    .facility-gallery-small { height: 165px; width: 53%; border-width: 5px; }
    .quality-visual img { min-height: 310px; }
    .about-strength-strip { padding: 52px 0; }
    .product-banner { min-height: 370px; }
    .product-banner h1 { font-size: clamp(39.1px, 10.2vw, 52.7px); letter-spacing: -2.4px; }
    .product-main-placeholder { min-height: 330px; }
    .product-main-image, .product-main-image > img { min-height: 330px; height: 330px; }
    .product-thumbnails { grid-template-columns: 1fr 1fr 1fr; }
    .product-meta div { grid-template-columns: 1fr; gap: 5px; }
    .product-actions { align-items: flex-start; flex-direction: column; }
    .product-sidebar { grid-template-columns: 1fr; }
    .product-feature-grid, .inclusion-list, .product-media-grid { grid-template-columns: 1fr; }
    .spec-table > div { grid-template-columns: 1fr; gap: 5px; }
    .product-block-heading > i { display: none; }
}

@media (max-width: 420px) {
    .hero { min-height: 550px; }
    .hero h1 { font-size: 39.1px; }
    .hero h1 span { font-size: 22.1px; }
    .trust-cards { grid-template-columns: 1fr; }
    .service-card { grid-template-columns: 1.15fr .85fr; }
    .service-copy { padding-left: 16px; }
    .service-card p { line-height: 1.42; }
}

@media (max-width: 480px) {
    .about-right h2 { font-size: clamp(34.85px, 9.18vw, 43.35px); line-height: 1.02; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .stat-value { font-size: clamp(39.95px, 11.3vw, 54.4px); }
    .stat-label { font-size: 13px; }
    .about-small-img { width: 78%; }
}

@media (max-width: 360px) {
    .about-right h2 { font-size: 34px; letter-spacing: -1.7px; }
    .about-copy, .about-right .about-quote-copy > p { font-size: 15.5px; }
    .stat-value { font-size: 39.95px; letter-spacing: -2.4px; }
    .stat-label { max-width: 105px; }
    .about-actions .btn { width: 100%; }
    .about-small-img { width: 84%; }
}

/* Hero swiper + highlighted strength section */
@media (max-width: 1024px) {
    .hero,
    .hero-track,
    .hero-slide { min-height: 650px; }
    .hero-slide .hero-media { object-position: 58% center; }
    .hero h1 { max-width: 720px; }
    .strength-wrap { grid-template-columns: 1fr; gap: 46px; }
    .strength-intro { max-width: 760px; }
    .strength-stories { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .strength-story { height: 100%; }
    .strength-pill-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 820px) {
    .hero,
    .hero-track,
    .hero-slide { min-height: 610px; }
    .hero-content { padding-top: 94px; padding-bottom: 100px; }
    .hero h1 { font-size: clamp(40.8px, 7.22vw, 62.05px); }
    .hero-subcopy { max-width: 560px; font-size: 17px; }
    .strength-intro h2 { font-size: clamp(41.65px, 7.65vw, 59.5px); }
    .strength-stories { grid-template-columns: 1fr; }
    .strength-pill-grid { margin-top: 38px; }
}

@media (max-width: 600px) {
    .hero,
    .hero-track,
    .hero-slide { min-height: 620px; }
    .hero-slide .hero-media { object-position: 64% center; }
    .hero-overlay,
    .hero-overlay-strong { background: linear-gradient(90deg, rgba(4,12,23,.96) 0%, rgba(6,15,27,.84) 61%, rgba(7,15,28,.32) 100%); }
    .hero-content { padding-top: 98px; padding-bottom: 112px; }
    .hero h1 { margin-bottom: 22px; font-size: clamp(36.55px, 9.78vw, 49.3px); line-height: .98; letter-spacing: -2.4px; }
    .hero h1 span { font-size: clamp(18.7px, 4.93vw, 25.5px); letter-spacing: -.8px; }
    .hero-subcopy { max-width: 92%; font-size: 15.5px; line-height: 1.62; }
    .hero-actions { gap: 14px; align-items: flex-start; flex-direction: column; }
    .hero-controls { bottom: 22px; }
    .hero-arrows { display: none; }
    .hero-dot { width: 27px; }
    .strength-section { padding-top: 66px; padding-bottom: 66px; }
    .strength-intro h2 { font-size: clamp(38.25px, 10.2vw, 51px); letter-spacing: -2.5px; }
    .strength-lead { font-size: 16px; }
    .rapid-badge { width: 100%; gap: 16px; padding: 17px 18px; }
    .rapid-number { font-size: clamp(54.4px, 15.3vw, 72.25px); }
    .rapid-copy strong { font-size: 25px; }
    .strength-story { padding: 23px 20px 20px; }
    .strength-story h3 { font-size: 23.8px; }
    .strength-story-footer { gap: 11px; }
    .strength-pill-grid { grid-template-columns: 1fr; gap: 9px; }
    .strength-pill { min-height: 82px; }
}

@media (max-width: 420px) {
    .hero,
    .hero-track,
    .hero-slide { min-height: 600px; }
    .hero-content { padding-top: 90px; }
    .hero h1 { font-size: 37.4px; }
    .hero h1 span { font-size: 19.55px; }
    .hero-text-link { font-size: 15px; }
    .rapid-badge { align-items: flex-start; }
    .rapid-number { font-size: 56.1px; }
    .rapid-copy span { font-size: 13.5px; }
    .strength-story-top { align-items: flex-start; }
    .strength-tag { padding-top: 4px; line-height: 1.35; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-track,
    .hero-media,
    .hero .eyebrow,
    .hero h1,
    .hero-subcopy,
    .hero-actions,
    .hero-dot::after { transition: none !important; }
    html { scroll-behavior: auto; }
    .reveal, .scroll-section { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (max-width: 1024px) {
    .strength-overview-grid, .fixture-strength-grid { gap: 45px; }
    .tooling-card-grid { grid-template-columns: repeat(2, 1fr); }
    .service-page-card { grid-template-columns: 39% 1fr; }
}

@media (max-width: 820px) {
    .strength-overview-grid, .fixture-strength-grid, .strength-outcome-inner { grid-template-columns: 1fr; }
    .strength-overview-visual { max-width: 680px; }
    .strength-section-heading { grid-template-columns: 1fr; gap: 18px; }
    .fixture-image { order: 2; }
    .strength-outcome-inner { gap: 35px; }
    .services-intro-grid, .contact-details-grid, .contact-quote-grid { grid-template-columns: 1fr; gap: 40px; }
    .service-page-grid { grid-template-columns: 1fr; }
    .service-process-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-map-card, .contact-map-card iframe { min-height: 430px; height: 430px; }
    .gallery-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 250px; }
}

@media (max-width: 600px) {
    .strength-overview-copy h2, .strength-section-heading h2, .fixture-copy h2 { font-size: clamp(34px, 8.5vw, 43.35px); letter-spacing: -1.7px; }
    .strength-overview-visual { padding: 0 0 35px 20px; }
    .strength-overview-visual > img { min-height: 390px; }
    .strength-visual-card { min-width: 230px; padding: 19px 20px; }
    .tooling-card-grid, .fixture-points { grid-template-columns: 1fr; }
    .tooling-card { min-height: 235px; }
    .tooling-card > i { margin-bottom: 34px; }
    .fixture-image img { min-height: 380px; }
    .strength-outcome { padding: 58px 0; }
    .service-page-card { grid-template-columns: 1fr; }
    .service-page-media { min-height: 230px; }
    .service-page-media.is-icon .svc-icon { width: 45%; max-width: 170px; }
    .service-page-media.is-icon .svc-icon.svc-ev-systems { width: 86%; max-width: 320px; }
    .service-page-card > div:last-child { padding: 24px 20px; }
    .service-process-grid { grid-template-columns: 1fr; }
    .contact-details-copy h2, .contact-quote-intro h2, .services-intro h2 { font-size: clamp(34.85px, 8.92vw, 45.05px); }
    .contact-map-card, .contact-map-card iframe { min-height: 370px; height: 370px; }
    .contact-form { padding: 22px 18px; }
    .contact-ready-quote .project-copy { padding: 22px 18px; }
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
    .gallery-item-wide { grid-column: auto; }
    .gallery-item-tall { grid-row: auto; }
    .gallery-filters { gap: 6px; }
    .gallery-filters button { padding: 9px 13px; }
}

@media (max-width: 820px) {
    main > .section::after { width: 360px; opacity: .04; }
}

@media (max-width: 600px) {
    main > .section::after { width: 270px; right: -110px; bottom: -80px; opacity: .035; }
    main > .section:nth-of-type(even)::after { left: -110px; right: auto; }
    .bottom-cta::before, .site-footer::before, .service-process::before, .strength-outcome::before, .project-quote::before { opacity: .08; }
}

/* The catalogue grid holds many cards, so the "last card half width" rule should not apply. */
@media (max-width: 1024px) {
    .catalog-product-grid .catalog-card:last-child { grid-column: auto; width: auto; }
    .catalog-marquee.is-marquee .catalog-card, .catalog-marquee.is-marquee .catalog-card.is-clone { flex-basis: 250px; width: 250px; margin-right: 14px; }
    .catalog-filter-icon { width: 38px; height: 38px; }
    .catalog-filter-icon.is-wide { width: 58px; height: 38px; }
}
@media (max-width: 600px) {
    .catalog-filter { flex-wrap: nowrap; overflow-x: auto; margin-right: -18px; padding-bottom: 6px; }
    .catalog-filter button { flex: none; }
}
