* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f3f5ef;
  --panel: #ffffff;
  --panel-muted: rgba(255, 255, 255, 0.76);
  --text: #122010;
  --muted: #5c6758;
  --line: rgba(18, 32, 16, 0.1);
  --accent: #8fb13a;
  --accent-dark: #6f8d25;
  --accent-soft: rgba(143, 177, 58, 0.14);
  --shadow: 0 24px 60px rgba(17, 28, 15, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(143, 177, 58, 0.18), transparent 28%),
    linear-gradient(180deg, #f7f8f3 0%, #eef1e7 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.calculatorHero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(92deg, rgba(8, 11, 15, 0.92) 0%, rgba(8, 11, 15, 0.76) 40%, rgba(8, 11, 15, 0.34) 100%),
    url("/hero-bg.png") center/cover;
}

.heroOverlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at right bottom, rgba(143, 177, 58, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(8, 11, 15, 0.05), rgba(8, 11, 15, 0.55));
}

.heroInner,
.shellInner {
  width: min(100%, 1320px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.heroInner {
  padding: 24px 18px 44px;
}

.backLink {
  width: fit-content;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
}

.heroGrid {
  margin-top: 20px;
  display: grid;
  gap: 22px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heroCopy h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.04;
}

.heroLead {
  margin: 18px 0 0;
  max-width: 700px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.84);
}

.heroFacts {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
}

.heroFacts li {
  min-height: 48px;
  padding: 0 0 0 18px;
  position: relative;
  display: flex;
  align-items: center;
  border-left: 2px solid rgba(143, 177, 58, 0.72);
}

.heroPreview {
  min-width: 0;
}

.previewStage {
  min-height: 420px;
  padding: 18px;
  position: relative;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #0e1411;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: background-image 220ms ease, transform 220ms ease, opacity 220ms ease;
}

.previewStage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(8, 12, 15, 0.56) 0%, rgba(8, 12, 15, 0.28) 34%, rgba(8, 12, 15, 0.72) 100%),
    linear-gradient(120deg, rgba(7, 10, 11, 0.4) 0%, rgba(7, 10, 11, 0.08) 50%, rgba(7, 10, 11, 0.52) 100%);
  pointer-events: none;
}

.previewMeta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.previewMeta span,
.previewMeta strong {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.previewCard {
  max-width: 470px;
  padding: 22px;
  border-radius: 8px;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 18, 31, 0.96), rgba(13, 30, 56, 0.94));
  backdrop-filter: none;
}

.previewCard p,
.previewCard small {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.previewCard h2 {
  margin: 8px 0 12px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.08;
}

.stage-home-1 {
  background-image: linear-gradient(rgba(10, 14, 15, 0.18), rgba(10, 14, 15, 0.18)), url("/hero-bg.png");
}

.stage-home-15 {
  background-image: linear-gradient(rgba(10, 14, 15, 0.16), rgba(10, 14, 15, 0.16)), url("/preview.png");
}

.stage-home-2 {
  background-image: linear-gradient(rgba(10, 14, 15, 0.2), rgba(10, 14, 15, 0.2)), url("/десктоп.png");
}

.stage-dacha-1,
.stage-dacha-15,
.stage-dacha-2 {
  background-image: linear-gradient(rgba(18, 20, 14, 0.24), rgba(18, 20, 14, 0.24)), url("/preview-mobile.png");
}

.stage-bath-1,
.stage-bath-15,
.stage-bath-2 {
  background-image: linear-gradient(rgba(18, 14, 9, 0.26), rgba(18, 14, 9, 0.26)), url("/Дестоп.jpg");
}

.calculatorShell {
  padding: 24px 18px 72px;
}

.shellInner {
  display: grid;
  gap: 20px;
}

.progressPanel,
.stepper {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.progressPanel {
  padding: 22px 18px;
}

.progressHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.progressHeader strong {
  font-size: 18px;
}

.progressBar {
  height: 10px;
  margin-top: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(18, 32, 16, 0.08);
}

.progressBar span {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #b7d461);
  transition: width 220ms ease;
}

.progressSteps {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.progressSteps li {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.progressSteps li.is-active {
  color: var(--text);
  font-weight: 700;
  background: var(--accent-soft);
  transform: translateX(4px);
}

.summaryCard {
  margin-top: 22px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 27, 17, 0.98), rgba(23, 35, 22, 0.9));
  color: #fff;
}

.summaryLabel {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.summaryCard strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.1;
}

.summaryCard span {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.8);
}

.summaryTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.summaryTags span {
  min-height: 34px;
  padding: 0 12px;
  margin: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
}

.summaryHint {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.76);
}

