/* ═══════════════════════════════════════════════════════════════════════
   AVIRON GROUP — стили сайта
   Порядок: шрифт · переменные · база · шапка · экраны · подвал ·
            окно проекта · адаптив · анимации
   ═══════════════════════════════════════════════════════════════════════ */

/* ══ ШРИФТ ═════════════════════════════════════════════════════════════
   Inter (переменный, 100–900), три подмножества. Браузер сам скачивает
   только те файлы, чьи буквы реально встретились на странице:
     latin    — нужен всегда
     cyrillic — русская версия
     kazakh   — только Ә Ғ Қ Ң Ө Ү Һ и строчные к ним. Без этого файла
                они выпадали в системный шрифт прямо посреди слова.
                Подмножество урезано с 26 КБ до 4 КБ: буква Қ есть в
                надписи переключателя языка, поэтому файл иначе
                скачивался бы и на русской, и на английской версии.
   ═════════════════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'Inter Var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.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: 'Inter Var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter Var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-kazakh.woff2') format('woff2');
  unicode-range: U+0492-0493, U+049A-049B, U+04A2-04A3, U+04AE-04AF, U+04BA-04BB, U+04D8-04D9, U+04E8-04E9;
}

/* ══ ПЕРЕМЕННЫЕ ════════════════════════════════════════════════════════ */
:root {
  /* палитра: ровно два тона, строго по очереди */
  --tone-dark:  #14324a;
  --tone-light: #f2f0ea;

  --fade: 260px;              /* длина перетекания между блоками */

  --ink: #0b1c28;
  --paper: #f2f0ea;
  --text: #17222a;
  --muted: #5c6970;           /* 4.9:1 на светлом — проходит WCAG AA */
  --line: rgba(7, 20, 29, .14);
  --line-light: rgba(255, 255, 255, .16);
  --blue: #71c5f2;            /* акцент на тёмном фоне */
  --blue-deep: #0f6f9e;       /* акцент на светлом: 4.6:1, проходит AA */

  --max: 1380px;
  --header: 78px;
  --radius: 28px;
  --shadow: 0 30px 80px rgba(4, 18, 28, .18);

  /* ── Перетекание блоков ──────────────────────────────────────────────
     Тридцать четыре стопа, посчитанных в Oklab: прямая между тёмно-синим
     и светлым в sRGB проходит вплотную к серому, и середина градиента
     выглядела грязью. Позиции взяты по кривой smootherstep — производная
     на концах нулевая, поэтому по три одинаковых стопа с каждой стороны:
     градиент выходит на сплошной цвет плавно и стыка не видно.
     Поверх — зерно на всю высоту блока, а не только на длину градиента:
     обрыв текстуры на границе сам по себе читался как ровная линия.
     ─────────────────────────────────────────────────────────────────── */
  --grad-to-light: linear-gradient(180deg, #14324a 0%, #14324a 3%, #14324a 6.1%, #15334b 9.1%, #17344c 12.1%, #1a374e 15.2%, #1d3a51 18.2%, #223d54 21.2%, #284258 24.2%, #2e485d 27.3%, #364f63 30.3%, #3f566a 33.3%, #495f71 36.4%, #536879 39.4%, #5e7181 42.4%, #6a7c8a 45.5%, #778693 48.5%, #83919c 51.5%, #909ca5 54.5%, #9ca7ae 57.6%, #a9b1b7 60.6%, #b4bbbf 63.6%, #bfc5c7 66.7%, #c9cdce 69.7%, #d3d5d4 72.7%, #dbdcda 75.8%, #e1e2de 78.8%, #e7e7e2 81.8%, #ebeae5 84.8%, #eeede7 87.9%, #f0efe9 90.9%, #f2f0ea 93.9%, #f2f0ea 97%, #f2f0ea 100%);
  --grad-to-dark:  linear-gradient(180deg, #f2f0ea 0%, #f2f0ea 3%, #f2f0ea 6.1%, #f0efe9 9.1%, #eeede7 12.1%, #ebeae5 15.2%, #e7e7e2 18.2%, #e1e2de 21.2%, #dbdcda 24.2%, #d3d5d4 27.3%, #c9cdce 30.3%, #bfc5c7 33.3%, #b4bbbf 36.4%, #a9b1b7 39.4%, #9ca7ae 42.4%, #909ca5 45.5%, #83919c 48.5%, #778693 51.5%, #6a7c8a 54.5%, #5e7181 57.6%, #536879 60.6%, #495f71 63.6%, #3f566a 66.7%, #364f63 69.7%, #2e485d 72.7%, #284258 75.8%, #223d54 78.8%, #1d3a51 81.8%, #1a374e 84.8%, #17344c 87.9%, #15334b 90.9%, #14324a 93.9%, #14324a 97%, #14324a 100%);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");

  /* ── Стекло ──────────────────────────────────────────────────────────
     Компания строит стеклянные фасады, поэтому стекло здесь — материал
     из её собственного мира, а не украшение. Отсюда и отличия от
     нейтрально-белого «системного» стекла:

     · оттенок холодный, синеватый — как у витражного остекления;
     · сверху светлая кромка, снизу тёмная: настоящая панель отражает
       сверху небо, снизу землю, и именно это читается как стекло,
       а не как полупрозрачный прямоугольник;
     · насыщенность поднята — стекло усиливает цвет за собой, а не
       только размывает его.
     ─────────────────────────────────────────────────────────────────── */
  --glass-blur: 20px;
  --glass-sat: 175%;

  /* на тёмных блоках */
  --glass-fill: linear-gradient(158deg, rgba(129, 194, 236, .17), rgba(9, 27, 41, .34) 68%);
  --glass-line: rgba(255, 255, 255, .16);
  --glass-relief:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 -1px 0 rgba(5, 18, 28, .40),
    inset 1px 0 0 rgba(255, 255, 255, .07),
    inset -1px 0 0 rgba(255, 255, 255, .07);
  --glass-cast: 0 22px 52px rgba(3, 14, 22, .34);

  /* на светлых блоках */
  --glass-fill-light: linear-gradient(158deg, rgba(255, 255, 255, .72), rgba(214, 226, 234, .46) 70%);
  --glass-line-light: rgba(255, 255, 255, .75);
  --glass-relief-light:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 0 rgba(20, 50, 74, .12);
  --glass-cast-light: 0 20px 46px rgba(20, 50, 74, .14);
}

/* ── Скругления без ступенек ──────────────────────────────────────────
   Обычный border-radius — дуга окружности: она стыкуется с прямой
   стороной с изломом кривизны, и на больших радиусах глаз ловит его как
   «пиксельный полукруг». corner-shape: squircle даёт непрерывную
   кривизну — угол втекает в сторону без стыка. Где свойство не
   поддерживается, остаётся обычное скругление.

   ВАЖНО: форма угла должна совпадать у обрезающего блока и у всего, что
   он обрезает. Squircle в углу «полнее» дуги окружности, поэтому если
   карточка обрезана по squircle, а картинка внутри скруглена дугой,
   в углу остаётся зазор и наружу лезет фон карточки. Именно так на
   плитках проектов вылезал синий уголок.                             */
@supports (corner-shape: squircle) {
  .project-card, .project-bg, .project-bg img, .project-bg::after,
  .update-card, .update-visual,
  .partnership-card, .map-frame, .modal-panel, .site-header,
  .form-grid input, .form-grid select, .form-grid textarea {
    corner-shape: squircle;
  }
}

/* ══ БАЗА ══════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter Var', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-feature-settings: 'cv05' 1, 'cv11' 1;   /* одноэтажная a, одинарная l */
  color: var(--text);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
body.menu-open, body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }

.container { width: min(calc(100% - 56px), var(--max)); margin: 0 auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; overflow: hidden; white-space: nowrap;
  clip-path: inset(50%);
}

/* фокус с клавиатуры: заметен и на синем подвале, и на светлых блоках */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.portfolio :focus-visible, .company :focus-visible { outline-color: var(--blue-deep); }
.partnership :focus-visible, .modal :focus-visible { outline-color: var(--blue); }

.skip-link {
  position: fixed; z-index: 600; top: 10px; left: 10px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  transform: translateY(-200%); transition: transform .2s;
}
.skip-link:focus-visible { transform: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 34px; height: 1px; background: currentColor; opacity: .65; }

/* ── Секции и перетекание ─────────────────────────────────────────────
   Контент начинается сразу за градиентом, а не внутри него: иначе
   логотип и карта попадали на середину перехода и это читалось как
   ступенька. Отрицательный scroll-margin компенсирует верхний отступ,
   поэтому клик по пункту меню приводит к заголовку, а не к пустоте. */
.section {
  position: relative;
  padding: calc(var(--fade) + 22px) 0 104px;
  /* шапка висит островком с отступом 12px сверху — он входит в поправку */
  scroll-margin-top: calc(var(--header) + 30px - (var(--fade) + 22px));
}
.section::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0;
  height: var(--fade); pointer-events: none;
}
/* зерно на всю секцию: оно дизерит 8-битные ступени градиента, а раньше
   обрывалось на его границе и давало ровную горизонтальную линию */
