/* =========================================================
   Стили публичного сайта. Подход mobile-first:
   базовые правила — для телефона, медиазапросы — для больших экранов
   ========================================================= */

/* ---------- Шрифты (локальные файлы, кириллица + латиница) ---------- */
@font-face { font-family: 'Cormorant'; src: url('/fonts/cormorant/cormorant-garamond-cyrillic-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* заголовки, кириллица */
@font-face { font-family: 'Cormorant'; src: url('/fonts/cormorant/cormorant-garamond-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; } /* заголовки, латиница */
@font-face { font-family: 'Cormorant'; src: url('/fonts/cormorant/cormorant-garamond-cyrillic-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* курсив, кириллица */
@font-face { font-family: 'Cormorant'; src: url('/fonts/cormorant/cormorant-garamond-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; } /* курсив, латиница */
@font-face { font-family: 'Cormorant'; src: url('/fonts/cormorant/cormorant-garamond-cyrillic-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* полужирный, кириллица */
@font-face { font-family: 'Cormorant'; src: url('/fonts/cormorant/cormorant-garamond-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; } /* полужирный, латиница */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope/manrope-cyrillic-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* текст, кириллица */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope/manrope-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; } /* текст, латиница */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope/manrope-cyrillic-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* средний, кириллица */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope/manrope-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; } /* средний, латиница */

/* ---------- Переменные: палитра и размеры ---------- */
:root {
  --bg: #f4efe8;          /* основной светло-бежевый фон */
  --bg-alt: #ebe3d8;      /* фон чередующихся секций */
  --paper: #faf7f2;       /* светлые карточки */
  --ink: #2a2520;         /* основной цвет текста */
  --ink-soft: #6b6157;    /* второстепенный текст */
  --line: #d6cbbd;        /* тонкие линии-разделители */
  --accent: #8c6a4f;      /* акцент: тёплый бронзовый */
  --dark: #35302a;        /* тёмная секция с формой */
  --serif: 'Cormorant', 'Times New Roman', serif; /* шрифт заголовков */
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; /* шрифт текста */
  --pad: 20px;            /* боковой отступ на телефоне */
  --max: 1240px;          /* максимальная ширина контента */
  --header-h: 64px;       /* высота шапки */
}
html { font-variant-numeric: lining-nums; } /* цифры одной высоты (у Cormorant по умолчанию «старинные» цифры) */

/* ---------- Базовые стили ---------- */
*, *::before, *::after { box-sizing: border-box; } /* размеры включают padding и рамку */
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; interpolate-size: allow-keywords; } /* плавная прокрутка к якорям с учётом шапки */
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; } /* фон, цвет и шрифт */
img { display: block; max-width: 100%; height: auto; } /* картинки не вылезают за контейнер */
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 4px; } /* ссылки в цвет текста */
a:hover { text-decoration-color: var(--accent); } /* подчёркивание при наведении */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.01em; } /* serif-заголовки */
p { margin: 0 0 1em; } /* отступ между абзацами */
p:last-child { margin-bottom: 0; } /* у последнего абзаца нет отступа */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; } /* видимый фокус для клавиатуры */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* скрыто визуально, доступно читалкам */

/* ---------- Контейнер и секции ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); } /* центрированный контейнер */
.section { padding: 72px 0; } /* вертикальные отступы секции */
.section--alt { background: var(--bg-alt); } /* чередующийся фон */
.section-head { display: grid; gap: 14px; margin-bottom: 40px; } /* шапка секции */
.eyebrow { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); } /* надзаголовок */
.h2 { font-size: clamp(34px, 7vw, 60px); } /* заголовок секции, растёт с шириной экрана */
.lead { color: var(--ink-soft); max-width: 60ch; } /* вводный текст */
.h2--sp { margin: 14px 0 28px; } /* заголовок с отступами (вне .section-head) */
.acc__title--sm { font-size: 22px; } /* маленький заголовок пункта */
.acc__title--md { font-size: 28px; } /* средний заголовок пункта */
.featured__acc { margin-top: 28px; } /* отступ над «подробнее» у избранного проекта */
.contacts__side { display: grid; gap: 28px; align-content: end; } /* правая колонка контактов */
.card .acc__title, .card .acc__meta { grid-column: 1 / 3; } /* в карточках нет номера слева */

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font: 500 14px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .25s, color .25s; } /* основная кнопка */
.btn:hover { background: transparent; color: var(--ink); } /* инверсия при наведении */
.btn--ghost { background: transparent; color: var(--ink); } /* контурная кнопка */
.btn--ghost:hover { background: var(--ink); color: var(--bg); } /* заливка при наведении */
.btn--light { background: var(--bg); color: var(--dark); border-color: var(--bg); } /* светлая кнопка на тёмном фоне */
.btn--light:hover { background: transparent; color: var(--bg); } /* наведение */

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(244, 239, 232, .92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; } /* липкая полупрозрачная шапка */
.header.is-scrolled { border-bottom-color: var(--line); } /* линия после прокрутки */
.header__in { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; } /* раскладка шапки */
.logo { font-family: var(--serif); font-size: 22px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* название студии */
.nav { display: none; } /* на телефоне меню скрыто */
.nav a { text-decoration: none; font-size: 14px; color: var(--ink-soft); transition: color .2s; } /* пункты меню */
.nav a:hover { color: var(--ink); } /* наведение */
.burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 0 10px; background: none; border: 0; cursor: pointer; } /* кнопка-гамбургер */
.burger span { display: block; height: 1px; background: var(--ink); transition: transform .3s, opacity .3s; } /* полоски */
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); } /* превращаем в крестик */
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); } /* вторая полоска крестика */
.header.is-open .nav { display: flex; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 4px; padding: 12px var(--pad) 28px; background: var(--bg); border-bottom: 1px solid var(--line); } /* открытое мобильное меню */
.header.is-open .nav a { padding: 12px 0; font-size: 18px; color: var(--ink); border-bottom: 1px solid var(--line); } /* крупные пункты для пальца */

/* ---------- Первый экран ---------- */
.hero { padding: 32px 0 64px; } /* отступы */
.hero__grid { display: grid; gap: 32px; } /* на телефоне — колонка */
.hero__title { font-size: clamp(36px, 7.5vw, 72px); text-wrap: balance; margin: 18px 0 22px; } /* крупный serif-заголовок */
.hero__title em { color: var(--accent); } /* курсив в заголовке акцентным цветом */
.hero__text { color: var(--ink-soft); font-size: 17px; max-width: 46ch; margin-bottom: 30px; } /* подзаголовок */
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; } /* кнопки */
.hero__media { aspect-ratio: 4 / 5; overflow: hidden; } /* вертикальное фото */
.hero__media img { width: 100%; height: 100%; object-fit: cover; } /* заполняет рамку */

