@import url('https://fonts.googleapis.com/css2?family=Commissioner:wght@400;500;600;700&display=swap');

:root {
  --paper: #f1f0ec;
  --white: #fff;
  --ink: #171a1d;
  --muted: #666a6d;
  --metal: #a5a9ac;
  --accent: #9e7750;
  --line: rgba(23, 26, 29, .16);
  --container: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Commissioner", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; object-fit: cover; }
p { max-width: 70ch; margin: 0 0 1.25rem; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
h1 { max-width: 14ch; font-size: clamp(3rem, 7vw, 6rem); }
h2 { max-width: 18ch; font-size: clamp(2.2rem, 4.5vw, 4.5rem); }
h3 { font-size: clamp(1.35rem, 2vw, 2rem); }
button, input, textarea { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.shell { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(241, 240, 236, .97); }
.header-inner { min-height: 88px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; flex-direction: column; margin-right: auto; line-height: 1; }
.brand strong { font-size: 1.45rem; letter-spacing: .18em; }
.brand span { margin-top: 6px; color: var(--muted); font-size: .68rem; letter-spacing: .16em; }
.menu-toggle { display: none; width: 48px; height: 48px; padding: 0; border: 1px solid var(--ink); background: transparent; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 22px; height: 1px; margin: 6px auto; background: currentColor; }
.site-nav { display: flex; align-items: center; gap: 26px; font-size: .88rem; font-weight: 500; }
.site-nav a, .site-nav summary { cursor: pointer; white-space: nowrap; }
.site-nav a[aria-current="page"], .site-nav summary[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.nav-group { position: relative; }
.nav-group summary { list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: " +"; color: var(--accent); }
.nav-group[open] summary::after { content: " −"; }
.nav-panel { position: absolute; top: calc(100% + 18px); left: -20px; width: 300px; padding: 14px 20px; border: 1px solid var(--line); background: var(--white); }
.nav-panel a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); }
.nav-panel a:last-child { border: 0; }
.nav-cta { padding: 12px 18px; border: 1px solid var(--ink); }
.nav-cta:hover { border-color: var(--accent); background: var(--accent); color: #000; }

.btn { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: 13px 24px; border: 1px solid currentColor; border-radius: 0; font-size: 1.17rem; font-weight: 600; }
.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--white); }
.btn-primary:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }
.btn-ghost { background: transparent; color: inherit; }
.btn-ghost:hover { background: var(--white); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-home { position: relative; min-height: min(790px, calc(100vh - 88px)); display: grid; align-items: end; overflow: hidden; background: var(--ink); color: var(--white); }
.hero-home > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-home::after { content: ""; position: absolute; inset: 0; background: rgba(10, 12, 14, .65); }
.hero-home .hero-content { position: relative; z-index: 1; padding-block: 110px 90px; }
.hero-home h1 { max-width: 13ch; color: var(--white); }
.hero-home p { margin-top: 28px; color: #e2e4e5; font-size: clamp(1.08rem, 2vw, 1.35rem); }
.hero-split { display: grid; min-height: 650px; grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr); background: var(--white); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 80px max(40px, calc((100vw - var(--container)) / 2)); padding-right: clamp(40px, 6vw, 110px); }
.hero-copy p { margin-top: 30px; color: var(--muted); font-size: 1.15rem; }
.hero-media { min-height: 540px; }
.hero-media img { width: 100%; height: 100%; }
.hero-caption { margin-top: 12px; color: var(--muted); font-size: .78rem; }
/* Длинные слова («Биоклиматические», «Производственная») не влезают в половинчатую
   колонку при 96px и залезают под фото — масштабируем h1 от ширины колонки */
.hero-split h1 { max-width: none; font-size: clamp(2rem, 4.2vw, 3.75rem); overflow-wrap: break-word; hyphens: auto; }

.section { padding-block: clamp(80px, 10vw, 150px); }
.section-white { background: var(--white); }
.section-dark { background: var(--ink); color: var(--white); }
.section-dark h2, .section-dark h3, .project-card h2, .project-card h3 { color: var(--white); }
.section-dark p, .section-dark .muted { color: #c3c6c8; }
.section-head { display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; gap: 40px; margin-bottom: clamp(46px, 7vw, 90px); }
.section-head p { justify-self: end; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.copy p { margin-top: 26px; color: var(--muted); }
.copy-list { margin: 30px 0 0; padding: 0; list-style: none; }
.copy-list li { padding: 15px 0; border-top: 1px solid var(--line); }
.copy-list li:last-child { border-bottom: 1px solid var(--line); }

.product-list { border-top: 1px solid var(--line); }
.product-row { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: 30px; align-items: center; min-height: 160px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.product-row img { width: 90px; height: 90px; }
.product-row p { margin: 0; color: var(--muted); }
.product-row .arrow { font-size: 1.5rem; }
.product-row:hover h3, .product-row:hover .arrow { color: var(--accent); }

.project-pair { display: grid; grid-template-columns: 1.08fr .92fr; gap: 20px; }
.project-card { position: relative; min-height: 620px; overflow: hidden; background: var(--ink); color: var(--white); }
.project-card:nth-child(2) { min-height: 520px; margin-top: 100px; }
.project-card img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .72; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.project-card:hover img { transform: scale(1.025); }
.project-card-content { position: absolute; inset: auto 0 0; padding: clamp(28px, 5vw, 58px); }
.project-card p { color: #e2e4e5; }

.photo-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.photo-grid figure { grid-column: span 5; margin: 0; }
.photo-grid figure:nth-child(3n+2) { grid-column: span 7; }
.photo-grid figure:nth-child(3n) { grid-column: span 6; }
.photo-grid img { width: 100%; height: min(620px, 48vw); }
.photo-grid figure:nth-child(even) img { height: min(760px, 58vw); }
.photo-grid figcaption { padding-top: 12px; color: var(--muted); font-size: .82rem; }

.process { border-top: 1px solid var(--line); counter-reset: process; }
.process li { counter-increment: process; display: grid; grid-template-columns: 80px 1fr 1fr; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.process li::before { content: counter(process, decimal-leading-zero); color: var(--accent); font-weight: 600; }
.process p { margin: 0; color: var(--muted); }

.fact-line { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 26px 0; border-top: 1px solid var(--line); }
.fact-line:last-child { border-bottom: 1px solid var(--line); }
.fact-line strong { font-size: clamp(1.35rem, 2.4vw, 2.1rem); font-weight: 500; }
.fact-line p { color: var(--muted); }

.cta-band { padding-block: clamp(70px, 9vw, 120px); background: var(--accent); color: var(--white); }
.cta-band .shell { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.cta-band h2 { max-width: 14ch; color: var(--white); }

.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 9vw, 130px); }
.contact-lines { border-top: 1px solid var(--line); }
.contact-line { padding: 22px 0; border-bottom: 1px solid var(--line); }
.contact-line span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .8rem; }
.request-form { display: grid; gap: 20px; }
.field label { display: block; margin-bottom: 8px; font-size: .85rem; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: 15px 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); }
.field textarea { min-height: 130px; resize: vertical; }
.form-result { margin: 8px 0 0; }
.form-result[hidden] { display: none; }
.form-result a { display: inline-block; padding-bottom: 4px; border-bottom: 1px solid var(--accent); color: var(--ink); font-weight: 600; }

.site-footer { padding-block: 80px 30px; background: var(--ink); color: var(--white); }
.footer-top { display: grid; grid-template-columns: 1.1fr 1.9fr; gap: 70px; padding-bottom: 60px; }
.footer-contact a { display: block; font-size: clamp(1.25rem, 2vw, 2rem); }
.footer-contact address { max-width: 32ch; margin-top: 26px; color: #b7babd; font-style: normal; }
.footer-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.footer-map h3 { margin-bottom: 18px; color: var(--metal); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-map a { display: block; margin: 9px 0; color: #d4d6d7; font-size: .86rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.16); color: #92979a; font-size: .75rem; }
.footer-bottom a { color: #c6c9ca; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1120px) {
  .header-inner { min-height: 76px; }
  .menu-toggle { display: block; }
  .site-nav { position: fixed; inset: 76px 0 0; display: none; flex-direction: column; align-items: stretch; gap: 0; overflow-y: auto; padding: 24px; background: var(--paper); font-size: 1rem; }
  .site-nav.is-open { display: flex; }
  .site-nav > a, .site-nav > details, .site-nav .nav-cta { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav-panel { position: static; width: auto; margin-top: 12px; padding: 6px 18px; border: 0; border-left: 1px solid var(--accent); background: transparent; }
  .nav-cta { border: 0; }
}

@media (max-width: 820px) {
  .shell { width: min(calc(100% - 32px), var(--container)); }
  h1 { font-size: clamp(2.7rem, 13vw, 4.8rem); }
  .hero-home { min-height: 680px; }
  .hero-home .hero-content { padding-block: 90px 58px; }
  .hero-split { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { padding: 70px 16px; }
  .hero-media { min-height: 58vh; }
  .section-head, .split, .contact-grid, .footer-top { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
  .product-row { grid-template-columns: 72px 1fr auto; gap: 18px; min-height: 130px; }
  .product-row img { width: 72px; height: 72px; }
  .product-row p { display: none; }
  .project-pair { grid-template-columns: 1fr; }
  .project-card, .project-card:nth-child(2) { min-height: 520px; margin-top: 0; }
  .photo-grid { display: block; }
  .photo-grid figure { margin-bottom: 32px; }
  .photo-grid img, .photo-grid figure:nth-child(even) img { height: auto; max-height: 80vh; aspect-ratio: 4 / 3; }
  .process li { grid-template-columns: 50px 1fr; }
  .process p { grid-column: 2; }
  .fact-line { grid-template-columns: 1fr; gap: 12px; }
  .cta-band .shell { display: block; }
  .cta-band .actions { margin-top: 34px; }
  .footer-map { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 520px) {
  .brand strong { font-size: 1.2rem; }
  .hero-home { min-height: 640px; }
  .actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .footer-map { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
