/* Временная палитра. Заменить значения на цвета Mr. Bibik — остальное подстроится. */
:root {
  --ink: #16213a;        /* основной тёмный: текст, тёмные блоки */
  --paper: #ffffff;      /* фон */
  --mist: #eef2f7;       /* фон второстепенных блоков */
  --line: #d6dee8;       /* линии и рамки */
  --muted: #56617a;      /* второстепенный текст */
  --accent: #3157e0;     /* кнопки и ссылки */
  --accent-ink: #ffffff; /* текст на кнопках */
  --signal: #f2a33a;     /* цифры прогноза и акценты на тёмном */

  --font-head: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Golos Text", "Segoe UI", Arial, sans-serif;
  --radius: 14px;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 28px; max-width: 18ch; }
h3 { font-size: 20px; font-weight: 500; line-height: 1.25; }
p { margin: 0 0 14px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 20; }
.skip:focus { left: 8px; }

section { padding: 96px 0; }

/* Кнопки */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: 600 17px/1 var(--font-body); text-decoration: none;
  padding: 18px 26px; border-radius: 999px;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
.btn:active { transform: translateY(1px); }
.btn--small { padding: 12px 18px; font-size: 15px; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { background: var(--mist); }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { font: 700 19px/1 var(--font-head); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo span { font-weight: 500; margin-left: 4px; color: var(--accent); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--accent); }

/* Первый экран */
.hero { padding: 72px 0 96px; }
.hero__in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; }
.hero h1 { font-size: clamp(34px, 5.2vw, 62px); max-width: 15ch; }
.hero__lead { font-size: 20px; color: var(--muted); margin: 26px 0 32px; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin-top: 28px; font-size: 15px; color: var(--muted); max-width: 32em; }

