/* ============ ARMAX — стили ============ */
:root {
  --asphalt: #0e1013;
  --asphalt-2: #161a20;
  --asphalt-3: #1f242c;
  --paper: #f2f1ec;
  --paper-2: #e7e5de;
  --ink: #12151a;
  --ink-soft: #545b66;
  --text: #eef1f5;
  --muted: #9aa3af;
  --line: rgba(255, 255, 255, .1);
  --line-dark: rgba(18, 21, 26, .12);
  --blue: #004aad;
  --blue-hi: #2a6dff;
  --marking: #ffd23f; /* жёлтый — только дорожная техника (каток) */
  --paint: #ffffff;   /* дорожная разметка — белая, как в России */

  --f-display: "Unbounded", "Arial Black", sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--asphalt);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lock { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
strong, b { font-weight: 600; }
::selection { background: var(--marking); color: var(--ink); }
:focus-visible { outline: 2px solid var(--marking); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Зернистость асфальта на тёмных секциях */
.hero::after, .works::before, .feedback::before, .footer::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero::after { z-index: -1; }

/* ---------- Типографика ---------- */
.h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.kicker, .eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 18px;
  font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-hi);
}
.eyebrow { color: rgba(255, 255, 255, .9); text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
.kicker::before, .eyebrow::before {
  content: ""; width: 34px; height: 3px;
  background: repeating-linear-gradient(90deg, currentColor 0 10px, transparent 10px 16px);
}
.section--light .kicker { color: var(--blue); }

/* ---------- Кнопки ---------- */
/*
  «Дорожная» кнопка: плашка как табличка-указатель, нижняя кромка как у физической
  кнопки, стрелка в утопленном квадрате. При наведении текст перекатывается, стрелка
  «проезжает», под текстом прорисовывается и бежит белая разметка.
*/
.btn {
  --h: 56px;
  --bg: var(--blue);
  --fg: #fff;
  --edge: rgba(0, 0, 0, .28);
  --icon-bg: #fff;
  --icon-fg: var(--blue);
  --dash: rgba(255, 255, 255, .7);
  position: relative;
  display: inline-flex; align-items: stretch;
  height: var(--h);
  padding: 0;
  font-family: var(--f-display); font-weight: 500;
  font-size: 13px; line-height: 1; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fg); background: var(--bg);
  border-radius: 6px;
  box-shadow: inset 0 -3px 0 var(--edge);
  overflow: hidden; isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), transform .2s var(--ease);
}
.btn__label {
  position: relative; flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 0 24px;
  overflow: hidden; white-space: nowrap;
}
.btn__label > span, .btn__label::after {
  display: block; padding-bottom: 3px;
  transition: transform .5s cubic-bezier(.7, 0, .2, 1);
}
.btn__label::after {
  content: attr(data-text);
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
}
/* разметка под текстом */
.btn__label::before {
  content: ""; position: absolute; left: 24px; right: 24px; bottom: 12px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--dash) 0 9px, transparent 9px 16px);
  background-size: 16px 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.btn__icon {
  position: relative; flex: 0 0 auto;
  width: calc(var(--h) - 12px); margin: 6px 6px 9px 0;
  border-radius: 4px;
  background: var(--icon-bg); color: var(--icon-fg);
  overflow: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.btn__icon::before, .btn__icon::after {
  content: "→";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--f-body); font-size: 19px; font-weight: 600; text-transform: none;
  transition: transform .5s cubic-bezier(.7, 0, .2, 1);
}
.btn__icon::after { transform: translateX(-120%); }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: inset 0 -3px 0 var(--edge), 0 16px 30px -18px rgba(0, 20, 60, .9); }
  .btn:hover .btn__label > span, .btn:hover .btn__label::after { transform: translateY(calc(var(--h) * -1)); }
  .btn:hover .btn__label::before { transform: scaleX(1); animation: btnRoad .6s linear .45s infinite; }
  .btn:hover .btn__icon::before { transform: translateX(120%); }
  .btn:hover .btn__icon::after { transform: none; }
}
@keyframes btnRoad { to { background-position: -16px 0; } }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--edge); }
.btn:focus-visible { outline: 2px solid var(--marking); outline-offset: 3px; }

