/* ============================================================
   ФэтСит — стили сайта строительной организации
   Идея: инженерный чертёж. Графит и бетон, оранжевый — только
   как сигнальная метка (цвет из логотипа).
   Шрифты: Inter Tight (заголовки и текст), IBM Plex Mono (пометки).
   Движение: GSAP + ScrollTrigger + Lenis (assets/vendor), см. main.js.
   ============================================================ */


/* ============================================================
   1. ШРИФТЫ
   ============================================================ */

@font-face {
    font-family: "Inter Tight";
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-tight-cyrillic-wght-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Inter Tight";
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-cyrillic-500-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ============================================================
   2. ПЕРЕМЕННЫЕ
   ============================================================ */

:root {
    --graphite: #111214;
    --graphite-2: #1a1b1e;
    --graphite-3: #26272b;
    --concrete: #e8e7e3;
    --paper: #f4f4f2;
    --steel: #8b8e94;
    --steel-dark: #5d6067;
    --orange: #f08a24;
    --orange-deep: #d9741a;

    --line-dark: rgba(255, 255, 255, .12);
    --line-light: rgba(17, 18, 20, .14);

    --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

    --radius: 6px;
    --container: 1320px;
    --gutter: clamp(18px, 4vw, 56px);
    --header-h: 84px;

    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-in-out: cubic-bezier(.76, 0, .24, 1);
}


/* ============================================================
   3. БАЗА
   ============================================================ */

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

html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

html:not(.lenis) {
    scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    min-height: 100vh;
    overflow-x: clip;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--paper);
    background: var(--graphite);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01", "cv11";
}

img,
svg,
iframe {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.flip {
    transform: scaleX(-1);
}

:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
}

::selection {
    color: var(--graphite);
    background: var(--orange);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.mono {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: .02em;
}

/* якорь со старым адресом — чтобы ссылки вида #rec... продолжали работать */
.anchor {
    position: absolute;
    top: 0;
}


/* ============================================================
   4. ЗАГРУЗОЧНЫЙ ЭКРАН
   ============================================================ */

.loader {
    display: none;
}

html.js .loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: var(--gutter);
    background: var(--concrete);
    color: var(--graphite);
}

/* чертёжная сетка на фоне */
html.js .loader::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: .45;
}

html.fx-fail .loader,
html.loaded .loader {
    display: none;
}

.loader__inner {
    position: relative;
    width: min(460px, 100%);
}

.loader__logo {
    width: 100%;
    height: auto;
}

.loader__drill {
    width: 100%;
    height: 90px;
    margin-top: 6px;
    overflow: visible;
}

.loader__ground {
    stroke: var(--graphite);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.loader__path {
    fill: none;
    stroke: var(--orange);
    stroke-width: 2.5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.loader__head {
    fill: var(--graphite);
}

.loader__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--steel-dark);
}

.loader__count {
    font-size: 13px;
    color: var(--graphite);
}

.loader__count b {
    display: inline-block;
    min-width: 3ch;
    font-weight: 500;
    text-align: right;
    font-variant-numeric: tabular-nums;
}


/* ============================================================
   5. ПОЛОСА ПРОКРУТКИ ВВЕРХУ И ШАПКА
   ============================================================ */

.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    height: 2px;
    pointer-events: none;
}

.progress span {
    display: block;
    height: 100%;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: left;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform .7s var(--ease), background .5s, border-color .5s;
    border-bottom: 1px solid transparent;
}

.header.is-solid {
    background: rgba(17, 18, 20, .82);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom-color: var(--line-dark);
}



.header__inner {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: var(--container);
    height: var(--header-h);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* логотип без подложки: светлая версия (assets/img/logo-light.png) для тёмного фона */
.header__logo {
    display: flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
    transition: transform .6s var(--ease);
}

.header__logo:hover {
    transform: scale(1.04) rotate(-1.5deg);
}

.header__logo img {
    width: 112px;
    height: auto;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45));
}

.nav {
    display: flex;
    gap: 30px;
    margin: 0 auto;
}

.nav a,
.footer__nav a {
    position: relative;
    padding: 6px 0;
    font-size: 15px;
    font-weight: 500;
    color: rgba(244, 244, 242, .78);
    transition: color .3s;
}

/* подчёркивание выезжает слева */
.nav a::after,
.footer__nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .5s var(--ease);
}

