/* Тема: тёмная по умолчанию, светлая — по системной настройке или переключателю.
   Все цвета живут здесь; компоненты ниже используют только переменные. */
:root {
  color-scheme: dark;
  --bg: #26292b;
  --bg-2: #2e3234;
  --surface: #363b3d;
  --line: rgba(255, 255, 255, 0.09);
  --text: #ecebe6;
  --muted: #a3aba5;

  --accent: #e0893f;
  --accent-2: #f2a764;
  --on-accent: #17100a;

  --green: #7cb894;
  --green-2: #a4d5b6;
  --green-deep: #15332a;
  --on-green: #f2f7f3;
  --green-bright: #9ed3b2; /* только поверх тёмно-зелёного, в обеих темах одинаковый */

  --gold: #d7b46a;          /* деньги, гарантия, статус */
  --gold-2: #efd49a;
  --gold-line: rgba(215, 180, 106, 0.45);
  --on-gold: #241a06;
  --gold-bright: #efd49a; /* поверх тёмных подложек, в обеих темах одинаковый */
  --green-on-card: #2f6b4a; /* поверх белых карточек и светлых полос, в обеих темах одинаковый */
  --accent-on-photo: #f2a764; /* акцент поверх фотографий, в обеих темах одинаковый */

  --card-bg: #ffffff;
  --card-text: #1a1f1c;
  --card-line: #e2ddd3;
  --card-muted: #5c6660;
  --band-bg: #f3efe8;

  --hit-bg: #15332a;
  --hit-text: #f2f7f3;
  --hit-muted: #b3c7bb;

  --header-bg: rgba(38, 41, 43, 0.88);
  --nav-open-bg: rgba(38, 41, 43, 0.97);
  --nav-link: #d9dcda;
  --burger: #ffffff;

  --chip-line: rgba(255, 255, 255, 0.18);
  --field-bg: rgba(0, 0, 0, 0.25);
  --field-line: rgba(255, 255, 255, 0.16);
  --spec-bg: rgba(255, 255, 255, 0.06);

  --plan-wall: #41474a;
  --plan-room-main: #3a4043;
  --plan-stroke: rgba(255, 255, 255, 0.25);

  --error-text: #ff8a80;
  --ok-text: #8bd49a;
  --danger: #e2574c;

  /* Поверх фотографий текст всегда светлый — в обеих темах */
  --hero-text: #e8e6e1;
  --on-photo: #f4f2ee;
  --stat-bg: rgba(38, 41, 43, 0.62);
  --photo-overlay: rgba(10, 12, 11, 0.82);
  --ghost-line: rgba(255, 255, 255, 0.35);
  --ghost-bg: rgba(0, 0, 0, 0.2);

  --radius: 18px;
  --container: 1200px;
  --font-head: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, system-ui, sans-serif;
}

/* Светлая тема: системная настройка, если пользователь не выбрал тему сам */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f4ef;
    --bg-2: #e9efe8;
    --surface: #ffffff;
    --line: rgba(24, 40, 30, 0.13);
    --text: #182019;
    --muted: #5a655d;

    --accent: #b8600f;
    --accent-2: #a4551a;

    --green: #2f6b4a;
    --green-2: #24563b;

    --card-bg: #ffffff;
    --card-text: #182019;
    --card-line: #dfe3dc;
    --card-muted: #5a655d;
    --band-bg: #e8f0e9;

    --nav-open-bg: rgba(246, 244, 239, 0.98);
    --header-bg: rgba(246, 244, 239, 0.9);
    --nav-link: #2b332d;
    --burger: #182019;

    --chip-line: rgba(24, 40, 30, 0.22);
    --field-bg: #ffffff;
    --field-line: rgba(24, 40, 30, 0.2);
    --spec-bg: rgba(24, 40, 30, 0.06);

    --plan-wall: #dfe6df;
    --plan-room-main: #eef3ec;
    --plan-stroke: rgba(24, 40, 30, 0.22);

    --error-text: #b3261e;
    --ok-text: #2f6b4a;
    --gold: #9a7526;
    --gold-2: #7d5d17;
    --gold-line: rgba(154, 117, 38, 0.4);
  }
}

