/* ============================================================
   Товшик — стили сайта. Палитра и типографика — DESIGN.md.
   Поверхности: .surface-dark (фирменная тёмная) и .surface-light
   (кремовая для чтения). Компоненты берут цвета из переменных
   поверхности (--fg, --fg-muted, --line, --card…), поэтому
   работают на любой из них.
   ============================================================ */

/* ---------- Токены ---------- */
:root {
  /* Бренд */
  --bg:      #1D2F31;  /* тёмный сине-бирюзовый — основа */
  --bg-deep: #152224;  /* виньетка */
  --slate:   #42575A;  /* серо-бирюзовый — акцент */
  --brown:   #4A3B31;  /* тёплый подтон */
  --beige:   #E0D7C4;  /* акценты на тёмном */
  --cream:   #F4F0E8;  /* текст на тёмном, светлая поверхность */

  /* Светлые поверхности (производные от cream/beige) */
  --paper:   #F4F0E8;
  --paper-2: #EBE5D9;
  --white:   #FDFCF9;

  /* Текст на светлом */
  --ink:       #1D2F31;
  --ink-muted: #42575A;

  /* Статусы */
  --danger:  #A8322A;
  --success: #2F6B55;

  /* Состояния рабочих мест — как в расширении «Товшик.Офис» */
  --desk-free:     #E2E1DC;  /* свободно — светло-серый */
  --desk-nobody:   #F5E7A8;  /* есть компьютер, нет сотрудника — светло-жёлтый */
  --desk-busy:     #BFE1DA;  /* компьютер и сотрудник — бледно-бирюзовый */
  --desk-multi:    #CBA6C6;  /* несколько компьютеров — сливовый */
  --desk-selected: #C2412F;  /* рамка выделения — красная */

  /* Типографика: DIN-геометрия для заголовков, системный текст для чтения */
  --font-display: "Bahnschrift", "Avenir Next", Futura, "Segoe UI", system-ui,
                  -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  /* Сетка и ритм */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(56px, 8vw, 104px);
  --header-h: 68px;
  --radius: 14px;
  --radius-sm: 8px;

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

.surface-dark {
  --fg: var(--cream);
  --fg-muted: rgba(224, 215, 196, 0.74);
  --line: rgba(224, 215, 196, 0.14);
  --line-strong: rgba(224, 215, 196, 0.32);
  --link: var(--beige);
  --card: rgba(66, 87, 90, 0.24);
  --chip: rgba(66, 87, 90, 0.35);
  --icon-bg: rgba(224, 215, 196, 0.1);
  --icon-fg: var(--beige);
  background-color: var(--bg);
  color: var(--fg);
}

.surface-light,
body {
  --fg: var(--ink);
  --fg-muted: var(--ink-muted);
  --line: rgba(29, 47, 49, 0.13);
  --line-strong: rgba(29, 47, 49, 0.3);
  --link: var(--ink);
  --card: var(--white);
  --chip: var(--paper-2);
  --icon-bg: var(--bg);
  --icon-fg: var(--beige);
}

.surface-light { background-color: var(--paper); color: var(--fg); }
.surface-alt   { background-color: var(--paper-2); --card: var(--white); --chip: var(--paper); }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--fg);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1; }
main:focus { outline: none; }

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

::selection { background: var(--slate); color: var(--cream); }

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Каркас ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }

.section-head {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.section-head p { color: var(--fg-muted); font-size: 1.075em; }

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

.split {
  display: grid;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--form { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

.lead { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem); color: var(--fg-muted); }
.muted { color: var(--fg-muted); }

/* ---------- Eyebrow: мелкий капс с трекингом ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.eyebrow--pill {
  padding: 0.55em 1.15em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(66, 87, 90, 0.18);
}
/* Трекинг добавляет пробел после последней буквы — компенсируем */
.eyebrow--pill > span:last-child { margin-right: -0.32em; }

.eyebrow__dot {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--beige);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224, 215, 196, 0.5); }
  70%  { box-shadow: 0 0 0 0.7em rgba(224, 215, 196, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 215, 196, 0); }
}

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  --btn-line: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.75em 1.4em;
  border: 1px solid var(--btn-line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 1rem/1.2 var(--font-display);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn .icon { width: 1.15em; height: 1.15em; }

.btn--light { --btn-bg: var(--cream); --btn-fg: var(--bg); }
.btn--light:hover { --btn-bg: #fff; }
.btn--dark { --btn-bg: var(--bg); --btn-fg: var(--cream); }
.btn--dark:hover { --btn-bg: var(--slate); }
.btn--ghost { --btn-line: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--card); }
.btn--sm { min-height: 40px; padding: 0.5em 1.1em; font-size: 0.92rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
}
.link-arrow .icon { width: 1.1em; height: 1.1em; transition: transform 0.2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Шапка ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 0.6em 1em;
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--bg);
}
.skip-link:focus { top: 12px; }