.section::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: .045; background-image: var(--grain);
}
.section > .container { position: relative; z-index: 1; }

.portfolio, .company, .partnership { background: var(--tone-light); }
.directions, .updates { background: var(--tone-dark); color: #fff; }
.portfolio::before, .company::before, .partnership::before { background: var(--grad-to-light); }
.directions::before, .updates::before { background: var(--grad-to-dark); }

.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 60px; align-items: end; margin-bottom: 60px;
}
.section-title {
  margin: 14px 0 0; font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.07; letter-spacing: -.025em; font-weight: 500;
}
.section-lead {
  margin: 0; color: var(--muted);
  font-size: clamp(17px, 1.7vw, 22px); line-height: 1.55;
}

/* ══ ШАПКА ═════════════════════════════════════════════════════════════ */
/* ── Шапка-островок ───────────────────────────────────────────────────
   Не полоса во всю ширину, а стеклянная плашка с отступами от краёв.
   В покое почти невидима — на первом экране за ней фотография; при
   прокрутке проявляется материал.                                  */
.site-header {
  position: fixed; z-index: 100; top: 12px; left: 0; right: 0;
  height: var(--header); color: #fff;
}
.header-inner {
  position: relative; height: 100%; margin: 0 auto;
  width: min(calc(100% - 56px), var(--max));
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 18px; border-radius: 22px;
  border: 1px solid transparent;
  transition: background .35s, border-color .35s, box-shadow .35s, backdrop-filter .35s;
}
.site-header.is-scrolled .header-inner {
  background: linear-gradient(158deg, rgba(129, 194, 236, .16), rgba(9, 27, 41, .42) 70%);
  -webkit-backdrop-filter: blur(22px) saturate(var(--glass-sat));
  backdrop-filter: blur(22px) saturate(var(--glass-sat));
  border-color: rgba(255, 255, 255, .18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 -1px 0 rgba(4, 14, 22, .35),
    0 16px 40px rgba(3, 14, 22, .3);
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .site-header.is-scrolled .header-inner { background: rgba(7, 20, 29, .93); }
}
@supports (corner-shape: squircle) { .header-inner { corner-shape: squircle; } }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 44px; width: auto; transition: height .35s ease; }
.site-header.is-scrolled .brand-logo { height: 38px; }

.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  position: relative; padding: 6px 0;
  font-size: 13px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  opacity: .78; transition: opacity .25s;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.22, .8, .2, 1);
}
.main-nav a:hover { opacity: 1; }
.main-nav a.is-current { opacity: 1; }
.main-nav a.is-current::after, .main-nav a:hover::after { transform: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-divider { width: 1px; height: 22px; background: rgba(255, 255, 255, .2); }

/* ── Соцсети в шапке: только значки, без подписей ────────────────────
   Достаточно тихие, чтобы не спорить с меню, но заметные — раньше
   значки жили только в самом низу подвала и их не находили.        */
.social-mini { display: flex; align-items: center; gap: 4px; }
.social-mini-dot {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: transparent; padding: 0;
  color: rgba(255, 255, 255, .72); cursor: pointer;
  transition: background .25s, color .25s, transform .25s, box-shadow .25s;
}
.social-mini-dot svg { width: 17px; height: 17px; }
.social-mini-dot[href]:hover, .social-mini-dot[aria-expanded]:hover,
.social-mini-dot[aria-expanded='true'] {
  background: var(--glass-fill); color: #fff; transform: translateY(-2px);
  -webkit-backdrop-filter: blur(12px) saturate(var(--glass-sat));
  backdrop-filter: blur(12px) saturate(var(--glass-sat));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34);
}
/* значок без адреса: тусклее и без курсора-руки, чтобы не обманывать */
.social-mini-dot.is-soon { opacity: .42; cursor: default; }

/* ── Переключатель языка ───────────────────────────────────────────── */
.lang-switch {
  display: inline-flex; align-items: center;
  border: 1px solid var(--glass-line); border-radius: 999px;
  padding: 3px; gap: 2px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(14px) saturate(var(--glass-sat));
  backdrop-filter: blur(14px) saturate(var(--glass-sat));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
}
.lang-switch button {
  min-height: 32px; padding: 0 11px; border: 0; border-radius: 999px;
  background: transparent; color: rgba(255, 255, 255, .66);
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  cursor: pointer; transition: background .25s, color .25s;
}
.lang-switch button:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.lang-switch button[aria-current='true'] { background: #fff; color: var(--ink); }

.ghost-btn, .solid-btn {
  border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: transform .25s, background .25s, color .25s, border-color .25s;
}
.ghost-btn {
  min-height: 44px; padding: 0 20px; border: 1px solid var(--glass-line);
  border-radius: 999px; color: #fff;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(14px) saturate(var(--glass-sat));
  backdrop-filter: blur(14px) saturate(var(--glass-sat));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.ghost-btn:hover {
  border-color: rgba(255, 255, 255, .42); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 8px 22px rgba(3, 14, 22, .3);
}
.solid-btn {
  min-height: 54px; padding: 0 28px; border-radius: 999px;
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14px;
}
.solid-btn:hover { transform: translateY(-2px); background: var(--blue); }

.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .36); background: transparent; color: #fff; cursor: pointer;
}
.menu-btn span { display: block; width: 17px; height: 1px; background: currentColor; margin: 4px auto; }

