/* ---------- герой ---------- */
.hero { padding-block: clamp(40px, 6vw, 84px) clamp(40px, 5vw, 64px); }
.hero__grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__text { min-width: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  background: var(--accent-soft); color: #8F3207; font-weight: 600; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  margin-top: 22px; font-size: clamp(2.375rem, 1.2rem + 3.9vw, 4.25rem); font-weight: 800; line-height: .98; letter-spacing: -0.035em;
}
.hero h1 .hl { color: var(--accent); }
.hero__lede { margin-top: 24px; font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--ink-soft); max-width: 34em; }
.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero__visual { position: relative; min-width: 0; }
.hero__stage {
  position: relative; min-width: 0; aspect-ratio: 640 / 560; max-width: 100%;
  border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  box-shadow: var(--shadow-1);
}
.plane { position: absolute; inset: 0; will-change: transform; }
.plane > svg { width: 100%; height: 100%; }
.plane--grid { inset: -16px; }
.grid-line { stroke: #E4E7E3; stroke-width: 1; }
.grid-line--major { stroke: #D9DDD8; }
.draw { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.draw--thin { stroke-width: 1.2; }
.draw--soft { stroke: #8D949A; stroke-width: 1.2; }
.draw--dash { stroke-dasharray: 4 5; }
.fill-surface { fill: var(--surface); }
.fill-concrete { fill: url(#hConcrete); }
.fill-soil { fill: url(#hSoil); }
.fill-water { fill: var(--water); fill-opacity: .16; }
.lvl text, .dim text { font-family: var(--f-mono); font-size: 11px; fill: var(--ink-soft); }
.roof-fill { opacity: 0; }

/* поэтапное вычерчивание */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__stage .ink {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: ink 1.1s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 1ms + 200ms);
  }
  .js .hero__stage .ink.draw--dash { stroke-dasharray: none; stroke-dashoffset: 0; opacity: 0; animation-name: fadein; }
  .js .hero__stage .roof-fill { animation: roof 1s var(--ease) forwards; animation-delay: 1500ms; transform-box: fill-box; transform-origin: 50% 100%; }
  .js .hero__stage .fade { opacity: 0; animation: fadein .7s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 1ms + 200ms); }
  .js .callout { opacity: 0; transform: translateY(6px); animation: callout .5s var(--ease) forwards; animation-delay: calc(1900ms + var(--i) * 110ms); }
  .js .hero__badge { opacity: 0; transform: translateY(10px); animation: callout .6s var(--ease) forwards; animation-delay: 2500ms; }
}
.roof-fill { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .js .hero__stage .roof-fill { opacity: 0; } }
@keyframes ink { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes roof { from { opacity: 0; transform: translateY(10px) scaleY(.96); } to { opacity: 1; transform: none; } }
@keyframes callout { to { opacity: 1; transform: none; } }

.callouts { position: absolute; inset: 0; pointer-events: none; }
.callout {
  position: absolute; left: var(--x); top: var(--y); pointer-events: auto;
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px;
  font-size: .8125rem; font-weight: 600; text-decoration: none; white-space: nowrap; line-height: 1.1;
  box-shadow: var(--shadow-1); transition: border-color .15s, background-color .15s, color .15s;
}
.callout::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.callout:hover { border-color: var(--accent); color: var(--accent-hover); }
.callout--r { translate: -100% 0; }
.hero__badge {
  position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; gap: 12px; align-items: center;
  padding: 12px 16px; border-radius: 12px; background: var(--graphite); color: var(--on-dark); font-size: .9375rem; line-height: 1.35;
}
.hero__badge svg { width: 34px; height: 34px; flex: none; padding: 7px; border-radius: 8px; background: #2B3035; color: var(--gold); }

/* факты */
.facts { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.fact { padding: 20px 24px; display: grid; gap: 2px; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact b { font-family: var(--f-display); font-size: clamp(1.375rem, 1.1rem + .9vw, 1.75rem); font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
.fact span { color: var(--ink-soft); font-size: .9375rem; }
.fact--sika { grid-template-columns: auto 1fr; align-items: center; column-gap: 14px; }
.fact__logo { width: auto; height: 50px; }
.fact .fact__sika-text { color: var(--ink); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; max-width: 9em; }
@media (max-width: 720px) {
  .fact--sika { grid-template-columns: 1fr; row-gap: 8px; align-content: start; }
  .fact__logo { height: 34px; }
  .fact .fact__sika-text { font-size: .9375rem; }
}

/* ---------- задачи ---------- */
.tasks { background: var(--surface-2); border-block: 1px solid var(--line); }
.task-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.task {
  --span: 1; grid-column: span var(--span); position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden;
  text-decoration: none; min-width: 0;
  transition: border-color .18s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.task--wide { --span: 2; }
.task--half { --span: 2; }
.task__photo { position: relative; aspect-ratio: 3 / 2; max-width: 100%; background: var(--tint); overflow: hidden; }
.task--wide .task__photo, .task--half .task__photo { aspect-ratio: 3 / 1; }
.task__photo .ph {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: #8C928D;
  background-image: repeating-linear-gradient(135deg, transparent 0 11px, rgba(22,25,28,.045) 11px 12px);
  transition: transform .5s var(--ease);
}
.task__photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform .6s var(--ease); }
.task__photo .ph svg { width: 30px; height: 30px; }
.task__photo .ph span { font-family: var(--f-mono); font-size: .75rem; }
.task__body { padding: 18px 20px 20px; display: grid; gap: 6px; grid-template-columns: 1fr auto; align-items: start; }
.task__body h3 { font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; }
.task__body p { grid-column: 1 / -1; color: var(--ink-soft); font-size: .9375rem; line-height: 1.45; }
.task__arrow { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); transition: background-color .18s, color .18s, transform .22s var(--ease); }
.task__arrow svg { width: 16px; height: 16px; }
@media (hover: hover) {
  .task:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-3px); }
  .task:hover .ph, .task:hover .task__photo img { transform: scale(1.04); }
  .task:hover .task__arrow { background: var(--accent); color: #fff; transform: rotate(-45deg); }
}
.task:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- пиковый блок: слои ---------- */
.layers { position: relative; height: 360vh; background: var(--graphite); color: var(--on-dark); }
.layers__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-items: center; overflow: hidden; }
.layers__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.layers__intro { font-family: var(--f-mono); font-size: .8125rem; color: var(--gold); letter-spacing: .04em; }
.layers h2 { margin-top: 12px; font-size: clamp(2rem, 1.2rem + 2.8vw, 3.5rem); font-weight: 780; line-height: 1; letter-spacing: -0.03em; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; }
.step { position: relative; padding: 14px 0 14px 28px; border-top: 1px solid #2E3439; color: var(--on-dark-soft); transition: color .3s var(--ease); }
.step::before {
  content: ""; position: absolute; left: 0; top: 21px; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid #4A5157; transition: background-color .3s, border-color .3s;
}
.step h3 { font-family: var(--f-text); font-size: 1.0625rem; font-weight: 600; letter-spacing: 0; color: inherit; }
.step p { display: grid; grid-template-rows: 0fr; overflow: hidden; font-size: .9688rem; line-height: 1.5; transition: grid-template-rows .4s var(--ease), opacity .3s; opacity: 0; }
.step p > span { min-height: 0; }
.step.is-done { color: #C9CFD3; }
.step.is-done::before { background: var(--accent); border-color: var(--accent); }
.step.is-active { color: var(--on-dark); }
.step.is-active::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 5px rgba(240, 178, 78, .18); }
.step.is-active p { grid-template-rows: 1fr; opacity: 1; padding-top: 6px; color: var(--on-dark-soft); }
.layers__cta { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; opacity: .35; transition: opacity .4s; }
.layers[data-step="4"] .layers__cta { opacity: 1; }
.btn--light { background: transparent; border-color: #4A5157; color: var(--on-dark); }
.btn--light:hover { border-color: var(--on-dark); }

.section-fig { position: relative; min-width: 0; border-radius: var(--r-l); background: #1C2024; border: 1px solid #2B3035; overflow: hidden; }
.section-fig svg { width: 100%; height: auto; }
.sf-line { fill: none; stroke: #D7DCDF; stroke-width: 1.6; stroke-linejoin: round; }
.sf-thin { fill: none; stroke: #6E777E; stroke-width: 1; }
.sf-soil { fill: url(#sSoil); }
.sf-soil-wet { fill: #2D78AF; fill-opacity: .17; }
.sf-concrete { fill: url(#sConcrete); }
.sf-room { fill: #23282C; }
.sf-text { font-family: var(--f-mono); font-size: 11px; fill: #9DA6AC; letter-spacing: .02em; }
.sf-text--water { fill: #7DB6DF; }
.sf-text--ok { fill: #7FD3A2; font-size: 20px; font-weight: 500; letter-spacing: .04em; }
.sf-swell { fill: var(--accent); }
.sf-tape { fill: var(--gold); }
.sf-coat1 { fill: #C9CED1; }
.sf-coat2 { fill: #9AA3A9; }
.sf-wet { fill: url(#sWet); }
.sf-drop { fill: #5BA3D6; }
.drop-move { animation: dropmove var(--t, 4s) linear infinite; animation-delay: var(--dl, 0s); }
@keyframes dropmove {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: .95; }
  85% { opacity: .95; }
  100% { transform: translateX(var(--dx, 180px)); opacity: 0; }
}
.drip { animation: drip 1.8s cubic-bezier(.55, 0, 1, .45) infinite; }
@keyframes drip { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(34px); opacity: 0; } }
.layers:not(.is-visible) .drop-move, .layers:not(.is-visible) .drip { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .drop-move, .drip { animation: none; opacity: .8; } }
.sf-chip {
  position: absolute; left: var(--x); top: var(--y); padding: 5px 9px; border-radius: 6px; background: #0F1214; border: 1px solid #3A4147;
  font-family: var(--f-mono); font-size: .75rem; color: var(--on-dark); white-space: nowrap; opacity: 0; transform: translateY(4px);
  transition: opacity .35s var(--ease), transform .35s var(--ease); pointer-events: none;
}
.sf-chip::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 7px; vertical-align: 0; }
.sf-chip.is-on { opacity: 1; transform: none; }
.layers__note { margin-top: 12px; font-size: .8125rem; color: #7E878D; max-width: 52ch; }

/* без анимации: обычный раздел, все шаги раскрыты */
@media (prefers-reduced-motion: reduce) {
  .layers { height: auto; }
  .layers__stage { position: static; height: auto; padding-block: 80px; }
  .step p { grid-template-rows: 1fr; opacity: 1; padding-top: 6px; }
  .layers__cta { opacity: 1; }
}

/* ---------- товары ---------- */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; min-width: 0;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
@media (hover: hover) { .product:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); } }
.product .pack-ph { aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line); }
.product__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product__cat { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.product__name { font-family: var(--f-display); font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; }
.product__pack { font-size: .9375rem; color: var(--ink-soft); }
.product__foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.price--ask { font-family: var(--f-text); font-size: .9375rem; font-weight: 500; color: var(--ink-soft); }

/* ---------- услуги ---------- */
.services { background: var(--graphite); color: var(--on-dark); }
.services__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.services h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.125rem); font-weight: 760; line-height: 1.03; letter-spacing: -0.03em; }
.services .lede { color: var(--on-dark-soft); }
.services .btn { margin-top: 30px; }
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #2E3439; }
.svc-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 4px; border-bottom: 1px solid #2E3439;
  text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); letter-spacing: -0.01em;
  transition: color .18s, padding .25s var(--ease);
}
.svc-list svg { width: 22px; height: 22px; color: var(--gold); flex: none; transition: transform .22s var(--ease); }
@media (hover: hover) {
  .svc-list a:hover { color: var(--gold); padding-left: 12px; }
  .svc-list a:hover svg { transform: translateX(4px); }
}

/* ---------- опт ---------- */
.opt { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(24px, 4vw, 56px); }
.opt h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.625rem); font-weight: 760; line-height: 1.05; letter-spacing: -0.03em; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: start; }
.checks svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent); }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: .9375rem; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface-2); padding: 13px 14px; min-height: 50px;
  transition: border-color .15s, background-color .15s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.form .btn { width: 100%; min-height: 54px; }
.form__note { font-size: .875rem; color: var(--ink-soft); }

/* ---------- филиалы ---------- */
.branches { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.branch { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: clamp(20px, 2.5vw, 28px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.branch h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; }
.branch__addr { color: var(--ink-soft); font-size: 1.0625rem; }
.branch__addr--todo { font-family: var(--f-mono); font-size: .875rem; color: #8F3207; background: var(--accent-soft); padding: 4px 8px; border-radius: 6px; justify-self: start; width: fit-content; }
.branch__phones { display: grid; gap: 6px; }
.branch__phones a { font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.branch__phones a span { color: var(--ink-soft); font-weight: 500; }
.branch__phones a:hover { color: var(--accent-hover); }
.map { position: relative; margin-top: auto; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--tint); border: 1px solid var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__fallback {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; padding: 16px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px; background-color: var(--surface-2); color: var(--ink-soft); font-size: .875rem;
}
.map__fallback svg { width: 30px; height: 30px; color: var(--accent); }
.map__fallback a { color: var(--ink); font-weight: 600; }

/* ---------- адаптив ---------- */
@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 680px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .task-grid { grid-template-columns: repeat(2, 1fr); }
  .task--wide, .task--half { --span: 2; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .layers__grid { grid-template-columns: 1fr; gap: 18px; align-content: center; }
  .layers h2 { font-size: clamp(1.625rem, 1.2rem + 2vw, 2.25rem); }
  .layers__text { order: 2; }
  .section-fig { order: 1; max-height: 44svh; display: grid; place-items: center; }
  .section-fig svg { max-height: 44svh; width: auto; }
  .steps { margin-top: 14px; }
  .step { padding-block: 9px; }
  .step:not(.is-active) { display: none; }
  .step.is-active { border-top: 0; }
  .layers__note { display: none; }
  .services__grid, .opt { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero h1 { font-size: clamp(2.125rem, 1.4rem + 3.6vw, 2.75rem); }
  .hero__cta .btn { width: 100%; }
  .callout { font-size: .6875rem; padding: 4px 7px 4px 6px; gap: 5px; }
  .callout::before { width: 5px; height: 5px; }
  .hero__badge { position: static; margin-top: 10px; font-size: .875rem; padding: 11px 13px; }
  .sf-chip { font-size: .625rem; padding: 3px 6px; }
  .hero__badge svg { width: 28px; height: 28px; padding: 6px; }
  .fact { padding: 14px 16px; }
  .task-grid { gap: 10px; }
  .task--half { --span: 1; }
  .task:not(.task--wide):not(.task--half) { --span: 1; }
  .task__body { padding: 12px 14px 14px; }
  .task__body h3 { font-size: 1rem; }
  .task__body p { display: none; }
  .task__arrow { display: none; }
  .task--half .task__photo { aspect-ratio: 3 / 2; }
  .products { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product__body { padding: 12px 12px 14px; }
  .product__name { font-size: 1rem; }
  .product__foot { flex-direction: column; align-items: stretch; }
  .product__foot .btn { width: 100%; }
  .branches { grid-template-columns: 1fr; }
}

/* ---------- переключатель систем ---------- */
.layers__tabs { display: flex; gap: 8px; margin-bottom: clamp(14px, 2vw, 24px); flex-wrap: wrap; }
.layers__tab {
  font-family: var(--f-text); font-size: .9375rem; font-weight: 600; padding: 9px 18px; border-radius: 999px;
  border: 1px solid #3A4147; background: transparent; color: var(--on-dark-soft); cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
@media (hover: hover) { .layers__tab:hover { color: var(--on-dark); border-color: #6A737A; } }
.layers__tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.layers__tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.layers__grid[hidden] { display: none; }
.sf-adh { fill: #B9936B; }
.drop-fall { animation: dropfall var(--t, 1.6s) cubic-bezier(.5, 0, 1, .6) infinite; animation-delay: var(--dl, 0s); }
@keyframes dropfall {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: .95; }
  88% { opacity: .95; }
  100% { transform: translateY(var(--dy, 250px)); opacity: 0; }
}
.layers:not(.is-visible) .drop-fall { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .drop-fall { animation: none; opacity: .8; } }
@media (max-width: 720px) {
  .layers__tabs { gap: 6px; margin-bottom: 10px; }
  .layers__tab { padding: 7px 14px; font-size: .875rem; }
}

.product .pack-ph--photo { position: relative; overflow: hidden; background: #fff; padding: 0; }
.product .pack-ph--photo img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; display: block; }