.site-header {
  --fg: var(--cream);
  --fg-muted: rgba(224, 215, 196, 0.74);
  --line: rgba(224, 215, 196, 0.14);
  --line-strong: rgba(224, 215, 196, 0.32);
  --link: var(--beige);
  --card: rgba(66, 87, 90, 0.4);
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--fg);
  background: rgba(29, 47, 49, 0.94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: rgba(29, 47, 49, 0.84); backdrop-filter: saturate(1.2) blur(12px); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}
.brand__symbol { width: 30px; }
.brand__wordmark { width: 116px; }

.site-nav { display: flex; align-items: center; gap: 20px; }

.site-nav__list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 0.5em 0.85em;
  border-radius: 999px;
  color: rgba(244, 240, 232, 0.8);
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-nav__link:hover,
.site-nav__link.is-active { color: var(--cream); background: rgba(66, 87, 90, 0.5); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.site-header.is-open .nav-toggle__bars { background: transparent; }
.site-header.is-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; place-items: center; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }
  .site-header.is-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .site-nav__list { flex-direction: column; }
  .site-nav__link {
    padding: 0.85em 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
  }
  .site-nav__link:hover,
  .site-nav__link.is-active { background: none; }
  .site-nav__cta { align-self: flex-start; }
}

/* ---------- Главный экран (главная страница) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(calc(100svh - var(--header-h)), 820px);
  padding-block: clamp(64px, 9vw, 120px);
}

/* Многослойный фон: тёплое свечение под лого + виньетка */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(115% 75% at 50% 30%, rgba(66, 87, 90, 0.55), transparent 58%),
    radial-gradient(60% 42% at 50% 38%, rgba(74, 59, 49, 0.3), transparent 72%),
    radial-gradient(80% 50% at 50% 40%, rgba(244, 240, 232, 0.06), transparent 70%),
    radial-gradient(120% 120% at 50% 50%, transparent 55%, var(--bg-deep)),
    var(--bg);
}

/* Тонкая зернистость */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__mesh {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: fade-in 1.8s var(--ease) 1.1s forwards;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 4vh, 40px);
  text-align: center;
}

.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3vh, 30px);
}

.logo { display: block; height: auto; }
.logo--symbol {
  width: clamp(64px, 8vw, 96px);
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}
.logo--wordmark { width: clamp(230px, 40vw, 430px); }

.wordmark-row { display: flex; align-items: flex-start; gap: 0.5em; }

.version {
  padding: 0.34em 0.6em;
  border: 1px solid rgba(244, 240, 232, 0.16);
  border-radius: 7px;
  background: rgba(66, 87, 90, 0.45);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  transform: translateY(0.15em);
}

.tagline {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  max-width: 42ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  line-height: 1.4;
}
.tagline__strong { color: var(--cream); font-size: 1.08em; font-weight: 600; letter-spacing: 0.02em; }
.tagline__accent { color: var(--beige); font-size: 0.94em; font-weight: 300; letter-spacing: 0.04em; }

.hero__text { max-width: 60ch; margin: 0; color: var(--fg-muted); }
.hero__actions { justify-content: center; }

