/* ==========================================================================
   Parker: корпоративный сайт. Общая дизайн-система для всех страниц.
   Тёмная графитовая база, светлый крупный гротеск Onest, один акцент: янтарный свет.
   Сигнатура: свет. Портрет, сцена и подсветка карточек, остальное спокойно и точно.
   ========================================================================== */

:root {
  --bg: #0b0d11;
  --bg-2: #0f1216;
  --surface: #13171d;
  --surface-2: #191e26;
  --surface-3: #212732;
  --line: rgba(233, 236, 241, 0.1);
  --line-2: rgba(233, 236, 241, 0.18);
  --text: #eceff3;
  --text-2: #a7b0bd;
  --text-3: #808a99;
  --accent: #f2b54a;
  --accent-2: #ffd48a;
  --accent-ink: #1a1204;
  --ok: #5fd39a;
  --err: #ff7a6b;

  --f: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-code: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);

  --maxw: 1360px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --header-h: 76px;
  --section: clamp(96px, 11vw, 168px);
  --r-s: 10px;
  --r-m: 18px;
  --r-l: 28px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.6 var(--f);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(242, 181, 74, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Лёгкое зерно, как у дорогой печати. Фиксированный слой, не перерисовывается */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.3 -.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 300;
  padding: 10px 14px; border-radius: var(--r-s);
  background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform 0.2s var(--ease-out);
}
.skip:focus-visible { transform: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Сетка ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section--flush-top { padding-top: 0; }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); }

/* ---------- Типографика ---------- */
.display {
  font-weight: 350;
  font-size: clamp(42px, 5vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.038em;
  text-wrap: balance;
}
.h2 {
  font-weight: 380;
  font-size: clamp(36px, 4.5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.032em;
  text-wrap: balance;
  max-width: 20ch;
}
.h3 { font-weight: 500; font-size: clamp(22px, 1.9vw, 28px); line-height: 1.2; letter-spacing: -0.015em; }
.h4 { font-weight: 500; font-size: 19px; line-height: 1.35; letter-spacing: -0.005em; }
.lead { font-size: clamp(18px, 1.45vw, 22px); line-height: 1.55; color: var(--text-2); max-width: 46ch; text-wrap: pretty; }
.body-2 { font-size: 16px; line-height: 1.6; color: var(--text-2); }
.kicker { font-size: 15px; font-weight: 500; color: var(--text-2); letter-spacing: 0.01em; }
.muted { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 6vw, 88px); }
.section-head--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; column-gap: clamp(24px, 4vw, 64px); }
.section-head--split .lead { justify-self: end; }

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  font: 500 16px/1 var(--f);
  letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 220ms ease, border-color 220ms ease, color 220ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { --btn-bg: var(--text); color: var(--bg); }
.btn-secondary { color: var(--text); border-color: var(--line-2); }
.btn-accent { --btn-bg: var(--accent); color: var(--accent-ink); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { --btn-bg: #ffffff; }
  .btn-secondary:hover { border-color: var(--text); }
  .btn-accent:hover { --btn-bg: var(--accent-2); }
}
.link {
  text-decoration: none; font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.3s var(--ease-out), color 0.2s ease;
}
@media (hover: hover) { .link:hover { color: var(--accent-2); } }

/* ---------- Шапка ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.header.is-solid { background: rgba(11, 13, 17, 0.82); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: baseline; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark { font-weight: 600; font-size: 20px; letter-spacing: 0.24em; text-transform: uppercase; }
.brand-note { font-size: 13px; color: var(--text-3); letter-spacing: 0.01em; }
.nav { display: flex; gap: 2px; }
.nav a {
  padding: 10px 14px; border-radius: 999px;
  color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 450;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav a[aria-current="page"] { color: var(--text); background: rgba(233, 236, 241, 0.06); }
@media (hover: hover) { .nav a:hover { color: var(--text); } }
.menu-btn { display: none; }

/* Мобильное меню */
.menu {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(11, 13, 17, 0.97);
  backdrop-filter: blur(12px);
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.24s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
.menu.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.24s ease, transform 0.3s var(--ease-out), visibility 0s; }
.menu a:not(.btn) { font-size: 32px; font-weight: 380; letter-spacing: -0.02em; text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--line); }
.menu .btn { margin-top: 24px; }

/* ---------- Карточки и поверхности ---------- */
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.glow-card { position: relative; isolation: isolate; overflow: hidden; }
.glow-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 181, 74, 0.1), transparent 60%);
  transition: opacity 0.4s ease;
}
@media (hover: hover) and (pointer: fine) { .glow-card:hover::before { opacity: 1; } }

.chip {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 14px; color: var(--text-2); white-space: nowrap;
}
.chip[aria-pressed="true"], .chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
button.chip { background: none; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }

/* ---------- Метрики ---------- */
.metric { display: grid; gap: 10px; align-content: start; }
.metric-value { font-weight: 300; font-size: clamp(44px, 5vw, 76px); line-height: 0.95; letter-spacing: -0.045em; font-variant-numeric: proportional-nums lining-nums; }
.metric-label { font-size: 15px; line-height: 1.45; color: var(--text-2); max-width: 22ch; }
.metric--sm .metric-value { font-size: clamp(30px, 3vw, 44px); }

/* ---------- Раскрывающиеся блоки (FAQ) ---------- */
.accordion { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 0; border: 0; background: none; cursor: pointer; text-align: left;
  font-weight: 450; font-size: clamp(19px, 1.6vw, 24px); letter-spacing: -0.015em; line-height: 1.3;
}
.acc-icon { position: relative; flex: none; width: 22px; height: 22px; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; margin: -0.75px 0 0 -8px; background: currentColor; transition: transform 0.3s var(--ease-out); }
.acc-icon::after { transform: rotate(90deg); }
.acc-btn[aria-expanded="true"] .acc-icon::after { transform: rotate(0deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease-out); }
.acc-panel > div { overflow: hidden; }
.acc-panel p { padding: 0 0 30px; max-width: 64ch; color: var(--text-2); }
.acc-btn[aria-expanded="true"] + .acc-panel { grid-template-rows: 1fr; }

/* ---------- Формы ---------- */
.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: 15px; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 16px 18px;
  border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text);
  font-size: 17px; line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(242, 181, 74, 0.18); background: var(--surface); }
.field [aria-invalid="true"] { border-color: var(--err); }
.field-help { font-size: 14px; color: var(--text-3); }
.field-error { font-size: 14px; color: var(--err); }
.field-error:empty { display: none; }
.choice { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 10px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { position: relative; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 15px; color: var(--text-2); transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.choice input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.form-note { font-size: 14px; color: var(--text-3); }
.form-success { display: grid; gap: 10px; padding: 8px 0; }
.form-success[hidden], .form [hidden] { display: none; }
.form-success-title { font-weight: 380; font-size: clamp(30px, 3vw, 44px); letter-spacing: -0.03em; line-height: 1.05; }

/* ---------- Появление при прокрутке (только заголовки и ключевые блоки) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(72px, 9vw, 128px) 0 40px; background: var(--bg); }
.footer-top { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 40px; }
.footer-cta .h2 { font-size: clamp(32px, 3.4vw, 52px); max-width: 14ch; }
.footer-cta .btn { margin-top: 28px; }
.footer h3 { font-size: 14px; font-weight: 500; color: var(--text-3); margin-bottom: 18px; }
.footer li { color: var(--text-2); overflow-wrap: anywhere; }
.footer li + li { margin-top: 10px; }
.footer a:not(.btn) { text-decoration: none; color: var(--text-2); transition: color 0.2s ease; }
@media (hover: hover) { .footer a:not(.btn):hover { color: var(--text); } }
.footer-mark {
  margin-top: clamp(64px, 9vw, 120px);
  font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  font-size: clamp(64px, 17vw, 260px); line-height: 0.8;
  color: transparent; -webkit-text-stroke: 1px rgba(233, 236, 241, 0.16);
  user-select: none;
}
.footer-bottom { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; font-size: 14px; color: var(--text-3); }

/* ---------- Внутренние страницы: шапка страницы ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(56px, 9vw, 128px)) 0 clamp(56px, 7vw, 96px); position: relative; overflow: hidden; overflow: clip; }
.crumbs { display: flex; gap: 10px; font-size: 14px; color: var(--text-3); margin-bottom: 28px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs span[aria-hidden] { opacity: 0.5; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .nav a { padding: 10px 10px; font-size: 14px; }
  .brand-note { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav, .header .btn-cta { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
    border-radius: 999px; border: 1px solid var(--line-2); background: none; cursor: pointer; font-size: 15px;
  }
  .menu-btn i { position: relative; width: 16px; height: 10px; }
  .menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out); }
  .menu-btn i::before { top: 1px; }
  .menu-btn i::after { top: 7px; }
  .menu-btn[aria-expanded="true"] i::before { top: 4px; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] i::after { top: 4px; transform: rotate(-45deg); }
  .section-head--split { grid-template-columns: 1fr; }
  .section-head--split .lead { justify-self: start; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-cta { grid-column: 1 / -1; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .footer-top { grid-template-columns: 1fr; }
  .btn { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Cookie banner (built by js/track.js) ---------- */
.consent {
  position: fixed; z-index: 150; left: 20px; bottom: 20px;
  width: min(440px, calc(100% - 40px));
  padding: 20px 22px; border-radius: 20px;
  background: rgba(19, 23, 29, 0.96); border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 15px; line-height: 1.5; color: var(--text-2);
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
}
@starting-style { .consent { opacity: 0; transform: translateY(12px); } }
.consent.is-hidden { opacity: 0; transform: translateY(12px); }
.consent a { color: var(--text); }
.consent-actions { display: flex; gap: 10px; margin-top: 14px; justify-content: flex-end; }
@media (max-width: 560px) {
  .consent { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .consent-actions .btn { flex: 1; }
}
