/* N-VECTOR — деловой стиль: графитово-синий, белый и бежевый; фото на всю ширину, тёмные карточки, светлые секции */

:root {
  /* Палитра */
  --dark: #262a36;
  --dark-2: #1e222c;
  --sand: #cfc7bc;
  --sand-soft: #ece8e2;
  --bg: #ffffff;
  --bg-2: #f6f4f1;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-hi: #ffffff;
  --ink: #262a36;
  --ink-2: #4b505d;
  --muted: #80848e;
  --line: #e6e2dc;
  --line-strong: #cfc9c0;
  --on-dark: #ffffff;
  --on-dark-2: rgba(255, 255, 255, 0.78);

  /* Акцент: в образце — тёмный графит; светло-синий из логотипа используется точечно */
  --accent: #262a36;
  --accent-2: #3d4354;
  --accent-ink: #ffffff;
  --accent-soft: #eef0f4;
  --highlight: #1f6f9a;
  --ok: #2f8a5a;
  --warn: #a8700a;
  --danger: #b3261e;

  --glow: 0 0 0 1px rgba(38, 42, 54, 0.18), 0 10px 26px -14px rgba(38, 42, 54, 0.45);
  --glow-strong: 0 12px 28px -12px rgba(38, 42, 54, 0.55);
  --shadow: 0 18px 40px -24px rgba(30, 34, 44, 0.45);
  --shadow-hover: 0 24px 48px -22px rgba(30, 34, 44, 0.55);

  --font-head: "Fira Sans", "Segoe UI", Arial, sans-serif;
  --font-body: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "Montserrat", "Segoe UI", Arial, sans-serif;

  --text-sm: 0.86rem;
  --text-base: clamp(0.95rem, 0.92rem + 0.15vw, 1rem);
  --text-lg: clamp(1.02rem, 0.98rem + 0.25vw, 1.12rem);
  --text-h2: clamp(1.7rem, 1.35rem + 1.5vw, 2.5rem);
  --text-h1: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);

  --wrap: 1180px;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --space-section: clamp(3.5rem, 2.5rem + 4vw, 6rem);

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;

  --duration-fast: 160ms;
  --duration: 300ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Атрибут hidden всегда скрывает элемент, даже если у класса задан display */
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: var(--highlight); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--dark);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* ---------- Движение по наведению ----------
   Карточки слегка наклоняются за курсором (--rx/--ry ставит js/motion.js) и приподнимаются,
   кнопки и метки «притягиваются» к курсору (--tx/--ty). В деловом стиле амплитуда небольшая. */

.service, .feature, .member, .pillar, .panel, .gallery figure, .list {
  position: relative;
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, var(--lift, 0px), 0);
  transition: transform 600ms var(--ease), box-shadow var(--duration), border-color var(--duration);
}
.service.is-hover, .feature.is-hover, .member.is-hover, .pillar.is-hover, .panel.is-hover,
.gallery figure.is-hover, .list.is-hover {
  --lift: -4px;
  transition: transform 140ms linear, box-shadow var(--duration), border-color var(--duration);
  box-shadow: var(--shadow-hover);
}

.btn, .chip, .tag, .site-nav a, .nav-toggle, .brand, .stat, .float-badge, .lang-switch button, .service-media {
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  transition: transform 450ms var(--spring), background var(--duration-fast), color var(--duration-fast),
    border-color var(--duration-fast), box-shadow var(--duration-fast);
}

/* ---------- Верхняя тёмная полоса ---------- */

.topbar { background: var(--dark); color: var(--on-dark); font-size: 0.78rem; }
.topbar-inner { display: flex; align-items: center; gap: 0.75rem; min-height: 54px; }
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 1.4rem 0.5rem 0;
  color: inherit;
  text-decoration: none;
  line-height: 1.3;
}
.topbar-item + .topbar-item { padding-left: 1.4rem; border-left: 1px solid rgba(255, 255, 255, 0.12); }
.topbar-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  flex: none;
  transition: background var(--duration-fast), transform var(--duration) var(--spring);
}
.topbar-icon svg { width: 17px; height: 17px; }
a.topbar-item:hover .topbar-icon { background: rgba(255, 255, 255, 0.18); transform: scale(1.08); }
.topbar-text { display: grid; }
.topbar-text b { font-weight: 600; }
.topbar-text small { font-size: 0.74rem; color: var(--on-dark-2); }

