/* Союз мастеров Могилёва — design system
   Architectural / construction. No glassmorphism, no neon gradients. */

:root {
  --ink: #1b1a18;
  --ink-2: #2c2a27;
  --paper: #f4f1eb;
  --paper-2: #ebe6dc;
  --mist: #d9d3c8;
  --stone: #7a746a;
  --copper: #b85c38;
  --copper-d: #8f4328;
  --line: rgba(27, 26, 24, 0.12);
  --line-strong: rgba(27, 26, 24, 0.22);
  --white: #fffcf7;
  --danger: #9b2c2c;
  --ok: #2f6b4f;
  --shadow: 0 18px 40px rgba(27, 26, 24, 0.12);
  --font: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --cond: "IBM Plex Sans Condensed", "Golos Text", sans-serif;
  --max: 1240px;
  --pad: clamp(16px, 4vw, 40px);
  --header: 80px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}
.skip:focus {
  left: 8px;
  z-index: 80;
  background: var(--white);
  padding: 8px 12px;
}

.wrap {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.kicker {
  font-family: var(--cond);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--stone);
}

/* Header */
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 8px var(--pad);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.topbar a { color: var(--paper); text-decoration: none; }
.topbar a:hover { color: #fff; }

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  display: flex;
  align-items: center;
  background: rgba(244, 241, 235, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.logo svg, .logo img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--ink);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.logo-text span {
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.phones { display: flex; flex-direction: column; gap: 2px; }
.phone-link {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.phone-link:hover { color: var(--copper-d); }
.messengers { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.msg:hover { border-color: var(--ink); }
.msg-tg { border-color: #2aabee; }
.msg-viber { border-color: #7360f2; }
.topbar-contacts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.topbar .msg {
  color: var(--paper);
  border-color: rgba(244,241,235,.28);
  min-height: 26px;
  font-size: 12px;
}
.footer .msg {
  color: var(--paper);
  border-color: rgba(244,241,235,.28);
}
.hero-side .phone-link,
.calc-aside .phone-link,
.cta-final .phone-link {
  display: block;
  color: inherit;
  font-size: 20px;
  font-weight: 700;
}
.btn-ghost-dark {
  background: transparent;
  border: 1px solid rgba(244,241,235,.35);
  color: var(--paper);
}
.menu-btn {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  background: transparent;
  padding: 0;
}
.menu-btn span {
  display: block;
  width: 18px; height: 1.5px;
  margin: 5px auto;
  background: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s var(--ease), color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: var(--copper-d); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-light {
  background: var(--paper);
  color: var(--ink);
}
.btn-light:hover { background: #fff; }
.cta-final .btn-ghost,
.title-block .btn-ghost,
.hero-side .btn-ghost {
  border-color: rgba(244, 241, 235, 0.35);
  color: var(--paper);
}
.title-block .btn-ghost:hover,
.cta-final .btn-ghost:hover {
  border-color: #fff;
}

/* Hero — architectural title block, not a 2-col startup split */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  color: var(--paper);
  overflow: hidden;
  background: var(--ink);
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(27,26,24,.35) 0%, rgba(27,26,24,.18) 35%, rgba(27,26,24,.72) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-end;
  padding: 32px 0 48px;
}
.title-block {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
  background: rgba(27, 26, 24, 0.82);
  border: 1px solid rgba(244, 241, 235, 0.16);
  display: grid;
  grid-template-columns: 1fr auto;
}
.title-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(244, 241, 235, 0.14);
  font-family: var(--cond);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  grid-column: 1 / -1;
}
.title-main { padding: 22px 22px 26px; }
.hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4.6vw, 52px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero .lead {
  margin: 0 0 22px;
  max-width: 46ch;
  color: rgba(244, 241, 235, 0.86);
  font-size: 17px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}
.hero-side {
  border-left: 1px solid rgba(244, 241, 235, 0.14);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 220px;
}
.hero-side small {
  font-family: var(--cond);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(244, 241, 235, 0.6);
}
.hero-side a {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 6px;
}

/* Sections */
.section { padding: 88px 0; }
.section-head {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 40px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.section-head p { margin: 0; max-width: 42ch; color: var(--stone); }

/* Services as editorial list, not equal cards */
.service-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 72px 1fr 220px 32px;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.service-row:hover .service-name { color: var(--copper-d); }
.service-row:hover .arrow { transform: translateX(4px); }
.service-num {
  font-family: var(--cond);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--stone);
}
.service-name {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  transition: color 0.2s;
}
.service-note { color: var(--stone); font-size: 15px; }
.arrow { transition: transform 0.2s var(--ease); justify-self: end; }

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}
.why-photo {
  min-height: 520px;
  overflow: hidden;
  background: var(--ink-2);
}
.why-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.why-items { display: flex; flex-direction: column; }
.why-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.why-item h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.why-item p { margin: 0; color: var(--ink-2); }

/* Process tape */
.process {
  background: var(--ink);
  color: var(--paper);
}
.process .kicker { color: rgba(244,241,235,.55); }
.process .section-head { border-color: rgba(244,241,235,.16); }
.process .section-head p { color: rgba(244,241,235,.62); }
.process-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  position: relative;
}
.process-list::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 18px;
  height: 1px;
  background: rgba(244,241,235,.2);
}
.process-item { padding-right: 12px; }
.process-item b {
  display: block;
  font-family: var(--cond);
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--copper);
  margin-bottom: 18px;
  position: relative;
}
.process-item b::before {
  content: "";
  position: absolute;
  top: 16px;
  width: 7px; height: 7px;
  background: var(--copper);
  border-radius: 50%;
}
.process-item p { margin: 0; font-size: 16px; }

/* Portfolio mosaic */
.mosaic {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 10px;
}
.mosaic a:first-child { grid-row: 1 / span 2; }
.tile {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  display: block;
  color: #fff;
  text-decoration: none;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.tile:hover img { transform: scale(1.04); }
.tile figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(27,26,24,.78));
  font-size: 14px;
}
.tile span {
  display: block;
  font-family: var(--cond);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.8;
}

/* Calculator workshop panel */
.calc-section { background: var(--paper-2); }
.calc-shell {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  border: 1px solid var(--line-strong);
  background: var(--white);
}
.calc-main { padding: 28px; }
.calc-aside {
  background: var(--ink);
  color: var(--paper);
  padding: 28px;
}
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.step-dot {
  flex: 1;
  height: 3px;
  background: var(--mist);
}
.step-dot.is-on { background: var(--copper); }
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.choice {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  min-height: 72px;
  text-align: left;
  padding: 14px 16px;
}
.choice b { display: block; font-size: 16px; }
.choice span { color: var(--stone); font-size: 13px; }
.choice.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.choice.is-on span { color: rgba(244,241,235,.7); }
.area-row { display: flex; align-items: center; gap: 16px; }
.area-row input[type="number"] {
  width: 140px;
  height: 56px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 0 14px;
  font-size: 22px;
  font-weight: 600;
}
.area-row input[type="range"] { flex: 1; accent-color: var(--copper); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-strong);
  background: transparent;
  min-height: 42px;
  padding: 0 12px;
}
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.calc-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.estimate-label {
  font-family: var(--cond);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(244,241,235,.55);
}
.estimate-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
}
.muted { color: var(--stone); }
.calc-aside .muted { color: rgba(244,241,235,.62); }
.summary-list { list-style: none; padding: 0; margin: 0 0 20px; }
.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(244,241,235,.12);
  font-size: 14px;
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item button {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 18px;
}
.faq-item button span { color: var(--copper); font-size: 22px; line-height: 1; }
.faq-item .faq-body {
  display: none;
  padding: 0 0 18px;
  color: var(--ink-2);
  max-width: 70ch;
}
.faq-item.is-open .faq-body { display: block; }