/* Светлая тема выбрана переключателем */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ef;
  --bg-2: #e9efe8;
  --surface: #ffffff;
  --line: rgba(24, 40, 30, 0.13);
  --text: #182019;
  --muted: #5a655d;

  --accent: #b8600f;
  --accent-2: #a4551a;

  --green: #2f6b4a;
  --green-2: #24563b;

  --card-bg: #ffffff;
  --card-text: #182019;
  --card-line: #dfe3dc;
  --card-muted: #5a655d;
  --band-bg: #e8f0e9;

  --nav-open-bg: rgba(246, 244, 239, 0.98);
  --header-bg: rgba(246, 244, 239, 0.9);
  --nav-link: #2b332d;
  --burger: #182019;

  --chip-line: rgba(24, 40, 30, 0.22);
  --field-bg: #ffffff;
  --field-line: rgba(24, 40, 30, 0.2);
  --spec-bg: rgba(24, 40, 30, 0.06);

  --plan-wall: #dfe6df;
  --plan-room-main: #eef3ec;
  --plan-stroke: rgba(24, 40, 30, 0.22);

  --error-text: #b3261e;
  --ok-text: #2f6b4a;
  --gold: #9a7526;
  --gold-2: #7d5d17;
  --gold-line: rgba(154, 117, 38, 0.4);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: 20px; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section { padding: clamp(70px, 10vw, 120px) 0; }
.section--alt { background: var(--bg-2); }
.section--light { background: var(--band-bg); color: var(--card-text); }
.section--light .lead { color: var(--card-muted); }

.section-head {
  max-width: 760px;
  margin-bottom: 48px;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  margin: 16px 0 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 16px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { border-color: var(--ghost-line); color: var(--on-photo); background: var(--ghost-bg); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--on-photo); }
.btn--block { width: 100%; }

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-color: var(--line);
}
.header__inner {
  --container: 1440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}
.logo {
  flex: 0 0 auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}
.logo__mark {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}
.nav { flex: 0 0 auto; display: flex; gap: clamp(14px, 1.6vw, 24px); }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--nav-link); white-space: nowrap; }
.nav a:hover { color: var(--accent-2); }
.header__contact { flex: 0 0 auto; display: flex; align-items: center; gap: 18px; }
.header__phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.header__contact .btn { padding: 12px 20px; font-size: 14px; white-space: nowrap; }
.burger { display: none; background: none; border: 0; color: var(--burger); font-size: 28px; cursor: pointer; }

/* Hero */
.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex;
  align-items: flex-end;
  padding: 140px 0 60px;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("/img/hero.jpg") center / cover no-repeat;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 11, 12, 0.55) 0%, rgba(10, 11, 12, 0.1) 35%, rgba(10, 11, 12, 0.85) 100%),
    linear-gradient(90deg, rgba(10, 11, 12, 0.7) 0%, rgba(10, 11, 12, 0) 60%);
}
.hero h1 {
  font-size: clamp(30px, 6vw, 76px);
  line-height: 1.2;
  max-width: 900px;
  overflow-wrap: break-word;
  hyphens: manual;
}
.hero { color: var(--on-photo); }
.hero h1 span { color: var(--accent-2); }
.hero__sub {
  max-width: 620px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--hero-text);
  margin: 22px 0 34px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 64px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.stat { background: var(--stat-bg); padding: 22px 24px; }
.stat b { display: block; font-family: var(--font-head); font-size: clamp(22px, 3vw, 34px); color: var(--on-photo); }
.stat span { color: #c2c7c3; font-size: 14px; }

/* Advantages */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.adv {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.adv__num { font-family: var(--font-head); color: var(--green); font-size: 14px; }
.adv h3 { margin: 18px 0 10px; }
.adv p { margin: 0; color: var(--muted); font-size: 16px; }

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Plan */
.plan { margin: 0; overflow-x: auto; }
.plan svg { width: 100%; min-width: 640px; height: auto; display: block; }
.plan__wall { fill: var(--plan-wall); stroke: var(--accent); stroke-width: 3; }
.plan__room { fill: var(--surface); stroke: var(--plan-stroke); stroke-width: 2; }
.plan__room--main { fill: var(--plan-room-main); }
.plan__opening { fill: var(--green); }
.plan__name { fill: var(--text); font: 600 26px var(--font-body); text-anchor: middle; }
.plan__area { fill: var(--accent-2); font: 700 30px var(--font-head); text-anchor: middle; }
.plan figcaption { margin-top: 16px; color: var(--muted); font-size: 15px; }

/* Banner */
.banner { aspect-ratio: 21 / 8; overflow: hidden; background: var(--bg-2); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.project {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.project__img { aspect-ratio: 4 / 3; overflow: hidden; }
.project__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.project:hover .project__img img { transform: scale(1.04); }
.project:hover .project__img--poster img { transform: none; }
.project__body { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.project__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.project__tag { font-size: 13px; color: var(--muted); }
.project__specs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.project__specs li { padding: 6px 12px; border-radius: 999px; background: var(--spec-bg); font-size: 14px; }
.project__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 8px; }
.price { font-family: var(--font-head); font-size: 24px; }
.price small { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-weight: 500; }
.project .btn { padding: 12px 20px; font-size: 14px; }

/* Packages */
.packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.package {
  padding: 34px 30px;
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--card-text);
  border: 1px solid var(--card-line);
  display: flex;
  flex-direction: column;
}
.package--hit { background: var(--hit-bg); color: var(--hit-text); border-color: var(--hit-bg); position: relative; }
.package--hit .package__note { color: var(--hit-muted); }
.package__badge {
  position: absolute;
  top: -13px;
  left: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.package__note { color: var(--card-muted); font-size: 15px; margin: 8px 0 22px; }
.package ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; font-size: 16px; }
.package li { padding-left: 26px; position: relative; }
.package li::before { content: "✓"; position: absolute; left: 0; color: var(--green-on-card); font-weight: 800; }
.package__price { margin-top: auto; font-family: var(--font-head); font-size: 22px; margin-bottom: 18px; }

/* Included / transparency */
.included { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center; }
.included__list { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.included__row { display: flex; justify-content: space-between; gap: 20px; padding: 18px 24px; background: var(--surface); }
.included__row span:last-child { color: var(--green); font-weight: 700; white-space: nowrap; }
.included__img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.included__img img { width: 100%; height: 100%; object-fit: cover; }

/* Production */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split__img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.split__img img { width: 100%; height: 100%; object-fit: cover; }
.checklist { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 14px; }
.checklist li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 9px;
  border-radius: 2px;
  background: var(--green);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(200px, 1fr));
  gap: 16px;
}
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; }
.gallery figure:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--stat-bg);
  color: var(--on-photo);
  backdrop-filter: blur(6px);
  font-size: 14px;
  font-weight: 600;
}

