/* ==========================================================================
   Центр охраны труда «РОСТ» — основной стиль
   ========================================================================== */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/onest-cyrillic.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/onest-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* бренд */
  --navy-950: #041427;
  --navy-900: #071e38;
  --navy-800: #0b2f55;
  --navy-700: #0e4a7b;
  --navy-100: #e6edf5;
  --red-600: #d0101e;
  --red-700: #a90c18;
  --red-50: #fdecee;

  /* нейтральные */
  --ink: #0b1b2e;
  --text: #2a3a4d;
  --muted: #5b6b7e;
  --line: #e2e7ee;
  --line-strong: #cfd7e2;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --ok: #157347;

  /* система */
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(7, 30, 56, .06), 0 2px 8px rgba(7, 30, 56, .04);
  --shadow: 0 2px 4px rgba(7, 30, 56, .04), 0 12px 32px rgba(7, 30, 56, .08);
  --shadow-lg: 0 24px 64px rgba(4, 20, 39, .22);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--red-600); outline-offset: 3px; border-radius: 4px; }

/* ---------- кнопки ---------- */
.btn {
  --btn-bg: var(--red-600);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 16px; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--red-700); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--ghost { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255, 255, 255, .32); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .6); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover { background: var(--bg-soft); border-color: var(--ink); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- шапка ---------- */
.topbar { background: var(--navy-950); color: rgba(255, 255, 255, .72); font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.topbar a { color: rgba(255, 255, 255, .86); text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__info { display: flex; gap: 20px; }
.topbar__info span { display: inline-flex; align-items: center; gap: 8px; }
.topbar__dot { width: 7px; height: 7px; border-radius: 50%; background: #3ccf7e; box-shadow: 0 0 0 3px rgba(60, 207, 126, .18); }

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(7, 30, 56, .06); }
.header .container { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 44px; height: 44px; }
.brand__name { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name b { font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.brand__name small { font-size: 12px; color: var(--muted); font-weight: 500; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text);
  transition: background-color .15s, color .15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.nav a[aria-current="true"] { color: var(--red-600); }

.header__phone { display: flex; flex-direction: column; align-items: flex-end; text-decoration: none; line-height: 1.2; flex: none; }
.header__phone b { font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.header__phone small { font-size: 12px; color: var(--muted); }
.header__phone:hover b { color: var(--red-600); }

.burger {
  display: none; width: 44px; height: 44px; margin-left: auto;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.burger span, .burger span::before, .burger span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .25s var(--ease), opacity .2s;
}
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: #fff; padding: 16px var(--gutter) 32px; overflow-y: auto;
  border-top: 1px solid var(--line);
}
.mobile-menu.is-open { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 20px; font-weight: 600; color: var(--ink); }
.mobile-menu__contacts { display: grid; gap: 12px; margin-top: 28px; }
.mobile-menu__contacts a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; }

@media (max-width: 1080px) {
  .nav, .header__cta { display: none; }
  .header__phone { margin-left: auto; }
  .burger { display: inline-flex; margin-left: 0; }
}
@media (max-width: 720px) {
  .topbar__info span:nth-child(2) { display: none; }
  .header__phone { display: none; }
  .burger { margin-left: auto; }
}
@media (max-width: 420px) {
  .brand__name small { display: none; }
  .topbar__right { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(1200px 600px at 85% -10%, #12406b 0%, transparent 60%), linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: rgba(255, 255, 255, .78);
  padding: clamp(48px, 6.5vw, 88px) 0 0;
}
.hero::before {
  /* инженерная сетка */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
}
.hero__ring { position: absolute; z-index: -1; right: -180px; top: -120px; width: 720px; height: 720px; opacity: .9; pointer-events: none; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red-600);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.hero .eyebrow { color: #ff6b74; }
.hero h1 {
  color: #fff; margin-top: 20px;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 750; line-height: 1.06; letter-spacing: -.03em;
}
.hero h1 em { font-style: normal; color: #ff5a64; }
.hero__lead { margin-top: 24px; max-width: 590px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; }
.hero__checks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; list-style: none; }
.hero__checks li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  color: #fff; font-size: 14px; font-weight: 500;
}
.hero__checks svg { width: 16px; height: 16px; color: #ff6b74; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.expert-card {
  position: relative; overflow: hidden;
  background: #fff; color: var(--text);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-lg);
}
.expert-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, var(--red-600) 0 50%, var(--navy-700) 50% 100%);
}
.expert-card__head { display: flex; align-items: center; gap: 16px; }
.expert-card__head img { width: 72px; height: 72px; flex: none; }
.expert-card__badge { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--red-600); }
.expert-card h2 { font-size: 22px; line-height: 1.25; margin-top: 4px; letter-spacing: -.01em; }
.expert-card__meta { list-style: none; margin-top: 22px; display: grid; gap: 10px; font-size: 15px; }
.expert-card__meta li { display: flex; gap: 10px; align-items: flex-start; }
.expert-card__meta svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--navy-700); }
.expert-card__contacts { display: grid; gap: 4px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.expert-card__contacts a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 -12px;
  border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; transition: background-color .15s;
}
.expert-card__contacts a:hover { background: var(--bg-soft); }
.expert-card__contacts .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-100); color: var(--navy-700); flex: none; }
.expert-card__contacts .ico svg { width: 18px; height: 18px; }
.expert-card__contacts small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(56px, 7vw, 88px);
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.fact { padding: 28px 24px 32px 0; }
.fact + .fact { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .12); }
.fact b { display: block; color: #fff; font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.fact span { display: block; margin-top: 8px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .64); }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .expert-card { max-width: 560px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .12); }
}
@media (max-width: 480px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .expert-card { padding: 24px; }
  
  .fact { padding: 22px 12px 24px 0; }
  .fact + .fact { padding-left: 12px; }
  .fact:nth-child(3) { padding-left: 0; }
}

