/* Alva — публичный сайт.
   Образ: белёная стена Алгарве (cal), синяя «барра» вокруг проёмов, волна calçada.
   Один смелый приём — барра вокруг фото главного экрана; остальное спокойно. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/SchibstedGrotesk-var.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/SchibstedGrotesk-Italic-var.woff2") format("woff2");
  font-weight: 400 900; font-style: italic; font-display: swap;
}

:root {
  --cal: #FBFBF9;          /* побелка */
  --cal-2: #F1F2EF;        /* тень на стене */
  --ink: #17232E;          /* сланец */
  --ink-2: #4A5561;
  --barra: #1F4E8C;        /* синяя барра */
  --barra-dark: #173D6E;
  --ocre: #E0A526;         /* охра — точечно */
  --pedra: #D9DCD8;        /* светлый камень */
  --pedra-dark: #3A3F3C;   /* тёмный камень calçada */
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 82rem;
  --gutter: clamp(1.1rem, 4vw, 3rem);
  --section: clamp(4.5rem, 8vw, 7.5rem);
  --radius: 8px;
  --radius-media: 14px;
  --shadow-soft: 0 18px 50px rgba(23,35,46,.08);
  --shadow-lift: 0 22px 60px rgba(23,35,46,.13);
  --focus: 0 0 0 3px var(--cal), 0 0 0 6px var(--barra);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0; background: var(--cal); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  font-feature-settings: "ss01";
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }

img { max-width: 100%; display: block; }
a { color: var(--barra); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 2px; }

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; font-weight: 700; line-height: 1.25; }
p { margin: 0; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 40rem; }
.muted { color: var(--ink-2); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 56rem; }
/* Статья выровнена по левому краю, как весь сайт; ширина строки ограничена внутри */
.wrap--article > * { max-width: 46rem; }

.skip { position: absolute; left: -999px; top: 0; padding: .75rem 1rem; background: var(--ink); color: #fff; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--sm { width: 1em; height: 1em; }

/* --------------------------------------------------------------- Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3rem; padding: .7rem 1.35rem; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn--primary:hover { box-shadow: 0 10px 24px rgba(31,78,140,.18); }
}
.btn--lg { min-height: 3.5rem; padding: .85rem 1.6rem; font-size: 1.0625rem; }
.btn--sm { min-height: 2.5rem; padding: .45rem 1rem; font-size: .9375rem; }
.btn--primary { background: var(--barra); color: #fff; }
.btn--primary:hover { background: var(--barra-dark); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--cal-2); }
.btn--ghost-light { border-color: rgba(255,255,255,.6); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.link-more { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; text-decoration: none; }
.link-more:hover { text-decoration: underline; }

/* --------------------------------------------------------------- Шапка */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(217,220,216,.8);
  background: rgba(251,251,249,.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-header__in { display: flex; align-items: center; gap: 1.35rem; min-height: 4.75rem; }
.logo {
  min-width: 0; font-weight: 900; font-size: 1.55rem; letter-spacing: -.04em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  padding-bottom: .12rem; border-bottom: 3px solid var(--barra); line-height: 1;
}
.site-nav { display: flex; gap: clamp(1rem, 2vw, 1.6rem); margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 550; font-size: .9375rem; }
.site-nav a:hover { color: var(--barra); }
.langs { display: flex; gap: .1rem; flex: none; }
.langs a {
  padding: .35rem .45rem; font-size: .78125rem; font-weight: 750; letter-spacing: .03em;
  color: var(--ink-2); text-decoration: none; border-radius: 6px;
}
.langs a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--barra); }
.menu { display: none; }

