﻿/* СтройСервис — brand layer on top of the kit (taste-skill system).
   Palette: warm stone, ink, brass. Type: Onest (display) + Golos Text (text), both with Cyrillic. */

:root {
  --p-bg: #e8e8e3; --p-surface: #dcdcd6; --p-ink: #181715; --p-muted: #5c5b56;
  --p-accent: #bfb21a; --p-accent-ink: #181715; --p-action: #181715; --p-action-ink: #e8e8e3;
  --p-inv-bg: #181715; --p-inv-surface: #242321; --p-inv-ink: #e8e8e3; --p-inv-muted: #91908d;
  --p-inv-accent: #bfb21a; --p-inv-accent-ink: #181715; --p-inv-action: #bfb21a; --p-inv-action-ink: #181715;
  --font-display: "Onest", system-ui, sans-serif;
  --font-text: "Golos Text", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.025em;
  --display-tracking-xl: -0.035em;
}

/* ---------- brand mark and bar ---------- */
.nav__logo { font-family: var(--font-display); font-weight: 500; font-size: 21px; letter-spacing: -0.03em; gap: 10px; }
.nav__logo .mark { --mark-bg: var(--ink); }
.nav__link { font-size: 15px; }
.nav__menu .menu-card .panel { --p-h: 168px; }
.nav__menu .menu-card { display: grid; gap: var(--s-2); align-content: start; }
.nav__menu .menu-card .t-small { display: block; }

/* ---------- type ---------- */
h1, h2 { letter-spacing: var(--display-tracking-xl); text-wrap: balance; }
h2 { letter-spacing: var(--display-tracking); }
.section-head h2 { max-width: 24ch; }
.t-lead { max-width: 46ch; }

/* ---------- buttons ---------- */
.btn { min-height: var(--btn-h); }

/* ---------- hero ---------- */
.hero .hero__lead { max-width: 42ch; }
.hero__kicker .dot { background: var(--accent); }
.hero__media > img { object-position: var(--ly-pos, 50% 50%); }
.hero .ly-float { max-width: 290px; }
.ly-float { border: 1px solid var(--line-strong); background: var(--bg); }
.ly-live { display: inline-flex; align-items: center; gap: 7px; }
.ly-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ly-float__row { font-size: 13px; }

/* ---------- rows ---------- */
.rows { list-style: none; padding: 0; margin: 0; }
.rows__name small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-small); line-height: 1.45; margin-top: 4px; }
.rows__value { font-size: 15px; color: var(--muted); }
.rows > li > p { font-size: 16px; line-height: 1.5; }

/* ---------- process ---------- */
.process { list-style: none; margin: var(--s-6) 0 0; padding: 0; border-top: 1px solid var(--line); }
.process > li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.process .n { font: 500 13px/1.4 var(--font-text); font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 3px; }
.process h3 { margin: 0; font: 500 18px/1.3 var(--font-text); letter-spacing: -0.01em; }
.process p { margin: 6px 0 0; color: var(--ink); font-size: 16px; line-height: 1.5; max-width: 52ch; }
.row-title { display: block; margin: 0; font: 500 20px/1.3 var(--font-display); letter-spacing: -0.015em; }
.process .row-title { font: 500 18px/1.3 var(--font-text); letter-spacing: -0.01em; }
.task .row-title { margin-bottom: 4px; }
.contact-photo { height: 220px; margin-top: var(--s-6); }

/* ---------- tiles ---------- */
.tile { color: inherit; }
.tile__head h3 { font: 500 20px/1.25 var(--font-display); letter-spacing: -0.02em; }
.tile-title { display: block; font: 500 20px/1.25 var(--font-display); letter-spacing: -0.02em; }
.tile__facts { margin-top: 2px; font-size: 14px; }
.tile__media { background: var(--surface); }
.tile--wide { --tile-ratio: 16 / 10; }
.tile--square { --tile-ratio: 1 / 1; }
a.tile:hover .tile__media > img { transform: scale(1.03); }