.lang-switch {
  display: inline-flex;
  flex: none;
  margin-left: auto;
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}
.lang-switch button {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  min-width: 2.5rem;
  padding: 0.42rem 0.6rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--on-dark-2);
  cursor: pointer;
}
.lang-switch button:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.lang-switch button[aria-pressed="true"] { background: var(--sand-soft); color: var(--dark); }

/* ---------- Белая шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px -16px rgba(30, 34, 44, 0.6);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 41px; transition: transform 600ms var(--spring); }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; letter-spacing: 0.01em; color: var(--dark); }
.brand-sub { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dark); margin-top: 0.3rem; }

.site-nav { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.55rem 0.7rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--highlight); }
.site-nav a[aria-current="page"]:not(.nav-cta) { border-bottom-color: var(--dark); }
.site-nav .nav-cta {
  margin-left: 0.6rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
  border: none;
}
.site-nav .nav-cta:hover { background: var(--accent-2); color: #fff; box-shadow: var(--glow-strong); }
.site-nav .nav-cta[aria-current="page"] { box-shadow: 0 0 0 3px var(--sand-soft); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  flex: none;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  background: var(--dark);
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}
.burger { position: relative; width: 18px; height: 12px; display: inline-block; }
.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--duration) var(--ease), opacity var(--duration-fast), top var(--duration) var(--ease);
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 5px; }
.burger span:nth-child(3) { top: 10px; }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* ---------- Общие блоки ---------- */

.eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.8rem;
}

.lede { font-size: var(--text-lg); color: var(--ink-2); max-width: 60ch; margin: 1.1rem 0 0; }

.section { padding-block: var(--space-section); }
.section-alt { background: var(--bg-2); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}
.section-head h2 { font-size: var(--text-h2); }
.section-head--center { flex-direction: column; align-items: center; text-align: center; gap: 0.2rem; }
.section-head--center h2 { text-transform: uppercase; letter-spacing: 0.02em; }
.section-sub { margin: 0; color: var(--muted); font-size: var(--text-lg); }

.tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--sand-soft);
  color: var(--ink-2);
}
.tag:hover { --ty: -2px; }
.tag-accent { background: var(--dark); color: #fff; }
.tag-sample { background: #fbf0d9; color: var(--warn); }
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--dark);
  background: var(--dark);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); text-decoration: none; box-shadow: var(--glow-strong); }