/* ── Мобильное меню ───────────────────────────────────────────────────
   В закрытом виде получает атрибут inert из скрипта: иначе ссылки
   остаются в порядке табуляции и фокус уезжает за экран.             */
.mobile-menu {
  position: fixed; inset: 0; z-index: 250; overflow-y: auto;
  background: var(--tone-dark); color: #fff;
  padding: 92px 28px 40px;
  display: flex; flex-direction: column;
  transform: translateY(-100%); transition: transform .4s cubic-bezier(.22, .8, .2, 1);
}
.mobile-menu.is-open { transform: none; }
.mobile-menu[inert] { visibility: hidden; }
.mobile-brand { display: block; margin-bottom: 22px; }
.mobile-brand .brand-logo { height: 40px; }
.mobile-nav a {
  display: block; padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-size: 25px; letter-spacing: -.012em;
}
.mobile-actions { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.mobile-actions .solid-btn { width: 100%; }
.mobile-extras { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mobile-close {
  position: absolute; right: 24px; top: 20px; width: 46px; height: 46px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%;
  background: transparent; color: #fff; font-size: 24px; cursor: pointer;
}

/* ══ ПЕРВЫЙ ЭКРАН ══════════════════════════════════════════════════════ */
.hero { min-height: 100svh; position: relative; color: #fff; overflow: hidden; background: var(--tone-dark); }
.hero-stack { position: absolute; inset: 0; overflow: hidden; }

.hero-layer { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 1.15s ease; }
.hero-layer.is-active { opacity: 1; }
.hero-layer img {
  width: 100%; height: 100%; object-fit: cover; object-position: center center;
  transform: scale(1.02); will-change: transform;
}
.hero-layer.is-zooming img { animation: heroZoom 7.5s ease-out forwards; }
@keyframes heroZoom { from { transform: scale(1.02); } to { transform: scale(1.11); } }
.hero-layer[data-project='glass'] img     { object-position: center 42%; }
.hero-layer[data-project='logistics'] img { object-position: center 58%; }

/* низ гаснет по той же кривой и в тот же тон, с которого начинается
   следующий блок — стыка фотографии с блоком не видно */
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 50, 74, .86) 0%, rgba(20, 50, 74, .52) 42%, rgba(20, 50, 74, .10) 74%, rgba(20, 50, 74, .32) 100%),
    linear-gradient(0deg, rgba(20, 50, 74, 1) 0%, rgba(20, 50, 74, .996) 4.5%, rgba(20, 50, 74, .971) 8.9%, rgba(20, 50, 74, .916) 13.4%, rgba(20, 50, 74, .827) 17.8%, rgba(20, 50, 74, .709) 22.3%, rgba(20, 50, 74, .572) 26.8%, rgba(20, 50, 74, .428) 31.2%, rgba(20, 50, 74, .291) 35.7%, rgba(20, 50, 74, .173) 40.2%, rgba(20, 50, 74, .084) 44.6%, rgba(20, 50, 74, .029) 49.1%, rgba(20, 50, 74, .004) 53.5%, rgba(20, 50, 74, 0) 58%);
}

.hero-grid {
  position: relative; z-index: 2; min-height: 100svh;
  padding: calc(var(--header) + 70px) 0 42px;
  display: grid; grid-template-rows: 1fr auto;
}
.hero-copy { align-self: center; max-width: 900px; padding-bottom: 40px; }
.hero .eyebrow { color: rgba(255, 255, 255, .72); }
.hero h1 {
  margin: 20px 0 24px; max-width: 940px;
  font-size: clamp(40px, 6.2vw, 88px); line-height: 1.06;
  letter-spacing: -.03em; font-weight: 500;
}
.hero h1 span { display: block; color: var(--blue); }

.hero-feature { max-width: 760px; transition: opacity .45s ease, transform .45s ease; }
.hero-feature.is-swapping { opacity: 0; transform: translateY(12px); }
.hero-feature-type {
  display: block; font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--blue);
}
.hero-feature-name {
  display: block; margin: 10px 0 12px;
  font-size: clamp(23px, 2.7vw, 35px); line-height: 1.15;
  letter-spacing: -.019em; font-weight: 500;
}
.hero-description {
  max-width: 720px; margin: 0;
  font-size: clamp(18px, 2vw, 25px); color: rgba(255, 255, 255, .82); line-height: 1.5;
}

.hero-projects { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, .22); }
.hero-project-tab {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 78px; padding: 16px 18px;
  border: 0; border-right: 1px solid rgba(255, 255, 255, .14);
  background: transparent; color: #fff; text-align: center; cursor: pointer;
  opacity: .55; transition: opacity .25s, background .25s;
}
.hero-project-tab:last-child { border-right: 0; }
.hero-project-tab:hover { background: rgba(255, 255, 255, .04); }
.hero-project-tab.is-active, .hero-project-tab:hover { opacity: 1; }
.hero-project-tab strong {
  display: block; font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.25; letter-spacing: .005em; font-weight: 500;
}
.tab-progress {
  position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: rgba(255, 255, 255, .16); overflow: hidden;
  opacity: 0; transition: opacity .25s;
}
.hero-project-tab.is-active .tab-progress { opacity: 1; }
.tab-progress i { display: block; height: 100%; width: 0; background: var(--blue); }
.hero-project-tab.is-active.is-playing .tab-progress i { animation: tabFill var(--slide-duration, 5s) linear forwards; }
.hero-project-tab.is-active:not(.is-playing) .tab-progress i { width: 100%; }
@keyframes tabFill { from { width: 0; } to { width: 100%; } }

/* ══ ЦИФРЫ ═════════════════════════════════════════════════════════════
   Тон тот же, что у первого экрана, — перетекание в портфель ниже
   остаётся непрерывным.                                              */
.stats { background: var(--tone-dark); color: #fff; padding: 58px 0 66px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 30px; }
.stat { display: flex; flex-direction: column; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line-light); }
.stat strong {
  font-size: clamp(34px, 3.6vw, 50px); line-height: 1;
  letter-spacing: -.03em; font-weight: 500; color: var(--blue);
}
.stat .stat-word { font-size: clamp(24px, 2.4vw, 33px); line-height: 1.1; }
.stat span { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .62); max-width: 250px; }

