/* ============================================================
   KRAFTEK — рекламна фуния „Калкулатор за ремонт“
   Палитрата и шрифтовете са тези на kraftekdesign.com
   ============================================================ */
:root {
  --bg: #0f0e0c;
  --bg-2: #161411;
  --bg-3: #1e1b17;
  --ink: #f2ede4;
  --muted: #a89f92;
  --accent: #c4a06a;
  --accent-2: #8f7347;
  --line: rgba(242, 237, 228, 0.12);
  --line-soft: rgba(242, 237, 228, 0.07);
  --err: #e07a5f;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Manrope", -apple-system, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #14110c; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
.eyebrow { font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }

/* --- Бутони ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 30px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--gold { background: var(--accent); color: #14110c; }
.btn--gold:hover { background: #d3b27f; }
.btn--gold:disabled { opacity: 0.6; cursor: wait; }
.btn--line { border-color: var(--line); background: transparent; color: var(--ink); }
.btn--line:hover { border-color: var(--accent); color: var(--accent); }

/* --- Горна лента ------------------------------------------------- */
.top {
  position: absolute; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(16px, 4vw, 56px);
}
.top__logo { height: 30px; width: auto; }
.top__phone { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* --- Hero -------------------------------------------------------- */
.hero { position: relative; min-height: 92svh; display: flex; align-items: flex-end; padding: 140px clamp(16px, 4vw, 56px) 72px; }
.hero__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,14,12,0.55) 0%, rgba(15,14,12,0.35) 35%, rgba(15,14,12,0.92) 82%, var(--bg) 100%),
    url("../img/industrial-09.jpg") center 45% / cover no-repeat;
}
.hero__inner { position: relative; max-width: 760px; }
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); margin-bottom: 22px; }
.hero__lead { font-size: clamp(17px, 1.6vw, 20px); color: #d9d2c6; max-width: 560px; margin-bottom: 34px; }
.hero__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.hero__facts b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 400; color: var(--ink); line-height: 1.1; }

/* --- Калкулатор -------------------------------------------------- */
.calc-wrap { padding: 0 16px 100px; scroll-margin-top: 16px; }
.calc {
  max-width: 880px; margin: -10px auto 0; scroll-margin-top: 16px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(22px, 4vw, 52px);
  box-shadow: 0 40px 100px rgba(0,0,0,0.45);
}
.calc__head { display: flex; align-items: center; gap: 18px; margin-bottom: 34px; }
.calc__count { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.calc__bar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.calc__bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.5s var(--ease); }

.step { animation: stepIn 0.45s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.step h3 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 26px; outline: none; }
.step h4 { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 34px 0 14px; }
.step__hint { color: var(--muted); margin: -12px 0 24px; }
.step__err { margin-top: 18px; color: var(--err); font-size: 15px; }

.cards { display: grid; gap: 12px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 20px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-3); cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.card:hover { border-color: rgba(196,160,106,0.5); }
.card input { position: absolute; opacity: 0; pointer-events: none; }
.card b { font-size: 17px; font-weight: 600; }
.card small { color: var(--muted); font-size: 14px; line-height: 1.5; }
.card__ico { font-size: 26px; color: var(--accent); line-height: 1; margin-bottom: 6px; }
.card:has(input:checked) { border-color: var(--accent); background: rgba(196,160,106,0.09); }
.card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cards--tall .card { padding: 26px 22px; }
.card__tag { position: absolute; top: -10px; right: 16px; background: var(--accent); color: #14110c; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 13px; letter-spacing: 0.06em; color: var(--muted); }
.field i { font-style: normal; opacity: 0.7; }
.field--big, .field--wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 12px 16px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px;
  outline: none; transition: border-color 0.25s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field__unit { position: relative; }
.field__unit input { font-family: var(--font-display); font-size: 40px; min-height: 80px; padding-right: 70px; }
.field__unit i { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-3); width: max-content; }
.stepper button { width: 54px; height: 52px; border: 0; background: none; font-size: 22px; color: var(--accent); cursor: pointer; }
.stepper input { width: 56px; text-align: center; border: 0; background: none; min-height: 0; padding: 0; font-weight: 600; font-size: 18px; }

.seg { display: flex; gap: 8px; }
.seg--wrap { flex-wrap: wrap; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 13px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; background: var(--bg-3); transition: border-color 0.25s, background 0.25s; }
.seg input:checked + span { border-color: var(--accent); background: rgba(196,160,106,0.12); color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-3); cursor: pointer; transition: border-color 0.25s, background 0.25s; }
.check input { appearance: none; flex: none; width: 22px; height: 22px; border: 1px solid var(--muted); border-radius: 6px; display: grid; place-items: center; transition: background 0.2s, border-color 0.2s; }
.check input::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #14110c; border-bottom: 2px solid #14110c; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { opacity: 1; }
.check:has(input:checked) { border-color: rgba(196,160,106,0.6); background: rgba(196,160,106,0.06); }
.check span { font-size: 15px; line-height: 1.4; }
.sub { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 4px 0 8px 8px; font-size: 14px; color: var(--muted); }

.upload { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 42px 20px; border: 1.5px dashed rgba(196,160,106,0.45); border-radius: 16px; background: var(--bg-3); cursor: pointer; margin-bottom: 24px; transition: border-color 0.25s, background 0.25s; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload.is-over, .upload:hover { border-color: var(--accent); background: rgba(196,160,106,0.06); }
.upload.is-done { border-style: solid; }
.upload__ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--accent); color: var(--accent); font-size: 20px; margin-bottom: 8px; }
.upload small { color: var(--muted); }
.upload__name { color: var(--accent); font-size: 14px; margin-top: 8px; }

.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.calc__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-soft); }
.calc__nav [data-next] { margin-left: auto; }

