/* =========================================================
   Ulytau Project Group — final site
   Инженерный премиум: тёплая бумага, графит, строительный жёлтый
   ========================================================= */

/* --- 1. Токены ------------------------------------------------------- */

:root {
  --paper: #f7f4ef;
  --paper-raised: #fffdfa;
  --sand: #ece6dc;
  --ink: #191a1c;
  --ink-soft: #3d3f42;
  --muted: #6d6a65;
  --muted-dark: #a09a91;
  --line: rgba(25, 26, 28, 0.13);
  --line-strong: rgba(25, 26, 28, 0.26);
  --dark: #16181b;
  --dark-raised: #1e2125;
  --dark-line: rgba(255, 255, 255, 0.14);
  --accent: #f2b01a;
  --accent-deep: #c78c00;
  --accent-text: #8a6100;
  --accent-ink: #1a1400;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --shell: 1280px;
  --gutter: 20px;
  --header-h: 68px;

  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 40px; --header-h: 76px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 56px; --header-h: 84px; }
}

/* --- 2. База --------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

/* Один выразительный display-акцент на страницу */
h1 { font-size: clamp(1.95rem, 1.25rem + 2.9vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.25rem); }
h3 { font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem); letter-spacing: -0.01em; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--accent); }

::selection { background: var(--accent); color: var(--accent-ink); }

/* --- 3. Раскладка ---------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 112px); }
.section--tight { padding-block: clamp(44px, 6vw, 80px); }

.section--dark {
  background: var(--dark);
  color: var(--paper);
}
.section--sand { background: var(--sand); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.section--dark .rule { background: var(--dark-line); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  font-size: 0.875rem;
  transition: top 0.18s var(--ease);
}
.skip-link:focus-visible { top: 12px; }

/* --- 4. Типографские примитивы --------------------------------------- */

.kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.section--dark .kicker, .on-dark .kicker { color: var(--muted-dark); }

.kicker--accent { color: var(--accent-text); }
.section--dark .kicker--accent { color: var(--accent); }

.lead {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 56ch;
}
.section--dark .lead, .on-dark .lead { color: rgba(247, 244, 239, 0.76); }

.muted { color: var(--muted); }
.section--dark .muted { color: var(--muted-dark); }

.section-head {
  display: grid;
  gap: 18px 48px;
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 52px);
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); }
  .section-head > p.lead { justify-self: end; }
}
.section-head h2 { margin-top: 12px; }

/* --- 5. Кнопки и ссылки ---------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn__arrow { transition: transform 0.2s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-ink); }

.btn--outline { border-color: var(--line-strong); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); background: rgba(25, 26, 28, 0.04); }

.section--dark .btn--outline, .on-dark .btn--outline {
  border-color: var(--dark-line);
  color: var(--paper);
}
.section--dark .btn--outline:hover, .on-dark .btn--outline:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.link:hover { border-color: var(--accent-text); color: var(--accent-text); }
.link span { transition: transform 0.2s var(--ease); }
.link:hover span { transform: translateX(4px); }

.section--dark .link, .on-dark .link { border-color: var(--dark-line); }
.section--dark .link:hover, .on-dark .link:hover { color: var(--accent); border-color: var(--accent); }

/* --- 6. Шапка -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 239, 0.9);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }

.brand__mark { width: 34px; height: 34px; flex: none; }

.brand__text { display: grid; line-height: 1; }
.brand__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}
.brand__sub {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-top: 4px;
}

.nav { display: none; }
@media (min-width: 1000px) {
  .nav { display: flex; align-items: center; gap: 32px; margin-right: 32px; }
}
.nav a {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  padding-block: 6px;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right 0.25s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.header-phone {
  display: none;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  padding-block: 6px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.header-phone:hover { border-bottom-color: var(--ink); }
@media (min-width: 560px) { .header-phone { display: inline-block; } }

.header-cta { display: none; }
@media (min-width: 1000px) {
  .header-cta { display: inline-flex; margin-left: 24px; padding: 11px 20px; }
}

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  margin-left: 8px;
  padding: 0 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
@media (min-width: 1000px) { .burger { display: none; } }
.burger span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* Мобильное меню */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 28px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.drawer.is-open { opacity: 1; transform: none; visibility: visible; }
@media (min-width: 1000px) { .drawer { display: none; } }

