/* ==========================================================================
   StackDev Studio — design system
   --------------------------------------------------------------------------
   1. Tokens          6. Services       11. FAQ
   2. Reset + base    7. Process        12. Contact form
   3. Layout + type   8. Comparison     13. Footer
   4. Primitives      9. Works          14. Docs pages
   5. Header         10. CTA extras     15. Motion + responsive
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */
:root {
  /* Surfaces */
  --bg: #07080d;
  --bg-elev: #0b0d15;
  --panel: #0f111b;
  --panel-2: #141726;
  --line: #1e2233;
  --line-soft: #171a27;

  /* Type */
  --text: #f0f1f7;
  --text-2: #b8bdd4;
  --muted: #868ca6;
  --muted-2: #6a7089;

  /* Brand */
  --cyan: #4dd8e6;
  --violet: #7c6bff;
  --magenta: #c65cff;
  --accent: var(--violet);
  --grad: linear-gradient(100deg, var(--cyan) 0%, var(--violet) 48%, var(--magenta) 100%);
  /* Horizontal fill keeps a pill's rim one colour top-to-bottom. */
  --grad-fill: linear-gradient(90deg,
      var(--violet) 0%,
      var(--cyan) 12%,
      var(--violet) 48%,
      var(--magenta) 88%,
      var(--violet) 100%);
  --grad-soft: linear-gradient(100deg, rgba(77, 216, 230, .16) 0%, rgba(124, 107, 255, .18) 50%, rgba(198, 92, 255, .16) 100%);

  /* Shape */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t: .28s var(--ease);

  /* Fonts: self-hosted (fonts.css) */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --shadow-sm: 0 2px 8px -4px rgba(0, 0, 0, .6);
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, .95);

  --container: 1180px;
  --header-h: 72px;
}

/* --------------------------------------------------------- 2. Reset + base */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "cv05" 1, "ss03" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* ------------------------------------------------------ 3. Layout + type */
.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

.container-narrow { max-width: 820px; }

.section {
  position: relative;
  padding: clamp(72px, 9vw, 128px) 0;
}

/* Raised surface with a hairline seam. */
.section-alt {
  background: var(--bg-elev);
  border-block: 1px solid var(--line-soft);
}

/* Tighter rhythm for short sections that follow the hero. */
.section-tight { padding-top: clamp(56px, 6vw, 88px); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 4.5vw, 60px); }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--grad);
}

.section-title {
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: -.035em;
}

.section-sub {
  margin-top: 18px;
  color: var(--text-2);
  font-size: clamp(16px, 1.6vw, 18px);
  max-width: 62ch;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------------------------------------------- 4. Primitives */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--btn-bg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t), box-shadow var(--t), background var(--t),
              border-color var(--t), color var(--t);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad-fill);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(124, 107, 255, .8);
}
/* Brighten in place; shifting the gradient exposes bands at the pill caps. */
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 16px 40px -14px rgba(160, 100, 255, .9);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, .02);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(124, 107, 255, .55);
  background: rgba(124, 107, 255, .08);
}

.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* Hairline border + top inner highlight ("lit" edge). */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel) 0%, #0c0e17 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, .025);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .18);
  animation: pulse 2.4s var(--ease) infinite;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(124, 107, 255, .8);
  transition: width .1s linear;
}

body.menu-open { overflow: hidden; }

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

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  text-wrap: balance;
  /* Long single words (e.g. "конфиденциальности") must not push the layout
     wider than a 320px viewport. */
  overflow-wrap: break-word;
}

p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; color: inherit; }

/* Атрибут hidden должен побеждать любой display из компонентных правил —
   иначе скрытые блоки (статус/запасная отправка формы) мигают при загрузке. */
[hidden] { display: none !important; }

ul, ol { list-style: none; padding: 0; }

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

::selection { background: rgba(124, 107, 255, .35); color: #fff; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--violet);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--t);
}
.skip-link:focus { transform: none; }
/* ========================================================== 5. HEADER === */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--t), border-color var(--t), backdrop-filter var(--t);
  border-bottom: 1px solid transparent;
}

