@media (max-width: 1100px) and (min-width: 901px) {
    .service-card--t1,
    .service-card--t2 {
        height: auto;
        min-height: 240px;
    }
}

@media (max-width: 1100px) {
    .services-layout {
        grid-template-columns: 1fr;
    }

    .projects-layout {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        aspect-ratio: auto;
        grid-template-rows: auto;
    }

    .project-card.large {
        grid-row: auto;
        height: auto;
        min-height: 400px;
    }

    .project-card:not(.large) {
        min-height: 264px;
    }

    .clients-grid {
        aspect-ratio: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .client-card.large {
        grid-row: auto;
        aspect-ratio: 645 / 420;
        height: auto;
    }

    .client-card:not(.large) {
        min-height: 90px;
        height: auto;
    }
}

@media (max-width: 768px) {
    .site-nav {
        flex-wrap: nowrap;
        align-items: center;
        overflow: visible;
        padding: 10px 16px 10px 20px;
        margin-top: 15px;
        margin-bottom: 10px;
        border-radius: 100px;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-logo {
        flex: 1 1 auto;
        min-width: 0;
    }

    .nav-toggle {
        position: relative;
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: 4px;
        border: none;
        border-radius: 20px;
        overflow: hidden;
        background: url('../../img/toggle.svg') center / cover no-repeat;
    }

    .site-nav.is-menu-open .nav-toggle {
        overflow: hidden;
        background: url('../../img/Right.svg') center / cover no-repeat;
    }

    .nav-toggle__bar {
        display: none;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        z-index: 201;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 15px;
        margin: 0;
        padding: 0 10px;
        box-sizing: border-box;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        visibility: hidden;
        pointer-events: none;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 24px;
        box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.28s ease,
        padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.35s;
    }

    .site-nav.is-menu-open .nav-links {
        max-height: min(80vh, 480px);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 15px 10px;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.28s ease,
        padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s;
    }

    .nav-links li {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-links a {
        position: relative;
        display: flex;
        align-items: center;
        width: min(720px, 100%);
        max-width: 720px;
        height: 50px;
        box-sizing: border-box;
        margin: 0 auto;
        border-radius: 28px;
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        text-align: center;
        text-decoration: none;
        background: rgba(0, 0, 0, 0.2);
    }

    .nav-links a.active {
        background: rgba(244, 122, 31, 0.6);
        color: #fff;
    }

    .nav-links a .arrow-icon {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: var(--btn-more-icon-circle);
        height: var(--btn-more-icon-circle);
    }

    .nav-links a:not(.active) .arrow-icon::before {
        background-color: var(--orange);
        background-image: url('../../img/Arrow%202.svg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: var(--btn-more-icon-arrow) var(--btn-more-icon-arrow);
        border-radius: 50%;
    }

    .nav-links a.active .arrow-icon {
        display: none;
    }

    .nav-links a.active::after {
        content: '';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: url('../../img/Button.svg') center / contain no-repeat;
        pointer-events: none;
    }

    .nav-links__cta {
        width: 100%;
        margin-top: 0;
    }

    .nav-links__cta .nav-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        width: min(720px, 100%);
        max-width: 720px;
        height: 50px;
        margin: 0 auto;
        padding: 0 22px;
        box-sizing: border-box;
        border-radius: 25px;
        font-size: 16px;
        font-weight: 600;
        text-align: center;
    }

    @media (prefers-reduced-motion: reduce) {
        .nav-links,
        .site-nav.is-menu-open .nav-links {
            transition-duration: 0.01ms;
        }
    }

    section {
        padding: 48px 0;
        width: 100%;
        box-sizing: border-box;
    }

    section.hero {
        padding: 0;
    }

    .hero-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 0;
    }

    .hero {
        position: relative;
        display: flex;
        flex-direction: column;
        width: 100%;
        flex: 1;
        min-height: 0;
        height: auto;
        border-radius: 24px;
        margin-bottom: 0;
        overflow: hidden;
        box-sizing: border-box;
    }

    .hero-photo {
        position: absolute;
        inset: 0;
        height: 100%;
        width: 100%;
        min-height: 0;
        z-index: 0;
        border-radius: 24px;
        transform: translateZ(0);
    }

    .hero-content {
        position: relative;
        z-index: 2;
        flex: 1;
        width: 100%;
        min-height: 0;
        height: 100%;
        padding: 20px 16px 0;
        border-radius: 24px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        background: rgba(0, 0, 0, 0.5);
    }

    .hero-title {
        font-size: clamp(22px, 5.5vw, 30px);
    }

    .hero-subtitle {
        font-size: 13px;
        padding-top: 12px;
    }

    .hero-subtitle br,
    .hero-subtitle__extra {
        display: none;
    }

    .hero-btns {
        padding-top: 12px;
        margin-bottom: 0;
        gap: 6px;
    }

    /* stats-row на планшете/мобилке скрыт — вертикальный стек ломал вёрстку */
    .stats-row {
        display: none;
    }

    .services,
    .how,
    .projects,
    .clients,
    .faq {
        width: 100%;
    }

    .services-layout,
    .projects-layout,
    .faq-layout,
    .how-title-row,
    .how-note,
    .clients-header,
    .clients-subtitle,
    .clients-note {
        width: 100%;
        max-width: 100%;
    }

    .section-title {
        max-width: 100%;
    }

    .projects-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .projects-heading {
        width: 100%;
    }

    .projects-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 16px;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .project-card {
        width: 100%;
        max-width: 100%;
        height: 264px;
    }

    .project-card.large {
        grid-row: auto;
        height: 400px;
    }

    .project-card.large .project-info {
        padding-top: 300px;
    }

    .project-card:nth-child(2) .project-info,
    .project-card:nth-child(3) .project-info {
        padding-top: 120px;
    }

    .faq-layout {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .faq-list,
    .faq-answer {
        width: 100%;
        max-width: 100%;
    }

    .clients-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .client-card.large {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 645 / 420;
        height: auto;
        min-height: 0;
        grid-column: 1;
        grid-row: auto;
    }

    .client-card.large .client-card-epigraph {
        font-size: min(var(--client-epigraph-font-size, 108px), 22vw);
    }

    .clients-subtitle {
        max-width: 100%;
        padding: 0 4px;
    }

    .site-footer {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 280px;
        margin: 12px 0 0;
        border-radius: 24px;
    }

    /* Типографика: уменьшенные размеры на мобильных */
    .nav-logo {
        font-size: 18px;
    }

    .section-title {
        font-size: clamp(28px, 6vw, 36px);
    }

    .section-subtitle {
        font-size: 16px;
    }

    .nav-cta {
        font-size: 14px;
        padding: 8px 16px;
    }

    .service-card-tag {
        font-size: 11px;
    }

    .service-card-title {
        font-size: 26px;
    }

    .service-card-desc {
        font-size: 15px;
    }

    .how-note {
        font-size: 12px;
    }

    .project-tag {
        font-size: 11px;
    }

    .project-title {
        font-size: 26px;
    }

    .project-subtitle {
        font-size: 15px;
    }

    .clients-subtitle {
        font-size: 13px;
    }

    .client-card {
        font-size: 17px;
    }

    .mark {
        position: relative;
        /*padding-bottom: 20px;*/
    }

    .mark::after {
        content: '';
        position: absolute;
        right: -15px;
        bottom: -5px;
        width: 50px;
        max-width: 100%;
        height: 12px;
        background: url('../../img/header-stroke.svg') no-repeat left center / contain;
    }

    .hero-title .mark::after {
        right: -10px;
        bottom: 0;
        width: 42px;
        height: 9px;
        transform: rotate(-2.5deg);
        transform-origin: left bottom;
    }
}

@media (max-width: 430px) {
    .site-nav,
    .hero-group,
    section,
    .services,
    .how,
    .projects,
    .clients,
    .faq,
    .site-footer {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .nav-links {
        left: 0;
        right: 0;
        width: 100%;
    }

    .nav-links a,
    .nav-links__cta .nav-cta {
        width: 100%;
        max-width: 100%;
    }

    .hero {
        overflow: hidden;
        position: relative;
        display: flex;
        flex-direction: column;
    }

    .hero-content {
        position: relative;
        z-index: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly; /* равномерно распределяет группу текста и кнопку */
        padding: 24px 16px;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        border-radius: 24px;
    }

    /* Группа заголовок + подзаголовок — идут плотно друг за другом */
    .hero-text-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px; /* расстояние между заголовком и подзаголовком */
        text-align: center;
    }

    .hero-title {
        width: 100%;
        margin: 0;
        font-size: 32px;
        font-weight: 600;
        line-height: 1.2;
    }

    .hero-subtitle {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.5;
        color: rgba(255, 255, 255, 1);
    }

    .hero-btns {
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 0;
        padding: 0;
        gap: 0;
        /* убираем position: absolute и bottom */
    }

    .hero-btns .btn-secondary {
        display: none;
    }

    .section-title {
        font-size: clamp(24px, 5.5vw, 30px);
    }

    .section-subtitle {
        font-size: 14px;
    }

    .stat-num {
        font-size: 25px;
    }

    .stat-label,
    .stat-caption {
        font-size: 11px;
    }

    .service-card-title {
        font-size: 26px;
    }

    .service-card-desc {
        font-size: 16px;
    }

    /* Отступ от hero – обнуляем лишние верхние марджины и задаём нужный */
    .services {
        margin-top: 47px;
    }

    .services-layout {
        margin-top: 0; /* убираем десктопный отступ, чтобы не суммировался */
    }

    /* Заголовок с подчерком – нужный шрифт */
    .section-title--header-stroke {
        font-size: 30px;
        font-weight: 600;
        text-align: left;
        overflow: visible;
    }

    .services-heading .mark::after {
        right: -10px;
        bottom: -5px;
        width: 80px;
        height: 10px;
    }

    .project-title {
        font-size: 22px;
    }

    .project-subtitle {
        font-size: 14px;
    }

    .step-title {
        font-size: 26px;
    }

    .step-desc {
        font-size: 16px;
    }

    .step-num {
        font-size: 10px;
    }

    .client-card {
        font-size: 15px;
    }

    .btn-primary {
        font-weight: 500;
        width: 205px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .nav-cta {
        padding: 7px 12px;
        font-size: 13px;
    }

    .nav-logo {
        font-size: 20px;
        font-weight: 600;
    }

    .mark {
        position: relative;
        padding-bottom: 5px;
    }

    .mark::after {
        content: '';
        position: absolute;
        right: -25px;
        bottom: -5px;
        width: 110px;
        max-width: 100%;
        height: 12px;
        background: url('../../img/header-stroke.svg') no-repeat left center / contain;
    }

    .hero-title .mark::after {
        right: -18px;
        bottom: -2px;
        width: 86px;
        height: 10px;
        transform: rotate(-2.5deg);
        transform-origin: left bottom;
    }
}