@font-face {
  font-family: "TildaSans";
  src: url("../fonts/tildasans/TildaSans-Regular.woff2") format("woff2");
  font-weight: 400;
}
@font-face {
  font-family: "TildaSans";
  src: url("../fonts/tildasans/TildaSans-Bold.woff2") format("woff2");
  font-weight: 700;
}

:root {
  --bg: #fff;
  --muted: #f2f2f2;
  --text: #1b1b1b;
  --accent: #33363f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: TildaSans, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
.container { width: min(1120px, 92%); margin: 0 auto; }
.section { padding: 80px 0; }
.section--gray { background: var(--muted); }
.section__title { text-align: center; margin: 0 0 40px; font-size: 38px; }
.center { text-align: center; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid #ececec;
}
.topbar__inner {
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 28px; font-weight: 700; }
.topbar__contacts { display: flex; gap: 20px; align-items: center; font-size: 14px; }
.topbar a { color: inherit; text-decoration: none; }

.hero {
  min-height: 70vh;
  background: url("../img/hero-banner.jpg") center/cover no-repeat;
  position: relative;
  margin-top: 60px;
  display: flex;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.7);
}
.hero__content {
  position: relative; z-index: 1; color: #fff;
  text-align: center; margin: auto;
}
.hero__brand { font-size: 72px; margin: 0 0 10px; font-weight: 700; }
.hero h1 { font-size: 48px; margin: 0 0 14px; }
.hero p { font-size: 28px; margin: 0; line-height: 1.35; }
.hero__arrow { display: inline-block; margin-top: 28px; font-size: 34px; color: #fff; text-decoration: none; }

.cards { display: grid; gap: 24px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; padding: 18px; border-radius: 12px; }
.card__img-wrap { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 10px; margin-bottom: 14px; }
.card__img-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.card__img-wrap .img-b { opacity: 0; }
.card--hoverimg:hover .img-b { opacity: 1; }
.card--hoverimg:hover .img-a { opacity: 0; }
.card h3 { margin: 10px 0; font-size: 24px; }
.card p { margin: 0; font-size: 16px; line-height: 1.45; }

.timeline {
  margin: 0 auto 35px;
  max-width: 920px;
  padding: 0;
  list-style: none;
}
.timeline li {
  border-left: 3px solid #e0e0e0;
  padding: 0 0 24px 20px;
  margin-left: 10px;
  position: relative;
}
.timeline li::before {
  content: "";
  width: 12px; height: 12px; border-radius: 50%;
  background: #333; position: absolute; left: -7px; top: 4px;
}
.timeline h3 { margin: 0 0 6px; font-size: 24px; }
.timeline p { margin: 0; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 20px;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gallery__grid img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  cursor: zoom-in; border-radius: 8px;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}
.feature img { width: 100%; border-radius: 12px; }

.contacts a { color: inherit; }
.socials { display: flex; justify-content: center; gap: 16px; }

.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.88);
  display: none; align-items: center; justify-content: center; z-index: 2000;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }

@media (max-width: 980px) {
  .cards--3 { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; }
  .hero__brand { font-size: 52px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 22px; }
  .topbar__contacts span { display: none; }
}

/* ===== КАК МЫ РАБОТАЕМ ===== */
.timeline {
  margin: 0 auto 40px;
  max-width: 960px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}
.timeline li {
  counter-increment: step;
  position: relative;
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 16px;
  padding: 20px 20px 20px 78px;
  box-shadow: 0 8px 24px rgba(20, 28, 45, 0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.timeline li:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(20, 28, 45, 0.12);
}
.timeline li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #33363f, #50566a);
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 10px;
  background: linear-gradient(180deg, #33363f, #7f879f);
}
.timeline h3 { margin: 0 0 8px; font-size: 22px; }
.timeline p { margin: 0; color: #4f596b; line-height: 1.45; }

/* ===== ГАЛЕРЕЯ СЕТКОЙ ===== */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 170px;
  gap: 12px;
}
.gallery__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  border-radius: 12px;
  transition: transform .25s ease, filter .25s ease, box-shadow .25s ease;
}
.gallery__grid img:hover {
  transform: scale(1.02);
  filter: saturate(1.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.gallery__grid img:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery__grid img:nth-child(6) { grid-column: span 2; }

/* ===== LIGHTBOX / СЛАЙДЕР ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, .92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
.lightbox.open { display: flex; }

.lightbox__img {
  max-width: min(92vw, 1320px);
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 24px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  opacity: .9;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 34px;
  color: #fff;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
}
.lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }

.lightbox__counter {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 22px;
  color: #fff;
  background: rgba(255,255,255,.15);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
}

/* ===== ПОДВАЛ ===== */
.contacts {
  color: #f3f6fb;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(255,255,255,.08), transparent 40%),
    radial-gradient(1000px 450px at 100% 120%, rgba(80,120,255,.15), transparent 45%),
    linear-gradient(160deg, #1f2430, #2b3140);
}
.contacts h2 {
  margin-top: 0;
  font-size: 40px;
  color: #fff;
  letter-spacing: .2px;
}
.contacts p:not(.socials) {
  margin: 14px auto;
  max-width: 760px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 16px 18px;
  line-height: 1.6;
}
.contacts a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,.45);
}
.contacts a:hover { border-bottom-color: #fff; }

.socials {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.socials a {
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  padding: 10px 16px;
  border-radius: 999px;
  transition: .2s ease;
}
.socials a:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.45);
}

/* ===== MOBILE ===== */
@media (max-width: 980px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }
  .gallery__grid img:nth-child(1),
  .gallery__grid img:nth-child(6) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .timeline li { padding: 18px 16px 18px 66px; }
  .timeline li::before {
    left: 16px;
    width: 34px;
    height: 34px;
    top: 16px;
  }

  .lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
  .lightbox__prev { left: 10px; }
  .lightbox__next { right: 10px; }
}