/* Светлая тема: базовые CSS-переменные (дизайн-токены сайта) */
:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --white: #ffffff;
  --dark: #1f2328;
  --text: #444;
  --muted: #70757d;
  --primary: #8b5e3c;
  --primary-dark: #6f482d;
  --accent: #c9a46a;
  --line: #dfdbd7;
  --success: #194127;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1200px;
  --transition: all 0.3s ease;
  --header-bg: rgba(247, 245, 240, 0.95);
  --header-border: rgba(0, 0, 0, 0.05);
  --footer-bg: #f0ece5;
  --footer-border: rgba(0, 0, 0, 0.08);
  --input-bg: #fcfbf9;
  --input-border: #dcd4cb;
  --input-focus-bg: #ffffff;
  --hero-card-grad-from: #ffffff;
  --hero-card-grad-to: #f2ece3;
  --lead-right-grad-from: #f4ede3;
  --lead-right-grad-to: #ffffff;
  --tag-bg: rgba(139, 94, 60, 0.12);
  --icon-tile-bg: rgba(139, 94, 60, 0.1);
  --chip-bg: rgba(139, 94, 60, 0.08);
  --btn-secondary-hover-bg: rgba(139, 94, 60, 0.08);
  --font-display: "Oranienbaum", "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --grain-opacity: 0.04;
}

/* Тёмная тема: те же имена переменных — перекрашивается весь интерфейс без дублирования правил */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12161c;
  --white: #1f252d;
  --dark: #ece9e3;
  --text: #aeb4bf;
  --muted: #8a929e;
  --primary: #c9a46a;
  --primary-dark: #ddb882;
  --accent: #d4b87c;
  --line: #343b46;
  --success: #3cb371;
  --shadow: 0 14px 42px rgba(0, 0, 0, 0.55);
  --header-bg: rgba(18, 22, 28, 0.94);
  --header-border: rgba(255, 255, 255, 0.07);
  --footer-bg: #0d1014;
  --footer-border: rgba(255, 255, 255, 0.06);
  --input-bg: #181e26;
  --input-border: #3d4654;
  --input-focus-bg: #222a35;
  --hero-card-grad-from: #2a323c;
  --hero-card-grad-to: #171c23;
  --lead-right-grad-from: #252d38;
  --lead-right-grad-to: #1a2129;
  --tag-bg: rgba(201, 164, 106, 0.16);
  --icon-tile-bg: rgba(201, 164, 106, 0.14);
  --chip-bg: rgba(201, 164, 106, 0.15);
  --btn-secondary-hover-bg: rgba(201, 164, 106, 0.12);
  --grain-opacity: 0.06;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  transition: background-color 0.35s ease, color 0.35s ease;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle at 20% 12%, rgba(139, 94, 60, 0.15), transparent 34%),
    radial-gradient(circle at 84% 4%, rgba(201, 164, 106, 0.17), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(111, 72, 45, 0.1), transparent 36%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: var(--grain-opacity);
  background-image: radial-gradient(#000 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

.section { padding: 80px 0; }
.section-title {
  font-size: 38px;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--dark);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.section-subtitle {
  font-size: 18px;
  color: var(--muted);
  max-width: 760px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
  font-size: 15px;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  filter: saturate(1.06);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover { background: var(--btn-secondary-hover-bg); }

.tag {
  display: inline-block;
  padding: 8px 14px;
  background: var(--tag-bg);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-border);
  transition: var(--transition);
}
.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--dark);
  letter-spacing: 0.03em;
}
.logo span { color: var(--primary); }

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav a {
  color: var(--dark);
  font-weight: 700;
  transition: var(--transition);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav a:hover { color: var(--primary); }

.header-contacts {
  display: flex;
  align-items: center;
  gap: 12px;
}
.phone-link {
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  position: relative;
}
.burger span,
.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 11px;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: var(--transition);
}
.burger span { top: 21px; }
.burger::before { top: 15px; }
.burger::after { top: 27px; }
.burger.active span { opacity: 0; }
.burger.active::before { transform: rotate(45deg); top: 21px; }
.burger.active::after { transform: rotate(-45deg); top: 21px; }

.hero { padding: 70px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}
.hero-title {
  font-size: 58px;
  line-height: 1.03;
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.hero-title,
.hero-title > span { color: var(--dark); }
.hero-text {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 680px;
}
.hero-left .tag,
.hero-left .hero-text,
.hero-left .hero-actions,
.hero-left .hero-features {
  opacity: 0;
  transform: translateY(18px);
}
.page-ready .hero-left .tag,
.page-ready .hero-left .hero-text,
.page-ready .hero-left .hero-actions,
.page-ready .hero-left .hero-features {
  animation: hero-stagger-in 0.7s ease forwards;
}
.page-ready .hero-left .tag { animation-delay: 0.08s; }
.page-ready .hero-left .hero-text { animation-delay: 0.24s; }
.page-ready .hero-left .hero-actions { animation-delay: 0.32s; }
.page-ready .hero-left .hero-features { animation-delay: 0.4s; }
@keyframes hero-stagger-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title.split-parent {
  overflow: visible;
}
.hero-title .split-word {
  display: inline-block;
  white-space: nowrap;
}
.hero-title .split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}
.hero-title .split-char.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition-property: transform, opacity;
  transition-duration: 1.25s;
  transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
