/* ============================================================
   АВТОДЕТАЙЛИНГ — premium dark theme (вдохновлено Brooklands)
   Палитра: #1e1e20 (фон), #fffbf1 (тёплый белый), серые
   ============================================================ */

:root {
  --bg: #1e1e20;
  --bg-2: #1f1f20;
  --bg-3: #2b2b2e;
  --paper: #fffbf1;
  --text: #d9d9d9;
  --muted: #989898;
  --line: rgba(255, 255, 255, .08);
  --radius-lg: 2.5rem;
  --radius-md: 1rem;
  --font-head: 'Unbounded', sans-serif;
  --font-body: 'Montserrat', sans-serif;

  --header-height: 9rem;
  /* Stable rem units; individual headings scale within readable limits. */
  font-size: 62.5%;
}

/* ----- base ----- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 2rem); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: .025em;
  font-size: 1.6rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--paper); color: var(--bg); }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 300; padding: 12px 18px; background: var(--paper); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: 143rem; margin: 0 auto; padding: 0 clamp(2rem, 3vw, 4rem); }

.section { padding: 9rem 0; }
.section__title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(2.8rem, 2rem + 1.2vw, 3.6rem);
  color: var(--paper);
  margin-bottom: 5rem;
}
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem 4rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}
.section__head .section__title { margin-bottom: 0; }
.section__note { max-width: 40rem; color: var(--muted); font-size: 1.4rem; }

/* ----- buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  padding: 1.6rem 2.8rem;
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s;
}
.btn--light { background: var(--paper); color: var(--bg); }
.btn--light:hover { background: #fff; transform: translateY(-2px); }
.btn--sm { padding: 1.2rem 2rem; font-size: 1.2rem; }
.btn--full { width: 100%; }

.btn-big-arrow {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  background: var(--paper);
  color: var(--bg);
  border-radius: 5rem;
  padding: 2.4rem 4rem;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.5rem;
  text-transform: uppercase;
  transition: background .25s, gap .25s;
}
.btn-big-arrow:hover { background: #fff; gap: 3rem; }
.btn-big-arrow__icon { flex: none; }

.link-arrow {
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-bottom: .4rem;
  transition: border-color .25s;
}
.link-arrow:hover { border-color: var(--paper); }

/* ----- header ----- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(30, 30, 32, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  height: var(--header-height);
}
.header__logo { display: flex; align-items: center; gap: 1.5rem; }
.header__logo-img {
  height: 6rem;
  width: 6rem;
  object-fit: contain;
  background: var(--paper);
  border-radius: 50%;
  padding: .45rem;
  box-shadow: 0 0 2rem rgba(0,0,0,.35);
}
.header__logo-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--paper);
  letter-spacing: .06em;
}
.header__logo-name small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: .75rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

.header__menu-list {
  display: flex;
  gap: 3.5rem;
  list-style: none;
}
.header__menu-item > a {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  transition: color .2s;
}
.header__menu-item > a:hover { color: var(--paper); }

.header__submenu {
  position: absolute;
  top: 100%;
  left: -1.5rem;
  list-style: none;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  min-width: 24rem;
  display: none;
}
.header__menu-item.has-sub { position: relative; }
.header__menu-item.has-sub:hover .header__submenu,
.header__menu-item.has-sub:focus-within .header__submenu { display: block; }
.header__submenu a {
  display: block;
  padding: .8rem 0;
  font-size: 1.3rem;
  color: var(--muted);
  transition: color .2s;
}
.header__submenu a:hover { color: var(--paper); }

.header__right { display: flex; align-items: center; gap: 2.5rem; }
.header__phone {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 1.3rem;
  color: var(--paper);
  white-space: nowrap;
}

.burger { display: none; }

/* ----- hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 16rem 0 10rem;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero__bg img {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 55%;
  object-fit: cover;
  object-position: center;
}
.hero__bg-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(270deg, rgba(30,30,32,0) 30%, rgba(30,30,32,.92) 62%, var(--bg) 78%),
    linear-gradient(0deg, rgba(30,30,32,.85), transparent 40%);
}
@media (max-width: 1024px) {
  .hero__bg img { width: 70%; opacity: .55; }
}
@media (max-width: 530px) {
  .hero__bg img { width: 100%; opacity: .35; }
}
.hero__inner { position: relative; }
.hero__title {
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: .01em;
  -webkit-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
  font-size: clamp(2.7rem, 1.5rem + 2.4vw, 5.6rem);
  line-height: 1.15;
  color: var(--paper);
  max-width: 100rem;
  margin-bottom: 3rem;
}
.hero__title-racing {
  display: block;
  width: 12em;
  max-width: 100%;
  margin-bottom: .25em;
  position: relative;
}
.hero__title-racing img {
  display: block;
  width: 100%;
  height: auto;
}
.hero__title-racing-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.hero__title em { font-weight: 600; font-style: normal; }
.hero__subtitle {
  max-width: 50rem;
  font-size: 1.8rem;
  color: var(--muted);
  margin-bottom: 5rem;
}
.hero__actions { display: flex; align-items: center; gap: 4rem; flex-wrap: wrap; margin-bottom: 8rem; }

.hero__stats {
  display: flex;
  gap: 6rem;
  list-style: none;
  flex-wrap: wrap;
}
.hero__stats b {
  display: block;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 3rem;
  color: var(--paper);
}
.hero__stats span { font-size: 1.3rem; color: var(--muted); }

/* ----- services ----- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem;
}
.service-card {
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
}
.service-card:hover, .service-card:focus-within {
  border-color: rgba(255, 251, 241, .35);
  box-shadow: 0 0 24px rgba(255, 251, 241, .06);
}
.service-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  border: 0;
  color: var(--paper);
  font: inherit;
  flex: none;
  overflow: hidden;
  background: #000;
}
.service-card__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-card--video .service-card__media { cursor: pointer; }
.service-card__watch {
  position: absolute;
  inset: auto 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  background: rgba(20,20,22,.78);
  font-size: clamp(11px, 1.3rem, 14px);
  opacity: 1;
  transition: opacity .25s ease, transform .25s ease;
}
.service-card__watch span { font-size: 22px; line-height: 1; }
.service-card__book {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border-top: 1px solid var(--line);
  color: var(--paper);
  font-size: max(12px, 1.3rem);
}
.service-card__book:hover { color: #fff; }
.service-card__media:focus-visible, .service-card__book:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -4px;
}
@media (hover: hover) and (pointer: fine) {
  .service-card__watch { opacity: 0; transform: translateY(6px); }
  .service-card:hover .service-card__watch,
  .service-card:focus-within .service-card__watch { opacity: 1; transform: none; }
}

/* Full-height service videos, opened from the compact preview. */
.video-viewer {
  margin: auto;
  padding: 0;
  border: 0;
  width: min(420px, calc(100vw - 32px), calc((100vh - 150px) * .5625));
  width: min(420px, calc(100vw - 32px), calc((100dvh - 150px) * .5625));
  max-height: calc(100dvh - 24px);
  overflow: visible;
  background: transparent;
  color: var(--paper);
}
.video-viewer::backdrop { background: rgba(8,8,10,.88); }
.video-viewer[open]::backdrop { animation: video-backdrop-in .3s ease; }
.video-viewer__panel {
  position: relative;
  border-radius: 18px;
  background: var(--bg-2);
  box-shadow: 0 24px 100px rgba(0,0,0,.6);
}
.video-viewer__video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
  border-radius: 18px 18px 0 0;
}
.video-viewer__close {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}
.video-viewer__footer { padding: 12px 16px 4px; }
.video-viewer__footer h2 { font-size: 14px; line-height: 1.4; margin-bottom: 8px; }
.video-viewer__footer .service-card__book { font-size: 13px; }
@keyframes video-backdrop-in { from { background: rgba(8,8,10,0); } }
@media (prefers-reduced-motion: reduce) {
  .service-card, .service-card__watch { transition: none; }
  .video-viewer[open]::backdrop { animation: none; }
}
.service-card__body { padding: 2.5rem; display: flex; flex-direction: column; gap: 1.2rem; flex: 1; }
.service-card__body h3 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.8rem;
  color: var(--paper);
}
.service-card__body p { font-size: 1.4rem; color: var(--muted); flex: 1; }
.service-card__price {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--paper);
}

