/* Чистый Дом — сайт-визитка. Базовые стили, без CSS-фреймворков.
   Цвета и шрифт — из дизайн-системы «Чистый Дом»
   (https://claude.ai/artifact/YFQmKqigpK87KVtYqUYskf).
   Имена переменных здесь исторические (--bg, --text…); в скобках —
   соответствующее имя токена дизайн-системы. */

@font-face {
  font-family: "Golos Text";
  src: url("../fonts/GolosText-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("../fonts/GolosText-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212;
}

:root {
  --bg: #faf7f2;          /* surface */
  --bg-alt: #f1eae0;      /* surface-alt */
  --text: #26211b;        /* ink */
  --text-muted: #6b5f52;  /* muted */
  --brand: #1f4c46;       /* brand */
  --brand-light: #2e6b62; /* brand-light */
  --accent: #4e7a3f;      /* accent — тёплый оливковый, отличается по тону от brand (тёмный сине-зелёный), чтобы кнопка не сливалась с шапкой/футером/формой */
  --accent-dark: #3e6232; /* accent-dark */
  --border: #e3ddd2;      /* border */
  --white: #ffffff;       /* white */
  --radius: 14px;         /* radius-md */
  --radius-sm: 10px;      /* radius-sm */
  --radius-full: 999px;   /* radius-full */
  --shadow: 0 10px 30px rgba(31, 76, 70, 0.08);
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

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

a { color: inherit; }

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

section { padding: 72px 0; }
@media (max-width: 640px) {
  section { padding: 48px 0; }
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 16px; font-weight: 700; }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: 20px; }
p { margin: 0 0 14px; color: var(--text-muted); }

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

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}
.section-head p { margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
}
.btn-outline:hover { border-color: #fff; }
.btn-secondary {
  background: var(--white);
  color: var(--brand);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--brand); }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon { height: 34px; width: auto; }
.logo-text {
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.main-nav { display: flex; gap: 26px; }
.main-nav a {
  text-decoration: none;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
.main-nav a:hover { color: var(--accent-dark); }
.header-cta { display: flex; align-items: center; gap: 14px; }

.header-icons { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--brand);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover,
.icon-btn:focus-visible { background: var(--bg-alt); color: var(--accent-dark); }

/* Тултип с полным номером — CSS-only, по наведению/фокусу */
.icon-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 60;
}
.icon-btn:hover::after,
.icon-btn:focus-visible::after { opacity: 1; visibility: visible; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--brand);
}

@media (max-width: 860px) {
  .logo-icon { height: 26px; }
  .logo-text { font-size: 15px; white-space: nowrap; }
  .main-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    background: var(--white);
    flex-direction: column;
    padding: 18px 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform 0.25s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
}

/* Дефект: логотип плохо читался на маленьких телефонах — 26px было
   мельче общего мобильного размера (860px), а не крупнее. Увеличение
   вскрыло смежную проблему: на ≤480px всем элементам шапки (логотип +
   иконки контактов + кнопка + гамбургер) физически не хватало места
   в одну строку — раньше это маскировалось тем, что лишнее просто
   наезжало друг на друга. Тут сузил зазоры и второстепенные отступы,
   не трогая сам логотип и не убирая ни одного элемента. */
@media (max-width: 480px) {
  .logo-icon { height: 34px; }
  .logo-text { font-size: 15px; }
  .header-inner { gap: 8px; }
  .header-cta { gap: 8px; }
  .header-icons { gap: 6px; }
  .icon-btn { width: 32px; height: 32px; }
  .header-cta .btn { padding: 10px 14px; font-size: 14px; }
  .nav-toggle { font-size: 22px; }
}

/* Совсем узкие телефоны (320px) — гамбургер уезжал за край экрана.
   Логотип не сжимаем (в этом весь смысл дефекта), поэтому здесь
   единственный устойчивый вариант — временно скрыть иконки контактов
   (они остаются доступны через "Контакты" в меню и в футере). */
@media (max-width: 360px) {
  .container { padding: 0 14px; }
  .header-inner { gap: 6px; }
  .header-cta { gap: 6px; }
  .header-icons { display: none; }
  .header-cta .btn { padding: 8px 12px; font-size: 13px; }
  .nav-toggle { font-size: 20px; }
}

/* Hero */
.hero {
  position: relative;
  color: var(--white);
  padding: 96px 0 84px;
  background: linear-gradient(180deg, rgba(18,45,42,0.72), rgba(18,45,42,0.84)), center/cover no-repeat url("../img/hero.jpg");
}
.hero-content { max-width: 620px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 18px; }
.hero p.lead { color: rgba(255,255,255,0.88); font-size: 18px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.trust-row {
  display: flex;
  gap: 28px;
  margin-top: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}
.trust-row strong { display: block; font-size: 22px; color: #fff; }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.service-card img { height: 190px; width: 100%; object-fit: cover; }
.service-card .card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.service-price {
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 6px;
  font-size: 15px;
}
.service-card p { flex: 1; }
.service-card .btn { margin-top: 10px; align-self: flex-start; }

/* Works gallery */
.works-group { margin-bottom: 46px; }
.works-group:last-child { margin-bottom: 0; }
.works-group h3 { margin-bottom: 16px; }
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
@media (max-width: 500px) { .works-grid { grid-template-columns: 1fr; } }
.works-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
}
.works-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.works-grid figure:hover img { transform: scale(1.05); }
.works-grid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
}

/* Reviews */
.reviews-section { background: var(--bg-alt); }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .reviews-grid { grid-template-columns: 1fr; } }
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.review-stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; font-size: 15px; }
.review-name { font-weight: 700; margin-top: 14px; }
.review-date { font-size: 13px; color: var(--text-muted); }
.reviews-link { text-align: center; margin-top: 32px; }
.reviews-link a { color: var(--brand); font-weight: 600; text-decoration: underline; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer;
  padding: 18px 4px;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 4px 18px; margin: 0; }

/* Contact / form */
.contact-section {
  background: var(--brand);
  color: #fff;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info h2 { color: #fff; }
.contact-info p { color: rgba(255,255,255,0.8); }
.contact-list { list-style: none; padding: 0; margin: 24px 0; }
.contact-list li { margin-bottom: 14px; font-size: 15px; }
.contact-list a { text-decoration: none; font-weight: 600; color: #fff; }

.contact-form {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-row input[type="text"],
.form-row input[type="tel"],
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
}
.form-row textarea { resize: vertical; min-height: 80px; }
.radio-group { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-group label { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-muted); }
.consent-row a { color: var(--brand); }
.form-note { font-size: 13px; margin-top: 10px; text-align: center; }
.form-status { margin-top: 14px; font-size: 14px; text-align: center; display: none; }
.form-status.show { display: block; }
.form-status.ok { color: #2f7a4d; }
.form-status.err { color: #b3372c; }

/* Подтверждение отправки заявки */
.form-success { text-align: center; }
.success-icon {
  width: 56px;
  height: 56px;
  color: var(--accent);
  margin: 0 auto 18px;
}
.form-success h3 { margin-bottom: 10px; }
.success-lead { color: var(--text-muted); margin-bottom: 26px; }
.success-steps {
  text-align: left;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.success-steps-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
.success-steps ol { margin: 0; padding-left: 20px; color: var(--text); }
.success-steps li { margin-bottom: 6px; }
.success-steps li:last-child { margin-bottom: 0; }

/* Footer */
.site-footer {
  background: #17322d;
  color: rgba(255,255,255,0.72);
  padding: 40px 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.72); text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* Utility */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }
