/* ===== Цвета и шрифты ===== */
:root {
  --paper: #F3F8F4;      /* фон — белый с лёгкой зеленью */
  --white: #FFFFFF;
  --ink: #15281F;        /* основной текст — почти чёрный с зеленью */
  --muted: #4E6158;      /* второстепенный текст */
  --line: #CFDED4;       /* тонкие линии */
  --tint: #E2EFE7;       /* мятный фон чередующихся секций */
  --mint: #C9E3D3;       /* светлая зелень: дальние горы, плашки */
  --juniper: #24493F;    /* акцент — цвет арчи */
  --juniper-hover: #1B3A32;
  --ridge: #8DB4A0;
  --deep: #1A362E;       /* самый тёмный зелёный — подвал */
  --error: #A33A2E;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1160px;
  --gutter: 24px;
  --radius: 8px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id] { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--juniper); color: var(--white); padding: 10px 14px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  background: var(--juniper); color: var(--white);
  font: 500 16px/1 var(--sans);
  text-decoration: none; border: 0; border-radius: var(--radius);
  cursor: pointer; transition: background-color .2s ease;
}
.btn:hover { background: var(--juniper-hover); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 15px; }

/* ===== Шапка ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 248, 244, .92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 32px; min-height: 72px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.2; margin-right: auto; }
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.brand-role { font-size: 13px; color: var(--muted); }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* ===== Первый экран ===== */
.hero { position: relative; padding: 72px 0 0; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr);
  gap: 64px; align-items: end;
}
.hero-text { padding-bottom: 48px; }
.hero-area {
  display: inline-block; margin-bottom: 24px; padding: 6px 14px;
  background: var(--mint); color: var(--juniper);
  border-radius: 999px; font-weight: 500; font-size: 15px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 15ch;
}
.lead { margin-top: 24px; font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }
.phone-link {
  font-size: 18px; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.phone-link:hover { border-bottom-color: var(--ink); }
.quick-contacts { display: flex; flex-wrap: wrap; gap: 12px 24px; }

.portrait { margin: 0; position: relative; z-index: 2; }
.portrait-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--tint);
  display: grid; place-items: center;
}
.portrait-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait-mono {
  font-family: var(--serif); font-size: clamp(72px, 9vw, 120px); font-weight: 400;
  color: var(--juniper); opacity: .35; letter-spacing: .04em;
}
.portrait figcaption {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 0 24px; font-size: 15px;
}
.portrait figcaption strong { font-weight: 600; }
.portrait figcaption span { color: var(--muted); }

/* Хребет */
.ridge { display: block; width: 100%; height: clamp(70px, 11vw, 160px); margin-top: -40px; margin-bottom: -1px; position: relative; z-index: 1; }
.ridge path { stroke: none; }
.ridge-back { fill: var(--mint); }
.ridge-front { fill: var(--juniper); }
@media (prefers-reduced-motion: no-preference) {
  .ridge { animation: ridge-draw 1.8s cubic-bezier(.45, 0, .2, 1) .2s both; }
}
@keyframes ridge-draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ===== Секции ===== */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.section h2, .request h2, .objects h2 {
  font-family: var(--serif); color: var(--juniper);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15; letter-spacing: -0.01em;
  max-width: 20ch;
}
.section-intro { margin-top: 16px; color: var(--muted); max-width: 36em; }
.section-intro a { color: var(--juniper); font-weight: 500; text-underline-offset: 3px; }
.site-footer p a { color: var(--white); text-underline-offset: 3px; }
.section h3 { font-size: 19px; font-weight: 600; line-height: 1.35; }

/* Объекты (зелёная полоса под горами) */
.objects { background: var(--juniper); color: var(--white); padding: 32px 0 96px; }
.objects h2 { color: var(--white); max-width: none; }
.obj-grid { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.obj h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; margin-top: 20px; }
.obj p { margin-top: 6px; color: rgba(255, 255, 255, .75); font-size: 16px; }
.obj-media, .check-photo {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; margin: 0;
  border-radius: 10px; background: #2E5D50;
  display: grid; place-items: center;
}
.obj-media img, .check-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.obj-icon { width: 64px; height: 64px; fill: none; stroke: var(--mint); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.check-photo { margin-top: 32px; background: var(--mint); }
.check-photo .obj-icon { stroke: var(--juniper); }

/* Услуги */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 48px; border-top: 1px solid var(--line); }
.side { padding: 36px 40px 8px 0; }
.side + .side { padding-left: 40px; padding-right: 0; border-left: 1px solid var(--line); }
.side h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--juniper); }
.ticks { list-style: none; margin: 20px 0 0; padding: 0; }
.ticks li { position: relative; padding: 10px 0 10px 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 19px;
  width: 12px; height: 7px;
  border-left: 1.75px solid var(--juniper); border-bottom: 1.75px solid var(--juniper);
  transform: rotate(-45deg);
}


/* Этапы */
.process-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
.process-grid > div:first-child { position: sticky; top: 120px; align-self: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative; padding: 0 0 36px 72px;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--juniper); border: 0;
  font-family: var(--serif); font-size: 19px; color: var(--white);
}
.steps li::after {
  content: ""; position: absolute; left: 22px; top: 44px; bottom: 0;
  width: 2px; margin-left: -.5px; background: var(--mint);
}
.steps li:last-child::after { display: none; }
.steps p { margin-top: 6px; color: var(--muted); max-width: 34em; }