/* ══ ПОРТФЕЛЬ ══════════════════════════════════════════════════════════
   Пропорции плиток заданы через aspect-ratio и совпадают с кадрированием
   снимков, поэтому object-fit почти ничего не срезает. Пары в строке
   сходятся по высоте сами: 5 колонок при 0.73 и 7 колонок при 1.03 дают
   одинаковую высоту при любой ширине контейнера.                     */
.project-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }

/* Стекло здесь — кромка самой плитки, а не коробка поверх снимка:
   светлая линия сверху, тёмная снизу, мягкая тень наружу. Внутри —
   только фотография и текст на ней.

   overflow: clip вместо hidden — не создаёт контекст прокрутки.
   Радиус продублирован на кадре и изображении: при наведении фото
   увеличивается, браузер выносит его на отдельный слой, и на первых
   кадрах обрезка родителя отставала — в углах мелькал прямой край. */
.project-card {
  position: relative; overflow: clip; border-radius: var(--radius);
  color: #fff; background: #0d1f2b; cursor: pointer;
  grid-column: span 5; aspect-ratio: .73;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .30),
    inset 0 -1px 0 rgba(4, 14, 22, .38),
    0 18px 42px rgba(3, 14, 22, .26);
  transition: transform .35s, box-shadow .35s, border-color .35s;
}
.project-card:hover {
  transform: translateY(-5px); border-color: rgba(255, 255, 255, .3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .44),
    inset 0 -1px 0 rgba(4, 14, 22, .38),
    var(--shadow);
}
.project-card.is-lead { grid-column: span 7; aspect-ratio: 1.03; }
.project-card[data-project='evim'] { aspect-ratio: 1.38; }
.project-card[data-project='glass'] { aspect-ratio: .98; }
.project-card.is-pano { grid-column: span 7; aspect-ratio: 2.11; }
.project-card.is-placeholder { grid-column: span 5; aspect-ratio: 1.49; }

.project-bg { position: absolute; inset: 0; display: block; overflow: clip; border-radius: inherit; }
.project-bg img {
  width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
  /* слой создаётся сразу, а не в момент наведения: иначе первые кадры
     анимации рисуются до того, как обрезка успевает принять форму */
  transform: translateZ(0) scale(1); backface-visibility: hidden;
  transition: transform .8s ease;
}
.project-card:hover .project-bg img { transform: translateZ(0) scale(1.045); }
/* Всю читаемость подписи несёт это затемнение — плашки под текстом нет.
   Верх кадра не трогаем: там больше ничего не лежит, и снимок остаётся
   чистым.                                                          */
.project-bg::after {
  content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(3, 12, 18, 0) 30%,
    rgba(3, 12, 18, .38) 58%,
    rgba(3, 12, 18, .72) 80%,
    rgba(3, 12, 18, .88) 100%);
}

/* ── Подпись лежит на снимке ────────────────────────────────────────
   Коробки нет: читаемость держат затемнение кадра и тень у букв.
   Так и устроен материал у Apple — стекло это контейнер, а контент
   лежит на нём, а не в отдельной плашке поверх.                    */
.project-content {
  position: absolute; z-index: 2; inset: auto 0 0;
  padding: 26px 28px 27px;
}
.project-type {
  display: block; font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: rgba(255, 255, 255, .88); text-shadow: 0 1px 4px rgba(3, 12, 18, .8);
}
.project-content h3 {
  margin: 8px 0 0; font-size: clamp(23px, 2.2vw, 36px); line-height: 1.1;
  letter-spacing: -.021em; font-weight: 500;
  text-shadow: 0 2px 12px rgba(3, 12, 18, .7), 0 1px 3px rgba(3, 12, 18, .6);
}

/* Блик пробегает по всей плитке, как солнце по остеклению фасада.
   Это единственный «громкий» приём на сайте — больше нигде его нет. */
.project-card::after {
  content: ''; position: absolute; z-index: 3; top: -60%; bottom: -60%; left: -40%; width: 26%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .07) 42%, rgba(255, 255, 255, .16) 50%, rgba(255, 255, 255, .07) 58%, transparent);
  transform: translateX(-160%) rotate(9deg); pointer-events: none;
  transition: transform 1.15s cubic-bezier(.22, .8, .2, 1);
}
.project-card:hover::after { transform: translateX(620%) rotate(9deg); }

/* Название проекта и есть кнопка: круга со стрелкой больше нет, но с
   клавиатуры фокус попадает на видимый заголовок, а не в пустоту.
   Мышью при этом кликается вся плитка — обработчик висит на ней. */
.project-trigger {
  font: inherit; color: inherit; text-align: left;
  padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
}

/* Статус и пометка — просто текст, без плашек. Стоят внизу, рядом с
   названием: наверху снимка небо и снежные вершины, и белый текст там
   давал контраст 1,75:1 у Apple Residence — нечитаемо. Внизу работает
   затемнение кадра, там те же буквы дают 11:1.                    */
.project-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  margin-bottom: 12px;
}
.project-status, .render-note {
  padding: 0; background: none; border: 0;
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(3, 12, 18, .85), 0 0 14px rgba(3, 12, 18, .55);
}
.project-status { color: rgba(255, 255, 255, .94); }
.project-status.is-done { color: var(--blue); }
/* точка-разделитель появляется только когда рядом есть пометка */
.render-note { position: relative; color: rgba(255, 255, 255, .66); padding-left: 15px; }
.render-note::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 3px;
  border-radius: 50%; background: currentColor; transform: translateY(-50%); opacity: .7;
}

.placeholder-badge {
  position: absolute; z-index: 2; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
}

/* ── Заглушка шестого проекта ─────────────────────────────────────── */
.project-card.is-placeholder { background: #0d222f; box-shadow: none; cursor: default; }
.project-card.is-placeholder:hover { transform: none; box-shadow: none; }
.project-card.is-placeholder::after {
  content: ''; position: absolute; inset: 14px; pointer-events: none;
  border: 1px dashed rgba(255, 255, 255, .2); border-radius: calc(var(--radius) - 12px);
}
.placeholder-badge { top: 22px; left: 22px; padding: 8px 13px; border: 1px solid rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .62); }
.placeholder-glow {
  position: absolute; inset: 0; z-index: 1; opacity: .5;
  background: radial-gradient(circle at 78% 18%, rgba(113, 197, 242, .22), transparent 46%);
}
.placeholder-inner { position: relative; z-index: 2; height: 100%; padding: 34px; display: flex; flex-direction: column; justify-content: flex-end; }
.placeholder-inner h3 { margin: 0 0 10px; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.15; letter-spacing: -.018em; font-weight: 500; color: rgba(255, 255, 255, .9); }
.placeholder-inner p { margin: 0; max-width: 340px; font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .56); }

