/* =========================================================================
   UKA StroyGroup — Конструктор ремонта (konstruktor.html)
   Design language copied from compatto-clone (css/base.css + css/07-*.css +
   css/09-cta.css) and adapted standalone for this page. No cross-project
   references — fonts and images live under uka-site/assets/.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. @font-face — Inter Tight, self-hosted (copied from compatto-clone)
   ------------------------------------------------------------------------- */

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../assets/fonts/InterTight-300-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../assets/fonts/InterTight-300-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
    U+03A3-03FF;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/InterTight-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/InterTight-400-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
    U+03A3-03FF;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/InterTight-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/InterTight-500-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
    U+03A3-03FF;
}

/* -------------------------------------------------------------------------
   2. Reset (copied from compatto-clone base.css)
   ------------------------------------------------------------------------- */

/* Единая шкала отступов и высот: всё остальное считается от неё, чтобы
   поля секций, карточек и панелей не разъезжались между экранами. */
:root {
  --pad-sm: 16px;
  --pad-md: 24px;
  --pad-lg: 40px;
  --gap-cards: 20px;
  --navbar-h: 76px;
  --summary-bar-h: 48px;
  --ink: rgb(46, 34, 28);
  --ink-soft: rgb(94, 74, 60);
  --line: rgb(224, 216, 200);
  --accent: rgb(242, 201, 76);
  --accent-deep: rgb(156, 122, 10);
  --surface: #fff;
  --surface-warm: rgb(239, 235, 226);
}

@media (max-width: 768px) {
  :root { --pad-lg: 24px; --pad-md: 18px; --gap-cards: 14px; --navbar-h: 72px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

[hidden] { display: none !important; }

body {
  background-color: #f9f7f3;
  color: rgb(51, 51, 51);
  font-family: "Inter Tight", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 27px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Заголовок получает программный .focus() при смене шага только для
   скринридеров (объявить новый экран) — визуальная рамка здесь лишняя
   и на некоторых браузерах (Safari iOS) появляется даже без клавиатуры. */
.k-focus-programmatic:focus,
.k-focus-programmatic:focus-visible {
  outline: none;
}

.container { width: 100%; max-width: 1000px; margin: 0 auto; }

/* -------------------------------------------------------------------------
   3. Entrance animation + reveal utility (copied from compatto-clone)
   ------------------------------------------------------------------------- */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal { opacity: 0; }
.reveal.reveal-in {
  animation-duration: 0.6s;
  animation-fill-mode: both;
  animation-timing-function: ease;
  animation-name: fadeInUp;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; animation: none !important; transform: none !important; }
}

/* -------------------------------------------------------------------------
   4. Buttons (copied from compatto-clone css/02-hero.css / 09-cta.css)
   ------------------------------------------------------------------------- */

/* Основная кнопка — насыщенная бронзовая заливка, не бледный градиент:
   бесцветная кремовая кнопка читалась как невзрачная, не премиум. */
.k-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 15px 25px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 16px;
  color: var(--ink);
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(46, 34, 28, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  white-space: nowrap;
  border: none;
}
.k-btn:hover, .k-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(46, 34, 28, 0.24);
  filter: brightness(1.04);
}
.k-btn:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
  transform: none;
  filter: none;
}

.k-btn--ghost {
  background: transparent;
  color: rgb(46, 34, 28);
  border: 1px solid rgb(224, 216, 200);
  box-shadow: none;
}
.k-btn--ghost:hover, .k-btn--ghost:focus-visible {
  background: rgb(239, 235, 226);
  box-shadow: none;
  transform: none;
  filter: none;
}

.k-btn--dark {
  color: #fff;
  background: rgb(46, 34, 28);
  box-shadow: 0 6px 16px rgba(46, 34, 28, 0.3);
}

.k-btn--lg { padding: 18px 34px; font-size: 17px; }

/* -------------------------------------------------------------------------
   5. Page shell / progress dots
   ------------------------------------------------------------------------- */