/* ----- full service directory ----- */
.services-directory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem; margin-top: 4rem; }
.services-directory__group { min-width: 0; padding-top: 2rem; border-top: 1px solid var(--line); }
.services-directory h3 { font-family: var(--font-head); font-size: 1.6rem; font-weight: 400; line-height: 1.5; color: var(--paper); margin-bottom: 1.5rem; }
.services-directory ul { list-style: none; display: grid; gap: .8rem; color: var(--muted); font-size: 1.4rem; }
.services-directory__note { margin-top: 2.5rem; color: var(--muted); font-size: 1.3rem; }
.services-directory__note a { color: var(--paper); text-decoration: underline; }
@media (max-width: 1200px) { .services-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 530px) { .services-directory { grid-template-columns: 1fr; } }

/* ----- advantages ----- */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}
.advantage {
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}
.advantage__num {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 1.3rem;
  color: var(--muted);
  display: block;
  margin-bottom: 1.5rem;
}
.advantage h3 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--paper);
  margin-bottom: 1.2rem;
}
.advantage p { font-size: 1.35rem; color: var(--muted); }

/* ----- works slider ----- */
.works-track {
  display: flex;
  gap: 2.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 1rem;
}
.works-track::-webkit-scrollbar { display: none; }
.work {
  flex: 0 0 46rem;
  scroll-snap-align: start;
}
.work__img { aspect-ratio: 3 / 4; width: 100%; max-width: 46rem; object-fit: cover; border-radius: var(--radius-lg); }
.work figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding-top: 1.8rem;
}
.work figcaption b { font-family: var(--font-head); font-weight: 400; font-size: 1.5rem; color: var(--paper); }
.work figcaption span { font-size: 1.3rem; color: var(--muted); text-align: right; }