/* контурная — на тёмном фоне */
.btn--ghost {
  --bg: transparent; --edge: rgba(255, 255, 255, .22);
  --icon-bg: rgba(255, 255, 255, .12); --icon-fg: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3), inset 0 -3px 0 var(--edge);
}
@media (hover: hover) {
  .btn--ghost:hover {
    --bg: #fff; --fg: var(--ink); --edge: rgba(0, 0, 0, .12);
    --icon-bg: var(--blue); --icon-fg: #fff; --dash: rgba(18, 21, 26, .5);
    box-shadow: inset 0 -3px 0 var(--edge), 0 16px 30px -18px rgba(0, 0, 0, .8);
  }
}
/* компактная — без стрелки */
.btn--small { --h: 42px; font-size: 11.5px; }
.btn--small .btn__label { padding: 0 18px; }
.btn--small .btn__label::before { left: 18px; right: 18px; bottom: 9px; }
/* во всю ширину — текст слева, стрелка справа */
.btn--wide { width: 100%; }
.btn--wide .btn__label { justify-content: flex-start; }
.btn--wide .btn__label::after { justify-content: flex-start; padding-left: 24px; }

/* ---------- Шапка ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background .35s, box-shadow .35s, transform .35s var(--ease);
}
.header.is-scrolled {
  background: rgba(14, 16, 19, .78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}
.header.is-hidden { transform: translateY(-100%); }
.header.menu-open { transform: none; backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; box-shadow: none; }
.header__inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.logo img { width: 128px; height: auto; filter: brightness(0) invert(1); }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav a { position: relative; color: rgba(255,255,255,.82); transition: color .2s; }
.nav a:hover { color: #fff; }
.nav > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--paint);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav > a:hover::after { transform: scaleX(1); }
.header__phone { font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav__mobile { display: none; }
.burger { display: none; }

/* ---------- Первый экран ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--header-h) + 40px);
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: heroZoom 14s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14,16,19,.65) 0%, rgba(14,16,19,.15) 30%, rgba(14,16,19,.55) 62%, var(--asphalt) 100%),
    linear-gradient(90deg, rgba(0,30,80,.55) 0%, transparent 65%);
}
.hero__content { position: relative; padding-bottom: clamp(36px, 6vh, 64px); }
.hero__title {
  font-family: var(--f-display);
  font-weight: 700;
  /* «благоустройство» ≈ 10,8 кегля в ширину — размер подобран так, чтобы слово всегда помещалось целиком */
  font-size: clamp(26px, 8.3vw, 100px);
  line-height: 1;
  letter-spacing: -.035em;
  margin: 0 0 clamp(30px, 3.4vw, 44px);
}
.hero__line { display: block; white-space: nowrap; }
.hl { position: relative; white-space: nowrap; color: #fff; }
/* пунктир опущен ниже хвостика буквы «Д», чтобы между ними был просвет */
.hl::after {
  content: ""; position: absolute; left: -.02em; right: -.04em; bottom: -.22em; height: .1em;
  background: repeating-linear-gradient(90deg, var(--paint) 0 .6em, transparent .6em .9em);
  transform-origin: left; transform: scaleX(0);
  animation: draw 1.1s .9s var(--ease) forwards;
}
@keyframes draw { to { transform: scaleX(1); } }
.hero__lead { max-width: 560px; margin: 0 0 36px; font-size: clamp(16px, 1.6vw, 19px); color: rgba(238,241,245,.85); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__stats {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 26px; padding-bottom: 40px;
}
.stat { padding-right: 20px; }
.stat + .stat { padding-left: clamp(16px, 3vw, 40px); border-left: 1px solid var(--line); }
.stat__num {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(34px, 4.6vw, 62px); line-height: 1;
  letter-spacing: -.03em;
  color: #fff;
}
.stat__num span { font-variant-numeric: tabular-nums; }
.stat__label { margin-top: 10px; font-size: 14px; line-height: 1.4; color: var(--muted); }

/* Дорожная разметка — движется как при езде */
.road {
  position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--paint) 0 56px, transparent 56px 96px);
  background-size: 96px 6px;
  animation: drive 1.6s linear infinite;
  opacity: .9;
}
@keyframes drive { to { background-position: -96px 0; } }