.nav a:hover,
.nav a.is-active,
.footer__nav a:hover {
    color: var(--paper);
}

.nav a:hover::after,
.nav a.is-active::after,
.footer__nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.header__contacts {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header__phone {
    margin-right: 8px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transition: color .3s;
}

.header__phone:hover {
    color: var(--orange);
}

.icon-link {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line-dark);
    transition: background .3s, border-color .3s, color .3s;
}

.icon-link:hover {
    color: var(--graphite);
    background: var(--orange);
    border-color: var(--orange);
}

.icon-link svg {
    width: 18px;
    height: 18px;
}

.icon-link--dark {
    border-color: var(--line-light);
}

.burger {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    margin-left: auto;
}

.burger span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 1.5px;
    background: var(--paper);
    transition: transform .5s var(--ease), top .5s var(--ease);
}

.burger span:first-child { top: 17px; }
.burger span:last-child  { top: 26px; }

.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(var(--header-h) + 30px) var(--gutter) 40px;
    background: var(--graphite);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .8s var(--ease-in-out), visibility 0s linear .8s;
}

.mobile-menu.is-open {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path .8s var(--ease-in-out), visibility 0s;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
}

.mobile-menu nav a {
    padding: 12px 0;
    font-size: clamp(30px, 9vw, 44px);
    font-weight: 600;
    letter-spacing: -.03em;
    border-bottom: 1px solid var(--line-dark);
}

.mobile-menu__contacts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 20px;
    font-weight: 600;
}

.mobile-menu__contacts div {
    display: flex;
    gap: 10px;
}


/* ============================================================
   6. КНОПКИ
   ============================================================ */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    padding: 16px 28px;
    overflow: hidden;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    isolation: isolate;
    transition: color .45s var(--ease), border-color .45s;
}

/* заливка поднимается снизу при наведении */
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: translateY(101%);
    transition: transform .55s var(--ease);
}

.btn:hover::before {
    transform: translateY(0);
}

.btn svg {
    transition: transform .45s var(--ease);
}

.btn:hover svg {
    transform: translateX(4px);
}

.btn--accent {
    color: var(--graphite);
    background: var(--orange);
}

.btn--accent::before {
    background: var(--paper);
}

.btn--ghost {
    color: var(--paper);
    border: 1px solid rgba(244, 244, 242, .4);
}

.btn--ghost::before {
    background: var(--paper);
}

.btn--ghost:hover {
    color: var(--graphite);
    border-color: var(--paper);
}

.btn--xl {
    min-height: 72px;
    padding: 22px 40px;
    font-size: clamp(18px, 2vw, 22px);
}

.round-btn {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--line-light);
    color: var(--graphite);
    transition: background .3s, color .3s, border-color .3s, opacity .3s;
}

.round-btn:hover {
    color: var(--paper);
    background: var(--graphite);
    border-color: var(--graphite);
}

.round-btn:disabled {
    opacity: .3;
    pointer-events: none;
}


/* ============================================================
   7. ЗАГОЛОВКИ СЕКЦИЙ
   ============================================================ */

.head {
    margin-bottom: clamp(40px, 6vw, 80px);
}

.head--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.head__title {
    font-size: clamp(36px, 6.2vw, 92px);
    font-weight: 600;
    line-height: .98;
    letter-spacing: -.045em;
}

/* оранжевая размерная линия под заголовком */
.head__rule {
    display: block;
    width: 72px;
    height: 2px;
    margin-top: 22px;
    background: var(--orange);
    transform-origin: left;
}

.head__sub {
    max-width: 30ch;
    margin-top: 18px;
    font-size: clamp(18px, 2vw, 24px);
    color: var(--steel);
}

.split .line-mask {
    padding-bottom: .1em;
    margin-bottom: -.1em;
}


/* ============================================================
   8. ПЕРВЫЙ ЭКРАН
   ============================================================ */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100svh;
    padding: calc(var(--header-h) + 40px) 0 30px;
    overflow: hidden;
    isolation: isolate;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: 50% 60%;
}

.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(17, 18, 20, .65) 0%, rgba(17, 18, 20, .15) 35%, rgba(17, 18, 20, .55) 70%, var(--graphite) 100%),
        linear-gradient(90deg, rgba(17, 18, 20, .55), transparent 65%);
}

/* тонкая чертёжная сетка поверх фото */
.hero__grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: calc(100% / 6) 100%;
}

.hero__title {
    display: flex;
    flex-direction: column;
    font-size: clamp(44px, 8.6vw, 140px);
    font-weight: 600;
    line-height: .94;
    letter-spacing: -.055em;
}

.hero__line {
    display: block;
}

.hero__line:nth-child(2) {
    padding-left: clamp(0px, 8vw, 140px);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: clamp(30px, 4vw, 52px);
}

.hero__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: clamp(40px, 7vh, 90px);
    color: rgba(244, 244, 242, .6);
}

.hero__scroll {
    position: relative;
    width: 1px;
    height: 56px;
    overflow: hidden;
    background: rgba(244, 244, 242, .2);
}

.hero__scroll i {
    position: absolute;
    inset: 0;
    background: var(--orange);
    animation: scrollHint 2.2s var(--ease-in-out) infinite;
}

@keyframes scrollHint {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}


/* ============================================================
   9. УСЛУГИ — карточки наслаиваются при прокрутке
   ============================================================ */

.services {
    position: relative;
    padding: clamp(110px, 14vw, 200px) 0 clamp(60px, 8vw, 120px);
    background: var(--graphite);
}

.stack {
    display: grid;
    gap: 24px;
}

.stack__item {
    position: sticky;
    top: calc(var(--header-h) + 20px + var(--i, 0) * 14px);
}

.service {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: clamp(24px, 5vw, 80px);
    min-height: clamp(300px, 46vh, 440px);
    padding: clamp(28px, 4.5vw, 64px);
    border-radius: var(--radius);
    border: 1px solid var(--line-dark);
    background: linear-gradient(160deg, var(--graphite-3), var(--graphite-2) 60%);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .35);
    transform-origin: 50% 0;
    --dim: 0;
}

/* затемнение, когда сверху наезжает следующая карточка */
.service::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: var(--graphite);
    opacity: var(--dim);
}

.service {
    position: relative;
}

.service__title {
    font-size: clamp(28px, 3.6vw, 52px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -.04em;
}

.service__descr {
    max-width: 46ch;
    margin-top: 20px;
    font-size: clamp(16px, 1.3vw, 18px);
    color: rgba(244, 244, 242, .7);
}

.service__icon {
    justify-self: end;
    width: min(100%, 340px);
    height: auto;
    overflow: visible;
}

.service__icon * {
    fill: none;
    stroke: var(--paper);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.service__icon .dim {
    stroke: var(--orange);
    stroke-dasharray: 3 4;
}

.service__icon circle {
    fill: var(--orange);
    stroke: var(--orange);
}


/* ============================================================
   10. СВЕТЛЫЕ СЕКЦИИ (бетон)
   ============================================================ */

.light {
    position: relative;
    padding: clamp(100px, 13vw, 190px) 0;
    color: var(--graphite);
    background: var(--concrete);
}

.light + .light {
    padding-top: 0;
}

.dark {
    position: relative;
    padding: clamp(100px, 13vw, 190px) 0;
    background: var(--graphite);
}


/* ---------- контакты ---------- */

.contacts {
    padding-top: clamp(100px, 13vw, 190px);
}

.contacts__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 100px);
    align-items: start;
}

.contacts__company {
    font-size: 18px;
}

.depts {
    margin-top: 36px;
    border-top: 1px solid var(--line-light);
}

.depts__row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "name phone" "mail mail";
    gap: 4px 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line-light);
    transition: padding .5s var(--ease);
}

.depts__row:hover {
    padding-left: 12px;
}

.depts__name {
    grid-area: name;
    font-weight: 600;
}

.depts__mail {
    grid-area: mail;
    font-size: 15px;
    color: var(--steel-dark);
}

.depts__mail a,
.depts__phone {
    color: var(--graphite);
    background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 1px no-repeat;
    transition: background-size .5s var(--ease), color .3s;
}

.depts__mail a:hover,
.depts__phone:hover {
    background-size: 100% 1px;
}

.depts__phone {
    grid-area: phone;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.contacts__social {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}

.contacts__social .icon-link:hover {
    color: var(--paper);
    background: var(--graphite);
    border-color: var(--graphite);
}

.map {
    position: relative;
    min-height: 560px;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: #d4d3cf;
}

.map iframe {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
}

/* карта в монохроме: слой забирает у карты цвет, клики проходят сквозь */
.map::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: #808080;
    mix-blend-mode: saturation;
}