/* Заглушка, когда фото ещё не загружено: мягкий градиент и «архитектурные» линии */
.ph { width: 100%; height: 100%; min-height: 220px; background:
  linear-gradient(90deg, transparent 49.8%, rgba(140,106,79,.18) 50%, transparent 50.2%),
  linear-gradient(0deg, transparent 69.8%, rgba(140,106,79,.18) 70%, transparent 70.2%),
  linear-gradient(135deg, #e6dccf, #d9ccbb); } /* линии и градиент */

/* ---------- О студии ---------- */
.about { display: grid; gap: 36px; } /* колонка на телефоне */
.about__media { aspect-ratio: 4 / 5; overflow: hidden; } /* рамка фото */
.about__media img { width: 100%; height: 100%; object-fit: cover; } /* заполнение */
.about__text { font-size: 17px; } /* текст чуть крупнее */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 24px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); } /* цифры */
.stat__num { font-family: var(--serif); font-size: 40px; line-height: 1; white-space: nowrap; } /* число (не переносится) */
.stat__label { font-size: 13px; color: var(--ink-soft); margin-top: 8px; } /* подпись */

/* ---------- Раскрывающиеся блоки по «+» (как на ub.design) ---------- */
.acc-list { border-top: 1px solid var(--line); } /* верхняя линия списка */
.acc { border-bottom: 1px solid var(--line); } /* линия под каждым пунктом */
.acc > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 6px 16px; padding: 24px 0; cursor: pointer; } /* строка-заголовок */
.acc > summary::-webkit-details-marker { display: none; } /* убираем стандартный треугольник в Safari */
.acc__num { font-family: var(--serif); font-size: 18px; color: var(--accent); width: 32px; padding-top: 4px; } /* номер пункта (фиксированная ширина для выравнивания) */
.acc__title { font-family: var(--serif); font-size: clamp(24px, 5vw, 34px); line-height: 1.15; } /* заголовок пункта */
.acc__meta { grid-column: 2; font-size: 14px; color: var(--ink-soft); } /* цена или краткое описание под заголовком */
.acc__price { color: var(--ink); font-weight: 500; } /* цена */
.plus { position: relative; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; grid-row: 1 / span 2; grid-column: 3; transition: background .3s, border-color .3s; } /* кружок с плюсом */
.plus::before, .plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1px; background: var(--ink); transform: translate(-50%, -50%); transition: transform .35s ease; } /* горизонтальная черта */
.plus::after { transform: translate(-50%, -50%) rotate(90deg); } /* вертикальная черта */
.acc[open] .plus { background: var(--ink); border-color: var(--ink); } /* открытый пункт — тёмный кружок */
.acc[open] .plus::before, .acc[open] .plus::after { background: var(--bg); } /* светлые черты */
.acc[open] .plus::after { transform: translate(-50%, -50%) rotate(0deg); } /* «+» превращается в «−» */
.acc > summary:hover .plus { border-color: var(--ink); } /* наведение */
.acc__body { padding: 0 0 28px; color: var(--ink-soft); max-width: 70ch; } /* раскрытое содержимое */
@media (min-width: 640px) { .acc__body { padding-left: 48px; } } /* 32px номер + 16px зазор */ /* выравниваем с заголовком */
/* Плавное раскрытие в современных браузерах (в остальных — мгновенно) */
.acc::details-content { block-size: 0; overflow: hidden; transition: block-size .45s ease, content-visibility .45s allow-discrete; } /* закрыто */
.acc[open]::details-content { block-size: auto; } /* открыто */