@media (max-width: 64rem) {
  .site-nav, .site-header__cta { display: none; }
  .langs { margin-left: auto; }
  .menu { display: block; position: relative; }
  .menu summary {
    list-style: none; cursor: pointer; font-weight: 700; padding: .5rem .75rem;
    border: 1.5px solid var(--ink); border-radius: var(--radius);
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu__panel {
    position: absolute; right: 0; top: calc(100% + .65rem); z-index: 20;
    width: min(18rem, calc(100vw - 2rem));
    display: grid; background: rgba(255,255,255,.98);
    border: 1px solid var(--pedra); border-radius: 12px;
    box-shadow: var(--shadow-lift); padding: .5rem;
  }
  .menu__panel a {
    padding: .8rem .9rem; color: var(--ink); text-decoration: none;
    font-weight: 600; border-radius: 7px;
  }
  .menu__panel a:hover { background: var(--cal-2); }
}
@media (max-width: 34rem) {
  .site-header__in { gap: .65rem; min-height: 4.25rem; }
  .logo { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; font-size: 1.35rem; }
  .langs a { padding-inline: .32rem; }
  .menu summary { padding-inline: .6rem; }
}

/* --------------------------------------------------------------- Главный экран */
.hero {
  padding-block: 1.25rem 2.25rem;
  overflow: clip;
}

.hero__stage {
  position: relative;
  display: grid;
  gap: 1.5rem;
}

.hero__visual {
  margin: 0;
  overflow: hidden;
  background: var(--pedra);
}

.hero__visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.hero__panel {
  display: grid;
  gap: 1.35rem;
}

.hero__text {
  min-width: 0;
  display: grid;
  gap: clamp(1rem, 1.8vw, 1.4rem);
}

.hero__title {
  max-width: 17ch;
  font-size: clamp(2.45rem, 7vw, 3.4rem);
  line-height: 1.035;
  letter-spacing: -.045em;
}

.hero__text > .lead {
  max-width: 39rem;
  line-height: 1.5;
}

.hero__note {
  max-width: 36rem;
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.5;
}

.hero__facts {
  list-style: none;
  margin: 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--pedra);
  display: grid;
  gap: .45rem;
  font-size: .9rem;
}

.hero__facts li {
  position: relative;
  padding-left: 1rem;
}

.hero__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .57em;
  width: .34rem;
  height: .34rem;
  background: var(--barra);
}


/* ---------------------------------------------------------------
   Большой desktop.
   Фото — основное поле, панель — спокойная editorial-плоскость.
   Overlay включаем только там, где для него действительно есть место.
   --------------------------------------------------------------- */
@media (min-width: 72rem) {
  .hero {
    padding-block: 1.25rem 2rem;
  }

  .hero__stage {
    height: clamp(35rem, calc(100svh - 7.75rem), 41rem);
    min-height: 35rem;
    display: flex;
    /* Панель на всю высоту сцены: фото не просвечивает над/под ней слева. */
    align-items: stretch;
    isolation: isolate;
  }

  .hero__visual {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  .hero__visual img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;

    /* Панель закрывает левую часть изображения:
       смещение вправо сохраняет гостиную и кухню в видимой зоне. */
    object-position: 62% center;
  }

  .hero__panel {
    position: relative;
    z-index: 1;

    width: min(46.5%, 39rem);
    /* Панель прижата к левому краю сетки: раньше слева от неё
       просвечивала узкая полоса фото. Текст стоит по линии логотипа. */
    margin-left: 0;

    padding:
      clamp(1.8rem, 2.7vw, 2.6rem)
      clamp(1.9rem, 3vw, 2.85rem)
      clamp(1.8rem, 2.7vw, 2.6rem)
      0;

    background: var(--cal);

    display: grid;
    align-content: center;
    gap: clamp(1.15rem, 1.7vw, 1.55rem);
  }

  /* Минимальный фирменный акцент вместо рамки, тени или glass UI. */
  .hero__panel::before {
    content: "";
    width: 2.75rem;
    height: 2px;
    margin-bottom: .1rem;
    background: var(--barra);
  }

  .hero__title {
    max-width: 15.5ch;
    font-size: clamp(3rem, 3.45vw, 3.45rem);
    line-height: 1.025;
    letter-spacing: -.05em;
  }

  .hero__text > .lead {
    max-width: 33rem;
    font-size: clamp(1.025rem, 1.15vw, 1.15rem);
    line-height: 1.47;
  }

  .hero__note {
    max-width: 31rem;
    font-size: .85rem;
    line-height: 1.48;
  }

  .hero__facts {
    max-width: 33rem;
    padding-top: .9rem;
    gap: .35rem;
    font-size: .8125rem;
    line-height: 1.42;
  }

  .hero .cta-row {
    gap: .6rem;
  }

  .hero .btn--lg {
    min-height: 3.15rem;
    padding: .7rem 1.25rem;
    font-size: .975rem;
  }
}


/* Широкие экраны: немного больше пространства внутри панели,
   но типографика не раздувается вместе с viewport. */
@media (min-width: 90rem) {
  .hero__stage {
    height: clamp(37rem, calc(100svh - 7.75rem), 43rem);
  }

  .hero__panel {
    width: min(45%, 39.5rem);
    margin-left: 0;
    padding-inline: 0 3rem;
  }

  .hero__title {
    max-width: 16ch;
    font-size: 3.5rem;
  }

  .hero__visual img {
    object-position: 60% center;
  }
}


