/* ===== Base ===== */
:root {
  --graphite: #1c1c1e;
  --graphite-2: #2a2a2e;
  --graphite-soft: #3a3a40;
  --light: #f4f4f2;
  --light-2: #eaeae6;
  --white: #ffffff;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --orange: #ff6b00;
  --orange-dark: #e66000;
  --border: #dedede;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.accent { color: var(--orange); }

.section { padding: 72px 0; }
.section--alt { background: var(--graphite); color: var(--white); }
.section--alt .accent { color: var(--orange); }

.section__title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.section__lead {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 36px;
}
.section--alt .section__lead { color: #bdbdc4; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  border: 2px solid var(--graphite);
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}
.btn:hover { background: var(--graphite); color: #fff; }
.btn--accent {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.btn--accent:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn--full { width: 100%; }

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section--alt .card,
.form, .calc, .thanks { color: var(--text); }

/* ===== Hero ===== */
.hero { background: var(--graphite); color: var(--white); padding: 64px 0 80px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
.hero__badge {
  display: inline-block;
  background: rgba(255,107,0,.16);
  color: var(--orange);
  border: 1px solid rgba(255,107,0,.4);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero__title {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin-bottom: 18px;
}
.hero__subtitle {
  font-size: 18px;
  color: #cfcfd4;
  margin-bottom: 26px;
  max-width: 44ch;
}
.hero__features { list-style: none; margin-bottom: 32px; display: grid; gap: 10px; }
.hero__features li { position: relative; padding-left: 26px; font-size: 16px; }
.hero__features li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--orange); font-weight: 800;
}
.hero__stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat__num { font-size: 28px; font-weight: 800; color: var(--orange); }
.stat__label { font-size: 14px; color: #cfcfd4; }

/* ===== Calc ===== */
.calc { padding: 28px; }
.calc__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.calc__title { font-size: 22px; font-weight: 800; }
.calc__note { font-size: 13px; color: var(--muted); }
.calc__field { margin-bottom: 24px; }
.calc__label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-weight: 600; }
.calc__value { font-size: 20px; font-weight: 800; color: var(--orange); }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--light-2);
  outline: none;
  cursor: pointer;
} 
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--orange);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--orange);
  border: 3px solid #fff;
  cursor: pointer;
}
.range__hint { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }

.select {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: var(--white);
  cursor: pointer;
  color: var(--text);
}
.select:focus { border-color: var(--orange); outline: none; }

.calc__result {
  background: var(--light);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
  display: grid;
  gap: 10px;
}
.calc__result-row { display: flex; justify-content: space-between; align-items: baseline; }
.calc__result-label { font-size: 14px; color: var(--muted); }
.calc__result-num { font-size: 26px; font-weight: 800; color: var(--orange); }
.calc__result-num--small { font-size: 18px; color: var(--text); }
.calc__foot { font-size: 13px; color: var(--muted); margin-top: 12px; text-align: center; }

/* ===== Compare ===== */
.compare {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  user-select: none;
}
.compare__before,
.compare__after {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: #6d7076;
}
.compare__before { z-index: 1; }
.compare__after {
  z-index: 2;
  width: 50%;
  overflow: hidden;
}
.compare__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.compare__before .compare__img { min-width: 100%; }
.compare__divider {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px;
  background: var(--orange);
  z-index: 5;
  transform: translateX(-50%);
  cursor: ew-resize;
}
.compare__handle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: var(--white);
  color: var(--orange);
  border: 2px solid var(--orange);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: ew-resize;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.compare__tag {
  position: absolute; top: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  z-index: 6;
}
.compare__tag--before { left: 12px; background: rgba(0,0,0,.55); color: #fff; }
.compare__tag--after { right: 12px; background: var(--orange); color: #fff; }

/* ===== Cards benefits ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card { padding: 26px; transition: transform .2s ease; }
.card:hover { transform: translateY(-4px); }
.benefit__num { font-size: 38px; font-weight: 800; margin-bottom: 8px; }
.benefit__title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.benefit__text { font-size: 15px; color: var(--muted); }
.section--alt .card .benefit__text { color: #9a9aa0; }
.section--alt .benefit__title { color: var(--text); }

/* ===== Price table ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.price-table { width: 100%; border-collapse: collapse; background: var(--white); min-width: 520px; }
.price-table th, .price-table td { padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.price-table th { background: var(--graphite); color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.price-table td { font-size: 16px; }
.price-table .price { font-weight: 800; color: var(--orange); font-size: 18px; white-space: nowrap; }
.price-table tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover td { background: #faf6f2; }
.table-foot { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* ===== Works ===== */
.work-cover {
  position: relative;
  height: clamp(320px, 420px, 420px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--graphite-soft);
  margin-bottom: 22px;
}
.work-cover__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.work-cover__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%;
  box-sizing: border-box;
  color: var(--white);
  font-size: 18px;
  font-weight: 800;
  background: rgba(15,15,15,.85);
  padding: 12px 16px;
  text-align: center;
  border-radius: 0 0 var(--radius) var(--radius);
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.work-card {
  position: relative;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-2);
}
.work-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.work-card__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%;
  box-sizing: border-box;
  background: rgba(15,15,15,.85);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 16px;
  text-align: center;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; list-style: none; counter-reset: step; }