/* ---------- Этапы работы ---------- */
.steps .acc__num { font-size: 40px; line-height: 1; padding-top: 0; width: 56px; } /* крупные номера этапов */
@media (min-width: 640px) { .steps .acc__body { padding-left: 72px; } } /* выравнивание текста этапов */

/* ---------- Что вы получите ---------- */
.cards { display: grid; gap: 16px; } /* сетка карточек */
.card { background: var(--paper); padding: 28px 24px; border: 1px solid var(--line); } /* карточка */
.card .acc { border: 0; } /* внутри карточки без линий */
.card .acc > summary { padding: 0; } /* без отступов */
.card .acc__title { font-size: 28px; } /* заголовок карточки */
.card .acc__body { padding: 16px 0 0; } /* раскрытый текст */
.card__icon { font-family: var(--serif); font-size: 56px; line-height: 1; color: var(--accent); margin-bottom: 20px; } /* номер-иконка */

/* ---------- Избранный проект ---------- */
.featured { display: grid; gap: 28px; } /* колонка */
.featured__media { aspect-ratio: 3 / 2; overflow: hidden; } /* горизонтальное фото */
.featured__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; } /* лёгкий зум при наведении */
.featured__media:hover img { transform: scale(1.03); } /* зум */
.featured__title { font-size: clamp(36px, 7vw, 64px); margin: 10px 0 16px; } /* название проекта */
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); } /* город, год, площадь */

/* Галерея: горизонтальная лента, листается пальцем */
.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 12px; margin-top: 20px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; } /* лента с тонкой полосой прокрутки */
.gallery button { flex: 0 0 auto; width: 70%; max-width: 360px; aspect-ratio: 4 / 3; padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: start; } /* миниатюра-кнопка */
.gallery img { width: 100%; height: 100%; object-fit: cover; } /* заполнение */

/* Сетка остальных проектов */
.projects { display: grid; gap: 40px; margin-top: 64px; } /* сетка */
.project__media { aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 4px; } /* обложка */
.project__media img { width: 100%; height: 100%; object-fit: cover; } /* заполнение */
.project .acc > summary { grid-template-columns: 1fr auto; padding: 18px 0; } /* без номера */
.project .acc__meta { grid-column: 1; } /* мета под названием */
.project .plus { grid-column: 2; } /* плюс справа */
.project .acc__body { padding-left: 0; } /* без отступа слева */