/* Невысокий desktop: весь полезный Hero остаётся в первом экране. */
@media (min-width: 72rem) and (max-height: 50rem) {
  .hero {
    padding-block: .9rem 1.4rem;
  }

  .hero__stage {
    height: calc(100svh - 6.75rem);
    min-height: 31rem;
  }

  .hero__panel {
    width: min(47%, 38rem);
    padding-block: 1.55rem;
    gap: 1rem;
  }

  .hero__panel::before {
    margin-bottom: 0;
  }

  .hero__title {
    font-size: clamp(2.65rem, 3.2vw, 3.15rem);
  }

  .hero__text {
    gap: .9rem;
  }

  .hero__text > .lead {
    font-size: 1rem;
    line-height: 1.42;
  }

  .hero__note {
    font-size: .8125rem;
  }

  .hero__facts {
    padding-top: .75rem;
    font-size: .775rem;
  }

  .hero .btn--lg {
    min-height: 3rem;
    padding-block: .65rem;
  }
}


/* ---------------------------------------------------------------
   Laptop / tablet landscape.
   Здесь overlay уже начинает зажимать PT/FR, поэтому обычный поток.
   --------------------------------------------------------------- */
@media (min-width: 40rem) and (max-width: 71.999rem) {
  .hero {
    padding-block: 2.75rem 4.75rem;
  }

  .hero__stage {
    gap: 2rem;
  }

  .hero__panel {
    order: 1;
    max-width: 46rem;
  }

  .hero__visual {
    order: 2;
  }

  .hero__title {
    max-width: 16ch;
  }

  .hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1.5rem;
  }

  .hero__visual img {
    aspect-ratio: 16 / 9;
    object-position: center;
  }
}


/* ---------------------------------------------------------------
   Mobile — сохраняем уже удачную линейную композицию.
   --------------------------------------------------------------- */
@media (max-width: 39.999rem) {
  .hero {
    padding-block: 2.25rem 4rem;
  }

  .hero__stage {
    gap: 1.5rem;
  }

  .hero__panel {
    order: 1;
  }

  .hero__visual {
    order: 2;
  }

  .hero__title {
    max-width: 15ch;
    font-size: clamp(2.35rem, 11vw, 3.4rem);
  }

  .hero .cta-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero .cta-row .btn {
    width: 100%;
  }

  .hero__visual img {
    aspect-ratio: 4 / 3;
    object-position: center;
    border-radius: 8px;
  }
}

/* Барра — узнаваемая синяя линия вокруг архитектурного «проёма». */
.barra {
  border: clamp(5px, .6vw, 8px) solid var(--barra);
  background: var(--barra); position: relative;
}
.barra--thin { border-width: 5px; }