/* Оркестровка загрузки: бейдж → лого → слоган → текст */
.hero .rise { opacity: 0; transform: translateY(16px); animation: rise 0.9s var(--ease) forwards; }
.hero .rise:nth-child(1) { animation-delay: 0.1s; }
.hero .rise:nth-child(2) { animation-delay: 0.28s; }
.hero .rise:nth-child(3) { animation-delay: 0.5s; }
.hero .rise:nth-child(4) { animation-delay: 0.66s; }
.hero .rise:nth-child(5) { animation-delay: 0.8s; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade-in { to { opacity: 1; } }

/* ---------- Шапка внутренней страницы ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(36px, 5vw, 64px) clamp(48px, 7vw, 88px);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 120% at 88% 0%, rgba(66, 87, 90, 0.6), transparent 62%),
    radial-gradient(45% 90% at 100% 100%, rgba(74, 59, 49, 0.35), transparent 70%),
    radial-gradient(120% 140% at 30% 50%, transparent 60%, var(--bg-deep)),
    var(--bg);
}

.page-hero__title { max-width: 26ch; }
.page-hero__lead {
  max-width: 64ch;
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
}
.page-hero .actions { margin-top: clamp(24px, 3vw, 36px); }

.breadcrumbs { margin-bottom: clamp(24px, 3vw, 40px); font-size: 0.88rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.35em; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { color: var(--fg-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35em; opacity: 0.5; }
.breadcrumbs a { color: var(--fg-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--fg); text-decoration: underline; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: clamp(20px, 3vw, 28px) 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 0.45em 0.95em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  color: var(--fg-muted);
  font-size: 0.9rem;
}

/* ---------- Карточки ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.card h3 { font-size: 1.2rem; margin-bottom: 0.45em; }
.card p { color: var(--fg-muted); }
.card > :last-child { margin-bottom: 0; }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--icon-bg);
  color: var(--icon-fg);
}

.card--link {
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card--link:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px -24px rgba(21, 34, 36, 0.45);
}
.card__more { margin-top: auto; padding-top: 18px; }

/* Крупная карточка направления/продукта */
.card--feature { padding: clamp(24px, 3vw, 36px); }
.card--feature h3,
.h3 { font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); margin-bottom: 0.45em; }
.card--feature .chips { margin-top: 18px; }
.card--soon { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.card .eyebrow { margin-bottom: 0.6rem; }
.card .checklist { margin-top: 6px; color: var(--fg-muted); font-size: 0.97rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  padding: 0.3em 0.75em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.85rem;
  color: var(--fg);
}

/* Нумерованные шаги */
.steps {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding-top: 18px;
  border-top: 2px solid var(--fg);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}
.steps h3 { font-size: 1.08rem; margin-bottom: 0.35em; }
.steps p { color: var(--fg-muted); font-size: 0.96rem; }

/* Список с галочками */
.checklist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 10px; }
.checklist .icon { width: 20px; height: 20px; margin-top: 0.2em; color: var(--slate); }
.surface-dark .checklist .icon,
.price-card .checklist .icon { color: var(--beige); }

/* Группы возможностей */
.features {
  display: grid;
  gap: clamp(28px, 3vw, 40px) clamp(24px, 4vw, 56px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.features h3 { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; }
.features h3 .icon { color: var(--slate); }
.features ul { margin: 0; padding-left: 1.2em; color: var(--fg-muted); }
.features li { margin: 0.35em 0; }
.features li::marker { color: var(--slate); }

/* ---------- Тексты из Markdown ---------- */
.prose { max-width: 76ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2em 0 0.6em; font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); }
.prose h3 { margin: 1.6em 0 0.5em; font-size: 1.2rem; }
.prose :is(ul, ol) { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--slate); }
.prose strong { font-weight: 650; }
.prose blockquote {
  margin: 1.5em 0;
  padding: 1em 1.2em;
  border-left: 3px solid var(--slate);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--paper-2);
}
.prose code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 0.88em;
}
.prose hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--line); }

.table-wrap {
  margin: 1.2em 0 1.6em;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.prose th,
.prose td {
  padding: 0.65em 0.9em;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--paper-2); font-family: var(--font-display); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

/* ---------- Документация ---------- */
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (min-width: 1000px) {
  .doc { grid-template-columns: 260px minmax(0, 1fr); }
  .doc__aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow: auto;
  }
}

.toc__title {
  margin-bottom: 0.6em;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc a {
  display: block;
  padding: 0.38em 0.7em;
  border-radius: 6px;
  color: var(--fg-muted);
  font-size: 0.94rem;
  line-height: 1.35;
  text-decoration: none;
}
.toc a:hover,
.toc a.is-current { background: var(--paper-2); color: var(--fg); }

.doc__cta {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.94rem;
  color: var(--fg-muted);
}

/* ---------- Формы ---------- */
.form-card {
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.form-card h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); }