/* ---------- stats ---------- */
.stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--s-4) var(--s-4); margin-top: var(--s-6); }
.stats dt { font-size: 12px; color: var(--muted); line-height: 1.35; }
.stats dd { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.03em; }
.stats--band { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5) var(--s-6); padding-top: var(--s-5); }
@media (max-width: 639px) { .stats--band { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- client list ---------- */
.clients { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-5); }
.clients li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.clients li:nth-child(-n+2) { border-top: 0; padding-top: 0; }
@media (max-width: 639px) { .clients { grid-template-columns: 1fr; } .clients li:nth-child(2) { border-top: 1px solid var(--line); padding-top: 10px; } }

/* ---------- about group ---------- */
.about-photo { height: 100%; }
.about-photo .frame__img { object-position: 50% 55%; }
.cert-note { margin-top: var(--s-4); color: var(--muted); font-size: 14px; max-width: 46ch; }

/* ---------- contacts ---------- */
.contact-list { list-style: none; margin: var(--s-6) 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-4); padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.contact-list .lbl { color: var(--muted); font-size: 13px; padding-top: 2px; }
.contact-list a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.contact-list a:hover { text-decoration-color: currentColor; }
.contact-panel { background: var(--surface); border-radius: var(--r-lg); padding: var(--s-7); }
@media (max-width: 639px) { .contact-panel { padding: var(--s-5); } .contact-list li { grid-template-columns: 1fr; gap: 2px; } }
.contact-panel .form { gap: var(--s-4); }
.form input, .form textarea { border: 1px solid color-mix(in oklab, var(--ink) 26%, transparent); background: var(--bg); }
.form input:focus-visible, .form textarea:focus-visible { border-color: var(--ink); }
.form textarea { min-height: 112px; resize: vertical; }
.field label { font-size: 13px; }

/* ---------- page head (inner pages) ---------- */
.page-head h1 { font-size: var(--t-h1); line-height: 1.03; letter-spacing: var(--display-tracking-xl); max-width: 18ch; }
.page-head .t-lead { margin-top: var(--s-5); }
.page-facts { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin: var(--s-6) 0 0; padding: 0; }
.page-facts li { font-size: 14px; color: var(--muted); display: flex; align-items: baseline; gap: 8px; }
.page-facts b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.footer__address { font-family: var(--font-display); font-size: clamp(28px, 2.6vw, 44px); line-height: 1.15; letter-spacing: -0.03em; font-style: normal; }
.footer__contacts { display: grid; gap: 0; margin-top: var(--s-3); }
.footer__contacts a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.footer__contacts a:hover { text-decoration-color: currentColor; }
.footer__nav { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); font-size: 15px; }
.footer__nav a { color: var(--ink); }
.footer-bottom { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; }
.footer-bottom .footer__nav { margin-top: 0; padding-top: 0; border-top: 0; }
.footer__legal a { color: inherit; }
.hours { display: grid; grid-template-columns: minmax(64px, max-content) auto; justify-content: start; gap: 6px var(--s-5); margin: 0; font-size: 15px; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; }
.credits { font-size: 13px; }

/* ---------- proof / standards ---------- */
.standards { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.standards li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s-3); font-size: 16px; line-height: 1.45; }
.standards li::before { content: ""; width: 8px; height: 8px; margin-top: 8px; background: var(--accent); }

/* ---------- long copy ---------- */
.prose p { font-size: 16px; line-height: 1.6; max-width: 62ch; }
.prose p + p { margin-top: var(--s-4); }
.prose h3 { margin-top: var(--s-6); }
.task { padding: 16px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; padding-top: 0; }
.task h3 { margin: 0 0 4px; font: 500 19px/1.3 var(--font-display); letter-spacing: -0.015em; }
.task p { margin: 0; font-size: 16px; line-height: 1.5; max-width: 52ch; }

@media (max-width: 639px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1 { max-width: none; }
  .s2m { --hm: 2; }  /* the bar keeps the mark, the main action and the menu button on one line at 390 */
  .nav:not(.is-open) .nav__actions { display: flex; margin-left: auto; }
  .nav:not(.is-open) .nav__actions .btn { height: 44px; padding-inline: 12px; font-size: 13px; }
  .nav:not(.is-open) .nav__toggle { margin-left: 0; }
  .nav__logo { font-size: 17px; gap: 6px; white-space: nowrap; }
  .nav__logo .mark { width: 22px; height: 22px; }
  .hero__media { min-height: 200px; }
  .rows > li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s-4); }
  .rows__value { font-size: 13px; }
}

/* the tablet landscape: the clients block needs its second screen */
@media (min-width: 1024px) and (max-width: 1279px) {
  #clients-band { --h: 2; }
}


/* the inner pages' opening picture: 4:3 on a desktop, 16:9 when stacked */
.frame--page { --ratio: 75%; }
@media (max-width: 1023px) { .frame--page { --ratio: 56.25%; } }
@media (min-width: 1024px) { .page-head .frame--page { --ratio: 0px; height: 100%; } }