/* Иллюстрация фасада (когда фото главного экрана не загружено) */
.facade { width: 100%; height: auto; }
.facade .f-sky { fill: #E6EEF6; }
.facade .f-wall { fill: #fff; }
.facade .f-line { stroke: var(--ink); stroke-width: 2; fill: none; }
.facade .f-wall.f-line { fill: #fff; }
.facade .f-barra { fill: var(--barra); }
.facade .f-door { fill: var(--ink); }
.facade .f-knob { fill: var(--ocre); }
.facade .f-glass { fill: #CFDDEB; }
.facade .f-hole { fill: var(--ink); }
.facade .f-ochre { fill: var(--ocre); }
.facade .f-ground { fill: var(--pedra); }
.facade .f-wave { fill: none; stroke: var(--pedra-dark); stroke-width: 6; }

/* Акция под главным экраном */
.promo { background: var(--ink); color: #fff; }
.promo__in { padding-block: 1rem; }
.promo p { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.promo__tag { color: var(--ocre); font-weight: 700; }
.promo a { color: #fff; font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; }

/* --------------------------------------------------------------- Секции */
.section { padding-block: var(--section); }
.section--tint { background: var(--cal-2); }
.section--page { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.section__head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 46rem; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; }
.section__head--row > div { display: grid; gap: 1rem; max-width: 46rem; }
.section__lead { color: var(--ink-2); font-size: 1.125rem; }

/* ---------------------------------------------------------------
   3D architectural fragments.

   Каждый объект живёт в своей ячейке сетки и не перекрывает текст:
   assembly  — под коллажем «Услуг» (левая колонка);
   materials — боковая колонка рядом с кейсами;
   calçada   — пустая ячейка сетки «Как мы работаем»;
   arch      — левая колонка FAQ под заголовком (sticky).
   На mobile/tablet скрыты: свободных ячеек там нет, объекты лишь удлинили бы страницу.

   Ассеты — квадрат 800×800 с альфой, без запечённой тени.
   --decor-floor — доля прозрачного поля под объектом (замер alpha-bbox),
   по ней ставится контактная тень, чтобы объект «стоял», а не висел.
   --------------------------------------------------------------- */
.decor3d {
  --decor-floor: 0%;
  --decor-drift: 1.25rem;
  display: none;
  position: relative;
  isolation: isolate;
  margin: 0;
  pointer-events: none;
  user-select: none;
}

.decor3d img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

/* Контактная тень: центр эллипса на «полу» объекта. */
.decor3d::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 14%;
  right: 14%;
  bottom: calc(var(--decor-floor) - 3.5%);
  height: 7%;
  background: radial-gradient(closest-side, rgba(23,35,46,.18), rgba(23,35,46,0));
}

/* Calçada занимает по высоте только полосу 155…700 из 800:
   рамка обрезается до 800×546, позиция 61% = 155 / (800 − 546). */
.decor3d--calcada img {
  aspect-ratio: 800 / 546;
  object-fit: cover;
  object-position: 50% 61%;
}

.decor3d--calcada::after {
  content: none;
}

.projects-stage {
  min-width: 0;
}


@media (min-width: 72rem) {
  .decor3d {
    display: block;
  }

  /* ASSEMBLY — строка 1: коллаж, строка 2: разрез; список услуг занимает обе
     строки справа. 1fr забирает остаток высоты списка, коллаж не растягивается. */
  .services-layout {
    grid-template-rows: auto 1fr;
  }

  .services-media {
    grid-column: 1;
    grid-row: 1;
  }

  .services {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .decor3d--assembly {
    --decor-floor: 1.5%;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: center;
    width: min(88%, 26rem);
    margin-top: clamp(1.5rem, 3vw, 2.75rem);
  }

  /* MATERIALS — боковая колонка, центр по высоте блока кейсов. */
  .projects-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(18rem, 24vw, 22rem);
    gap: clamp(2.5rem, 4vw, 4rem);
    align-items: center;
  }

  .projects-stage > .cards--projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .projects-stage > .cards--projects > .card--media:first-child {
    grid-column: span 2;
  }

  .decor3d--materials {
    --decor-floor: 5.4%;
    width: 100%;
    justify-self: center;
  }

  /* CALÇADA — закрывает пустую ячейку сетки 3×N (условие — в шаблоне). */
  .decor3d--calcada {
    align-self: center;
    justify-self: center;
    width: min(100%, 24rem);
  }

  /* ARCH — строка 1: заголовок, строка 2: арка; FAQ справа на обе строки.
     Sticky держит арку в кадре, пока раскрыты длинные ответы. */
  .faq-layout {
    grid-template-rows: auto 1fr;
  }

  .faq-layout > .section__head {
    grid-column: 1;
    grid-row: 1;
  }

  .faq-layout > .faq {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .decor3d--arch {
    --decor-floor: 4%;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    position: sticky;
    top: 7rem; /* высота шапки 4.75rem + воздух */
    width: min(100%, 24rem);
    margin-top: clamp(2rem, 4vw, 3.5rem);
  }
}


/* Лёгкий параллакс без JS: только где браузер поддерживает scroll-driven
   animations и пользователь не просил уменьшить движение. Иначе — статика.
   Двигается вся figure вместе с тенью, поэтому объект не «отрывается» от пола. */
@keyframes decor3d-drift {
  from { translate: 0 var(--decor-drift); }
  to   { translate: 0 calc(var(--decor-drift) * -1); }
}

@media (min-width: 72rem) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .decor3d {
      animation: decor3d-drift linear both;
      animation-timeline: view(); /* строго после shorthand: он сбрасывает timeline */
    }
  }
}


/* Шаги — настоящая последовательность, поэтому номера */
.how {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

@media (min-width: 64rem) {
  .how {
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, .9fr);
    align-items: start;
  }
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: none;
}

.steps__item {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  column-gap: 1.25rem;
  row-gap: .35rem;
  padding: 1.45rem 0;
  border-top: 1px solid var(--pedra);
}

.steps__item:last-child {
  border-bottom: 1px solid var(--pedra);
}

.steps__n {
  grid-row: span 2;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--barra);
}

.steps__item p {
  color: var(--ink-2);
}

.video-guide {
  overflow: hidden;
  background: #fff;
  border-top: 3px solid var(--barra);
  border-radius: 0 0 var(--radius-media) var(--radius-media);
  box-shadow: 0 14px 38px rgba(23,35,46,.07);
}

.video-guide__media {
  margin: 0;
  overflow: hidden;
  background: var(--pedra);
}

.video-guide__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-guide__body {
  padding: clamp(1.55rem, 3vw, 2.4rem);
  display: grid;
  gap: 1.15rem;
}

.video-guide__body .btn {
  justify-self: start;
  margin-top: .25rem;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .7rem;
}

.checklist li {
  position: relative;
  padding-left: 1.9rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35em;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--barra);
  border-radius: 2px;
}

.checklist li::after {
  content: "";
  position: absolute;
  left: .33rem;
  top: .5em;
  width: .35rem;
  height: .6rem;
  border: solid var(--barra);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Услуги — реальные направления остаются списком; фото работают как editorial-контекст. */
.services-layout {
  display: grid;
  gap: clamp(2.75rem, 6vw, 5rem);
  align-items: start;
}

.services-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.services-media figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--pedra);
}

.services-media__primary {
  grid-column: 1 / -1;
}

.services-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.services-media__primary img {
  aspect-ratio: 16 / 9;
}

.services {
  display: grid;
  gap: 0 clamp(2rem, 5vw, 4rem);
}

.services__item {
  padding: 1.55rem 0;
  border-top: 1px solid #C9CDC8;
  display: grid;
  gap: .55rem;
  align-content: start;
}

.services__item:last-child {
  border-bottom: 1px solid #C9CDC8;
}

.services__item p {
  color: var(--ink-2);
}

@media (min-width: 64rem) {
  .services-layout {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }

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

@media (min-width: 40rem) and (max-width: 63.999rem) {
  .services-media {
    grid-template-columns: 1.35fr .65fr .65fr;
    align-items: stretch;
  }

  .services-media__primary {
    grid-column: auto;
  }

  .services-media img,
  .services-media__primary img {
    height: 100%;
    min-height: 15rem;
    aspect-ratio: auto;
  }
}

@media (max-width: 40rem) {
  .services-media {
    gap: .5rem;
  }

  .services-media figure {
    border-radius: 9px;
  }
}

/* Карточки работ и новостей */
.cards {
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 3rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

.card {
  min-width: 0;
}

.card__link {
  height: 100%;
  display: grid;
  gap: 1.05rem;
  color: inherit;
  text-decoration: none;
}

.card__media {
  overflow: hidden;
  background: var(--cal-2);
  border-radius: var(--radius-media);
}

.card__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .5s ease;
}

.cards--projects .card__media img {
  aspect-ratio: 3 / 2;
}

.card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem .85rem;
  align-content: start;
}

.card__meta,
.card__title,
.card__text {
  grid-column: 1;
}

.card__meta {
  font-size: .8125rem;
  color: var(--ink-2);
  font-weight: 600;
  letter-spacing: .015em;
}

.card__title {
  font-size: 1.3rem;
  line-height: 1.22;
}

.card__text {
  color: var(--ink-2);
  font-size: .9875rem;
}

.card__arrow {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: end;
  color: var(--barra);
  transition: transform .18s ease;
}

/* Кейс без реального cover остаётся честной текстовой карточкой. */
.card--text .card__link {
  min-height: 13.5rem;
  padding: 1.4rem 1.4rem 1.3rem;
  border-top: 2px solid var(--ink);
  background: rgba(255,255,255,.45);
}

.card--text .card__body {
  height: 100%;
}

.card--text .card__text {
  max-width: 32rem;
}

@media (hover: hover) {
  .card__link:hover .card__media img {
    transform: scale(1.025);
  }

  .card__link:hover .card__title {
    color: var(--barra);
  }

  .card__link:hover .card__arrow {
    transform: translateX(.2rem);
  }
}

/* На главной первый реальный фотокейс получает больше визуального веса. */
@media (min-width: 68rem) {
  .cards--projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards--projects > .card--media:first-child {
    grid-column: span 2;
  }

  .cards--projects > .card--media:first-child .card__media img {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 40rem) {
  .card--text .card__link {
    min-height: auto;
    padding-inline: 0;
    background: transparent;
  }
}

/* Как мы работаем */
.why-showcase {
  margin: 0 0 clamp(2.75rem, 5vw, 4.75rem);
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--pedra);
}

.why-showcase img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center;
}

.why {
  display: grid;
  gap: clamp(2.25rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4rem);
}

.why__item {
  position: relative;
  display: grid;
  gap: .65rem;
  align-content: start;
  padding-left: 1.15rem;
}

.why__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15rem;
  bottom: .2rem;
  width: 2px;
  background: rgba(31,78,140,.7);
}