/* ---------- Форма заявки ---------- */
.contact-form-section { background: var(--dark); color: var(--bg); } /* тёмная секция */
.contact-form-section .eyebrow { color: #c9a98a; } /* светлый акцент */
.contact-form-section .lead { color: #c8bfb3; } /* светлый вводный текст */
.cform { display: grid; gap: 40px; } /* колонка */
.form { display: grid; gap: 18px; } /* поля формы */
.field label { display: block; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #c8bfb3; margin-bottom: 6px; } /* подпись поля */
.field input, .field textarea { width: 100%; padding: 12px 0; background: transparent; border: 0; border-bottom: 1px solid #6e655b; color: var(--bg); font: 400 17px/1.5 var(--sans); border-radius: 0; transition: border-color .2s; } /* поле в одну линию */
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--bg); } /* фокус */
.field textarea { resize: vertical; min-height: 96px; } /* многострочное поле */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* ловушка для ботов, людям не видна */
.form__note { font-size: 12px; color: #a89e92; } /* мелкий текст под формой */
.form__status { min-height: 1.5em; font-size: 15px; } /* сообщение об отправке */
.form__status.is-ok { color: #b9d3a6; } /* успех */
.form__status.is-error { color: #f0b1a0; } /* ошибка */

/* ---------- Подход ---------- */
.approach { display: grid; gap: 32px; } /* колонка */
.approach__item { border-top: 1px solid var(--ink); padding-top: 20px; } /* пункт с линией сверху */
.approach__item h3 { font-size: 30px; margin-bottom: 12px; } /* заголовок */
.approach__item p { color: var(--ink-soft); } /* текст */

/* ---------- Контакты ---------- */
.contacts { display: grid; gap: 32px; } /* колонка */
.contacts__big { font-family: var(--serif); font-size: clamp(30px, 7vw, 52px); line-height: 1.15; text-decoration: none; display: block; word-break: break-word; } /* крупный телефон и email */
.contacts__row { display: grid; gap: 6px; } /* строка контакта */
.contacts__label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); } /* подпись */
.socials { display: flex; flex-wrap: wrap; gap: 10px; } /* соцсети */
.socials a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; transition: border-color .2s, background .2s; } /* «таблетки» соцсетей */
.socials a:hover { border-color: var(--ink); background: var(--paper); } /* наведение */

/* ---------- Карта ---------- */
.map { height: 360px; background: var(--bg-alt); } /* высота карты */
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.6) sepia(.15); } /* приглушённые цвета под стиль сайта */

/* ---------- Подвал ---------- */
.footer { padding: 56px 0 36px; font-size: 13px; background: #2f2924; color: #b8ad9f; } /* тёмно-коричневый подвал */
/* Низ страницы на iPhone. Safari при «отскоке» и под полупрозрачной нижней панелью
   показывает фон html, а не body. Поэтому фон html делаем цвета подвала (тогда внизу
   нет светлой полосы), а светлый фон страницы оставляем у body.
   Чтобы «отскок» сверху остался светлым, верхнюю половину экрана закрываем
   неподвижной светлой подложкой, которая лежит под body и видна только вне страницы. */
html:has(.footer) { background: #2f2924; } /* цвет подвала (только на страницах с подвалом) */
html:has(.footer)::before { content: ''; position: fixed; left: 0; right: 0; top: -100vh; height: 150vh; background: var(--bg); z-index: -1; pointer-events: none; } /* светлая подложка сверху */
.footer a:hover { color: #f4efe8; } /* светлеют при наведении */
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; } /* раскладка */
.footer a { text-decoration: none; } /* ссылки без подчёркивания */

/* ---------- Просмотр фото на весь экран ---------- */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(30, 26, 22, .94); } /* полноэкранный диалог */
.lightbox::backdrop { background: rgba(30, 26, 22, .6); } /* затемнение */
.lightbox img { width: 100%; height: 100%; object-fit: contain; padding: 56px 12px 12px; } /* фото целиком */
.lightbox__close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; background: none; border: 0; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; } /* крестик */
.lightbox__close { z-index: 2; } /* крестик поверх фото */
.lightbox__nav { position: absolute; top: 50%; z-index: 2; width: 48px; height: 72px; margin-top: -36px; background: rgba(30, 26, 22, .35); border: 0; color: #fff; font: 300 44px/1 var(--serif); cursor: pointer; opacity: .75; transition: opacity .2s, background .2s; } /* стрелка листания */
.lightbox__nav:hover, .lightbox__nav:focus-visible { opacity: 1; background: rgba(30, 26, 22, .7); } /* наведение */
.lightbox__prev { left: 4px; } /* стрелка влево */
.lightbox__next { right: 4px; } /* стрелка вправо */
.lightbox__nav[hidden] { display: none; } /* одно фото — стрелки не нужны */
.lightbox__count { position: absolute; top: 20px; left: 16px; color: rgba(255, 255, 255, .7); font-size: 13px; letter-spacing: .12em; } /* счётчик фото */
@media (min-width: 760px) { .lightbox__prev { left: 16px; } .lightbox__next { right: 16px; } .lightbox img { padding: 56px 80px 24px; } } /* на ПК стрелки не заходят на фото */

/* ---------- Появление при прокрутке ---------- */
.reveal { transition: opacity .9s ease, transform .9s ease; } /* без JS блоки просто видны */
.reveal--pre { opacity: 0; transform: translateY(24px); } /* скрыт до прокрутки (класс ставит site.js) */
.reveal--pre.is-in { opacity: 1; transform: none; } /* появился */
@media (prefers-reduced-motion: reduce) { /* уважаем настройку «уменьшить движение» */
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .acc::details-content { transition: none; }
}

/* =================== Планшеты (от 640px) =================== */
@media (min-width: 640px) {
  :root { --pad: 32px; } /* больше боковые отступы */
  .cards { grid-template-columns: repeat(2, 1fr); } /* две карточки в ряд */
  .projects { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; } /* два проекта в ряд */
  .approach { grid-template-columns: repeat(2, 1fr); } /* два пункта в ряд */
  .gallery button { width: 46%; } /* миниатюры меньше */
  .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } /* имя и контакт в одну строку */
}

