/* ART-STYLE — студия интерьерного дизайна
   Дизайн-система и общие стили */

/* ============ 0. Шрифт ============ */
/* Montserrat лежит локально: вариативный (300–700), один файл на алфавит.
   Раньше тянулся с fonts.googleapis.com — два обращения к чужому домену
   в критическом пути и 5 отдельных начертаний. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/montserrat-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;
}

/* ============ 1. Переменные ============ */
:root {
  --accent: #120a8f;
  --accent-dark: #0c0764;
  --accent-soft: #eeedf8;
  --dark: #1b1b1b;
  --dark-2: #333333;
  --gray-bg: #f5f5f5;
  --gray-line: #e6e6e6;
  /* Границы полей и кнопок-фильтров: #e6e6e6 давал 1.25:1, норма для контролов — 3:1 */
  --border-input: #949494;
  --muted: #666666;
  /* #999 давал контраст 2.8:1 на белом — ниже нормы WCAG (нужно 4.5:1).
     #767676 — минимальный серый, который норму проходит. */
  --muted-2: #767676;
  --white: #ffffff;

  --font: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --container: 1200px;
  --gutter: 32px;
  --header-h: 80px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.3s;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.16);
}

/* ============ 2. Сброс и база ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* Браузерное правило [hidden] { display: none } слабее любого селектора с классом,
   поэтому .gallery__item { display: block } его перебивал и фильтры не скрывали карточки.
   Это правило возвращает атрибуту hidden силу. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

::selection {
  background: var(--accent);
  color: var(--white);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* На тёмных блоках синий контур сливается с фоном — там кольцо белое */
.hero :focus-visible,
.section--dark :focus-visible,
.cta :focus-visible,
.footer :focus-visible,
.drawer :focus-visible,
.lightbox :focus-visible,
.project-card:focus-visible,
.gallery__item:focus-visible {
  outline-color: var(--white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* ============ 3. Раскладка ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 80px 0;
}

.section--gray {
  background: var(--gray-bg);
}

.section--dark {
  background: var(--dark);
  color: var(--white);
}

.section--tight {
  padding: 56px 0;
}

/* ============ 4. Типографика ============ */
.section-title {
  font-size: clamp(24px, 3vw, 32px);
  text-align: center;
  margin-bottom: 48px;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--accent);
}

.section-title--left {
  text-align: left;
}

.section-title--left::after {
  margin-left: 0;
}

.section-title--plain::after {
  display: none;
}

.lead {
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--muted);
}

/* Подчёркивание первого слова, как в макете: ART-STYLE — ЭТО */
.underline-word {
  border-bottom: 3px solid var(--accent);
  padding-bottom: 2px;
}

/* ============ 5. Кнопки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 32px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  background: none;
  transition: background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn--outline {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: var(--white);
}

.btn--dark {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

.btn--dark:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--ghost {
  border-color: var(--dark);
  color: var(--dark);
}

.btn--ghost:hover {
  background: var(--dark);
  color: var(--white);
}

.btn--white {
  background: var(--white);
  color: var(--accent);
  border-color: var(--white);
}

.btn--white:hover {
  background: transparent;
  color: var(--white);
}

.btn--sm {
  min-height: 38px;
  padding: 8px 22px;
  font-size: 11px;
}


/* ============ 6. Шапка ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-line);
  transition: box-shadow var(--dur) var(--ease);
}

.header.is-stuck {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo:hover {
  color: var(--accent);
  transition: color var(--dur) var(--ease);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav__link {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark-2);
  transition: color var(--dur) var(--ease);
  white-space: nowrap;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}

.nav__link:hover {
  color: var(--accent);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__link.is-active {
  color: var(--accent);
  font-weight: 600;
}

.header__tools {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang__btn {
  padding: 2px 2px;
  border: 0;
  background: none;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color var(--dur) var(--ease);
}

.lang__btn:hover {
  color: var(--accent);
}

.lang__btn.is-active {
  color: var(--dark);
}

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  /* 44x44 — минимальная тап-цель; сами полоски остаются 34px через .burger__line */
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
}