/* ---------- секции ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy-900); color: rgba(255, 255, 255, .76); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.9rem, 3.2vw, 2.75rem); margin-top: 14px; }
.section-head p { color: var(--muted); font-size: 18px; max-width: 520px; }
.section--dark .section-head p { color: rgba(255, 255, 255, .64); }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- услуги ---------- */
.tabs { display: flex; gap: 8px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; border: 0; background: transparent; cursor: pointer;
  padding: 12px 22px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
  transition: background-color .2s, color .2s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--navy-800); color: #fff; }
.tab__count { font-size: 12px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--bg-soft); color: var(--muted); }
.tab[aria-selected="true"] .tab__count { background: rgba(255, 255, 255, .16); color: #fff; }

.services-panels { margin-top: 28px; }
.services-panel[hidden] { display: none; }
.services-panel__intro { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.services-panel__intro h3 { font-size: 24px; }
.services-panel__intro p { color: var(--muted); font-size: 15px; }
.js .services-panel__intro h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.service-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  padding: 22px 22px 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.service:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.service__num { font-size: 13px; font-weight: 700; color: var(--red-600); font-variant-numeric: tabular-nums; width: 24px; }
.service__title { color: var(--ink); font-weight: 600; font-size: 17px; line-height: 1.35; }
.service__desc { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; font-weight: 400; line-height: 1.55; }
.service__go {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; background: #fff; color: var(--ink); cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.service__go::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.service__go svg { width: 18px; height: 18px; }
.service:hover .service__go { background: var(--red-600); border-color: var(--red-600); color: #fff; }
.service--wide { grid-column: 1 / -1; background: linear-gradient(135deg, #fff 60%, var(--red-50)); }
@media (max-width: 760px) {
  .service-list { grid-template-columns: 1fr; }
  .tabs { width: 100%; }
  .tab { padding: 10px 16px; font-size: 14px; }
}

/* ---------- ситуации ---------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius-lg); overflow: hidden; }
.case { background: var(--navy-900); padding: 32px 28px 36px; display: flex; flex-direction: column; gap: 14px; transition: background-color .25s; }
.case:hover { background: #0a2747; }
.case__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(208, 16, 30, .14); color: #ff6b74; }
.case__icon svg { width: 24px; height: 24px; }
.case h3 { font-size: 19px; line-height: 1.3; letter-spacing: -.01em; }
.case p { font-size: 15px; color: rgba(255, 255, 255, .62); }
.case__link { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; }
.case__link svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.case__link:hover svg { transform: translateX(4px); }
@media (max-width: 960px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cases { grid-template-columns: 1fr; } }

/* ---------- клиенты ---------- */
.clients { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.clients__lead h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-top: 14px; }
.clients__lead p { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 440px; }
.clients__total { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 440px; }
.clients__total b { font-size: 40px; line-height: 1; color: var(--ink); letter-spacing: -.03em; }
.clients__total span { font-size: 15px; color: var(--muted); line-height: 1.4; }

.segments { list-style: none; display: grid; gap: 26px; }
.segment__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.segment__name { font-weight: 600; color: var(--ink); font-size: 18px; }
.segment__value { font-weight: 700; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.segment__desc { color: var(--muted); font-size: 14px; margin-top: 2px; }
.segment__bar { margin-top: 12px; height: 10px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.segment__bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c, var(--navy-700)); transform-origin: left; transition: transform 1.1s var(--ease); }
.js .segments:not(.is-visible) .segment__bar i { transform: scaleX(0); }
@media (max-width: 860px) { .clients { grid-template-columns: 1fr; } }

/* ---------- документы ---------- */
.doc-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.docs { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.doc[hidden] { display: none; }
.doc__btn {
  width: 100%; height: 100%; text-align: left; padding: 0; cursor: zoom-in;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .25s, transform .25s var(--ease), border-color .25s;
}
.doc__btn:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--line-strong); }
.doc__thumb { display: block; position: relative; aspect-ratio: 3 / 4; background: var(--bg-soft); padding: 18px 18px 0; overflow: hidden; }
.doc__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 6px 6px 0 0; box-shadow: 0 6px 20px rgba(7, 30, 56, .14); }
.doc__thumb--wide img { object-fit: contain; object-position: center; box-shadow: none; }
.doc__zoom { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: var(--shadow-sm); opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s; }
.doc__zoom svg { width: 16px; height: 16px; }
.doc__btn:hover .doc__zoom, .doc__btn:focus-visible .doc__zoom { opacity: 1; transform: none; }
.doc__body { display: block; padding: 16px 18px 18px; border-top: 1px solid var(--line); flex: 1; }
.doc__tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-600); }
.doc__title { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.doc__meta { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; background: rgba(4, 20, 39, .97); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lightbox.is-open { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 14px 24px; color: #fff; }
.lightbox__caption { font-size: 15px; font-weight: 600; line-height: 1.35; }
.lightbox__caption small { display: block; font-weight: 400; color: rgba(255, 255, 255, .6); font-size: 13px; }
.lightbox__stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 0 72px; min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); background: #fff; }
.lightbox__counter { text-align: center; color: rgba(255, 255, 255, .6); font-size: 14px; padding: 14px; font-variant-numeric: tabular-nums; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none;
  transition: background-color .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn svg { width: 22px; height: 22px; }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }
@media (max-width: 640px) {
  .lightbox__stage { padding: 0 12px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: -62px; transform: none; }
  .lightbox__prev { left: 16px; }
  .lightbox__next { right: 16px; }
  .lightbox__counter { padding: 26px 14px; }
}

/* ---------- контакты и форма ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact__info h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-top: 14px; }
.contact__info > p { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 460px; }
.contact-list { list-style: none; display: grid; gap: 4px; margin-top: 32px; }
.contact-list a, .contact-list div {
  display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin: 0 -16px; border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
}
.contact-list a { transition: background-color .15s; }
.contact-list a:hover { background: var(--bg-soft); }
.contact-list .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--red-50); color: var(--red-600); flex: none; }
.contact-list .ico svg { width: 22px; height: 22px; }
.contact-list small { display: block; font-size: 13px; color: var(--muted); }
.contact-list b { font-size: 18px; font-weight: 700; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.form-card h3 { font-size: 24px; }
.form-card > p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.form { display: grid; gap: 18px; margin-top: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field label .req { color: var(--red-600); }
.input, .textarea {
  width: 100%; min-height: 54px; padding: 14px 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #8a97a8; }
.input:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .textarea:focus { outline: none; background: #fff; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(14, 74, 123, .14); }
.field.is-invalid .input, .field.is-invalid .textarea, .field.is-invalid .phone { border-color: var(--red-600); box-shadow: 0 0 0 4px rgba(208, 16, 30, .1); }
.field__error { display: none; font-size: 13px; color: var(--red-700); }
.field.is-invalid .field__error { display: block; }

.phone { display: flex; align-items: stretch; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.phone:hover { border-color: var(--line-strong); }
.phone:focus-within { background: #fff; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(14, 74, 123, .14); }
.phone__prefix { display: flex; align-items: center; padding: 0 4px 0 16px; font-weight: 600; color: var(--ink); user-select: none; }
.phone .input { border: 0; background: transparent; box-shadow: none !important; padding-left: 6px; }

.consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.5; color: var(--text); cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; margin: 1px 0 0; width: 22px; height: 22px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color .15s, border-color .15s; }
.consent input::after { content: ""; width: 11px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.consent input:checked { background: var(--navy-800); border-color: var(--navy-800); }
.consent input:checked::after { opacity: 1; }
.consent a { color: var(--navy-700); text-underline-offset: 2px; }
.consent a:hover { color: var(--red-600); }
.field.is-invalid .consent input { border-color: var(--red-600); box-shadow: 0 0 0 4px rgba(208, 16, 30, .1); }

.captcha { min-height: 78px; }
.captcha__note { font-size: 13px; color: var(--muted); }
.form__foot { display: grid; gap: 12px; }
.form__hint { font-size: 13px; color: var(--muted); text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { display: none; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 15px; line-height: 1.45; }
.form-status.is-visible { display: flex; }
.form-status svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.form-status--ok { background: #e8f5ee; color: var(--ok); }
.form-status--err { background: var(--red-50); color: var(--red-700); }
.form-status a { color: inherit; font-weight: 700; }

@media (max-width: 960px) { .contact { grid-template-columns: 1fr; } }

/* ---------- подвал ---------- */
.footer { background: var(--navy-950); color: rgba(255, 255, 255, .64); font-size: 15px; padding: clamp(56px, 7vw, 80px) 0 0; }
.footer a { color: rgba(255, 255, 255, .86); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 40px; }
.footer .brand { color: #fff; }
.footer .brand__name small { color: rgba(255, 255, 255, .56); }
.footer .brand img { background: #fff; border-radius: 12px; padding: 4px; width: 52px; height: 52px; }
.footer__about { margin-top: 18px; max-width: 320px; line-height: 1.6; }
.footer h4 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer__req { display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.footer__req b { color: rgba(255, 255, 255, .9); font-weight: 600; }
.footer__bottom { margin-top: 56px; border-top: 1px solid rgba(255, 255, 255, .1); padding: 24px 0 28px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: 13px; }
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; color: rgba(255, 255, 255, .86); font-size: inherit; }
.linklike:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 960px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- cookie ---------- */
.cookie {
  position: fixed; z-index: 250; left: 16px; right: 16px; bottom: 16px;
  max-width: 560px; margin-left: auto;
  background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px 22px 20px;
  transform: translateY(20px); opacity: 0; visibility: hidden;
  transition: transform .35s var(--ease), opacity .35s var(--ease), visibility 0s .35s;
}
.cookie.is-visible { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.cookie__title { font-weight: 700; color: var(--ink); font-size: 16px; display: flex; align-items: center; gap: 10px; }
.cookie__title svg { width: 20px; height: 20px; color: var(--navy-700); }
.cookie p { margin-top: 8px; font-size: 14px; line-height: 1.55; }
.cookie a { color: var(--navy-700); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cookie__actions .btn { flex: 1 1 160px; }

/* ---------- мобильная плашка звонка ---------- */
.callbar { display: none; }
@media (max-width: 720px) {
  .callbar {
    position: fixed; z-index: 90; left: 12px; right: 12px; bottom: 12px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
    transform: translateY(120%); transition: transform .3s var(--ease);
  }
  .callbar.is-visible { transform: none; }
  .callbar .btn { min-height: 46px; padding: 0 12px; }
  body.has-callbar .footer__bottom { padding-bottom: 96px; }
}

/* ---------- появление ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .segment__bar i { transition: none; }
  .js .segments:not(.is-visible) .segment__bar i { transform: none; }
  * { scroll-behavior: auto !important; }
}

/* ==========================================================================
   Внутренние страницы (политика, согласие, сведения)
   ========================================================================== */
.page-hero { background: var(--navy-900); color: rgba(255, 255, 255, .7); padding: clamp(48px, 7vw, 80px) 0 clamp(40px, 5vw, 56px); }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.2rem); margin-top: 16px; max-width: 900px; }
.page-hero p { margin-top: 16px; max-width: 720px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.breadcrumbs a { color: rgba(255, 255, 255, .8); }
.breadcrumbs span[aria-hidden] { opacity: .5; }

.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(64px, 8vw, 104px); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: 14px; }
.toc p { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); line-height: 1.35; }
.toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.toc a.is-active { color: var(--red-600); border-left-color: var(--red-600); }
@media (max-width: 960px) { .doc-layout { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; } }

.prose { max-width: 780px; color: var(--text); font-size: 16.5px; line-height: 1.7; }
.prose h2 { font-size: 24px; margin: 48px 0 16px; padding-top: 8px; letter-spacing: -.01em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin: 28px 0 10px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--navy-700); text-underline-offset: 2px; }
.prose a:hover { color: var(--red-600); }
.prose .meta { color: var(--muted); font-size: 14px; }
.prose .note { background: var(--bg-soft); border-left: 3px solid var(--navy-700); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 20px 0; font-size: 15px; }

.table-wrap { overflow-x: auto; margin: 8px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }
.table th { width: 38%; font-weight: 600; color: var(--ink); background: var(--bg-soft); }
.table thead th { width: auto; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.todo { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #fff4d6; color: #7a5300; font-size: 13px; font-weight: 600; border: 1px dashed #e0b44c; }

/* ---------- мобильные уточнения ---------- */
@media (max-width: 560px) {
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .doc__thumb { padding: 10px 10px 0; }
  .doc__body { padding: 12px 12px 14px; }
  .doc__title { font-size: 14px; }
  .doc__tag { font-size: 10px; }
  .cookie { left: 12px; right: 12px; bottom: 12px; padding: 18px; }
  .cookie p { font-size: 13px; }
  .cookie__actions .btn { flex: 1 1 0; }
}
body.cookie-open .callbar { transform: translateY(120%); }

/* ---------- мобильные исправления v2 ---------- */
.doc, .doc__btn, .doc-layout > *, .service__title, .contact > *, .clients > *, .hero__grid > * { min-width: 0; }
.doc__title, .service__title, .prose { overflow-wrap: anywhere; }
.tab__short { display: none; }
.case__link { padding: 10px 0; margin: -10px 0; }
.consent input { width: 24px; height: 24px; }
@media (max-width: 760px) {
  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 16px; overflow: visible; }
  .tab { justify-content: center; padding: 10px 6px; border-radius: 12px; font-size: 14px; gap: 6px; min-height: 48px; }
  .tab__full { display: none; }
  .tab__short { display: inline; }
}
@media (max-width: 560px) {
  .doc__tag { letter-spacing: .04em; }
  .footer ul { gap: 0; }
  .footer ul a { display: inline-block; padding: 10px 0; }
  .footer__bottom nav { flex-direction: column; gap: 0; }
  .footer__bottom nav a, .footer__bottom .linklike { display: inline-block; padding: 10px 0; text-align: left; }
  .service { padding: 18px 16px; gap: 12px; }
  .service__num { width: 20px; }
  .service--wide .service__num { align-self: start; margin-top: 3px; }
  .section-head p { font-size: 16px; }
  .hero__checks li { font-size: 13px; }
  .page-hero h1 { font-size: 1.85rem; }
  .table th, .table td { padding: 12px 14px; }
}
@media (max-width: 400px) {
  .tab { font-size: 13px; }
  .tab__count { display: none; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq__lead h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-top: 14px; }
.faq__lead p { margin: 18px 0 28px; color: var(--muted); font-size: 18px; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { font-size: 18px; line-height: 1.35; letter-spacing: -.01em; font-weight: 600; transition: color .15s; }
.faq__item summary:hover h3 { color: var(--red-600); }
.faq__icon { position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); transition: background-color .2s, border-color .2s, transform .3s var(--ease); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), background-color .2s; }
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon { background: var(--navy-800); border-color: var(--navy-800); transform: rotate(180deg); }
.faq__item[open] .faq__icon::before, .faq__item[open] .faq__icon::after { background: #fff; }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__body { padding: 0 56px 24px 0; color: var(--text); }
.faq__body a { color: var(--navy-700); font-weight: 600; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } .faq__body { padding-right: 0; } .faq__item summary h3 { font-size: 17px; } }
.doc__meta, .doc__body { overflow-wrap: anywhere; }
@media (max-width: 560px) { .doc__tag { font-size: 11px; } }

/* ---------- внутренние страницы: мобильные ---------- */
.toc-wrap { position: sticky; top: calc(var(--header-h) + 24px); }
.toc { position: static; }
.toc summary { list-style: none; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; cursor: default; pointer-events: none; }
.toc summary::-webkit-details-marker { display: none; }
@media (max-width: 960px) {
  .toc-wrap { position: static; }
  .toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); padding: 0 16px; }
  .toc summary { pointer-events: auto; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 16px 0; font-size: 13px; color: var(--ink); }
  .toc summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
  .toc[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
  .toc ol { margin-bottom: 16px; }
}
@media (max-width: 640px) {
  .table-wrap--kv .table { min-width: 0; }
  .table-wrap--kv .table tr { display: block; border-bottom: 1px solid var(--line); }
  .table-wrap--kv .table tr:last-child { border-bottom: 0; }
  .table-wrap--kv .table th, .table-wrap--kv .table td { display: block; width: auto; border: 0; }
  .table-wrap--kv .table th { padding: 12px 14px 4px; background: transparent; font-size: 13px; color: var(--muted); }
  .table-wrap--kv .table td { padding: 0 14px 12px; }
}