/* ══ НАПРАВЛЕНИЯ ═══════════════════════════════════════════════════════ */
.directions .section-lead { color: rgba(255, 255, 255, .66); }
.direction-list { border-top: 1px solid var(--line-light); }
.direction-item {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 88px minmax(220px, .9fr) 1.1fr;
  gap: 32px; align-items: center; min-height: 150px;
  border-bottom: 1px solid var(--line-light); color: inherit;
  transition: background .3s;
}
.direction-item:hover, .direction-item:focus-visible { background: rgba(255, 255, 255, .04); }
.direction-photo {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 42%;
  opacity: 0; transform: scale(1.07);
  transition: opacity .6s ease, transform .9s ease;
}
.direction-item:hover .direction-photo, .direction-item:focus-visible .direction-photo { opacity: .26; transform: scale(1); }
.direction-item > *:not(.direction-photo) { position: relative; z-index: 1; }
.direction-item::after {
  content: ''; position: absolute; z-index: 1; left: 0; bottom: -1px;
  height: 1px; width: 0; background: var(--blue);
  transition: width .5s cubic-bezier(.22, .8, .2, 1);
}
.direction-item:hover::after, .direction-item:focus-visible::after { width: 100%; }
.direction-number { color: var(--blue); font-size: 13px; letter-spacing: .12em; }
.direction-item h3 { margin: 0; min-width: 0; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.15; letter-spacing: -.017em; font-weight: 500; }
.direction-item p { margin: 0; max-width: 600px; color: rgba(255, 255, 255, .62); }

/* кадры для строк направлений: avif там, где браузер его понимает */
.direction-item[data-image='apple'] .direction-photo      { background-image: url('/assets/img/projects/apple-500.webp'); }
.direction-item[data-image='aviron-one'] .direction-photo { background-image: url('/assets/img/projects/aviron-one-500.webp'); }
.direction-item[data-image='glass'] .direction-photo      { background-image: url('/assets/img/projects/glass-500.webp'); }
.direction-item[data-image='logistics'] .direction-photo  { background-image: url('/assets/img/projects/logistics-500.webp'); }
@supports (background-image: image-set(url('x.avif') type('image/avif'))) {
  .direction-item[data-image='apple'] .direction-photo      { background-image: image-set(url('/assets/img/projects/apple-500.avif') type('image/avif')); }
  .direction-item[data-image='aviron-one'] .direction-photo { background-image: image-set(url('/assets/img/projects/aviron-one-500.avif') type('image/avif')); }
  .direction-item[data-image='glass'] .direction-photo      { background-image: image-set(url('/assets/img/projects/glass-500.avif') type('image/avif')); }
  .direction-item[data-image='logistics'] .direction-photo  { background-image: image-set(url('/assets/img/projects/logistics-500.avif') type('image/avif')); }
}

/* ══ О КОМПАНИИ ════════════════════════════════════════════════════════ */
.company-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 86px; align-items: start; }
.company-statement { margin: 18px 0 0; font-size: clamp(29px, 3.8vw, 52px); line-height: 1.15; letter-spacing: -.023em; font-weight: 500; }
.company-side { padding-top: 46px; }
.company-side > p { margin: 0 0 40px; font-size: 20px; line-height: 1.65; color: #46535a; }
.principle { padding: 20px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
.principle strong { font-size: 15px; font-weight: 500; color: var(--blue-deep); }
.principle b { font-size: 16px; font-weight: 500; }
.principle span { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ══ НОВОСТИ ═══════════════════════════════════════════════════════════ */
.updates .section-lead { color: rgba(255, 255, 255, .66); }
/* световое поле ниже выходит за края блока — подрезаем, иначе оно
   расширяет страницу и появляется горизонтальная прокрутка */
.updates { overflow: clip; }
.updates > .container { position: relative; z-index: 2; }

/* Световое поле под карточками. Стеклу нужно что-то преломлять: на
   ровной заливке полупрозрачная панель читается как серый прямоугольник,
   а не как стекло.                                                   */
.section-aura {
  position: absolute; z-index: 0; inset: 12% -10% 0; pointer-events: none;
  background:
    radial-gradient(52% 60% at 22% 42%, rgba(113, 197, 242, .26), transparent 68%),
    radial-gradient(46% 54% at 74% 60%, rgba(216, 200, 170, .16), transparent 66%),
    radial-gradient(40% 48% at 50% 88%, rgba(90, 150, 200, .18), transparent 70%);
  animation: auraDrift 32s ease-in-out infinite alternate;
}
@keyframes auraDrift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to   { transform: translate3d(3%, -3%, 0) scale(1.1); }
}

.update-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* Карточки реагируют на курсор, но не кликаются: материалов пока нет,
   ссылки появятся вместе с ними.                                    */
/* Заливка заметно легче общей: раньше низ карточки уходил в почти
   непрозрачный тёмно-синий и читался как сплошной блок. Теперь
   световое поле просвечивает насквозь, а не только через окно. */
.update-card {
  position: relative; min-height: 340px; border-radius: var(--radius);
  overflow: clip; color: #fff;
  display: flex; flex-direction: column;
  background: linear-gradient(158deg, rgba(133, 197, 238, .13), rgba(11, 32, 48, .15) 70%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-relief), var(--glass-cast);
  transition: transform .4s cubic-bezier(.22, .8, .2, 1), box-shadow .4s, border-color .4s;
}
.update-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, .28);
  box-shadow: var(--glass-relief), 0 34px 70px rgba(2, 12, 20, .42);
}
.update-card::before {
  content: ''; position: absolute; z-index: 3; top: -60%; bottom: -60%; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .08) 42%, rgba(255, 255, 255, .18) 50%, rgba(255, 255, 255, .08) 58%, transparent);
  transform: translateX(-140%) rotate(9deg); pointer-events: none;
  transition: transform 1.15s cubic-bezier(.22, .8, .2, 1);
}
.update-card:hover::before { transform: translateX(520%) rotate(9deg); }

/* Окно карточки — тонированное стекло. Скругление на самой заливке,
   а не на общем обрезающем слое: при обрезке подвижного слоя браузер
   рисовал угол по пикселям и слева сверху вылезал светлый серп.     */