.burger__line {
  width: 34px;
}

.burger__line {
  display: block;
  height: 3px;
  background: var(--dark);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.burger.is-open .burger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger.is-open .burger__line:nth-child(2) {
  opacity: 0;
}

.burger.is-open .burger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============ 7. Выдвижное меню ============ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  visibility: hidden;
  pointer-events: none;
}

.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(27, 27, 27, 0.5);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.drawer.is-open .drawer__overlay {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  padding: 32px;
  background: var(--dark);
  color: var(--white);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}

.drawer.is-open .drawer__panel {
  transform: translateX(0);
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.drawer__close {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--white);
  font-size: 28px;
  line-height: 1;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.drawer__close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 40px;
}

.drawer__link {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}

.drawer__link:hover,
.drawer__link.is-active {
  color: #8f88ff;
  padding-left: 10px;
}

.drawer__contacts {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

.drawer__contacts a:hover {
  color: var(--white);
}

.drawer__contacts strong {
  display: block;
  margin-bottom: 4px;
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer__row {
  margin-bottom: 20px;
}

/* ============ 8. Герой ============ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 620px;
  padding: 100px 0;
  background: var(--dark);
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

/* Фон — настоящая визуализация: человек, который ищет дизайнера,
   должен увидеть интерьер на первом же экране, а не градиент. */
.hero__media {
  position: absolute;
  inset: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

/* Затемнение: без него белый текст на светлой визуализации не читается */
.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 15, 20, 0.72),
    rgba(15, 15, 20, 0.55) 45%,
    rgba(15, 15, 20, 0.78)
  );
}

.hero__inner {
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.hero__title {
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero__text {
  max-width: 640px;
  margin: 0 auto 36px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.hero__link {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.hero__link:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ============ 9. Шапка внутренних страниц ============ */
.page-head {
  padding: 72px 0;
  background: var(--gray-bg);
  text-align: center;
}

.page-head__title {
  font-size: clamp(28px, 4vw, 42px);
}

.page-head__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 16px auto 0;
  background: var(--accent);
}

.page-head__text {
  max-width: 720px;
  margin: 20px auto 0;
  color: var(--muted);
}

.breadcrumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span {
  color: var(--muted-2);
}

/* ============ 11. О нас (главная) ============ */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}


/* Портрет: настоящее фото вместо плейсхолдера */
img.about__media {
  aspect-ratio: 4 / 5;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 20%;
}

.about__text {
  color: var(--muted);
  margin-bottom: 28px;
}

/* Тезисы «Почему я» */
.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.why-list__item {
  position: relative;
  padding-left: 32px;
  font-size: 17px;
  color: var(--dark-2);
}

.why-list__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 18px;
  height: 2px;
  background: var(--accent);
}

/* ============ 12. Преимущества ============ */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature {
  position: relative;
  padding: 32px 24px 28px;
  background: var(--white);
  text-align: center;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.feature__num {
  position: absolute;
  top: 20px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
}

.feature__title {
  font-size: 15px;
  margin-bottom: 16px;
  padding: 0 16px;
}

.feature__text {
  font-size: 14px;
  color: var(--muted);
}

/* ============ 13. Плитки услуг (главная) ============ */
.service-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.service-tile {
  padding: 24px;
  border: 1px solid var(--gray-line);
  transition: border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.service-tile:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.service-tile__title {
  font-size: 15px;
  margin-bottom: 10px;
}

.service-tile__text {
  font-size: 14px;
  color: var(--muted);
}

.center {
  text-align: center;
}

/* ============ 14. Список услуг (страница услуг) ============ */
.service-rows {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  padding: 36px 40px;
  border: 1px solid var(--gray-line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.service-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.service-row__title {
  font-size: 20px;
  margin-bottom: 8px;
}

.service-row__price {
  color: var(--muted);
  font-size: 15px;
}

.service-row__body {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
}

.service-row__text {
  color: var(--muted);
  font-size: 15px;
  width: 100%;
}

/* Состав услуги: раскрывается на месте. Раньше ради него была
   вторая почти такая же страница, которая конкурировала в поиске. */
.service-more {
  width: 100%;
}

.service-more__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  transition: color var(--dur) var(--ease);
}

.service-more__toggle::-webkit-details-marker {
  display: none;
}

.service-more__toggle::after {
  content: "+";
  font-size: 16px;
  line-height: 1;
}

.service-more[open] .service-more__toggle::after {
  content: "–";
}

.service-more__toggle:hover {
  color: var(--dark);
}

.service-more__list {
  list-style: none;
  margin: 4px 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}

.service-more__list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--muted);
}

.service-more__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

/* ============ 15. Колонки услуг ============ */
.service-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-cols--narrow {
  max-width: 800px;
  margin: 24px auto 0;
  grid-template-columns: repeat(2, 1fr);
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border: 1px solid var(--gray-line);
  transition: border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card__title {
  font-size: 17px;
  text-align: center;
  margin-bottom: 6px;
}

.service-card__price {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.service-card__desc {
  font-size: 14px;
  color: var(--dark-2);
  margin-bottom: 20px;
}

.service-card__list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-card__list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--muted);
}

.service-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.service-card .btn {
  margin-top: auto;
  align-self: center;
}

/* ============ 16. Как мы работаем ============ */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.steps::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 7%;
  right: 7%;
  height: 2px;
  background: var(--accent);
}

.step {
  position: relative;
  z-index: 2;
  text-align: center;
}

.step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.step:hover .step__num {
  transform: scale(1.12);
  background: var(--dark);
}

.step__label {
  font-size: 13px;
  color: var(--dark-2);
}

/* ============ 17. Карточки проектов ============ */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.filter {
  min-height: 44px;
  padding: 10px 28px;
  border: 1px solid var(--border-input);
  background: var(--white);
  color: var(--dark-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--dur) var(--ease);
}

.filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 0.85;
  overflow: hidden;
  background: var(--dark-2);
}

