/* ============================================================
   KDauto 3D — стили лендинга
   ============================================================ */

:root {
  --ink:        #0d0f12;
  --ink-2:      #171b21;
  --ink-3:      #23282f;
  --text:       #1a1d22;
  --muted:      #6b7280;
  --line:       #e6e8ec;
  --bg:         #ffffff;
  --bg-alt:     #f5f6f8;
  --accent:     #ff5a1f;
  --accent-2:   #ff8a3d;
  --accent-ink: #ffffff;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(13, 15, 18, .06), 0 2px 8px rgba(13, 15, 18, .04);
  --shadow:    0 4px 12px rgba(13, 15, 18, .07), 0 18px 40px rgba(13, 15, 18, .07);
  --shadow-lg: 0 24px 70px rgba(13, 15, 18, .16);

  --container: 1200px;
  --gutter: 20px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
[hidden] { display: none !important; }

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

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: #fff; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------------- Кнопки ---------------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  box-shadow: 0 8px 22px rgba(255, 90, 31, .28);
}
.btn--primary:hover { --btn-bg: #f04f16; box-shadow: 0 12px 30px rgba(255, 90, 31, .36); }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
}
.btn--outline:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--lg { padding: 15px 30px; font-size: 16px; }
.btn--block { width: 100%; }

.btn__spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading .btn__spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Шапка ---------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo { flex: none; display: flex; align-items: center; }
.logo img { height: 34px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav__link {
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  transition: background-color .18s ease, color .18s ease;
}
.nav__link:hover { background: var(--bg-alt); }
.nav__link.is-active { color: var(--accent); }

.nav__cta { display: none; }

.header__side { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav + .header__side { margin-left: 0; }

.header__phone { font-weight: 700; font-size: 15px; white-space: nowrap; }
.header__phone:hover { color: var(--accent); }

.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 12px;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  background: radial-gradient(120% 120% at 15% 0%, #1d2229 0%, var(--ink) 55%);
  color: #fff;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 120px);
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(90% 70% at 50% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(90% 70% at 50% 30%, #000 30%, transparent 100%);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(255,90,31,.34) 0%, transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: rgba(255,255,255,.88);
  margin-bottom: 22px;
}
.badge__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255,90,31,.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(255,90,31,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,90,31,0); }
}

.hero__title {
  font-size: clamp(34px, 5.4vw, 62px);
  letter-spacing: -.03em;
  margin-bottom: 20px;
  text-wrap: balance;
}

.hero__text {
  font-size: clamp(16px, 1.6vw, 19px);
  color: rgba(255,255,255,.72);
  max-width: 56ch;
  margin-bottom: 32px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.stats__value {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(120deg, #fff 20%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats__label { font-size: 13.5px; color: rgba(255,255,255,.6); line-height: 1.35; }

.hero__media { position: relative; }

.hero__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.1);
}

.hero__placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* мини-анимация 3D-принтера вместо фото */
.printer { position: relative; width: 62%; aspect-ratio: 1; }
.printer__frame {
  position: absolute; inset: 0;
  border: 2px solid rgba(255,255,255,.22);
  border-radius: 14px;
}
.printer__bed {
  position: absolute; left: 14%; right: 14%; bottom: 16%;
  height: 8px;
  background: rgba(255,255,255,.3);
  border-radius: 4px;
}
.printer__object {
  position: absolute; left: 50%; bottom: calc(16% + 8px);
  width: 34%;
  transform: translateX(-50%);
  height: 10%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-radius: 4px 4px 0 0;
  animation: grow 4s ease-in-out infinite;
}
.printer__head {
  position: absolute; top: 24%; left: 50%;
  width: 22%; height: 10px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.75);
  border-radius: 3px;
  animation: slide 2s ease-in-out infinite alternate;
}
@keyframes grow  { 0%, 100% { height: 8%; } 50% { height: 40%; } }
@keyframes slide { from { transform: translateX(-120%); } to { transform: translateX(20%); } }

.hero__card {
  position: absolute;
  left: -14px; bottom: -22px;
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  max-width: 230px;
}
.hero__card strong { font-size: 15px; }
.hero__card span { font-size: 13px; color: var(--muted); }

/* ---------------- Секции ---------------- */

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--bg-alt); }