.step { position: relative; padding: 28px 20px; background: var(--graphite-2); border-radius: var(--radius); }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 800; font-size: 20px;
  margin-bottom: 16px;
}
.step__title { font-size: 17px; font-weight: 800; margin-bottom: 8px; color: #fff; }
.step__text { font-size: 14px; color: #bdbdc4; }

/* ===== Reviews ===== */
.cards--reviews { grid-template-columns: repeat(3, 1fr); }
.review__text { font-size: 16px; margin-bottom: 18px; }
.review__author { display: flex; flex-direction: column; gap: 2px; }
.review__name { font-weight: 800; }
.review__obj { font-size: 13px; color: var(--muted); }
.review__stars { color: var(--orange); margin-top: 10px; letter-spacing: 3px; }

/* ===== FAQ ===== */
.faq { display: grid; gap: 14px; max-width: 860px; margin: 0 auto; }
.faq__item {
  background: var(--graphite-2);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq__q {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  position: relative;
  transition: color .2s ease;
}
.faq__q:hover { color: var(--orange); }
.faq__q::after {
  content: "+";
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 800;
  color: var(--orange);
  transition: transform .2s ease;
}
.faq__item[open] .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__q::-webkit-details-marker { display: none; }
.faq__a {
  padding: 0 20px 18px;
  font-size: 15px;
  color: #bdbdc4;
  line-height: 1.6;
}

/* ===== Lead ===== */
.lead { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.lead__subtitle { color: #cfcfd4; font-size: 17px; margin-bottom: 24px; }
.lead__bullets { list-style: none; display: grid; gap: 10px; color: #e3e3e7; }
.lead__bullets li { position: relative; padding-left: 24px; }
.lead__bullets li::before { content: "✓"; position: absolute; left: 0; color: var(--orange); font-weight: 800; }

.form { padding: 30px; }
.form__hidden {
  background: var(--light);
  border-left: 3px solid var(--orange);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}
.form__hidden:empty { display: none; }
.form__field { display: block; margin-bottom: 18px; }
.form__label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
}
.input:focus { border-color: var(--orange); outline: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-bottom: 18px; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--orange); width: 16px; height: 16px; flex-shrink: 0; }
.form__err { color: #d33; font-size: 14px; margin-top: 12px; text-align: center; min-height: 20px; }

/* ===== Thanks ===== */
.thanks { padding: 48px 30px; text-align: center; max-width: 560px; margin: 0 auto; }
.thanks__icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.thanks__title { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.thanks__text { color: var(--muted); font-size: 16px; margin-bottom: 24px; }

/* ===== Footer ===== */
.footer { background: var(--graphite); color: #cfcfd4; padding: 38px 0; }
.footer__inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__logo { font-weight: 800; color: #fff; margin-bottom: 6px; }
.footer__copy { font-size: 14px; color: #8a8a90; }
.footer__contact { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.footer__phone { font-size: 20px; font-weight: 800; color: var(--orange); }
.footer__mail { font-size: 14px; color: #cfcfd4; }

/* ===== Float bar ===== */
.float-bar {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  background: var(--graphite);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  transform: translateY(0);
  transition: transform .3s ease, opacity .3s ease;
  max-width: 420px;
}
.float-bar[hidden] { display: none; }
.float-bar--hide { opacity: 0; pointer-events: none; }
.float-bar__price { font-size: 22px; font-weight: 800; color: var(--orange); }
.float-bar__hint { font-size: 12px; color: #bdbdc4; }
.float-bar .btn { padding: 12px 22px; font-size: 15px; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero__grid, .lead { grid-template-columns: 1fr; gap: 36px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards--reviews { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .hero { padding: 40px 0 56px; }

  /* Таблица цен -> карточки */
  .price-table { display: block; width: 100%; max-width: 100%; min-width: 0; }
  .price-table thead { display: none; }
  .price-table tbody { display: flex; flex-direction: column; gap: 12px; }
  .price-table tbody tr {
    display: flex; flex-direction: column; gap: 6px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
  }
  .price-table tbody td { border-bottom: none; padding: 0; }
  .price-table tbody td:first-child { font-size: 18px; font-weight: 800; }
  .price-table tbody td:nth-child(2) { order: -1; color: var(--orange); }
  .price-table .price { font-size: 22px; }
  .price-table tbody td:nth-child(3) { font-size: 14px; color: var(--muted); }
  .price-table tbody td:nth-child(3)::before { content: "Толщина 20 мм · "; font-weight: 600; }
  .table-wrap { overflow: visible; box-shadow: none; background: transparent; }

  /* Примеры работ -> одна колонка */
  .works-grid { grid-template-columns: 1fr; }
  .work-cover { height: 320px; }
  .work-card { height: 220px; }
  .work-cover__caption { font-size: 16px; }

  /* До/после: цельность на мобильных */
  .compare { height: 300px; }

  /* Футер: не прятать контакты под плавающей панелью */
  .footer { padding-bottom: 96px; }

  .float-bar {
    left: 0; right: 0; bottom: 0;
    max-width: none;
    border-radius: 14px 14px 0 0;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
  }
  .float-bar__left { display: flex; flex-direction: column; line-height: 1.2; }
  .float-bar__hint { display: none; }
  .float-bar .btn { white-space: nowrap; }
  body { padding-bottom: 0; }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .calc { padding: 20px; }
  .calc__head { flex-direction: column; gap: 4px; }
  .footer__contact { align-items: flex-start; }
  .footer__inner { flex-direction: column; }
}