.konstruktor {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.k-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(249, 247, 243, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgb(224, 216, 200);
}

.k-progress-bar {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: transparent;
}
.k-progress-bar__fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.35s ease;
}
@media (prefers-reduced-motion: reduce) {
  .k-progress-bar__fill { transition: none; }
}

.k-topbar__brand {
  font-size: 15px;
  font-weight: 500;
  color: rgb(86, 67, 56);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 640px) {
  .k-topbar { padding: 14px 16px; gap: 10px; }
  /* dots read as noise at this width and force the brand to wrap; the thin
     progress bar under the topbar + the "Шаг N из 8" navbar label already
     carry step position, so the dot row is dropped here, not squeezed */
  .k-progress { display: none; }
  .k-topbar__brand { font-size: 14px; }
  .k-topbar__close { padding: 8px 12px; font-size: 13px; flex: 0 0 auto; }
}

.k-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.k-progress__dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  background: rgb(224, 216, 200);
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}
/* invisible 44px tap target, doesn't affect the visual dot size */
.k-progress__dot::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 28px; height: 28px;
  transform: translate(-50%, -50%);
}
.k-progress__dot.is-active {
  background: var(--accent);
  transform: scale(1.35);
}
.k-progress__dot.is-done {
  background: rgba(242, 201, 76, 0.55);
}
.k-progress__dot:disabled,
.k-progress__dot.is-locked {
  cursor: default;
  pointer-events: none;
}

.k-topbar__close {
  font-size: 14px;
  color: rgb(86, 67, 56);
  border: 1px solid rgb(224, 216, 200);
  border-radius: 8px;
  padding: 8px 14px;
}
.k-topbar__close:hover, .k-topbar__close:focus-visible {
  background: rgb(239, 235, 226);
}

.k-layout {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: var(--pad-lg);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--pad-md);
}

.k-main {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 820px;
  padding: var(--pad-lg) 0 calc(var(--navbar-h) + var(--pad-lg));
}

/* Интро без боковой сводки: даём обложке всю ширину полосы */
.k-main:has(.k-screen[data-screen="intro"].is-active) { max-width: 1100px; }

/* -------------------------------------------------------------------------
   5b. Live summary panel — desktop sticky sidebar / mobile collapsible bar
   ------------------------------------------------------------------------- */

.k-summary-wrap[hidden] { display: none; }

.k-summary-wrap {
  flex: 0 0 300px;
  padding-top: 40px;
}

.k-summary-toggle {
  display: none;
}

.k-summary {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(46, 34, 28, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0px;
}
.k-summary::-webkit-scrollbar { width: 4px; }
.k-summary::-webkit-scrollbar-track { background: transparent; }
.k-summary::-webkit-scrollbar-thumb {
  background: rgba(46, 34, 28, 0.15);
  border-radius: 4px;
}
.k-summary { scrollbar-width: thin; scrollbar-color: rgba(46,34,28,0.15) transparent; }

.k-summary__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgb(224, 216, 200);
}

.k-summary__head-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.k-summary__price {
  font-size: 18px;
  font-weight: 500;
  color: rgb(46, 34, 28);
}

.k-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 36px;
}
.k-summary__row:hover, .k-summary__row:focus-visible {
  background: rgb(239, 235, 226);
}
.k-summary__row.is-locked {
  cursor: default;
  opacity: 0.55;
}
.k-summary__row.is-locked:hover { background: transparent; }
.k-summary__row.is-locked .k-summary__row-value { font-style: italic; }