.hero-title .split-char.split-space {
  width: 0.28em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}
.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.hero-feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.hero-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 94, 60, 0.35);
}
.hero-feature strong {
  display: block;
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 6px;
}
.hero-feature span {
  color: var(--muted);
  font-size: 14px;
}

.hero-card {
  background: linear-gradient(135deg, var(--hero-card-grad-from), var(--hero-card-grad-to));
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.4)),
    var(--hero-image, url('./Строительный участок на солнечном дне.png')) center/cover no-repeat;
  filter: saturate(1.02) contrast(1.03);
  transform: translateY(var(--hero-parallax, 0px));
  transition: transform 0.15s linear;
  will-change: transform;
  z-index: 0;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(201, 164, 106, 0.18), transparent 45%);
  z-index: 1;
}
.hero-prism {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: screen;
  overflow: hidden;
}
.hero-card-content {
  position: relative;
  z-index: 3;
  padding: 28px;
  color: #fff;
}
html[data-theme="dark"] .hero-prism {
  opacity: 0.42;
  mix-blend-mode: plus-lighter;
}
.hero-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.24);
  font-size: 14px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}
.hero-card h3 {
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 400;
}
.hero-card p {
  color: rgba(255,255,255,0.92);
  font-size: 16px;
  max-width: 460px;
}

.advantages-grid,
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.advantage-card,
.step-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.advantage-card:hover,
.step-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 94, 60, 0.35);
}
.advantage-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--icon-tile-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.advantage-card h3,
.step-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.advantage-card p,
.step-card p {
  color: var(--muted);
  font-size: 15px;
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
  font-size: 18px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.service-card,
.project-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.service-card:hover,
.project-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
  border-color: rgba(139, 94, 60, 0.35);
}
.service-image,
.project-img {
  height: 220px;
  background-size: 100%;
  background-position: center;
  transition: background-size 0.8s ease, transform 0.8s ease;
}
.project-img { height: 240px; }
.project-img {
  position: relative;
  overflow: hidden;
}
.project-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.28) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.9s ease;
}
.service-card:hover .service-image,
.project-card:hover .project-img {
  background-size: 108%;
}
.project-card:hover .project-img::after {
  transform: translateX(130%);
}
.service-content,
.project-body {
  padding: 24px;
}
.service-content h3 {
  font-size: 22px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 400;
}
.service-content p,
.project-body p {
  color: var(--muted);
  margin-bottom: 16px;
}
.service-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 15px;
}
.service-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.project-card {
  display: flex;
  flex-direction: column;
}
.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.project-body h3 {
  font-size: 22px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 400;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.project-meta span {
  display: inline-block;
  padding: 7px 10px;
  background: var(--chip-bg);
  border-radius: 999px;
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 700;
}
.project-price {
  margin-top: auto;
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}
.project-price small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 6px;
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.offer-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.offer-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.offer-card-body {
  padding: 18px;
}
.offer-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 8px;
}
.offer-card p {
  color: var(--muted);
}

.testimonials-wrap {
  display: grid;
  justify-items: center;
  gap: 14px;
  overflow: hidden;
}
.testimonials-viewport {
  position: relative;
  width: min(100%, 1120px);
  overflow: hidden;
  padding: 10px 6px;
}
.testimonials-track {
  display: flex;
  align-items: stretch;
  gap: 22px;
  transform: translateX(0);
}
.testimonials-track.is-sliding {
  transition: transform 0.62s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.testimonial-card {
  position: relative;
  flex: 0 0 calc((100% - 44px) / 3);
  min-height: 360px;
  padding: 26px 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--white) 88%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  user-select: none;
  touch-action: pan-y;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
}
.testimonial-card-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  margin: 0 auto 4px;
}
.testimonial-card-text {
  color: var(--text);
  font-size: 17px;
  font-style: italic;
  text-align: center;
  align-self: center;
}
.testimonial-card-author {
  text-align: center;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 15px;
}
html[data-theme="dark"] .testimonial-card {
  background: color-mix(in srgb, var(--white) 80%, transparent);
}