/* =================== Компьютеры (от 1000px) =================== */
@media (min-width: 1000px) {
  :root { --pad: 48px; --header-h: 80px; } /* шире поля, выше шапка */
  .section { padding: 120px 0; } /* больше воздуха */
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: 64px; } /* заголовок слева, текст справа */
  .section-head .eyebrow { grid-column: 1 / -1; } /* надзаголовок на всю ширину */
  .hero { padding: 48px 0 120px; } /* отступы */
  .hero__grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 64px; } /* текст + фото */
  .about { grid-template-columns: 5fr 6fr; gap: 96px; align-items: center; } /* фото + текст */
  .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; } /* три карточки */
  .card { padding: 40px 32px; } /* больше отступов */
  .featured { grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; } /* фото + описание */
  .projects { grid-template-columns: repeat(3, 1fr); } /* три проекта в ряд */
  .cform { grid-template-columns: 5fr 6fr; gap: 96px; } /* текст + форма */
  .approach { grid-template-columns: repeat(3, 1fr); gap: 48px; } /* три пункта */
  .contacts { grid-template-columns: 1.2fr 1fr; gap: 64px; } /* две колонки */
  .map { height: 460px; } /* выше карта */
  .gallery button { width: 30%; } /* миниатюры ещё меньше */
}

/* =================== Широкие экраны (от 1100px): меню в строку =================== */
@media (min-width: 1100px) {
  .burger { display: none; } /* гамбургер не нужен */
  .nav { display: flex; gap: 32px; align-items: center; white-space: nowrap; } /* меню в строку */
}