.update-visual {
  position: relative; min-height: 172px; overflow: clip;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  display: grid; place-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
/* окно и тело карточки различаются оттенком, а не плотностью —
   раньше это читалось как два разных синих прямоугольника */
.update-visual::before {
  content: ''; position: absolute; inset: -2px; z-index: 0;
  background: linear-gradient(150deg, rgba(24, 62, 88, .34), rgba(112, 189, 231, .22));
  transition: transform .7s cubic-bezier(.22, .8, .2, 1);
}
.update-card:nth-child(2) .update-visual::before { background: linear-gradient(150deg, rgba(38, 60, 52, .34), rgba(141, 164, 140, .22)); }
.update-card:nth-child(3) .update-visual::before { background: linear-gradient(150deg, rgba(56, 48, 38, .34), rgba(216, 200, 170, .22)); }
.update-card:hover .update-visual::before { transform: scale(1.07); }
.update-visual span {
  position: relative; z-index: 1;
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}
.update-body { position: relative; z-index: 2; padding: 24px 25px 25px; display: flex; flex: 1; flex-direction: column; }
.update-date { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.update-card h3 { margin: 14px 0 26px; font-size: 21px; line-height: 1.3; letter-spacing: -.013em; font-weight: 500; color: #fff; }
.update-link { margin-top: auto; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .58); transition: color .3s; }
.update-card:hover .update-link { color: var(--blue); }

/* ══ ПАРТНЁРСТВО ═══════════════════════════════════════════════════════ */
.partnership { color: var(--text); }
/* Плита из тёмного стекла. Размывать здесь нечего — за карточкой ровный
   фон, поэтому стекло собрано на кромках и бликах, а не на backdrop-
   filter: он бы съел производительность и не дал ничего. Настоящее
   преломление — внутри, у панели формы: ей есть что преломлять. */
.partnership-card {
  position: relative; isolation: isolate; overflow: clip;
  border-radius: 36px; padding: 58px; color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 420px); gap: 56px;
  align-items: start;
  background: linear-gradient(158deg, #1b4160 0%, #123049 42%, #07141d 100%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 -1px 0 rgba(4, 14, 22, .5),
    0 34px 80px rgba(3, 14, 22, .38);
}
.partnership-card::before {
  content: ''; position: absolute; z-index: 1; top: -50%; bottom: -50%; left: -30%; width: 26%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .05) 42%, rgba(255, 255, 255, .12) 50%, rgba(255, 255, 255, .05) 58%, transparent);
  transform: translateX(-60%) rotate(9deg); pointer-events: none;
  animation: glassSweep 14s cubic-bezier(.5, 0, .5, 1) infinite;
}
@keyframes glassSweep {
  0%, 62% { transform: translateX(-60%) rotate(9deg); }
  100%    { transform: translateX(560%) rotate(9deg); }
}
.partnership-card > *:not(.partnership-glow) { position: relative; z-index: 2; }
/* два световых пятна медленно дышат и расходятся, поверх — слабое зерно */
.partnership-glow {
  position: absolute; z-index: 0; inset: -25%; pointer-events: none;
  background:
    radial-gradient(circle at 30% 32%, rgba(113, 197, 242, .34), transparent 42%),
    radial-gradient(circle at 74% 66%, rgba(216, 200, 170, .20), transparent 44%);
  animation: partnerDrift 26s ease-in-out infinite alternate;
}
@keyframes partnerDrift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(5%, 4%, 0) scale(1.14); }
}
.partnership-card::after {
  content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay; background-image: var(--grain);
}
.partnership-card h2 { margin: 18px 0 22px; max-width: 620px; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -.025em; font-weight: 500; }
.partnership-card p { max-width: 560px; color: rgba(255, 255, 255, .72); font-size: 18px; margin: 0; }
.partner-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 0; max-width: 620px; }
.partner-tags span {
  border: 1px solid rgba(255, 255, 255, .19); border-radius: 999px;
  padding: 10px 15px; font-size: 12px; color: rgba(255, 255, 255, .78);
  transition: border-color .3s, color .3s, transform .3s, background .3s;
}
.partner-tags span:hover { border-color: rgba(113, 197, 242, .6); background: rgba(113, 197, 242, .09); color: #fff; transform: translateY(-2px); }
.partner-direct { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 34px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .14); }
.partner-direct-link { font-size: 17px; font-weight: 500; color: #fff; transition: color .25s; }
.partner-direct-link:hover { color: var(--blue); }

/* ── Форма прямо в карточке ────────────────────────────────────────── */
/* Вложенной рамки нет: поля лежат прямо на карточке. Стеклянными
   остались сами поля — коробка вокруг них только дробила блок.   */
.partnership-form { position: relative; padding: 0; }
.partnership-form h3 { margin: 0 0 18px; font-size: 20px; font-weight: 500; letter-spacing: -.014em; }
.form-grid { display: grid; gap: 11px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; border-radius: 13px; padding: 14px 15px; outline: none;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07); color: #fff;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-grid textarea { min-height: 92px; resize: vertical; }
.form-grid ::placeholder { color: rgba(255, 255, 255, .55); }
.form-grid select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.6) 50%), linear-gradient(135deg, rgba(255,255,255,.6) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.form-grid select option { color: var(--text); background: #fff; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  border-color: var(--blue); background: rgba(255, 255, 255, .11);
  box-shadow: 0 0 0 3px rgba(113, 197, 242, .18);
}
.form-grid [aria-invalid='true'] { border-color: #ff9a8f; box-shadow: 0 0 0 3px rgba(255, 154, 143, .16); }
.form-submit {
  min-height: 52px; border: 0; border-radius: 999px; margin-top: 4px;
  background: #fff; color: var(--ink); font-weight: 600; cursor: pointer;
  transition: background .25s, color .25s, opacity .25s;
}
.form-submit:hover { background: var(--blue); }
.form-submit[disabled] { opacity: .6; cursor: default; }
.form-status { margin: 2px 0 0; min-height: 20px; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .66); }
.form-status.is-ok { color: #8fe0b0; }
.form-status.is-error { color: #ff9a8f; }
/* поле-ловушка: убрано с экрана, но не display:none — часть ботов
   игнорирует скрытые через display поля */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ══ ПОДВАЛ ════════════════════════════════════════════════════════════ */
.footer { position: relative; background: var(--tone-dark); color: #fff; padding: calc(var(--fade) + 16px) 0 30px; }
.footer::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0;
  height: var(--fade); pointer-events: none; background: var(--grad-to-dark);
}
.footer::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: .045; background-image: var(--grain);
}
.footer > .container { position: relative; z-index: 1; }

/* Две колонки: контакты и карта. Соцсети живут внутри левой колонки —
   раньше они стояли отдельной колонкой в 56 px, которая на планшете
   схлопывалась в безымянный ряд кружков между адресом и картой. */
.footer-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr); gap: 56px; padding-bottom: 46px; align-items: start; }
.footer-info { display: flex; flex-direction: column; }
.footer-tagline { margin: 22px 0 0; max-width: 430px; color: rgba(255, 255, 255, .62); font-size: 15px; line-height: 1.7; }
.footer-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 44px; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.footer-value { display: block; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, .94); }
.footer-value + .footer-label { margin-top: 24px; }
a.footer-value { transition: color .25s; }
a.footer-value:hover { color: var(--blue); }
.map-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--blue); }
.map-link:hover { color: #fff; }

/* ── Соцсети: значок + подпись, чтобы читались как ссылки ─────────── */
.footer-social { margin-top: 34px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-social-label { display: block; margin-bottom: 14px; font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.social-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social-dot {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; padding: 0 16px 0 13px; border-radius: 999px;
  border: 1px solid var(--glass-line); background: var(--glass-fill);
  -webkit-backdrop-filter: blur(12px) saturate(var(--glass-sat));
  backdrop-filter: blur(12px) saturate(var(--glass-sat));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26);
  color: rgba(255, 255, 255, .88); font-size: 13px; font-weight: 500;
  transition: background .3s, border-color .3s, color .3s, transform .3s, box-shadow .3s;
}
.social-dot svg { width: 18px; height: 18px; flex: none; }
.social-dot[href]:hover, .social-dot[aria-expanded]:hover {
  border-color: rgba(255, 255, 255, .45); color: #fff; transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 24px rgba(3, 14, 22, .32);
}
.social-dot.is-soon { opacity: .5; cursor: default; }

/* ── Всплывающий список номеров ─────────────────────────────────────
   У WhatsApp два рабочих номера, поэтому значок не ссылка, а кнопка:
   по ней раскрывается выбор. Собирается скриптом из объекта SOCIAL. */
.social-wrap { position: relative; display: inline-flex; }
.social-pop {
  position: absolute; z-index: 40; top: calc(100% + 10px); left: 0;
  min-width: 208px; padding: 7px; border-radius: 18px;
  display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(158deg, rgba(129, 194, 236, .22), rgba(7, 22, 34, .82) 70%);
  -webkit-backdrop-filter: blur(22px) saturate(var(--glass-sat));
  backdrop-filter: blur(22px) saturate(var(--glass-sat));
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 20px 44px rgba(2, 10, 16, .5);
  opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top left;
  transition: opacity .2s ease, transform .24s cubic-bezier(.22, .8, .2, 1);
}
.social-pop[hidden] { display: none; }
.social-pop.is-open { opacity: 1; transform: none; }
.social-pop-title {
  padding: 6px 12px 4px; font-size: 10px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: rgba(255, 255, 255, .5);
}
.social-pop a {
  padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 500;
  color: rgba(255, 255, 255, .92); white-space: nowrap;
  transition: background .2s, color .2s;
}
.social-pop a:hover { background: rgba(255, 255, 255, .13); color: #fff; }
/* сторону подбирает скрипт по месту на экране: у правого края
   раскрывается влево, у нижнего — вверх */
.social-pop.is-right { left: auto; right: 0; transform-origin: top right; }
.social-pop.is-up { top: auto; bottom: calc(100% + 10px); transform-origin: bottom left; }
.social-pop.is-up.is-right { transform-origin: bottom right; }
@supports (corner-shape: squircle) { .social-pop { corner-shape: squircle; } }

/* ── Карта ────────────────────────────────────────────────────────────
   Пропорции фиксируются через aspect-ratio, а рамка карты в скрипте
   считается от реальных пропорций блока. Раньше высота была жёстко
   300 px: на планшете блок растягивался до 3:1, а вставка отдавала
   кадр 2:1 — карта выглядела сплющенной и обрезанной.               */
.map-frame {
  position: relative; overflow: hidden; border-radius: 20px;
  aspect-ratio: 4 / 3; min-height: 320px;
  background: #0d1c25; border: 1px solid rgba(255, 255, 255, .12);
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.9); }
.map-badge {
  position: absolute; z-index: 2; left: 12px; top: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 999px;
  background: rgba(5, 14, 20, .9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font-size: 12px; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .16);
  transition: background .25s, border-color .25s;
}
.map-badge:hover { background: var(--ink); border-color: var(--blue); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px 28px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .5); font-size: 12px;
}
.footer-bottom p { margin: 0; }
.footer-bottom p:last-child { text-align: right; }
.footer .brand-logo { height: 54px; }

/* ══ ОКНО ПРОЕКТА ══════════════════════════════════════════════════════ */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 26px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(2, 9, 14, .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s; }
.modal.is-open .modal-backdrop { opacity: 1; }

.modal-panel {
  position: relative; z-index: 2; width: min(1060px, 100%);
  min-height: min(430px, 80vh); max-height: min(650px, 88vh);
  display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 56%);
  border-radius: 26px; overflow: clip; color: #fff;
  background: linear-gradient(158deg, rgba(37, 86, 120, .93), rgba(9, 26, 38, .95) 72%);
  -webkit-backdrop-filter: blur(26px) saturate(var(--glass-sat));
  backdrop-filter: blur(26px) saturate(var(--glass-sat));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 -1px 0 rgba(4, 14, 22, .5),
    0 40px 110px rgba(2, 10, 16, .55);
  opacity: 0; transform: translateY(24px) scale(.985);
  transition: transform .45s cubic-bezier(.22, .8, .2, 1), opacity .35s;
}
.modal.is-open .modal-panel { opacity: 1; transform: none; }
.modal-close {
  position: absolute; z-index: 4; top: 15px; right: 15px;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(7, 20, 29, .82); color: #fff; cursor: pointer; font-size: 21px;
  transition: background .25s, transform .35s;
}
.modal-close:hover { background: var(--ink); transform: rotate(90deg); }
.modal-visual { position: relative; height: 100%; background-color: #0d1f2b; overflow: clip; }
.modal-visual picture, .modal-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* кадр растворяется в стекле панели, а не упирается в ребро */
.modal-visual::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(5, 15, 23, .28) 0%, transparent 46%, rgba(9, 26, 38, .55) 100%);
}
/* в окне проекта пометка ставится скриптом отдельно, поверх кадра */
.modal-visual .render-note { position: absolute; z-index: 2; bottom: 18px; left: 20px; padding-left: 0; }
.modal-visual .render-note::before { content: none; }

