/* Mercury Consulting Service — фирменная система Mercury Properties (брендбук 2019) */

:root {
  --yellow: #FFDE17;
  --ochre: #FACD2D;
  --ink: #262223;
  --black: #171415;
  --gray: #AFAAA6;
  --cool: #B2B2B2;
  --muted: #6B6664;
  --surface: #F4F3F1;
  --bg: #FFFFFF;
  --line: #E2E0DD;
  --line-dark: rgba(255, 255, 255, 0.16);

  --font-display: "Bitter", Georgia, serif;
  --font-text: "Golos Text", "Helvetica Neue", Arial, sans-serif;

  --fs-h1: clamp(2.375rem, 1.1rem + 3.9vw, 4rem);
  --fs-h2: clamp(1.75rem, 1.2rem + 1.9vw, 2.625rem);
  --fs-h3: 1.3125rem;
  --fs-lead: clamp(1.375rem, 1.05rem + 1.1vw, 1.875rem);

  --space-section: clamp(4.5rem, 3rem + 5vw, 8rem);
  --container: 1200px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --z-header: 50;
  --z-nav-overlay: 40;
  --z-dropdown: 60;
  --z-toast: 80;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { text-wrap: balance; margin: 0; }

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.floors-section :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--yellow);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.7rem;
  font: 600 0.9375rem/1.2 var(--font-text);
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.btn-solid { background: var(--yellow); color: var(--ink); }
.btn-solid:hover { background: var(--ochre); }

.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }

.btn-sm { padding: 0.6rem 1.15rem; font-size: 0.875rem; }
.btn-wide { width: 100%; }

/* ---------- Ч/б фото + жёлтый multiply (фирменный приём) ---------- */

.bw { filter: grayscale(1) contrast(1.06); }

.duotone { position: relative; margin: 0; overflow: hidden; }
.duotone img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}
.duotone::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--yellow);
  mix-blend-mode: multiply;
}

/* ---------- Паттерн M (из брендбука, умеренно) ---------- */

.pattern-m {
  --pat-color: %23FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='66' viewBox='0 0 34 66'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='1'%3E%3Cpath d='M8.8 0.5 L19.7 0.5 L19.7 37.3 L8.8 37.3 Z'/%3E%3Cpath d='M8.8 0.5 L0.5 14.9 L0.5 51.7 L8.8 37.3 Z'/%3E%3Cpath d='M19.7 37.3 L8.8 37.3 L0.5 51.7 L11.9 51.8 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 34px 66px;
}

.pattern-ink {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='66' viewBox='0 0 34 66'%3E%3Cg fill='none' stroke='%23262223' stroke-width='1'%3E%3Cpath d='M8.8 0.5 L19.7 0.5 L19.7 37.3 L8.8 37.3 Z'/%3E%3Cpath d='M8.8 0.5 L0.5 14.9 L0.5 51.7 L8.8 37.3 Z'/%3E%3Cpath d='M19.7 37.3 L8.8 37.3 L0.5 51.7 L11.9 51.8 Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease-out);
}

.site-header.scrolled { box-shadow: 0 8px 28px rgba(23, 20, 21, 0.08); }

.header-in {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark { flex: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }

.brand-name {
  font: 800 1.125rem/1 var(--font-text);
  letter-spacing: 0.03em;
  color: var(--ink);
}

.brand-sub {
  font: 400 0.6875rem/1.3 var(--font-text);
  letter-spacing: 0.08em;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: clamp(0.55rem, 1.15vw, 1.05rem);
  margin-inline: auto;
}

.site-nav a {
  font: 500 0.875rem/1 var(--font-text);
  text-decoration: none;
  color: var(--ink);
  padding: 0.5rem 0;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s var(--ease-out);
}

.site-nav a:hover { border-bottom-color: var(--yellow); }
.site-nav a.active { border-bottom-color: var(--yellow); color: var(--ink); }

.header-cta { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }

.header-phone {
  font: 600 0.9375rem/1 var(--font-text);
  text-decoration: none;
  white-space: nowrap;
}

/* Переключатель языков (дропдаун) */
.lang-switch { position: relative; flex: none; }

.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: 600 0.8125rem/1 var(--font-text);
  letter-spacing: 0.02em;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out);
}

