/* =========================================================================
   DESIGN SYSTEM — «Сметы для подрядчиков»
   Единая система стилей. Подключение:
     <link rel="stylesheet" href="styles/design-system.css">
     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">

   Структура:
     1. Tokens (цвета, типографика, радиусы, контейнер)
     2. Base (reset, typography, layout helpers)
     3. Header / Topbar
     4. Hero (с blueprint-сеткой и фоновой иллюстрацией)
     5. Buttons
     6. Hero card (чеклист)
     7. Feature strip (плитка из 5 карточек)
     8. Sections (общая раскладка + blueprint-сетка)
     9. Cards / Compare / Steps / Claim
    10. FAQ
    11. CTA + Form
    12. Footer
    13. Responsive
   ========================================================================= */

/* 1. TOKENS ================================================================ */
:root {
  --ink:        #0f172a;
  --ink-soft:   #1e293b;
  --muted:      #64748b;
  --line:       #e2e8f0;
  --line-soft:  #eef2f6;
  --bg:         #ffffff;
  --bg-tint:    #f6f8fb;
  --blue:       #2563eb;
  --blue-dark:  #1d4ed8;
  --green:      #3f8a55;
  --green-soft: #e7f3ec;
  --max:        1320px;
  --r-card:     14px;
  --r-button:   10px;
}

/* 2. BASE ================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(100% - 48px, var(--max)); margin: 0 auto; }

/* 3. HEADER ================================================================ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  min-height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(160deg, #3b82f6, #1d4ed8 80%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37,99,235,.25), inset 0 1px 0 rgba(255,255,255,.3);
}
.brand-mark svg { width: 22px; height: 22px; }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  color: var(--muted); font-size: 15px;
}
.nav-links a {
  padding: 9px 12px; border-radius: 8px; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-tint); }
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--r-button);
  background: var(--blue); color: #fff;
  font-weight: 600; font-size: 15px;
  box-shadow: 0 6px 16px rgba(37,99,235,.28);
  transition: background .15s, transform .15s;
}
.nav-cta:hover { background: var(--blue-dark); }

/* 4. HERO ================================================================== */
.hero {
  position: relative;
  padding: clamp(24px, 3vw, 48px) 0 clamp(20px, 2.5vw, 40px);
  background:
    radial-gradient(1100px 380px at 50% -120px, rgba(37,99,235,.06), transparent 70%),
    #fff;
  overflow: hidden;
}
/* Blueprint-сетка hero */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 80%, transparent);
  pointer-events: none;
  z-index: 0;
}
/* Фоновая иллюстрация — подложка hero, растворяется по краям */
.hero::after {
  content: "";
  position: absolute;
  top: 50%; right: calc(22% + 120px); left: auto;
  width: min(480px, 36%);
  aspect-ratio: 1 / 1;
  transform: translateY(-50%);
  background: url("../assets/hero-illustration.png") no-repeat center;
  background-size: contain;
  opacity: .55;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0,0,0,.6) 55%, transparent 78%);
          mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0,0,0,.6) 55%, transparent 78%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(270px, 22vw, 370px);
  grid-template-areas: "text card";
  gap: clamp(40px, 5vw, 88px);
  align-items: start;
  z-index: 1;
}
.hero-text { grid-area: text; max-width: 640px; }
.hero-card { grid-area: card; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(40px, 4.6vw, 64px); line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--ink);
}
.lead {
  margin: 14px 0 0;
  max-width: 540px;
  color: var(--muted);
  font-size: clamp(16px, 1.15vw, 19px); line-height: 1.55;
}

/* 5. BUTTONS =============================================================== */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.actions .button { flex: 0 0 auto; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 22px;
  border-radius: var(--r-button);
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .15s;
}
.button-primary   { color: #fff; background: var(--blue); box-shadow: 0 10px 22px rgba(37,99,235,.28); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button-secondary:hover { border-color: #cbd5e1; background: #fafbfc; }
.button svg { width: 18px; height: 18px; }
.micro {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 22px 0 0; max-width: 460px;
  color: var(--muted); font-size: 13px; line-height: 1.5;
}
.micro svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; color: #94a3b8; }

/* 6. HERO CARD (чеклист) =================================================== */
.hero-card {
  align-self: start;
  padding: 22px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 24px 40px -24px rgba(15,23,42,.12);
}
.hero-card-tag {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--ink-soft);
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.hero-card h2 {
  margin: 14px 0 14px;
  font-size: 22px; font-weight: 700; line-height: 1.25;
}
.check-list {
  display: grid; gap: 11px;
  margin: 0; padding: 0; list-style: none;
}
.check-list li {
  display: grid; grid-template-columns: 22px 1fr; gap: 8px;
  align-items: start;
  color: var(--ink-soft); font-size: 14.5px; line-height: 1.45;
}
.check-list li::before {
  content: "";
  width: 18px; height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='5 12 10 17 19 8'/></svg>") center/12px no-repeat;
}
.hero-card-foot {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--green-soft);
  color: #265c3b;
  font-size: 13px; line-height: 1.45;
  display: flex; gap: 10px; align-items: flex-start;
}
.hero-card-foot svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--green); margin-top: 1px; }