/* ---------- Бегущая строка ---------- */
.ticker { background: var(--blue); overflow: hidden; padding: 20px 0; }
.ticker__track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker span {
  display: inline-flex; align-items: center;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(16px, 2vw, 24px);
  white-space: nowrap; letter-spacing: -.01em;
}
.ticker span::after {
  content: ""; width: 28px; height: 4px; margin: 0 28px;
  background: var(--paint); border-radius: 1px;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Секции ---------- */
.section { position: relative; padding: clamp(48px, 6vw, 84px) 0; }
.section--light { background: var(--paper); color: var(--ink); }
.section--light p { color: var(--ink-soft); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: clamp(24px, 3vw, 40px); }
.section__head .h2 { margin: 0; }
.section__note { max-width: 300px; margin: 0; font-size: 15px; color: var(--muted); }
.section--light .section__note { color: var(--ink-soft); }

/* ---------- О компании ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 64px); align-items: center; }
.about__media { position: relative; }
.about__media img {
  width: 100%; height: auto; aspect-ratio: 3024 / 2907; object-fit: cover; /* родные пропорции фото — надпись на табличке видна целиком */
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -40px rgba(0, 30, 80, .5);
}
.about__media::before {
  content: ""; position: absolute; inset: 24px -24px -24px 24px; z-index: -1;
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, var(--blue) 0 14px, transparent 14px 28px);
  opacity: .14;
}
.about__badge {
  position: absolute; right: -18px; bottom: 36px;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  background: var(--blue); color: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 40px -16px rgba(0, 74, 173, .7);
}
.about__badge b { font-family: var(--f-display); font-size: 26px; line-height: 1; white-space: nowrap; }
.about__badge span { font-size: 13px; line-height: 1.3; opacity: .85; }
.about__text > p { margin: 0 0 18px; max-width: 560px; }

/* три преимущества в ряд: номер, заголовок, короткое описание */
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.features li {
  position: relative;
  padding: 18px 0 0;
  border-top: 1px solid var(--line-dark);
  font-size: 14px; line-height: 1.5; color: var(--ink-soft);
}
.features li::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 32px; height: 2px;
  background: var(--blue);
}
.features b { display: block; margin: 0 0 6px; font-size: 16px; line-height: 1.25; color: var(--ink); }

/* ---------- Услуги ---------- */
.services { padding-top: 0; }
.services > .wrap > .section__head { padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line-dark); }
.svc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc__card {
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line-dark), 0 20px 40px -32px rgba(0, 30, 80, .35);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.svc__card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--line-dark), 0 28px 50px -30px rgba(0, 30, 80, .45); }
.svc__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.svc__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.svc__card:hover .svc__img img { transform: scale(1.05); }
.svc__body { padding: 22px 24px 26px; }
.svc__body h3 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
.section--light .svc__body p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }

/* ---------- Объекты ---------- */
.works { background: var(--asphalt); }
.works .wrap { position: relative; }
.works__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(200px, 22vw, 290px);
  gap: 14px;
  grid-auto-flow: dense;
}
/*
  Узор повторяется каждые 8 объектов:
  большая плитка + две малые / две средние / три малые.
  Во втором блоке большая плитка уходит вправо, чтобы сетка не выглядела однообразно.
*/
.work:nth-child(8n+1) { grid-column: span 4; grid-row: span 2; }
.work:nth-child(16n+9) { grid-column: 3 / span 4; }
.work:nth-child(8n+2), .work:nth-child(8n+3),
.work:nth-child(8n+6), .work:nth-child(8n+7), .work:nth-child(8n+8) { grid-column: span 2; }
.work:nth-child(8n+4), .work:nth-child(8n+5) { grid-column: span 3; }
.work:last-child:nth-child(8n+7) { grid-column: span 4; }
.work[hidden] { display: none; }

/* кнопка «Показать все объекты» */
.works__all { display: flex; justify-content: center; margin-top: 28px; }
.works__all[hidden] { display: none; }
.btn__icon--down::before, .btn__icon--down::after { content: "↓"; }
.btn__icon--down::after { transform: translateY(-120%); }
@media (hover: hover) {
  .btn:hover .btn__icon--down::before { transform: translateY(120%); }
  .btn:hover .btn__icon--down::after { transform: none; }
}

