/* ============================================================
   1. Шрифты
   ============================================================ */

   @font-face {
    font-family: "Arturito Slab";
    src: url("fonts/Arturito_Slab.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Averta CY Light";
    src: url("fonts/Averta Cyrillic Light.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   2. База
   ============================================================ */

:root {
    /* Единица макета: 1px на макете 1920×1080.
       Ограничена и шириной, и высотой — чтобы первые экраны
       на невысоких мониторах масштабировались целиком. */
    --u: min(calc(100vw / 1920), calc(100vh / 1080));
    --orange: #f05222;
    --header-h: 60px;
    --footer-h: 100px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    overflow: hidden;
}

body {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    font-family: "Arturito Slab", Arial, sans-serif;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    background: #000;
}

/* ============================================================
   3. Header
   ============================================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 60px;
    padding: 0 24px 0 0;              /* убираем margin-right у меню */
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);

    transform: translate3d(0, 0, 0);
    transition: transform 0.4s ease, opacity 0.4s ease;
    will-change: transform;
}

.header__logo {
    width: 13%;
    margin: 5px 0 0 6%;
    display: block;
}

.header__logo-img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Бургер (по умолчанию скрыт, появляется на мобильных) --- */
.header__burger {
    display: none;
    background: transparent;
    border: none;
    padding: 10px;
    width: 44px;
    height: 44px;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}

.header__burger-line {
    display: block;
    width: 26px;
    height: 2px;
    margin: 5px auto;
    background: #f05222;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Превращение бургера в крестик при открытии */
.header__burger[aria-expanded="true"] .header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.header__burger[aria-expanded="true"] .header__burger-line:nth-child(2) {
    opacity: 0;
}
.header__burger[aria-expanded="true"] .header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Меню (desktop) --- */
.header__menu {
    display: flex;
    align-items: center;
}

.header__menu-item {
    position: relative;
    color: #f05222;
    font-size: 25px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    padding-bottom: 4px;
}

.header__menu-item:not(:last-child) {
    margin-right: 68px;
}

.header__menu-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -34px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f05222;
    transform: translateY(-50%);
    pointer-events: none;
}

.header__menu-item::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #f05222;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.header__menu-item:hover::before {
    width: 100%;
}

/* ============================================================
   4. Секции
   ============================================================ */

.page-body {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100dvh;
    scroll-behavior: smooth;
    /* якоря меню не прячут начало секции под шапку */
    scroll-padding-top: var(--header-h);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    /* Скрываем скроллбар — чтобы он не наезжал под хедер */
    scrollbar-width: none;            /* Firefox */
    -ms-overflow-style: none;         /* IE / Edge */
}

.page-body::-webkit-scrollbar {
    display: none;                    /* Chrome / Safari */
}

.hero,
.result {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    overflow: hidden;
    isolation: isolate;
}

/* ============================================================
   5. Hero
   ============================================================ */

   .hero__photo {
    position: absolute;
    inset: -20% 0 0 0;            /* запас только сверху */
    background: url("img/bg-pho-scr1.png") center / cover no-repeat;
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.55) 55%,
        rgba(0, 0, 0, 1) 100%          /* чёрный на стыке */
    );
}

.hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: calc(60 * var(--u));
    min-height: 100dvh;
    padding: calc(175 * var(--u)) calc(115 * var(--u)) calc(105 * var(--u));
    font-family: "Averta CY Light", sans-serif;
    font-weight: 300;
}

/* Верх: логотип с подписями слева, контакты справа */
.hero__top {
    display: grid;
    grid-template-columns: calc(950 * var(--u)) minmax(0, 1fr);
    align-items: start;
}

.hero__intro {
    margin-left: calc(-12 * var(--u));
}

.hero__title {
    margin: 0;
    line-height: 0;
}

.hero__logo {
    display: block;
    width: calc(692 * var(--u));
    max-width: 100%;
    height: auto;
}

.hero__tagline {
    margin: calc(34 * var(--u)) 0 0;
    font-size: calc(42 * var(--u));
    line-height: 1.2;
}