/* Bar materialises only after the hero scrolls away. */
.site-header.is-stuck {
  background: rgba(8, 9, 15, .78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark { width: 36px; height: 36px; }

.brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.03em;
}
.brand-text span { color: var(--muted); font-weight: 500; }

/* .header-actions carries the auto margin so right-side items stay pinned
   regardless of where the nav sits in the markup. */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-actions { margin-left: auto; }

.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--t), background var(--t);
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }

/* Scroll-spy state, toggled by site.js */
.nav a.is-active { color: var(--text); }

/* Underline is always painted, just transparent: sections fade in/out. */
.nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity var(--t);
}
.nav a.is-active::after { opacity: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Header contact menu: channels at a glance, no bare phone number. */
.contact { position: relative; }

.contact-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, .03);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: border-color var(--t), background var(--t);
}
.contact-toggle::-webkit-details-marker { display: none; }
.contact-toggle:hover { border-color: rgba(124, 107, 255, .5); background: rgba(124, 107, 255, .08); }
.contact-icon { color: var(--cyan); }
.contact-caret { color: var(--muted); transition: transform var(--t); }

.contact[open] .contact-toggle { border-color: rgba(124, 107, 255, .55); background: rgba(124, 107, 255, .1); }
.contact[open] .contact-caret { transform: rotate(180deg); }

.contact-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 320px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(13, 15, 24, .98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.contact-lead { margin-bottom: 8px; font-size: 13px; color: var(--muted); }

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  transition: background var(--t);
}
.contact-row:hover { background: rgba(255, 255, 255, .05); }

.contact-row-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad-soft);
  color: var(--cyan);
}

.contact-row-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.contact-row-text b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.contact-row-text em { font-size: 12.5px; font-style: normal; color: var(--muted); }

/* Mobile-only CTA (drawer); hidden on desktop. */
.nav-cta { display: none; }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  place-items: center;
  gap: 5px;
}
/* Whole-pixel height: 1.5px anti-aliases unevenly across device pixel ratios. */
.burger span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform var(--t), opacity var(--t);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ============================================================ HERO === */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(48px, 7vw, 88px)) 0 clamp(48px, 6vw, 72px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Faint radial-faded grid. */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 85% 62% at 50% 32%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 62% at 50% 32%, #000 20%, transparent 78%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}
.orb-a {
  width: 560px; height: 560px;
  top: -220px; left: -140px;
  background: radial-gradient(circle, rgba(77, 216, 230, .3), transparent 68%);
}
.orb-b {
  width: 640px; height: 640px;
  top: -180px; right: -200px;
  background: radial-gradient(circle, rgba(124, 107, 255, .38), transparent 68%);
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy > * + * { margin-top: 26px; }
/* ---- Hero product mock ---- */
.hero-visual { position: relative; }

.mock {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, rgba(18, 21, 36, .4) 0%, rgba(10, 12, 20, .96) 55%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Glow stays inside the parent: oversized clipped children force huge
   compositor layers that some GPUs rasterise partially. */
.mock-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 200px at 50% 0%, rgba(124, 107, 255, .3), transparent 70%);
  pointer-events: none;
}

.mock-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .015);
}

.mock-dots { display: flex; gap: 6px; }
.mock-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock-dots i:first-child { background: #ff5f57; }
.mock-dots i:nth-child(2) { background: #febc2e; }
.mock-dots i:last-child { background: #28c840; }

.mock-title {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.mock-body {
  position: relative;
  padding: 22px 22px 26px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2.1;
  color: var(--text-2);
}

.mock-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok-ok { color: #4ade80; }
.tok-run { color: var(--cyan); animation: blink 1.6s steps(2, start) infinite; }
.tok-dim { color: var(--muted-2); }

.mock-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .012);
}

.mock-stats > div { padding: 18px 22px; }
.mock-stats > div + div { border-left: 1px solid var(--line-soft); }
.mock-stats b {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mock-stats span { font-size: 13px; color: var(--muted); }

/* ---- Tech strip ---- */
.stack-strip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.stack-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-list li {
  padding: 7px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color var(--t), color var(--t);
}
.stack-list li:hover { border-color: rgba(124, 107, 255, .5); color: var(--text); }

/* ===================================================== 6. PROBLEM + SERVICES === */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.problem-card {
  padding: 28px 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent);
  transition: border-color var(--t), transform var(--t), background var(--t);
}
.problem-card:hover {
  border-color: rgba(124, 107, 255, .4);
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(124, 107, 255, .07), transparent);
}

.problem-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--grad-soft);
  color: var(--cyan);
}

