/* ==================== CSS ПЕРЕМЕННЫЕ ==================== */
:root {
  /* Цвета */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-primary: #640800;
  --color-secondary: #cbb495;
  --color-tertiary: #eed8c8;
  --color-bg: #f5efe8;

  /* Контейнер */
  --container-width: 1800px;
  --container-padding: 60px;

  /* Типографика */
  --font-family: "Inter", sans-serif;
  --font-family-heading: "EB Garamond", serif;
  --font-family-accent: "Ibarra Real Nova", serif;
  --font-weight-default: 300;
  --font-size-default: 18px;
  --line-height-default: 130%;

  /* Шапка */
  --header-height: 116px;
}

/* ==================== СБРОС ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
}

img, video {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

input, button, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  background-color: transparent;
  border: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

/* ==================== ШРИФТЫ ==================== */
@font-face {
  font-family: "Inter";
  src: url("../font/Inter-Variable-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../font/Inter-Variable-cyrillic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../font/EBGaramond-Regular-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../font/EBGaramond-Regular-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Ibarra Real Nova";
  src: url("../font/IbarraRealNova-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==================== ГЛОБАЛЬНЫЕ СТИЛИ ==================== */
body {
  font-family: var(--font-family);
  color: var(--color-primary);
  font-weight: var(--font-weight-default);
  font-size: var(--font-size-default);
  line-height: var(--line-height-default);
  background: var(--color-bg);
  overflow-x: clip;
}

body._disable-scroll {
  overflow: hidden;
  touch-action: none;
  -ms-touch-action: none;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
}

main {
  flex: 1;
  position: relative;
}

.container {
  max-width: var(--container-width);
  width: 100%;
  padding-inline: var(--container-padding);
  margin-inline: auto;
}

/* ==================== HOVER ==================== */
.header__link,
.mobile-panel__link,
.footer__col-link,
.footer__social-link {
  transition: color 0.3s ease, opacity 0.3s ease;
}

a.header__link:hover,
a.mobile-panel__link:hover,
a.footer__col-link:hover {
  opacity: 0.6;
}

.footer__social-link:hover {
  opacity: 0.7;
}

.btn {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
  background-color: var(--color-secondary);
  color: var(--color-primary);
}

/* ==================== ШАПКА ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 30;
  padding-block: 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
}

.header__wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.header__link {
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-primary);
  white-space: nowrap;
}

.header__btn {
  flex-shrink: 0;
}

/* ==================== БУРГЕР ==================== */
.burger {
  display: none;
  position: fixed;
  top: 28px;
  right: var(--container-padding);
  z-index: 40;
  width: 32px;
  height: 22px;
  flex-direction: column;
  justify-content: space-between;
}

.burger__line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger._is-active .burger__line:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.burger._is-active .burger__line:nth-child(2) {
  opacity: 0;
}

.burger._is-active .burger__line:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* ==================== МОБИЛЬНОЕ МЕНЮ ==================== */
.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  padding: 32px var(--container-padding);
  background: var(--color-tertiary);
  transform: translateX(100%);
  transition: transform 0.4s ease;
}

.mobile-panel._is-show {
  transform: translateX(0);
}

.mobile-panel__nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-panel__link {
  font-size: 24px;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* ==================== ПОДВАЛ ==================== */
.footer {
  background-color: var(--color-primary);
  padding-block: 64px 32px;
  position: relative;
  z-index: 1;
}

.footer__wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 40px;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 320px;
}

.footer__logo {
  display: flex;
  align-items: center;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 140px;
}

.footer__col-title {
  font-weight: 500;
  font-size: 18px;
  color: var(--color-secondary);
}

.footer__col-link {
  font-weight: 300;
  font-size: 15px;
  color: var(--color-secondary);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(203, 180, 149, 0.25);
}

.footer__copyright,
.footer__bottom .footer__col-link {
  font-size: 13px;
  font-weight: 300;
  color: var(--color-secondary);
}

/* ==================== ОБЛЁТ АВТОМОБИЛЯ (ФОН) ==================== */
.car-stage-wrap {
  position: relative;
}

.car-stage {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  background-color: var(--color-tertiary);
}

.car-stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.car-stage-wrap__content {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
}

/* ==================== ГЛАВНАЯ СТРАНИЦА ==================== */
.hero,
.service,
.contacts {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 640px;
  padding-top: var(--header-height);
}

.hero__title {
  font-family: var(--font-family-accent);
  font-weight: 400;
  font-size: 100px;
  line-height: 100%;
  color: var(--color-primary);
}

.hero__subtitle {
  font-family: var(--font-family);
  font-weight: 300;
  font-size: 32px;
  line-height: 130%;
  color: var(--color-primary);
}

.service__wrapper,
.contacts__wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 620px;
}

.service__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.service__gallery-item {
  display: none;
}

.service__title,
.contacts__title {
  font-family: var(--font-family-heading);
  font-weight: 400;
  font-size: 64px;
  line-height: 108%;
  color: var(--color-primary);
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(100, 8, 0, 0.35);
}

.service__text {
  font-family: var(--font-family);
  font-weight: 300;
  font-size: 24px;
  line-height: 140%;
  color: var(--color-primary);
}

.contacts__link,
.contacts__text {
  font-family: var(--font-family);
  font-weight: 300;
  font-size: 24px;
  color: var(--color-primary);
}

/* ==================== ПАРТНЁРЫ ==================== */
.partners {
  background-color: var(--color-tertiary);
  padding-block: 100px;
}

.partners__wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.partners__title {
  font-family: var(--font-family-heading);
  font-weight: 400;
  font-size: 56px;
  line-height: 108%;
  text-transform: uppercase;
  color: var(--color-primary);
}

.partners__subtitle {
  font-family: var(--font-family);
  font-weight: 300;
  font-size: 20px;
  line-height: 140%;
  max-width: 720px;
  color: var(--color-primary);
}

.partners__grid {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 36px;
}

.partners__item {
  flex: 1 1 33.3333%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  border-right: 1px solid rgba(100, 8, 0, 0.15);
}

.partners__item:nth-child(3n) {
  border-right: none;
}

.partners__item img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.partners__item:hover img {
  filter: grayscale(0%);
}

/* ==================== ГАЛЕРЕЯ ДО/ПОСЛЕ ==================== */
.before-after-popup {
  display: none;
  max-width: 520px;
  width: 100%;
}

.before-after {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  touch-action: none;
  user-select: none;
  --position: 50%;
}

.before-after__media {
  position: relative;
  width: 100%;
  height: 100%;
}

.before-after__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.before-after__img_before {
  clip-path: inset(0 calc(100% - var(--position)) 0 0);
}

.before-after__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--position);
  width: 2px;
  transform: translateX(-50%);
  background-color: var(--color-white);
  pointer-events: none;
}