.project-card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.project-card:hover .project-card__media {
  transform: scale(1.06);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  background: linear-gradient(
    to top,
    rgba(27, 27, 27, 0.75),
    rgba(27, 27, 27, 0.25)
  );
  color: var(--white);
  text-align: center;
  transition: background-color var(--dur) var(--ease);
}

.project-card:hover .project-card__overlay {
  background: rgba(18, 10, 143, 0.7);
}

.project-card__title {
  font-size: 16px;
}

.project-card__meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.project-card__more {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.project-card:hover .project-card__more {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 17.1. Галерея портфолио ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--dark-2);
}

.gallery__item--wide {
  grid-column: span 2;
  aspect-ratio: 8 / 3;
}

.gallery__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery__item:hover .gallery__media {
  transform: scale(1.05);
}

.gallery__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(27, 27, 27, 0.85));
  color: var(--white);
  transition: background-color var(--dur) var(--ease);
}

.gallery__item:hover .gallery__caption {
  background: rgba(18, 10, 143, 0.7);
}

.gallery__title {
  font-size: 15px;
  margin-bottom: 4px;
}

.gallery__meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

/* ============ 17.2. Цифры ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat {
  padding: 24px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.stat:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-4px);
}

.stat__value {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stat__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ============ 17.4. Страница проекта ============ */
.project-hero {
  position: relative;
  width: 100%;
  /* Высота задаётся напрямую, без aspect-ratio: связка aspect-ratio + max-height
     заставляет браузер ужимать и ширину, и баннер перестаёт быть во всю ширину. */
  height: clamp(280px, 42vw, 620px);
  overflow: hidden;
  background: var(--gray-bg);
}

.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-intro {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
}

.project-facts {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  background: var(--gray-bg);
}

.fact__label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.fact__value {
  font-size: 15px;
  font-weight: 600;
}

.project-text p {
  margin-bottom: 20px;
  color: var(--dark-2);
}

.project-text p:first-child {
  font-size: 18px;
  color: var(--dark);
}

/* Галерея проекта */
.shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  /* dense — чтобы кадр во всю ширину не оставлял пустую ячейку в строке */
  grid-auto-flow: dense;
  align-items: start;
}