.problem-card h3 { font-size: 19px; margin-bottom: 10px; }
.problem-card p { color: var(--muted); font-size: 15px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  transition: border-color var(--t), transform var(--t);
}
.service-card:hover {
  border-color: rgba(124, 107, 255, .45);
  transform: translateY(-4px);
}

.service-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--grad-soft);
  color: var(--violet);
}

.service-price { text-align: right; }
.service-price b {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.service-price span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.service-card h3 { font-size: 21px; margin-bottom: 12px; }
.service-card > p { color: var(--muted); font-size: 15px; }

.service-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.service-list li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  color: var(--text-2);
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: color var(--t), gap var(--t);
}
.service-link svg { color: var(--violet); transition: transform var(--t); }
.service-link:hover { color: var(--violet); }
.service-link:hover svg { transform: translateX(3px); }

/* ============================================== 7. PROCESS + WHY / COMPARE === */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.step {
  position: relative;
  padding: 28px 26px 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent);
  transition: border-color var(--t), transform var(--t);
}
.step:hover { border-color: rgba(124, 107, 255, .4); transform: translateY(-4px); }

.step-num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step-body h3 { font-size: 19px; margin-bottom: 10px; }
.step-body p { color: var(--muted); font-size: 15px; }

.step-out {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px !important;
  color: var(--cyan) !important;
}

/* ---- Why + comparison ---- */
.why-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.why-list { display: flex; flex-direction: column; }

.why-list li {
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
}
.why-list li:last-child { border-bottom: 1px solid var(--line-soft); }

.why-list h3 {
  font-size: 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.why-list h3::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.why-list p { color: var(--muted); font-size: 15px; padding-left: 28px; }

.why-compare { padding: 28px 26px 24px; }

.compare-title { font-size: 17px; margin-bottom: 18px; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th,
.compare-table td {
  padding: 11px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.compare-table thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.compare-table tbody th { font-weight: 500; color: var(--text-2); }
.compare-table td { color: var(--muted); }

.compare-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* ======================================================= 8. WORKS / FAQ === */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.repo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel) 0%, #0c0e17 100%);
  transition: border-color var(--t), transform var(--t);
}
.repo:hover {
  border-color: rgba(124, 107, 255, .45);
  transform: translateY(-4px);
}

.repo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.repo-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.repo-desc {
  flex: 1;
  font-size: 14px;
  color: var(--muted);
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
}
.repo-meta span { display: inline-flex; align-items: center; gap: 6px; }

.repo-fallback,
.repo-error {
  padding: 20px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--muted);
  font-size: 15px;
}
.repo-fallback a,
.repo-error a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }

.works-foot { margin-top: 28px; display: flex; justify-content: center; }

/* ---- FAQ ---- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent);
  transition: border-color var(--t), background var(--t);
}
.faq-item[open] {
  border-color: rgba(124, 107, 255, .4);
  background: linear-gradient(180deg, rgba(124, 107, 255, .06), transparent);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -.02em;
  cursor: pointer;
  list-style: none;
  transition: color var(--t);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--violet); }

/* Plus/cross from two pseudo-elements. */
.faq-marker {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.faq-marker::before,
.faq-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform var(--t);
}
.faq-marker::after { transform: translate(-50%, -50%) rotate(90deg); }

