/* Autosector — лендинг студии детейлинга, Первоуральск */

:root {
  --ink: #0a0b0c;
  --surface: #121416;
  --surface-2: #1a1d20;
  --line: #262a2e;
  --line-soft: #1c2023;
  --text: #f1f4f2;
  --muted: #97a29b;
  --acid: #24d424;
  --acid-dim: #16a016;
  --acid-glow: rgba(36, 212, 36, 0.35);

  --font-display: "Oswald", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, sans-serif;

  /* Ступени ниже основного текста фиксированные: подписи, лейблы и
     вторичные строки не должны расти вместе с экраном */
  --step-label: 0.78rem;
  --step-xs: 0.87rem;
  --step-sm: 0.95rem;
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-1: clamp(1.1rem, 1.04rem + 0.3vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.28rem + 0.6vw, 1.85rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.5vw, 3rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.4vw, 5.5rem);

  --gut: clamp(1.15rem, 0.9rem + 1.2vw, 2rem);
  --section-y: clamp(4.5rem, 3rem + 7vw, 9rem);
  --maxw: 1240px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--line) var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Браузерные поверхности, которые мы не рисовали, но которые всё равно наши */
::selection {
  background: var(--acid);
  color: var(--ink);
}

:where(input, textarea) {
  caret-color: var(--acid);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track {
  background: var(--ink);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 99px;
  border: 3px solid var(--ink);
}
::-webkit-scrollbar-thumb:hover {
  background: #39403f;
}

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
  border-radius: 2px;
}

a {
  color: inherit;
  text-decoration-color: rgba(151, 162, 155, 0.5);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-color: var(--acid);
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
  line-height: 1.02;
}

p {
  margin: 0;
}

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

.section {
  padding-block: var(--section-y);
  position: relative;
}

/* Якорь не должен уводить заголовок под фиксированную шапку. Шапка везде
   в одну строку, поэтому запас один на все ширины */
:target,
.section[id],
.hero {
  scroll-margin-top: 5rem;
}

.section__head {
  margin-bottom: clamp(2.2rem, 1.4rem + 2.5vw, 3.6rem);
}

.section__title {
  font-size: var(--step-3);
}

.section__lead {
  color: var(--muted);
  margin-top: 1.1rem;
  max-width: 62ch;
  font-size: var(--step-1);
}

/* Световая полоса — свет цеха, которым мастер ищет повреждение */
.lightbar {
  height: 2px;
  border: 0;
  margin: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(241, 244, 242, 0.15) 12%,
    var(--acid) 50%,
    rgba(241, 244, 242, 0.15) 88%,
    transparent
  );
  box-shadow: 0 0 18px 1px var(--acid-glow);
  opacity: 0.55;
}

/* ---------- Шапка ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 1.5rem;
  padding: 0.75rem var(--gut);
  background: rgba(10, 11, 12, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.topbar[data-stuck="true"] {
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex: none;
}
.brand img {
  width: 30px;
  height: 30px;
}

/* До 900px якоря не помещаются в строку с логотипом и кнопкой, а вторая
   строка утраивает высоту шапки над первым экраном. Навигация уходит:
   на узком экране путь к действию — кнопка «Записаться» и нижняя панель */
.nav {
  display: none;
  gap: 1.25rem;
  font-size: var(--step-xs);
}
.nav::-webkit-scrollbar {
  display: none;
}
.nav a {
  white-space: nowrap;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover {
  color: var(--text);
}

.topbar .btn {
  margin-left: auto;
}
@media (min-width: 900px) {
  .nav {
    display: flex;
    gap: 1.6rem;
    margin-left: auto;
  }
  .topbar .btn {
    margin-left: 0;
  }
}

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: var(--acid);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: var(--step-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--btn-bg);
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    background 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.8);
}
.btn:active {
  transform: translateY(0);
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line);
  box-shadow: none;
}
.btn--ghost:hover {
  border-color: var(--acid);
  color: var(--acid);
  box-shadow: none;
}

