:root {
  --green: #016258;
  --green-dark: #014a42;
  --green-soft: #e8f3f1;
  --yellow: #ffc83d;
  --yellow-dark: #f2b400;
  --ink: #17201f;
  --muted: #5b6866;
  --line: #dde5e3;
  --bg: #ffffff;
  --bg-alt: #f5f8f7;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(1, 50, 44, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
img, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--green); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 5vw, 46px); }
h2 { font-size: clamp(24px, 3.6vw, 34px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }

.wrap { max-width: 1140px; margin: 0 auto; padding-inline: 20px; }
.section { padding-block: 64px; }
.section--alt { background: var(--bg-alt); }
.section__lead { color: var(--muted); max-width: 720px; margin-bottom: 32px; font-size: 18px; }
.accent { color: var(--green); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 26px; border-radius: 12px; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 17px; line-height: 1.2;
  text-decoration: none; text-align: center;
  transition: transform .15s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn--main { background: var(--yellow); color: var(--ink); box-shadow: 0 6px 18px rgba(242, 180, 0, .35); }
.btn--main:hover { background: var(--yellow-dark); }
.btn--ghost { background: #fff; color: var(--green); border: 2px solid var(--green); }
.btn--block { width: 100%; }

/* Шапка */
.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; }
.header__logo img { height: 46px; width: auto; }
.header__info { display: flex; align-items: center; gap: 18px; }
.header__hours { font-size: 13px; color: var(--muted); text-align: right; }
.header__phone { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; }

/* Первый экран */
.hero { padding-block: 40px 56px; background: linear-gradient(180deg, var(--green-soft), #fff); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero__tag { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 30px; padding: 6px 14px; font-size: 14px; margin-bottom: 16px; }
.hero__sub { font-size: 19px; color: var(--muted); margin-bottom: 22px; }
.hero__list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.hero__list li { padding-left: 32px; position: relative; font-weight: 600; }
.hero__list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__note { font-size: 14px; color: var(--muted); margin-top: 12px; }
.hero__photo { position: relative; }
.hero__photo img { border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; width: 100%; }
.hero__badge { position: absolute; left: -16px; bottom: 24px; background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 14px; }
.hero__badge b { font-size: 24px; color: var(--green); display: block; line-height: 1; }

.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 32px; font-size: 15px; color: var(--muted); }
.trust b { color: var(--ink); }

/* Карточки */
.grid { display: grid; gap: 18px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card__num { display: inline-flex; width: 36px; height: 36px; border-radius: 10px; background: var(--green); color: #fff; font-weight: 800; align-items: center; justify-content: center; margin-bottom: 12px; }
.card__price { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--green); font-size: 15px; }

.note { margin-top: 24px; padding: 18px 22px; border-left: 4px solid var(--yellow); background: #fffaf0; border-radius: 0 var(--radius) var(--radius) 0; }

/* Квиз */
.quiz { scroll-margin-top: 76px; max-width: 860px; margin: 0 auto; background: #fff; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.quiz__head { background: var(--green); color: #fff; padding: 22px 28px; }
.quiz__head h2 { margin: 0 0 4px; font-size: clamp(22px, 3vw, 28px); }
.quiz__head p { margin: 0; opacity: .9; }
.quiz__progress { height: 6px; background: rgba(255, 255, 255, .25); border-radius: 6px; margin-top: 16px; overflow: hidden; }
.quiz__bar { height: 100%; width: 0; background: var(--yellow); transition: width .3s; }
.quiz__body { padding: 26px 28px; }
.quiz__q { font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.quiz__hint { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.quiz__counter { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option span { display: block; padding: 15px 16px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; transition: border-color .15s, background .15s; }
.option input:checked + span { border-color: var(--green); background: var(--green-soft); }
.option input:focus-visible + span { outline: 3px solid var(--yellow); }
.quiz__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.quiz__back { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 10px 0; }
.quiz__next { margin-left: auto; }
.quiz__gift { display: flex; gap: 12px; align-items: center; background: #fffaf0; border: 1px dashed var(--yellow-dark); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 15px; }

/* Поля формы */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.input { width: 100%; padding: 15px 16px; border: 2px solid var(--line); border-radius: 12px; font: inherit; font-size: 17px; background: #fff; color: var(--ink); }
.input:focus { outline: 0; border-color: var(--green); }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 6px 0 16px; }
.agree input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--green); }
.form__error { color: #c0392b; font-size: 14px; min-height: 20px; margin-bottom: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Галерея и видео */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
/* Видео — лента, листается вбок */
.videos { display: flex; gap: 16px; margin-top: 40px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
.videos__item { flex: 0 0 calc((100% - 64px) / 5); min-width: 200px; scroll-snap-align: start; }
.videos video { border-radius: 16px; background: #000; aspect-ratio: 9 / 16; width: 100%; object-fit: cover; }
.videos p { font-weight: 700; margin: 10px 0 0; font-size: 14px; line-height: 1.35; }
.videos__hint { display: none; color: var(--muted); font-size: 14px; margin-top: 24px; }

/* Команда и отзывы */
.team { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.team img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; background: var(--green-soft); border-radius: 12px; width: 100%; }
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.review__head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.review__name { font-weight: 700; }
.review__src { font-size: 13px; color: var(--muted); }
.review__stars { color: var(--yellow-dark); letter-spacing: 2px; }
.review p { margin: 0; font-size: 15px; }
.awards { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.awards img { height: 150px; width: auto; border-radius: 8px; }

/* Вопросы */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-weight: 700; font-size: 18px; cursor: pointer; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: -4px; font-size: 26px; color: var(--green); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* Финальная заявка и подвал */
.final { background: var(--green); color: #fff; }
.final__grid { display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: center; }
.final .section__lead { color: rgba(255, 255, 255, .85); }
.final .form-box { background: #fff; color: var(--ink); border-radius: 18px; padding: 26px; }
.final a { color: #fff; }
.contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 17px; }
.footer { padding-block: 28px 100px; font-size: 13px; color: var(--muted); }
.footer a { color: var(--muted); }

/* Окно «Перезвоните» */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(10, 20, 18, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal__box { background: #fff; border-radius: 18px; padding: 28px 24px; max-width: 420px; width: 100%; position: relative; }
.modal__close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 30px; cursor: pointer; color: var(--muted); }

/* Нижняя панель на телефоне */
.mbar { display: none; }

@media (max-width: 960px) {
  .hero__grid, .final__grid { grid-template-columns: 1fr; }
  .hero__photo { max-width: 460px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .team { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .section { padding-block: 44px; }
  .header__hours { display: none; }
  .header__logo img { height: 38px; }
  .header__phone { font-size: 16px; }
  .hero { padding-top: 24px; }
  .hero__sub { font-size: 17px; }
  .hero__cta .btn { width: 100%; }
  .hero__badge { left: 10px; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .grid { gap: 12px; }
  .card { padding: 16px 18px; }
  .card__num { float: left; width: 30px; height: 30px; margin: 0 12px 0 0; border-radius: 8px; font-size: 15px; }
  .card h3 { display: flex; align-items: center; min-height: 30px; margin-bottom: 6px; font-size: 17px; }
  .card__price { margin-top: 8px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .options { grid-template-columns: 1fr; }
  .quiz__body, .quiz__head { padding-inline: 18px; }
  .videos { margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px; margin-top: 8px; }
  .videos__item { flex-basis: 62%; min-width: 0; }
  .videos__hint { display: block; }
  .team { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .awards img { height: 120px; }
  .mbar {
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .mbar .btn { padding: 12px 6px; font-size: 14px; }
}