.k-summary__row-label {
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgb(86, 67, 56);
  white-space: nowrap;
  flex: 0 0 auto;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.k-summary__row-value {
  font-size: 13px;
  font-weight: 500;
  color: rgb(46, 34, 28);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

@media (max-width: 1023px) {
  .k-layout { flex-direction: column; gap: 0; padding: 0; }
  /* нижний стек = навбар + свёрнутая полоса сводки: контент никогда под ними.
     Реальная высота навбара больше --navbar-h на устройствах с home indicator
     (у него свой safe-area-inset-bottom в padding) — учитываем это здесь,
     иначе на iPhone контент/тумблер/шторка съезжают и перекрываются навбаром. */
  .k-main {
    max-width: 100%;
    padding: var(--pad-md) var(--pad-md)
             calc(var(--navbar-h) + var(--summary-bar-h) + var(--pad-lg) + env(safe-area-inset-bottom, 0px));
  }

  /* Сама обёртка ничего не позиционирует — тумблер и панель на мобиле
     зафиксированы независимо, чтобы панель могла выезжать снизу вверх
     как шторка, не завися от высоты тумблера над ней. */
  .k-summary-wrap { flex: none; padding-top: 0; }

  .k-summary-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    position: fixed;
    left: 0; right: 0;
    bottom: calc(var(--navbar-h) + env(safe-area-inset-bottom, 0px));
    z-index: 8;
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
    color: rgb(86, 67, 56);
    background: rgb(239, 235, 226);
    border-top: 1px solid rgb(224, 216, 200);
    min-height: 44px;
  }
  .k-summary-toggle svg { transition: transform 0.25s ease; }
  .k-summary-wrap:not(.is-collapsed) .k-summary-toggle svg { transform: rotate(180deg); }

  /* Шторка: full-screen (до тумблера снизу), выезжает снизу вверх.
     Явный overflow-y на мобиле — без него на некоторых WebView шторка
     визуально влезает всё содержимое, но пальцем не скроллится. */
  .k-summary {
    display: flex;
    position: fixed;
    left: 0; right: 0;
    top: 0;
    bottom: calc(var(--navbar-h) + var(--summary-bar-h) + env(safe-area-inset-bottom, 0px));
    z-index: 6;
    max-height: none;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 28px rgba(46, 34, 28, 0.16);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .k-summary-wrap:not(.is-collapsed) .k-summary {
    transform: translateY(0);
  }
}

/* -------------------------------------------------------------------------
   6. Screens (intro / steps / result) — fade-slide transition
   ------------------------------------------------------------------------- */

/* Смена шага: короткое и мелкое движение, чтобы можно было щёлкать быстро
   и интерфейс не «плыл» под рукой. */
@keyframes k-screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.k-screen {
  display: none;
}
.k-screen.is-active {
  display: block;
  animation: k-screen-in 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .k-screen.is-active { animation: none; }
}

/* -------------------------------------------------------------------------
   7. Intro screen — hero panel (copied from compatto-clone css/02-hero.css)
   ------------------------------------------------------------------------- */

/* Фото и текст — раздельные блоки, никакого текста поверх фото
   (оператор отверг наложение, тот же принцип, что и на главной). */
.k-intro__photo-card {
  position: relative;
  min-height: clamp(220px, 34vh, 380px);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(46, 34, 28, 0.16);
}

.k-intro__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Фирменная деталь: стопка кружков с реальными фото материалов рядом
   с кнопкой — тихий намёк на механику «выбираешь из настоящих фото»,
   на светлой карточке, не поверх снимка. */
.k-intro__cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.k-intro__swatches { display: flex; }
.k-intro__swatches img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: 0 4px 10px rgba(46, 34, 28, 0.18);
  margin-left: -14px;
}
.k-intro__swatches img:first-child { margin-left: 0; }

@media (max-width: 560px) {
  .k-intro__cta-row { gap: 12px; }
  .k-intro__swatches img { width: 34px; height: 34px; border-width: 2px; margin-left: -11px; }
}

.k-intro__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(560px, 100%);
  padding: 40px 0 0;
}

.k-intro__eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 14px;
}

.k-intro__heading {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 14px;
  max-width: 16ch;
  text-wrap: balance;
}

.k-intro__text {
  font-size: 17px;
  line-height: 26px;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 28px;
}

.k-acc { color: var(--accent-deep); }