.work {
  position: relative; overflow: hidden;
  display: block; width: 100%; height: 100%;
  padding: 0; text-align: left;
  border-radius: var(--radius);
  background: var(--asphalt-3);
}
.work img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease), filter .6s;
  filter: saturate(.9);
}
.work::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(10,12,15,.88) 100%);
  transition: opacity .4s;
}
.work:hover img { transform: scale(1.06); filter: saturate(1.1); }
.work__body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; flex-direction: column; gap: 6px;
  padding: clamp(18px, 2.2vw, 28px);
}
.work__tag {
  align-self: flex-start;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.work__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(17px, 1.7vw, 22px); line-height: 1.2; letter-spacing: -.01em;
}
.work:nth-child(8n+1) .work__title { font-size: clamp(20px, 2.6vw, 34px); }
.work__more { display: inline-flex; gap: 8px; font-size: 14px; color: var(--paint); font-weight: 600; }
.work__more i { font-style: normal; transition: transform .3s var(--ease); }
.work:hover .work__more i { transform: translateX(5px); }
.work__body::before {
  content: ""; position: absolute; left: clamp(18px, 2.2vw, 28px); top: 0; width: 46px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--paint) 0 12px, transparent 12px 18px);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.work:hover .work__body::before { transform: scaleX(1); }

/* ---------- Контакты ---------- */
.contacts__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 6vw, 80px); align-items: stretch; }
.clist { margin: 32px 0 0; }
.clist > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line-dark); }
.clist dt { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding-top: 3px; }
.clist dd { margin: 0; font-size: 18px; font-weight: 500; }
.clist a { background: linear-gradient(var(--blue), var(--blue)) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.clist a:hover { color: var(--blue); background-size: 100% 2px; }
.requisites { margin-top: 8px; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.requisites summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; font-weight: 600;
}
.requisites summary::-webkit-details-marker { display: none; }
.requisites summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--blue); transition: transform .3s var(--ease); }
.requisites[open] summary::after { transform: rotate(45deg); }
.requisites p { margin: 0 0 20px; font-size: 15px; font-variant-numeric: tabular-nums; }
.contacts__map {
  position: relative; min-height: 440px;
  border-radius: var(--radius); overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 30px 60px -40px rgba(0,0,0,.4);
}
.contacts__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Заявка ---------- */
.feedback {
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(0, 74, 173, .45), transparent 60%),
    var(--asphalt-2);
  overflow: hidden;
}
.feedback .wrap { position: relative; }
.feedback__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.feedback__intro p { color: var(--muted); max-width: 440px; }
.feedback__phone {
  display: inline-block; margin-top: 18px;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -.02em;
  border-bottom: 3px dashed var(--paint); padding-bottom: 4px;
  transition: color .2s;
}
.feedback__phone:hover { color: var(--blue-hi); }

.form {
  display: grid; gap: 14px;
  padding: clamp(22px, 3.5vw, 40px);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  backdrop-filter: blur(6px);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; display: block; }
