:root {
  --ink: #111110;
  --ink-soft: #1b1a17;
  --ink-2: #2a2823;
  --paper: #faf8f3;
  --paper-2: #f3efe6;
  --white: #ffffff;
  --gold: #d81f26;
  --gold-deep: #7f0000;
  --line: #e4ddcf;
  --line-dark: rgba(255, 255, 255, .14);
  --text: #26241f;
  --muted: #6f6c62;
  --muted-light: #b7b2a6;
  --wrap: 1200px;
  --serif: "Montserrat", system-ui, sans-serif;
  --body: "Roboto", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); font-weight: 400; color: var(--text); background: var(--white); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.12; letter-spacing: -.01em; }

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

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: .01em; padding: 15px 30px; border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover { background: #b3171d; }
.btn--line { background: transparent; border-color: currentColor; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Topbar */
.topbar { background: var(--ink); color: var(--muted-light); font-size: 12.5px; letter-spacing: .02em; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar__geo { font-family: var(--serif); font-weight: 500; }
.topbar__links { display: flex; gap: 22px; }
.topbar__links a { transition: color .2s; }
.topbar__links a:hover { color: var(--gold); }

/* Header */
.head { position: sticky; top: 0; z-index: 60; background: var(--white); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.head.scrolled { box-shadow: 0 6px 26px -16px rgba(0, 0, 0, .35); }
.head__inner { display: flex; align-items: center; gap: 30px; height: 76px; }

.brand { display: inline-flex; align-items: center; flex: none; }
.brand__logo { height: 40px; width: auto; max-width: none; display: block; }

.menu { display: flex; gap: 20px; margin-left: auto; }
.menu a { font-family: var(--serif); font-weight: 500; font-size: 14px; white-space: nowrap; color: var(--text); position: relative; padding: 4px 0; transition: color .2s; }
.menu a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--gold); transition: right .25s ease; }
.menu a:hover { color: var(--ink); }
.menu a:hover::after { right: 0; }
.head__cta { margin-left: 4px; padding: 12px 22px; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.burger span { width: 26px; height: 2px; background: var(--ink); transition: .3s; }

/* Hero */
.hero { padding-top: 56px; border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.kicker { font-family: var(--serif); font-weight: 600; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); position: relative; padding-left: 52px; margin-bottom: 26px; }
.kicker::before { content: ""; position: absolute; left: 0; top: 50%; width: 38px; height: 2px; background: var(--gold-deep); }
.hero__title { font-size: clamp(34px, 4.6vw, 58px); font-weight: 800; color: var(--ink); margin-bottom: 24px; }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 540px; margin-bottom: 26px; }
.hero__facts { list-style: none; margin-bottom: 34px; }
.hero__facts li { position: relative; padding-left: 26px; margin-bottom: 8px; font-size: 15.5px; }
.hero__facts li::before { content: ""; position: absolute; left: 0; top: 11px; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }
.hero__facts b { font-family: var(--serif); font-weight: 700; color: var(--ink); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__media { position: relative; align-self: stretch; min-height: 420px; }
.hero__media::before { content: ""; position: absolute; left: -22px; top: -22px; width: 120px; height: 120px; border-left: 3px solid var(--gold); border-top: 3px solid var(--gold); z-index: 2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 100%; filter: grayscale(1) contrast(1.04); }

/* Metrics strip */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px; border-top: 1px solid var(--line); }
.metrics div { padding: 30px 4px 36px; border-left: 1px solid var(--line); padding-left: 24px; }
.metrics div:first-child { border-left: none; padding-left: 0; }
.metrics dt { font-family: var(--serif); font-weight: 800; font-size: clamp(38px, 4vw, 52px); color: var(--ink); line-height: 1; }
.metrics dt::after { content: ""; display: block; width: 30px; height: 3px; background: var(--gold); margin-top: 14px; }
.metrics dd { color: var(--muted); font-size: 14.5px; margin-top: 16px; max-width: 170px; }

/* Sections */
.section { padding: 96px 0; }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: #efeae0; }

.lead-head { max-width: 760px; margin-bottom: 54px; }
.lead-head--row { max-width: none; display: grid; grid-template-columns: auto 1fr; gap: 44px; align-items: end; }
.h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; color: var(--ink); position: relative; padding-bottom: 18px; }
.h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; background: var(--gold); }
.h2--light { color: var(--white); }
.lead-head__note { margin-top: 24px; font-size: 17px; color: var(--muted); }
.lead-head--row .lead-head__note { margin-top: 0; max-width: 560px; }