/* Тихая строка доверия под кнопкой — те же факты, что уже сказаны
   в тексте выше (7 шагов, полминуты), просто вынесены на вид как метки */
.k-intro__stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.k-intro__dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-soft);
  opacity: 0.5;
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .k-intro__photo-card { border-radius: 20px; min-height: 220px; }
  .k-intro__content { max-width: 100%; padding-top: 28px; }
  .k-intro__text { font-size: 16px; line-height: 24px; margin-bottom: 22px; }
  .k-intro__stats { flex-wrap: wrap; }
}

/* -------------------------------------------------------------------------
   8. Step screens — heading + option cards
   ------------------------------------------------------------------------- */

.k-step__eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep); /* светлая бронза не добирала 4.5:1 на кремовом */
  margin-bottom: 10px;
}

.k-step__heading {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  color: rgb(46, 34, 28);
  margin-bottom: 28px;
}

/* Area step */
.k-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 480px;
}

.k-area__row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid rgb(224, 216, 200);
  border-radius: 16px;
  padding: 18px 24px;
  transition: border-color 0.2s ease;
}
.k-area__row:focus-within { border-color: var(--accent); }

.k-area__row input[type="number"] {
  border: none;
  background: transparent;
  font-size: 32px;
  font-weight: 500;
  color: rgb(46, 34, 28);
  width: 140px;
}
.k-area__row input[type="number"]:focus { outline: none; }
.k-area__row span { font-size: 18px; color: rgb(86, 67, 56); }

.k-area input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 4px;
}

.k-area__hint {
  font-size: 13px;
  color: rgb(86, 67, 56);
}

/* Object type (первичка/вторичка) — 2-card selector, no photo */
.k-obyekt {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-cards);
  max-width: 620px;
}
.k-obyekt-card { position: relative; cursor: pointer; display: block; }
.k-obyekt-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.k-obyekt-card__frame {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 120px;
  padding: 28px 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 2px solid rgb(224, 216, 200);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.k-obyekt-card:hover .k-obyekt-card__frame { box-shadow: 0 10px 24px rgba(46, 34, 28, 0.1); }
.k-obyekt-card input:checked + .k-obyekt-card__frame {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 10px 24px rgba(46, 34, 28, 0.12);
}
.k-obyekt-card input:focus-visible + .k-obyekt-card__frame {
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px rgba(242, 201, 76, 0.28);
}
.k-obyekt-card__title { font-size: 20px; font-weight: 500; color: var(--ink); }
.k-obyekt-card__sub { font-size: 14px; color: var(--ink-soft); }

/* «без материалов» ведущая строка в итоговом документе — отделена сверху */
.k-summary-doc__alt-lead { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.15); }

/* Option card grid */
.k-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-cards);
  align-items: stretch;
}
.k-cards--2 { grid-template-columns: repeat(2, 1fr); max-width: 620px; }

.k-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(46, 34, 28, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.k-card:hover { box-shadow: 0 10px 24px rgba(46, 34, 28, 0.12); }

/* No hover translateY here on purpose: a lift transform under the cursor
   shifts the element between mousedown and mouseup and can silently swallow
   real pointer clicks (confirmed while testing real mouse clicks on this
   page) — color/shadow-only feedback per the "no layout-shift on hover" spec. */

.k-card__select {
  display: flex;
  flex: 1 1 auto;
  cursor: pointer;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}

.k-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}

/* Выбор подсвечивает КАРТОЧКУ ЦЕЛИКОМ, а не только фото с названием */
.k-card:has(input[type="radio"]:checked) {
  box-shadow: 0 0 0 2px var(--accent), 0 10px 24px rgba(46, 34, 28, 0.14);
}
.k-card:has(input[type="radio"]:focus-visible) {
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px rgba(242, 201, 76, 0.28);
}

.k-card__frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}

.k-card__photo-wrap {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-warm);
  flex: 0 0 auto;
}

.k-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.k-card__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.k-card input[type="radio"]:checked ~ .k-card__frame .k-card__check {
  opacity: 1;
  transform: scale(1);
}