.modal-body { display: flex; flex-direction: column; padding: 42px 44px 38px; overflow: auto; overscroll-behavior: contain; }
.modal-body .eyebrow { color: var(--blue); }
.modal-body h2 { margin: 10px 0 18px; font-size: clamp(28px, 3.1vw, 44px); line-height: 1.08; letter-spacing: -.024em; font-weight: 500; color: #fff; }
.modal-body > p { margin: 0; font-size: 17px; line-height: 1.62; color: rgba(255, 255, 255, .76); }
.modal-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; margin: 28px 0 0; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .16); }
.modal-stats > div { min-width: 0; }
.modal-stats dt { margin-bottom: 7px; color: rgba(255, 255, 255, .54); text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 600; }
.modal-stats dd { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.35; color: #fff; }

/* ══ ЗАСТАВКА ══════════════════════════════════════════════════════════ */
.intro { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; pointer-events: none; }
.intro[hidden] { display: none; }
.intro-bg { position: absolute; inset: 0; background: var(--tone-dark); transition: opacity .85s ease .15s; }
.intro.is-leaving .intro-bg { opacity: 0; }
.intro-logo {
  position: relative; width: min(420px, 60vw); height: auto; opacity: 0;
  transform: translate(0, 0) scale(1); transform-origin: 50% 50%; will-change: transform;
  transition: opacity .65s ease, transform 1.05s cubic-bezier(.62, .02, .2, 1);
}
.intro.is-ready .intro-logo { opacity: 1; }
body.intro-active { overflow: hidden; }
#brandLogo { transition: opacity .2s ease; }
html.intro-running #brandLogo { opacity: 0; }

/* ══ ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ ═══════════════════════════════════════════
   rise — блок всплывает снизу; fade — только проявление.
   Скрипт снимает атрибут, как только блок появился: иначе правило
   transform: none перебивало приподнимание карточки при наведении. */
[data-reveal] { opacity: 0; transition: opacity .75s ease, transform .75s cubic-bezier(.22, .8, .2, 1); }
[data-reveal='rise'] { transform: translateY(26px); }
[data-reveal].is-in-view { opacity: 1; transform: none; }

/* ══ АДАПТИВ ═══════════════════════════════════════════════════════════ */
@media (max-width: 1240px) {
  .header-actions .social-mini, .header-divider { display: none; }  /* переезжают в меню */
  .company-grid { gap: 56px; }
  .partnership-card { gap: 40px; padding: 48px; }
}

@media (max-width: 1050px) {
  :root { --fade: 200px; }

  .main-nav { display: none; }
  .header-actions .ghost-btn { display: none; }
  .header-actions .lang-switch { display: none; }
  .menu-btn { display: block; }

  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 30px; }
  .section-head { grid-template-columns: 1fr; gap: 26px; margin-bottom: 44px; }

  /* Колонки плиток не трогаем: пары 5 + 7 подобраны так, что при любой
     ширине контейнера их высоты совпадают — строки остаются ровными,
     а снимки видны целиком. Если сделать всем по 6 колонок, высоты
     разъедутся, потому что пропорции кадров разные.                */

  .direction-item { grid-template-columns: 60px minmax(0, 1fr); gap: 8px 20px; padding: 28px 0; }
  .direction-item p { grid-column: 2 / 3; }

  .company-grid { grid-template-columns: 1fr; gap: 28px; }
  .company-side { padding-top: 0; }

  .update-grid { grid-template-columns: repeat(2, 1fr); }
  .update-card:last-child { grid-column: 1 / -1; }
  .update-card:last-child .update-visual { min-height: 200px; }

  .partnership-card { grid-template-columns: 1fr; gap: 36px; }
  .partnership-card h2, .partnership-card p, .partner-tags { max-width: none; }

  .footer-main { grid-template-columns: 1fr; gap: 34px; }
  .map-frame { aspect-ratio: 16 / 9; min-height: 280px; }

  .modal-panel { grid-template-columns: minmax(0, 40%) minmax(0, 60%); }
  .modal-body { padding: 34px 32px 30px; }
  .modal-stats { gap: 0 14px; }
  .modal-stats dd { font-size: 14px; }
}