.btn:active { --ty: 1px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

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

.btn-light { background: #fff; color: var(--dark); border-color: #fff; border-radius: 999px; padding-inline: 1.8rem; }
.btn-light:hover { background: var(--sand-soft); border-color: var(--sand-soft); color: var(--dark); }

.btn-add .plus { font-size: 1.15em; line-height: 1; }

/* ---------- Главная: первый экран ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(8rem, 6rem + 6vw, 11rem);
  background: var(--sand-soft);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
  --depth: -10px;
}
.hero::after {
  /* светлая подложка под текстом, как в образце */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(247, 245, 242, 0.98) 0%, rgba(247, 245, 242, 0.94) 45%, rgba(247, 245, 242, 0.45) 72%, rgba(247, 245, 242, 0.08) 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: var(--text-h1); max-width: 22ch; }
.hero h1 em { font-style: normal; color: var(--highlight); }
.hero .lede { max-width: 52ch; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.8rem; }

/* Три тёмные карточки, заходящие на первый экран */
.pillars {
  position: relative;
  z-index: 2;
  margin-top: clamp(-7.5rem, -5rem - 3vw, -5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}
.pillar {
  background: var(--dark);
  color: var(--on-dark-2);
  border-radius: var(--radius);
  padding: 3rem 1.75rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.pillar-icon {
  position: absolute;
  top: -30px;
  left: 50%;
  margin-left: -30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--dark);
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--dark);
  transition: transform 500ms var(--spring);
}
.pillar-icon svg { width: 26px; height: 26px; }
.pillar.is-hover .pillar-icon { transform: translateY(-4px) rotate(-6deg); }
.pillar-title { color: #fff; font-size: 1.35rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.6rem; }
.pillar p { margin: 0; font-size: var(--text-sm); }

/* ---------- Услуги ---------- */

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
.service {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.service.is-hover { border-color: var(--line); background: #fff; }
.service-media {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--sand-soft);
}
.service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.service.is-hover .service-media img { transform: scale(1.12); }
.service h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.4rem; }
.service p { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.service-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--duration-fast), transform var(--duration) var(--spring);
}
.service-link:hover { color: var(--highlight); transform: translateX(4px); }

/* ---------- Ключевой проект ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.feature-media { position: relative; min-height: 340px; background: var(--sand-soft); overflow: hidden; }
.feature-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}
.feature.is-hover .feature-main { transform: scale(1.04); }
.feature-thumb {
  position: absolute;
  z-index: 1;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 38%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 3px solid #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.5);
  transition: transform 600ms var(--spring);
}
.feature.is-hover .feature-thumb { transform: translate(-6px, -6px); }
.feature-body { padding: clamp(1.5rem, 3vw, 3rem); display: flex; flex-direction: column; gap: 1.1rem; }
.feature-body h3 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
.feature-body p { margin: 0; color: var(--ink-2); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.checklist li { position: relative; padding-left: 1.7rem; color: var(--ink-2); transition: transform var(--duration) var(--ease); }
.checklist li:hover { transform: translateX(5px); color: var(--ink); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.5em;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2px solid var(--dark);
  border-bottom: 2px solid var(--dark);
  transform: rotate(-45deg);
}

.stats { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; padding-top: 1.25rem; margin-top: 0.25rem; border-top: 1px solid var(--line); }
.stat:hover { --ty: -3px; }
.stat-value { font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; color: var(--dark); line-height: 1; }
.stat-value small { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-left: 0.15rem; }
.stat-label { font-size: var(--text-sm); color: var(--muted); margin-top: 0.3rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(1rem, 2vw, 1.5rem);
}
.gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 900ms var(--ease); }
.gallery figure.is-hover img { transform: scale(1.05); }
.gallery figcaption { padding: 0.8rem 1rem; font-size: var(--text-sm); color: var(--muted); }

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

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: clamp(1rem, 2vw, 1.75rem); }
.member {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.4fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: rise 500ms var(--ease) both;
}
.member-photo { position: relative; min-height: 240px; background: var(--sand-soft); overflow: hidden; }
.member-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 900ms var(--ease);
}
.member.is-hover .member-photo img { transform: scale(1.05); }
.member-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.6rem;
  letter-spacing: 0.08em;
}
.member-body { padding: clamp(1.25rem, 2.5vw, 2rem); display: flex; flex-direction: column; gap: 0.7rem; }
.member-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.member-role { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.member-bio { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.member-email { font-size: var(--text-sm); }

/* ---------- Внутренние страницы: шапка раздела ---------- */

.page-head {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.75rem, 2rem + 3vw, 4.75rem);
  background: var(--sand-soft);
  border-bottom: 1px solid var(--line);
}
.page-head > .wrap { position: relative; z-index: 1; }
.page-head h1 { font-size: var(--text-h1); }
.page-head-row { display: flex; justify-content: space-between; align-items: end; gap: 1.25rem; flex-wrap: wrap; }
.page-deco {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  height: 100%;
  width: min(48%, 560px);
  object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%);
  mask-image: linear-gradient(90deg, transparent, #000 55%);
  opacity: 0.85;
  --depth: -10px;
}

/* ---------- Списки записей ---------- */

