@media (max-width: 1280px) {
    .main-nav {
        gap: 22px;
    }

    .tech-strip {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .cards-4,
    .cards-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .not-found-links {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .method-grid,
    .timeline {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .cards-3,
    .cards-4,
    .cards-5,
    .project-grid,
    .home-projects-grid,
    .method-grid,
    .timeline,
    .case-process,
    .stats-panel,
    .stats-band,
    .services-process-grid,
    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .not-found-visual {
        min-height: 280px;
    }

    .not-found-visual img {
        max-height: 340px;
    }
}

@media (max-width: 1024px) {
    .header-inner {
        min-height: 72px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        position: fixed;
        top: 72px;
        left: 24px;
        right: 24px;
        display: grid;
        gap: 0;
        padding: 18px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(7, 7, 12, .96);
        transform: translateY(-18px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease, transform .25s ease;
        backdrop-filter: blur(18px);
    }

    .menu-open .main-nav {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-link {
        padding: 16px 4px;
    }

    .nav-link::after {
        bottom: 9px;
    }

    .header-cta {
        display: none;
    }

    .hero-grid,
    .services-hero-card,
    .case-intro,
    .faq-layout,
    .split-grid,
    .two-col,
    .results-tech,
    .about-split,
    .contact-grid,
    .not-found-grid,
    .featured-card,
    .cta-panel {
        grid-template-columns: 1fr;
    }

    .hero-media {
        order: -1;
    }

    .services-hero-logo {
        order: -1;
    }

    .hero-media img {
        max-height: 480px;
        object-fit: contain;
    }

    .home-hero {
        background-size: 1200px auto;
        background-position: center top;
    }

    .project-grid,
    .home-projects-grid,
    .stats-band,
    .cards-3,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-hero-card .hero-copy h1 {
        font-size: clamp(30px, 5.8vw, 42px);
    }

    .footer-mark {
        display: none;
    }

    .footer-bottom {
        grid-template-columns: 1fr 1fr;
    }

}

@media (max-width: 768px) {
    .container {
        width: min(calc(100% - 32px), var(--container));
    }

    .hero,
    .page-hero,
    .case-hero,
    .not-found {
        padding: 42px 0 42px;
    }

    .hero-copy h1,
    .not-found-copy h1 {
        font-size: clamp(28px, 7.5vw, 40px);
    }

    .section {
        padding: 52px 0;
    }

    .cards-4,
    .cards-5,
    .cards-3,
    .project-grid,
    .home-projects-grid,
    .method-grid,
    .timeline,
    .case-process,
    .stats-panel,
    .stats-band,
    .services-process-grid,
    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tech-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .glass-card,
    .timeline-item {
        min-height: auto;
    }

    .featured-card,
    .process-banner,
    .portal-panel,
    .services-process-panel,
    .cta-panel {
        padding: 24px;
        border-radius: 20px;
    }

    .services-hero-card {
        min-height: auto;
        padding: 24px;
    }

    .services-hero-card .feature-row span {
        padding-left: 68px;
    }

    .services-hero-card .feature-row img {
        width: 52px;
        height: 52px;
    }

    .stats-band article {
        grid-template-columns: 62px auto;
    }

    .stats-band img {
        width: 58px;
        height: 58px;
    }

    .featured-card > img,
    .process-banner > img {
        min-height: 220px;
        object-position: center;
    }

    .portal-panel,
    .hero-portal-card {
        min-height: 300px;
        background-position: 62% center;
    }

    .not-found-visual {
        min-height: 260px;
    }

    .not-found-visual img {
        max-height: 320px;
        margin-inline: auto;
    }

    .form-row,
    .project-info,
    .footer-bottom {
        grid-template-columns: 1fr;
    }

    .contact-modal {
        padding: 16px;
        align-items: start;
        overflow-y: auto;
    }

    .contact-modal__dialog {
        max-height: none;
        margin-top: 72px;
        width: min(100%, 560px);
    }

    .contact-form-modal {
        padding: 24px;
    }

    .contact-form-modal .form-row {
        grid-template-columns: 1fr;
    }

    .contact-modal__close {
        top: 14px;
        right: 14px;
        width: 38px;
        height: 38px;
    }

    .contact-card {
        grid-template-columns: 56px 1fr 24px;
        padding: 18px;
    }

    .contact-card span {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 560px) {
    .cards-4,
    .cards-5,
    .cards-3,
    .project-grid,
    .home-projects-grid,
    .method-grid,
    .timeline,
    .case-process,
    .stats-panel,
    .stats-band,
    .services-process-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }

    .not-found-visual {
        min-height: 220px;
    }

    .not-found-visual img {
        max-height: 260px;
    }
}

@media (max-width: 430px) {
    .brand img {
        width: 136px;
    }

    .hero-copy h1,
    .section-heading h2,
    .section-title,
    .info-panel h2,
    .cta-panel h2,
    .not-found-title {
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .btn {
        width: 100%;
        padding-inline: 18px;
    }

    .hero-actions,
    .feature-row,
    .stats-row,
    .stats-band {
        width: 100%;
    }

    .stats-band {
        padding: 22px;
    }

    .filter-bar button {
        min-width: 0;
        width: calc(50% - 8px);
        padding-inline: 10px;
    }

    .tech-strip {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}