.k-card__body {
  padding: var(--pad-sm) var(--pad-sm) 10px;
  flex: 1 1 auto;
}

/* две строки резервируются заранее: имена разной длины не разъезжают ряд */
.k-card__name {
  display: block;
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}

/* материал / ключевая деталь — видно сразу на карточке, без «Подробнее» */
.k-card__sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  color: var(--ink-soft);
}

/* Триггер: тихая строка с тонкой верхней линией, не «служебная кнопка» */
.k-card__info-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 12px var(--pad-sm) 14px;
  border-top: 1px solid var(--surface-warm);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  min-height: 44px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.k-card__info-toggle svg { color: var(--accent-deep); transition: color 0.2s ease; }
.k-card__info-toggle:hover, .k-card__info-toggle:focus-visible {
  color: var(--ink);
  background: rgba(242, 201, 76, 0.07);
}
.k-card__info-toggle:hover svg { color: var(--ink); }

/* Разворот лежит НАВЕРХУ карточки тёмным стеклом: высота карточки и
   вся сетка при открытии не двигаются, читается как премиум-оверлей. */
.k-card__info {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 26px 24px;
  background:
    linear-gradient(rgba(30, 22, 18, 0.94), rgba(30, 22, 18, 0.97));
  backdrop-filter: blur(3px);
  border-radius: 24px;
  overflow-y: auto;
  animation: k-info-in 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes k-info-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .k-card__info { animation: none; }
}

.k-card__info-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(224, 216, 200, 0.75);
  padding-right: 34px;
}

.k-card__info-desc {
  font-size: 19px;
  line-height: 26px;
  font-weight: 400;
  color: #fff;
  text-wrap: balance;
}

.k-card__info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.k-card__info-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.86);
}
.k-card__info-list li svg { flex: 0 0 auto; margin-top: 2px; }
.k-card__info-list .is-pro svg { color: rgb(196, 168, 122); }
.k-card__info-list .is-note { color: rgba(224, 216, 200, 0.72); }
.k-card__info-list .is-note svg { color: rgba(224, 216, 200, 0.6); }

.k-card__info-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.k-card__info-close:hover, .k-card__info-close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Планшет: три опции ложатся в две колонки, а не в один гигантский столбец */
@media (max-width: 900px) {
  .k-cards { grid-template-columns: repeat(2, 1fr); }
  .k-cards--2 { max-width: 100%; }
}

/* Телефон: столбик, фото площе. */
@media (max-width: 560px) {
  .k-cards, .k-cards--2 { grid-template-columns: 1fr; max-width: 100%; }
  .k-card__photo-wrap { aspect-ratio: 16 / 10; }
}

/* «Подробнее» — ВСЕГДА оверлей поверх карточки, на любой ширине.
   Раньше на компьютере разворот стоял в потоке (position:static) —
   карточка физически росла, а CSS Grid по умолчанию растягивает всю
   строку по высоте самого высокого элемента, поэтому визуально
   «раздувались» ВСЕ карточки ряда, а не только открытая. Оверлей не
   занимает место в потоке — соседей не задевает ни на каком экране. */

/* -------------------------------------------------------------------------
   9. Result screen — dark mesh card (copied from compatto-clone
      css/07-why-choose-cards.css / css/09-cta.css)
   ------------------------------------------------------------------------- */

.k-result__card {
  border-radius: 24px;
  background-color: rgb(46, 34, 28);
  background-image:
    radial-gradient(at 0% 23%, rgb(52, 41, 20) 0px, rgba(0, 0, 0, 0) 50%),
    radial-gradient(at 19% 100%, var(--accent-deep) 0px, rgba(0, 0, 0, 0) 50%),
    radial-gradient(at 100% 100%, rgb(128, 100, 8) 0px, rgba(0, 0, 0, 0) 50%),
    radial-gradient(at 66% 0%, rgb(196, 157, 40) 0px, rgba(0, 0, 0, 0) 50%),
    radial-gradient(at 64% 32%, rgba(84, 65, 8, 0.99) 0px, rgba(0, 0, 0, 0) 50%);
  padding: var(--pad-lg);
  color: #fff;
}