/* ---------- Доработки под макет ---------- */
.hero .stats { margin-top: 48px; } /* цифры под первым экраном */
.stat { padding-right: 12px; } /* отступ между цифрами */
.fstats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 28px; margin-top: 8px; } /* характеристики избранного проекта */
.fstats__num { font-family: var(--serif); font-size: 28px; line-height: 1.1; } /* значение */
.footer__cols { display: grid; gap: 28px; padding-bottom: 28px; margin-bottom: 20px; border-bottom: 1px solid rgba(244, 239, 232, .14); } /* колонки подвала */
.footer__cols a { display: block; padding: 3px 0; } /* ссылки столбиком */
.footer__brand { font-family: var(--serif); font-size: 26px; color: #f4efe8; margin-bottom: 4px; } /* название в подвале */
.footer__h { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #c9a98a; margin-bottom: 8px; } /* заголовок колонки */
@media (min-width: 640px) {
  .footer__cols { grid-template-columns: 2fr 1fr 1.4fr; } /* три колонки */
  .stat + .stat { border-left: 1px solid var(--line); padding-left: 24px; } /* разделители между цифрами */
}
/* Этапы на компьютере — в ряд с кружками-номерами, как на макете; подробности всё так же по «+» */
@media (min-width: 1000px) {
  .steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 24px; border-top: 0; position: relative; } /* этапы в строку */
  .steps::before { content: ''; position: absolute; top: 32px; left: 10%; right: 10%; border-top: 1px dashed var(--line); } /* пунктир между кружками */
  .steps .acc { border-bottom: 0; } /* без линий */
  .steps .acc > summary { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 0; } /* содержимое по центру */
  .steps .acc__num { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; background: var(--bg-alt); font-size: 30px; position: relative; } /* номер в кружке */
  .steps .acc__title { font-size: 24px; } /* название этапа */
  .steps .plus { order: 5; } /* плюс внизу */
  .steps .acc__body { padding: 16px 0 0; text-align: center; font-size: 14px; } /* подробности под этапом */
}
/* ---------- Согласие, cookie, документы ---------- */
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 12px; } /* маленькая кнопка */
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: #c8bfb3; cursor: pointer; } /* галочка согласия */
.consent input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #c9a98a; } /* крупный чекбокс */
.consent a { color: var(--bg); } /* ссылки на документы */
.map__stub { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; color: var(--ink-soft); font-size: 14px; } /* заглушка вместо карты */
.map__stub p { margin: 0; max-width: 40ch; } /* текст заглушки */
.footer__docs { display: flex; flex-wrap: wrap; gap: 6px 18px; } /* ссылки на документы в подвале */
.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; display: grid; gap: 14px; max-width: 760px; margin: 0 auto; padding: 18px 20px; background: #2f2924; color: #e8dfd3; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); font-size: 14px; line-height: 1.5; } /* плашка внизу экрана */
.cookie[hidden] { display: none; } /* скрыта до проверки выбора */
.cookie__text { margin: 0; } /* текст */
.cookie__text a { color: #f4efe8; } /* ссылки */
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; } /* кнопки */
.cookie__min { background: transparent; color: #f4efe8; border-color: #8a7f72; } /* «только необходимые» — контурная */
.cookie__min:hover { background: #f4efe8; color: #2f2924; } /* наведение */
@media (min-width: 760px) { .cookie { grid-template-columns: 1fr auto; align-items: center; } } /* на ПК — в одну строку */
.doc__in { max-width: 820px; } /* узкая колонка для чтения */
.doc__h { font-size: 28px; margin: 36px 0 12px; } /* подзаголовок документа */
.doc ul { padding-left: 20px; margin: 0 0 1em; } /* списки */
.doc li { margin-bottom: 6px; } /* пункты */
.doc__nav { display: grid; gap: 8px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); } /* другие документы */
/* ---------- Форматирование текста из визуального редактора ----------
   Редактор ставит только эти классы (inline-стили запрещены политикой безопасности CSP) */
.c-ink { color: var(--ink); } /* основной тёмный */
.c-soft { color: var(--ink-soft); } /* приглушённый */
.c-accent { color: var(--accent); } /* бронзовый акцент */
.c-gold { color: #b08d57; } /* золотистый */
.c-terra { color: #a0583c; } /* терракотовый */
.c-light { color: #f4efe8; } /* светлый (для тёмного подвала и формы) */
.f-serif { font-family: var(--serif); } /* шрифт заголовков */
.f-sans { font-family: var(--sans); } /* шрифт текста */
.z-sm { font-size: .85em; } /* мельче */
.z-lg { font-size: 1.25em; } /* крупнее */
.z-xl { font-size: 1.6em; line-height: 1.2; } /* очень крупно */
.a-left { text-align: left; } /* выравнивание влево */
.a-center { text-align: center; } /* по центру */
.a-right { text-align: right; } /* вправо */
span.a-left, span.a-center, span.a-right { display: block; } /* выравнивание однострочного текста */
.lead > p { margin: 0 0 .7em; } /* абзацы во вводном тексте */
.lead > p:last-child { margin-bottom: 0; }

/* ---------- Варианты внутри услуги (раскрываются под «+») ---------- */
.opts { display: grid; gap: 22px; margin-top: 6px; } /* список вариантов */
.opt { padding-top: 18px; border-top: 1px solid var(--line); } /* один вариант, отделён линией */
.opt:first-child { border-top: 0; padding-top: 0; } /* у первого линии нет */
.opt__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; } /* название и цена в строку */
.opt__title { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); } /* выделенное название */
.opt__price { color: var(--accent); font-weight: 600; white-space: nowrap; } /* цена */
.opt__text { margin-top: 8px; color: var(--ink-soft); } /* описание обычным шрифтом */
.opt__text p { margin: 0 0 .6em; } /* абзацы описания */
.opt__text p:last-child { margin-bottom: 0; }

/* Размер шрифта из списка (как в Word). На телефоне крупные размеры уменьшаются, чтобы не ломать вёрстку */
.z-10 { font-size: 10px; }
.z-12 { font-size: 12px; }
.z-14 { font-size: 14px; }
.z-16 { font-size: 16px; }
.z-18 { font-size: 18px; }
.z-20 { font-size: 20px; }
.z-24 { font-size: clamp(20px, 6.4vw, 24px); line-height: 1.2; }
.z-28 { font-size: clamp(20px, 7.5vw, 28px); line-height: 1.2; }
.z-32 { font-size: clamp(21px, 8.5vw, 32px); line-height: 1.2; }
.z-40 { font-size: clamp(26px, 10.7vw, 40px); line-height: 1.2; }
.z-48 { font-size: clamp(31px, 12.8vw, 48px); line-height: 1.2; }


.map[hidden] { display: none; } /* блок карты скрыт, пока не принято «Принять все» в плашке cookie */

/* Кнопка «Оставить заявку» в шапке: коричневая, в тон подвала, чтобы выделялась */
.header .nav a.btn { background: #2f2924; border-color: #2f2924; color: #f4efe8; padding: 0 22px; } /* заливка и светлый текст */
.header .nav a.btn:hover, .header .nav a.btn:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; } /* наведение — бронзовый */
.header.is-open .nav a.btn { margin-top: 12px; padding: 14px 22px; border-bottom: 1px solid #2f2924; font-size: 14px; } /* в мобильном меню — отдельной кнопкой */

/* ---------- Ярлычки соцсетей (круглые иконки) ---------- */
.soc { display: flex; flex-wrap: wrap; gap: 10px; } /* ряд иконок */
.soc__a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); text-decoration: none; transition: background .25s, color .25s, border-color .25s; } /* круг 44px — удобно нажимать пальцем */
.soc__a:hover, .soc__a:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--bg); } /* наведение */
.soc--footer { margin-top: 18px; } /* в подвале — отступ от текста */
.soc--footer .soc__a { border-color: #5a5148; color: #e8dfd3; } /* светлые на тёмном */
.soc--footer .soc__a:hover, .soc--footer .soc__a:focus-visible { background: #f4efe8; border-color: #f4efe8; color: #2f2924; }
/* Ярлычки соцсетей: более точный селектор, чтобы правила ссылок подвала (display: block) их не ломали */
.soc .soc__a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; line-height: 0; }
.soc .soc__a svg { display: block; width: 20px; height: 20px; flex: none; } /* иконка строго по центру круга */

/* ---------- Первый экран: фото во весь экран на фоне ---------- */
/* Шапка над фото: пока страница не прокручена — прозрачная со светлым текстом */
body:has(.hero--photo) .header:not(.is-scrolled):not(.is-open) { background: transparent; backdrop-filter: none; } /* фото видно сквозь шапку */
body:has(.hero--photo) .header:not(.is-scrolled):not(.is-open) .logo { color: #fff; } /* название — белым */
body:has(.hero--photo) .header:not(.is-scrolled):not(.is-open) .nav a:not(.btn) { color: rgba(255, 255, 255, .85); } /* пункты меню — светлые */
body:has(.hero--photo) .header:not(.is-scrolled):not(.is-open) .nav a:not(.btn):hover { color: #fff; } /* наведение */
body:has(.hero--photo) .header:not(.is-scrolled):not(.is-open) .burger span { background: #fff; } /* гамбургер — белый */
.header { transition: border-color .3s, background-color .3s; } /* плавно становится светлой при прокрутке */

.hero--photo { position: relative; margin-top: calc(-1 * var(--header-h)); min-height: max(560px, 100svh); padding: 0; display: flex; align-items: flex-end; overflow: hidden; background: #2f2924; color: #fff; isolation: isolate; } /* заезжает под шапку, на весь экран */
.hero__bg { position: absolute; inset: 0; z-index: -1; } /* слой с фото */
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(28, 22, 18, .72) 0%, rgba(28, 22, 18, .42) 60%, rgba(28, 22, 18, .28) 100%), linear-gradient(0deg, rgba(28, 22, 18, .55) 0%, rgba(28, 22, 18, 0) 35%), linear-gradient(180deg, rgba(28, 22, 18, .45) 0%, rgba(28, 22, 18, 0) 22%); } /* затемнение (и сверху — под шапкой): текст всегда читается */
.hero__slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; } /* все фото друг на друге, видно только активное */
.hero__slide.is-active { opacity: 1; } /* текущее фото */
.hero__slide.is-active, .hero__slide.is-zoom { animation: heroZoom 9s ease-out forwards; } /* медленное приближение (продолжается, пока фото гаснет) */
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.12); } }