.why__item p {
  color: var(--ink-2);
}

@media (min-width: 48rem) {
  .why {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 72rem) {
  .why {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 40rem) {
  .why-showcase {
    border-radius: 9px;
  }

  .why-showcase img {
    aspect-ratio: 4 / 3;
  }
}

/* Отзывы */
.reviews {
  display: grid;
  gap: clamp(2.25rem, 4vw, 3.75rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
}

.review {
  position: relative;
  margin: 0;
  display: grid;
  gap: 1.5rem;
  align-content: start;
  padding: 2rem 0 0;
  border-top: 1px solid var(--ink);
}

.review::before {
  content: "“";
  position: absolute;
  top: .55rem;
  left: 0;
  color: var(--barra);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.review blockquote {
  margin: 0;
}

.review blockquote p {
  font-size: clamp(1.08rem, 1.4vw, 1.2rem);
  line-height: 1.7;
}

.review blockquote p::before,
.review blockquote p::after {
  content: none;
}

.review figcaption {
  display: grid;
  gap: .15rem;
  font-size: .9rem;
}

.review figcaption strong {
  font-weight: 750;
}

.review figcaption span {
  color: var(--ink-2);
}

/* FAQ */
.faq-layout { display: grid; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.faq { border-top: 1px solid var(--pedra); max-width: 52rem; width: 100%; }
@media (min-width: 64rem) {
  .faq-layout { grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); }
  .faq-layout .section__head { margin-bottom: 0; }
  .faq { max-width: none; }
}
.faq__item { border-bottom: 1px solid var(--pedra); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
  font-weight: 700; font-size: 1.125rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: .35rem; top: 50%; width: .8rem; height: .8rem; margin-top: -.55rem;
  border: solid var(--barra); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); transition: transform .2s;
}
.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: -.15rem; }
.faq__item p { padding: 0 0 1.4rem; color: var(--ink-2); max-width: 44rem; }

/* География */
.location-band {
  padding-block: 0 var(--section);
  background: var(--cal);
}

.location-band__inner {
  position: relative;
}

.location-band__media {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--pedra);
  box-shadow: var(--shadow-soft);
}

.location-band__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.location-band__card {
  width: min(31rem, calc(100% - 3rem));
  padding: clamp(1.4rem, 3vw, 2.25rem);
  background: rgba(251,251,249,.96);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  display: grid;
  gap: .7rem;
}

.location-band__card h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.08;
}

