/* ===== SAFASAN — автономные стили (без зависимостей от Tilda) ===== */

:root {
  --brand: #922323;
  --brand-dark: #761b1b;
  --brand-light: #b53030;
  --wa: #25d366;
  --wa-dark: #1da851;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --bg: #ffffff;
  --bg-soft: #f5f4f2;
  --line: #e6e4e0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.8); }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); transform: translateY(-2px); }
.btn--wa-outline { background: transparent; color: var(--wa-dark); border-color: var(--wa); }
.btn--wa-outline:hover { background: var(--wa); color: #fff; }

/* ===== Хедер ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--ink);
}
.logo span { color: var(--brand); }
.logo--light { color: #fff; }
.logo--light span { color: var(--brand-light); }

.nav { display: flex; gap: 30px; margin-left: auto; }
.nav__link {
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--brand);
  transition: width 0.2s ease;
}
.nav__link:hover::after { width: 100%; }

.header__contacts { display: flex; align-items: center; gap: 16px; }
.header__phone { font-weight: 700; font-size: 15px; }
.header__phone:hover { color: var(--brand); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span {
  width: 26px; height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.3s;
}
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: url("assets/img/hero.png") center/cover no-repeat;
  color: #fff;
  overflow: hidden;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(20, 10, 10, 0.85) 0%, rgba(146, 35, 35, 0.55) 55%, rgba(20, 10, 10, 0.4) 100%);
}
.hero__content { position: relative; max-width: 720px; padding-top: 60px; padding-bottom: 60px; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #f1c6c6;
  margin-bottom: 18px;
}
.hero__title {
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 22px;
}
.hero__title span { color: #ffb3b3; }
.hero__text {
  font-size: 18px;
  max-width: 540px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.92);
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  fill: rgba(255, 255, 255, 0.8);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== Секции ===== */
.section { padding: 90px 0; }
.about { padding-bottom: 30px; }
.services { padding-top: 40px; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section__title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 18px;
}
.section__title::after {
  content: "";
  display: block;
  width: 64px; height: 4px;
  background: var(--brand);
  border-radius: 2px;
  margin: 16px auto 0;
}
.section__subtitle { color: var(--muted); font-size: 17px; }

/* ===== Карточки услуг ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card__img img { transform: scale(1.05); }
.card__body { padding: 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card__title { font-size: 22px; font-weight: 700; }
.card__text { color: var(--muted); font-size: 15px; flex: 1; }

/* ===== Галерея работ ===== */
.works { background: var(--bg-soft); }
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery__item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

/* ===== CTA / Заявка ===== */
.cta { background: var(--brand); color: #fff; padding: 80px 0; }
.cta__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.cta__title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin-bottom: 16px; }
.cta__subtitle { font-size: 17px; color: rgba(255, 255, 255, 0.9); margin-bottom: 24px; }
.cta__contacts { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cta__contacts a { font-size: 22px; font-weight: 700; }
.cta__contacts a:hover { color: #ffd0d0; }
.cta__hours { color: rgba(255, 255, 255, 0.8); font-size: 15px; margin-top: 4px; }

.lead {
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  padding: 34px;
  box-shadow: var(--shadow-lg);
}
.lead__title { font-size: 22px; font-weight: 700; margin-bottom: 22px; }
.lead__field { display: block; margin-bottom: 16px; }
.lead__field span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.lead__field input,
.lead__field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.lead__field input:focus,
.lead__field textarea:focus { outline: none; border-color: var(--brand); }
.lead__buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.lead__submit { flex: 1; min-width: 160px; }
.lead__note { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.5; }

/* ===== Футер ===== */
.footer { background: #161210; color: rgba(255, 255, 255, 0.85); padding-top: 56px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 44px;
}
.footer__col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer__col a, .footer__col p { display: block; margin-bottom: 8px; font-size: 15px; }
.footer__col a:hover { color: var(--brand-light); }
.footer__tagline { margin-top: 14px; font-size: 15px; color: rgba(255, 255, 255, 0.6); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 22px 0; font-size: 14px; color: rgba(255, 255, 255, 0.5); }

/* ===== Плавающая WhatsApp ===== */
.wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 58px; height: 58px;
  background: var(--wa);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
  z-index: 90;
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.1); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 30px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; }
.lightbox__close {
  position: absolute;
  top: 20px; right: 28px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
}

/* ===== Адаптив ===== */
@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cta__inner { grid-template-columns: 1fr; gap: 34px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }

  .nav {
    position: fixed;
    top: 76px; right: 0;
    width: 75%; max-width: 320px;
    height: calc(100vh - 76px);
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 18px 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__link { padding: 16px 28px; border-bottom: 1px solid var(--line); }
  .nav__link::after { display: none; }
  .header__contacts .header__phone { display: none; }
  .burger { display: flex; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .section { padding: 60px 0; }
  .hero { min-height: 92vh; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .lead { padding: 24px; }
}
