/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --bg: #F5F4EF;
  --surface: #FFFFFF;
  --surface-2: #FAF9F6;
  --ink: #14161A;
  --ink-2: #454A52;
  --muted: #6B7079;
  --line: #E4E1D8;
  --line-strong: #CFCBC0;

  --accent: #FFB020;          /* CTA: янтарний — «енергія», читається темним текстом */
  --accent-hover: #F5A000;
  --accent-ink: #14161A;

  --save: #0A7F55;            /* економія */
  --save-bg: #E7F4EC;
  --hot-bg: #FFF1DD;
  --hot-ink: #8A4B00;
  --error: #C0341D;
  --error-bg: #FDECE8;
  --focus: #1A56DB;

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(20, 22, 26, .04), 0 12px 32px -12px rgba(20, 22, 26, .16);

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1120px;
  --gutter: 16px;
  --header-h: 60px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 72px; }
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: 800px; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 244, 239, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgba(20, 22, 26, .06);
}
.site-header__row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  color: var(--ink);
}
.brand__mark { color: var(--ink); flex: none; }
.brand__name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
  transition: border-color .2s var(--ease);
}
.header-phone:hover { border-color: var(--ink); }
@media (max-width: 380px) {
  .header-phone { padding: 0 12px; font-size: 14px; }
  .brand__name { font-size: 15px; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: 16px 0 40px; }

.hero__grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 960px) {
  .hero { padding: 64px 0 96px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
    gap: 64px;
    align-items: center;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.hero__title {
  margin-top: 12px;
  font-size: clamp(28px, 8vw, 56px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34ch;
}
@media (min-width: 960px) {
  .hero__title { margin-top: 20px; }
  .hero__sub { margin-top: 20px; font-size: 20px; max-width: 30ch; }
}

/* =========================================================
   Card / Funnel
   ========================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.funnel {
  padding: 20px 18px 18px;
  outline: none;
  scroll-margin-top: calc(var(--header-h) + 8px);
}
@media (min-width: 768px) { .funnel { padding: 32px; } }

.step.is-active { animation: step-in .32s var(--ease) both; }
@keyframes step-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.step__question {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.step__title {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.02em;
  outline: none;
  text-wrap: balance;
}
.step__title--sm { font-size: 20px; }
@media (min-width: 768px) {
  .step__title { font-size: 26px; }
  .step__title--sm { font-size: 22px; }
}
.step__sub { margin-top: 4px; color: var(--muted); font-size: 15px; font-weight: 600; }
.step__text { margin-top: 12px; color: var(--ink-2); font-size: 15px; }
.step__text a { font-weight: 700; }

/* --- Bill input --- */
.bill-field {
  position: relative;
  margin-top: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.bill-field:focus-within { border-color: var(--ink); background: var(--surface); }
.bill-field.is-invalid { border-color: var(--error); }
.bill-field__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.bill-field__unit { flex: none; font-size: 17px; font-weight: 700; color: var(--muted); }

/* --- Range --- */
.range {
  --fill: 38%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 14px 0 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
.range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--ink) 0 var(--fill), var(--line) var(--fill) 100%);
}
.range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line); }
.range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--ink); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong), 0 2px 6px rgba(0, 0, 0, .2);
}
.range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong), 0 2px 6px rgba(0, 0, 0, .2);
}
.range:focus-visible { outline-offset: 4px; }