/* Без JS меню остаётся раскрытым, чтобы навигация не пропала */
.no-js .drawer {
  position: static;
  inset: auto;
  opacity: 1;
  visibility: visible;
  transform: none;
  overflow: visible;
}
.no-js .burger { display: none; }

.drawer a.drawer__item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.drawer a.drawer__item i {
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.drawer__foot { margin-top: 24px; display: grid; gap: 12px; }
.drawer__foot .btn { justify-content: center; }
.drawer__phone { font-size: 1.0625rem; font-weight: 600; text-align: center; }

/* --- 7. Главный экран ------------------------------------------------ */

.hero { padding-block: clamp(40px, 5vw, 76px) 0; }

.hero__grid {
  display: grid;
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 64px; }
}

.hero__copy { max-width: 640px; }
.hero__copy h1 { margin: 18px 0 20px; }
.hero__copy .lead { max-width: 48ch; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  margin-top: 32px;
}

.hero__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sand);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--paper);
  padding: 12px 18px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Подтверждённые факты */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.facts > div {
  padding: 24px 20px 24px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .facts > div { border-bottom: 0; padding: 30px 24px 30px 0; }
  .facts > div + div { border-left: 1px solid var(--line); padding-left: 28px; }
}
.facts dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 8px;
  line-height: 1.3;
}

/* --- 8. Компактный hero внутренних страниц --------------------------- */

.phero {
  padding-block: clamp(36px, 4.5vw, 68px) clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid var(--line);
}
.phero__grid { display: grid; gap: 20px 48px; align-items: end; }
@media (min-width: 900px) {
  .phero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .phero__grid > .lead { justify-self: end; padding-bottom: 6px; }
}
.phero h1 {
  font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.7rem);
  margin-top: 14px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 18px;
}
.crumbs a { border-bottom: 1px solid transparent; }
.crumbs a:hover { border-bottom-color: var(--line-strong); color: var(--ink); }
.crumbs span[aria-hidden] { opacity: 0.5; }

.strip {
  position: relative;
  aspect-ratio: 21 / 7;
  min-height: 180px;
  overflow: hidden;
  background: var(--sand);
}
.strip img { width: 100%; height: 100%; object-fit: cover; }

/* --- 9. Объекты ------------------------------------------------------ */

.objects__grid {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr);
}

.object {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--dark-raised);
  aspect-ratio: 4 / 3;
}

@media (min-width: 640px) and (max-width: 999px) {
  .objects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .objects__item--wide { grid-column: span 2; }
  .objects__item--wide .object { aspect-ratio: 16 / 9; }
}
@media (min-width: 1000px) {
  .objects__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.object img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.3s var(--ease);
  opacity: 0.92;
}
.object:hover img, .object:focus-visible img { transform: scale(1.035); opacity: 1; }

.object__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px;
  display: grid;
  gap: 6px;
  background: linear-gradient(to top, rgba(10, 11, 12, 0.82), rgba(10, 11, 12, 0));
  color: #fff;
}
.object__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.object__title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }

/* --- 10. Услуги: сканируемый список ---------------------------------- */

.svc-list { border-top: 1px solid var(--line); }
.section--dark .svc-list { border-color: var(--dark-line); }

.svc-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s var(--ease);
}
@media (min-width: 900px) {
  .svc-row {
    grid-template-columns: 64px minmax(0, 300px) minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 28px;
    padding: 28px 0;
  }
}
.svc-row:hover { background: rgba(25, 26, 28, 0.025); }