.k-result__eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgb(224, 216, 200);
  margin-bottom: 8px;
}

.k-result__heading {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 28px;
}

.k-result__match {
  font-size: 16px;
  color: rgb(224, 216, 200);
  margin-bottom: 18px;
}
.k-result__match strong { color: #fff; font-weight: 500; }

.k-result__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: rgb(224, 216, 200);
  padding: 20px 0;
}
.k-result__loading .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgb(224, 216, 200);
  animation: k-pulse 1s ease-in-out infinite;
}
.k-result__loading .dot:nth-child(2) { animation-delay: 0.15s; }
.k-result__loading .dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes k-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .k-result__loading .dot { animation: none; opacity: 1; }
}

.k-summary-doc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 24px;
}

.k-summary-doc__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
  padding: 6px 0;
  color: rgb(224, 216, 200);
}
.k-summary-doc__row .v { color: #fff; font-weight: 500; }

.k-summary-doc__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.k-summary-doc__total .k { font-size: 18px; font-weight: 500; }
.k-summary-doc__total .v { font-size: 40px; font-weight: 500; }

.k-pkg-manual-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: rgb(224, 216, 200);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px 9px;
  margin-left: 6px;
  vertical-align: middle;
}

.k-caption { font-size: 14px; color: rgb(224, 216, 200); margin-top: 6px; }

.k-kaspi {
  font-size: 15px;
  color: rgb(224, 216, 200);
  margin-bottom: 20px;
}
.k-kaspi .v { color: #fff; font-weight: 500; }

.k-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 14px;
  color: rgb(224, 216, 200);
  margin-bottom: 28px;
}
.k-compare .v { color: #fff; font-weight: 500; }

.k-composition h4 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 14px;
  color: #fff;
}

.k-composition__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 32px;
  margin-bottom: 18px;
}

.k-composition__list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 22px;
  color: rgb(224, 216, 200);
}
.k-composition__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.k-bonus {
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .k-result__card { padding: 26px 20px; }
  .k-result__heading { font-size: 26px; }
  .k-summary-doc__row { font-size: 15px; }
  .k-summary-doc__total .k { font-size: 16px; }
  .k-summary-doc__total .v { font-size: 28px; }
  .k-composition__list { grid-template-columns: 1fr; gap: 8px; }
  .k-compare { flex-direction: column; gap: 6px; }
}

/* -------------------------------------------------------------------------
   9b. Package picker — Эконом / Комфорт / Премиум switch, honesty warning
   ------------------------------------------------------------------------- */

.k-pkg-picker {
  margin-top: var(--pad-md);
}

.k-pkg-picker__heading {
  font-size: 20px;
  font-weight: 500;
  color: rgb(46, 34, 28);
  margin-bottom: 14px;
}

.k-pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.k-pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  background: #fff;
  border: 2px solid rgb(224, 216, 200);
  border-radius: 20px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.k-pkg-card:hover { box-shadow: 0 10px 24px rgba(46, 34, 28, 0.1); }
.k-pkg-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(46, 34, 28, 0.1);
}

.k-pkg-card__badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

.k-pkg-card__name {
  font-size: 17px;
  font-weight: 500;
  color: rgb(46, 34, 28);
}

.k-pkg-card__price {
  font-size: 22px;
  font-weight: 500;
  color: rgb(46, 34, 28);
  margin-top: 4px;
}

.k-pkg-card__rate {
  font-size: 13px;
  color: rgb(86, 67, 56);
  margin-bottom: 12px;
}

.k-pkg-card__pros,
.k-pkg-card__cons {
  width: 100%;
}