.lead-form { position: relative; display: grid; gap: 18px; }
.lead-form__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label {
  padding: 0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--fg);
}
legend.field__label { margin-bottom: 8px; }
.req { color: var(--danger); }

.input {
  width: 100%;
  min-height: 48px;
  padding: 0.7em 0.9em;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input::placeholder { color: rgba(66, 87, 90, 0.7); }
.input:focus { outline: none; border-color: var(--bg); box-shadow: 0 0 0 3px rgba(66, 87, 90, 0.28); }
.input:user-invalid { border-color: var(--danger); }
textarea.input { min-height: 120px; resize: vertical; }

.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice__item { position: relative; }
.choice__item input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice__item span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55em 1.1em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.choice__item input:checked + span { background: var(--bg); border-color: var(--bg); color: var(--cream); }
.choice__item input:focus-visible + span { outline: 2px solid var(--bg); outline-offset: 2px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--fg-muted); }
.check input { flex: none; width: 20px; height: 20px; margin: 0.15em 0 0; accent-color: var(--bg); }

/* Ловушка для ботов */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.lead-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.lead-form__hint { margin: 0; font-size: 0.85rem; color: var(--fg-muted); }
.lead-form__status { margin: 0; font-weight: 600; }
.lead-form__status:empty { display: none; }
.lead-form__status.is-error { color: var(--danger); }
.lead-form__status.is-success { color: var(--success); }

[data-show-for][hidden] { display: none; }

/* ---------- Демо «Схема офиса» ---------- */
.office-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);  /* схема прокручивается внутри, а не раздвигает страницу */
  gap: 20px;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 30px 60px -40px rgba(21, 34, 36, 0.45);
}
@media (min-width: 980px) {
  .office-demo { grid-template-columns: minmax(0, 1fr) 250px; }
  .office-demo__info { grid-column: 1 / -1; }
}

.office-demo__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 600;
  text-align: center;
}
.office-demo__scroll { overflow-x: auto; }
.office-demo__svg { width: 100%; min-width: 560px; }

.od-room { fill: #FBFAF7; stroke: #8D9A98; stroke-width: 1.5; }
.od-grid { stroke: #E6E1D6; stroke-width: 1; }
.od-desk { cursor: pointer; outline: none; }
.od-desk rect {
  stroke: rgba(29, 47, 49, 0.45);
  stroke-width: 1;
  transition: filter 0.15s ease, stroke 0.15s ease;
}
.od-desk text {
  fill: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.od-desk:hover rect,
.od-desk:focus-visible rect { filter: brightness(0.93); stroke: var(--ink); stroke-width: 1.5; }
.od-selection { fill: none; stroke: var(--desk-selected); stroke-width: 3; pointer-events: none; }
.od-desk--free rect   { fill: var(--desk-free); }
.od-desk--nobody rect { fill: var(--desk-nobody); }
.od-desk--busy rect   { fill: var(--desk-busy); }
.od-desk--multi rect  { fill: var(--desk-multi); }

.office-demo__legend:empty,
.office-demo__info:empty { display: none; }
.office-demo__legend ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; line-height: 1.3; }
.legend-swatch { flex: none; width: 24px; height: 16px; border: 1px solid rgba(29, 47, 49, 0.35); border-radius: 4px; }
.legend-swatch--selected { background: transparent; border: 3px solid var(--desk-selected); }
.legend-count { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend-total { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.92rem; }

.office-demo__info {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 0.95rem;
}
.office-demo__info h3 { font-size: 1.05rem; margin-bottom: 0.6em; }
.od-computers { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.od-computer { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.od-computer__name { font-family: var(--font-display); font-weight: 600; }
.od-computer dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0; color: var(--fg-muted); }
.od-computer dd { margin: 0; color: var(--fg); }
.od-computer ul { margin: 6px 0 0; padding-left: 1.1em; color: var(--fg-muted); }
.office-demo__hint { margin: 10px 0 0; font-size: 0.88rem; color: var(--fg-muted); text-align: center; }

/* Превью схемы на главной — ссылка на демо */
.office-teaser {
  display: block;
  padding: clamp(12px, 1.6vw, 18px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--fg);
  text-decoration: none;
  box-shadow: 0 30px 60px -40px rgba(21, 34, 36, 0.45);
  transition: transform 0.25s var(--ease);
}
.office-teaser:hover { transform: translateY(-3px); }
.office-preview { width: 100%; }
.office-preview .od-desk { cursor: inherit; }
.office-teaser__caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}
.office-teaser__caption .icon { width: 1.1em; height: 1.1em; }

/* ---------- Плейсхолдеры скриншотов и видео ---------- */
.shot { margin: 0; }
.shots { align-items: start; }
.shot--wide { grid-column: 1 / -1; }
.shot__frame {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(29, 47, 49, 0.03) 14px 28px), var(--white);
  color: var(--fg-muted);
  text-align: center;
  font-size: 0.92rem;
}
.shot__frame--wide { aspect-ratio: auto; min-height: 140px; }
.shot img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
.shot__link { display: block; border-radius: var(--radius); cursor: zoom-in; }
.shot__link:hover img { border-color: var(--line-strong); }
.shot figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--fg-muted); }