/* Business */
.business {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: clamp(28px, 5vw, 60px);
  isolation: isolate;
}
.business > .responsive-picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.business::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(10, 11, 12, 0.92) 0%, rgba(10, 11, 12, 0.2) 70%);
}
.business { color: var(--on-photo); }
.business__content { max-width: 720px; }
.business__tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 28px; padding: 0; list-style: none; }
.business__tags li { padding: 8px 16px; border: 1px solid var(--ghost-line); border-radius: 999px; font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 26px 22px; border-top: 2px solid var(--green); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }
.step__day { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.step h3 { font-size: 17px; margin: 12px 0 8px; }
.step p { margin: 0; font-size: 15px; color: var(--muted); }

/* Calculator */
.calc { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.calc__form, .calc__result {
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.calc__group { border: 0; padding: 0; margin: 0 0 28px; }
.calc__group legend { font-weight: 700; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--chip-line);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.chip input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.range { width: 100%; accent-color: var(--accent); }
.range-value { color: var(--accent-2); font-weight: 700; }
.calc__result { position: sticky; top: 96px; align-self: start; }
.calc__total { font-family: var(--font-head); font-size: clamp(32px, 4vw, 44px); margin: 6px 0 4px; }
.calc__breakdown { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; font-size: 15px; }
.calc__breakdown li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.calc__breakdown li b { color: var(--text); font-weight: 600; white-space: nowrap; }
.field { display: block; margin-bottom: 12px; }
.field input {
  width: 100%;
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid var(--field-line);
  background: var(--field-bg);
  color: var(--text);
  font: 500 16px var(--font-body);
}
.field input:focus { outline: none; border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.form-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.form-status { margin: 12px 0 0; font-weight: 600; min-height: 1.4em; }
.form-status.is-error { color: var(--error-text); }
.form-status.is-ok { color: var(--ok-text); }

/* Guarantee */
.guarantee { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guarantee__big {
  grid-row: span 2;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--green-deep);
  color: var(--on-green);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.guarantee__big b { font-family: var(--font-head); font-size: clamp(52px, 5.6vw, 84px); line-height: 1; white-space: nowrap; }
.guarantee__item { padding: 28px; border-radius: var(--radius); background: var(--card-bg); color: var(--card-text); border: 1px solid var(--card-line); }
.guarantee__item h3 { font-size: 17px; margin-bottom: 8px; }
.guarantee__item p { margin: 0; color: var(--card-muted); font-size: 15px; }

/* FAQ */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 40px 24px 0;
  font-weight: 700;
  font-size: 18px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 18px;
  font-size: 28px;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 24px; color: var(--muted); }

/* Contacts / footer */
.contacts { position: relative; isolation: isolate; overflow: hidden; }
.contacts > .responsive-picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.contacts::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--photo-overlay); }
.contacts { color: var(--on-photo); }
.contacts .contact-list small { color: #b9beba; }
.contacts__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.contact-list small { display: block; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
.contact-list a, .contact-list span { font-size: 20px; font-weight: 700; text-decoration: none; }
.footer { padding: 30px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer__logo { flex: 0 0 auto; line-height: 0; }
.footer__logo img { width: 120px; height: 120px; border-radius: 14px; }

/* Scenarios & reviews */
.adv-grid--2 { grid-template-columns: repeat(2, 1fr); }
.scenario { display: flex; flex-direction: column; }
.scenario h3 { margin: 14px 0 10px; }
.scenario__list { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; font-size: 16px; }
.scenario__list li { position: relative; padding-left: 22px; }
.scenario__list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.scenario__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.scenario__price { font-weight: 700; color: var(--accent-2); }
.reviews-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.reviews-note { margin: 22px 0 0; color: var(--muted); font-size: 16px; }
.reviews-note a { color: var(--accent-2); }
@media (max-width: 600px) { .adv-grid--2 { grid-template-columns: 1fr; } }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
/* Средние экраны: меню в строку не помещается вместе с телефоном — телефон есть в контактах */
@media (max-width: 1560px) {
  .header__phone { display: none; }
}

@media (max-width: 1280px) {
  .nav, .header__phone { display: none; }
  .burger { display: block; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    padding: 24px 20px;
    background: var(--nav-open-bg);
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .adv-grid, .packages, .guarantee { grid-template-columns: 1fr 1fr; }
  .guarantee__big { grid-row: auto; grid-column: span 2; }
}

@media (max-width: 820px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .projects, .split, .included, .calc, .contacts__grid { grid-template-columns: 1fr; }
  .banner { aspect-ratio: 16 / 9; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: none; }
  .gallery figure { aspect-ratio: 4 / 3; }
  .gallery figure:first-child { grid-row: auto; }
  .calc__result { position: static; }
}

@media (max-width: 600px) {
  .logo { font-size: 18px; }
  .logo__mark { width: 56px; height: 56px; }
  .header__inner { gap: 12px; }
  .header__contact { gap: 10px; }
  body { font-size: 16px; }
  h2 { font-size: 26px; }
  .hero h1 { font-size: 29px; hyphens: auto; }
  .header__contact .btn { display: none; }
  .adv-grid, .packages, .guarantee, .steps { grid-template-columns: 1fr; }
  .guarantee__big { grid-column: auto; }
  .project__foot { flex-direction: column; align-items: flex-start; }
}

/* Переключатель темы */
.theme-toggle {
  flex: none;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--chip-line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--green); color: var(--green); }
.theme-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
}

/* Зелёные акценты фирменного стиля */
.package--hit li::before { color: var(--green-bright); }
.package--hit .package__price { color: var(--green-bright); }
.guarantee__big b { color: var(--green-bright); }
.range { accent-color: var(--green); }
.range-value { color: var(--green); }
.calc__breakdown li b { color: var(--text); }
.faq summary:hover { color: var(--green); }
.tl b { color: var(--green); }
.doc b { color: var(--text); }
.step__day { color: var(--green); }
.eyebrow--green { color: var(--green); }
.section--light .eyebrow { color: var(--green-on-card); }
.section--light .checklist li::before { background: var(--green-on-card); }
.section--light .plain li::before { color: var(--green-on-card); }
.contacts .contact-list a:hover { color: var(--accent-2); }

/* Шапка поверх фотографии: пока она прозрачная, текст всегда светлый — в обеих темах */
.header:not(.is-scrolled) .logo,
.header:not(.is-scrolled) .nav a,
.header:not(.is-scrolled) .header__phone,
.header:not(.is-scrolled) .burger,
.header:not(.is-scrolled) .theme-toggle { color: var(--on-photo); }
.header:not(.is-scrolled) .nav a:hover,
.header:not(.is-scrolled) .theme-toggle:hover { color: var(--accent-2); }
.header:not(.is-scrolled) .theme-toggle { border-color: rgba(255, 255, 255, 0.45); }
.header:not(.is-scrolled) .theme-toggle:hover { border-color: var(--on-photo); }

/* Поверх фотографий акцент всегда светлый */
.hero .eyebrow,
.business .eyebrow,
.contacts .eyebrow { color: var(--accent-on-photo); }
.hero h1 span { color: var(--accent-on-photo); }
/* Цена в заголовке — на сплошной плашке, чтобы не терялась на пёстром фото */
.hero h1 .hero__price {
  padding: .02em .22em .08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  border-radius: .16em;
  background: var(--accent-on-photo);
  color: #1b140e;
  box-shadow: 0 .08em .4em rgba(0, 0, 0, .35);
}
.business .lead, .contacts .lead { color: #d7dbd8; }

/* Золото: деньги, гарантия, статус */
.package__badge { background: var(--gold); color: var(--on-gold); }
.package--hit { border-color: var(--gold-line); }
.guarantee__big { border: 1px solid var(--gold-line); }
.guarantee__big b { color: var(--gold-bright); }
.calc__total { color: var(--gold); }
.calc__breakdown li b { color: var(--text); }
.price { color: var(--gold); }
.package__price { color: var(--gold); }
.package--hit .package__price { color: var(--gold-bright); }
.hero--subsidy .stat b { color: var(--gold-bright); }
.doc b { color: var(--gold); }
.scenario__price { color: var(--gold); }