.k-pkg-card__pros li,
.k-pkg-card__cons li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 19px;
  margin-bottom: 3px;
}
.k-pkg-card__pros li { color: rgb(46, 34, 28); }
.k-pkg-card__pros li::before {
  content: "+";
  position: absolute; left: 0; top: 0;
  color: rgb(120, 150, 100);
  font-weight: 600;
}
.k-pkg-card__cons li { color: rgb(86, 67, 56); }
.k-pkg-card__cons li::before {
  content: "\2212";
  position: absolute; left: 0; top: 0;
  color: rgb(180, 90, 60);
  font-weight: 600;
}
.k-pkg-card__cons { margin-top: 6px; }

.k-pkg-warning {
  margin-top: 14px;
  font-size: 14px;
  line-height: 21px;
  color: rgb(46, 34, 28);
  background: rgb(250, 236, 220);
  border-radius: 12px;
  padding: 14px 16px;
}

.k-pkg-note {
  margin-top: 14px;
  font-size: 14px;
  line-height: 21px;
  color: rgb(86, 67, 56);
  background: rgb(239, 235, 226);
  border-radius: 12px;
  padding: 14px 16px;
}

/* upgrade note — хорошая новость (клиент получает больше, чем выбрал),
   не путать с предупреждением-заменой (.k-pkg-warning) */
.k-pkg-note--up {
  margin-top: 8px;
  color: rgb(46, 34, 28);
  background: rgba(242, 201, 76, 0.16);
}

@media (max-width: 900px) {
  .k-pkg-grid { grid-template-columns: 1fr; gap: 12px; }
  .k-pkg-card { padding: 18px; }
}

/* -------------------------------------------------------------------------
   10. Result CTA panel — give-first + WhatsApp + PDF form
   ------------------------------------------------------------------------- */

.k-cta-panel {
  margin-top: var(--pad-md);
  background: var(--surface);
  border-radius: 24px;
  padding: var(--pad-lg);
  box-shadow: 0 2px 10px rgba(46, 34, 28, 0.06);
}

.k-cta-panel__give {
  font-size: 14px;
  color: rgb(86, 67, 56);
  margin-bottom: 18px;
}

/* Квалификация лида: когда планируют начать ремонт */
.k-timeline {
  margin-bottom: 20px;
}
.k-timeline__q {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.k-timeline__opts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.k-timeline__chip {
  flex: 1 1 auto;
  border: 1px solid rgb(224, 216, 200);
  background: transparent;
  color: rgb(46, 34, 28);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.k-timeline__chip:hover {
  border-color: var(--accent);
}
.k-timeline__chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  font-weight: 600;
}
@keyframes k-timeline-flash {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.k-timeline--flash .k-timeline__q { color: #c0392b; }
.k-timeline--flash .k-timeline__opts { animation: k-timeline-flash 0.4s ease; }

.k-cta-panel__wa {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}
.k-cta-panel__wa.is-locked {
  opacity: 0.4;
  pointer-events: none;
}

.k-pdf-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.k-pdf-row input[type="tel"] {
  flex: 1 1 220px;
  border: 1px solid rgb(224, 216, 200);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 16px;
  background: #fff;
}
.k-pdf-row input[type="tel"]:focus { outline: none; border-color: var(--accent); }

.k-form-status {
  margin-top: 12px;
  font-size: 14px;
  color: rgb(86, 67, 56);
  min-height: 20px;
}

.k-note {
  margin-top: 16px;
  font-size: 14px;
  color: rgb(86, 67, 56);
}

/* -------------------------------------------------------------------------
   11. Bottom nav bar (Назад / Далее)
   ------------------------------------------------------------------------- */

.k-navbar[hidden] { display: none; }

.k-navbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 7;
  min-height: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pad-sm);
  padding: 14px var(--pad-md) calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(249, 247, 243, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}

.k-navbar__label {
  font-size: 14px;
  color: var(--ink-soft);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .k-navbar__label { display: none; }
  .k-navbar .k-btn { flex: 1 1 auto; }
  .k-navbar .k-btn--ghost { flex: 0 0 auto; }
}
