/* Общая основа лендингов Максифорна (дом + раздвижные двери). Цвета — из логотипа: графит и синий.
   25.10 по разбору Алексея и цифрам Белгорода: светлый фон, коротко (5–6 экранов на телефоне),
   квиз и кнопка звонка на первом экране, звонок — главный канал. */
@import url("fonts/fonts.css");

:root {
  --bg: #f4f4f2;
  --card: #ffffff;
  --surface: #e9e9e6;
  --ink: #1b1f24;
  --muted: #4a5058;
  --line: #d9d9d4;
  --dark: #1b1f24;
  --on-dark: #eef0f2;
  --on-dark-muted: #a9b0b8;
  --accent: #1d5fd0;
  --accent-press: #174fb0;
  --accent-soft: #e6eefb;
  --accent-ink: #ffffff;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --step-head: clamp(1.875rem, 1.3rem + 2.4vw, 3.25rem);
  --step-display: clamp(2.125rem, 1.2rem + 3.6vw, 4.5rem);

  --gutter: clamp(16px, 4vw, 56px);
  --radius: 10px;
  --max: 1320px;
  --shadow: none;   /* белые плашки на сером фоне читаются без теней (taste-skill: без теней в покое) */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-body)/1.5 "Onest", system-ui, sans-serif; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: 1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.small { font-size: var(--step-small); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nw { white-space: nowrap; }

/* Кнопки: одна форма на весь сайт; отклик в момент нажатия (apple-design §1) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  font: 600 var(--step-body)/1.1 "Onest", sans-serif; text-decoration: none; cursor: pointer; text-align: center;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:hover { background: var(--accent-press); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn--call { background: var(--dark); color: #fff; }
.btn--call:hover { background: #000; }
.btn--call svg { width: 20px; height: 20px; flex: none; }
.btn--ghost { background: var(--accent-soft); color: var(--accent); }
.btn--ghost:hover { background: #d6e4fa; }
.btn--wide { width: 100%; }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

/* ---------- Шапка ---------- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark { width: 34px; height: 34px; flex: none; }
.logo__name { font-weight: 800; letter-spacing: -0.03em; font-size: 1.125rem; display: block; line-height: 1.1; }
.logo__sub { display: block; font-size: 0.8125rem; color: var(--muted); }
.top__tel { text-align: right; text-decoration: none; font-weight: 700; white-space: nowrap; font-size: 1.0625rem; }
.top__tel span { display: block; font-size: 0.8125rem; color: var(--muted); font-weight: 400; }

/* ---------- Первый экран: слева оффер и звонок, справа сразу квиз ---------- */
.hero { padding-bottom: clamp(32px, 5vw, 64px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.hero__text { display: grid; gap: 18px; padding-top: clamp(8px, 2vw, 24px); }
.hero h1 { font-size: var(--step-display); }
.hero__lead { font-size: var(--step-lead); line-height: 1.35; color: var(--muted); max-width: 36ch; }
.hero__lead b { color: var(--ink); font-weight: 700; }
.hero__call { display: grid; gap: 8px; justify-items: start; }
.hero__call .small { color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.facts li { background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: var(--step-small); font-weight: 600; box-shadow: var(--shadow); }
.hero__photo { margin: 6px 0 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__banner { border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 8; margin-bottom: clamp(18px, 3vw, 32px); }
.hero__banner img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Квиз ---------- */
.quiz { background: var(--card); border-radius: calc(var(--radius) + 4px); padding: clamp(18px, 2.4vw, 28px); box-shadow: var(--shadow); scroll-margin-top: 12px; }
.quiz__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.quiz__head b { font-size: var(--step-small); color: var(--accent); }
.quiz__head span { font-size: var(--step-small); color: var(--muted); }
.quiz__progress { height: 4px; background: var(--surface); border-radius: 2px; margin-bottom: 18px; overflow: hidden; }
.quiz__progress i { display: block; height: 100%; width: 33%; background: var(--accent); transition: width 300ms cubic-bezier(.2,.8,.2,1); }
.quiz__step { display: none; gap: 14px; }
.quiz__step.is-on { display: grid; }
.quiz__q { font-size: var(--step-lead); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; }
.opt__body { display: grid; border-radius: var(--radius); overflow: hidden; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out; height: 100%; }
.opt__body img, .opt__body svg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--accent-soft); }
.opt__body span { padding: 10px 12px 12px; font-weight: 600; font-size: 0.9375rem; line-height: 1.25; }
.opt:active .opt__body { transform: scale(0.97); }
.opt input:checked + .opt__body { box-shadow: inset 0 0 0 2.5px var(--accent); }
.opt input:focus-visible + .opt__body { outline: 3px solid var(--accent); outline-offset: 2px; }
.opts--text { grid-template-columns: 1fr; }
.opts--text .opt__body span { padding: 15px 16px; }
.field { display: grid; gap: 6px; }
.field input { min-height: 54px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; font: inherit; color: inherit; }
.field input[aria-invalid=true] { border-color: #c0392b; }
.field__err { color: #b42318; font-size: var(--step-small); min-height: 1.2em; }
.quiz__nav { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.quiz__back { background: none; border: 0; padding: 10px 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.consent { font-size: 0.8125rem; color: var(--muted); }

/* ---------- Секции ---------- */
.sec { padding: clamp(40px, 6vw, 80px) 0 0; }
.sec__head { display: grid; gap: 10px; margin-bottom: clamp(18px, 3vw, 32px); max-width: 48rem; }
.sec__head h2 { font-size: var(--step-head); }
.sec__head p { font-size: var(--step-lead); line-height: 1.35; color: var(--muted); }

/* Карточки «что делаем»: на телефоне листаются вбок одним экраном */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; box-shadow: var(--shadow); }
.card img, .card svg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--accent-soft); }
.card__body { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; }
.card h3 { font-size: 1.3125rem; letter-spacing: -0.025em; line-height: 1.15; }
.card p { color: var(--muted); font-size: 1.0625rem; }
.card b { font-size: 1.125rem; letter-spacing: -0.02em; }
.card .btn { min-height: 48px; margin-top: 6px; }

/* Объекты: лента фото, тянется пальцем и мышью */
.strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 var(--gutter) 4px; cursor: grab; overscroll-behavior-x: contain; }
.strip::-webkit-scrollbar { display: none; }
.strip::after { content: ""; flex: 0 0 calc(var(--gutter) - 10px); }
.strip.is-drag { cursor: grabbing; scroll-snap-type: none; }
.strip figure { margin: 0; flex: none; scroll-snap-align: start; }
.strip img { height: clamp(220px, 32vh, 320px); width: auto; border-radius: var(--radius); user-select: none; -webkit-user-drag: none; }
.strip figcaption { font-size: var(--step-small); color: var(--muted); margin-top: 8px; }
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: clamp(20px, 3vw, 32px); }
.trust div { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.trust b { display: block; font-size: 1.1875rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.trust p { color: var(--muted); font-size: 1.0625rem; }

/* Цены и отзывы в одном блоке */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.prices { display: grid; gap: 10px; }
.price { background: var(--card); border-radius: var(--radius); padding: 16px 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; box-shadow: var(--shadow); }
.price span { color: var(--muted); }
.price b { font-size: 1.25rem; letter-spacing: -0.02em; white-space: nowrap; }
.reviews { display: grid; gap: 14px; }
.review { margin: 0; background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.review blockquote { margin: 0 0 10px; font-size: 1.0625rem; line-height: 1.45; }
.review figcaption { font-size: var(--step-small); color: var(--muted); }
.review figcaption b { color: var(--ink); }

/* Вопросы */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--card); border-radius: var(--radius); padding: 0 20px; box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; align-items: center;
  padding: 18px 0; font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; transition: transform 200ms ease-out; flex: none; color: var(--accent); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--muted); }

/* Финальный призыв */
.final { background: var(--accent); color: #fff; border-radius: calc(var(--radius) + 6px); padding: clamp(24px, 4vw, 48px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; }
.final h2 { font-size: var(--step-head); }
.final p { color: #dce7fb; margin-top: 10px; font-size: var(--step-lead); line-height: 1.35; }
.final__btns { display: grid; gap: 10px; min-width: 280px; }
.final .btn { background: #fff; color: var(--ink); }
.final .btn--call { background: var(--dark); color: #fff; }

/* Подвал */
.foot { background: var(--dark); color: var(--on-dark-muted); padding: 36px 0; font-size: var(--step-small); margin-top: clamp(48px, 7vw, 96px); }
.foot .wrap { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.foot b { color: var(--on-dark); }

/* Липкие «Позвонить / Рассчитать» на телефоне — с первой секунды, как в Белгороде */
.dock { display: none; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

@media (max-width: 960px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .hero__photo { display: none; }
  .cards, .cards--3 { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; gap: 12px; }
  .cards::-webkit-scrollbar { display: none; }
  .cards .card { flex: 0 0 78%; scroll-snap-align: start; }
  .trust { grid-template-columns: 1fr; }
  .final { grid-template-columns: 1fr; }
  .final__btns { min-width: 0; }
}
@media (max-width: 640px) {
  .logo__sub, .top__tel span { display: none; }
  .top__tel { font-size: 0.9375rem; }
  .hero__banner { aspect-ratio: 16 / 9; }
  .strip img { height: 240px; }
  .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .dock { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(244,244,242,.94); backdrop-filter: blur(8px);
    box-shadow: 0 -1px 0 var(--line); }
  .dock .btn { min-height: 50px; }
}