.shot {
  display: block;
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  cursor: zoom-in;
}

.shot--wide {
  grid-column: span 2;
}

.shot__media {
  position: relative;
  overflow: hidden;
  background: var(--gray-bg);
}

.shot__media img {
  width: 100%;
  height: auto;
  transition: transform 0.6s var(--ease);
}

.shot:hover .shot__media img {
  transform: scale(1.03);
}

.shot__caption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  transition: color var(--dur) var(--ease);
}

.shot:hover .shot__caption {
  color: var(--accent);
}

/* Переход к соседним проектам */
.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--gray-line);
}

.project-nav__link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--dur) var(--ease);
}

.project-nav__link:hover {
  color: var(--accent);
}

.project-nav__link span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}

/* Название соседнего проекта — крупнее подписи «Следующий проект» */
.project-nav__link .project-nav__name {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  letter-spacing: 0.04em;
}

.project-nav__link--next {
  text-align: right;
  margin-left: auto;
}

/* ============ 17.5. Лайтбокс ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(15, 15, 15, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
}

.lightbox__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  transition: background-color var(--dur) var(--ease);
}

.lightbox__btn:hover {
  background: var(--accent);
}

.lightbox__btn--close {
  top: 20px;
  right: 20px;
}

.lightbox__btn--prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__btn--next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* ============ 18. Пагинация ============ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gray-line);
  border-radius: 50%;
  background: var(--white);
  color: var(--dark-2);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--dur) var(--ease);
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
}

/* ============ 19.1. Текстовая страница (политика) ============ */
.doc {
  max-width: 760px;
  margin: 0 auto;
}

.doc__h2 {
  margin: 40px 0 12px;
  font-size: 16px;
}

.doc__h2:first-of-type {
  margin-top: 0;
}

.doc p {
  color: var(--dark-2);
}

.doc__note {
  padding: 14px 18px;
  margin-bottom: 32px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 14px;
  color: var(--accent-dark);
}

.doc__todo {
  padding: 10px 14px;
  border: 1px dashed var(--border-input);
  font-size: 14px;
  color: var(--muted);
}

.doc a {
  color: var(--accent);
  text-decoration: underline;
}

/* ============ 20. Контакты ============ */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-block {
  margin-bottom: 28px;
}

.contact-block__label {
  font-size: 14px;
  margin-bottom: 6px;
}

.contact-block__value {
  color: var(--muted);
}

.contact-block__value a:hover {
  color: var(--accent);
}

.socials {
  display: flex;
  gap: 12px;
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.social:hover {
  background: var(--dark);
  transform: translateY(-3px);
}

/* ============ 21. Формы ============ */
.field {
  margin-bottom: 24px;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--dark-2);
}

.field__label .req {
  color: var(--accent);
}

.field__control {
  width: 100%;
  padding: 14px 16px;
  /* Не меньше 16px: Safari на iOS зумит страницу при фокусе на мелком поле */
  font-size: 16px;
  border: 1px solid var(--border-input);
  border-radius: 0;
  background: var(--white);
  font-family: inherit;
  color: var(--dark);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.field__control::placeholder {
  color: var(--muted-2);
}

.field__control:hover {
  border-color: var(--muted-2);
}

.field__control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 10, 143, 0.1);
}

textarea.field__control {
  min-height: 130px;
  resize: vertical;
}

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: #c0392b;
}

.field.has-error .field__control {
  border-color: #c0392b;
}

.field.has-error .field__error {
  display: block;
}

.form__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted-2);
}

.form__note a {
  color: var(--accent);
  text-decoration: underline;
}