.location-band__eyebrow {
  color: var(--barra);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.location-band__card > p:last-child {
  color: var(--ink-2);
}

@media (min-width: 48rem) {
  .location-band__card {
    position: absolute;
    left: clamp(2rem, 5vw, 4rem);
    bottom: clamp(2rem, 5vw, 4rem);
  }
}

@media (max-width: 47.999rem) {
  .location-band__media {
    border-radius: 10px 10px 0 0;
    box-shadow: none;
  }

  .location-band__media img {
    aspect-ratio: 4 / 3;
  }

  .location-band__card {
    width: 100%;
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow-soft);
  }
}

/* Контакты */
.contact {
  background: var(--ink);
  color: #fff;
  padding-block: clamp(4.5rem, 8vw, 7rem);
}

.contact__grid {
  display: grid;
  gap: 2.5rem clamp(2rem, 5vw, 5rem);
}

.contact__main {
  display: grid;
  gap: 1.5rem;
}

.contact h2 {
  max-width: 13ch;
  font-size: clamp(2.15rem, 4vw, 3.65rem);
}

.contact .lead {
  max-width: 34rem;
  color: rgba(255,255,255,.82);
}

.contact__list {
  margin: 0;
  display: grid;
  gap: 0;
  align-content: start;
}

.contact__list > div {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
}

.contact__list > div:first-child {
  padding-top: 0;
}

.contact__list dt {
  font-size: .8125rem;
  letter-spacing: .03em;
  color: rgba(255,255,255,.62);
}

.contact__list dd {
  margin: .2rem 0 0;
  font-size: 1.125rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.contact__list a {
  color: #fff;
}

.contact__about {
  grid-column: 1 / -1;
  display: grid;
  gap: .75rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.18);
  max-width: 48rem;
}

.contact__about p {
  color: rgba(255,255,255,.82);
}

@media (min-width: 64rem) {
  .contact__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------- Подвал */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.76);
  font-size: .9375rem;
}

/* Один спокойный мотив calçada вместо нескольких горизонтальных полос. */
.calcada {
  display: block;
  width: 100%;
  height: 28px;
  background: var(--ink);
}

.calcada path {
  fill: none;
  stroke: rgba(251,251,249,.55);
  stroke-width: 5;
}