.before-after__handle {
  position: absolute;
  top: 50%;
  left: var(--position);
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: var(--color-white);
  color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: ew-resize;
  touch-action: none;
}

.before-after__tag {
  position: absolute;
  top: 20px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--color-white);
  background-color: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.before-after__tag_before {
  left: 20px;
}

.before-after__tag_after {
  right: 20px;
}

/* ==================== СТРАНИЦА PRIVACY ==================== */
.policy {
  padding-block: calc(var(--header-height) + 60px) 100px;
}

.policy__wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
}

.policy__title {
  font-family: var(--font-family-heading);
  font-size: 48px;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.policy__subtitle {
  font-family: var(--font-family-heading);
  font-size: 28px;
  color: var(--color-primary);
  margin-top: 16px;
}

.policy__text {
  font-size: 17px;
  line-height: 160%;
  color: var(--color-primary);
}

/* ==================== ФОРМЫ ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
  background-color: var(--color-primary);
  color: var(--color-white);
}

.callback-form-popup {
  display: none;
  max-width: 480px;
  width: 100%;
}

.contact-popup {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 48px 40px;
  background-color: var(--color-bg);
}

.contact-popup__title {
  font-family: var(--font-family-heading);
  font-size: 32px;
  color: var(--color-primary);
}

.contact-popup__text {
  font-size: 15px;
  line-height: 150%;
  color: var(--color-primary);
}

.contact-popup__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.contact-popup__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 999px;
  background-color: var(--color-white);
  border: 1px solid rgba(100, 8, 0, 0.15);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.contact-popup__item:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.contact-popup__item:hover .contact-popup__icon,
.contact-popup__item:hover .contact-popup__label {
  color: var(--color-white);
}

.contact-popup__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--color-tertiary);
  color: var(--color-primary);
  transition: color 0.3s ease;
}

.contact-popup__label {
  font-size: 16px;
  color: var(--color-primary);
  transition: color 0.3s ease;
}