.btn--sm {
  padding: 0.6rem 1rem;
  font-size: var(--step-xs);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Первый экран ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 940px);
  display: flex;
  align-items: flex-end;
  padding-block: 9rem clamp(2.5rem, 1rem + 5vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
/* Кадр вертикальный, экран горизонтальный: держим полосу с лобовым стеклом,
   где стоит инжекторный мост — ради него снимок и выбран. Ниже идёт капот,
   выше потолок цеха, и то и другое сюжет не несёт */
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
@media (min-width: 900px) {
  .hero__media img {
    object-position: 50% 25%;
  }
  .hero {
    padding-block: 7rem clamp(2.5rem, 1rem + 5vw, 5rem);
  }
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  /* На телефоне первый экран высокий, и стекло с мостом попадает в самую
     плотную часть подложки. Верх осветляем — текст лежит ниже и не страдает */
  background: linear-gradient(
    to top,
    var(--ink) 4%,
    rgba(10, 11, 12, 0.88) 32%,
    rgba(10, 11, 12, 0.34) 60%,
    rgba(10, 11, 12, 0.26) 100%
  );
}

/* Один авторский момент: свет проходит по стеклу, как лампа мастера */
.hero__sweep {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45vw;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(241, 244, 242, 0.06) 45%,
    rgba(36, 212, 36, 0.12) 52%,
    transparent 70%
  );
  filter: blur(6px);
  transform: translateX(-60vw);
  animation: sweep 2.6s var(--ease-out) 0.35s both;
}
@keyframes sweep {
  from {
    transform: translateX(-60vw);
  }
  to {
    transform: translateX(150vw);
  }
}

.hero__inner {
  position: relative;
  width: 100%;
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 700;
  max-width: 16ch;
  letter-spacing: -0.025em;
}
.hero h1 em {
  font-style: normal;
  color: var(--acid);
}

.hero__sub {
  margin-top: 1.6rem;
  max-width: 48ch;
  font-size: var(--step-1);
  color: var(--muted);
}

.hero__actions {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero__facts {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 2.2rem;
  color: var(--muted);
  font-size: var(--step-xs);
}
.hero__facts b {
  color: var(--text);
  font-weight: 600;
}
.hero__facts a {
  color: var(--muted);
}

/* ---------- Прайс-лист услуг ---------- */
.price {
  border-top: 1px solid var(--line);
}

.price__row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name price"
    "desc desc"
    "act  act";
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s;
}
.price__row:hover {
  background: var(--surface);
}

.price__name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.price__desc {
  grid-area: desc;
  color: var(--muted);
  max-width: 54ch;
  font-size: var(--step-sm);
}

.price__value {
  grid-area: price;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--acid);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price__value span {
  color: var(--muted);
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: 0.04em;
  display: block;
  text-align: right;
}

.price__act {
  grid-area: act;
  margin-top: 0.4rem;
}

@media (min-width: 820px) {
  .price__row {
    grid-template-columns: minmax(14rem, 20rem) 1fr auto auto;
    grid-template-areas: "name desc price act";
    align-items: center;
    gap: 2rem;
    padding-block: 1.7rem;
  }
  .price__act {
    margin-top: 0;
  }
}

.price__note {
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: var(--step-xs);
  max-width: 60ch;
}

/* ---------- Ремонт скола ---------- */
.chip {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.chip__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .chip__grid {
    grid-template-columns: 1.05fr 1fr;
  }
}

.chip__media {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 26px 60px -30px rgba(0, 0, 0, 0.9);
}
/* height: auto обязателен — иначе атрибут высоты у картинки остаётся
   презентационной подсказкой и aspect-ratio не применяется */
.chip__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  /* Трещина идёт в верхней трети кадра, ниже начинается салон. Держимся
     за верх, иначе в 4:3 попадёт ровное стекло без повреждения */
  object-position: 50% 28%;
}

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  counter-reset: s;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 3.1rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
}
.steps li:last-child {
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 1.25rem;
  font-family: var(--font-display);
  font-size: var(--step-sm);
  font-weight: 600;
  color: var(--acid);
  font-variant-numeric: tabular-nums;
}
.steps b {
  font-weight: 600;
}
.steps span {
  color: var(--muted);
  display: block;
  font-size: var(--step-sm);
}
/* Шаг занимает всю ширину контейнера, поэтому с 820px он разводится в две
   колонки — как строка прайса: слева действие, справа пояснение. Иначе
   короткая строка тянула бы за собой полосу пустоты до правого края */
@media (min-width: 820px) {
  .steps li {
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) 1fr;
    gap: 0 2.2rem;
    align-items: baseline;
  }
}

/* ---------- Почему обращаются ---------- */
.why__rating {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  flex-wrap: wrap;
  font-size: var(--step-1);
}
.why__rating strong {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--acid);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.why__rating span {
  color: var(--muted);
}

.why__list {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
@media (min-width: 760px) {
  .why__list {
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }
}
.why__list li {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.why__list svg {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 0.28em;
  color: var(--acid);
}

/* ---------- Работы ---------- */
.works {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .works {
    grid-template-columns: repeat(6, 1fr);
  }
  .works__item:nth-child(1) {
    grid-column: span 4;
  }
  .works__item:nth-child(2) {
    grid-column: span 2;
  }
  .works__item:nth-child(3) {
    grid-column: span 2;
  }
  .works__item:nth-child(4) {
    grid-column: span 4;
  }
}

.works__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface);
  border: 0;
  padding: 0;
  color: inherit;
  display: block;
  width: 100%;
}
.works__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
/* Тот же снимок стоит в первом экране, но взятый по стеклу. В плитке кадр
   опускается на капот с полимером и салфеткой: одно фото, два разных сюжета,
   и повтор не читается как повтор */