.hero__content { position: relative; width: 100%; padding-top: calc(var(--header-h) + 48px); padding-bottom: 110px; } /* текст поверх фото */
.hero--photo .eyebrow { color: #e0c6a8; } /* надзаголовок — светлая бронза */
.hero--photo .hero__title { color: #fff; max-width: 18ch; } /* крупный белый заголовок */
.hero--photo .hero__text { color: rgba(255, 255, 255, .82); } /* подзаголовок */
.btn--light { background: #f4efe8; border-color: #f4efe8; color: #2f2924; } /* светлая кнопка на фото */
.btn--light:hover, .btn--light:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; } /* наведение — бронзовый */
.btn--ghost-light { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; } /* контурная светлая */
.btn--ghost-light:hover, .btn--ghost-light:focus-visible { background: #fff; border-color: #fff; color: #2f2924; } /* наведение */
.hero__edit { display: inline-block; margin-top: 24px; padding: 8px 14px; border: 1px dashed rgba(255, 255, 255, .7); border-radius: 999px; color: #fff; font-size: 14px; text-decoration: none; } /* только в режиме правки */

/* Полоски-переключатели внизу: активная заполняется за время показа фото */
.hero__dots { position: absolute; left: 0; right: 0; bottom: 36px; display: flex; justify-content: center; gap: 10px; z-index: 2; } /* по центру внизу */
.hero__dot { width: 44px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; } /* большая зона для пальца */
.hero__dot span { position: relative; display: block; width: 100%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; } /* полоска */
.hero__dot span::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; } /* заполнение */
.hero__dot.is-active span::after { animation: heroDot 7s linear forwards; } /* заполняется за 7 секунд */
.hero__dot:hover span { background: rgba(255, 255, 255, .6); } /* наведение */
@keyframes heroDot { to { transform: scaleX(1); } }
@media (min-width: 760px) { .hero__dot { width: 72px; } } /* на ПК полоски длиннее */
@media (min-width: 1000px) { .hero__content { padding-bottom: 150px; } } /* больше воздуха снизу */

/* Без анимаций для тех, кто отключил их в системе */
@media (prefers-reduced-motion: reduce) {
  .hero__slide.is-active, .hero__slide.is-zoom { animation: none; } /* без приближения */
  .hero__dot.is-active span::after { animation: none; transform: scaleX(1); } /* полоска сразу заполнена */
}

/* Цифры под первым экраном */
.hero-stats .stats { margin-top: 0; border-top: 0; padding: 48px 0 64px; } /* отдельной полосой под фото */

/* ---------- Отзывы ---------- */
.reviews { display: grid; gap: 16px; } /* карточки столбиком на телефоне */
@media (min-width: 700px) { .reviews { grid-template-columns: 1fr 1fr; gap: 20px; } } /* две колонки на планшете */
@media (min-width: 1100px) { .reviews { grid-template-columns: repeat(3, 1fr); } } /* три на ПК */
.reviews.is-collapsed .review:nth-child(n+7) { display: none; } /* скрываем лишние, пока не нажали «Показать все» */
.review { margin: 0; padding: 26px 24px; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; } /* карточка отзыва */
.review__stars { color: var(--accent); font-size: 17px; letter-spacing: 3px; } /* закрашенные звёзды */
.review__stars span { color: var(--line); } /* пустые звёзды */
.review__text { margin: 0; flex: 1; font: 400 21px/1.45 var(--serif); white-space: pre-line; overflow-wrap: anywhere; } /* текст: переносы строк как у автора, длинные слова не ломают вёрстку */
.review__meta { font-size: 13px; color: var(--ink-soft); letter-spacing: .04em; } /* имя и дата */
.review__meta b { color: var(--ink); font-weight: 600; } /* имя */
.reviews__more { margin-top: 24px; text-align: center; } /* кнопка «Показать все» */

/* Форма отзыва (под кнопкой «Оставить отзыв») */
.rform-wrap { margin-top: 36px; } /* отступ от отзывов */
.rform-wrap > summary { list-style: none; } /* без треугольника */
.rform-wrap > summary::-webkit-details-marker { display: none; } /* то же для Safari */
.rform-wrap[open] > summary { display: none; } /* открыли — кнопка больше не нужна */
.rform { display: grid; gap: 18px; max-width: 640px; } /* поля столбиком */
.rfield label, .stars legend { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; padding: 0; } /* подписи полей */
.rfield input, .rfield textarea { width: 100%; padding: 12px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: 400 17px/1.5 var(--sans); border-radius: 0; } /* поле в одну линию */
.rfield input:focus, .rfield textarea:focus { outline: none; border-bottom-color: var(--ink); } /* фокус */
.rfield textarea { resize: vertical; min-height: 110px; } /* многострочное */
.stars { border: 0; margin: 0; padding: 0; } /* группа звёзд без рамки */
.stars__row { display: inline-flex; flex-direction: row-reverse; gap: 2px; } /* обратный порядок: так CSS подсвечивает выбранную и все левее */
.stars__row input { position: absolute; opacity: 0; width: 1px; height: 1px; } /* сами кнопки скрыты, видны звёзды */
.stars__row label { font-size: 34px; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; transition: color .15s; } /* звезда */
.stars__row input:checked ~ label, .stars__row label:hover, .stars__row label:hover ~ label { color: var(--accent); } /* выбранная и все до неё; при наведении — предпросмотр */
.stars__row:hover input:checked ~ label:not(:hover):not(:hover ~ label) { color: var(--line); } /* при наведении показываем только предпросмотр */
.stars__row input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; } /* фокус с клавиатуры */
.consent--dark { color: var(--ink-soft); } /* галочка согласия на светлом фоне */
.consent--dark a { color: var(--ink); } /* ссылки на документы */
.consent--dark input { accent-color: var(--accent); } /* цвет галочки */
.rform__status { min-height: 1.5em; font-size: 15px; } /* результат отправки */
.rform__status.is-ok { color: #3f7a4a; } /* успех */
.rform__status.is-error { color: #b3473a; } /* ошибка */