.map__link {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    text-decoration: underline;
}


/* ---------- о компании ---------- */

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 100px);
    align-items: start;
}

.about__text {
    position: sticky;
    top: calc(var(--header-h) + 40px);
}

.about__lead {
    font-size: clamp(19px, 1.7vw, 24px);
    line-height: 1.45;
    letter-spacing: -.01em;
}

.about__body {
    margin-top: 22px;
    color: var(--steel-dark);
}

.about__photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.about__photo {
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 3 / 4;
}

.about__photo:nth-child(even) {
    margin-top: 80px;
}

.about__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ---------- документы ---------- */

.docs__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    cursor: grab;
}

.docs__viewport::-webkit-scrollbar {
    display: none;
}

.docs__viewport.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.docs__track {
    --side: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
    display: flex;
    gap: 24px;
    width: max-content;
    padding: 10px var(--side) 30px;
}

.docs__item {
    width: clamp(220px, 24vw, 320px);
    scroll-snap-align: start;
}

.doc {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 20px 40px -20px rgba(17, 18, 20, .35);
    cursor: zoom-in;
    transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}

.doc:hover {
    transform: translateY(-8px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 34px 60px -24px rgba(17, 18, 20, .45);
}

.docs__viewport.is-dragging .doc {
    pointer-events: none;
}

.doc img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1.41;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.slider-nav {
    display: flex;
    gap: 10px;
}


/* ---------- галерея ---------- */

/* ровная сетка одинаковых кадров — строже, чем «столбики» разной высоты */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.shot {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: zoom-in;
    background: #d4d3cf;
}

.shot {
    aspect-ratio: 4 / 3;
}

.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.shot:hover img {
    transform: scale(1.05);
}


/* один блок: слева 6 лучших фото и кнопка, справа видео той же высоты */
.media-block {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: clamp(16px, 2vw, 28px);
    align-items: stretch;
}

.gallery__grid--preview {
    gap: 12px;
}

.gallery__more {
    display: flex;
    margin-top: 20px;
}

[data-gallery].is-open .gallery__more {
    display: none;
}

/* остальные 32 фото: появляются ниже блока после нажатия на кнопку */
.gallery__grid--rest {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}

[data-gallery].is-open .gallery__grid--rest {
    display: grid;
}

.media-block__video {
    display: flex;
}

.btn--dark {
    color: var(--paper);
    background: var(--graphite);
}

.btn--dark::before {
    background: var(--orange);
}

.btn--dark:hover {
    color: var(--graphite);
}


/* ---------- видео ---------- */

.video__frame {
    position: relative;
    flex: 1;
    min-height: 260px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--graphite);
}

.video__poster,
.video__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* у превью YouTube вшиты чёрные полосы сверху и снизу — увеличиваем, чтобы их срезать */
.video__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .8;
    transform: scale(1.34);
    transition: opacity .6s, transform 1.2s var(--ease);
}

.video__poster:hover img {
    opacity: .95;
    transform: scale(1.4);
}

.video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: clamp(76px, 9vw, 120px);
    height: clamp(76px, 9vw, 120px);
    border-radius: 50%;
    color: var(--graphite);
    background: var(--orange);
    transform: translate(-50%, -50%);
    transition: transform .6s var(--ease);
}

.video__poster:hover .video__play {
    transform: translate(-50%, -50%) scale(1.08);
}

.video__play svg {
    width: 34%;
    height: 34%;
    margin-left: 6%;
}


/* ---------- преимущества ---------- */

.why__head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 30px;
}

.why__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--line-dark);
}

.why__item {
    position: relative;
    padding: clamp(28px, 4vw, 56px) clamp(0px, 3vw, 48px) clamp(28px, 4vw, 56px) 0;
    border-bottom: 1px solid var(--line-dark);
}

.why__item:nth-child(odd) {
    border-right: 1px solid var(--line-dark);
}

.why__item:nth-child(even) {
    padding-left: clamp(20px, 3vw, 48px);
    padding-right: 0;
}

.why__check {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 50%;
    color: var(--graphite);
    background: var(--orange);
}

.why__item h3 {
    margin-top: 26px;
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 600;
    letter-spacing: -.03em;
}

.why__item p {
    max-width: 48ch;
    margin-top: 14px;
    color: rgba(244, 244, 242, .66);
}


/* ---------- партнёры ---------- */
/* белый блок, как на прежнем сайте; логотипы в своих цветах */