/* Local SEO band */
.geo-band {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.geo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Contact CTA */
.cta-final {
  background: var(--ink);
  color: var(--paper);
}
.cta-final a { color: #fff; }
.cta-final .muted a { color: rgba(244,241,235,.8); }
.cta-final h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
  max-width: 16ch;
}
.calc-aside .btn { width: 100%; margin-top: 8px; }
.form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.form label { font-size: 13px; color: var(--stone); }
.cta-final .form label { color: rgba(244,241,235,.6); }
.form input, .form textarea, .form select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--white);
  min-height: 48px;
  padding: 10px 12px;
}
.cta-final .form input,
.cta-final .form textarea,
.cta-final .form select {
  background: #23211e;
  border-color: rgba(244,241,235,.16);
  color: var(--paper);
}
.form textarea { min-height: 110px; resize: vertical; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-msg { font-size: 14px; min-height: 1.4em; }
.form-msg.err { color: #ffb4b4; }
.form-msg.ok { color: #b7e0c8; }
.field-err { color: var(--danger); font-size: 13px; }

/* Footer */
.footer {
  background: #121110;
  color: rgba(244,241,235,.78);
  padding: 48px 0 28px;
  font-size: 14px;
}
.footer a { color: var(--paper); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}
.footer h3 {
  font-family: var(--cond);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(244,241,235,.5);
  margin: 0 0 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 0 0 8px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(244,241,235,.12);
  padding-top: 18px;
  color: rgba(244,241,235,.45);
}

/* Mobile bar */
.mobar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  background: var(--ink);
  border-top: 1px solid rgba(244,241,235,.12);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 56px 0 28px;
  border-bottom: 1px solid var(--line);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--stone);
  margin-bottom: 18px;
}
.crumbs a { color: var(--stone); }
.page-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 4.4vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 18ch;
}
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2em; letter-spacing: -0.02em; }
.prose h3 { margin-top: 1.4em; }
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
  align-items: start;
}
.side-card {
  position: sticky;
  top: calc(var(--header) + 18px);
  border: 1px solid var(--line-strong);
  padding: 22px;
  background: var(--white);
}
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 28px 0;
}
.work-grid div {
  background: var(--paper);
  padding: 18px;
}
.related { display: flex; flex-wrap: wrap; gap: 10px; }
.related a {
  border: 1px solid var(--line-strong);
  padding: 10px 12px;
  text-decoration: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12,11,10,.92);
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  object-fit: contain;
}
.lightbox button {
  position: absolute;
  top: 16px; right: 16px;
  width: 48px; height: 48px;
  border: 0;
  background: var(--paper);
  font-size: 22px;
}

