@media (min-width: 1025px) {
  .project-hero__text { container-type: inline-size; }
  .project-hero__title { font-size: clamp(40px, 7.5cqi, 80px); }
}
.about__figure figcaption { right: 40px; bottom: 40px; }
.about__figure::after, .cycle__figure::after, .contacts__media::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.35) 35%, rgba(0, 0, 0, 0) 60%); }
.cycle__figure figcaption, .contacts__media figcaption, .about__figure figcaption { color: #fff; opacity: 1; }
.cycle__figure figcaption, .contacts__media figcaption { z-index: 1; }
.project-pride::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0) 80%); }
.project-pride > * { position: relative; z-index: 1; }
@media (max-width: 1024px) { .reach__messengers { display: none; } }
.company-expertise__photos .company-expertise__doc{position:relative;display:block;flex:0 1 388px;min-width:0;max-width:388px;color:var(--color-dark);-webkit-tap-highlight-color:transparent}
.company-expertise__photos .company-expertise__doc .company-expertise__photo{display:block;box-sizing:border-box;width:100%;max-width:100%;height:auto;margin:0;aspect-ratio:1819/2572;-o-object-fit:contain;object-fit:contain;border:1px solid var(--color-dark);background-color:var(--color-white)}
.company-expertise__open{position:absolute;top:8px;right:8px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid var(--color-dark);border-radius:50%;background-color:var(--color-white);color:var(--color-dark);opacity:.85;pointer-events:none;transition:background-color .2s,color .2s,opacity .2s}
.company-expertise__open svg{display:block;width:16px;height:16px}
.company-expertise__doc:hover .company-expertise__open,
.company-expertise__doc:focus-visible .company-expertise__open{background-color:var(--color-dark);color:var(--color-white);opacity:1}
.company-expertise__doc:focus-visible{outline:2px solid var(--color-dark);outline-offset:3px}
@media(max-width:1024px){
  .company-expertise__photos{flex-direction:column;align-items:center;gap:16px;min-height:0}
  .company-expertise__photos .company-expertise__doc{flex:none;width:100%;max-width:388px}
}
.nowrap { white-space: nowrap; }
.featured__name { overflow-wrap: normal; word-break: normal; }
@media (min-width: 1025px) { .featured__name { font-size: clamp(11px, 1.2vw, 20px); } }
.featured__card:after { background-color: transparent; background-image: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0.05) 100%); }
.awards__item:not(.awards__item--accent) { justify-content: flex-start; }
@media (min-width: 1025px) { .lead-hero__media { width: 50%; max-width: 50%; height: auto; aspect-ratio: 119 / 100; } }
@media (min-width: 1025px) {
  .about__inner { flex-direction: column; align-items: stretch; }
  .about__figure { width: 100%; }
  .about__figure img { display: block; width: 100%; height: auto; aspect-ratio: 21 / 10; object-fit: cover; }
}
@media (min-width: 1025px) {
  .lead-hero { align-items: flex-start; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .about__figure img { aspect-ratio: 2 / 1; height: auto; }
  .cycle__figure { min-height: 0; aspect-ratio: 2 / 1; }
  .portfolio-hero__media { height: auto; aspect-ratio: 3 / 2; }
  .lead-hero { flex-direction: row; align-items: flex-start; }
  .lead-hero__text { flex: 1; min-width: 0; }
  .lead-hero__media { width: 48%; max-width: 48%; height: auto; aspect-ratio: 1 / 1; }
}
@media (min-width: 1025px) {
  .works__cards { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
  .works__card, .works__card--lg { gap: 14px; }
  .works__card .works__img, .works__card--lg .works__img { height: 220px; aspect-ratio: auto; }
}
@media (min-width: 1025px) {
  .works__cards { grid-template-columns: 2fr 1fr 1fr 1fr; align-items: end; }
  .works__card--lg .works__img { height: 380px; }
  .works__name { overflow-wrap: anywhere; }
}
@media (min-width: 1025px) {
  .works__card { padding: 14px; }
  .works__name { overflow-wrap: normal; word-break: normal; font-size: clamp(12px, 1.1vw, 20px); letter-spacing: -.2px; }
}
@media (min-width: 1025px) {
  .works__cards { grid-template-columns: 2fr 1fr 1fr; }
  .works__cards > a:nth-child(4) { display: none; }
  .works__name { font-size: clamp(14px, 1.3vw, 20px); }
}
@media (min-width: 1601px) {
  .works__card { padding: 20px; }
}
@media (min-width: 1601px) {
  .works__cards { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .works__cards > a:nth-child(4) { display: flex; }
}
@media (max-width: 1024px) {
  .hero__bg::after { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 45%; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%); }
  .hero__num { color: #fff; }
}
@media (max-width: 1024px) {
  .project-stats__inner { padding-top: 20px; }
}
@media (max-width: 1024px) {
  .project-stats__inner { padding-top: 60px; }
}
@media (max-width: 1024px) {
  .project-pride::before { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.footer__note { display: none; }
@media (max-width: 1024px) {
  .project-stats__inner { padding-bottom: 60px; }
}
.project-pride::before { backdrop-filter: none; -webkit-backdrop-filter: none; }
.project-pride::before { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.55) 30%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0.1) 85%, rgba(0, 0, 0, 0) 100%); }
.reach__messengers { display: none; }
.footer__top { border-bottom: 0; }
@media (max-width: 768px) {
  .featured__grid { grid-template-columns: 1fr; gap: 20px; overflow: visible; }
  .featured__card { display: flex; flex-direction: column; justify-content: flex-start; min-height: 0; padding: 0; overflow: hidden; border: 1px solid var(--color-blue); background-color: var(--color-dark); }
  .featured__card::after { display: none; }
  .featured__img { position: relative; top: auto; right: auto; bottom: auto; left: auto; width: 100%; height: auto; aspect-ratio: 4 / 3; filter: grayscale(1); }
  .featured__cat { margin: 16px 20px 0; color: var(--color-white-60); }
  .featured__name { margin: 12px 20px 0; color: var(--color-blue); font-size: 20px; }
  .featured__meta { margin: 10px 20px 20px; }
  .featured__place, .featured__stat { color: var(--color-white); }
}
@media (max-width: 768px) {
  .featured__name { margin-left: 0; }
}
/* шапка: fixed на всех страницах, прячется при скролле вниз и возвращается при скролле вверх (assets/header-scroll.js) */
.header, .page__body--inner .header { position: fixed; top: 0; right: 0; left: 0; transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; }
/* transform только у скрытой шапки: с ним fixed-меню внутри неё считалось бы от шапки, а не от экрана */
.header--hidden { transform: translateY(-100%); }
.header--scrolled { background-color: rgba(23, 26, 34, 0.96); }
.page__body--inner .site-container { padding-top: var(--header-h, 114px); }
.header__cta { color: var(--color-white); font-weight: 600; }
.header__cta:hover { color: var(--color-white-80); }
.header__menu-cta, .header__menu-contacts { display: none; }
/* бургер одинаковый на всех страницах: раньше крестик был только на главной (burger-close.css), на внутренних меню закрывалось теми же полосками */
.burger { position: relative; z-index: 6; }
.burger__icon--close { display: none; }
.burger--active .burger__icon--open { display: none; }
.burger--active .burger__icon--close { display: block; }
@media (max-width: 1024px) {
  /* 44px — минимальная зона нажатия под палец, сама иконка остаётся 28px */
  /* +3px вниз: геометрически по центру логотипа, но визуальный вес логотипа в слове «ВЕК», оно ниже середины */
  .burger { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -8px; padding: 0; transform: translateY(3px); }
  /* burger-close.css на главной ставит крестик absolute в левый верхний угол — сбрасываем, обе иконки по центру кнопки */
  .burger .burger__icon { position: static; flex-shrink: 0; width: 28px; height: 28px; margin: 0; }
  .burger .burger__icon--close { width: 24px; height: 24px; }
  .burger--active .burger__icon--open { display: none; }
  .header__logo { position: relative; z-index: 6; }
}

/* hero: затемнение снизу вверх 80 → 20 без видимых краёв */
/* hero: лёгкое общее затемнение + подложка снизу под текстом */
.hero__bg::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background-color: rgba(0, 0, 0, 0.25); }
.hero__inner { padding-top: 120px; background: linear-gradient(to bottom, rgba(15, 17, 22, 0) 0%, rgba(15, 17, 22, 0.8) 120px, rgba(15, 17, 22, 0.85) 100%); }
/* h1 остаётся для поисковиков, на экране главный текст — подзаголовок */
.hero__title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero__subtitle { max-width: 1100px; font-family: var(--font-display); font-size: clamp(40px, 8px + 4.2vw, 80px); line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase; }
.hero__inner > .btn { gap: 12px; width: auto; min-height: 64px; padding: 16px 36px; border-radius: 12px; font-size: 20px; font-weight: 600; }
.hero__inner > .btn::after { content: ""; flex-shrink: 0; width: 22px; height: 22px; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h13M11 5l5 5-5 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h13M11 5l5 5-5 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.2s ease; }
.hero__inner > .btn:hover::after { transform: translateX(4px); }
.hero__stats { align-items: flex-start; justify-content: flex-start; gap: 0; width: auto; }
.hero__stat { align-items: center; min-width: 0; padding: 0 48px; text-align: center; }
.hero__stat + .hero__stat { border-left: 1px solid rgba(255, 255, 255, 0.3); }
.hero__num { color: var(--color-white); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.hero__label { color: var(--color-white); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }

@media (max-width: 1024px) {
  /* 640px из main.css короче экрана iPhone, снизу вылезал следующий блок; svh — экран с видимыми панелями браузера */
  .hero { align-items: flex-end; }
  /* заявка на мобилке в hero и в меню, в шапке только лого и бургер */
  .header__cta { display: none; }
  .burger { margin-left: auto; }
  .header__nav { flex-direction: column; padding: 96px 20px 32px; overscroll-behavior: contain; }
  /* весь блок меню по центру экрана: auto-отступы у первого и последнего блока, при нехватке высоты верх не обрезается */
  .header__list { gap: 0; margin-top: auto; }
  .header__list > li { width: 100%; }
  .header__link, .page__body:not(.page__body--inner):not(.page__body--about) .header__link[href="/about.html"] { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 64px; border-bottom: 0; font-family: var(--font-display); font-size: 28px; letter-spacing: -0.02em; text-transform: uppercase; color: var(--color-white); }
  .header__link::after { content: ""; flex-shrink: 0; width: 22px; height: 22px; opacity: 0.5; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h13M11 5l5 5-5 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h13M11 5l5 5-5 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
  .header__link:active { color: var(--color-white-60); }
  .header__menu-cta { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin-top: 28px; border-radius: 12px; font-size: 18px; font-weight: 600; color: var(--color-text); background-color: var(--color-white); }
  .header__menu-contacts { display: flex; flex-direction: column; flex-shrink: 0; gap: 12px; width: 100%; margin-top: 12px; margin-bottom: auto; }
  .header__menu-social { display: flex; gap: 12px; }
  .header__menu-social a { display: flex; flex: 1 1 0; align-items: center; justify-content: center; min-height: 56px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 12px; font-size: 16px; font-weight: 600; color: var(--color-white); }
  .hero__inner { margin-top: 90px; padding-top: 64px; padding-bottom: 32px; gap: 28px; background: linear-gradient(to bottom, rgba(15, 17, 22, 0) 0%, rgba(15, 17, 22, 0.8) 64px, rgba(15, 17, 22, 0.85) 100%); }
  .hero__subtitle { font-size: 32px; line-height: 1; }
  .hero__inner > .btn { width: 100%; min-height: 56px; padding: 14px 24px; font-size: 18px; }
  .hero__inner > .btn::after { width: 20px; height: 20px; }
  /* 3 цифры + 2 разделителя (псевдоэлементы ряда) через space-between: крайние по краям, все 4 промежутка равные */
  .hero__stats { display: flex; align-items: stretch; justify-content: space-between; width: 100%; }
  .hero__stats::before, .hero__stats::after { content: ""; flex: 0 0 1px; background-color: rgba(255, 255, 255, 0.3); }
  .hero__stat, .hero__stat + .hero__stat { flex: 0 0 auto; align-items: center; padding: 0; border-left: 0; text-align: center; }
  .hero__stat:nth-child(1) { order: 1; }
  .hero__stats::before { order: 2; }
  .hero__stat:nth-child(2) { order: 3; }
  .hero__stats::after { order: 4; }
  .hero__stat:nth-child(3) { order: 5; }
  .hero__num { font-size: 40px; font-weight: 400; letter-spacing: -0.8px; }
  .hero__label { font-size: 12px; white-space: nowrap; }
}
@media (max-width: 360px) {
  .hero__subtitle { font-size: 28px; }
  .hero__num { font-size: 34px; letter-spacing: -0.6px; }
}

/* производительность: яркость зашита в видеофайлы; ч/б фон pride — обычный filter на копии фона,
   он растрируется один раз, а backdrop-filter пересчитывался на каждом кадре скролла */
.hero__video { filter: none; }
.project-pride { isolation: isolate; }
.project-pride::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: inherit; filter: grayscale(1); }

/* шапка на ПК: пункты меню такие же яркие, как «Оставить заявку», без теней */
@media (min-width: 1025px) {
  .header__link, .page__body:not(.page__body--inner):not(.page__body--about) .header__link[href="/about.html"] { font-weight: 600; color: var(--color-white); }
  .header__link:hover, .page__body:not(.page__body--inner):not(.page__body--about) .header__link[href="/about.html"]:hover { color: var(--color-white-80); }
}

/* блокировка скролла под меню/попапом: меню просто лежит поверх, страница не двигается.
   В main.css .dis-scroll сжимал body до 100vh и страницу выкидывало наверх — отменяем, скролл режем на html */
.page__body.dis-scroll { position: static; height: auto; overflow: visible; }
html:has(> .page__body.dis-scroll) { overflow: hidden; }
@media (max-width: 1024px) {
}

/* попап заявки: на весь экран синим и на ПК, и на телефоне; закрыть — крестик справа сверху, Esc или «назад» браузера не нужен */
.popup { align-items: stretch; padding: 0; background-color: var(--color-blue); overscroll-behavior: contain; }
.popup__dialog { width: 100%; max-width: 760px; min-height: 100%; margin: 0 auto; padding: 96px 40px 56px; }
/* заголовок с формой по центру высоты; при нехватке места верх не обрезается, попап прокручивается */
.popup__title { margin-top: auto; }
.popup__form { margin-bottom: auto; }
.popup__close { position: fixed; top: 24px; right: 24px; z-index: 101; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; color: var(--color-white); transition: background-color 0.2s ease; }
.popup__close::before { content: ""; width: 28px; height: 28px; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5L5 19' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5L5 19' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.popup__close:hover, .popup__close:focus-visible { background-color: rgba(255, 255, 255, 0.15); }
.popup__file, .popup__submit { display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 12px; font-size: 18px; font-weight: 600; }
.popup__file { align-self: flex-start; padding: 0 28px; }
@media (max-width: 1024px) {
  .popup__dialog { padding: 72px 20px 32px; }
  /* на телефоне крестик попапа там же и такой же, как крестик открытого бургера: та же иконка 24px, центр на уровне шапки */
  .popup__close { top: 25.5px; right: 12px; width: 44px; height: 44px; }
  .popup__close::before { width: 24px; height: 24px; background-color: transparent; -webkit-mask: none; mask: none; background: url("/img/svg/icon-close-bold.svg") center / contain no-repeat; }
  .popup__file, .popup__submit { display: flex; align-items: center; justify-content: center; align-self: stretch; width: 100%; min-height: 56px; border-radius: 12px; font-size: 16px; font-weight: 600; }
}

/* формы «Свяжитесь с нами» (главная, услуги) и на странице контактов: кнопки под палец, как в попапе */
@media (max-width: 1024px) {
  .contacts__btn, .reach__submit, .reach__file { display: flex; align-items: center; justify-content: center; align-self: stretch; width: 100%; min-height: 56px; border-radius: 12px; font-size: 16px; font-weight: 600; }
}

/* поля форм: подсказки и ввод обычным регистром — «Ваше имя», а не «(ВАШЕ ИМЯ)» */
.popup__input, .contacts__input, .reach__input { text-transform: none; }

/* мессенджеры: мелкая иконка рядом с названием, цвет берёт у текста (mask + currentColor) — видно и на тёмном, и на светлом фоне */
.msgr-icon { display: inline-block; flex-shrink: 0; width: 1.1em; height: 1.1em; vertical-align: -0.15em; background-color: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.msgr-icon--tg { -webkit-mask-image: url("/img/svg/icon-telegram.svg"); mask-image: url("/img/svg/icon-telegram.svg"); }
.msgr-icon--max { -webkit-mask-image: url("/img/svg/icon-max.svg"); mask-image: url("/img/svg/icon-max.svg"); }
.footer__link--msgr, .reach__msgr a, .header__menu-social a { display: inline-flex; align-items: center; gap: 8px; }
.reach__msgr { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* «Оставить заявку» в бургере со стрелкой, как в hero */
.header__menu-cta { gap: 10px; }
.header__menu-cta::after { content: ""; flex-shrink: 0; width: 20px; height: 20px; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h13M11 5l5 5-5 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h13M11 5l5 5-5 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
/* имя выбранного файла на кнопке, ошибка лимита — красным по белому */
.popup__file span, .reach__file span { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.is-file-error { color: #c62828; }

/* «Свяжитесь с нами» как попап: комментарий без ручного ресайза, кнопка файла как в попапе */
.contacts__input { resize: none; }
.contacts__file { align-self: flex-start; }
@media (max-width: 1024px) {
  .contacts__file { display: flex; align-items: center; justify-content: center; align-self: stretch; width: 100%; min-height: 56px; border-radius: 12px; font-size: 16px; font-weight: 600; }
}

/* hero на весь экран на любых ширинах: в main.css на ПК 720–1000px, на 1080p снизу торчала полоска следующего блока */
.hero { min-height: 100vh; min-height: 100svh; }

/* поля форм (попап, «Свяжитесь с нами», контакты): один масштаб везде — подпись чуть меньше поля, без двукратной разницы.
   На телефоне поле 16px: меньше — iPhone зумит страницу при фокусе */
.popup__hint, .contacts__hint, .reach__hint { font-size: 16px; line-height: 1.3; }
.popup__input, .contacts__input, .reach__input { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
@media (max-width: 1024px) {
  .popup__hint, .contacts__hint, .reach__hint { font-size: 14px; }
  .popup__input, .contacts__input, .reach__input { font-size: 16px; }
}

/* без синего прямоугольника при тапе на телефоне; обводка для клавиатуры (:focus-visible) остаётся */
*, *::before, *::after { -webkit-tap-highlight-color: transparent; }