.works__item--chip img {
  object-position: 50% 52%;
}
/* Затемнение держит подпись читаемой и на светлом капоте, и на тёмном крыле */
.works__cap {
  position: absolute;
  inset: auto 0 0 0;
  height: 35%;
  display: flex;
  align-items: flex-end;
  padding: 0 1rem 0.9rem;
  font-size: var(--step-xs);
  color: var(--text);
  background: linear-gradient(
    to top,
    rgba(10, 11, 12, 0.92),
    rgba(10, 11, 12, 0.6) 45%,
    transparent
  );
  text-align: left;
}

/* ---------- Отзывы ---------- */
.reviews {
  display: grid;
  gap: 0;
}
@media (min-width: 860px) {
  .reviews {
    grid-template-columns: 1fr 1fr;
    column-gap: 3.5rem;
  }
}

.review {
  margin: 0;
  padding-block: 1.8rem;
  border-bottom: 1px solid var(--line);
}
.review p {
  font-size: var(--step-1);
  line-height: 1.5;
  text-wrap: pretty;
}
.review p::before {
  content: "«";
  color: var(--acid);
}
.review p::after {
  content: "»";
  color: var(--acid);
}
.review figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: var(--step-xs);
}
.review figcaption b {
  color: var(--text);
  font-weight: 600;
  font-style: normal;
}

/* ---------- FAQ ---------- */
.faq {
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1.35rem;
  padding-right: 2.5rem;
  position: relative;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  color: var(--acid);
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 1.75rem;
  width: 13px;
  height: 13px;
  border-right: 2px solid var(--acid);
  border-bottom: 2px solid var(--acid);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
}
.faq .faq__body {
  color: var(--muted);
  padding-bottom: 1.5rem;
  max-width: 66ch;
}

/* ---------- Контакты ---------- */
.contacts__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 3.5rem);
}
@media (min-width: 900px) {
  .contacts__grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

.contacts__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contacts__list li {
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.contacts__label {
  display: block;
  color: var(--muted);
  font-size: var(--step-label);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
/* Адрес, телефон и часы — данные, а не ярлык: прописные их только замедляют */
.contacts__value {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
}
a.contacts__value:hover {
  color: var(--acid);
}

.channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.map {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  min-height: 320px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.35) contrast(0.95) brightness(0.85);
}

/* Если виджет не отрисуется — блокировщик, приватный режим, сеть —
   на месте карты остаётся не серая пустота, а читаемый адрес */
.map::before {
  content: "Карта не загрузилась. Адрес и маршрут — ниже.";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: var(--step-xs);
}
/* Ссылки-указания Яндекса идут вместе с виджетом и должны остаться видимыми */
.map__credits {
  position: absolute;
  top: 0.5rem;
  left: 0.6rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 12px;
}
.map__credits a {
  color: #eee;
  text-decoration: none;
}
.map__credits a:hover {
  text-decoration: underline;
}

.map__panel {
  position: relative;
  margin: 1rem;
  padding: 1.1rem 1.2rem;
  background: rgba(10, 11, 12, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.map__panel p {
  color: var(--muted);
  font-size: var(--step-xs);
  margin-bottom: 0.9rem;
}

/* ---------- Подвал ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  color: var(--muted);
  font-size: var(--step-xs);
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}

/* ---------- Служебная плашка ---------- */
/* Не часть сайта студии, а отметка о статусе макета. Поэтому она лежит
   ниже подвала, набрана самой мелкой ступенью и не берёт акцент.
   Нижний отступ держит место под липкой панелью на мобильном */
.demo {
  margin: 0;
  padding: 0.9rem var(--gut) 6rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: var(--step-label);
  line-height: 1.5;
  text-align: center;
}
@media (min-width: 760px) {
  .demo {
    padding-bottom: 0.9rem;
  }
}

/* ---------- Липкая панель действия на мобильном ---------- */
.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 70;
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem;
  background: rgba(10, 11, 12, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease-out);
}
.dock[data-show="true"] {
  transform: translateY(0);
}
.dock .btn {
  flex: 1;
}
@media (min-width: 760px) {
  .dock {
    display: none;
  }
}

/* ---------- Просмотр фото ---------- */
/* ---------- Появление при прокрутке ---------- */
.reveal {
  opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }
  .js .reveal[data-seen="true"] {
    opacity: 1;
    transform: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