/* 7. FEATURE STRIP ========================================================= */
.strip {
  padding: 8px 0 28px;
  background: #fff;
}
.strip-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.strip-card {
  display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center;
  padding: 18px 18px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.strip-card:hover { border-color: #cbd5e1; box-shadow: 0 12px 24px -16px rgba(15,23,42,.18); }
.strip-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--blue);
}
.strip-icon svg { width: 24px; height: 24px; }
.strip-card h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2; }
.strip-card p  { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.price-list {
  list-style: none; margin: 6px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.price-list li {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px; line-height: 1.35;
}
.price-list li b    { color: var(--ink); font-weight: 700; white-space: nowrap; min-width: 50px; }
.price-list li span { color: var(--muted); }

/* 8. SECTIONS ============================================================== */
section { padding: clamp(64px, 7vw, 120px) 0; position: relative; overflow: hidden; }
.band-tint { background: var(--bg-tint); }

/* Eле видная blueprint-сетка на белых секциях и на CTA */
.strip::before,
section:not(.hero):not(.band-tint):not(.cta)::before,
.cta::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, transparent, #000 10%, #000 85%, transparent);
  pointer-events: none;
  z-index: 0;
}
.cta::before {
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
}
.strip > .container,
.cta   > .container,
section > .container { position: relative; z-index: 1; }

.section-head { max-width: 820px; margin-bottom: 40px; }
.section-head .eyebrow { color: var(--blue); }
.section-head h2 { margin: 0; font-size: clamp(32px, 3.4vw, 52px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.section-head p  { margin: 16px 0 0; color: var(--muted); font-size: clamp(16px, 1.15vw, 19px); max-width: 760px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* 9. CARDS / COMPARE / STEPS / CLAIM ====================================== */
.card {
  padding: 26px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: #fff;
}
.card h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; line-height: 1.3; }
.card p  { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.note {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  color: var(--ink-soft);
  font-size: 15px;
}

.compare {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.compare .card.bad h3 { color: #b91c1c; }
.compare .card.good {
  border: 1px solid var(--blue);
  background: linear-gradient(180deg, #fff, #f5f8ff);
  box-shadow: 0 18px 40px -22px rgba(37,99,235,.35);
}

.process { display: grid; gap: 14px; counter-reset: steps; }
.step {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start;
  padding: 22px 24px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: #fff;
  counter-increment: steps;
}
.step::before {
  content: counter(steps);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--blue); color: #fff;
  font-weight: 700; font-size: 17px;
}
.step h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.step p  { margin: 0; color: var(--muted); font-size: 15px; }

.claim {
  padding: 32px;
  border-radius: var(--r-card);
  background: linear-gradient(160deg, #0f172a, #1d4ed8 140%);
  color: #fff;
}
.claim strong { display: block; margin-bottom: 8px; font-size: 44px; font-weight: 800; letter-spacing: -.02em; }
.claim p      { margin: 0; color: #cbd5e1; font-size: 17px; }

/* 10. FAQ ================================================================== */
.faq { display: grid; gap: 12px; }
details { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
summary {
  cursor: pointer; padding: 20px 22px;
  font-weight: 600; font-size: 16px;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 22px; font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* 11. CTA + FORM =========================================================== */
.cta {
  padding: clamp(64px, 7vw, 120px) 0;
  background: linear-gradient(160deg, #0f172a, #1d4ed8 160%);
  color: #fff;
}
.cta-grid { display: grid; grid-template-columns: 1fr minmax(420px, 520px); gap: 64px; align-items: start; }
.cta-grid h2          { margin: 0; font-size: clamp(32px, 3.4vw, 52px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.cta-grid > div > p   { color: #cbd5e1; font-size: clamp(16px, 1.15vw, 19px); max-width: 600px; }
.form {
  padding: 26px;
  border-radius: var(--r-card);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 48px rgba(0,0,0,.25);
}
.form label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.form input, .form textarea {
  width: 100%; margin-top: 7px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; color: var(--ink);
}
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.form textarea { min-height: 110px; resize: vertical; }
.form button   { width: 100%; margin-top: 4px; border: 0; cursor: pointer; }
.form-note     { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; font-weight: 400; }

/* 12. FOOTER =============================================================== */
.footer { padding: 56px 0 28px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 14px; }
.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 32px; align-items: start;
}
.footer-brand          { display: grid; gap: 12px; }
.footer-brand .brand   { font-size: 16px; }
.footer-brand p        { margin: 0; line-height: 1.55; max-width: 320px; }
.footer-title          { margin: 0 0 12px; color: var(--ink); font-size: 14px; font-weight: 700; }
.footer-links          { display: grid; gap: 10px; }
.footer-links a        { color: var(--muted); }
.footer-links a:hover  { color: var(--blue); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 40px; padding-top: 22px;
  border-top: 1px solid var(--line); color: #94a3b8;
}

/* 13. RESPONSIVE =========================================================== */
@media (min-width: 1600px) {
  :root { --max: 1480px; }
}
@media (min-width: 1280px) {
  .hero::after { right: calc(30% + 120px); }
}
@media (max-width: 1140px) {
  .strip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .nav-links { display: none; }
}
@media (max-width: 900px) {
  .hero::after { opacity: .18; width: 90%; }
  .hero-grid, .cta-grid { grid-template-columns: 1fr; grid-template-areas: "text" "card"; }
  .grid-3, .compare     { grid-template-columns: 1fr 1fr; }
  .footer-main          { grid-template-columns: 1fr 1fr; }
  h1                    { font-size: 40px; }
  .section-head h2, .cta-grid h2 { font-size: 32px; }
}
@media (max-width: 640px) {
  .strip-grid, .grid-3, .grid-2, .compare { grid-template-columns: 1fr; }
  .footer-main  { grid-template-columns: 1fr; }
  h1            { font-size: 36px; }
  section, .cta { padding: 64px 0; }
  .button       { width: 100%; }
}