/* 404 */
.err-page { min-height: 60vh; padding: 80px 0; }

/* Mobile nav */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 50;
  padding: 88px 24px 24px;
}
.nav-overlay.is-open { display: block; }
.nav-overlay a {
  display: block;
  font-size: 28px;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.nav-overlay .phone-link { font-size: 20px; }
.nav-overlay .msg {
  display: inline-flex;
  font-size: 16px;
  margin: 12px 8px 0 0;
  border-bottom: 0;
  padding: 0 12px;
}

@media (max-width: 980px) {
  .nav, .header-cta .btn, .header-cta .phones, .header-cta .messengers { display: none; }
  .menu-btn { display: block; }
  .title-block { grid-template-columns: 1fr; }
  .hero-side { border-left: 0; border-top: 1px solid rgba(244,241,235,.14); }
  .section-head { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 48px 1fr 24px; }
  .service-note { display: none; }
  .service-name { font-size: 22px; }
  .why-grid, .calc-shell, .geo-grid, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .why-photo { min-height: 280px; }
  .process-list { grid-template-columns: 1fr 1fr; gap: 22px; }
  .process-list::before { display: none; }
  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 240px 200px 200px;
  }
  .mosaic a:first-child { grid-column: 1 / -1; grid-row: auto; }
  .mobar { display: grid; }
  .mobar .btn { min-height: 44px; font-size: 13px; padding: 0 8px; }
  body { padding-bottom: 72px; }
  .choice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { display: none; }
  .hero { min-height: 88vh; }
  .hero h1 { max-width: none; }
  .section { padding: 64px 0; }
  .work-grid { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr; grid-template-rows: none; }
  .mosaic a, .tile { min-height: 240px; }
  .area-row { flex-direction: column; align-items: stretch; }
  .area-row input[type="number"] { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
