@media (max-width: 1400px), (hover: none), (pointer: coarse) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: fixed;
        top: 78px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        width: 100%;
        max-width: none;
        height: calc(100vh - 78px);
        height: calc(100dvh - 78px);
        display: none;
        padding: 22px clamp(20px, 5vw, 56px) 36px;
        background: #05080d;
        border-top: 1px solid var(--border-soft);
        transform: none;
        transition: transform 0.25s ease;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

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

    .header-inner {
        justify-content: space-between;
    }

    .nav-list {
        display: grid;
        gap: 6px;
        align-items: stretch;
    }

    .nav-link {
        width: 100%;
        min-height: 48px;
        padding: 0;
        font-size: 1rem;
    }

    .dropdown {
        position: static;
        min-width: 0;
        margin: 0 0 10px;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(17, 24, 39, 0.72);
        display: grid;
    }

    .nav-cta {
        margin-top: 18px;
        width: 100%;
    }
}

@media (max-width: 1400px), (hover: none), (pointer: coarse) {
    body.nav-open .main-nav {
        position: fixed !important;
        inset: 78px 0 0 0 !important;
        z-index: 9999 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        height: calc(100vh - 78px) !important;
        height: calc(100dvh - 78px) !important;
        margin: 0 !important;
        padding: 22px clamp(20px, 5vw, 56px) 36px !important;
        background: #05080d !important;
        transform: translate3d(0, 0, 0) !important;
        overflow-y: auto !important;
    }

    body.nav-open .site-header {
        z-index: 10000;
    }

    body.nav-open main,
    body.nav-open .site-footer {
        pointer-events: none;
    }
}

@media (max-width: 1180px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-visual-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .split,
    .cta-panel,
    .footer-grid,
    .home-visual-row {
        grid-template-columns: 1fr;
    }

    .cta-actions {
        margin-top: 0;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 32px, 1200px);
    }

    .header-inner {
        min-height: 70px;
    }

    .brand-link {
        width: 146px;
    }

    .main-nav {
        top: 70px;
        height: calc(100vh - 70px);
    }

    body.nav-open .main-nav {
        inset: 70px 0 0 0 !important;
        height: calc(100vh - 70px) !important;
        height: calc(100dvh - 70px) !important;
    }

    .hero {
        min-height: 620px;
    }

    .section-smaas-bg {
        background-attachment: scroll;
    }

    .hero-content {
        padding: 84px 0 64px;
        text-align: left;
    }

    .hero-logo {
        width: min(260px, 76vw);
    }

    h1 {
        font-size: clamp(2.35rem, 12vw, 3.8rem);
    }

    .section-dark,
    .section-darker {
        padding: 68px 0;
    }

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

    .card,
    .card-highlight,
    .form-card,
    .stat-panel,
    .cta-panel {
        padding: 22px;
    }

    .media-panel,
    .visual-tile {
        aspect-ratio: 16 / 10;
    }

    .hero-actions,
    .section-actions,
    .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 28px, 1200px);
    }

    .hero-content p,
    .section-heading p,
    .lead {
        font-size: 1rem;
    }

    .tech-strip span,
    .pill {
        width: 100%;
        justify-content: center;
    }
}