.svc-row__num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-text);
  padding-top: 4px;
}
.svc-row__title { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.375rem); font-weight: 600; letter-spacing: -0.015em; }
.svc-row__text { color: var(--muted); font-size: 0.9375rem; grid-column: 1 / -1; }
@media (min-width: 900px) { .svc-row__text { grid-column: auto; } }
.svc-row__go {
  grid-column: 1 / -1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-text);
  white-space: nowrap;
}
@media (min-width: 900px) { .svc-row__go { grid-column: auto; justify-self: end; } }
.svc-row__go i { font-style: normal; display: inline-block; transition: transform 0.2s var(--ease); }
.svc-row:hover .svc-row__go i { transform: translateX(4px); }

/* Развёрнутые карточки услуг (services.html) */
.svc-detail {
  display: grid;
  gap: 24px 56px;
  padding-block: clamp(36px, 4.5vw, 64px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
@media (min-width: 900px) {
  .svc-detail { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }
  .svc-detail:nth-child(even) .svc-detail__media { order: 2; }
}
.svc-detail__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sand);
}
.svc-detail__media img { width: 100%; height: 100%; object-fit: cover; }

.svc-detail__body h2 { margin: 12px 0 16px; }
.svc-detail__body .lead { margin-bottom: 22px; }

.checks { display: grid; gap: 10px; margin-bottom: 26px; }
.checks li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.checks li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 8px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* --- 11. Ресурсы компании -------------------------------------------- */

.resources { display: grid; gap: clamp(32px, 4vw, 60px); }
@media (min-width: 1000px) {
  .resources { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
}
.resources__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--dark-raised); }
.resources__media img { width: 100%; height: 100%; object-fit: cover; }

.res-list { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 28px; }
.section--dark .res-list { border-color: var(--dark-line); }
.res-list > li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.section--dark .res-list > li { border-color: var(--dark-line); }
.res-list b {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-text);
  padding-top: 3px;
}
.section--dark .res-list b { color: var(--accent); }
.res-list h3 { grid-column: 2; }
.res-list p { grid-column: 2; font-size: 0.9375rem; color: var(--muted); margin-top: 6px; }
.section--dark .res-list p { color: var(--muted-dark); }

/* --- 12. Этапы ------------------------------------------------------- */

.stages {
  display: grid;
  gap: 0;
  counter-reset: stage;
}
@media (min-width: 700px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; } }
@media (min-width: 1100px) { .stages { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 28px; } }

.stages > li {
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
}
.section--dark .stages > li { border-color: var(--dark-line); }
.stages__num {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-text);
  margin-bottom: 12px;
}
.section--dark .stages__num { color: var(--accent); }
.stages h3 { margin-bottom: 8px; }
.stages p { font-size: 0.9375rem; color: var(--muted); }
.section--dark .stages p { color: var(--muted-dark); }

/* --- 13. Авторская scroll-анимация города ---------------------------- */

.city-scroll {
  position: relative;
  height: 200vh;
  background: var(--accent);
}

.city-sticky {
  --city-far: 180px;
  --city-mid: 300px;
  --city-front: 440px;
  --building-scale: 1.8;
  --city-lift: 0px;
  --city-stage-opacity: 1;
  --floor-height: 8vh;
  --crane-left: -160px;
  --crane-right: 180px;
  --crane-opacity: 1;
  --city-title: 0px;
  --city-copy-opacity: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 660px;
  overflow: hidden;
  color: var(--ink);
  background: var(--accent);
}