.slider-nav { display: flex; gap: 1rem; }
.slider-nav__btn {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .25s, color .25s;
}
.slider-nav__btn:hover { background: var(--paper); color: var(--bg); }

/* ----- reviews ----- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.review {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.review p { font-size: 1.5rem; flex: 1; }
.review footer b { display: block; font-family: var(--font-head); font-weight: 400; font-size: 1.4rem; color: var(--paper); }
.review footer span { font-size: 1.25rem; color: var(--muted); }

/* ----- faq ----- */
.faq__item {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.35;
  color: var(--paper);
  cursor: pointer;
  list-style: none;
  display: block;
  position: relative;
  padding-right: 5rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--muted);
  transform: translateY(-50%);
  transition: transform .3s;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p { padding-top: 2rem; max-width: 80rem; color: var(--muted); }
.faq__item .faq__cta { display: inline-block; margin-top: 1.6rem; }

/* ----- form ----- */
.form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 6rem;
}
.form-wrap__left h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(2.4rem, 1.8rem + 1.2vw, 3.2rem);
  color: var(--paper);
  margin-bottom: 2.5rem;
}
.form-wrap__left p { color: var(--muted); margin-bottom: 3.5rem; max-width: 40rem; }
.form-contacts { list-style: none; display: flex; flex-direction: column; gap: 1.2rem; }
.form-contacts a {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 1.7rem;
  color: var(--paper);
  transition: opacity .2s;
}
.form-contacts a:hover { opacity: .7; }

.form { display: flex; flex-direction: column; gap: 2.5rem; }
.form__field span {
  display: block;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.form__field input,
.form__field select {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.6rem;
  padding: 1.7rem 2rem;
  outline: none;
  transition: border-color .25s;
}
.form__field input:focus,
.form__field select:focus { border-color: var(--paper); }
.form__field input::placeholder { color: #616161; }
.form__note { font-size: 1.15rem; color: var(--muted); }
.form__note a, .form__consent a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.form__consent { display: flex; align-items: flex-start; gap: 12px; font-size: 1.3rem; color: var(--muted); }
.form__consent input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--paper); }
.form__trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form__error { font-size: 1.4rem; color: #ffb4a8; }
.form button:disabled { opacity: .65; cursor: wait; }
.form__success {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 1.4rem;
  color: var(--paper);
}

/* ----- footer ----- */
.footer { border-top: 1px solid var(--line); padding: 7rem 0 3rem; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 5rem;
  margin-bottom: 6rem;
}
.footer__logo {
  height: 9rem;
  width: 9rem;
  object-fit: contain;
  background: var(--paper);
  border-radius: 50%;
  padding: .7rem;
}
.footer__brand { font-family: var(--font-head); font-weight: 400; font-size: 1.5rem; color: var(--paper); margin-bottom: 1rem; }
.footer__addr { margin-top: 2rem; color: var(--muted); font-size: 1.4rem; }
.footer__col h4 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--paper);
  margin-bottom: 2rem;
}
.footer__col a {
  display: block;
  font-size: 1.4rem;
  color: var(--muted);
  padding: .6rem 0;
  transition: color .2s;
}
.footer__col a:hover { color: var(--paper); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
  font-size: 1.2rem;
  color: var(--muted);
}