/* services: the three directions stack at 1024-1279 so the rows keep one line */
@media (min-width: 1024px) and (max-width: 1279px) {
  .split { display: flex; flex-direction: column; gap: var(--s-6); }
  .split > * { width: 100%; }
  .split .frame--fill { height: 340px; }
  #customer, #design, #build, #standards, #process { --h: 2; }
}

/* the portfolio: two up and a wide third on a phone and a tablet */
@media (max-width: 1023px) {
  .projects .tile { grid-column: span 6; }
  .projects .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .projects .tile__media { aspect-ratio: 16 / 9; }
}

/* the about page's clients band */
.clients-strip { display: none; }
@media (min-width: 1280px) {
  .clients-strip { display: block; margin-top: var(--s-6); height: 220px; overflow: hidden; border-radius: var(--r-lg); }
  .clients-strip img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
}


@media (max-width: 639px) { .page-media-hide { display: none; } }


/* the three cases: two up and a wide third under 1024 */
@media (max-width: 1023px) {
  #work .tile { grid-column: span 6; }
  #work .tile:last-child { grid-column: 1 / -1; }
  #work .tile__media { aspect-ratio: 16 / 9; }
}


/* 320px: the bar keeps the mark, the action and the menu button inside the screen */
@media (max-width: 359px) {
  .nav__logo { font-size: 15px; gap: 5px; }
  .nav__logo .mark { width: 20px; height: 20px; }
  .nav:not(.is-open) .nav__actions .btn { padding-inline: 8px; font-size: 12px; }
  .hero h1 { font-size: 36px; }
}