.city-copy {
  position: absolute;
  z-index: 2;
  top: 14vh;
  left: max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)));
  opacity: var(--city-copy-opacity);
  transform: translateY(calc(var(--city-title) + var(--city-lift)));
  will-change: transform, opacity;
}
.city-copy .kicker { margin-bottom: 22px; color: var(--ink); }
.city-copy h2 {
  font-size: clamp(4.5rem, 10vw, 9.375rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.city-progress {
  position: absolute;
  z-index: 20;
  top: 50%;
  right: 30px;
  width: 2px;
  height: 180px;
  background: rgba(25, 26, 28, 0.2);
  transform: translateY(-50%);
}
.city-progress span { display: block; width: 100%; height: 0; background: var(--ink); }

.city-layer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 62%;
  opacity: var(--city-stage-opacity);
  will-change: transform, opacity;
}
.city-layer i {
  position: absolute;
  bottom: 0;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  display: block;
  background: currentColor;
  transform: scaleY(var(--building-scale));
  transform-origin: center bottom;
}
.city-layer i::after {
  content: "";
  position: absolute;
  inset: 12px 10px auto;
  height: 8px;
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  opacity: 0.35;
}
.city-far { z-index: 1; color: var(--accent-deep); transform: translateY(calc(var(--city-far) + var(--city-lift))); }
.city-mid { z-index: 3; color: #34383b; transform: translateY(calc(var(--city-mid) + var(--city-lift))); }
.city-front { z-index: 5; height: 48%; color: var(--ink); transform: translateY(calc(var(--city-front) + var(--city-lift))); }
.city-floor { position: absolute; z-index: 8; right: 0; bottom: 0; left: 0; height: var(--floor-height); background: var(--ink); }

.crane {
  position: absolute;
  z-index: 4;
  bottom: 32%;
  width: 380px;
  height: 420px;
  color: var(--ink);
  opacity: var(--crane-opacity);
  will-change: transform, opacity;
}
.crane-left { left: 8%; transform: translate(var(--crane-left), var(--city-lift)); }
.crane-right { right: 5%; bottom: 27%; transform: translate(var(--crane-right), var(--city-lift)) scale(0.82); }
.crane-mast { position: absolute; bottom: 0; left: 70px; width: 12px; height: 330px; display: block; background: currentColor; }
.crane-jib { position: absolute; top: 80px; left: 30px; width: 340px; height: 10px; display: block; background: currentColor; transform: skewX(-32deg); transform-origin: left; }
.crane-jib::before { content: ""; position: absolute; left: 48px; bottom: 10px; width: 92px; height: 9px; background: currentColor; }
.crane-cable { position: absolute; top: 88px; left: 288px; width: 2px; height: 190px; display: block; background: currentColor; }
.crane-hook { position: absolute; top: 270px; left: 279px; width: 18px; height: 24px; display: block; border-right: 4px solid currentColor; border-bottom: 4px solid currentColor; }

@media (max-width: 720px) {
  .city-sticky { --building-scale: 1.55; height: 100svh; min-height: 100svh; }
  .city-copy { top: 14vh; right: 16px; left: 16px; }
  .city-copy h2 { font-size: clamp(2.75rem, 12vw, 3.75rem); line-height: 0.84; overflow-wrap: anywhere; }
  .city-progress { right: 15px; }
  .crane { transform: scale(0.66); transform-origin: bottom left; }
  .crane-left { left: -2%; transform: translate(var(--crane-left), var(--city-lift)) scale(0.66); }
  .crane-right { right: -20%; transform: translate(var(--crane-right), var(--city-lift)) scale(0.55); }
}

/* --- 14. Портфолио --------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"],
.chip[aria-checked="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.section--dark .chip, .on-dark .chip { border-color: var(--dark-line); color: var(--paper); }
.section--dark .chip:hover, .on-dark .chip:hover { border-color: rgba(255, 255, 255, 0.55); }
.section--dark .chip[aria-pressed="true"], .on-dark .chip[aria-pressed="true"],
.section--dark .chip[aria-checked="true"], .on-dark .chip[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.works {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .works { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.work { background: var(--paper-raised); border: 1px solid var(--line); }
.work[hidden] { display: none; }
.work__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.work__media img { width: 100%; height: 100%; object-fit: cover; }
.work__body { padding: 18px 20px 22px; display: grid; gap: 8px; }
.work__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.work__body h3 { font-size: 1.0625rem; }
.work__body p { font-size: 0.9375rem; color: var(--muted); }

.works-status { font-size: 0.875rem; color: var(--muted); margin-top: 20px; }

.note {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 20px;
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 62ch;
}

/* --- 14. Контакты ---------------------------------------------------- */

.contact-grid { display: grid; gap: clamp(32px, 4vw, 56px); }
@media (min-width: 1000px) {
  .contact-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.tiles { display: grid; gap: 4px; margin-top: 22px; }
@media (min-width: 480px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tile {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
    background-color 0.2s var(--ease);
}
.tile:hover { border-color: var(--ink); transform: translateY(-2px); }
.tile span {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.tile strong { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; word-break: break-word; }

.tile--primary {
  grid-column: 1 / -1;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.tile--primary span { color: rgba(26, 20, 0, 0.78); }
.tile--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-ink); }
.tile--primary:hover span { color: rgba(26, 20, 0, 0.78); }

.on-dark .tile { background: var(--dark-raised); border-color: var(--dark-line); color: var(--paper); }
.on-dark .tile:hover { border-color: rgba(255, 255, 255, 0.55); }
.on-dark .tile span { color: var(--muted-dark); }
.on-dark .tile--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.on-dark .tile--primary span { color: rgba(26, 20, 0, 0.78); }

.selected-line { font-size: 0.9375rem; color: var(--muted); margin-top: 16px; }
.selected-line strong { color: var(--ink); font-weight: 600; }
.on-dark .selected-line strong, .section--dark .selected-line strong { color: var(--paper); }

.steps { counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line); }
.steps > li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}
.steps b { font-weight: 600; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--accent-text); padding-top: 3px; }

.details-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.details-list > div {
  display: grid;
  gap: 4px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 560px) { .details-list > div { grid-template-columns: 160px minmax(0, 1fr); } }
.details-list dt { font-size: 0.8125rem; color: var(--muted); }
.details-list dd { font-size: 0.9375rem; font-weight: 500; }

/* --- 15. Финальный CTA ----------------------------------------------- */

.cta__grid { display: grid; gap: clamp(28px, 4vw, 52px); }
@media (min-width: 1000px) {
  .cta__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: start; }
}
.cta__copy h2 { margin: 14px 0 16px; }
.cta__form { display: grid; gap: 18px; }
.cta__label,
.label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.label { color: var(--muted); }