.partners {
    position: relative;
    padding: clamp(90px, 11vw, 160px) 0;
    color: var(--graphite);
    background: #ffffff;
}

.partners__title {
    margin-bottom: clamp(40px, 5vw, 70px);
    font-size: clamp(22px, 2.6vw, 34px);
    font-weight: 600;
    letter-spacing: -.03em;
    text-align: center;
}

/* все 7 логотипов одним рядом; на узких экранах — ровно 4 + 3 по центру */
.partners__grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 3vw, 48px);
    max-width: 1240px;
    margin: 0 auto;
}

.partners__logo {
    display: flex;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    transition: transform .6s var(--ease);
}

.partners__logo:hover {
    transform: translateY(-6px) scale(1.06);
}

.partners__logo img {
    width: auto;
    max-width: 100%;
    height: clamp(64px, 7vw, 110px);
    object-fit: contain;
}

@media (max-width: 980px) {
    .partners__grid {
        flex-wrap: wrap;
        row-gap: 34px;
    }

    .partners__logo {
        flex: 0 0 calc(25% - 3 * clamp(20px, 3vw, 48px) / 4);
    }
}

/* ---------- заявка ---------- */

.request {
    padding-bottom: clamp(80px, 10vw, 140px);
    overflow: hidden;
}

.request__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.request__title {
    font-size: clamp(54px, 13vw, 210px);
    font-weight: 600;
    line-height: .9;
    letter-spacing: -.06em;
    white-space: nowrap;
}

.request__sub {
    margin: 24px 0 44px;
    font-size: clamp(20px, 2.2vw, 28px);
    color: var(--steel);
}

.request__note {
    margin-top: 28px;
    font-size: 14px;
    color: var(--steel);
}

.request__note a {
    color: var(--paper);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* ---------- подвал ---------- */

.footer {
    padding: 70px 0 50px;
    border-top: 1px solid var(--line-dark);
}

.footer__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: clamp(30px, 5vw, 80px);
    align-items: start;
}

.footer__logo {
    display: block;
    transition: transform .6s var(--ease);
}

.footer__logo:hover {
    transform: scale(1.04) rotate(-1.5deg);
}

.footer__logo img {
    width: 170px;
    height: auto;
}

.footer__req {
    font-size: 14px;
    line-height: 1.7;
    color: #8f9196;
}

.footer__req strong {
    color: var(--paper);
    font-weight: 600;
}

.footer__nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}


/* ---------- внутренние страницы: вакансии, политика ---------- */

.page {
    min-height: 70vh;
    padding: calc(var(--header-h) + clamp(70px, 10vw, 140px)) 0 clamp(90px, 12vw, 170px);
    color: var(--graphite);
    background: var(--concrete);
}

.page__head {
    margin-bottom: clamp(44px, 6vw, 80px);
}

.page__title {
    font-size: clamp(38px, 6.4vw, 96px);
    font-weight: 600;
    line-height: .98;
    letter-spacing: -.045em;
}

.page__lead {
    margin-top: 24px;
    font-size: clamp(18px, 1.8vw, 22px);
    color: var(--steel-dark);
}

.page__lead a {
    font-weight: 600;
    color: var(--graphite);
    background: linear-gradient(var(--orange), var(--orange)) 0 100% / 100% 2px no-repeat;
}

.page__back {
    margin-top: clamp(44px, 6vw, 70px);
}

.vacancies {
    border-top: 1px solid var(--line-light);
}

.vacancy {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 40px;
    padding: clamp(26px, 3.5vw, 44px) 0;
    border-bottom: 1px solid var(--line-light);
    transition: padding .6s var(--ease);
}

.vacancy:hover {
    padding-left: 16px;
}

.vacancy__title {
    font-size: clamp(24px, 2.8vw, 38px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.035em;
}

.vacancy__company {
    margin-top: 6px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--steel-dark);
}

.vacancy__salary {
    align-self: start;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-weight: 600;
    white-space: nowrap;
    color: var(--graphite);
    background: var(--orange);
}

.vacancy__descr {
    grid-column: 1 / -1;
    max-width: 70ch;
    color: var(--steel-dark);
}

.doc-text {
    max-width: 78ch;
    font-size: 17px;
    line-height: 1.7;
    color: #2c2e33;
}

.doc-text .doc__sub {
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--graphite);
}