.list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding-inline: clamp(1rem, 2.5vw, 2rem); }
.row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.7fr) minmax(0, 1.3fr) minmax(0, 2fr) auto;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: transform var(--duration) var(--ease);
  animation: rise 500ms var(--ease) both;
}
.row:last-child { border-bottom: none; }
.row:hover { transform: translateX(6px); }
.row:hover .row-title { color: var(--highlight); }
.row-meta { font-size: var(--text-sm); color: var(--muted); }
.row-meta > * + * { margin-top: 0.5rem; }
.row-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; line-height: 1.25; transition: color var(--duration-fast); }
.row-sub { color: var(--muted); font-size: var(--text-sm); margin-top: 0.25rem; }
.row-body { color: var(--ink-2); margin: 0; font-size: var(--text-sm); }
.row-link { white-space: nowrap; font-size: var(--text-sm); font-weight: 600; display: inline-block; transition: transform var(--duration) var(--spring); }
.row-link:hover { transform: translateX(4px); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.list-empty, .loading { padding: 2rem 0; color: var(--muted); font-size: var(--text-sm); margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.chip {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { border-color: var(--dark); color: var(--dark); }
.chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }

/* ---------- Тёмный блок связи ---------- */

.dark-band { position: relative; overflow: hidden; background: var(--dark); color: var(--on-dark-2); padding-block: var(--space-section); }
.dark-band-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: grayscale(1);
  pointer-events: none;
}
.dark-band-inner { position: relative; z-index: 1; }
.dark-band-col { max-width: 640px; }
.dark-band h2 { color: #fff; font-size: var(--text-h2); margin-bottom: 0.9rem; }
.dark-band p { margin: 0 0 1.5rem; font-size: var(--text-lg); }

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

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(1.25rem, 3vw, 2rem); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2.25rem); }
.panel h2 { font-size: 1.4rem; margin-bottom: 1.1rem; }

.kv { margin: 0; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); }
.kv dt, .kv dd { padding: 0.85rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.kv dt { font-size: 0.78rem; font-weight: 600; color: var(--muted); padding-top: 0.95rem; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: none; }
.todo { color: var(--muted); font-style: italic; }

.people { list-style: none; margin: 0; padding: 0; }
.people li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); transition: transform var(--duration) var(--ease); }
.people li:hover { transform: translateX(5px); }
.people li:last-child { border-bottom: none; }
.people .row-title { font-size: 1.05rem; }
.people .row-sub { margin: 0; }

/* ---------- Диалоги и формы (используются в админ-панели) ---------- */

dialog.add-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(30, 34, 44, 0.55);
}
dialog.add-dialog::backdrop { background: rgba(30, 34, 44, 0.55); }
dialog[open] { animation: rise var(--duration) var(--ease); }

.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem; background: var(--dark); color: #fff; }
.dialog-head h2 { font-size: 1.15rem; color: #fff; }
.dialog-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.5rem;
  line-height: 1;
  width: 2.3rem;
  height: 2.3rem;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 450ms var(--spring), background var(--duration-fast), color var(--duration-fast);
}
.dialog-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; transform: rotate(90deg); }

.add-form, .add-form .fields { display: grid; gap: 1rem; }
.add-form { padding: 1.5rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.8rem; font-weight: 700; }
.field .req { color: var(--danger); }
.field input,
.field textarea,
.field select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.6rem 0.1rem;
  width: 100%;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.field textarea { min-height: 6rem; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--dark); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--dark); box-shadow: 0 1px 0 0 var(--dark); }
.field-hint { font-size: 0.75rem; color: var(--muted); }

.form-note { font-size: 0.78rem; color: var(--muted); margin: 0; }
.form-status { margin: 0; font-size: var(--text-sm); min-height: 1.2em; }
.form-status.is-error { color: var(--danger); }
.form-status.is-ok { color: var(--ok); }
.form-actions { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }

/* ---------- Подвал (бежевый, как в образце) ---------- */