.calculator-box,
.lead-box,
.contacts-grid {
  display: grid;
  gap: 24px;
}
.calculator-box {
  grid-template-columns: 1fr 0.9fr;
  background: var(--white);
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.calculator-form { padding: 34px; }
.calculator-result {
  background: linear-gradient(135deg, #8b5e3c, #6f482d);
  color: #fff;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calculator-result h3 {
  font-size: 28px;
  margin-bottom: 14px;
}
.calculator-result .price {
  font-size: 44px;
  font-weight: 800;
  margin: 16px 0 8px;
}
.calculator-result p {
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  max-width: 420px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { margin-bottom: 18px; }
.form-group.full { grid-column: 1 / -1; }
label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}
input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  font-size: 15px;
  background: var(--input-bg);
  color: var(--dark);
  outline: none;
  transition: var(--transition);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  background: var(--input-focus-bg);
  box-shadow: 0 0 0 4px rgba(139, 94, 60, 0.08);
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  box-shadow: 0 0 0 4px rgba(201, 164, 106, 0.12);
}
textarea { min-height: 120px; resize: vertical; }
.note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

.faq-list { display: grid; gap: 16px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 22px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-question span:first-child {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.12;
}
.faq-question span:last-child {
  font-size: 28px;
  color: var(--primary);
  min-width: 24px;
  text-align: center;
  transition: transform 0.3s ease;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
  padding: 0 24px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(-6px);
}
.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 24px 22px;
  opacity: 1;
  transform: translateY(0);
}
.faq-item.active .faq-question span:last-child {
  transform: rotate(45deg);
}

.lead-box { grid-template-columns: 1fr 0.9fr; align-items: stretch; }
.lead-left,
.lead-right,
.contact-card,
.map-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.lead-left,
.lead-right,
.contact-card { padding: 34px; }
.lead-right {
  background: linear-gradient(135deg, var(--lead-right-grad-from), var(--lead-right-grad-to));
}
.lead-right ul li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.lead-right ul li:last-child { border-bottom: none; }

.contacts-grid { grid-template-columns: 0.9fr 1.1fr; }
.map-card { overflow: hidden; }
.contact-item { margin-bottom: 22px; }
.contact-item:last-child { margin-bottom: 0; }
.contact-item h4 {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.contact-item p,
.contact-item a {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}
.map-placeholder {
  min-height: 420px;
  background:
    linear-gradient(rgba(31,35,40,0.18), rgba(31,35,40,0.18)),
    url('https://images.unsplash.com/photo-1480074568708-e7b720bb3f09?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
  display: flex;
  align-items: end;
  padding: 28px;
  color: #fff;
}
.map-box {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 18px 20px;
  max-width: 420px;
}
.map-box h3 { margin-bottom: 8px; font-size: 22px; }
.map-box p { color: rgba(255,255,255,0.92); font-size: 15px; }
.map-box h3 {
  font-family: var(--font-display);
  font-weight: 400;
}

.footer {
  padding: 28px 0;
  border-top: 1px solid var(--footer-border);
  background: var(--footer-bg);
  transition: var(--transition);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.footer p { color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--text); font-size: 14px; font-weight: 600; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu { display: none; }

/*
  Плавающая кнопка переключения темы (светлая / тёмная).
  Фиксируется в правом нижнем углу, поверх контента; не перекрывает футер при прокрутке до конца,
  но остаётся доступной при любом положении страницы.
*/
.theme-toggle {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 1100;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--dark);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition: var(--transition);
}
.theme-toggle:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .hero-grid,
  .calculator-box,
  .lead-box,
  .contacts-grid {
    grid-template-columns: 1fr;
  }
  .advantages-grid,
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid,
  .projects-grid,
  .offers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-title { font-size: 48px; }
  .hero-card { min-height: 420px; }
}

@media (max-width: 860px) {
  .nav, .header-contacts { display: none; }
  .burger { display: block; }
  .mobile-menu { display: none; padding: 0 0 18px; }
  .mobile-menu.active { display: block; }
  .mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 10px;
  }
  .mobile-menu nav a { font-weight: 700; color: var(--dark); }
  .mobile-menu .mobile-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .hero-features,
  .form-grid,
  .advantages-grid,
  .services-grid,
  .projects-grid,
  .offers-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .testimonials-viewport {
    width: min(100%, 920px);
  }
  .testimonial-card {
    flex-basis: calc((100% - 22px) / 2);
  }
  .section { padding: 64px 0; }
  .section-title { font-size: 34px; }
  .hero-title { font-size: 44px; }
  .hero-text { font-size: 17px; }
}

@media (max-width: 560px) {
  .hero { padding-top: 40px; }
  .hero-title { font-size: 36px; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  .lead-left,
  .lead-right,
  .contact-card,
  .calculator-form,
  .calculator-result { padding: 24px; }
  .testimonial-card {
    flex-basis: 100%;
    min-height: 390px;
    padding: 22px 18px;
  }
  .testimonial-card-text {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-title .split-char {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