.range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hint { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* --- Buttons --- */
.btn {
  position: relative;
  display: inline-block;
  min-height: 56px;
  padding: 16px 20px;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
  border: 0;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.985); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 16px -6px rgba(245, 160, 0, .7);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--light { background: var(--surface); color: var(--ink); }
.btn--light:hover { background: #fff7e6; }
.btn--block { width: 100%; margin-top: 16px; }
.btn[disabled] { cursor: progress; }

.btn__spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(20, 22, 26, .25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn__label { visibility: hidden; }
.btn.is-loading .btn__spinner { display: block; position: absolute; left: 50%; top: 50%; margin: -10px 0 0 -10px; }
.btn [aria-hidden="true"] { white-space: nowrap; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-link {
  display: block;
  margin: 10px auto 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link:hover { color: var(--ink); }

.disclaimer {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.disclaimer--center { text-align: center; }

/* --- Result --- */
.hot-badge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--hot-bg);
  color: var(--hot-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}
.result-now {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line-strong);
}
.result-now__label, .result-saving__label { font-size: 14px; font-weight: 600; color: var(--muted); }
.result-now__value {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.result-saving {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--save-bg);
}
.result-saving__label { color: #2F6B52; }
.result-saving__value {
  margin-top: 2px;
  font-size: clamp(44px, 14vw, 60px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--save);
  font-variant-numeric: tabular-nums;
}
.result-saving__period { margin-top: 4px; font-size: 16px; font-weight: 800; color: var(--save); }
.result-copy { margin-top: 14px; font-size: 16px; font-weight: 700; line-height: 1.4; }
.result-note { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.result-meta { margin-top: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* --- Quiz --- */
.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress__bar {
  display: block;
  height: 100%;
  width: 33.33%;
  background: var(--ink);
  border-radius: inherit;
  transition: width .35s var(--ease);
}
.progress__label {
  margin: 8px 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.quiz-q { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; }
.quiz-q legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.options { display: grid; gap: 8px; }
.option { position: relative; display: block; }
.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.option span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.option span::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  transition: border .15s var(--ease);
}
@media (hover: hover) { .option span:hover { border-color: var(--line-strong); background: var(--surface); } }
.option input:checked + span { border-color: var(--ink); background: var(--surface); }
.option input:checked + span::before { border: 6px solid var(--ink); }
.option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --- Contact form --- */
.contact-saving {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--save-bg);
  font-size: 15px;
  line-height: 1.45;
}
.contact-saving strong { color: var(--save); font-weight: 800; white-space: nowrap; }

.field { margin-top: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.field input {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 17px;              /* ≥16px — iOS не зумить при фокусі */
  font-weight: 600;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.field input[aria-invalid="true"] { border-color: var(--error); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}
.consent input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.consent label { cursor: pointer; }
.consent a { font-weight: 700; }

.field-error { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--error); }
.form-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--error-bg);
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
}
.form-error a { font-weight: 800; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Success --- */
.step--success { text-align: center; padding: 8px 0; }
.success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--save-bg);
  color: var(--save);
}

/* =========================================================
   Sections
   ========================================================= */
.section { padding: 56px 0; }
.section--tight { padding: 8px 0 32px; }
@media (min-width: 960px) { .section { padding: 96px 0; } }

.section__title {
  font-size: clamp(26px, 6.5vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.section__lead {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  max-width: 62ch;
  font-size: 16px;
  color: var(--ink-2);
}
@media (min-width: 768px) { .section__lead { font-size: 18px; } }

.steps-grid {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; } }
.step-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
@media (min-width: 768px) { .step-card { padding: 28px; } }
.step-card__num {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.step-card__title { margin-top: 10px; font-size: 19px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.step-card p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }

/* --- Trust --- */
.trust {
  display: grid;
  gap: 14px;
  padding: 28px 22px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #fff;
}
@media (min-width: 768px) {
  .trust { padding: 48px; grid-template-columns: 1fr auto; column-gap: 48px; align-items: center; }
  .trust__title, .trust__text { grid-column: 1; }
  .trust .btn { grid-column: 2; grid-row: 1 / span 2; }
}
.trust__title { font-size: clamp(22px, 5.6vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.trust__text { color: rgba(255, 255, 255, .78); font-size: 16px; max-width: 56ch; }
.trust .btn { justify-self: start; }

/* --- Cases --- */
.cases-grid { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 768px) { .cases-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.case-card { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.case-card__tag { font-size: 13px; font-weight: 700; color: var(--muted); }
.case-card__title { margin-top: 8px; font-size: 18px; font-weight: 800; }
.case-card__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 0; }
.case-card__stats dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.case-card__stats dd { margin: 0; font-size: 20px; font-weight: 800; }
.case-card__text { margin-top: 12px; font-size: 14px; color: var(--ink-2); }

/* --- FAQ --- */
.faq { margin-top: 24px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  position: relative;
  display: block;
  padding: 18px 44px 18px 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.01em;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat,
    var(--surface);
  border: 1px solid var(--line);
  transition: transform .25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item__body { padding: 0 0 18px; color: var(--ink-2); font-size: 15px; }
.faq-item__body p + p, .faq-item__body ul + p { margin-top: 10px; }
.faq-item__body ul { margin: 8px 0 0; padding-left: 20px; }
.faq-item__body li + li { margin-top: 4px; }

/* --- Final CTA --- */
.final-cta { text-align: center; padding-bottom: 72px; }
.final-cta__inner { display: grid; justify-items: center; gap: 14px; }
.final-cta__title {
  font-size: clamp(28px, 7.5vw, 48px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.final-cta__text { font-size: 17px; color: var(--ink-2); }
.final-cta .btn { margin-top: 6px; width: 100%; max-width: 360px; }

/* --- Footer --- */
.site-footer {
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.site-footer__row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--ink-2); }

.noscript {
  position: fixed;
  inset: auto 0 0 0;
  padding: 14px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  z-index: 50;
}

/* =========================================================
   Privacy page
   ========================================================= */
.legal { padding: 32px 0 64px; }
.legal h1 { font-size: clamp(26px, 6vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.legal h2 { margin-top: 32px; font-size: 20px; font-weight: 800; }
.legal p, .legal li { color: var(--ink-2); }
.legal p { margin-top: 12px; }
.legal ul { padding-left: 20px; }
.legal .placeholder { background: var(--hot-bg); padding: 0 4px; border-radius: 4px; }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