.section__head { max-width: 680px; margin: 0 auto clamp(32px, 4vw, 52px); text-align: center; }
.section__title { font-size: clamp(27px, 3.6vw, 42px); margin-bottom: 14px; text-wrap: balance; }
.section__sub { color: var(--muted); font-size: clamp(15px, 1.5vw, 17px); }

.grid { display: grid; gap: 20px; }
.grid--services { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--reviews  { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }

.card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(255,90,31,.14), rgba(255,138,61,.08));
  color: var(--accent);
  margin-bottom: 18px;
}
.card__title { font-size: 19px; margin-bottom: 10px; }
.card__text { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.card__price { font-size: 19px; font-weight: 800; color: var(--ink); margin-top: auto; }
.card__link {
  margin-top: 14px;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  display: inline-flex; gap: 7px; align-items: center;
}
.card__link span { transition: transform .2s ease; }
.card__link:hover span { transform: translateX(4px); }

/* ---------------- Галерея работ ---------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}
.filters__btn {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: all .2s ease;
}
.filters__btn:hover { border-color: var(--ink); }
.filters__btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.work {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}
.work:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work[hidden] { display: none; }

.work__btn {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: #eceef1;
  cursor: zoom-in;
  overflow: hidden;
}
.work__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.work__btn:hover .work__img { transform: scale(1.06); }

.work__img--empty {
  display: grid;
  place-items: center;
  color: #b7bdc6;
  background: #eceef1;
}

.work__zoom {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(13,15,18,.72);
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.work__btn:hover .work__zoom,
.work__btn:focus-visible .work__zoom { opacity: 1; transform: translateY(0); }

.work__body { padding: 20px 22px 24px; }
.work__tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,90,31,.1);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.work__title { font-size: 18px; margin-bottom: 8px; }
.work__text { color: var(--muted); font-size: 14.5px; }

.gallery__empty { text-align: center; color: var(--muted); padding: 40px 0 0; }

/* ---------------- Этапы ---------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.steps__item {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  border: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.section--alt .steps__item { background: #fff; }
.steps__item:hover { border-color: rgba(255,90,31,.35); }
.steps__num {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: rgba(255,90,31,.32);
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.steps__title { font-size: 17.5px; margin-bottom: 8px; }
.steps__text { color: var(--muted); font-size: 14.5px; }

/* ---------------- О компании ---------------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.about__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.about__placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #eceef1, #f8f9fa);
  display: grid; place-items: center;
  border: 1px solid var(--line);
}
.about__placeholder img { opacity: .18; width: 120px; }
.about__content .section__title { text-align: left; margin-bottom: 18px; }
.about__text { color: var(--muted); font-size: 16px; margin-bottom: 26px; }
.about__text p { margin-bottom: 14px; }

/* ---------------- Отзывы ---------------- */

.card--review { justify-content: space-between; }
.rating { display: flex; gap: 3px; margin-bottom: 14px; }
.rating__star { fill: #d7dae0; }
.rating__star.is-on { fill: #ffb020; }

.card__quote { margin: 0 0 20px; font-size: 15.5px; color: var(--text); }

.author { display: flex; align-items: center; gap: 12px; }
.author__photo {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.author__photo--letter {
  display: grid; place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
}
.author__name { display: block; font-size: 15px; }
.author__role { display: block; font-size: 13px; color: var(--muted); }

/* ---------------- Контакты + форма ---------------- */

.section--contacts { background: var(--ink); color: #fff; padding-bottom: 0; }
.section--contacts .section__title { text-align: left; }

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding-bottom: clamp(56px, 8vw, 104px);
}

.contacts__lead { color: rgba(255,255,255,.7); font-size: 17px; margin: 14px 0 32px; }

.contacts__list { display: grid; gap: 18px; margin-bottom: 28px; }
.contacts__item { display: flex; gap: 14px; align-items: flex-start; }
.contacts__ico {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: var(--accent-2);
}
.contacts__label { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.45); }
.contacts__item a { font-weight: 700; }
.contacts__item a:hover { color: var(--accent-2); }

.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials__link {
  padding: 9px 18px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s ease;
}
.socials__link:hover { background: #fff; color: var(--ink); border-color: #fff; }

.form-wrap {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-lg);
}

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field { display: block; margin-bottom: 16px; }
.field__label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; }
.req { color: var(--accent); }

.field__input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfc;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.field__input::placeholder { color: #a6acb6; }
.field__input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,90,31,.14);
}
.field__input--area { resize: vertical; min-height: 110px; }
.field__input.is-error { border-color: #e03131; box-shadow: 0 0 0 3px rgba(224,49,49,.12); }

.form__note { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; text-align: center; }

.form__status { margin: 14px 0 0; font-size: 14.5px; font-weight: 600; text-align: center; }
.form__status.is-ok    { color: #1a9e57; }
.form__status.is-error { color: #e03131; }

.map { line-height: 0; filter: grayscale(.25); }
.map iframe { width: 100% !important; height: clamp(280px, 40vw, 420px) !important; border: 0; display: block; }

/* ---------------- Подвал ---------------- */

.footer { background: var(--ink-2); color: rgba(255,255,255,.7); padding: clamp(40px, 5vw, 64px) 0 24px; }

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__brand img { height: 32px; width: auto; margin-bottom: 16px; }
.footer__brand p { font-size: 14.5px; max-width: 42ch; }

.footer__nav { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer__nav a:hover { color: #fff; }

.footer__contacts { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer__contacts a { font-weight: 700; color: #fff; }
.footer__contacts a:hover { color: var(--accent-2); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 20px;
  font-size: 13px;
  color: rgba(255,255,255,.45);
}
.footer__bottom a:hover { color: #fff; }

/* ---------------- Лайтбокс ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 10, 12, .93);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }

.lightbox__inner { margin: 0; max-width: min(1100px, 100%); max-height: 100%; text-align: center; }
.lightbox__img {
  max-width: 100%;
  max-height: 76vh;
  margin: 0 auto;
  border-radius: var(--radius);
  object-fit: contain;
}
.lightbox__caption { color: #fff; margin-top: 18px; }
.lightbox__caption strong { display: block; font-size: 18px; margin-bottom: 5px; }
.lightbox__caption span { color: rgba(255,255,255,.6); font-size: 14.5px; }

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.2); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------------- Кнопка «наверх» ---------------- */

.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .25s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent); }

/* ---------------- Появление при скролле ---------------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { max-width: 560px; }
  .hero__card { left: auto; right: 12px; bottom: -18px; }
  .about { grid-template-columns: 1fr; }
  .about__media { max-width: 560px; }
  .contacts { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .burger { display: block; }
  .header__phone { display: none; }
  .header__btn { display: none; }
  .nav + .header__side { margin-left: auto; }

  /* backdrop-filter делает шапку containing block для position:fixed —
     выпадающее меню оказалось бы заперто внутри неё. */
  .header {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 20px var(--gutter) 40px;
    background: #fff;
    border-top: 1px solid var(--line);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.2,.7,.3,1), visibility .3s;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; }

  .nav__link { padding: 15px 12px; font-size: 17px; border-radius: 12px; }
  .nav__cta { display: inline-flex; margin-top: 16px; justify-content: center; padding: 15px 22px; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  body { font-size: 15.5px; }

  .hero { padding-top: 40px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .hero__card { position: static; margin-top: 16px; max-width: none; }

  .stats { grid-template-columns: 1fr; gap: 14px; text-align: left; }
  .stats__item { display: flex; align-items: baseline; gap: 12px; }
  .stats__value { font-size: 26px; }

  .card { padding: 22px; }
  .gallery { grid-template-columns: 1fr; }
  .grid--services, .grid--reviews { grid-template-columns: 1fr; }

  .form__row { grid-template-columns: 1fr; }
  .form-wrap { padding: 22px 18px; }

  .filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters__btn { flex: none; }

  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { justify-content: center; text-align: center; }

  .lightbox { padding: 12px; }
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__close { top: 10px; right: 10px; }

  .to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 380px) {
  .logo img { height: 28px; }
  .section__title { font-size: 25px; }
}

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

@media print {
  .header, .footer, .to-top, .lightbox, .form-wrap { display: none !important; }
  .hero { background: none; color: #000; }
}