.stepper {
  padding: 22px 18px 18px;
}

.step {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.step.is-active {
  opacity: 1;
  transform: translateY(0);
}

.stepHead h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.fieldBlock {
  margin-top: 24px;
}

.fieldTitle {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
}

.choiceGrid {
  display: grid;
  gap: 12px;
}

.choiceCard {
  min-height: 126px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.choiceCard.is-selected {
  border-color: rgba(143, 177, 58, 0.85);
  background: linear-gradient(180deg, rgba(143, 177, 58, 0.08), rgba(143, 177, 58, 0.18));
  box-shadow: 0 18px 40px rgba(115, 147, 41, 0.14);
  transform: translateY(-2px);
}

.choiceCard strong,
.choiceCard small {
  text-align: left;
}

.choiceIcon {
  min-width: 64px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 32, 16, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.rangePanel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-dark);
}

.rangeMeta {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.numberInput,
.textField {
  display: grid;
  gap: 10px;
}

.numberInput span,
.textField span {
  font-size: 14px;
  font-weight: 700;
}

.numberInput input,
.textField input {
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(18, 32, 16, 0.14);
  border-radius: 8px;
  background: #fff;
}

.rangeTicks {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.rangeTicks strong {
  color: var(--text);
  font-size: 22px;
}

.stackOptions {
  display: grid;
  gap: 10px;
}

.optionRow {
  min-height: 64px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.optionRow input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-dark);
}

.optionRow strong {
  font-size: 14px;
}

.optionRow.is-selected {
  border-color: rgba(143, 177, 58, 0.85);
  box-shadow: 0 14px 30px rgba(115, 147, 41, 0.12);
  transform: translateY(-1px);
}

.splitFields {
  display: grid;
  gap: 18px;
}

.miniRange {
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(143, 177, 58, 0.08);
}

.miniRange label {
  display: grid;
  gap: 10px;
}

.miniRange span {
  font-size: 14px;
  font-weight: 700;
}

.miniRange strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
}

.resultPanel,
.leadCard,
.deliveryCard {
  border-radius: 8px;
}

.resultPanel {
  margin-top: 24px;
  padding: 20px;
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.resultPrice p,
.resultPrice span {
  margin: 0;
}

.resultPrice strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.08;
}

.resultPrice span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.resultSummary {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.leadCard {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f5f7ef);
}

.leadIntro h3 {
  margin: 0;
  font-size: 24px;
}

.leadIntro p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.leadFields {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.leadActions {
  margin-top: 20px;
}

.consentRow {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--muted);
  line-height: 1.5;
}

.consentRow input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent-dark);
}

.primaryButton,
.ghostButton,
.deliveryLink {
  min-height: 56px;
  padding: 0 20px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.primaryButton,
.primaryLink {
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, #9fbd42, #739329);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.ghostButton,
.deliveryLink {
  border: 1px solid rgba(18, 32, 16, 0.14);
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
}

.formMessage {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
}

.deliveryCard {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(143, 177, 58, 0.22);
  background: rgba(143, 177, 58, 0.08);
}

.deliveryCard.is-success {
  background: linear-gradient(180deg, rgba(143, 177, 58, 0.16), rgba(143, 177, 58, 0.08));
}

.deliveryPrice span {
  display: block;
  color: var(--muted);
}

.deliveryPrice strong {
  display: block;
  margin-top: 6px;
  font-size: 34px;
  line-height: 1.1;
}

.deliveryLinks {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.deliveryHint {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.stepActions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.navButton {
  width: 100%;
}

.fieldError {
  border-color: #c74b4b !important;
  box-shadow: 0 0 0 3px rgba(199, 75, 75, 0.12);
}

@media (min-width: 900px) {
  .heroInner {
    padding: 28px 34px 56px;
  }

  .heroGrid {
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
    align-items: end;
  }

  .calculatorShell {
    padding: 28px 34px 86px;
  }

  .shellInner {
    grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
    align-items: start;
  }

  .progressPanel {
    position: sticky;
    top: 20px;
  }

  .choiceGrid3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .splitFields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rangeMeta {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: end;
  }

  .leadFields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .deliveryLinks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stepActions {
    justify-content: flex-end;
  }

  .navButton {
    width: auto;
    min-width: 160px;
  }
}