.field input, .field textarea {
  width: 100%;
  padding: 26px 18px 10px;
  font: inherit; font-size: 16px; color: var(--text);
  background: rgba(0,0,0,.25);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  resize: vertical;
  transition: border-color .25s, background .25s;
}
.field textarea { min-height: 130px; }
.field span {
  position: absolute; left: 19px; top: 18px;
  font-size: 16px; color: var(--muted);
  pointer-events: none; transform-origin: left top;
  transition: transform .25s var(--ease), color .25s;
}
.field input:focus, .field textarea:focus { border-color: var(--blue-hi); background: rgba(0,0,0,.35); }
.field input:focus + span, .field textarea:focus + span,
.field input:not(:placeholder-shown) + span, .field textarea:not(:placeholder-shown) + span {
  transform: translateY(-10px) scale(.75); color: var(--blue-hi);
}
.field.has-error input, .field.has-error textarea { border-color: #ff6b5e; }
.field__err { display: block; min-height: 0; font-style: normal; font-size: 13px; color: #ff8a80; margin-top: 4px; }
.field__err:empty { display: none; }
.chips { border: 0; margin: 0 0 4px; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { padding: 0; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 8px 14px; border-radius: 6px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 500; transition: background .2s, border-color .2s, color .2s; }
.chips label:hover span { border-color: rgba(255,255,255,.35); }
.chips input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--marking); outline-offset: 2px; }
.agree { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.agree input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; }
.agree i { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.3); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.agree i::after { content: ""; width: 10px; height: 5px; margin-top: -2px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .2s var(--ease); }
.agree input:checked + i { background: var(--blue); border-color: var(--blue); }
.agree input:checked + i::after { transform: rotate(-45deg) scale(1); }
.agree input:focus-visible + i { outline: 2px solid var(--marking); outline-offset: 2px; }
.agree.has-error i { border-color: #ff6b5e; }
.agree a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.35); }
#agreeErr { margin-top: -6px; }
.form__submit { margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__submit.is-loading { pointer-events: none; opacity: .7; }
.form__legal { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.form__status { margin: 0; font-weight: 600; }
.form__status:empty { display: none; }
.form__status.ok { color: #7ee2a8; }
.form__status.err { color: #ff8a80; }

/* ---------- Подвал ---------- */
.footer { position: relative; background: #08090b; padding: 64px 0 28px; color: var(--muted); font-size: 15px; }
.footer .wrap { position: relative; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer__brand img { width: 120px; height: auto; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer__brand p { margin: 0; max-width: 300px; }
.footer__nav, .footer__contacts { display: flex; flex-direction: column; gap: 10px; }
.footer a { transition: color .2s; }
.footer a:hover { color: #fff; }
.footer__social { display: inline-flex; align-items: center; gap: 8px; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; padding-top: 24px; font-size: 13px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer button { font-size: 13px; color: inherit; padding: 0; transition: color .2s; }
.footer button:hover { color: #fff; }

/* ---------- Мобильная панель ---------- */
.dock { display: none; }

/* ---------- Галерея ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  background: rgba(8, 9, 11, .97);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fadeIn .3s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.lightbox__top { display: flex; align-items: center; gap: 18px; padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 14px; }
.lightbox__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-display); font-weight: 500; font-size: 16px; }
.lightbox__count { white-space: nowrap; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.lightbox__close { margin-left: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 18px; transition: background .2s; }
.lightbox__close:hover { background: rgba(255,255,255,.18); }
.lightbox__stage { position: relative; display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; touch-action: pan-y; }
.lightbox__stage img {
  max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); object-fit: contain;
  border-radius: 10px;
  transition: opacity .25s, transform .25s var(--ease);
  user-select: none; -webkit-user-drag: none;
}
.lightbox__stage img.is-loading { opacity: .25; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.1); font-size: 22px;
  transition: background .2s;
}
.lightbox__nav:hover { background: var(--blue); }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__thumbs { display: flex; justify-content: center; gap: 8px; padding: 14px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px)); overflow-x: auto; scrollbar-width: none; }
.lightbox__thumbs::-webkit-scrollbar { display: none; }
.lightbox__thumbs button { flex: 0 0 auto; width: 64px; height: 48px; padding: 0; border-radius: 8px; overflow: hidden; opacity: .45; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .2s, outline-color .2s; }
.lightbox__thumbs button.is-active { opacity: 1; outline-color: var(--paint); }
.lightbox__thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Cookie и Метрика ---------- */
.consent {
  position: fixed; left: 16px; bottom: 16px; z-index: 90;
  width: min(440px, calc(100% - 32px));
  padding: 22px;
  background: rgba(22, 26, 32, .96);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.7);
  transform: translateY(20px); opacity: 0;
  transition: transform .5s var(--ease), opacity .4s;
}
.consent[hidden] { display: none; }
.consent.is-in { transform: none; opacity: 1; }
.consent__title { margin: 0 0 6px; font-family: var(--f-display); font-weight: 500; font-size: 16px; }
.consent__text { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(238,241,245,.8); }
.consent__text a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.consent__prefs { margin-top: 14px; }
.consent__prefs[hidden] { display: none; }
.toggle { position: relative; display: grid; grid-template-columns: 1fr 44px; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle b { display: block; font-size: 14px; font-weight: 600; }
.toggle small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.toggle input { position: absolute; right: 0; width: 44px; height: 26px; margin: 0; opacity: 0; }
.toggle i { position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.18); transition: background .25s; }
.toggle i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.toggle input:checked + i { background: var(--blue-hi); }
.toggle input:checked + i::after { transform: translateX(18px); }
.toggle input:focus-visible + i { outline: 2px solid var(--marking); outline-offset: 2px; }
.toggle.is-locked { opacity: .6; cursor: default; }
.consent__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.consent__btns [hidden] { display: none; }
.consent__link { font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; padding: 0 4px; }
.consent__link:hover { color: #fff; }
.consent.is-settings [data-consent="necessary"] { display: none; }
.consent.is-settings [data-consent="save"] { order: -1; }
.consent.is-settings [data-consent="all"] { --bg: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }

/* ---------- Появление при скролле ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }


/* =========================================================
   Эффекты
   ========================================================= */

/* Полоска прогресса прокрутки */
.progress {
  position: fixed; left: 0; top: 0; z-index: 60;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--blue-hi), var(--paint));
  transform-origin: left; transform: scaleX(0);
  pointer-events: none;
}

/* Плавный скролл */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Пунктир у подзаголовков прорисовывается при появлении */
.js .kicker.reveal::before { width: 0; transition: width .8s var(--ease) .25s; }
.js .kicker.reveal.is-in::before { width: 34px; }

/* Бегущая строка управляется скриптом (ускоряется от прокрутки) */
.ticker.is-js .ticker__track { animation: none; will-change: transform; }

/* Объекты: фото открываются «шторкой» */
/* обрезка — на содержимом, а не на самой плитке: иначе браузер считает плитку невидимой */
.js .work.reveal { opacity: 1; transform: none; background: transparent; }
.js .work.reveal img, .js .work.reveal::after, .js .work.reveal .work__body {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1), transform 1.6s var(--ease), filter .6s;
}
.js .work.reveal img { transform: scale(1.18); }
.js .work.reveal.is-in img, .js .work.reveal.is-in::after, .js .work.reveal.is-in .work__body { clip-path: inset(0 0 0 0); }
.js .work.reveal.is-in img { transform: scale(1); }
.js .work.reveal.is-in:hover img { transform: scale(1.06); transition-duration: .9s; }

/* Карточки услуг: объёмный наклон и блик за курсором */
@media (hover: hover) and (pointer: fine) {
  .svc { perspective: 1000px; }
  .svc__card { position: relative; transform-style: preserve-3d; will-change: transform; }
  .svc__card::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.35), transparent 45%);
    opacity: 0; transition: opacity .3s;
  }
  .svc__card:hover::after { opacity: 1; }
  .svc__card.is-tilt { transition: box-shadow .4s var(--ease); }
}

/* Этапы работ — синий блок с дорогой */
.process { background: var(--blue); color: #fff; overflow: hidden; }
.process .kicker { color: rgba(255, 255, 255, .85); }
.process .section__note { color: rgba(255,255,255,.75); }
.road-steps { --p: 0; position: relative; }
.road-steps__track {
  position: relative; height: 6px; margin: 28px 0 36px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 28px, transparent 28px 46px);
}
.road-steps__fill {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, var(--paint) 0 28px, transparent 28px 46px);
  transform-origin: left; transform: scaleX(var(--p));
}
.road-steps__roller {
  position: absolute; top: 50%; left: calc(var(--p) * 100%);
  display: grid; place-items: center;
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: var(--marking);
  box-shadow: 0 0 0 8px rgba(255, 210, 63, .18), 0 10px 24px -6px rgba(0,0,0,.4);
}
.road-steps__roller svg { width: 34px; height: 23px; fill: var(--ink); margin-top: 2px; }
.road-steps__roller svg .h { fill: var(--marking); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step { position: relative; opacity: .45; transition: opacity .5s var(--ease); }
.step.is-active { opacity: 1; }
.step__dot { display: none; }
.step h3 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 500; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.2; }
.step p { margin: 0; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.78); }

/* Кнопка «Наверх» с кольцом прогресса */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  color: #fff; font-size: 18px; font-weight: 600;
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .35s, transform .45s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.to-top__bg { fill: rgba(14, 16, 19, .85); stroke: rgba(255,255,255,.15); stroke-width: 2; }
.to-top__ring { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 150.8; stroke-dashoffset: 150.8; }
.to-top span { position: relative; transition: transform .3s var(--ease); }
.to-top:hover span { transform: translateY(-3px); }

/* Кнопка отправки — состояние «Отправлено» */
.form__submit.is-done { --bg: #1f9d55; --icon-fg: #1f9d55; }
.form__submit.is-done .btn__icon::before { content: "✓"; transform: none; }
.form__submit.is-done .btn__icon::after { opacity: 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 1200px) {
  .header__phone { display: none; }
}
@media (max-width: 1080px) {
  .header__cta, .header__phone { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .burger {
    display: grid; place-content: center; gap: 7px;
    width: 46px; height: 46px; margin-left: auto;
    border-radius: 50%; background: rgba(255,255,255,.1);
    position: relative; z-index: 2;
  }
  .burger span { display: block; width: 20px; height: 2px; background: #fff; transition: transform .35s var(--ease); }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 22px; padding: 0 var(--gutter);
    background: var(--asphalt);
    font-family: var(--f-display); font-size: 30px;
    opacity: 0; visibility: hidden;
    transition: opacity .35s, visibility .35s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav > a { color: #fff; }
  .nav__mobile { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; font-family: var(--f-body); font-size: 18px; }
  .nav__mobile a { color: rgba(255,255,255,.8); }
  .nav__mobile .btn { align-self: flex-start; margin-top: 18px; color: #fff; }
  .logo { position: relative; z-index: 2; }

  .about__grid, .contacts__grid, .feedback__grid { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .about__media { max-width: 520px; }
  .about__media img { aspect-ratio: 3024 / 2907; }
  .about__badge { right: 12px; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 12px; }

  .works__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 240px; }
  .works__grid .work { grid-column: span 1 !important; grid-row: span 1 !important; }
  .works__grid .work:nth-child(8n+1) { grid-column: span 2 !important; grid-row: span 1 !important; }
  .contacts__map { min-height: 360px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__stats { grid-template-columns: 1fr 1fr 1fr; padding-bottom: 32px; }
  .stat { padding-right: 8px; }
  .stat + .stat { padding-left: 12px; }
  .stat__label { font-size: 12px; }
  .works__grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .works__grid .work:nth-child(8n+1) { grid-column: span 1 !important; }
  .form__row { grid-template-columns: 1fr; }
  .clist > div { grid-template-columns: 1fr; gap: 4px; }
  .lightbox__nav { display: none; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__brand { grid-column: auto; }
  .about__media::before { inset: 14px -10px -14px 14px; }
  .features { grid-template-columns: 1fr; gap: 0; }
  .features li { padding: 16px 0; }
  .to-top { display: none; }
  .road-steps { padding-left: 56px; }
  .road-steps__track {
    position: absolute; left: 22px; top: 6px; bottom: 6px;
    width: 6px; height: auto; margin: 0;
    background: repeating-linear-gradient(180deg, rgba(255,255,255,.28) 0 22px, transparent 22px 36px);
  }
  .road-steps__fill { background: repeating-linear-gradient(180deg, var(--paint) 0 22px, transparent 22px 36px); transform-origin: top; transform: scaleY(var(--p)); }
  .road-steps__roller { left: 50%; top: calc(var(--p) * 100%); width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .road-steps__roller svg { width: 26px; height: 18px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 4px 0 32px; }
  .step:last-child { padding-bottom: 4px; }
  .svc { grid-template-columns: 1fr; gap: 14px; }
  .svc__card { flex-direction: row; }
  .svc__img { flex: 0 0 34%; aspect-ratio: auto; }
  .svc__body { flex: 1; min-width: 0; padding: 16px 14px 18px; }
  .svc__body h3 { font-size: clamp(14px, 4.3vw, 17px); }
  .section--light .svc__body p { font-size: 14px; }
  .hero__stats { padding-bottom: 28px; }
  .footer { padding-bottom: 96px; }
  .dock {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40;
    display: grid; grid-template-columns: auto 1fr; gap: 8px;
    padding: 8px;
    background: rgba(22, 26, 32, .9);
    border: 1px solid var(--line); border-radius: 20px;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px -12px rgba(0,0,0,.6);
    transform: translateY(calc(100% + 30px));
    transition: transform .5s var(--ease);
  }
  .dock.is-visible { transform: none; }
  .dock a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 6px; font-size: 15px; font-weight: 600; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
  .dock__call { padding: 0 18px; background: rgba(255,255,255,.1); }
  .dock__call svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
  .dock__req { background: var(--blue); color: #fff; font-family: var(--f-display); font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
  .dock__req::after { content: "→"; font-family: var(--f-body); font-size: 17px; margin-left: 4px; }
  .consent { left: 0; right: 0; bottom: 0; width: 100%; border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .consent__btns .btn { flex: 1 1 auto; }
  .lightbox__thumbs { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