.form__hint {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

.form__error-group {
  margin: -8px 0 20px;
  padding: 10px 14px;
  border-left: 3px solid #c0392b;
  background: #fdf0ee;
  font-size: 14px;
  color: #96281b;
}

.form__status {
  display: none;
  margin-top: 20px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 14px;
  color: var(--accent-dark);
}

.form__status.is-visible {
  display: block;
}

.form__status--err {
  border-left-color: #96281b;
  background: #fdf0ee;
  color: #96281b;
}

/* Поле-ловушка для роботов.
   Именно так, а не display:none и не hidden: часть спам-программ такие поля
   пропускает, а это заполняет — и заявка отсеивается. Человеку поле не видно,
   с клавиатуры на него не попасть (tabindex="-1"), для чтения с экрана
   родитель помечен aria-hidden. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============ 23. CTA ============ */
.cta {
  padding: 72px 0;
  background: var(--accent);
  color: var(--white);
  text-align: center;
}

.cta__title {
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 28px;
}

/* ============ 24. Подвал ============ */
.footer {
  padding: 64px 0 28px;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__logo {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--white);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer__title {
  margin-bottom: 20px;
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__list a {
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}

.footer__list a:hover {
  color: var(--white);
  padding-left: 6px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.footer .socials {
  margin-top: 20px;
}

.footer .social {
  background: rgba(255, 255, 255, 0.1);
}

.footer .social:hover {
  background: var(--accent);
}

/* ============ 24.1. Панель связи на телефоне ============ */
/* Аудитория приходит с телефона, а номер лежал только в бургере,
   подвале и на странице контактов. Здесь — связь в один тап. */
.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: env(safe-area-inset-bottom);
}

.callbar__btn {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  transition: background-color var(--dur) var(--ease);
}

.callbar__btn--wa {
  background: #128c7e;
}

.callbar__btn--wa:hover,
.callbar__btn--wa:active {
  background: #0f7267;
}

.callbar__btn--call {
  background: var(--accent);
}

.callbar__btn--call:hover,
.callbar__btn--call:active {
  background: var(--accent-dark);
}

.callbar__icon {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
}

@media (max-width: 960px) {
  .callbar {
    display: flex;
  }

  /* Чтобы панель не накрывала подвал */
  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  /* Кнопка «наверх» поднимается над панелью */
  .to-top {
    bottom: calc(68px + env(safe-area-inset-bottom));
  }
}

/* ============ 25. Кнопка «наверх» ============ */
.to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: var(--accent);
  color: var(--white);
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--dur) var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--dark);
}

/* ============ 26. Анимации появления ============ */
/* Появление включается классом js на <html> из main.js.
   Без JS (не загрузился, отключён) класса нет — и контент виден сразу,
   иначе сайт превратился бы в пустую белую страницу. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ 27. Адаптив ============ */
@media (max-width: 1100px) {
  .nav {
    display: none;
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 8px;
  }

  .steps::before {
    display: none;
  }
}

@media (max-width: 960px) {
  :root {
    --gutter: 24px;
  }

  .section {
    padding: 64px 0;
  }

  .features,
  .service-tiles,
  .service-cols,
  .projects-grid,
  .stats,
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }


  .about,
  .contacts-grid,
  .service-row,
  .project-intro {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-facts {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px 40px;
  }

  .project-hero {
    height: clamp(260px, 56vw, 460px);
  }

  .service-row {
    padding: 28px 24px;
  }

  .service-row__body {
    align-items: flex-start;
  }

  .service-more__list {
    grid-template-columns: 1fr;
  }


}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
    --header-h: 68px;
  }

  .hero {
    min-height: 520px;
    padding: 72px 0;
  }

  .logo {
    font-size: 18px;
  }

  .header__tools {
    gap: 14px;
  }

  .features,
  .service-tiles,
  .service-cols,
  .service-cols--narrow,
  .projects-grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }


  .shots {
    grid-template-columns: 1fr;
  }

  .shot--wide {
    grid-column: span 1;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox__btn--prev {
    left: 8px;
  }

  .lightbox__btn--next {
    right: 8px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 12px;
  }

  .filters {
    gap: 10px;
  }

  .filter {
    padding: 8px 18px;
    font-size: 11px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .to-top {
    right: 16px;
    bottom: 16px;
  }

  .drawer__panel {
    padding: 24px 20px;
  }
}

/* ============ 28. Печать и доступность ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .header,
  .drawer,
  .to-top,
  .cta,
  .footer {
    display: none;
  }
}