.lang-current:hover { border-color: var(--ink); }
.lang-switch.open .lang-current { border-color: var(--ink); }

.lang-globe { flex: none; color: var(--muted); }

.lang-current .lang-caret {
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.25s var(--ease-out);
}

.lang-switch.open .lang-current .lang-caret { transform: translateY(1px) rotate(-135deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 14px 34px rgba(23, 20, 21, 0.14);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0.2s;
}

.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: none; }

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.6rem 0.7rem;
  font: 500 0.9375rem/1 var(--font-text);
  color: var(--ink);
  text-decoration: none;
  border-radius: 3px;
}

.lang-menu a:hover { background: var(--surface); }

.lang-menu .lang-tag {
  font: 600 0.75rem/1 var(--font-text);
  letter-spacing: 0.03em;
  color: var(--muted);
}

.lang-menu [aria-selected="true"] a { background: var(--yellow); font-weight: 600; }
.lang-menu [aria-selected="true"] .lang-tag { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { border-bottom: 1px solid var(--line); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 6.5fr) minmax(0, 5.5fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: stretch;
}

.hero-copy {
  padding-block: clamp(3.5rem, 2rem + 5vw, 7rem) clamp(2.5rem, 2rem + 2vw, 4rem);
}

.hero-topline {
  font: 500 0.875rem/1.5 var(--font-text);
  color: var(--muted);
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
  max-width: 44ch;
}

.hero h1 {
  font: 600 var(--fs-h1)/1.12 var(--font-display);
  letter-spacing: -0.01em;
  max-width: 16ch;
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 52ch;
  font-size: 1.125rem;
  color: #3E3A3B;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.875rem; margin-top: 2.25rem; }

.hero-stats {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin: 3.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.hero-stats dt {
  font: 800 clamp(1.9rem, 1.4rem + 1.6vw, 2.75rem)/1 var(--font-text);
  letter-spacing: -0.01em;
}

.hero-stats dd { margin: 0.35rem 0 0; font-size: 0.875rem; color: var(--muted); max-width: 12ch; }

.hero-media { --hero-p: 0; position: relative; min-height: 420px; overflow: hidden; }

.hero-media .duotone { position: absolute; inset: 0; }

.hero-pattern {
  position: absolute;
  left: -1px; bottom: -1px;
  width: min(46%, 240px);
  height: 34%;
  opacity: 0.55;
  pointer-events: none;
}

/* Скролл-привязанная сцена hero: --hero-p (0…1) ведёт JS по прогрессу скролла.
   Зум к крышам, жёлтый multiply растворяется до естественного цвета,
   паттерн уходит вправо. При reduced-motion --hero-p остаётся 0. */
.hero-media .duotone img {
  transform-origin: 50% 28%;
  transform: scale(calc(1 + var(--hero-p) * 0.3));
  filter: grayscale(calc(1 - var(--hero-p))) contrast(calc(1.08 - var(--hero-p) * 0.06));
  will-change: transform, filter;
}

.hero-media .duotone::after { opacity: calc(1 - var(--hero-p)); }

.hero-media .hero-pattern {
  transform: translateX(calc(var(--hero-p) * 48vw));
  opacity: calc(0.55 * (1 - var(--hero-p)));
  will-change: transform, opacity;
}

/* ---------- Секции ---------- */

.section { padding-block: var(--space-section); }

.section-surface { background: var(--surface); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.section-head h2 {
  font: 600 var(--fs-h2)/1.15 var(--font-display);
  letter-spacing: -0.01em;
}

.section-note { font: 500 0.9375rem/1.4 var(--font-text); color: var(--muted); }

.section-head-invert { border-bottom-color: var(--yellow); }
.section-head-invert h2 { color: #fff; }
.section-head-invert .section-note { color: var(--gray); }

/* ---------- О компании ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 4vw, 5rem);
  align-items: start;
}

.lead {
  font: 500 var(--fs-lead)/1.4 var(--font-display);
  max-width: 34ch;
}

.about-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.about-cols h3 {
  font: 600 1.0625rem/1.3 var(--font-text);
  margin-bottom: 0.6rem;
  padding-top: 0.9rem;
  border-top: 3px solid var(--yellow);
  display: inline-block;
}

.about-cols p { font-size: 0.9875rem; color: #3E3A3B; }

.about-media { margin: 0; }

.about-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.about-media figcaption {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Ценности (жёлтый дренч) ---------- */

.values {
  position: relative;
  background: var(--yellow);
  color: var(--ink);
  overflow: hidden;
}

.values-pattern {
  position: absolute;
  top: 0; right: 0;
  width: min(38%, 420px);
  height: 100%;
  opacity: 0.22;
  pointer-events: none;
}

.values-in {
  position: relative;
  padding-block: clamp(4rem, 3rem + 4vw, 7rem);
  max-width: min(var(--container), 100%);
}

.values-statement {
  font: 600 clamp(2rem, 1.3rem + 2.6vw, 3.5rem)/1.15 var(--font-display);
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.values-note {
  margin-top: 1.75rem;
  max-width: 58ch;
  font-size: 1.0625rem;
}

.values-link {
  display: inline-block;
  margin-top: 2rem;
  font: 600 1rem/1 var(--font-text);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.3rem;
}

.values-link:hover { border-bottom-color: transparent; }

/* ---------- Направления (матрица с инверсией при наведении) ---------- */

.dir-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.dir-list li {
  position: relative;
  isolation: isolate;
  padding: clamp(1.6rem, 1.2rem + 1vw, 2.25rem);
  background: var(--bg);
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.dir-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.dir-list li:hover { background: var(--ink); color: #fff; }
.dir-list li:hover::before { transform: scaleX(1); }

.dir-en {
  display: block;
  font: 500 0.8125rem/1 var(--font-text);
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.4s var(--ease-out);
}

.dir-list li:hover .dir-en { color: var(--yellow); }

.dir-list h3 {
  font: 600 var(--fs-h3)/1.25 var(--font-display);
  margin: 0.7rem 0 0.6rem;
  max-width: 15ch;
}

.dir-list p {
  font-size: 0.9875rem;
  color: #3E3A3B;
  max-width: 42ch;
  transition: color 0.4s var(--ease-out);
}

.dir-list li:hover p { color: #CFCAC7; }

.dir-list a {
  overflow-wrap: anywhere;
  text-decoration-color: var(--ochre);
  text-underline-offset: 3px;
  transition: color 0.4s var(--ease-out), text-decoration-color 0.4s var(--ease-out);
}

.dir-list li:hover a { color: var(--yellow); text-decoration-color: var(--yellow); }

@media (max-width: 980px) {
  .dir-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .dir-list { grid-template-columns: 1fr; }
}

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

.objects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.85rem, 1.6vw, 1.5rem);
}

.obj-tile {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ink);
}

.obj-tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: transform 0.7s var(--ease-out), filter 0.6s var(--ease-out);
}

/* Ч/б → натуральный цвет при наведении (десктоп) или тапе (тач, класс .is-color) */
.obj-tile:hover img,
.obj-tile.is-color img {
  filter: none;
  transform: scale(1.04);
}

.obj-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(23, 20, 21, 0.85) 0%, rgba(23, 20, 21, 0.28) 48%, rgba(23, 20, 21, 0) 72%);
  z-index: 1;
}

.obj-tile figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: clamp(1.1rem, 2vw, 1.75rem);
  color: #fff;
}

.obj-en {
  font: 500 0.75rem/1 var(--font-text);
  letter-spacing: 0.06em;
  color: var(--gray);
}

.obj-tile strong {
  display: block;
  font: 600 clamp(1.25rem, 1rem + 0.9vw, 1.75rem)/1.2 var(--font-display);
  margin: 0.5rem 0 0.35rem;
}

.obj-tile figcaption p { font-size: 0.875rem; color: rgba(255, 255, 255, 0.85); max-width: 40ch; }

/* ---------- Проекты ---------- */

.projects-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.projects-grid li {
  position: relative;
  padding: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.projects-grid li::before {
  content: "";
  position: absolute;
  left: -1px; right: -1px; top: -1px;
  height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.projects-grid li:hover {
  border-color: #D6D3CF;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(23, 20, 21, 0.08);
}

.projects-grid li:hover::before { transform: scaleX(1); }

.proj-tag {
  display: inline-block;
  font: 500 0.8125rem/1 var(--font-text);
  letter-spacing: 0.02em;
  color: var(--muted);
}

.projects-grid h3 {
  font: 600 var(--fs-h3)/1.25 var(--font-display);
  margin: 0.7rem 0 0.6rem;
}

.projects-grid p { font-size: 0.9375rem; color: #3E3A3B; }

/* ---------- Новости ---------- */

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.news-list li {
  padding-top: 1.6rem;
  border-top: 2px solid var(--ink);
}

.news-list time {
  display: inline-block;
  font: 600 0.8125rem/1 var(--font-text);
  letter-spacing: 0.02em;
  color: var(--muted);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--yellow);
  margin-bottom: 1.1rem;
}

.news-list h3 {
  font: 600 1.3125rem/1.3 var(--font-display);
  margin-bottom: 0.7rem;
  max-width: 26ch;
}

.news-list p { font-size: 0.9875rem; color: #3E3A3B; max-width: 60ch; }

/* ---------- Каталог услуг: этажи ---------- */

.floors-section { background: var(--ink); color: #fff; }

.floors { border-top: 1px solid var(--line-dark); }

.floor { border-bottom: 1px solid var(--line-dark); }

.floor summary {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.2rem 0.25rem;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.25s var(--ease-out);
}

.floor summary::-webkit-details-marker { display: none; }

.floor summary:hover { background: rgba(255, 255, 255, 0.04); }

.floor-num {
  font: 800 1.375rem/1 var(--font-text);
  color: var(--yellow);
  letter-spacing: 0.02em;
}

.floor-name { font: 600 1.125rem/1.35 var(--font-text); }

.floor-ind {
  position: relative;
  width: 18px; height: 18px;
  margin-right: 0.25rem;
}

.floor-ind::before, .floor-ind::after {
  content: "";
  position: absolute;
  background: var(--gray);
  transition: transform 0.3s var(--ease-out), background-color 0.2s;
}

.floor-ind::before { left: 0; right: 0; top: 8px; height: 2px; }
.floor-ind::after { top: 0; bottom: 0; left: 8px; width: 2px; }

.floor[open] .floor-ind::after { transform: scaleY(0); }
.floor[open] .floor-ind::before { background: var(--yellow); }

.floor-body { padding: 0 0.25rem 1.6rem calc(4.5rem + 1.25rem); }

.floor-body p { max-width: 62ch; color: #CFCAC7; font-size: 0.9875rem; }

.floor-body a { color: var(--yellow); text-underline-offset: 3px; }

.floor-base {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.2rem 0.25rem;
  background: rgba(255, 222, 23, 0.06);
}

.floor-base .floor-name { color: var(--gray); font-weight: 500; }

.floor-cta {
  font: 600 0.9375rem/1 var(--font-text);
  color: var(--yellow);
  text-decoration: none;
  border-bottom: 1px solid var(--yellow);
  padding-bottom: 0.2rem;
  white-space: nowrap;
}

.floor-cta:hover { border-bottom-color: transparent; }

/* ---------- Принципы ---------- */

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(1.75rem, 3vw, 3rem) clamp(2rem, 4vw, 4.5rem);
}

.why-list li { position: relative; padding-left: 1.9rem; }

.why-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3rem;
  width: 12px; height: 16px;
  background: var(--yellow);
  transform: skewY(-14deg);
}

.why-list h3 { font: 600 1.0625rem/1.35 var(--font-text); margin-bottom: 0.45rem; }

.why-list p { font-size: 0.9875rem; color: #3E3A3B; }

/* ---------- Команда ---------- */

.team-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem) clamp(1rem, 2vw, 2rem);
}

.team-photo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #DEDBD7;
}

/* Жёлтая полоса снизу — растёт при наведении */
.team-photo::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
  z-index: 3;
}

.team-grid li:hover .team-photo::after { transform: scaleX(1); }

/* Угловая «скобка» — прочерчивается при наведении */
.team-photo::before {
  content: "";
  position: absolute;
  top: 9px; left: 9px;
  width: 20px; height: 20px;
  border-top: 2px solid var(--yellow);
  border-left: 2px solid var(--yellow);
  opacity: 0;
  transform: translate(5px, 5px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  z-index: 3;
}

.team-grid li:hover .team-photo::before { opacity: 1; transform: none; }

.team-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: filter 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}

.team-grid li:hover img {
  filter: grayscale(0) contrast(1.02);
  transform: scale(1.04);
}

/* Каскадное появление при скролле: шторка сверху вниз + проявление, по очереди */
html.js .team-grid li { opacity: 0; }
html.js .team-grid li .team-photo { clip-path: inset(0 0 100% 0); }
html.js .team-grid.in li {
  opacity: 1;
  transition: opacity 0.5s var(--ease-out) var(--d, 0s);
}
html.js .team-grid.in li .team-photo {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.7s var(--ease-out) var(--d, 0s);
}
.team-grid li:nth-child(2) { --d: 0.05s; }
.team-grid li:nth-child(3) { --d: 0.1s; }
.team-grid li:nth-child(4) { --d: 0.15s; }
.team-grid li:nth-child(5) { --d: 0.2s; }
.team-grid li:nth-child(6) { --d: 0.25s; }
.team-grid li:nth-child(7) { --d: 0.3s; }
.team-grid li:nth-child(8) { --d: 0.35s; }
.team-grid li:nth-child(9) { --d: 0.4s; }
.team-grid li:nth-child(10) { --d: 0.45s; }
.team-grid li:nth-child(11) { --d: 0.5s; }
.team-grid li:nth-child(12) { --d: 0.55s; }

.team-grid h3 {
  font: 600 0.9875rem/1.3 var(--font-text);
  margin-top: 0.9rem;
}

.team-grid p { font-size: 0.8125rem; color: var(--muted); margin-top: 0.25rem; }

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

.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: start;
}

.contacts-list { margin: 0; display: grid; gap: 1.5rem; }

.contacts-list dt {
  font: 500 0.8125rem/1 var(--font-text);
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.contacts-list dd { margin: 0; font-size: 1.0625rem; }

.contacts-list a { text-decoration: none; border-bottom: 1px solid var(--ochre); }
.contacts-list a:hover { border-bottom-color: var(--ink); }

.contacts-depts {
  width: 100%;
  margin-top: 2.5rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.contacts-depts caption {
  text-align: left;
  font: 600 1.0625rem/1.3 var(--font-text);
  padding-bottom: 0.9rem;
}

.contacts-depts th, .contacts-depts td {
  text-align: left;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.contacts-depts th { font-weight: 500; color: var(--muted); padding-right: 1.5rem; white-space: nowrap; }

.contacts-depts td { overflow-wrap: anywhere; }

.contacts-depts a { text-decoration: none; border-bottom: 1px solid var(--ochre); }
.contacts-depts a:hover { border-bottom-color: var(--ink); }

/* ---------- Форма ---------- */

.contact-form {
  background: var(--surface);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.contact-form h3 { font: 600 1.5rem/1.2 var(--font-display); }

.form-intro { margin: 0.6rem 0 1.5rem; font-size: 0.9375rem; color: #3E3A3B; }

.contact-form label {
  display: block;
  font: 500 0.875rem/1 var(--font-text);
  margin: 1.1rem 0 0.45rem;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: 400 1rem/1.4 var(--font-text);
  color: var(--ink);
  background: #fff;
  border: 1px solid #C9C5C1;
  border-radius: 2px;
}

.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 222, 23, 0.55);
}

.contact-form textarea { resize: vertical; min-height: 108px; }

.form-note { min-height: 1.2rem; margin: 0.9rem 0 0.6rem; font-size: 0.875rem; color: #8A3B00; }

.form-hint { margin-top: 1rem; font-size: 0.8125rem; color: var(--muted); }

.form-hint a { color: var(--ink); }

/* ---------- Тост «Номер скопирован» (десктоп) ---------- */

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 14px);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: calc(100vw - 2rem);
  padding: 0.85rem 1.25rem;
  background: var(--ink);
  color: #fff;
  font: 500 0.9375rem/1.2 var(--font-text);
  border-radius: 4px;
  box-shadow: 0 14px 36px rgba(23, 20, 21, 0.3);
  opacity: 0;
  pointer-events: none;
  z-index: var(--z-toast);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.copy-toast::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
}

.copy-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .copy-toast { transition: opacity 0.01ms; }
}

/* ---------- Футер ---------- */

.site-footer { background: var(--black); color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding-block: clamp(3rem, 2.5rem + 2vw, 4.5rem) 2.5rem;
}

.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub { color: var(--gray); }

.footer-group { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--gray); }

.footer-group a { color: #fff; text-decoration: none; border-bottom: 1px solid var(--yellow); }
.footer-group a:hover { border-bottom-color: transparent; }

.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 2rem; align-content: start; }

.footer-nav a {
  font: 500 0.9375rem/1.3 var(--font-text);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.footer-nav a:hover { color: var(--yellow); }

.footer-contacts { display: grid; gap: 0.7rem; align-content: start; }

.footer-contacts a { font: 600 1rem/1.3 var(--font-text); color: #fff; text-decoration: none; }
.footer-contacts a:hover { color: var(--yellow); }

.footer-contacts p { font-size: 0.875rem; color: var(--gray); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  justify-content: space-between;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--line-dark);
}

.footer-legal p { font-size: 0.8125rem; color: var(--gray); max-width: 72ch; }

/* ---------- Reveal-анимации (только при включённом JS) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { min-height: 340px; margin-inline: calc(-1 * clamp(1.25rem, 4vw, 2.5rem)); }
  .hero-copy { padding-block: clamp(2.75rem, 6vw, 4rem) clamp(2.25rem, 5vw, 3rem); }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 480px; }
  .contacts-grid { grid-template-columns: 1fr; }
  .contacts-depts th { white-space: normal; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Телефон в шапке прячем раньше, чтобы горизонтальное меню дольше помещалось */
@media (max-width: 1260px) {
  .header-phone { display: none; }
}

/* Меню → бургер, когда полная десктоп-шапка перестаёт помещаться */
@media (max-width: 1120px) {
  .site-nav {
    position: fixed;
    inset: 74px 0 auto 0;
    z-index: var(--z-nav-overlay);
    flex-direction: column;
    gap: 0;
    background: var(--ink);
    padding: 1rem 1.5rem 2rem;
    transform: translateY(-115%);
    transition: transform 0.4s var(--ease-out);
    box-shadow: 0 24px 48px rgba(23, 20, 21, 0.3);
  }

  .site-nav.open { transform: translateY(0); }

  .site-nav a {
    color: #fff;
    font: 600 1.25rem/1.3 var(--font-text);
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .site-nav a:hover { border-bottom-color: var(--yellow); }

  .nav-toggle { display: flex; margin-left: auto; }
  .header-cta { margin-left: 0; }
}

@media (max-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .objects-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .news-list { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .floor summary, .floor-base { grid-template-columns: 3rem 1fr auto; gap: 0.9rem; }
  .floor-body { padding-left: calc(3rem + 0.9rem); }
}

@media (max-width: 560px) {
  .header-cta .btn { display: none; }
  .hero-stats { flex-wrap: wrap; gap: 1.25rem 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .floor-base { grid-template-columns: 3rem 1fr; }
  .floor-base .floor-cta { grid-column: 2; justify-self: start; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html.js .reveal { opacity: 1; transform: none; }
  html.js .team-grid li { opacity: 1; }
  html.js .team-grid li .team-photo { clip-path: none; }
  .obj-tile:hover img,
  .obj-tile.is-color img,
  .team-grid li:hover img { transform: none; }
}