.faq-item[open] .faq-marker {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.faq-item[open] .faq-marker::after { transform: translate(-50%, -50%) rotate(0deg); }

.faq-body { padding: 0 22px 22px; }
.faq-body p { color: var(--muted); font-size: 15px; max-width: 68ch; }

/* ============================================ 9. CONTACT FORM + FOOTER === */
.cta {
  position: relative;
  padding: clamp(32px, 5vw, 60px);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 380px at 12% 0%, rgba(124, 107, 255, .32), transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: clamp(32px, 5vw, 60px);
  align-items: start;
}

.cta-title {
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -.035em;
}
.cta-sub {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 16px;
  max-width: 46ch;
}

/* "What happens next" — three numbered steps, numbered by markup. */
.cta-next {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
}
.cta-next li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-2);
}
.cta-next span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(124, 107, 255, .5);
  border-radius: 50%;
  background: var(--grad-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* Direct channels shown in the CTA, not only in the footer. */
.cta-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.cta-contacts a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .02);
  color: var(--text-2);
  transition: border-color var(--t), color var(--t), background var(--t);
}
.cta-contacts a:hover {
  border-color: rgba(124, 107, 255, .5);
  background: rgba(124, 107, 255, .08);
  color: var(--text);
}
.cta-contacts svg { flex-shrink: 0; color: var(--cyan); }
.cta-contacts span { display: flex; flex-direction: column; line-height: 1.3; }
.cta-contacts b { font-size: 14.5px; font-weight: 600; }
.cta-contacts em { font-size: 12px; font-style: normal; color: var(--muted); }

.cta-form { display: flex; flex-direction: column; gap: 16px; }

/* Honeypot: kept in the DOM for bots, invisible and untabbable for people. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; }
.field > span,
.field legend {
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .02);
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.field textarea { resize: vertical; min-height: 88px; }

.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(124, 107, 255, .7);
  background: rgba(124, 107, 255, .05);
  box-shadow: 0 0 0 3px rgba(124, 107, 255, .14);
}

.field input:user-invalid,
.field textarea:user-invalid { border-color: rgba(248, 113, 113, .6); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip { position: relative; cursor: pointer; }
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: block;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color var(--t), background var(--t), color var(--t);
}
.chip:hover span { border-color: rgba(124, 107, 255, .5); }
.chip input:checked + span {
  border-color: transparent;
  background: var(--grad-fill);
  color: #fff;
}
.chip input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

.form-hint { font-size: 12.5px; color: var(--muted-2); line-height: 1.55; }

/* Live field hint: reflects the contact type detected while typing. */
.field-note {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted-2);
  transition: color var(--t);
}
.field-note.is-detected { color: var(--cyan); }

.consent {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
/* Keep the text next to the box and let it wrap inside its own column. */
.consent span { flex: 1 1 0; min-width: 0; }
/* Consent validation note drops to its own line, aligned with the text. */
.consent .field-error { flex: 1 1 100%; padding-left: 26px; }
.consent input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--violet);
  cursor: pointer;
}
.consent a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Submission feedback (site.js) */
.form-status {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
  background: rgba(255, 255, 255, .02);
}
.form-status.is-pending { border-color: var(--line); color: var(--text-2); }
.form-status.is-success {
  border-color: rgba(74, 222, 128, .45);
  background: rgba(74, 222, 128, .08);
  color: #86efac;
}
.form-status.is-error {
  border-color: rgba(248, 113, 113, .5);
  background: rgba(248, 113, 113, .08);
  color: #fca5a5;
}