.hero__subtitle {
    margin: calc(18 * var(--u)) 0 0;
    font-size: calc(30 * var(--u));
    line-height: 1.2;
}

.hero__contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: calc(4 * var(--u));
    font-size: calc(36 * var(--u));
    line-height: 1.25;
}

.hero__contacts-title {
    margin: 0 0 calc(38 * var(--u));
}

.hero__contacts-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.25s ease;
}

.hero__contacts-link:hover,
.hero__contacts-link:focus-visible {
    color: var(--orange);
}

/* Низ: «Все ключевые направления» */
.hero__directions-title {
    margin: 0 0 calc(38 * var(--u));
    font-size: calc(36 * var(--u));
    font-weight: 300;
    line-height: 1.2;
}

.directions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: calc(88 * var(--u));
    margin: 0;
    padding: 0;
    list-style: none;
}

.directions__item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.directions__card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 270 / 203;
    overflow: hidden;
    border-radius: max(8px, calc(18 * var(--u)));
    background: #555;
    box-shadow:
        0 18px 40px -12px rgba(0, 0, 0, 0.65),
        0 4px 12px rgba(0, 0, 0, 0.35);
}

.directions__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Лёгкое затемнение, чтобы надпись читалась на ярком фото.
   При наведении появляется серая вуаль. */
.directions__card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    transition: background-color 0.35s ease;
}

.directions__name {
    position: relative;
    z-index: 1;
    color: var(--orange);
    font-size: calc(36 * var(--u));
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.directions__item:hover .directions__card::after {
    background-color: rgba(128, 128, 128, 0.72);
}

.directions__item:hover .directions__img {
    transform: scale(1.06);
}

.directions__caption {
    margin: calc(18 * var(--u)) 0 0;
    font-size: max(13px, calc(24 * var(--u)));
    line-height: 1.25;
    text-align: center;
}

/* ============================================================
   6. Result
   ============================================================ */

/* Единственный фоновый слой секции.
   Несёт bg-scr2.png. К нему применяется параллакс. */
   .result {
    position: relative;
    z-index: 1;                       /* поверх hero, чтобы мост работал */
}

/* Фон result — запас только снизу */
.result__bg {
    position: absolute;
    inset: 0 0 -20% 0;
    z-index: 0;
    background: url("img/bg-scr2.png") center / cover no-repeat;
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

/* Затемнение поверх result. Верх — чёрный, чтобы совпасть с мостом */
.result__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.3) 21%,
        rgba(0, 0, 0, 0.3) 62%,
        rgba(0, 0, 0, 1) 83%      /* = низ секции: слой выше на 20% */
    );
}

/* Мост: растёт вверх от result, растворяет стык */
.result::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -120px;
    height: 120px;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.95) 60%,
        #000 100%
    );
}

.result__content {
    position: relative;
    z-index: 2;                       /* выше моста */
    width: 100%;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 60px;
    /* снизу — место под закреплённый футер */
    padding:
        calc(40 * var(--u))
        calc(90 * var(--u))
        calc(var(--footer-h) + 10 * var(--u))
        calc(52 * var(--u));
    align-items: center;
}

.result__text {
    display: flex;
    flex-direction: column;
    font-family: "Averta CY Light", sans-serif;
    font-weight: 300;
}

.result__title {
    margin: 0;
    color: #fff;
    font-size: calc(73 * var(--u));
    font-weight: 300;
    line-height: 1.2;
}

.result__body {
    margin: calc(46 * var(--u)) 0 0;
    color: #fff;
    font-size: calc(40 * var(--u));
    line-height: 1.2;
}

.result__description {
    margin: calc(30 * var(--u)) 0 0;
    color: #fff;
    font-size: calc(28 * var(--u));
    line-height: 1.3;
}

.result__features {
    list-style: none;
    margin: calc(123 * var(--u)) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: calc(332 * var(--u)) calc(232 * var(--u)) max-content;
    column-gap: 0;
}

.result__feature {
    display: flex;
    flex-direction: column;
}

.result__feature-title {
    margin: 0;
    color: var(--orange);
    font-size: calc(30 * var(--u));
    font-weight: 300;
    line-height: 1.2;
    text-transform: uppercase;
}