.video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.video iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Цена ---------- */
.price-card {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(66, 87, 90, 0.7), transparent 60%),
    var(--bg);
  color: var(--cream);
  --fg-muted: rgba(224, 215, 196, 0.74);
}
.price-card__label { margin: 0; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--fg-muted); }
.price-card__value { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); font-weight: 600; line-height: 1.1; }
.price-card__offer { margin: -6px 0 0; color: var(--beige); font-weight: 600; }
.price-card__note { margin: 0; color: var(--fg-muted); }

/* ---------- Вопросы и ответы ---------- */
.faq { display: grid; gap: 10px; max-width: 880px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.faq summary {
  position: relative;
  padding: 18px 56px 18px 20px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__body { padding: 0 20px 18px; color: var(--fg-muted); }

/* ---------- Призыв ---------- */
.cta-card {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 4vw, 56px);
  border-radius: calc(var(--radius) * 1.4);
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(66, 87, 90, 0.75), transparent 60%),
    radial-gradient(60% 100% at 0% 100%, rgba(74, 59, 49, 0.45), transparent 70%),
    var(--bg);
}
.cta-card__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.cta-card__text { max-width: 60ch; margin: 0; color: var(--fg-muted); }
.cta-card__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .cta-card { grid-template-columns: minmax(0, 1fr) auto; }
  .cta-card__actions { flex-direction: column; align-items: stretch; }
}

/* ---------- Блог ---------- */
.post-list { display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.post-card time { display: block; margin-bottom: 10px; font-size: 0.85rem; color: var(--fg-muted); }

/* ---------- Контакты ---------- */
.contact-list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .card__icon { margin: 0; width: 42px; height: 42px; }
.contact-list__label { display: block; font-size: 0.85rem; color: var(--fg-muted); }
.contact-list a { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }

/* ---------- Подвал ---------- */
.site-footer {
  padding-block: clamp(48px, 6vw, 72px) 28px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
@media (min-width: 960px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

.brand--footer .brand__symbol { width: 34px; }
.brand--footer .brand__wordmark { width: 132px; }
.site-footer__slogan { display: grid; gap: 2px; margin-top: 18px; font-family: var(--font-display); }
.site-footer__slogan .accent { color: var(--beige); font-weight: 300; }

.site-footer__title {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.site-footer ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.site-footer__legal {
  display: grid;
  gap: 8px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--fg-muted);
}
.site-footer__legal p { margin: 0; }
.site-footer__legal .sep { margin-inline: 0.35em; opacity: 0.5; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer__links a { color: var(--fg-muted); }
.site-footer__tm { opacity: 0.7; }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

/* ---------- Cookie ---------- */
.cookie {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 60;
  display: grid;
  gap: 14px;
  width: min(720px, calc(100% - 32px));
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  font-size: 0.92rem;
  transform: translateX(-50%);
}
.cookie[hidden] { display: none; }
.cookie__text { margin: 0; color: var(--fg-muted); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 720px) {
  .cookie { grid-template-columns: 1fr auto; align-items: center; }
}

/* ---------- Служебное ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.center { text-align: center; }
.mt-l { margin-top: clamp(28px, 4vw, 48px); }

/* ---------- Уважение к настройкам движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero .rise { opacity: 1; transform: none; }
  .hero__mesh { opacity: 1; }
}