/* ----- responsive ----- */
@media (max-width: 1200px) {
  .header__menu, .header__phone { display: none; }
  .burger {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }
  .burger span {
    width: 3rem;
    height: 2px;
    background: var(--paper);
    transition: transform .3s, opacity .3s;
  }
  .burger.open span:nth-child(1) { transform: translateY(calc(.5rem + 2px)) rotate(45deg); }
  .burger.open span:nth-child(2) { opacity: 0; }
  .burger.open span:nth-child(3) { transform: translateY(calc(-.5rem - 2px)) rotate(-45deg); }
  .header__menu.open {
    display: block;
    position: fixed;
    inset: calc(var(--header-height) + 1px) 0 auto 0;
    max-height: calc(100vh - var(--header-height) - 1px);
    max-height: calc(100dvh - var(--header-height) - 1px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 3rem 4rem;
  }
  .header__menu-list { flex-direction: column; gap: 2rem; }
  .header__submenu {
    position: static;
    display: block;
    background: none;
    border: none;
    padding: 1rem 0 0 2rem;
    min-width: 0;
  }

  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .advantages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews-grid { grid-template-columns: 1fr; }
  .form-wrap { grid-template-columns: 1fr; padding: 4rem; gap: 4rem; }
  .footer__inner { grid-template-columns: 1fr; gap: 3.5rem; }
  .work { flex-basis: 60rem; }
}

@media (max-width: 530px) {
  .container { padding: 0 2rem; }
  .section { padding: 6rem 0; }
  .hero { padding-top: 12rem; min-height: auto; }

  /* Заголовок: без принудительных переносов, компактнее */
  .hero__title {
    line-height: 1.3;
    max-width: 100%;
  }
  .hero__subtitle { font-size: 1.6rem; margin-bottom: 3.5rem; }
  .hero__actions { gap: 2.5rem; }
  .hero__stats { gap: 2rem 3rem; }
  .hero__stats b { font-size: 2.4rem; }

  /* Кнопка: в одну строку */
  .btn-big-arrow {
    font-size: 1.2rem;
    padding: 1.9rem 2.4rem;
    width: 100%;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .btn-big-arrow__icon { width: 2.6rem; height: 2.6rem; }

  /* Хедер: убираем лишнее, чтобы влезало */
  .header__logo-name { display: none; }
  .header__logo-img { height: 5.4rem; width: 5.4rem; padding: .35rem; }
  .header__right .btn--sm { padding: 1rem 1.5rem; font-size: 1.1rem; letter-spacing: .02em; }
  .header__right { gap: 1.5rem; }

  .services-grid, .advantages-grid { grid-template-columns: 1fr; }
  .work { flex-basis: 85%; }
  .form-wrap { padding: 2.4rem; min-width: 0; }
  .form-wrap > * { min-width: 0; }
  .form-contacts a { font-size: 1.5rem; overflow-wrap: anywhere; }
  .faq__item summary { font-size: 1.3rem; padding-right: 4rem; overflow-wrap: break-word; }
  .section__title { overflow-wrap: break-word; }
  .btn-big-arrow__text { min-width: 0; overflow-wrap: anywhere; }
  .btn-big-arrow:hover { gap: 1.5rem; }
}

/* ============================================================
   BEFORE / AFTER slider
   ============================================================ */
.ba-section { padding-top: 4rem; }
.ba-slider {
  --ba-position: 50%;
  position: relative;
  max-width: 90rem;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
}
.ba-slider__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.ba-slider__before {
  position: absolute;
  inset: 0;
  background: var(--bg);
  -webkit-clip-path: inset(0 calc(100% - var(--ba-position)) 0 0);
  clip-path: inset(0 calc(100% - var(--ba-position)) 0 0);
  pointer-events: none;
}
.ba-slider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-position);
  width: 2px;
  background: var(--paper);
  transform: translateX(-50%);
  pointer-events: none;
}
.ba-slider__label {
  position: absolute;
  top: 2.5rem;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--bg);
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: .8rem 1.6rem;
  z-index: 3;
}
.ba-slider__label--before { left: 2.5rem; }
.ba-slider__label--after { right: 2.5rem; }
.ba-slider__handle {
  position: absolute;
  top: 50%;
  left: var(--ba-position);
  transform: translate(-50%, -50%);
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  z-index: 4;
  box-shadow: 0 0 3rem rgba(0,0,0,.5);
}
.ba-slider__arrows { color: var(--bg); font-size: 2.6rem; font-weight: 300; }
.ba-caption {
  text-align: center;
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 1.4rem;
}