/* --- 16. Подвал ------------------------------------------------------ */

.site-footer {
  background: var(--dark);
  color: rgba(247, 244, 239, 0.82);
  padding-block: clamp(44px, 5vw, 72px) 28px;
  font-size: 0.9375rem;
}
.site-footer .brand__sub { color: var(--muted-dark); }
.site-footer .brand__name { color: var(--paper); }

.footer__top {
  display: grid;
  gap: 32px 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--dark-line);
}
@media (min-width: 760px) { .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
  .footer__top { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
}
.footer__about p { color: var(--muted-dark); max-width: 34ch; margin-top: 16px; }

.footer__col h3 {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 16px;
}
.footer__col li + li { margin-top: 10px; }
.footer__col a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.footer__col a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.footer__legal {
  display: grid;
  gap: 8px 24px;
  padding-top: 22px;
  font-size: 0.75rem;
  color: rgba(247, 244, 239, 0.6);
}
@media (min-width: 760px) {
  .footer__legal { grid-auto-flow: column; justify-content: space-between; align-items: center; }
}

/* --- 16b. Текстовые колонки (о компании) ------------------------------ */

.prose-cols { display: grid; gap: 20px 56px; }
@media (min-width: 900px) { .prose-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prose-cols p {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 60ch;
}
.prose-cols p + p { margin-top: 18px; }

/* --- 17. Утилиты ------------------------------------------------------ */

.u-mb-20 { margin-bottom: 20px; }
.u-mt-16 { margin-top: 16px; }
.u-mt-32 { margin-top: 32px; }
.u-heading { margin: 12px 0 16px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- 18. Появление ---------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .object:hover img { transform: none; }
  .city-sticky {
    --city-far: 0px !important;
    --city-mid: 0px !important;
    --city-front: 0px !important;
    --crane-left: 0px !important;
    --crane-right: 0px !important;
    --crane-opacity: 0 !important;
  }
}

/* --- 18. Печать ------------------------------------------------------- */

@media print {
  .site-header, .drawer, .burger, .cta, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
