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

:root {
  --primary: #c8102e;
  --primary-dark: #a00d26;
  --text: #1a1a1a;
  --gray: #f5f5f5;
  --border: #e0e0e0;
}

body {
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== HEADER ========== */
.header { position: sticky; top: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); z-index: 100; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--primary); }
.header__phone { font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; }

/* ========== ЛОГОТИП ========== */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--primary); font-weight: 800; font-size: 20px; flex-shrink: 0; }
.logo__image { display: block; height: 48px; width: auto; object-fit: contain; }
.logo__text { white-space: nowrap; }

/* ========== HERO ========== */
.hero { position: relative; min-height: 80vh; display: flex; align-items: center; background-size: cover; background-position: center; background-color: #222; color: #fff; overflow: hidden; }
.hero__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__content { position: relative; z-index: 1; max-width: 800px; padding: 80px 0; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.1; margin-bottom: 20px; }
.hero p { font-size: clamp(16px, 2vw, 20px); margin-bottom: 32px; opacity: .9; }

/* ========== BUTTONS ========== */
.btn { display: inline-block; padding: 14px 32px; border-radius: 8px; font-weight: 600; font-size: 16px; text-decoration: none; border: none; cursor: pointer; transition: background .2s; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ========== SECTIONS ========== */
.section { padding: 80px 0; }
.section--gray { background: var(--gray); }
.section__title { font-size: clamp(28px, 4vw, 40px); text-align: center; margin-bottom: 48px; }

/* ========== GRID ========== */
.grid { display: grid; gap: 24px; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ========== CARD ========== */
.card { background: #fff; padding: 32px; border-radius: 12px; text-align: center; border: 1px solid var(--border); }
.card__icon { font-size: 40px; margin-bottom: 16px; }
.card h3 { margin-bottom: 8px; font-size: 18px; }
.card p { color: #555; font-size: 15px; }

/* ========== SERVICE ========== */
.service { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.service img { width: 100%; height: 200px; object-fit: cover; display: block; }
.service__body { padding: 24px; }
.service h3 { margin-bottom: 8px; }
.service p { color: #555; font-size: 15px; }

/* ========== GALLERY ========== */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gallery__item { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
.gallery__item img,
.gallery__item video { width: 100%; height: 240px; object-fit: cover; display: block; }
.gallery__item figcaption { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 16px; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #fff; font-weight: 500; }

/* ========== STEPS ========== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.step { background: #fff; padding: 24px; border-radius: 12px; border-left: 4px solid var(--primary); }
.step__num { font-size: 32px; font-weight: 800; color: var(--primary); opacity: .3; }
.step h3 { margin: 8px 0; font-size: 18px; }

/* ========== CALCULATOR ========== */
.calc__note { text-align: center; color: #666; font-size: 14px; max-width: 720px; margin: -24px auto 32px; }
.calc { max-width: 640px; margin: 0 auto; background: #fff; padding: 32px; border-radius: 12px; border: 1px solid var(--border); }
.calc__row { margin-bottom: 20px; }
.calc__row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc__row label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.calc__row input,
.calc__row select { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 16px; font-family: inherit; }
.calc__row input:focus,
.calc__row select:focus { outline: none; border-color: var(--primary); }
.calc__row small { display: block; color: #888; font-size: 12px; margin-top: 6px; }
.calc__submit { width: 100%; margin-top: 8px; }
.calc-result { max-width: 640px; margin: 32px auto 0; background: #fff; padding: 32px; border-radius: 12px; border: 2px solid var(--primary); }
.calc-result h3 { margin-bottom: 20px; font-size: 22px; }
.calc-result__table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.calc-result__table td { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.calc-result__table td:last-child { text-align: right; font-weight: 600; }
.calc-result__total td { border-bottom: none; font-size: 18px; font-weight: 800; color: var(--primary); padding-top: 16px; }
.calc-result__disclaimer { font-size: 12px; color: #888; margin-bottom: 20px; }

/* ========== CONTACT ========== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact__info p { margin-bottom: 12px; }
.contact__info a { color: var(--primary); text-decoration: none; }
.form { display: flex; flex-direction: column; gap: 16px; position: relative; }
.form input,
.form textarea { padding: 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 16px; font-family: inherit; }
.form input:focus,
.form textarea:focus { outline: none; border-color: var(--primary); }

/* ========== FOOTER ========== */
.footer { background: #1a1a1a; color: #aaa; padding: 32px 0; text-align: center; font-size: 14px; }
.footer__inner { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.footer__inner p { margin-bottom: 8px; }
.footer__logo img { height: 40px; width: auto; object-fit: contain; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav { display: none; }
  .contact { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .logo__image { height: 36px; }
  .logo__text { font-size: 16px; }
}

@media (max-width: 600px) {
  .calc__row--split { grid-template-columns: 1fr; }
  .calc { padding: 20px; }
}