/* --- Резултат ---------------------------------------------------- */
.result .eyebrow span:not(:empty)::before { content: " · "; }
.result__range { text-wrap: balance; font-family: var(--font-display); font-size: clamp(38px, 6.4vw, 72px); line-height: 1.05; color: var(--ink); margin-bottom: 28px; }
.result__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 30px; }
.result__meta div { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-3); }
.result__meta span { display: block; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.result__meta b { font-size: 20px; font-weight: 600; }
.result__table { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: 26px; }
.result__table th { text-align: left; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.result__table td { padding: 13px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.result__table td:nth-child(2) { color: var(--muted); padding: 13px 14px; white-space: nowrap; }
.result__table th:last-child, .result__table td:last-child { text-align: right; white-space: nowrap; }
.result__note { color: var(--muted); font-size: 15px; margin-bottom: 30px; }
.result__note b { color: var(--ink); font-weight: 600; }
.result__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Съдържателни блокове ---------------------------------------- */
.block { max-width: 1180px; margin: 0 auto; padding: 90px clamp(16px, 4vw, 56px); border-top: 1px solid var(--line-soft); }
.block h2 { font-size: clamp(34px, 4.6vw, 58px); margin-bottom: 48px; max-width: 760px; }
.how { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.how b { font-family: var(--font-display); font-size: 40px; color: var(--accent); font-weight: 400; }
.how h4 { font-size: 18px; margin: 10px 0 8px; font-weight: 600; }
.how p { color: var(--muted); font-size: 15px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery figure { position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 5; }
.gallery figure:nth-child(1), .gallery figure:nth-child(5) { aspect-ratio: auto; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; left: 14px; bottom: 12px; font-size: 13px; letter-spacing: 0.04em; background: rgba(15,14,12,0.7); padding: 5px 12px; border-radius: 99px; backdrop-filter: blur(6px); }

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-size: 19px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 26px; transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { color: var(--muted); padding: 0 0 24px; max-width: 700px; }

.final { text-align: center; padding: 110px 16px; background: radial-gradient(ellipse at center, rgba(196,160,106,0.12), transparent 65%); border-top: 1px solid var(--line-soft); }
.final h2 { font-size: clamp(34px, 5vw, 62px); max-width: 820px; margin: 0 auto 36px; }

.foot { text-align: center; padding: 48px 16px 120px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 14px; }
.foot img { height: 26px; width: auto; margin: 0 auto 18px; opacity: 0.8; }
.foot a { color: var(--ink); }

.sticky { display: none; }

/* --- Мобилни ----------------------------------------------------- */
@media (max-width: 860px) {
  .how { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { padding: 18px 16px; }
  .top__logo { height: 24px; }
  .hero { min-height: 88svh; padding: 110px 16px 48px; }
  .hero .btn { width: 100%; }
  .hero__facts { gap: 12px 24px; }
  .hero__facts li { flex: 1 1 28%; }
  .hero__facts b { font-size: 24px; }
  .calc { border-radius: 18px; padding: 22px 18px; }
  .cards--3, .cards--2 { grid-template-columns: 1fr; }
  .cards--3:not(.cards--tall) .card { flex-direction: row; align-items: center; gap: 12px; padding: 18px; }
  .cards--3:not(.cards--tall) .card .card__ico { margin: 0; width: 28px; }
  .cards--3:not(.cards--tall) .card small { margin-left: auto; text-align: right; }
  .fields, .checks { grid-template-columns: 1fr; }
  .calc__nav { position: sticky; bottom: 0; margin: 30px -18px -22px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: var(--bg-2); border-radius: 0 0 18px 18px; }
  .calc__nav .btn { flex: 1; padding: 0 18px; }
  .calc__nav [data-back] { flex: 0 0 auto; }
  .result__meta { grid-template-columns: 1fr; }
  .result__table td:nth-child(2), .result__table th:nth-child(2) { display: none; }
  .result__cta .btn { width: 100%; }
  .block { padding: 70px 16px; }
  .block h2 { margin-bottom: 32px; }
  .how { grid-template-columns: 1fr; gap: 22px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gallery figcaption { font-size: 11px; left: 8px; bottom: 8px; }
  .sticky {
    display: flex; align-items: center; justify-content: center;
    position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 50;
    min-height: 54px; border-radius: 999px; background: var(--accent); color: #14110c; font-weight: 700;
    box-shadow: 0 14px 40px rgba(0,0,0,0.5);
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }
  .sticky.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* --- Мобилни корекции (2026-11-10) ------------------------------- */
@media (max-width: 640px) {
  .top__phone { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid rgba(196,160,106,0.55); border-radius: 999px; font-size: 13px; background: rgba(15,14,12,0.45); backdrop-filter: blur(6px); }
  .step h3 { font-size: 27px; margin-bottom: 18px; }
  .step h4 { margin: 22px 0 10px; }
  .cards { gap: 8px; }
  .cards--3:not(.cards--tall) .card, .cards--2 .card { padding: 14px 16px; min-height: 52px; }
  .cards--3:not(.cards--tall) .card small { font-size: 13px; }
  .card b { font-size: 16px; }
  .cards--tall .card { padding: 18px 18px; }
  .calc__head { margin-bottom: 22px; }
  .result__range { font-size: clamp(28px, 8.2vw, 38px); white-space: nowrap; }
  .calc__nav .btn { font-size: 15px; white-space: nowrap; }
  .foot a { display: inline-block; padding: 8px 2px; }
}

.result__sent { margin: -12px 0 26px; padding: 12px 16px; border-radius: 10px; background: rgba(196,160,106,0.1); color: var(--ink); font-size: 14px; line-height: 1.5; }
.result__sent b { color: var(--accent); font-weight: 600; word-break: break-all; }