/* Проверка */
.check-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
.checklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.checklist li {
  position: relative; padding: 18px 0 18px 40px;
  border-bottom: 1px solid var(--line);
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 19px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--juniper);
}
.checklist li::after {
  content: ""; position: absolute; left: 7px; top: 25px;
  width: 8px; height: 5px;
  border-left: 1.75px solid var(--white); border-bottom: 1.75px solid var(--white);
  transform: rotate(-45deg);
}

/* Почему со мной */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.principle { background: var(--paper); border-top: 3px solid var(--juniper); border-radius: 0 0 var(--radius) var(--radius); padding: 24px 24px 28px; }
.principle h3 { color: var(--juniper); }
.principle p { margin-top: 10px; color: var(--muted); }

/* Вопросы */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-size: 18px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover, .faq details[open] summary { color: var(--juniper); }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px;
  border-right: 1.75px solid var(--juniper); border-bottom: 1.75px solid var(--juniper);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding: 0 0 24px; color: var(--muted); max-width: 40em; }

/* ===== Заявка ===== */
.request { background: var(--juniper); color: var(--white); padding: 96px 0; }
.request h2 { color: var(--white); }
.request-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
.request-text p { margin-top: 20px; color: rgba(255, 255, 255, .78); max-width: 30em; }
.request .request-direct { margin-top: 32px; color: rgba(255, 255, 255, .78); }
.request-direct a { color: var(--white); font-size: 24px; font-family: var(--serif); text-decoration: none; }
.request-direct a:hover { text-decoration: underline; text-underline-offset: 4px; }
.request .request-links { display: flex; gap: 12px; margin-top: 20px; }
.request-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: var(--radius);
  color: var(--white); text-decoration: none; font-weight: 500; font-size: 15px;
  transition: background-color .15s ease, border-color .15s ease;
}
.request-links a:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }

.form, .form-done {
  background: var(--white); color: var(--ink);
  border-radius: 12px; padding: 36px;
}
.form-done h3 { font-family: var(--serif); font-size: 28px; font-weight: 500; }
.form-done p { margin-top: 12px; color: var(--muted); }
.form-done a { color: var(--juniper); font-weight: 500; white-space: nowrap; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; margin-top: 20px; }
.field label, .choice legend { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 16px/1.4 var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; transition: border-color .15s ease, background-color .15s ease;
}
.field textarea { resize: vertical; min-height: 92px; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--juniper); background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(36, 73, 63, .15);
}
.field input::placeholder, .field textarea::placeholder { color: #8C989E; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 14px; margin-top: 6px; }

.choice { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
.choice:first-child { margin-top: 0; }
.choice legend { padding: 0; }
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.choice-row label { position: relative; flex: 1 1 0; min-width: 96px; cursor: pointer; }
.choice-row input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-row span {
  display: block; text-align: center; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px; background: var(--paper);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.choice-row input:checked + span { background: var(--juniper); border-color: var(--juniper); color: var(--white); }
.choice-row input:focus-visible + span { outline: 2px solid var(--juniper); outline-offset: 2px; }

.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--juniper); flex: none; }

.form .btn { width: 100%; margin-top: 24px; min-height: 56px; font-size: 17px; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.form-status { margin-top: 14px; font-size: 15px; min-height: 1px; }
.form-status.is-error { color: var(--error); }
.form-status a { color: inherit; font-weight: 500; }

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

/* ===== Подвал ===== */
.site-footer { padding: 48px 0 32px; font-size: 15px; background: var(--deep); color: var(--white); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-name { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.site-footer p { color: rgba(255, 255, 255, .7); }
.site-footer .footer-name { color: var(--white); }
.footer-contacts { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.footer-contacts > a { font-size: 18px; font-weight: 500; text-decoration: none; }
.socials { display: flex; gap: 16px; }
.socials a { color: rgba(255, 255, 255, .75); }
.socials a:hover { color: var(--white); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 14px; }

/* ===== Адаптив ===== */
@media (max-width: 980px) {
  .nav { display: none; }
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-text { padding-bottom: 32px; }
  .portrait { max-width: 340px; }
  .ridge { margin-top: -24px; }
  .process-grid, .check-grid, .faq-wrap, .request-grid { grid-template-columns: 1fr; gap: 40px; }
  .process-grid > div:first-child { position: static; }
  .about-grid { grid-template-columns: 1fr; gap: 16px; }
  .obj-grid { grid-template-columns: 1fr 1fr; }
  .obj:last-child { grid-column: 1 / -1; }
  .obj:last-child .obj-media { aspect-ratio: 16 / 7; }
  .check-photo { max-width: 520px; }
}

@media (max-width: 680px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .header-row { min-height: 64px; gap: 12px; }
  .brand-name { font-size: 17px; }
  .btn-small { padding: 0 14px; font-size: 14px; min-height: 40px; }
  .lead { font-size: 17px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .quick-contacts { gap: 12px 20px; }
  .portrait { max-width: 260px; }
  .section, .request { padding: 64px 0; }
  .two-col { grid-template-columns: 1fr; }
  .side { padding: 28px 0 8px; }
  .side + .side { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 20px; }
  .obj-grid { grid-template-columns: 1fr; gap: 32px; }
  .obj:last-child .obj-media { aspect-ratio: 4 / 3; }
  .objects { padding: 16px 0 64px; }
  .steps li { padding-left: 60px; }
  .form, .form-done { padding: 24px 18px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .choice-row label { min-width: 0; }
  .footer-contacts { align-items: flex-start; }
}

@media (max-width: 380px) {
  .brand-role { display: none; }
}