.result__feature-text {
    margin: calc(18 * var(--u)) 0 0;
    color: #fff;
    font-size: calc(25 * var(--u));
    line-height: 1.25;
}

.result__gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(47 * var(--u));
    width: calc(797 * var(--u));
}

.result__gallery-item {
    display: block;
    width: 100%;
    aspect-ratio: 375 / 281;
    object-fit: cover;
    border-radius: calc(18 * var(--u));

    /* Тень: две ступени — глубокая для объёма + мягкая для рассеивания */
    box-shadow:
        0 18px 40px -12px rgba(0, 0, 0, 0.65),
        0 4px 12px rgba(0, 0, 0, 0.35);

    /* Тонкая внутренняя подсветка по краю — «дорогой» штрих */
    outline: 1px solid rgba(255, 255, 255, 0.06);
    outline-offset: -1px;
}

/* ============================================================
   7. Универсальные секции (.section)
   ============================================================ */

/* Фон с точками лежит на самих секциях, поэтому листается
   вместе с ними, а не стоит на месте. Сверху и снизу он
   уходит в чёрный — так стыки между секциями не видны. */
.section {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    z-index: 1;                       /* мост поверх предыдущей секции */
    isolation: isolate;

    display: flex;
    align-items: center;
    padding: 48px 80px;
    box-sizing: border-box;
    font-family: "Averta CY Light", sans-serif;
    font-weight: 300;

    background:
        linear-gradient(
            to bottom,
            #000 0%,
            rgba(0, 0, 0, 0.45) 22%,
            rgba(0, 0, 0, 0.45) 78%,
            #000 100%
        ),
        #000 url("img/background.svg") center / cover no-repeat;
}

/* Мост: как у .result — растворяет низ предыдущей секции */
.section::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -120px;
    height: 120px;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.95) 60%,
        #000 100%
    );
}

/* «Процесс работы» и «Нам доверяют» — примерно 60% экрана */
.section--short {
    min-height: 60dvh;
}

.section__inner {
    position: relative;
    z-index: 2;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.section__title {
    margin: 0;
    color: #fff;
    font-size: max(32px, calc(60 * var(--u)));
    font-weight: 300;
    line-height: 1.2;
}

.section__lead {
    margin: calc(28 * var(--u)) 0 0;
    max-width: 1100px;
    color: rgba(255, 255, 255, 0.85);
    font-size: max(17px, calc(28 * var(--u)));
    line-height: 1.4;
}

.section__note {
    margin: calc(60 * var(--u)) 0 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: max(17px, calc(32 * var(--u)));
    line-height: 1.3;
    text-align: center;
}

/* --- Процесс работы: линия с точками --- */
.process {
    --dot: max(22px, calc(36 * var(--u)));
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: calc(90 * var(--u)) 0 0;
    padding: 0;
    list-style: none;
}

/* Линия: от центра первой точки, со стрелкой на конце */
.process::before {
    content: "";
    position: absolute;
    top: calc(var(--dot) / 2 - 1.5px);
    left: calc(100% / 12);
    right: calc(100% / 12 - 48px);
    height: 3px;
    background: var(--orange);
    transform-origin: left center;
}

.process::after {
    content: "";
    position: absolute;
    top: calc(var(--dot) / 2);
    right: calc(100% / 12 - 50px);
    width: 14px;
    height: 14px;
    border-top: 3px solid var(--orange);
    border-right: 3px solid var(--orange);
    transform: translateY(-50%) rotate(45deg);
}

.process__step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.process__dot {
    display: block;
    width: var(--dot);
    height: var(--dot);
    border-radius: 50%;
    background: #a50f0b;
    box-shadow:
        0 0 0 3px #000,
        0 0 0 5px rgba(240, 82, 34, 0.6);
}

.process__label {
    margin-top: calc(40 * var(--u));
    font-size: max(14px, calc(26 * var(--u)));
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Анимация: JS вешает --armed, а при появлении секции — --in */
.process--armed::before,
.process--armed::after {
    transition:
        transform 1.4s cubic-bezier(0.65, 0, 0.35, 1),
        opacity 0.4s ease 1.2s;
}
.process--armed::before { transform: scaleX(0); }
.process--armed::after  { opacity: 0; }

.process--armed .process__dot,
.process--armed .process__label {
    opacity: 0;
    transition:
        opacity 0.6s ease,
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--i) * 0.22s);
}
.process--armed .process__dot   { transform: scale(0.2); }
.process--armed .process__label { transform: translateY(16px); }

.process--armed.process--in::before { transform: scaleX(1); }
.process--armed.process--in::after  { opacity: 1; }
.process--armed.process--in .process__dot,
.process--armed.process--in .process__label {
    opacity: 1;
    transform: none;
}

/* --- Нам доверяют: логотипы --- */
.clients {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    row-gap: calc(40 * var(--u));
    margin: calc(60 * var(--u)) 0 0;
    padding: 0;
    list-style: none;
}

.clients__item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 calc(100% / 6);
    height: max(70px, calc(120 * var(--u)));
    padding: 0 calc(20 * var(--u));
}

.clients__logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.clients__item--brand .clients__logo {
    max-height: 85%;
}

.clients__logo--text {
    color: #c9c3c3;
    font-family: Georgia, "Times New Roman", serif;
    font-size: max(24px, calc(48 * var(--u)));
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.clients__item:hover .clients__logo {
    transform: scale(1.06);
}

/* --- Контакты --- */
.section--contacts {
    overflow: hidden;
    align-items: stretch;
    /* снизу — футер и висящая над ним кнопка «В начало» */
    padding-bottom: calc(var(--footer-h) + 110px);
    background: #000;
}

/* Фото + точки поверх. Точки на чёрном, поэтому смешиваем
   через screen — чёрный становится прозрачным. */
.contacts__bg {
    position: absolute;
    inset: -20% 0 0 0;
    z-index: 0;
    background:
        url("img/background.svg") center / cover no-repeat,
        url("img/bg-contacts.webp") center / cover no-repeat;
    background-blend-mode: screen, normal;
    will-change: transform;
    backface-visibility: hidden;
}

.contacts__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    /* слой выше секции на 20% (запас под параллакс),
       поэтому чёрный тянется до верхней границы секции */
    background: linear-gradient(
        to bottom,
        #000 0%,
        #000 16%,
        rgba(0, 0, 0, 0.35) 40%,
        rgba(0, 0, 0, 0.35) 75%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.contacts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) calc(600 * var(--u));
    align-items: center;
    gap: calc(80 * var(--u));
}

.contacts__logo {
    display: block;
    width: calc(820 * var(--u));
    max-width: 100%;
    height: auto;
}

.contacts__title {
    margin: calc(60 * var(--u)) 0 0;
    font-size: max(26px, calc(60 * var(--u)));
    font-weight: 300;
    line-height: 1.15;
}

.contacts__list {
    margin: calc(44 * var(--u)) 0 0;
    font-size: max(18px, calc(36 * var(--u)));
    line-height: 1.35;
}

.contacts__directions {
    margin: calc(60 * var(--u)) 0 0;
    color: var(--orange);
    font-size: max(16px, calc(40 * var(--u)));
    line-height: 1.2;
}

/* Карточка с контактами: стекло, светлая рамка, оранжевый акцент */
.contacts__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: calc(56 * var(--u)) calc(56 * var(--u)) calc(52 * var(--u));
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: calc(18 * var(--u));
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(240, 82, 34, 0.08);
    overflow: hidden;
}

.contacts__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--orange);
}

.contacts__card-title {
    margin: 0;
    font-size: max(24px, calc(44 * var(--u)));
    font-weight: 300;
    line-height: 1.2;
}

.contacts__card-text {
    margin: calc(16 * var(--u)) 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: max(15px, calc(24 * var(--u)));
    line-height: 1.35;
}

.contacts__phone,
.contacts__email {
    color: #fff;
    text-decoration: none;
    transition: color 0.25s ease;
}