/* the cases on a desktop are square, a taller row than 4:3 */
@media (min-width: 1024px) { #work .tile__media { aspect-ratio: 1 / 1; } }

/* a phone: the split's photograph is a real picture, not a strip */
@media (max-width: 639px) {
  #company .about-photo, #process .frame--fill { height: 240px; }
}


/* a phone: a filled grid sizes to its content, so the section grows instead of letting the picture spill over */
@media (max-width: 639px) {
  #process .grid.fill, #company .grid.fill { flex: 0 0 auto; }
  .nav__logo { font-size: 16px; }
  .nav:not(.is-open) .nav__actions .btn { padding-inline: 9px; }
}


.closing__cta .close-btn { width: min(50%, 640px); }
@media (max-width: 639px) { .closing__cta .close-btn { width: 100%; } }


@media (max-width: 359px) {
  .nav__bar { gap: 4px; }
  .nav__logo { font-size: 14px; gap: 4px; }
  .nav__logo .mark { width: 18px; height: 18px; }
  .nav:not(.is-open) .nav__actions .btn { height: 40px; padding-inline: 4px; font-size: 11px; }
  .nav:not(.is-open) .nav__toggle { width: 40px; height: 40px; }
}


/* a phone: the two wide sections fill their second screen with a picture */
.contact-extra { display: none; }
@media (max-width: 639px) {
  #clients-band .frame--square { --ratio: 0px; height: 640px; }
  .contact-extra { display: block; margin-top: var(--s-6); height: 200px; overflow: hidden; border-radius: var(--r-lg); }
  .contact-extra img { width: 100%; height: 100%; object-fit: cover; }
}


@media (max-width: 359px) { #clients-band .frame--square { height: 340px; } }


@media (max-width: 359px) { #clients-band .frame--square { display: none; } }


/* ---------- the company's emblem ---------- */
.logo-mark { width: auto; height: 30px; flex: none; }
.footer-logo { display: block; width: 196px; height: auto; margin-bottom: var(--s-5); }
@media (max-width: 639px) { .logo-mark { height: 26px; } .footer-logo { width: 160px; } }


/* ---------- catalogue of objects ---------- */
.cat-head-section h1 { font-size: var(--t-h1); line-height: 1.04; letter-spacing: var(--display-tracking-xl); max-width: 16ch; margin: var(--s-4) 0 0; }
.cat-head-section .t-lead { margin-top: var(--s-5); }
.cat-index { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: var(--s-7); border-top: 1px solid var(--line); padding-top: var(--s-5); }
.cat-index a { display: inline-flex; align-items: baseline; gap: 8px; font-size: 15px; color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.cat-index a:hover { border-color: currentColor; }
.cat-index a span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.cat-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px var(--s-6); align-items: end; padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.cat-head h2 { margin: 0; }
.cat-head p { grid-column: 1; margin: 0; max-width: 62ch; color: var(--ink); }
.cat-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.obj { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-block: var(--s-7); border-bottom: 1px solid var(--line); align-items: start; }
.obj-text { grid-column: 1 / span 4; }
.obj-meta { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.obj h3 { margin: 0 0 12px; font: 500 clamp(22px, 1.5vw, 28px)/1.2 var(--font-display); letter-spacing: -0.02em; }
.obj-desc { margin: 0; font-size: 16px; line-height: 1.55; max-width: 46ch; }
.obj-arch { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.obj-gallery { grid-column: 5 / -1; }
.obj-main { margin: 0; aspect-ratio: 16 / 10; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.obj-main img { display: block; width: 100%; height: 100%; object-fit: cover; }
.obj-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.obj-thumb { width: 92px; height: 60px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer; opacity: .65; background: var(--surface); }
.obj-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.obj-thumb:hover { opacity: .95; }
.obj-thumb.is-active { opacity: 1; outline: 2px solid var(--ink); outline-offset: 2px; }
.cat-foot .btn-row { margin-top: var(--s-5); }
@media (max-width: 1023px) { .obj-text, .obj-gallery { grid-column: 1 / -1; } .obj-gallery { margin-top: var(--s-5); } }
@media (max-width: 639px) { .obj { padding-block: var(--s-6); } .obj-thumb { width: 72px; height: 48px; } .cat-head { grid-template-columns: 1fr; } }



/* ---------- normative documents ---------- */
.doc-head h1 { margin: var(--s-4) 0 0; font-size: var(--t-h1); line-height: 1.04; letter-spacing: var(--display-tracking-xl); max-width: 17ch; }
.doc-head .t-lead { margin-top: var(--s-5); }
.doc-figure { margin: 0; padding: var(--s-5); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.doc-figure img { display: block; width: 100%; height: auto; }
.doc-figure figcaption { margin-top: var(--s-3); font-size: 12px; line-height: 1.4; color: var(--muted); }
.doc-figure--photo { padding: 0; overflow: hidden; }
.doc-figure--photo figcaption { padding: 0 var(--s-4) var(--s-3); }
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.doc { border-top: 1px solid var(--line); padding-top: var(--s-5); }
.doc-tag { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.doc h3 { margin: 0 0 8px; font: 500 clamp(24px, 1.8vw, 32px)/1.15 var(--font-display); letter-spacing: -0.02em; }
.doc-name { margin: 0 0 16px; font-size: 17px; line-height: 1.4; max-width: 46ch; }
.doc-role { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.doc-role::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.doc > p { margin: 12px 0 0; font-size: 16px; line-height: 1.55; max-width: 52ch; }
.doc .doc-meta { font-size: 14px; line-height: 1.5; color: var(--muted); }
.doc-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: var(--s-5); align-items: start; }
.doc-gallery figure { margin: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.doc-gallery img { display: block; width: 100%; height: auto; }
.doc-gallery figcaption { margin-top: 6px; font-size: 11px; color: var(--muted); }
.doc-list { display: grid; gap: var(--s-5); }
.doc-mini { border-top: 1px solid var(--line); padding-top: var(--s-4); }
.doc-mini h3 { margin: 0 0 8px; font: 500 18px/1.35 var(--font-text); letter-spacing: -0.01em; }
.doc-mini p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 50ch; }
@media (max-width: 1023px) { .doc-grid { grid-template-columns: 1fr; } }
@media (max-width: 639px) { .doc-gallery { grid-template-columns: 1fr; } .doc-head h1 { max-width: none; } }


@media (max-width: 1023px) { #standards .doc-figure, #process .split .frame--fill { display: none; } }


.obj-scope { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 46ch; }

/* official covers in the two document cards */
.doc-top { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 20px; align-items: start; }
.doc-cover { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
@media (max-width: 639px) { .doc-top { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; } }

.doc-card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--s-6); }
.doc-card--wide .scan-row { margin-top: 0; align-self: start; }
.example-gallery a { display: block; }
.example-gallery a.wide { grid-column: 1 / -1; }
@media (max-width: 1023px) { .doc-card--wide { grid-template-columns: 1fr; } .doc-card--wide .scan-row { margin-top: var(--s-4); } }

@media (max-width: 639px) { .example-gallery { grid-template-columns: 1fr; } }

