/* ============================================================
   {{ORG_NAME}} — styles.css
   Палитра: глубокий хвойный / мох / мята / известь
   Шрифты: Unbounded (заголовки), Onest (текст)
   ============================================================ */

:root {
  --pine: #0f3d2e;        /* основной тёмный */
  --pine-deep: #082a1f;   /* футер, тени */
  --moss: #2e7d4f;        /* акцент, кнопки */
  --moss-dark: #226340;
  --mint: #cfebd9;        /* подложки */
  --mint-soft: #e9f5ee;
  --lime: #b8d96a;        /* точечный акцент */
  --paper: #f6faf7;       /* фон страницы */
  --ink: #14211b;         /* текст */
  --ink-mute: #4c6257;

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Onest", "Segoe UI", system-ui, sans-serif;

  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 8px;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 48px);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pine); }
ul, ol { padding-left: 0; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .6em; color: var(--pine); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 500; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }
.container.narrow { max-width: 820px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -100px; left: 16px; background: var(--pine); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px;
  font: 600 .95rem var(--font-body); text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease-out), background-color .25s, color .25s, border-color .25s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover { background: var(--pine); color: #fff; }
.btn-ghost { background: transparent; color: var(--pine); border-color: var(--pine); }
.btn-ghost:hover { background: var(--mint); }
.text-link { font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--mint); box-shadow: 0 8px 30px -18px rgba(15, 61, 46, .35); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--pine); }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.site-nav { margin-left: auto; }
.nav-list { list-style: none; margin: 0; display: flex; gap: 6px; }
.nav-list a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
  transition: background-color .2s, color .2s;
}
.nav-list a:hover, .nav-list a.is-active { background: var(--mint); color: var(--pine); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 6vw, 90px);
  background:
    radial-gradient(1200px 600px at 110% -10%, var(--mint) 0%, transparent 60%),
    var(--paper);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-kicker { font-weight: 600; color: var(--moss-dark); margin-bottom: 18px; }
.hero-title { margin-bottom: 22px; }
.hero-title-line { display: block; color: var(--moss); font-weight: 500; font-size: .62em; margin-top: .35em; }
.hero-lead { font-size: 1.15rem; color: var(--ink-mute); max-width: 56ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-facts {
  display: grid; grid-template-columns: repeat(3, auto); gap: 28px; margin: 0;
  padding-top: 26px; border-top: 1px solid var(--mint);
}
.hero-facts dt { font-size: .85rem; color: var(--ink-mute); }
.hero-facts dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.35rem; color: var(--pine); }

/* hero-copy entrance: одна оркестрованная последовательность */
.hero-copy > * { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease-out) forwards; }
.hero-copy > :nth-child(1) { animation-delay: .05s; }
.hero-copy > :nth-child(2) { animation-delay: .15s; }
.hero-copy > :nth-child(3) { animation-delay: .28s; }
.hero-copy > :nth-child(4) { animation-delay: .40s; }
.hero-copy > :nth-child(5) { animation-delay: .55s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* сетка "собирается" — одна оркестрованная последовательность */
.hero-art { display: flex; justify-content: center; }
.grid-art { width: min(100%, 440px); height: auto; overflow: visible; }
.grid-art .guides line { stroke: var(--mint); stroke-width: 1.5; stroke-dasharray: 3 9; }
.grid-art .cell { fill: var(--mint); transform-box: fill-box; transform-origin: center; }
.grid-art .cell.a1 { fill: var(--moss); }
.grid-art .cell.a2 { fill: var(--pine); }
.grid-art .cell.a3 { fill: var(--lime); }
.grid-art .cell.hollow { fill: none; stroke: var(--moss); stroke-width: 2; }
.grid-art.is-ready .cell { opacity: 0; transform: scale(.4); animation: assemble .6s var(--ease-out) forwards; animation-delay: calc(var(--i) * 75ms + .15s); }
.grid-art.is-ready .guides line { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1.4s var(--ease-out) forwards; }
.grid-art.is-ready .cell.a1, .grid-art.is-ready .cell.a3 { animation: assemble .6s var(--ease-out) forwards, breathe 4s ease-in-out infinite; animation-delay: calc(var(--i) * 75ms + .15s), calc(var(--i) * 75ms + 1.6s); }
@keyframes assemble { to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.88); } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 7vw, 104px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { color: var(--ink-mute); font-size: 1.05rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split-reverse .split-copy { order: 1; }
.split-reverse .media { order: 2; }
.split-copy h3 { margin-top: 1.6em; }

.media { margin: 0; }
.media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-sm);
  background: var(--mint);
  box-shadow: 0 30px 60px -36px rgba(8, 42, 31, .55);
}
.media figcaption { margin-top: 12px; font-size: .9rem; color: var(--ink-mute); }