@media (max-width: 760px) {
  :root { --header: 68px; --radius: 22px; --fade: 150px; }

  .container { width: min(calc(100% - 32px), var(--max)); }
  .section { padding: calc(var(--fade) + 18px) 0 74px; }

  .site-header { top: 8px; }
  .header-inner { width: min(calc(100% - 20px), var(--max)); padding: 0 12px 0 14px; border-radius: 18px; }

  .hero-grid { padding-top: calc(var(--header) + 50px); }
  .hero-copy { padding-bottom: 34px; }
  .hero h1 { font-size: clamp(34px, 10.5vw, 54px); margin: 16px 0 18px; }
  .hero-description { font-size: 17px; }
  .hero-projects { display: flex; overflow: auto; scrollbar-width: none; }
  .hero-projects::-webkit-scrollbar { display: none; }
  .hero-project-tab { min-width: 186px; flex: 0 0 auto; }

  .brand-logo, .site-header.is-scrolled .brand-logo { height: 34px; }

  .stats { padding: 44px 0 50px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .stat { padding-top: 16px; }
  .stat span { font-size: 13px; }

  /* на телефоне пропорции снимков уступают читаемости заголовка */
  .project-grid { grid-template-columns: 1fr; }
  .project-card, .project-card.is-lead, .project-card.is-pano,
  .project-card.is-placeholder, .project-card[data-project] { grid-column: 1 / -1; aspect-ratio: auto; min-height: 420px; }
  .project-card.is-pano { min-height: 280px; }
  .project-card.is-placeholder { min-height: 260px; }
  .project-content { padding: 22px; }
  .placeholder-inner { padding: 26px; }

  .direction-item { grid-template-columns: 34px minmax(0, 1fr); gap: 8px 14px; min-height: auto; padding: 24px 0; }

  .update-grid { grid-template-columns: 1fr; }
  .update-card:last-child { grid-column: auto; }

  .partnership-card { padding: 32px 22px; border-radius: 26px; }
  .partnership-form { padding: 22px 18px; border-radius: 20px; }
  .partner-direct { gap: 8px 20px; }

  .footer { padding: calc(var(--fade) + 20px) 0 26px; }
  .footer-details { grid-template-columns: 1fr; gap: 26px; margin-top: 30px; padding-top: 26px; }
  .map-frame { aspect-ratio: 3 / 2; min-height: 240px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-bottom p:last-child { text-align: left; }

  /* окно проекта складывается: кадр сверху 4:3, текст под ним */
  .modal { padding: 0; place-items: end stretch; }
  .modal-panel {
    width: 100%; min-height: 0; max-height: 93vh;
    grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr);
    border-radius: 22px 22px 0 0;
  }
  .modal-visual { min-height: 0; aspect-ratio: 4 / 3; }
  .modal-visual::after { background: linear-gradient(0deg, rgba(9, 26, 38, .6), transparent 55%); }
  .modal-body { padding: 26px 22px 30px; }
  .modal-stats { grid-template-columns: 1fr; gap: 0; margin: 22px 0 0; padding-top: 16px; }
  .modal-stats > div { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .modal-stats > div:last-child { border-bottom: 0; }
}

/* ══ ПРЕЛОМЛЕНИЕ ═══════════════════════════════════════════════════════
   Настоящее искажение фона через SVG-фильтр. Включено только там, где
   за стеклом есть что искажать: над ровной заливкой эффект не виден
   вообще, а стоит столько же. Три места:

     · карточки новостей   — за ними световое поле .section-aura
     · форма партнёрства   — за ней световые пятна .partnership-glow
     · шапка при прокрутке — под ней проезжает фотография

   Правило намеренно продублировано с базовым blur/saturate: если
   браузер не понимает фильтр в backdrop-filter (Firefox), объявление
   целиком отбрасывается и остаётся обычное размытие из правил выше.
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  .update-card {
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) url('#glassRefraction');
  }
  .partnership-form .form-grid input,
  .partnership-form .form-grid select,
  .partnership-form .form-grid textarea {
    -webkit-backdrop-filter: blur(10px) saturate(var(--glass-sat));
    backdrop-filter: blur(10px) saturate(var(--glass-sat)) url('#glassRefraction');
  }
  .site-header.is-scrolled .header-inner {
    -webkit-backdrop-filter: blur(22px) saturate(var(--glass-sat));
    backdrop-filter: blur(22px) saturate(var(--glass-sat)) url('#glassRefraction');
  }
}

/* ══ БЕРЕЖНЫЙ РЕЖИМ ════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .partnership-glow { animation: none; }
  .hero-layer img { transform: none; }
}