.site-footer { background: var(--sand); color: var(--ink-2); padding-block: 2.75rem 2.5rem; margin-top: var(--space-section); }
main:has(> .dark-band:last-child) + .site-footer { margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 6vw, 5rem); align-items: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.9rem; color: var(--dark); text-decoration: none; }
.footer-brand img { width: 58px; height: 70px; }
.footer-brand .brand-name { font-size: 1.8rem; }
.footer-info { display: grid; gap: 0.45rem; font-size: 0.82rem; }
.footer-info p { margin: 0; }
.footer-company { font-weight: 700; color: var(--dark); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin-top: 0.3rem; }
.footer-nav a { color: var(--dark); font-weight: 600; text-decoration: none; transition: color var(--duration-fast); }
.footer-nav a:hover { color: var(--highlight); text-decoration: underline; }
.footer-copy { color: var(--ink-2); }

/* Плашка предпросмотра правок из демо-режима админки (?preview=1) */
.preview-banner {
  position: relative;
  z-index: 25;
  padding: 0.55rem var(--gutter);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 600;
  color: #3a2a05;
  background: #f0cf86;
}

.scene-piece {
  --depth: 12px;
  transform: translate3d(calc(var(--px, 0) * var(--depth)), calc(var(--py, 0) * var(--depth)), 0) scale(1.04);
  transition: transform 900ms var(--ease);
}

/* ---------- Планшеты и телефоны ---------- */

@media (max-width: 1120px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: calc(100dvh - 78px);
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 1.25rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    display: none;
  }
  .site-nav.is-open { display: flex; animation: rise var(--duration) var(--ease); }
  .site-nav a { font-size: 1rem; padding: 0.95rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
  .site-nav a[aria-current="page"]:not(.nav-cta) { border-color: var(--dark); border-bottom-width: 1px; background: var(--sand-soft); }
  .site-nav .nav-cta { margin: 0.5rem 0 0; text-align: center; border-radius: var(--radius); }
  .nav-open, .nav-open body { overflow: hidden; }

  .services { grid-template-columns: 1fr; max-width: 640px; }
  .pillars { grid-template-columns: 1fr; gap: 2.5rem; margin-top: -4rem; }
}

@media (max-width: 860px) {
  .feature, .contact-grid { grid-template-columns: 1fr; }
  .feature-media { min-height: 240px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .page-deco { width: 70%; opacity: 0.35; }
  .hero::after { background: linear-gradient(180deg, rgba(247, 245, 242, 0.93), rgba(247, 245, 242, 0.85)); }
}

@media (max-width: 760px) {
  :root { --space-section: 3rem; }
  .topbar-item--focus { display: none; }
  .topbar-item { padding-right: 0; }
  .topbar-text small { display: none; }
  .header-inner { min-height: 66px; }
  .site-nav { height: calc(100dvh - 66px); }
  .brand img { width: 28px; height: 34px; }
  .brand-name { font-size: 1.15rem; }

  .hero { padding-bottom: 6.5rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .section-head .btn { width: 100%; }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
  .stat-value { font-size: 1.5rem; }

  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 0.4rem; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; padding: 0.6rem 1rem; }

  .member { grid-template-columns: 1fr; }
  .member-photo { min-height: 300px; }
  .people li { grid-template-columns: 1fr; gap: 0.25rem; }

  .footer-inner { grid-template-columns: 1fr; }

  dialog.add-dialog {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .field input, .field textarea, .field select { font-size: 16px; } /* 16px — iOS не увеличивает страницу при вводе */
}

@media (max-width: 420px) {
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-toggle { padding: 0.65rem 0.8rem; }
  .brand-sub { letter-spacing: 0.1em; }
}

/* ---------- Без анимаций для тех, кто их отключил ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
  .service, .feature, .member, .pillar, .panel, .gallery figure, .list,
  .btn, .chip, .tag, .site-nav a, .nav-toggle, .brand, .stat, .lang-switch button, .service-media, .scene-piece { transform: none !important; }
}