/* about */
.about { background: #fff; }

/* services */
.services { background: var(--pine); color: #e6f2ea; }
.services h2, .services h3 { color: #fff; }
.services .section-head p { color: var(--mint); }
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: rgba(207, 235, 217, .18); border-radius: var(--radius-lg); overflow: hidden; }
.service { background: var(--pine); padding: 36px 34px; transition: background-color .3s; }
.service:hover { background: var(--pine-deep); }
.service h3 { font-size: 1.25rem; margin-bottom: 14px; }
.service p { color: #c8ddd0; margin-bottom: 18px; }
.service .text-link { color: var(--lime); }
.service .text-link:hover { color: #fff; }

/* advantages */
.advantages { background: var(--mint-soft); }
.adv-list { list-style: none; margin: 24px 0 0; display: grid; gap: 14px; }
.adv-list li { padding-left: 30px; position: relative; }
.adv-list li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 16px; height: 16px; border-radius: 50% 50% 50% 0;
  background: var(--moss); transform: rotate(-45deg);
}
.adv-list strong { color: var(--pine); }

/* process — нумерация уместна: это последовательность */
.process { background: #fff; }
.steps { list-style: none; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.steps::before { content: ""; position: absolute; left: 24px; right: 24px; top: 28px; height: 2px; background: var(--mint); }
.step { counter-increment: step; position: relative; padding-top: 74px; }
.step::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--moss); color: var(--pine);
  font: 700 1.1rem var(--font-display);
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--ink-mute); font-size: .97rem; }

/* faq */
.faq { background: var(--paper); }
.accordion { display: grid; gap: 10px; }
.faq-item { background: #fff; border: 1px solid var(--mint); border-radius: var(--radius-md); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 60px 20px 24px; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1.05rem; }
.faq-item summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--moss); border-bottom: 2px solid var(--moss);
  transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease-out);
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-body { padding: 0 24px 22px; color: var(--ink-mute); }
.faq-item[open] .faq-body { animation: rise .35s var(--ease-out); }

/* contacts */
.contacts { background: var(--mint-soft); }
.contact-card { font-style: normal; margin-top: 24px; display: grid; gap: 10px; }
.contact-card p { margin: 0; }
.contact-label { display: inline-block; min-width: 130px; color: var(--ink-mute); font-size: .9rem; }
.contact-form { background: #fff; padding: 34px; border-radius: var(--radius-lg); border: 1px solid var(--mint); display: grid; gap: 16px; }
.contact-form h3 { margin-bottom: 4px; }
.contact-form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.contact-form input, .contact-form textarea {
  font: inherit; padding: 12px 14px; border: 1.5px solid var(--mint); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 4px rgba(46, 125, 79, .15); }
.contact-form input.is-invalid, .contact-form textarea.is-invalid { border-color: #c0392b; }
.form-note { font-size: .82rem; color: var(--ink-mute); margin: 0; }
.form-status { min-height: 1.4em; font-weight: 600; color: var(--moss-dark); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pine-deep); color: #bfd6c8; padding: 64px 0 28px; }
.site-footer a { color: #e6f2ea; text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { width: 56px; height: 56px; object-fit: contain; margin-bottom: 14px; }
.footer-name { font-family: var(--font-display); color: #fff; font-weight: 700; margin-bottom: 8px; }
.footer-desc { font-size: .93rem; max-width: 34ch; }
.footer-heading { color: #fff; font-weight: 600; margin-bottom: 14px; }
.footer-nav ul { list-style: none; margin: 0; display: grid; gap: 8px; }
.footer-contact p { margin: 0 0 8px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(207, 235, 217, .18); font-size: .88rem; }
.to-top { padding: 8px 16px; border: 1px solid rgba(207, 235, 217, .35); border-radius: 999px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.services-grid .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: .08s; }
.services-grid .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: .16s; }
.services-grid .reveal:nth-child(4), .steps .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .reveal { opacity: 1; transform: none; animation: none; transition: none; }
  .grid-art.is-ready .cell, .grid-art.is-ready .guides line { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .grid-art { width: min(70%, 320px); }
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-copy, .split-reverse .media { order: initial; }
  .services-grid { grid-template-columns: 1fr; }
  .header-cta { display: none; }

  .nav-toggle {
    display: grid; gap: 5px; margin-left: auto; padding: 10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span:not(.visually-hidden) { display: block; width: 24px; height: 2px; background: var(--pine); transition: transform .3s var(--ease-out), opacity .3s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav { margin-left: auto; }
  .nav-list {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 2px; padding: 12px var(--gutter) 20px;
    background: var(--paper); border-bottom: 1px solid var(--mint);
    transform-origin: top; transform: scaleY(0); opacity: 0;
    transition: transform .3s var(--ease-out), opacity .25s;
  }
  .nav-list.is-open { transform: none; opacity: 1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero-facts { grid-template-columns: 1fr 1fr; gap: 18px; }
  .steps, .footer-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
  .contact-label { display: block; min-width: 0; }
}