/* Last-resort mailto path, revealed only when the relay cannot be reached. */
.form-fallback {
  padding: 12px 14px;
  border: 1px solid rgba(124, 107, 255, .45);
  border-radius: var(--r-sm);
  background: rgba(124, 107, 255, .08);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.form-fallback a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Busy submit: label swap + spinner, so a slow POST never feels dead. */
.btn-spinner { display: none; width: 16px; height: 16px; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn-spinner {
  display: block;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn:disabled { opacity: .85; }

/* Inline validation notes (site.js) */
.field-error {
  font-size: 12.5px;
  line-height: 1.45;
  color: #f87171;
}
.field-error:empty { display: none; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: rgba(248, 113, 113, .6);
}
.consent input[aria-invalid="true"] { outline: 2px solid rgba(248, 113, 113, .7); outline-offset: 2px; }

/* ============================================ 10b. DOCS PAGES === */
.doc { padding-top: calc(var(--header-h) + clamp(48px, 6vw, 80px)); }
.doc-body { margin-top: 32px; }
.doc-body h2 {
  margin: 32px 0 10px;
  font-size: 19px;
  letter-spacing: -.02em;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { color: var(--text-2); font-size: 15.5px; }
.doc-body p + p { margin-top: 12px; }
.doc-body ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.doc-body li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--text-2);
}
.doc-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
}
.doc-body a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.doc-body a:hover { color: var(--text); }
.doc-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--muted) !important;
}
.doc-center { text-align: center; }
.doc-center .section-sub { margin-inline: auto; }
.doc-center .doc-body { text-align: left; }
.doc-badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border: 1px solid rgba(74, 222, 128, .4);
  border-radius: 50%;
  background: rgba(74, 222, 128, .1);
  color: #4ade80;
}
.doc-actions { justify-content: center; margin-top: 32px; }
.doc-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
  margin: 40px auto 0;
  text-align: left;
}
.doc-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: var(--text-2);
}
.doc-steps span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(124, 107, 255, .5);
  border-radius: 50%;
  background: var(--grad-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

@keyframes spin { to { transform: rotate(1turn); } }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-elev);
  padding: clamp(44px, 5vw, 68px) 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: 40px;
}

.footer-brand p {
  margin-top: 16px;
  max-width: 38ch;
  font-size: 14.5px;
  color: var(--muted);
}

.footer-nav { display: flex; flex-direction: column; gap: 11px; }
.footer-nav h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 4px;
}
.footer-nav a {
  font-size: 15px;
  color: var(--text-2);
  transition: color var(--t);
  overflow-wrap: anywhere;
}
.footer-nav a:hover { color: var(--cyan); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--muted-2);
}
.footer-legal a { color: var(--muted); transition: color var(--t); }
.footer-legal a:hover { color: var(--cyan); }

/* ---- Back to top ---- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15, 17, 27, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--t), transform var(--t), border-color var(--t), background var(--t);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
/* The button is toggled through [hidden] as well -- keep it truly out of
   the way while faded, so it never swallows clicks in the corner. */
.to-top[hidden] { display: none; }
.to-top:hover { border-color: rgba(124, 107, 255, .6); background: rgba(124, 107, 255, .12); }

/* ============================================ 10. MOTION + RESPONSIVE === */

/* Reveal: visible by default, hidden only when JS is confirmed. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* will-change only while animating; a permanent layer clips gradients
   mid-scroll on some GPUs. */
.js .reveal:not(.is-in) { will-change: opacity, transform; }
.js .reveal.is-in { will-change: auto; }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(74, 222, 128, .18); }
  50% { opacity: .65; box-shadow: 0 0 0 6px rgba(74, 222, 128, .05); }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: .35; }
}

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

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .to-top { transition: none; }
}

/* ---- Breakpoints ---- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .why-wrap { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  /* Icon-only trigger so contacts stay reachable next to the burger. */
  .header-actions { margin-left: auto; }
  .contact-toggle { padding: 10px; gap: 0; }
  .contact-toggle > span { display: none; }
  .contact-caret { display: none; }
  /* Anchor to the viewport: the icon sits far right, so a right-aligned
     panel would overflow the opposite edge. */
  .contact-panel {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 16px;
    right: 16px;
    width: auto;
  }

  .burger {
    display: grid;
    order: 3;
  }

  /* Mobile drawer: full-width panel under the bar. */
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 16px 24px 26px;
    background: rgba(8, 9, 15, .97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t), transform var(--t), visibility var(--t);
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav a {
    padding: 14px 12px;
    font-size: 17px;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
  }
  .nav a.is-active::after { display: none; }

  /* Primary action lives at the end of the drawer. */
  .nav .nav-cta { display: none; }

  .nav.is-open .nav-cta {
    display: block;
    margin-top: 16px;
    padding: 14px 12px;
    border: 0;
    border-radius: var(--r-sm);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--grad-fill);
  }

  .site-header.is-stuck { background: rgba(8, 9, 15, .9); }
  .site-header:has(.nav.is-open) { background: rgba(8, 9, 15, .98); }
}