/* Калькулятор */
.calc { background: var(--ink); color: #fff; border-radius: 24px; padding: 32px; }
.calc__title { font-size: 22px; font-weight: 500; margin-bottom: 22px; max-width: none; }
.calc__seg { border: 0; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.calc__seg legend { font-size: 14px; color: #b8c2d6; margin-bottom: 10px; padding: 0; }
.calc__seg label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.06); cursor: pointer; font-size: 16px; }
.calc__seg label:has(input:checked) { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1.5px var(--signal); }
.calc__seg input { accent-color: var(--signal); width: 18px; height: 18px; margin: 0; }
.calc__budget { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: #b8c2d6; }
.calc__budget output { font: 500 20px/1 var(--font-head); color: #fff; }
.calc input[type="range"] { width: 100%; margin: 14px 0 26px; accent-color: var(--signal); height: 28px; }
.calc__result { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; border-top: 1px solid rgba(255,255,255,.16); padding-top: 22px; }
.calc__result b { display: block; font: 700 clamp(28px, 3vw, 40px)/1 var(--font-head); color: var(--signal); white-space: nowrap; }
.calc__result div:last-child b { font-size: clamp(20px, 2vw, 26px); color: #fff; }
.calc__result span { display: block; margin-top: 8px; font-size: 14px; color: #b8c2d6; }
.calc__fine { font-size: 13px; color: #9aa6bd; margin: 20px 0 0; }

/* История */
.story { background: var(--mist); }
.story__in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.story__big { font: 700 clamp(28px, 3.6vw, 42px)/1.15 var(--font-head); margin: 0; }
.story__text { font-size: 18px; }

/* Как работает */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 22px; }
.steps li::before { content: counter(s); display: block; font: 700 56px/1 var(--font-head); color: var(--accent); margin-bottom: 18px; }
.steps h3 { margin-bottom: 12px; }
.steps p { color: var(--muted); }

/* Для кого */
.who { padding-top: 0; }
.who__grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.who__grid article { padding: 30px; }
.who__grid article + article { border-left: 1px solid var(--line); }
.who__grid h3 { margin-bottom: 14px; }
.who__why { color: var(--muted); font-size: 16px; margin: 0; }

/* Контент-завод */
.factory { background: var(--ink); color: #fff; overflow: hidden; }
.factory__in { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
.factory__num { font: 700 clamp(120px, 20vw, 260px)/.85 var(--font-head); color: transparent; -webkit-text-stroke: 2px var(--signal); letter-spacing: -0.04em; }
.factory h2 { max-width: none; }
.factory p { color: #c9d1e1; max-width: 36em; }
.factory__list { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.factory__geo { margin-top: 22px; font-size: 15px; }
.factory__list li { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 8px 16px; font-size: 15px; }

/* Цены */
.prices__note { color: var(--muted); font-size: 15px; margin: 28px 0 0; }
.plan__next { font-size: 15px; color: var(--muted); margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.plan--main .plan__next { color: #b8c2d6; border-top-color: rgba(255,255,255,.18); }
sup { font-size: .65em; line-height: 0; }
.plans { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 0; align-items: stretch; }
.plan { padding: 32px 28px; border: 1px solid var(--line); }
.plan:first-child { border-radius: var(--radius) 0 0 var(--radius); border-right: 0; }
.plan:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-left: 0; }
.plan--main { background: var(--ink); color: #fff; border-color: var(--ink); border-radius: var(--radius); margin: -14px 0; padding: 46px 30px; }
.plan__price { font: 700 34px/1 var(--font-head); margin: 18px 0 8px; }
.plan--main .plan__price { color: var(--signal); }
.plan__for { color: var(--muted); font-size: 15px; }
.plan--main .plan__for { color: #b8c2d6; }
.plan ul { padding-left: 18px; margin: 18px 0 0; }
.plan li { margin-bottom: 8px; }

.modules { margin-top: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modules summary { cursor: pointer; padding: 20px 0; font: 500 20px/1.2 var(--font-head); list-style: none; display: flex; justify-content: space-between; }
.modules summary::after { content: "+"; font-size: 28px; line-height: .8; }
.modules[open] summary::after { content: "–"; }
.modules table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.modules th, .modules td { text-align: left; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 400; vertical-align: top; }
.modules thead th { color: var(--muted); font-size: 14px; border-top: 0; }
.modules td { text-align: right; white-space: nowrap; padding-left: 20px; font-weight: 600; }
.modules thead th:last-child { text-align: right; }

.anchor { margin-top: 48px; display: flex; gap: 32px; align-items: center; justify-content: space-between; background: var(--mist); border-radius: var(--radius); padding: 32px; }
.anchor h3 { font-size: 24px; margin-bottom: 10px; }
.anchor p { margin: 0; max-width: 42em; color: var(--muted); }
.anchor .btn { flex-shrink: 0; }

/* Кейсы */
.cases { background: var(--mist); }
.cases__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case { background: var(--paper); border-radius: var(--radius); padding: 28px; }
.case__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; min-height: 76px; }
.case__ava { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--mist); }
.case h3 { margin: 0; }
.case dl { margin: 0; display: grid; gap: 14px; }
.case dl div { border-top: 1px solid var(--line); padding-top: 12px; }
.case dt { font-size: 14px; color: var(--muted); }
.case dd { margin: 2px 0 0; font: 500 22px/1.2 var(--font-head); }

/* Вопросы */
.faq__in { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; }
.faq__list details { border-top: 1px solid var(--line); }
.faq__list details:last-child { border-bottom: 1px solid var(--line); }
.faq__list summary { cursor: pointer; padding: 20px 36px 20px 0; font-weight: 600; font-size: 18px; list-style: none; position: relative; }
.faq__list summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 26px; font-weight: 400; }
.faq__list details[open] summary::after { content: "–"; }
.faq__list p { color: var(--muted); padding-bottom: 8px; }
summary::-webkit-details-marker { display: none; }

/* Заявка */
.audit { background: var(--ink); color: #fff; }
.audit__in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.audit__text p { color: #c9d1e1; max-width: 32em; }
.audit__contacts { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 14px; font-size: 20px; }
.audit__contacts a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 14px; font-weight: 500; }
.audit__contacts a span { border-bottom: 1px solid rgba(255,255,255,.35); }
.audit__contacts a:hover span { border-bottom-color: #fff; }
.ico { width: 40px; height: 40px; flex-shrink: 0; }
.audit__who { display: flex; align-items: center; gap: 14px; }
.audit__who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.audit__who p { margin: 0; font-size: 15px; line-height: 1.35; color: #c9d1e1; }
.audit__who b { color: #fff; font-size: 17px; font-weight: 600; }
.form { background: var(--paper); color: var(--ink); border-radius: 24px; padding: 32px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.form input:not([type="checkbox"]) { font: 400 17px/1.3 var(--font-body); color: var(--ink); padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); }
.form input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.form input[aria-invalid="true"] { border-color: #c2412d; }
.form__consent { display: flex !important; grid-template-columns: none; gap: 10px !important; align-items: flex-start; }
.form__consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.form .btn { justify-self: start; }
.form__status { margin: 0; font-size: 15px; min-height: 1.4em; }
.form__status.is-error { color: #c2412d; }
.form__status.is-ok { color: #1f7a4a; }

.foot { padding: 28px 0; font-size: 14px; color: var(--muted); }
.foot__in { display: grid; justify-items: center; text-align: center; gap: 14px; }
.foot p { margin: 0; }
.foot__brand { font: 700 16px/1 var(--font-head); color: var(--ink); }
.foot__meta { font-size: 13px; max-width: 42em; }
.foot a { color: var(--muted); }


/* Фото кейса в истории и ссылки в кейсах */
.story__head { display: grid; gap: 28px; align-content: start; }
.story__fig { margin: 0; display: flex; align-items: center; gap: 16px; }
.story__fig img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.story__fig figcaption { font-size: 16px; }
.case__link { display: inline-block; margin-top: 6px; font-size: 15px; }

/* Адаптив */
@media (max-width: 960px) {
  section { padding: 72px 0; }
  .nav { display: none; }
  .top__in { justify-content: space-between; }
  .hero__in, .story__in, .faq__in, .audit__in { grid-template-columns: 1fr; gap: 36px; }
  .steps, .cases__list { grid-template-columns: 1fr; gap: 28px; }
  .who__grid { grid-template-columns: 1fr; }
  .who__grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .factory__in { grid-template-columns: 1fr; gap: 16px; }
  .plans { grid-template-columns: 1fr; gap: 16px; }
  .plan, .plan:first-child, .plan:last-child { border: 1px solid var(--line); border-radius: var(--radius); }
  .plan--main { margin: 0; padding: 32px 28px; border-color: var(--ink); }
  .anchor { flex-direction: column; align-items: flex-start; }
  .case__head { min-height: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 40px; }
  .hero__lead { font-size: 18px; }
  .btn { width: 100%; text-align: center; }
  .btn--small { width: auto; }
  .calc, .form { padding: 22px; border-radius: 18px; }
  .calc__result { grid-template-columns: 1fr; }
  .modules td { white-space: normal; }
}