/* Services list */
.svc { list-style: none; counter-reset: none; border-top: 1px solid var(--line); }
.svc__item { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 36px 0; border-bottom: 1px solid var(--line); transition: background .25s; }
.svc__item:hover { background: var(--paper); }
.svc__idx { font-family: var(--serif); font-weight: 800; font-size: 20px; color: var(--gold-deep); padding-top: 4px; }
.svc__title { font-size: 23px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.svc__desc { color: var(--muted); font-size: 16px; max-width: 760px; }
.svc__tags { margin-top: 14px; font-family: var(--serif); font-size: 13px; font-weight: 500; letter-spacing: .02em; color: var(--ink); }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { background: var(--paper); padding: 34px 28px 40px; position: relative; }
.step__num { font-family: var(--serif); font-weight: 800; font-size: 15px; color: var(--ink); display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--gold); margin-bottom: 22px; }
.step__title { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.step__text { color: var(--muted); font-size: 15px; }

/* Company (dark) */
.company { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; }
.company__text { color: #cdc8bc; font-size: 16.5px; margin-bottom: 18px; max-width: 640px; }
.pull { margin-top: 36px; padding: 28px 0 4px 28px; border-left: 3px solid var(--gold); }
.pull p { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.45; color: var(--white); }
.pull footer { margin-top: 16px; font-size: 14px; color: var(--gold); letter-spacing: .02em; }
.creds { border: 1px solid var(--line-dark); padding: 30px 28px; }
.creds__label { display: block; font-family: var(--serif); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.creds ul { list-style: none; }
.creds li { padding: 14px 0 14px 24px; border-bottom: 1px solid var(--line-dark); font-size: 15px; color: #e5e0d6; position: relative; }
.creds li:last-child { border-bottom: none; padding-bottom: 0; }
.creds li::before { content: ""; position: absolute; left: 0; top: 22px; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }

/* Projects gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.shot { position: relative; overflow: hidden; aspect-ratio: 4 / 3; }
.shot--wide { grid-column: span 1; }
.shot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.03); transition: filter .5s, transform .6s; }
.shot:hover img { filter: grayscale(0); transform: scale(1.04); }
.shot figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; color: var(--white); background: linear-gradient(to top, rgba(10, 10, 9, .9) 0%, rgba(10, 10, 9, .35) 55%, transparent 100%); }
.shot__loc { display: inline-block; font-family: var(--serif); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.shot figcaption h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.shot figcaption p { font-size: 13.5px; color: rgba(255, 255, 255, .78); }

/* Documents */
.docs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.doc { display: block; background: var(--white); border: 1px solid var(--line); padding: 16px; aspect-ratio: 3 / 4; overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.doc:hover { border-color: var(--gold-deep); box-shadow: 0 16px 36px -22px rgba(0, 0, 0, .4); }
.doc img { width: 100%; height: 100%; object-fit: contain; }
.doc--member { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; cursor: default; background: var(--paper); border-color: var(--gold-deep); }
.doc--member img { height: 46px; width: auto; object-fit: contain; }
.doc--member span { font-size: 13.5px; color: var(--muted); }

/* Team */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 52px 36px; }
.person { text-align: center; }
.person img { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; object-position: center top; background: var(--paper-2); filter: grayscale(1) contrast(1.03); margin: 0 auto 24px; box-shadow: 0 0 0 1px var(--line), 0 16px 36px -24px rgba(0, 0, 0, .5); transition: filter .45s, box-shadow .3s, transform .3s; }
.person:hover img { filter: grayscale(0); box-shadow: 0 0 0 2px var(--gold), 0 18px 38px -22px rgba(127, 0, 0, .45); }
.person h3 { font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--ink); margin-bottom: 8px; }
.person p { color: var(--muted); font-size: 14.5px; max-width: 290px; margin: 0 auto; }

/* Contacts */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contacts__note { color: #cdc8bc; margin: 16px 0 30px; max-width: 460px; }
#lead label { display: block; font-family: var(--serif); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
#lead input, #lead textarea { width: 100%; margin-top: 9px; padding: 14px 16px; background: transparent; border: 1px solid var(--line-dark); color: var(--white); font-family: var(--body); font-size: 16px; transition: border-color .2s; }
#lead input::placeholder, #lead textarea::placeholder { color: #6c685e; }
#lead input:focus, #lead textarea:focus { outline: none; border-color: var(--gold); }
#lead textarea { resize: vertical; }
#lead .btn { margin-top: 8px; }
.contacts__priv { font-size: 12.5px; color: #807c71; margin-top: 16px; }
.contacts__ok { margin-top: 18px; padding: 14px 18px; border-left: 3px solid var(--gold); background: rgba(216, 31, 38, .12); color: var(--white); font-size: 15px; }

.contacts__phone { display: inline-block; font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 3vw, 36px); color: var(--white); }
.contacts__phone:hover { color: var(--gold); }
.contacts__urgent { color: var(--muted-light); font-size: 15px; margin-top: 8px; }
.contacts__urgent a { color: #efeae0; border-bottom: 1px solid var(--gold); }
.contacts__mail { display: inline-block; margin-top: 18px; color: var(--gold); font-size: 17px; }
.offices { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line-dark); }
.office h3 { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.office h3 span { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.office p { font-size: 14px; color: #b7b2a6; }

/* Footer */
.foot { background: #0c0c0a; color: #9b978c; padding: 64px 0 30px; }
.foot__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 44px; padding-bottom: 40px; border-bottom: 1px solid var(--line-dark); }
.brand--foot .brand__logo { height: 34px; }
.foot__brand p { margin-top: 18px; font-size: 14px; max-width: 380px; line-height: 1.7; }
.foot__nav { display: flex; flex-direction: column; gap: 12px; }
.foot__nav a { font-family: var(--serif); font-size: 14px; color: #cdc8bc; transition: color .2s; }
.foot__nav a:hover { color: var(--gold); }
.foot__legal p { font-size: 14px; margin-bottom: 8px; }
.foot__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 26px; font-size: 13px; }
.foot__bottom a:hover { color: var(--gold); }

/* Letters of gratitude (gallery) */
.section--ink .lead-head__note { color: #cdc8bc; }
.letters { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x proximity; padding: 10px max(28px, calc((100% - 1200px) / 2 + 28px)) 26px; scrollbar-width: thin; scrollbar-color: var(--gold) rgba(255,255,255,.12); }
.letters::-webkit-scrollbar { height: 6px; }
.letters::-webkit-scrollbar-track { background: rgba(255,255,255,.12); }
.letters::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 6px; }
.letter { flex: 0 0 auto; width: 290px; scroll-snap-align: start; background: #fff; padding: 14px; box-shadow: 0 20px 44px -22px rgba(0,0,0,.7); transition: transform .3s var(--ease, ease), box-shadow .3s; }
.letter:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -20px rgba(216,31,38,.45); }
.letter img { width: 100%; height: 372px; object-fit: contain; background: #fff; display: block; }

/* Floating contact widget */
.cw { position: fixed; right: 26px; bottom: 26px; z-index: 95; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cw__list { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cw__btn { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(127, 0, 0, .6); opacity: 0; transform: translateY(14px) scale(.5); pointer-events: none; transition: opacity .3s var(--ease, ease), transform .3s cubic-bezier(.34, 1.56, .64, 1), background .2s; }
.cw__btn svg { width: 23px; height: 23px; }
.cw__btn:hover { background: #b3171d; }
.cw__btn::after { content: attr(data-label); position: absolute; right: 64px; top: 50%; transform: translateY(-50%); background: var(--ink); color: #fff; font-family: var(--serif); font-weight: 600; font-size: 12.5px; letter-spacing: .01em; padding: 7px 12px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.cw__btn::before { content: ""; position: absolute; right: 58px; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-left-color: var(--ink); opacity: 0; transition: opacity .2s; }
.cw__btn:hover::after, .cw__btn:hover::before { opacity: 1; }
.cw.open .cw__btn { opacity: 1; transform: none; pointer-events: auto; }
.cw.open .cw__btn:nth-child(4) { transition-delay: .04s; }
.cw.open .cw__btn:nth-child(3) { transition-delay: .09s; }
.cw.open .cw__btn:nth-child(2) { transition-delay: .14s; }
.cw.open .cw__btn:nth-child(1) { transition-delay: .19s; }

.cw__toggle { position: relative; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; background: var(--gold); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(127, 0, 0, .65); transition: background .25s, transform .25s; }
.cw__toggle:hover { transform: scale(1.05); }
.cw__toggle::before { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(216, 31, 38, .45); animation: cwPulse 2.6s infinite; }
.cw__icon { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity .25s, transform .25s; }
.cw__icon svg { width: 26px; height: 26px; }
.cw__icon--close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.cw.open .cw__toggle { background: var(--ink); }
.cw.open .cw__toggle::before { animation: none; }
.cw.open .cw__icon--phone { opacity: 0; transform: rotate(90deg) scale(.6); }
.cw.open .cw__icon--close { opacity: 1; transform: none; }
@keyframes cwPulse { 0% { box-shadow: 0 0 0 0 rgba(216, 31, 38, .45); } 70% { box-shadow: 0 0 0 16px rgba(216, 31, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(216, 31, 38, 0); } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1100px) {
  .menu { display: none; }
  .burger { display: flex; }
  .head__cta { display: none; }
  .head__inner { gap: 16px; }
  .menu.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 28px 22px; gap: 0; box-shadow: 0 24px 40px -20px rgba(0,0,0,.3); }
  .menu.open a { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .menu.open a::after { display: none; }
}
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__media { min-height: 320px; order: -1; }
  .hero__media::before { display: none; }
  .company, .contacts { grid-template-columns: 1fr; gap: 40px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .docs { grid-template-columns: repeat(2, 1fr); }
  .lead-head--row { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 680px) {
  .topbar__geo { display: none; }
  .topbar__inner { justify-content: center; }
  .brand__logo { height: 34px; }
  .section { padding: 64px 0; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics div { padding-left: 20px; }
  .metrics div:nth-child(odd) { border-left: none; padding-left: 0; }
  .metrics div:nth-child(3), .metrics div:nth-child(4) { border-top: 1px solid var(--line); margin-top: -1px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .svc__item { grid-template-columns: 50px 1fr; }
  .gallery, .docs { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .person img { width: 130px; height: 130px; }
  .offices { grid-template-columns: 1fr; }
  .foot__inner { grid-template-columns: 1fr; gap: 30px; }
  .cw { right: 16px; bottom: 16px; }
  .cw__toggle { width: 56px; height: 56px; }
  .cw__btn { width: 48px; height: 48px; }
}
@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
  .metrics div { border-left: none; padding-left: 0; border-top: 1px solid var(--line); margin-top: -1px; }
  .metrics div:first-child { border-top: none; }
  .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .shot img { transition: none; }
  .cw__toggle::before { animation: none; }
  .cw__btn { transition: opacity .2s; }
}

/* ===== Page: Шурфы / вскрытие конструкций ===== */
.menu a.is-active { color: var(--ink); }
.menu a.is-active::after { right: 0; }

.crumbs { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.crumbs .wrap { padding-top: 15px; padding-bottom: 15px; }
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--gold); }
.crumbs span { margin: 0 9px; color: var(--muted-light); }
.crumbs b { color: var(--ink); font-weight: 600; font-family: var(--serif); }

.adv { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; border-top: 1px solid var(--line); }
.adv li { display: flex; gap: 12px; align-items: flex-start; padding: 28px 22px 30px 24px; border-left: 1px solid var(--line); font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--ink); }
.adv li:first-child { border-left: none; padding-left: 0; }
.adv__mark { flex: none; width: 10px; height: 10px; margin-top: 5px; background: var(--gold); transform: rotate(45deg); }
.adv__ico { flex: none; width: 36px; height: 36px; margin-top: -3px; object-fit: contain; }

.pcards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pcard { border: 1px solid var(--line); overflow: hidden; transition: border-color .25s, box-shadow .25s, transform .25s; }
.pcard:hover { border-color: var(--gold); box-shadow: 0 22px 46px -26px rgba(127, 0, 0, .45); transform: translateY(-4px); }
.pcard__media { height: 320px; overflow: hidden; background: var(--paper-2); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: grayscale(1) contrast(1.03); transition: filter .5s, transform .6s; }
.pcard:hover .pcard__media img { filter: grayscale(0); transform: scale(1.04); }
.pcard__body { padding: 28px 30px 32px; }
.pcard__title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.pcard__text { color: var(--muted); font-size: 15.5px; }

.lab { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.lab__media { overflow: hidden; }
.lab__media img { width: 100%; height: 100%; max-height: 440px; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.lab__note { color: #cdc8bc; margin-top: 20px; margin-bottom: 30px; font-size: 16.5px; }
.lab__list { list-style: none; display: grid; gap: 22px; }
.lab__list li { padding-left: 22px; border-left: 2px solid var(--gold); }
.lab__list b { display: block; font-family: var(--serif); font-weight: 700; font-size: 17px; color: #fff; margin-bottom: 5px; }
.lab__list span { color: #b7b2a6; font-size: 14.5px; }

.band { position: relative; padding: 96px 0; background: var(--bg) center/cover no-repeat, var(--ink); color: #fff; }
.band__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,9,.92) 0%, rgba(10,10,9,.74) 55%, rgba(10,10,9,.5) 100%); }
.band__inner { position: relative; max-width: 720px; }
.band__title { font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 3.4vw, 38px); color: #fff; margin-bottom: 16px; }
.band__text { color: #d8d3c8; font-size: 17px; margin-bottom: 30px; }

/* Wider hero image (Шурфы) */
@media (min-width: 1001px) {
  .hero--wide .hero__grid { grid-template-columns: 0.78fr 1.22fr; gap: 48px; align-items: center; }
  .hero--wide .hero__media { min-height: 0; align-self: center; aspect-ratio: 3 / 2; }
  .hero--wide .hero__media img { object-position: center; }
}

.aud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.aud__item { display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line); padding: 28px 24px; font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--ink); transition: border-color .2s; }
.aud__item:hover { border-color: var(--gold); }
.aud__idx { font-family: var(--serif); font-weight: 800; font-size: 14px; color: var(--gold-deep); }

.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why__item { border: 1px solid var(--line); padding: 30px 28px; }
.why__item h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px solid var(--gold); display: inline-block; }
.why__item p { color: var(--muted); font-size: 15px; }
.why__item ul { list-style: none; }
.why__item li { position: relative; padding-left: 22px; margin-bottom: 9px; color: var(--muted); font-size: 15px; }
.why__item li:last-child { margin-bottom: 0; }
.why__item li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }

.price { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 840px; }
.price__card { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; border: 1px solid var(--line); padding: 36px 34px; transition: border-color .25s, box-shadow .25s; }
.price__card:hover { border-color: var(--gold); box-shadow: 0 22px 46px -26px rgba(127, 0, 0, .4); }
.price__label { font-family: var(--serif); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.price__val { font-family: var(--serif); font-weight: 800; font-size: 38px; line-height: 1; color: var(--ink); }
.price__val small { display: block; font-family: var(--body); font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 10px; }

@media (max-width: 1000px) {
  .lab { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .pcards, .aud, .why { grid-template-columns: 1fr 1fr; }
  .price { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .adv { grid-template-columns: 1fr 1fr; }
  .adv li { padding: 22px 0; border-left: none; }
  .pcards, .aud, .why { grid-template-columns: 1fr; }
}

/* ============================================================
   Page: Технический заказчик (/technical-customer)
   ============================================================ */
.section--paper-flat { background: var(--white); }

/* Highlighted nav item */
.menu a.menu-hot { background: var(--gold); color: #fff; padding: 9px 15px; border-radius: 5px; font-weight: 700; }
.menu a.menu-hot::after { display: none; }
.menu a.menu-hot:hover { background: #b3171d; color: #fff; }

/* Hero extras */
.hero__sub { font-size: 18px; color: var(--muted); max-width: 560px; margin-bottom: 18px; }
.tldr { background: var(--paper); border-left: 3px solid var(--gold); padding: 16px 20px; font-size: 15.5px; color: var(--text); max-width: 600px; margin-bottom: 24px; }
.tldr b { font-family: var(--serif); color: var(--ink); }
.hero__facts--row { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.hero__facts--row li { margin-bottom: 0; }

/* Table of contents */
.toc { border-bottom: 1px solid var(--line); background: #fff; }
.toc__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 15px 0; }
.toc__label { font-family: var(--serif); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc a { font-family: var(--serif); font-weight: 600; font-size: 14px; color: var(--muted); transition: color .2s; }
.toc a:hover { color: var(--gold-deep); }

/* Pre-Development block */
.predev { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 48px; align-items: start; }
.predev__lead { font-size: 18px; color: var(--text); margin: 18px 0; }
.predev__note { color: var(--muted); font-size: 15.5px; }
.bankpack { background: var(--ink); color: #fff; padding: 32px 30px; }
.bankpack__title { font-family: var(--serif); font-weight: 700; font-size: 19px; margin-bottom: 18px; }
.bankpack__list { list-style: none; }
.bankpack__list li { position: relative; padding-left: 30px; margin-bottom: 13px; font-size: 15px; color: #e5e0d6; }
.bankpack__list li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: var(--gold); font-weight: 800; }

/* Tick lists */
.ticks { list-style: none; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 11px; color: var(--muted); font-size: 15.5px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold-deep); font-weight: 800; }

/* Tabs */
.tabs__nav { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.tabs__btn { font-family: var(--serif); font-weight: 700; font-size: 15px; padding: 14px 22px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s; }
.tabs__btn:hover { color: var(--ink); }
.tabs__btn.is-active { color: var(--ink); border-bottom-color: var(--gold); }
.tabs__panel h3 { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--ink); margin-bottom: 18px; }

/* Accordion (details/summary) */
.acc__item { border: 1px solid var(--line); margin-bottom: 12px; background: #fff; }
.acc__head { cursor: pointer; padding: 20px 24px; font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 14px; }
.acc__head::-webkit-details-marker { display: none; }
.acc__head::after { content: "+"; margin-left: auto; font-weight: 700; font-size: 22px; color: var(--gold-deep); transition: transform .25s; }
.acc__item[open] > .acc__head::after { content: "−"; }
.acc__item[open] > .acc__head { border-bottom: 1px solid var(--line); }
.acc__idx { color: var(--gold-deep); font-size: 16px; }
.acc__hint { margin-left: 8px; font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--muted); }
.acc--faq .acc__head { font-size: 16.5px; }
.acc--faq .acc__head::after, .acc__item[open] > .acc__head::after { margin-left: auto; }
.acc__body { padding: 20px 24px 24px; }
.acc__result { margin-top: 14px; color: var(--muted); font-size: 15px; }

/* Comparison table */
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); }
.cmp { width: 100%; border-collapse: collapse; min-width: 700px; }
.cmp th, .cmp td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.cmp thead th { font-family: var(--serif); font-weight: 700; color: var(--ink); background: var(--paper); }
.cmp td:first-child, .cmp thead th:first-child { color: var(--muted); }
.cmp tr:last-child td { border-bottom: none; }
.cmp__hot { background: rgba(216, 31, 38, .06); }
.cmp th.cmp__hot { color: var(--gold-deep); }
.cmp td.cmp__hot { font-family: var(--serif); font-weight: 600; color: var(--ink); }

/* Cases */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.case { border: 1px solid var(--line); padding: 30px 28px; transition: border-color .25s, box-shadow .25s; }
.case:hover { border-color: var(--gold); box-shadow: 0 22px 46px -26px rgba(127,0,0,.4); }
.case__tag { font-family: var(--serif); font-weight: 600; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.case__num { font-family: var(--serif); font-weight: 800; font-size: clamp(32px, 4vw, 42px); color: var(--gold-deep); line-height: 1; margin: 14px 0 10px; }
.case__text { color: var(--muted); font-size: 15px; }
.docs__cap { font-family: var(--serif); font-weight: 600; color: var(--muted); }

/* Stories / article */
.article .h2 { max-width: 920px; }
.article__lead { font-size: 18px; color: var(--muted); margin: 22px 0 30px; max-width: 840px; }
.stories { list-style: none; display: grid; gap: 20px; }
.story { border-left: 3px solid var(--gold); padding: 6px 0 6px 24px; }
.story h3 { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.story p { color: var(--muted); font-size: 15.5px; max-width: 820px; }

/* Glossary */
.gloss { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.gloss__card { border: 1px solid var(--line); padding: 26px 24px; }
.gloss__card h3 { font-family: var(--serif); font-size: 16.5px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.gloss__card p { color: var(--muted); font-size: 14.5px; }

/* Experience metrics on dark */
.metrics--light { border-top-color: var(--line-dark); margin-top: 40px; }
.metrics--light div { border-left-color: var(--line-dark); }
.metrics--light dt { color: #fff; }
.metrics--light dt::after { background: var(--gold); }
.metrics--light dd { color: #b7b2a6; }
.about__quote { margin-top: 36px; font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.5; color: #fff; max-width: 920px; border-left: 3px solid var(--gold); padding-left: 24px; }

/* Lead form extras */
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
#lead .consent { display: flex; align-items: flex-start; gap: 11px; text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 400; font-size: 13.5px; color: #cdc8bc; margin-bottom: 18px; }
#lead .consent input { width: auto; margin: 3px 0 0; padding: 0; flex: none; accent-color: var(--gold); }
.consent__err { color: #ff8a8a; font-size: 13px; margin: -6px 0 12px; }
.need-consent .consent span { color: #ff8a8a; }
.backlink { margin: 26px 0 4px; }

/* Mobile fixed CTA */
.mcta { display: none; }

@media (max-width: 1000px) {
  .predev { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .cases, .gloss { grid-template-columns: 1fr 1fr; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 680px) {
  .cases, .gloss { grid-template-columns: 1fr; }
  .mcta { display: flex; align-items: center; justify-content: center; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80; padding: 15px 18px; background: var(--gold); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 15px; text-align: center; border-radius: 6px; box-shadow: 0 12px 30px -8px rgba(127,0,0,.6); }
  .cw { bottom: 86px; }
  .acc__hint { display: none; }
}

/* Service item: "Новое" badge + link to subpage (home) */
.svc__badge { display: inline-block; vertical-align: middle; margin-left: 10px; font-family: var(--body); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--gold); padding: 3px 9px; border-radius: 3px; }
.svc__more { display: inline-block; margin-top: 14px; font-family: var(--serif); font-weight: 700; font-size: 14.5px; color: var(--gold-deep); transition: color .2s; }
.svc__more:hover { color: var(--gold); }

/* Smooth tab switching */
.tabs__panel.is-active { animation: tabIn .38s cubic-bezier(.16, 1, .3, 1); }
@keyframes tabIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.tabs__btn { position: relative; }
.tabs__btn::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -1px; height: 2px; background: var(--gold); transition: right .3s cubic-bezier(.16, 1, .3, 1); }
.tabs__btn.is-active { border-bottom-color: transparent; }
.tabs__btn.is-active::after { right: 0; }
@media (prefers-reduced-motion: reduce) {
  .tabs__panel.is-active { animation: none; }
  .tabs__btn::after { transition: none; }
}

/* ============================================================
   Global motion: page transitions, entrances, micro-interactions
   ============================================================ */

/* Smooth cross-page transitions (View Transitions API, MPA) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: pageOut .26s ease both; }
::view-transition-new(root) { animation: pageIn .46s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes pageOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(18px); } }

/* Keyframes */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Hero entrance on load (staggered) */
.hero__text > * { animation: fadeUp .7s cubic-bezier(.16, 1, .3, 1) both; }
.hero__text > *:nth-child(1) { animation-delay: .05s; }
.hero__text > *:nth-child(2) { animation-delay: .12s; }
.hero__text > *:nth-child(3) { animation-delay: .19s; }
.hero__text > *:nth-child(4) { animation-delay: .26s; }
.hero__text > *:nth-child(5) { animation-delay: .33s; }
.hero__text > *:nth-child(6) { animation-delay: .40s; }
.hero__media { animation: fadeUp .8s cubic-bezier(.16, 1, .3, 1) both; animation-delay: .2s; }

/* Reveal directional variants (base .reveal defined earlier) */
.reveal--left { transform: translateX(-32px); }
.reveal--right { transform: translateX(32px); }
.reveal--scale { transform: scale(.93); }
.reveal--left.in, .reveal--right.in, .reveal--scale.in { transform: none; }

/* Button & link micro-interactions */
.btn { will-change: transform; }
.btn--gold:hover, .btn--line:hover, .btn--ghost-dark:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.svc__more { transition: color .2s, transform .25s; }
.svc__more:hover { transform: translateX(6px); }
.brand__logo { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.brand:hover .brand__logo { transform: scale(1.04); }
.toc a { transition: color .2s, transform .2s; display: inline-block; }
.toc a:hover { transform: translateY(-1px); }

/* Card / list hover lifts */
.gloss__card { transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .25s, box-shadow .25s; will-change: transform; }
.gloss__card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 20px 42px -26px rgba(127,0,0,.4); }
.office { transition: transform .25s; }
.office:hover { transform: translateX(5px); }
.bankpack__list li, .ticks li { transition: transform .2s; }
.bankpack__list li:hover, .ticks li:hover { transform: translateX(4px); }
.crumbs a { transition: color .2s; }

/* Accordion body smooth reveal on open */
.acc__item[open] > .acc__body { animation: accIn .34s cubic-bezier(.16, 1, .3, 1); }
@keyframes accIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.acc__head { transition: background .2s, color .2s; }
.acc__head:hover { color: var(--gold-deep); }

/* Floating widget / mobile CTA entrance */
.cw { animation: fadeIn .6s ease both; animation-delay: .45s; }
.mcta { animation: fadeUp .5s ease both; }

/* Section heading underline grow on reveal */
.h2::after { transition: width .5s cubic-bezier(.16,1,.3,1) .15s; }
.lead-head:not(.in) .h2::after, .reveal:not(.in) .h2::after { width: 0; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .hero__text > *, .hero__media, .cw, .mcta { animation: none !important; }
  .acc__item[open] > .acc__body { animation: none !important; }
  .btn--gold:hover, .btn--line:hover, .btn--ghost-dark:hover,
  .gloss__card:hover, .office:hover, .svc__more:hover,
  .brand:hover .brand__logo, .bankpack__list li:hover, .ticks li:hover { transform: none; }
  .h2::after { transition: none; width: 56px; }
}

/* Bitrix24 embedded form — light card inside dark contacts section */
.b24form { background: #fff; padding: 26px 26px 14px; border-radius: 6px; box-shadow: 0 24px 50px -28px rgba(0,0,0,.6); }
.section--ink .b24form { color: var(--ink); }
@media (max-width: 680px) { .b24form { padding: 20px 18px 10px; } }

/* ===== Lead modal (popup request form) ===== */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal__overlay { position: fixed; inset: 0; background: rgba(10, 10, 9, .62); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s ease; }
.modal.is-open .modal__overlay { opacity: 1; }
.modal__dialog { position: relative; z-index: 1; width: 100%; max-width: 540px; background: #fff; border-radius: 8px; padding: 40px 38px 30px; box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .65); opacity: 0; transform: translateY(28px) scale(.97); transition: opacity .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1); }
.modal.is-open .modal__dialog { opacity: 1; transform: none; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--paper); border: none; border-radius: 50%; cursor: pointer; color: var(--ink); transition: background .2s, transform .3s; }
.modal__close:hover { background: var(--line); transform: rotate(90deg); }
.modal__close svg { width: 20px; height: 20px; }
.modal__title { font-family: var(--serif); font-weight: 800; font-size: 26px; color: var(--ink); margin-bottom: 10px; padding-right: 44px; }
.modal__note { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
#modalFormHost { min-height: 60px; }
@media (max-width: 560px) {
  .modal { padding: 0; align-items: stretch; }
  .modal__dialog { max-width: none; min-height: 100%; border-radius: 0; padding: 64px 22px 30px; }
}

/* Fix: Bitrix form already is a dark card — drop the white modal frame */
.modal__dialog { background: transparent; padding: 0; box-shadow: none; max-width: 520px; }
.modal__title, .modal__note { display: none; }
.modal__close { top: 8px; right: 8px; background: rgba(255, 255, 255, .16); color: #fff; z-index: 3; }
.modal__close:hover { background: rgba(255, 255, 255, .32); color: #fff; }
@media (max-width: 560px) {
  .modal { padding: 24px 12px; align-items: flex-start; }
  .modal__dialog { min-height: auto; border-radius: 0; padding: 0; }
}