@media (max-width: 620px) {
  .container { width: min(var(--container), 100% - 32px); }

  .brand-text { font-size: 17px; }
  .brand-mark { width: 32px; height: 32px; }

  .header-actions { margin-left: auto; }

  .hero-actions .btn { flex: 1 1 100%; }

  .hero-proof { gap: 12px 24px; }
  .hero-proof li { flex: 1 1 40%; }

  .form-row { grid-template-columns: 1fr; }

  .cta { padding: 28px 22px; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .compare-table { font-size: 13px; }
  .compare-table th, .compare-table td { padding: 9px 6px; }

  .to-top { right: 16px; bottom: 16px; }
}

.hero-title {
  font-size: clamp(38px, 6.2vw, 74px);
  letter-spacing: -.045em;
  line-height: 1.04;
}

.hero-lead {
  max-width: 54ch;
  color: var(--text-2);
  font-size: clamp(16px, 1.75vw, 19px);
}

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

/* Docs headers carry only a logo and one button -- tighten them so the pair
   still fits a 320px viewport. */
@media (max-width: 460px) {
  .site-header.is-compact .header-inner { gap: 12px; }
  .site-header.is-compact .brand { gap: 8px; }
  .site-header.is-compact .brand-mark { width: 28px; height: 28px; }
  .site-header.is-compact .brand-text { font-size: 15px; }
  .site-header.is-compact .btn-sm { padding: 8px 13px; font-size: 13px; }
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  border-top: 1px solid var(--line-soft);
}

.hero-proof li { display: flex; flex-direction: column; gap: 2px; padding-top: 18px; }
.hero-proof strong { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.hero-proof span { font-size: 13.5px; color: var(--muted); }

/* ========================================================= 11. NEW BLOCKS === */

/* ---- Что проверяем: сумма штрафа ---- */
.problem-fine {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
.problem-fine b {
  color: var(--magenta);
  font-weight: 700;
  letter-spacing: -.01em;
}

.checks-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
  text-align: center;
}
.checks-cta-note {
  font-size: 13.5px;
  color: var(--muted);
}

/* ---- Услуги: бейдж пакета ---- */
.service-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, .03);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.service-badge-hit {
  border-color: transparent;
  background: var(--grad-soft);
  color: var(--cyan);
}

/* Выделение главного пакета (152-ФЗ). */
.service-card.is-featured {
  border-color: rgba(124, 107, 255, .5);
  box-shadow: 0 30px 70px -34px rgba(124, 107, 255, .55);
}
.service-card.is-featured::before {
  background: linear-gradient(90deg, transparent, rgba(124, 107, 255, .6), transparent);
}

/* ---- Кейсы ---- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.case-card {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
}
.case-tag {
  align-self: flex-start;
  display: inline-flex;
  margin-bottom: 14px;
  padding: 4px 11px;
  border-radius: 100px;
  background: var(--grad-soft);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--cyan);
}
.case-card h3 { font-size: 19px; margin-bottom: 16px; }
.case-card p { font-size: 14.5px; color: var(--muted); margin-bottom: 12px; }
.case-card p strong { color: var(--text-2); font-weight: 600; }
.case-result {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--text-2) !important;
}

/* ---- Футер: CTA-блок ---- */
.footer-roadmap h3 { font-size: 16px; margin-bottom: 12px; }
.footer-roadmap p { font-size: 14.5px; color: var(--muted); margin-bottom: 18px; }
.footer-roadmap .btn { margin-top: 2px; }

/* ---- Мобильная фиксированная CTA (бриф §3) ---- */
.mobile-cta {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 24px;
  border-radius: 100px;
  background: var(--grad-fill);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: 0 16px 40px -14px rgba(124, 107, 255, .85);
  cursor: pointer;
}
.mobile-cta:active { transform: translateY(1px); }

@media (max-width: 620px) {
  .mobile-cta { display: flex; }
  /* Держим «наверх» выше фиксированной CTA и не даём ей перекрывать контент. */
  .to-top { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  body { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-cta { transition: none; }
}


/* ========================= 12. COMPARE + GUARANTEES === */

/* ---- Три способа (сравнение вариантов) ---- */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.compare-option {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--panel) 0%, #0c0e17 100%);
}

.compare-option-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.compare-emoji {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .02);
  font-size: 24px;
}
.compare-option h3 { font-size: 20px; margin-bottom: 3px; }
.compare-tag {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.compare-points {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compare-points li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: var(--text-2);
}
.compare-points li::before {
  content: "";
  position: absolute;
  left: 0;
  /* top в px, а не в em: em считался бы от font-size самого ::before
     (у ×, ! и ✓ он разный), и кружки карточек съезжали бы по высоте. */
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  display: grid;
  place-items: center;
  /* Без line-height: 1 наследованная высота строки (1.65) делает строку
     глифа выше кружка, и символ плавает внутри цветного пятна. */
  line-height: 1;
}

/* Слабый вариант (фрилансер) — приглушён, «крестики». */
.is-weak { opacity: .92; }
.is-weak .compare-points li::before {
  content: "×";
  display: grid;
  place-items: center;
  color: #ff7a7a;
  font-weight: 700;
  font-size: 15px;
  background: rgba(255, 122, 122, .1);
}

/* Агентство — нейтральный, «минусы». */
.is-mid .compare-points li::before {
  content: "!";
  display: grid;
  place-items: center;
  color: #ffb86b;
  font-weight: 700;
  font-size: 14px;
  background: rgba(255, 184, 107, .12);
}

/* Лучший вариант (я) — выделен, «галочки», градиентная рамка. */
.is-best {
  border-color: rgba(124, 107, 255, .55);
  box-shadow: 0 30px 70px -34px rgba(124, 107, 255, .6);
  background: linear-gradient(180deg, rgba(124, 107, 255, .08) 0%, var(--panel) 42%);
}
.is-best .compare-points li::before {
  content: "✓";
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  background: var(--violet);
}
.is-best .compare-points li { color: var(--text); }

.compare-badge {
  position: absolute;
  top: -13px;
  right: 22px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--grad-fill);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px -10px rgba(124, 107, 255, .9);
}
.compare-cta { margin-top: 24px; align-self: flex-start; }

/* ---- Гарантии ---- */
.guarantees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}
.guarantee {
  padding: 28px 26px;
  transition: border-color var(--t), transform var(--t);
}
.guarantee:hover { border-color: rgba(124, 107, 255, .45); transform: translateY(-4px); }