/* ============================================================
   Floating messenger buttons
   ============================================================ */
.float-btns {
  position: fixed;
  right: 3rem;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  z-index: 90;
  transition: opacity .2s;
}
.float-btns.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.float-btn {
  width: 6.4rem;
  height: 6.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 .5rem 2rem rgba(0,0,0,.45);
  transition: transform .25s;
}
.float-btn:hover { transform: scale(1.08); }
.float-btn--wa { background: #25d366; }
.float-btn--tg { background: #229ed9; }
@media (max-width: 530px) {
  .float-btns { right: 2rem; bottom: 2rem; }
  .float-btn { width: 5.2rem; height: 5.2rem; }
  /* когда пользователь в форме — кнопки не мешают */
}

/* ============================================================
   Scroll reveal animations
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(4rem);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Video works section
   ============================================================ */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}
.video-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.video-card__toggle { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; border-radius: inherit; background: transparent; color: #fff; cursor: pointer; }
.video-card__toggle span { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; background: rgba(0,0,0,.6); font-size: 18px; }
.video-card__toggle:focus-visible { outline-offset: -4px; }
.video-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  background: #000;
}
.video-card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 6rem 2rem 2rem;
  background: linear-gradient(0deg, rgba(0,0,0,.75), transparent);
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.video-card figcaption b { font-family: var(--font-head); font-weight: 400; font-size: 1.4rem; color: var(--paper); }
.video-card figcaption span { font-size: 1.2rem; color: var(--muted); }
@media (max-width: 1024px) { .videos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 530px)  { .videos-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; } .video-card figcaption { padding: 4rem 1.5rem 1.5rem; } }
@media (max-width: 530px) {
  .video-card figcaption b { font-size: 1.25rem; }
  .video-card figcaption span { font-size: 1.15rem; }
}

/* ============================================================
   Hover animations for photos
   ============================================================ */
.work { cursor: zoom-in; }
.work .work__img { transition: transform .5s ease, filter .5s ease; }
.work:hover .work__img { transform: scale(1.04); filter: brightness(1.08); }
.work figcaption b, .work figcaption span { transition: color .3s; }
.work:hover figcaption b { color: #fff; }
.video-card video { transition: transform .5s ease; }
.video-card:hover video { transform: scale(1.03); }

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  color: var(--paper);
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15,15,16,.94);
  display: grid;
  place-items: center;
}
.lightbox:not([open]) { display: none; }
.lightbox::backdrop { background: rgba(0,0,0,.8); }
.work:focus-visible { outline-offset: -3px; border-radius: var(--radius-lg); }
.lightbox__figure {
  max-width: min(110rem, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 2rem 8rem rgba(0,0,0,.6);
}
.lightbox__figure figcaption {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--paper);
}
.lightbox__close {
  position: absolute;
  top: 3rem;
  right: 3rem;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--paper);
  font-size: 3.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.lightbox__close:hover { background: var(--paper); color: var(--bg); }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--paper);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .25s, color .25s;
}
.lightbox__nav:hover { background: var(--paper); color: var(--bg); }
.lightbox__nav--prev { left: 3rem; }
.lightbox__nav--next { right: 3rem; }
@media (max-width: 530px) {
  .lightbox__nav--prev { left: 1rem; }
  .lightbox__nav--next { right: 1rem; }
  .lightbox__close { top: 1.5rem; right: 1.5rem; }
}

/* Адрес в блоке формы */
.form-contacts__addr {
  margin-top: 2.5rem;
  font-size: 1.35rem;
  color: var(--muted);
  max-width: 32rem;
}

.legal-page { max-width: 90rem; padding-top: 5rem; padding-bottom: 6rem; }
.legal-page h1 { font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1.25; margin: 3rem 0 2rem; overflow-wrap: anywhere; }
.legal-page h2 { font-size: 2rem; margin: 3rem 0 1.2rem; }
.legal-page p { margin-bottom: 1.6rem; }
.legal-page a { text-decoration: underline; overflow-wrap: anywhere; }
.legal-page mark { background: #4b4027; color: #ffdf96; }
.legal-page__notice { padding: 2rem; border: 1px solid #a98b48; border-radius: var(--radius-md); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .video-card video, .work .work__img { transition: none; }
}