.contacts__phone {
    margin-top: calc(36 * var(--u));
    font-size: max(26px, calc(48 * var(--u)));
    line-height: 1.2;
    white-space: nowrap;
}

.contacts__email {
    margin-top: calc(10 * var(--u));
    font-size: max(18px, calc(32 * var(--u)));
    line-height: 1.3;
}

.contacts__phone:hover,
.contacts__phone:focus-visible,
.contacts__email:hover,
.contacts__email:focus-visible {
    color: var(--orange);
}

.contacts__actions {
    display: flex;
    gap: calc(16 * var(--u));
    width: 100%;
    margin-top: calc(40 * var(--u));
}

.contacts__btn {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    height: max(48px, calc(64 * var(--u)));
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    color: #fff;
    font-size: max(16px, calc(26 * var(--u)));
    text-decoration: none;
    text-shadow: none;
    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease,
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.contacts__btn:hover,
.contacts__btn:focus-visible {
    color: var(--orange);
    border-color: var(--orange);
    background-color: rgba(240, 82, 34, 0.08);
}

.contacts__btn--primary {
    border-color: var(--orange);
    background: var(--orange);
}

.contacts__btn--primary:hover,
.contacts__btn--primary:focus-visible {
    color: #fff;
    background-color: #d8441a;
    border-color: #d8441a;
}

.contacts__btn:active {
    transform: scale(0.97);
}

/* ============================================================
   8. Footer
   Закреплён снизу, появляется со второй секции
   ============================================================ */

.footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 40px;
    height: var(--footer-h);
    padding: 0 60px 0 43px;
    border-top: 3px solid rgba(255, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    box-shadow: 0 -1px 18px rgba(255, 255, 255, 0.08);
    font-family: "Averta CY Light", sans-serif;
    font-weight: 300;

    transform: translate3d(0, 100%, 0);
    visibility: hidden;
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s linear 0.5s;
}

.footer--visible {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s;
}

.no-js .footer {
    transform: none;
    visibility: visible;
}

.footer__logo {
    display: block;
    flex: none;
    width: 72px;
    height: 72px;
}

/* Общий вид кнопок футера: тонкая светлая рамка */
.footer__cta,
.footer__top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-weight: 300;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease,
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer__cta:hover,
.footer__cta:focus-visible,
.footer__top:hover,
.footer__top:focus-visible {
    color: var(--orange);
    border-color: var(--orange);
    background-color: rgba(240, 82, 34, 0.08);
}

.footer__cta:active,
.footer__top:active {
    transform: scale(0.97);
}

.footer__cta {
    width: 190px;
    height: 68px;
    font-size: 22px;
    line-height: 1.2;
}

/* «В начало» висит над футером справа */
.footer__top {
    position: absolute;
    right: 60px;
    bottom: calc(100% + 24px);
    width: 200px;
    height: 68px;
    padding: 0;
    background: rgba(0, 0, 0, 0.25);
    font-size: 30px;
    line-height: 1;
}

.footer__contacts {
    display: flex;
    flex-direction: column;
    font-size: 21px;
    line-height: 1.2;
}

.footer__contacts-title {
    margin: 0;
}

.footer__contacts-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer__contacts-link:hover,
.footer__contacts-link:focus-visible {
    color: var(--orange);
}

/* ============================================================
   9. Адаптив
   ============================================================ */

@media (max-width: 1279px) {
    .result__content { gap: 40px; }
    .section         { padding-left: 60px; padding-right: 60px; }
    .footer          { gap: 28px; padding-left: 32px; }
}

/* Планшет: меню сжимается, но остаётся горизонтальным */
@media (max-width: 1023px) {
    .header__menu-item       { font-size: 18px; }
    .header__menu-item:not(:last-child) { margin-right: 40px; }
    .header__menu-item:not(:last-child)::after { right: -22px; width: 6px; height: 6px; }

    .hero__content {
        padding: 110px 40px 60px;
        gap: 48px;
    }
    .hero__top {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .hero__intro         { margin-left: 0; }
    .hero__logo          { width: 70%; }
    .hero__tagline       { margin-top: 24px; font-size: 30px; }
    .hero__subtitle      { margin-top: 12px; font-size: 22px; }
    .hero__contacts      { font-size: 22px; padding-top: 0; }
    .hero__contacts-title { margin-bottom: 10px; }
    .hero__directions-title { font-size: 24px; margin-bottom: 24px; }
    .directions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
    .directions__name    { font-size: 26px; }
    .directions__caption { font-size: 16px; margin-top: 10px; }
    .directions__card::after { display: none; }
    .result__content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 100px 40px calc(var(--footer-h) + 40px);
        align-items: start;
    }
    .result__title       { font-size: 44px; }
    .result__body        { font-size: 26px; margin-top: 28px; }
    .result__description { font-size: 18px; margin-top: 20px; }
    .result__features {
        grid-template-columns: repeat(3, auto);
        justify-content: start;
        margin-top: 44px;
        column-gap: 32px;
    }
    .result__feature-title { font-size: 20px; }
    .result__feature-text  { font-size: 16px; margin: 10px 0 0; }
    .result__gallery {
        width: 100%;
        gap: 16px;
    }
    .result__gallery-item { border-radius: 10px; }

    .section { padding-left: 40px; padding-right: 40px; }
    .process__label { font-size: 13px; letter-spacing: 0.02em; }
    .clients__item  { flex-basis: 25%; }
    .contacts {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .contacts__logo { width: 80%; }
    .contacts__card { padding: 36px 32px 32px; border-radius: 12px; }

    .footer       { gap: 20px; }
    .footer__logo { width: 64px; height: 64px; }
    .footer__cta  { width: 160px; height: 60px; font-size: 19px; }
    .footer__contacts { font-size: 17px; }
    .footer__top  { width: 160px; height: 56px; font-size: 24px; right: 40px; }
}

/* Мобильный: бургер + выпадающее меню */
@media (max-width: 767px) {
    :root {
        --footer-h: 84px;
    }

    .header__burger {
        display: block;
    }

    /* Меню превращается в выпадающую панель под хедером */
    .header__menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(0, 0, 0, 0.96);
        backdrop-filter: blur(8px);
        padding: 12px 0;
        margin: 0;

        /* Скрыто по умолчанию */
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition:
            transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
            opacity 0.35s ease,
            visibility 0s linear 0.35s;
    }

    .header__menu--open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        transition:
            transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
            opacity 0.35s ease,
            visibility 0s;
    }

    /* Пункты меню — вертикально, без точек-разделителей */
    .header__menu-item {
        padding: 16px 24px;
        font-size: 20px;
        text-align: center;
    }
    .header__menu-item:not(:last-child) {
        margin-right: 0;
    }
    .header__menu-item:not(:last-child)::after {
        display: none;
    }
    /* Отключаем hover-подчёркивание на тач-устройствах */
    .header__menu-item::before {
        display: none;
    }

    /* Параллакс отключён */
    .hero__photo,
    .result__bg,
    .contacts__bg {
        inset: 0;
        will-change: auto;
    }

    .hero__content    { padding: 96px 20px 32px; gap: 40px; }
    .hero__logo       { width: 100%; }
    .hero__tagline    { font-size: 22px; margin-top: 18px; }
    .hero__subtitle   { font-size: 17px; }
    .hero__contacts   { font-size: 17px; }
    .hero__directions-title { font-size: 20px; }
    .directions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 14px;
    }
    /* Пятая карточка — по центру */
    .directions__item:last-child {
        grid-column: 1 / -1;
        width: calc(50% - 7px);
        justify-self: center;
    }
    .directions__name    { font-size: 22px; }
    .directions__caption { font-size: 14px; }
    .directions__card::after { display: none; }
    .result__content {
        min-height: auto;
        padding: 56px 20px 44px;
        gap: 32px;
    }
    .result__title       { font-size: 30px; }
    .result__body        { font-size: 20px; margin-top: 20px; }
    .result__description { font-size: 16px; }
    .result__features {
        grid-template-columns: 1fr;
        margin-top: 32px;
        gap: 20px;
    }
    .result__feature-title { font-size: 17px; }
    .result__feature-text  { font-size: 15px; margin-top: 6px; }
    .result__gallery      { gap: 12px; }
    .result__gallery-item { border-radius: 8px; }
    /* На узком экране ручные переносы только мешают */
    .result__body br,
    .result__description br { display: none; }

    .section {
        min-height: auto;
        padding: 32px 20px 44px;
    }
    /* Мосты короче, чтобы не затемнять контент над стыком */
    .result::before,
    .section::before {
        top: -40px;
        height: 40px;
    }
    .section__title br { display: none; }

    /* Линия процесса становится вертикальной, стрелка — вниз */
    .process {
        --dot: 22px;
        grid-template-columns: 1fr;
        row-gap: 26px;
        margin-top: 36px;
    }
    .process::before {
        top: calc(var(--dot) / 2);
        bottom: -30px;
        left: calc(var(--dot) / 2 - 1.5px);
        right: auto;
        width: 3px;
        height: auto;
        transform-origin: center top;
    }
    .process::after {
        top: auto;
        bottom: -32px;
        left: calc(var(--dot) / 2);
        right: auto;
        transform: translateX(-50%) rotate(135deg);
    }
    .process--armed::before { transform: scaleY(0); }
    .process--armed.process--in::before { transform: scaleY(1); }
    .process__step {
        flex-direction: row;
        gap: 18px;
        text-align: left;
    }
    .process__label {
        margin-top: 0;
        font-size: 16px;
    }
    .process--armed .process__label { transform: translateX(-12px); }
    .section--process .section__note { margin-top: 56px; }

    .clients {
        row-gap: 20px;
        margin-top: 32px;
    }
    .clients__item {
        flex-basis: 50%;
        height: 64px;
        padding: 0 12px;
    }

    .section--contacts {
        padding-bottom: calc(var(--footer-h) + 24px);
    }
    .contacts             { gap: 32px; }
    .contacts__logo       { width: 100%; }
    .contacts__title      { margin-top: 28px; }
    .contacts__list       { margin-top: 20px; }
    .contacts__directions { margin-top: 24px; }
    .contacts__card       { padding: 28px 20px 24px; }
    .contacts__phone      { margin-top: 20px; }
    .contacts__actions    { margin-top: 24px; gap: 12px; }

    /* Компактный футер: логотип, две кнопки */
    .footer {
        gap: 12px;
        padding: 0 16px;
    }
    .footer__logo     { width: 48px; height: 48px; }
    .footer__contacts { display: none; }
    .footer__cta,
    .footer__top {
        position: static;
        flex: 1 1 0;
        width: auto;
        height: 48px;
        font-size: 17px;
        background: transparent;
    }
    .footer__cta br { display: none; }
    .footer__top { order: 3; }

    .page-body {
        scroll-behavior: auto;
    }
}

@media (max-width: 479px) {
    .header__logo       { width: 40%; margin-left: 16px; }
    .hero__tagline      { font-size: 20px; }
    .result__title      { font-size: 26px; }
    .section__title     { font-size: 26px; }
    .contacts__title    { font-size: 24px; }
    .footer__cta,
    .footer__top        { font-size: 15px; }
}

/* ============================================================
   10. Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .page-body {
        scroll-behavior: auto;
    }

    .hero__photo,
    .result__bg,
    .contacts__bg {
        transform: none !important;
        will-change: auto;
    }

    .header__menu-item::before {
        transition: none;
    }
    .header {
        transition: none;
    }
    .footer,
    .footer__cta,
    .footer__top,
    .directions__img {
        transition: none;
    }
}

/* ============================================================
   11. Reveal-анимации появления блоков
   ============================================================ */

/* Базовое скрытое состояние.
   Класс .reveal-init вешается через JS, а не в HTML,
   чтобы при выключенном JS контент был виден. */
.reveal-init {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Когда элемент должен показаться */
.reveal-init.reveal-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Убираем will-change после анимации — экономим GPU */
.reveal-init.reveal-done {
    will-change: auto;
}

/* Уважение к reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-init {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