.guarantee-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--grad-soft);
  color: var(--cyan);
}
.guarantee h3 { font-size: 19px; margin-bottom: 10px; }
.guarantee p { color: var(--muted); font-size: 15px; }

/* ========================= 13. ПРОВЕРКА САЙТА (лид-магнит) === */
.check-tool {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 44px) clamp(22px, 4vw, 48px);
  text-align: center;
}
/* Ambient glow, same language as the CTA block. */
.check-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  width: 460px;
  height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(124, 107, 255, .22), transparent);
  pointer-events: none;
}

.check-tool-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 26px;
  text-align: left;
}
.check-shield {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--grad-soft);
  color: var(--cyan);
}
.check-tool-head h3 { font-size: 21px; margin-bottom: 4px; }
.check-tool-head p { color: var(--muted); font-size: 14.5px; }

.check-lead-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 560px;
  margin-inline: auto;
}
.check-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font-size: 16px;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.check-input::placeholder { color: var(--muted-2); }
.check-input:focus {
  outline: none;
  border-color: rgba(124, 107, 255, .6);
  background: rgba(124, 107, 255, .06);
  box-shadow: 0 0 0 4px rgba(124, 107, 255, .12);
}
.check-btn { flex-shrink: 0; }
.check-btn[disabled] { opacity: .7; cursor: progress; }
.check-btn .btn-spinner { display: none; }
.check-btn[disabled] .btn-label { opacity: .6; }
.check-btn[disabled] .btn-spinner { display: inline-block; }