.site-footer__in {
  display: grid;
  gap: 2rem;
  padding-block: 2rem 7rem;
}

.site-footer a {
  color: #fff;
}

.site-footer__brand,
.site-footer__contacts,
.site-footer__legal {
  display: grid;
  gap: .5rem;
  align-content: start;
}

.site-footer__contacts a {
  display: inline-flex;
  gap: .6rem;
  align-items: center;
  text-decoration: none;
}

.site-footer__contacts a:hover {
  text-decoration: underline;
}

.logo--footer {
  color: #fff;
  border-color: var(--ocre);
  justify-self: start;
  margin-bottom: .5rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: .5rem;
}

.complaints {
  font-weight: 700;
}

.site-footer .muted {
  color: rgba(255,255,255,.52);
}

@media (min-width: 48rem) {
  .site-footer__in {
    grid-template-columns: repeat(3, 1fr);
    padding-bottom: 3rem;
  }
}

/* Мобильная панель действий */
.mobile-bar {
  display: none;
}

@media (max-width: 48rem) {
  .mobile-bar {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: .5rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(251,251,249,.94);
    border-top: 1px solid var(--pedra);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 -8px 28px rgba(23,35,46,.1);
  }

  .mobile-bar .btn {
    min-width: 0;
    min-height: 3rem;
    padding-inline: .75rem;
    font-size: .9375rem;
  }

  .mobile-bar .btn--light {
    border-color: var(--ink);
  }
}

@media (min-width: 40rem) and (max-width: 63.999rem) {
  .hero__visual {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 36rem) {
  .hero .cta-row,
  .contact .cta-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero .cta-row .btn,
  .contact .cta-row .btn {
    width: 100%;
  }

  .steps__item {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: .85rem;
  }

  .steps__n {
    font-size: 1.6rem;
  }
}

@media (max-width: 23rem) {
  .mobile-bar {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-bar .btn {
    padding-inline: .5rem;
    font-size: .875rem;
  }
}

/* --------------------------------------------------------------- Статья / кейс */
.article { padding-block: clamp(2rem, 5vw, 3.5rem) var(--section); display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.crumbs a { font-weight: 600; text-decoration: none; font-size: .9375rem; }
.crumbs a:hover { text-decoration: underline; }
.article__head { display: grid; gap: 1rem; margin-top: 1.5rem; }
.article__head h1 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); }
.article__meta { color: var(--ink-2); font-weight: 500; }
.article__cover { margin: 0; }
.article__cover img { width: 100%; height: auto; max-height: 78vh; object-fit: cover; }

.prose { font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin-inline: 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--barra); font-size: 1.1875rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.prose th, .prose td { border-bottom: 1px solid var(--pedra); padding: .5rem .75rem; text-align: left; }
.prose code { font-size: .9em; background: var(--cal-2); padding: .1em .3em; }

.compare { display: grid; gap: 1.5rem; }
.compare h2, .gallery-block h2 { font-size: 1.6rem; }
.compare__pair { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .compare__pair { grid-template-columns: 1fr 1fr; } }
.compare figure { margin: 0; position: relative; }
.compare img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.stage {
  position: absolute; left: .75rem; top: .75rem; padding: .25rem .6rem;
  font-size: .8125rem; font-weight: 700; background: #fff; color: var(--ink);
}
.stage--after { background: var(--ocre); }

.gallery-block { display: grid; gap: 1.25rem; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.gallery a { display: block; position: relative; }
.gallery img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: opacity .2s; }
.gallery a:hover img { opacity: .88; }

.similar { display: grid; gap: 1rem; justify-items: start; padding: clamp(1.5rem, 4vw, 2.5rem); background: #fff; border-top: 6px solid var(--barra); }
.similar h2 { font-size: 1.6rem; }

.pager { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 3rem; }

/* Просмотр фото на весь экран (site.js) */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(12,18,24,.94); color: #fff; }
.lightbox::backdrop { background: rgba(12,18,24,.94); }
.lightbox__stage { position: absolute; inset: 4rem 4.5rem 4.5rem; display: flex; align-items: center; justify-content: center; }
@media (max-width: 48rem) { .lightbox__stage { inset: 4rem .5rem 5rem; } }
.lightbox__img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__caption { position: absolute; left: 1rem; right: 1rem; bottom: 1.25rem; text-align: center; font-size: .9375rem; color: rgba(255,255,255,.85); }
.lightbox button {
  position: absolute; min-width: 3rem; min-height: 3rem; border: 0; border-radius: var(--radius);
  background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 1.5rem; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: .75rem; right: .75rem; }
.lightbox__prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: .75rem; top: 50%; transform: translateY(-50%); }

/* Страница ошибки */
.error-page { max-width: 36rem; margin: 18vh auto 0; display: grid; gap: 1rem; }
.error-page__code { color: var(--barra); font-weight: 900; font-size: 1.25rem; }

/* hidden всегда скрывает: глобальное img { display: block } иначе перебивает атрибут */
[hidden] { display: none !important; }

/* --------------------------------------------------------------- Видео (site.js) */
.vplayer { position: relative; background: var(--ink); }
.vplayer__video {
  display: block; width: 100%; height: auto; max-height: 78vh;
  object-fit: contain; background: var(--ink);
}
/* Кнопки фонового ролика: пауза всегда видна (WCAG 2.2.2), звук — если включён менеджером */
.vplayer__bar { position: absolute; left: .75rem; bottom: .75rem; display: flex; gap: .5rem; }
.vplayer__btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(23,35,46,.72); color: #fff; transition: background-color .18s;
}
.vplayer__btn:hover { background: rgba(23,35,46,.92); }
.vplayer__btn svg { width: 1.15rem; height: 1.15rem; }
/* Крупная кнопка ▶ длинного ролика: до первого запуска */
.vplayer__big {
  position: absolute; inset: 0; margin: auto; width: 4.75rem; height: 4.75rem;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(31,78,140,.92); color: #fff; box-shadow: var(--shadow-lift);
  transition: transform .18s, background-color .18s;
}
.vplayer__big:hover { transform: scale(1.05); background: var(--barra-dark); }
.vplayer__big svg { width: 1.9rem; height: 1.9rem; margin-left: .2rem; }
.vplayer.is-playing .vplayer__big { display: none; }