.doc-text h2 {
    margin: 40px 0 12px;
    font-size: clamp(19px, 1.7vw, 23px);
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--graphite);
}

.doc-text p + p {
    margin-top: 10px;
}

.doc-text ul {
    margin: 12px 0;
}

.doc-text li {
    position: relative;
    padding-left: 22px;
}

.doc-text li + li {
    margin-top: 6px;
}

.doc-text li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .78em;
    width: 10px;
    height: 2px;
    background: var(--orange);
}

@media (max-width: 680px) {
    .vacancy { grid-template-columns: 1fr; }
    .vacancy__salary { justify-self: start; }
}


/* ============================================================
   11. ПРОСМОТР ФОТО И ДОКУМЕНТОВ
   ============================================================ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .6s;
}

.lightbox.is-open {
    visibility: visible;
    pointer-events: auto;
    transition: visibility 0s;
}

.lightbox__bg {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, .94);
    opacity: 0;
    transition: opacity .6s var(--ease);
}

.lightbox.is-open .lightbox__bg {
    opacity: 1;
}

.lightbox__figure {
    position: relative;
    clip-path: inset(100% 0 0 0);
    transition: clip-path .8s var(--ease-in-out);
}

.lightbox.is-open .lightbox__figure {
    clip-path: inset(0 0 0 0);
}

.lightbox__img {
    max-width: min(88vw, 1300px);
    max-height: 82vh;
    width: auto;
    height: auto;
    border-radius: var(--radius);
}

.lightbox__count {
    margin-top: 12px;
    color: var(--steel);
    text-align: center;
}

.lightbox__btn,
.lightbox__close {
    position: absolute;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--line-dark);
    color: var(--paper);
    opacity: 0;
    transition: opacity .4s .2s, background .3s, color .3s;
}

.lightbox.is-open .lightbox__btn,
.lightbox.is-open .lightbox__close {
    opacity: 1;
}

.lightbox__btn:hover,
.lightbox__close:hover {
    color: var(--graphite);
    background: var(--orange);
    border-color: var(--orange);
}

.lightbox__btn--prev { left: 3vw; top: 50%; margin-top: -28px; }
.lightbox__btn--next { right: 3vw; top: 50%; margin-top: -28px; }
.lightbox__close     { top: 3vh; right: 3vw; }


/* ============================================================
   12. АДАПТИВ
   ============================================================ */

@media (max-width: 1180px) {
    .nav { gap: 20px; }
    .header__phone { display: none; }
}

@media (max-width: 980px) {
    :root { --header-h: 70px; }

    .nav,
    .header__contacts { display: none; }
    .burger { display: block; }
    .header__logo img { width: 96px; }

    .service { grid-template-columns: 1fr; }
    .service__icon { justify-self: start; width: 220px; }

    .contacts__grid,
    .about__grid,
    .why__head { grid-template-columns: 1fr; }

    .about__text { position: static; }
    .media-block { grid-template-columns: 1fr; }
    .video__frame { aspect-ratio: 16 / 9; min-height: 0; }
    .gallery__grid--rest { grid-template-columns: repeat(3, 1fr); }
    .map { min-height: 400px; }

    .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    body { font-size: 16px; }

    .hero__line:nth-child(2) { padding-left: 0; }
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { width: 100%; }

    .stack__item { top: calc(var(--header-h) + 12px + var(--i, 0) * 8px); }
    .service { min-height: 0; }

    .about__photo:nth-child(even) { margin-top: 40px; }
    .about__photos { gap: 10px; }

    .why__list { grid-template-columns: 1fr; }
    .why__item:nth-child(odd) { border-right: 0; }
    .why__item:nth-child(even) { padding-left: 0; }

    .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gallery__grid--rest { grid-template-columns: repeat(2, 1fr); }
    .gallery__more .btn { width: 100%; }

    .request__title { white-space: normal; }
    .btn--xl { width: 100%; }

    .head--row .slider-nav { display: none; }

    .lightbox__btn { display: none; }
}


/* ============================================================
   13. УМЕНЬШЕННАЯ АНИМАЦИЯ
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    html:not(.lenis) { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* ============================================================
   14. ВНУТРЕННИЕ СТРАНИЦЫ: шапка сразу тёмная (фон страницы светлый)
   ============================================================ */

body.inner .header {
    background: rgba(17, 18, 20, .92);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom-color: var(--line-dark);
}