.check-lead-note { margin-top: 16px; font-size: 13.5px; color: var(--muted-2); }
.check-lead-note.is-pending { color: var(--cyan); }
.check-lead-note.is-error { color: #ff9a8a; }

/* ---- Результат авто-проверки ---- */
.check-result {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
  text-align: left;
}
.check-result-head { font-size: 15px; color: var(--text-2); margin-bottom: 18px; }
.check-result-head b { color: var(--text); overflow-wrap: anywhere; }

.check-checks { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.check-checks li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-2); }
.check-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}
.check-checks li.ok .check-mark { background: rgba(74, 222, 128, .15); color: #4ade80; }
.check-checks li.bad .check-mark { background: rgba(255, 122, 122, .15); color: #ff7a7a; }
.check-checks li.warn .check-mark { background: rgba(255, 184, 107, .15); color: #ffb86b; }

.check-trackers { margin-bottom: 18px; font-size: 14px; color: var(--text-2); }

.check-risk-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.check-findings { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.check-findings li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .02);
  font-size: 14.5px;
  color: var(--text-2);
}
.check-findings li b { color: #ff7a7a; font-weight: 700; white-space: nowrap; }
.check-clean { font-size: 15px; color: var(--text-2); margin-bottom: 18px; }
/* Блок мелких примечаний (крупный оператор, дисклеймер) — тот же визуальный
   язык, что у карточек находок, только приглушённый. Кнопка стоит после. */
.check-notes {
  margin: 22px 0;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .02);
}
.check-note { font-size: 13px; line-height: 1.55; color: var(--muted-2); }
.check-note + .check-note { margin-top: 10px; }
.check-result .btn { margin-top: 2px; }

/* ---- Вторичный ряд: чек-лист + сканер ---- */
.check-alt {
  margin-top: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent);
  overflow: hidden;
}
.check-alt-item { transition: background var(--t); }
.check-alt-item[open] { background: rgba(124, 107, 255, .05); }
.check-alt-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  list-style: none;
  transition: color var(--t);
}
.check-alt-item summary::-webkit-details-marker { display: none; }
.check-alt-item summary:hover { color: var(--violet); }
.check-alt-item[open] .faq-marker { background: var(--violet); border-color: var(--violet); color: #fff; }
.check-alt-item[open] .faq-marker::after { transform: translate(-50%, -50%) rotate(0deg); }
.check-alt-body { padding: 0 22px 20px; }
.check-alt-steps { display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.check-alt-steps li {
  position: relative;
  padding-left: 34px;
  font-size: 14.5px;
  color: var(--muted);
  counter-increment: step;
}
.check-alt-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad-soft);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}
.check-alt-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  transition: color var(--t), background var(--t);
}
.check-alt-link svg { color: var(--violet); }
.check-alt-link:hover { color: var(--cyan); background: rgba(124, 107, 255, .05); }



/* ---------------------------------------------- Cookie / storage notice */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.cookie-banner[hidden] { display: none; }
.cookie-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 980px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(11, 13, 21, .97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.cookie-inner p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}
.cookie-inner a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.doc-placeholder {
  color: var(--muted-2);
  border-bottom: 1px dashed var(--line);
}
@media (max-width: 720px) {
  .cookie-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-actions .btn { flex: 1 1 0; }
}

/* ---------------------------------------------- Document tables */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  font-size: 14px;
}
.doc-table th,
.doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.doc-table th {
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, .03);
}
.doc-table td { color: var(--text-2); }
.doc-table tr:last-child td { border-bottom: 0; }
@media (max-width: 720px) {
  .doc-table { display: block; overflow-x: auto; font-size: 13px; }
  .doc-table th, .doc-table td { padding: 8px 10px; }
}

.doc-muted {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