/* Метка «▶ Видео · 0:42» на карточке и значок на плитке галереи */
.card__media { position: relative; }
.card__badge,
.gallery__play {
  position: absolute; display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .7rem; border-radius: 99px; pointer-events: none;
  background: rgba(23,35,46,.78); color: #fff; font-size: .8125rem; font-weight: 700; line-height: 1;
}
.card__badge { left: .75rem; bottom: .75rem; }
.gallery__play { left: 50%; top: 50%; transform: translate(-50%, -50%); padding: .55rem .9rem; font-size: .875rem; }
.card__badge .icon, .gallery__play .icon { width: .85rem; height: .85rem; }
.lightbox__video { max-width: 100%; max-height: 100%; background: #000; }

/* Просмотрщик: фон не прокручивается, кадр двигается за пальцем (site.js) */
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox { overscroll-behavior: contain; }
.lightbox__stage { will-change: transform; }
.lightbox__img { touch-action: pinch-zoom; user-select: none; -webkit-user-drag: none; }

/* --------------------------------------------------------------- Галерея: лента на телефоне */
.gallery__count { display: none; }
@media (max-width: 39.999rem) {
  /* Нативная прокрутка с прилипанием: работает и без JS; край следующей карточки виден */
  .gallery {
    display: flex; gap: .75rem; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery > li { flex: 0 0 84%; scroll-snap-align: start; }
  .gallery img { aspect-ratio: 4 / 3; }
  .gallery__count {
    display: block; margin: -.5rem 0 0; color: var(--ink-2);
    font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums;
  }
}

/* --------------------------------------------------------------- «До/после»: шторка (site.js) */
.compare__hint { font-size: .9375rem; }
.compare__pair.is-slider { display: block; }
.compare-slider {
  --pos: 50%;
  position: relative; overflow: hidden; width: 100%; max-height: 78vh;
  background: var(--pedra); cursor: ew-resize;
  /* Вертикальный жест — прокрутка страницы, горизонтальный — шторка */
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.compare-slider img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  aspect-ratio: auto; object-fit: cover; pointer-events: none;
}
.compare-slider__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-slider__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 0 1px rgba(23,35,46,.2); pointer-events: none;
}
.compare-slider__knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: #fff; color: var(--ink); font-size: 1rem; font-weight: 800; letter-spacing: .12em;
  box-shadow: var(--shadow-lift);
}
.compare-slider:has(.compare-slider__range:focus-visible) .compare-slider__knob { box-shadow: var(--focus); }
/* Клавиатура и экранный диктор: стрелки двигают шторку; видимая часть — ручка */
.compare-slider__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; pointer-events: none;
}
.compare-slider .stage { z-index: 1; }
.compare-slider .stage--after { left: auto; right: .75rem; }

/* Место под мобильную панель действий — в подвале (padding-bottom у .site-footer__in) */
