/* ==========================================================================
   DESIGN TOKENS — все цвета, шрифты и отступы сайта.
   Чтобы сменить дизайн, правим только этот блок.
   ========================================================================== */
:root {
  /* Цвета — единый синий акцент */
  --c-bg: #FFFFFF;
  --c-text: #0A0A0A;
  --c-muted: #5B6474;
  --c-surface: #F5F5F5;
  --c-line: #E8E8E8;
  --c-accent: #3047FF;
  --c-accent-dark: #2238D6;
  --c-accent-light: #F5F5F5;
  --c-accent-text: #FFFFFF;
  --c-dark-bg: #0B1220;
  --c-dark-text: #FFFFFF;
  --c-dark-muted: #8B95A8;
  --c-glass: rgba(255, 255, 255, 0.82);
  --c-sky: #F5F5F5;
  --c-sun: #F5F5F5;

  /* Шрифты */
  --f-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  /* Размеры текста */
  --t-hero: clamp(44px, 6.2vw, 88px);
  --t-h2: clamp(36px, 4.4vw, 64px);
  --t-service: clamp(32px, 3.6vw, 56px);
  --t-stat: clamp(56px, 6.2vw, 90px);
  --t-body: 16px;
  --t-small: 14px;
  --t-mono: 12px;

  /* Скругления */
  --r-card: 20px;
  --r-img: 16px;
  --r-pill: 999px;

  /* Отступы и сетка */
  --gutter: 24px;
  --container: 1320px;
  --section-gap: 80px;
  --btn-h: 48px;
  --focus: 0 0 0 3px var(--c-accent);

  /* Анимации */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fade: 0.6s;
}

@media (min-width: 900px) {
  :root { --section-gap: 140px; }
}

/* Тёмная тема */
:root[data-theme="dark"] {
  --c-bg: #0B1220;
  --c-text: #FFFFFF;
  --c-muted: #8B95A8;
  --c-surface: #131C2E;
  --c-line: #1E2A3E;
  --c-accent: #5A7AFF;
  --c-accent-dark: #7B99FF;
  --c-accent-light: #131C2E;
  --c-glass: rgba(11, 18, 32, 0.82);
  --c-sky: #131C2E;
  --c-sun: #131C2E;
}

/* ==========================================================================
   БАЗА
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-pill); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section-gap) 0; position: relative; }
.muted { color: var(--c-muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--c-text); color: var(--c-bg); padding: 10px 16px; border-radius: var(--r-pill);
}
.skip-link:focus { top: 12px; }

/* Заголовки */
h1, h2, h3 {
  font-family: var(--f-sans);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}
h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-h2); }
h3 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.15; }

/* Моно-подпись раздела: «01 / xidmətlər» */
.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
}
.eyebrow .num { color: var(--c-text); }
.pill-cat {
  background: var(--c-accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-weight: 500;
}

.lead { font-size: 18px; color: var(--c-muted); max-width: 52ch; margin: 0; }
.mono { font-family: var(--f-mono); font-size: var(--t-mono); text-transform: uppercase; letter-spacing: 0.06em; }

/* Ссылка-стрелка «Ətraflı →» */
.text-link {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.text-link:hover { border-bottom-color: currentColor; }

/* ==========================================================================
   КНОПКИ — минимум 48px по высоте (44px по требованиям — с запасом)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: 0 0 22px;
}

/* Главная: чёрная таблетка с белым текстом и кругом-иконкой слева */
.btn-primary { background: var(--c-text); color: var(--c-bg); }
.btn-primary .btn-dot { background: var(--c-accent); color: var(--c-accent-text); }

/* Вторичная: белая (в тёмной теме — тёмная) таблетка с обводкой */
.btn-secondary {
  background: var(--c-bg);
  color: var(--c-text);
  border-color: var(--c-line);
}
.btn-secondary:hover { border-color: var(--c-text); }

/* Акцентная: жёлтая (форма заявки) */
.btn-accent { background: var(--c-accent); color: var(--c-accent-text); }

.btn-block { width: 100%; justify-content: center; }

/* Фокус для кнопок тоже виден */
.btn:focus-visible { box-shadow: var(--focus); }

/* ==========================================================================
   ШАПКА: плавающая «таблетка»
   ========================================================================== */
.header {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 24px 0 0;
}
.header-pill {
  margin: 0 auto;
  max-width: 1320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  background: transparent;
  border: none;
  border-radius: 0;
}
.logo {
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.home-logo { display: flex; align-items: baseline; gap: 12px; }
.logo-serif { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; }
.logo-b { font-weight: 600; }
.logo-loc { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.logo-dot { color: var(--c-accent); }
.nav { display: none; gap: 4px; align-items: center; }
.nav a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 0;
  color: var(--c-muted);
  transition: color .2s;
}
.nav a::before { content: "["; }
.nav a::after { content: "]"; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--c-text); background: none; }

.header-tools { display: flex; align-items: center; gap: 6px; }
.lang { display: none; gap: 2px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.lang a {
  text-decoration: none; padding: 6px 6px; border-radius: 0; color: var(--c-muted);
}
.lang a::before { content: "["; }
.lang a::after { content: "]"; }
.lang a[aria-current="true"] { color: var(--c-text); background: none; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--c-line);
  background: transparent;
  display: grid; place-items: center;
  color: var(--c-text);
  flex: 0 0 40px;
}
.icon-btn svg { width: 18px; height: 18px; }
.btn-konsult {
  background: var(--c-text); color: var(--c-bg);
  min-height: 40px; padding: 0 16px; font-size: 13px;
}
.btn-konsult .btn-dot { width: 18px; height: 18px; flex-basis: 18px; background: var(--c-accent); color: var(--c-accent-text); }
.burger { display: grid; }

/* Полноэкранное мобильное меню */
.mobile-menu {
  position: fixed; inset: 0; z-index: 49;
  background: var(--c-bg);
  padding: 110px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateY(-100%);
  transition: transform .45s var(--ease);
  visibility: hidden;
}
.mobile-menu.open { transform: none; visibility: visible; }
.mobile-menu a {
  font-size: 32px; font-weight: 500; letter-spacing: -0.03em; text-decoration: none;
  padding: 10px 0; border-bottom: 1px solid var(--c-line);
}
.mobile-menu .lang { display: flex; margin-top: 24px; font-size: 14px; }
.mobile-menu .lang a { padding: 8px 12px; border: 1px solid var(--c-line); }
.mobile-menu .lang a::before, .mobile-menu .lang a::after { content: none; }
.mobile-menu a::before, .mobile-menu a::after { content: none; }

@media (min-width: 900px) {
  .nav { display: flex; }
  .lang { display: flex; }
  .burger { display: none; }
  .mobile-menu { display: none; }
}
@media (max-width: 899px) {
  .btn-konsult .label-long { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding: 150px 0 80px;
  background:
    radial-gradient(60% 60% at 0% 0%, var(--c-sky) 0%, transparent 70%),
    radial-gradient(50% 60% at 100% 40%, var(--c-sun) 0%, transparent 70%),
    var(--c-bg);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.hero-title {
  color: color-mix(in srgb, var(--c-text) 15%, transparent);
  font-size: var(--t-hero);
  margin: 0;
}
.hero-title .w { transition: color .35s var(--ease); }
.hero-title .w.on { color: var(--c-text); }
.hero-role { margin: 22px 0 0; font-size: 18px; font-weight: 500; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hero-photo {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-img);
  background: var(--c-surface);
  border: 1px dashed var(--c-line);
  display: grid;
  place-items: center;
  color: var(--c-muted);
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
}
.hero-side h2 { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 14px; }
.hero-side .utp { font-size: 20px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; margin: 0 0 14px; color: var(--c-text); }
.hero-side p { margin: 0 0 8px; color: var(--c-muted); }
.hero-scroll {
  margin-top: 56px;
  display: flex; justify-content: center;
}
.scroll-hint { font-family: var(--f-mono); font-size: 12px; color: var(--c-muted); text-transform: lowercase; letter-spacing: 0.06em; animation: bob 2.4s var(--ease) infinite; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@media (min-width: 900px) {
  .hero { padding: 180px 0 120px; }
  .hero-grid { grid-template-columns: 1fr 0.9fr 1fr; gap: 48px; }
  /* Десктоп: слева заголовок, по центру фото, справа приветствие */
  .hero-title-col { order: 1; align-self: center; }
  .hero-media { order: 2; }
  .hero-side { order: 3; text-align: left; }
  .hero-side-r { max-width: 360px; justify-self: end; }
}
@media (max-width: 899px) {
  /* Телефон: фото → заголовок и кнопки → приветствие */
  .hero-media { order: -1; }
  .hero-title-col { order: 0; text-align: left; }
  .hero-side { order: 1; }
  .hero-btns .btn { flex: 1 1 100%; justify-content: center; }
  .hero-photo { max-width: 100%; aspect-ratio: 1 / 1.05; }
}

/* ==========================================================================
   ЦИФРЫ
   ========================================================================== */
.stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 24px; }
.stat { padding-left: 18px; border-left: 1px solid var(--c-text); }
.stat .mono { margin: 0 0 10px; color: var(--c-muted); display: block; }
.stat .num {
  font-size: clamp(44px, 6.2vw, 90px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat .num .hl { background: var(--c-accent); padding: 0 .06em; border-radius: 8px; }
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* ==========================================================================
   УСЛУГИ — аккордеон-слова
   ========================================================================== */
.svc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.svc-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-card);
  background: var(--c-surface);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.svc-media > div {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 24px; text-align: center; color: var(--c-muted);
  font-family: var(--f-mono); font-size: var(--t-mono); text-transform: uppercase;
  opacity: 0; transition: opacity .5s var(--ease);
}
.svc-media > div.on { opacity: 1; }
.svc-list { border-top: 1px solid var(--c-line); }
.svc-item { border-bottom: 1px solid var(--c-line); }
.svc-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; padding: 22px 0; text-align: left;
  font-size: var(--t-service); font-weight: 500; letter-spacing: -0.03em; line-height: 1;
  border-radius: 0;
}
.svc-trigger:focus-visible { box-shadow: none; outline: 2px solid var(--c-accent); outline-offset: 4px; }
.svc-trigger .word { transition: color .25s; }
.svc-trigger:hover .word { color: var(--c-muted); }
.plus {
  flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--c-accent); color: var(--c-accent-text);
  display: grid; place-items: center;
  transition: transform .4s var(--ease);
}
.plus svg { width: 18px; height: 18px; }
.svc-item[aria-expanded="true"] .plus, .svc-item.open .plus { transform: rotate(45deg); }
.svc-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease);
}
.svc-item.open .svc-panel { grid-template-rows: 1fr; }
.svc-panel-inner { overflow: hidden; }
.svc-panel p { margin: 0 0 14px; padding-bottom: 6px; color: var(--c-muted); max-width: 60ch; }
.svc-panel .text-link { display: inline-block; padding-bottom: 24px; }

@media (min-width: 900px) {
  .svc-layout { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .svc-media { position: sticky; top: 120px; }
}
@media (max-width: 899px) {
  .svc-media { aspect-ratio: 16 / 10; }
  .svc-trigger { padding: 18px 0; }
}

/* ==========================================================================
   БЕГУЩАЯ СТРОКА ИНСТРУМЕНТОВ
   ========================================================================== */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--c-line);
  padding: 22px 0;
}
.marquee-track {
  display: flex; gap: 64px; width: max-content;
  animation: scroll 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-size: 22px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap;
  color: #B8B8B8; transition: color .3s;
  text-decoration: none;
}
.marquee-item:hover { color: var(--c-text); }
[data-theme="dark"] .marquee-item { color: #555; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================================================
   КАРТОЧКИ (сегменты, преимущества, кейсы, блог)
   ========================================================================== */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card {
  background: var(--c-surface);
  border-radius: var(--r-card);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  height: 100%;
}
.card h3 { font-size: 22px; }
.card p { margin: 0; color: var(--c-muted); }
.card .mono { color: var(--c-muted); margin: 0; }
.card .icon {
  width: 20px; height: 20px; color: var(--c-text);
}
.card .icon svg { width: 20px; height: 20px; }
.card-link { text-decoration: none; }
.card-link:hover .card { background: var(--c-line); }

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
}
/* Телефон: горизонтальный свайп для 4 преимуществ */
@media (max-width: 899px) {
  .swipe {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px;
    scrollbar-width: none;
  }
  .swipe::-webkit-scrollbar { display: none; }
  .swipe > * { flex: 0 0 78%; scroll-snap-align: start; }
}

/* ==========================================================================
   ТАЙМЛАЙН (CV и «Haqqımda»)
   ========================================================================== */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--c-line);
}
.timeline li { position: relative; padding: 0 0 36px 32px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--c-bg); border: 2px solid var(--c-text);
}
.timeline li:first-child::before { background: var(--c-accent); border-color: var(--c-accent); }
.timeline .year { font-family: var(--f-mono); font-size: var(--t-mono); color: var(--c-muted); display: block; margin-bottom: 6px; }
.timeline h3 { margin-bottom: 4px; }
.timeline .co { color: var(--c-muted); margin: 0 0 8px; }
.timeline ul { margin: 0; padding-left: 18px; color: var(--c-muted); }

.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tool {
  border: 1px solid var(--c-line); border-radius: var(--r-card);
  height: 72px; display: grid; place-items: center;
  font-size: 14px; font-weight: 500; color: var(--c-muted);
  transition: color .3s, border-color .3s;
}
.tool:hover { color: var(--c-text); border-color: var(--c-text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--c-surface); font-size: 14px;
}
@media (min-width: 900px) {
  .tools-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ==========================================================================
   КЕЙСЫ
   ========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px; }
.pill {
  min-height: 38px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--c-line); background: var(--c-bg); font-size: 14px;
}
.pill[aria-pressed="true"] { background: var(--c-text); color: var(--c-bg); border-color: var(--c-text); }
.counter { margin-left: auto; color: var(--c-muted); }

.case {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  min-height: 420px;
  background: linear-gradient(135deg, var(--c-surface), var(--c-line));
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none;
}
.case-window {
  position: absolute; left: 24px; right: 24px; top: 24px;
  height: 52%;
  background: var(--c-bg);
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--c-line);
  display: grid; place-items: center;
  color: var(--c-muted); font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; text-align: center; padding: 16px;
}
.case-body {
  background: var(--c-bg);
  margin: 0 12px 12px;
  border-radius: 14px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.case-tags { font-family: var(--f-mono); font-size: 12px; color: var(--c-muted); display: flex; flex-wrap: wrap; gap: 8px; }
.case-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--c-muted); }
.case h3 { font-size: 26px; }
.case p { margin: 0; color: var(--c-muted); }
@media (min-width: 900px) {
  .grid-cases { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   ЦИТАТА (отзыв)
   ========================================================================== */
.quote {
  font-size: clamp(32px, 3.6vw, 40px);
  font-weight: 500; letter-spacing: -0.03em; line-height: 1.1;
  margin: 0 0 32px; max-width: 26ch;
}
.quote-author { display: flex; align-items: center; gap: 14px; }
.quote-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--c-surface); border: 1px dashed var(--c-line); }
.quote-author .mono { color: var(--c-muted); margin: 0 0 4px; display: block; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { border-top: 1px solid var(--c-line); }
.faq details { border-bottom: 1px solid var(--c-line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; font-size: 20px; font-weight: 500; letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { width: 32px; height: 32px; border-radius: 10px; }
.faq summary .plus svg { width: 14px; height: 14px; }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq .answer { padding: 0 0 24px; color: var(--c-muted); max-width: 70ch; }

/* ==========================================================================
   БЛОГ-КАРТОЧКИ
   ========================================================================== */
.post { display: flex; flex-direction: column; gap: 12px; text-decoration: none; height: 100%; }
.post-img {
  aspect-ratio: 16 / 10; border-radius: var(--r-img);
  background: var(--c-accent-light);
  position: relative; overflow: hidden;
}
.post-img::after {
  content: ""; position: absolute; right: -20%; bottom: -30%; width: 70%; height: 70%;
  border-radius: 50%; opacity: .15; background: var(--c-accent);
}
.post-img::before {
  content: ""; position: absolute; left: -10%; top: -20%; width: 50%; height: 50%;
  border-radius: 50%; opacity: .08; background: var(--c-accent);
}
.post h3 { font-size: 22px; }
.post .mono { color: var(--c-muted); }

/* ==========================================================================
   ФОРМА
   ========================================================================== */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-size: 13px; color: var(--c-muted); font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .04em; }
.input {
  width: 100%; min-height: var(--btn-h); padding: 12px 18px;
  border-radius: var(--r-img); border: 1px solid var(--c-line);
  background: var(--c-bg); color: var(--c-text); font: inherit; font-size: 16px;
}
.input:focus { outline: none; border-color: var(--c-text); box-shadow: var(--focus); }
textarea.input { min-height: 110px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.checks label {
  font-family: var(--f-sans); font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--c-text);
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--c-line); border-radius: var(--r-pill); cursor: pointer;
  min-height: 44px;
}
.checks input { accent-color: var(--c-text); }
.form-note { font-size: 13px; color: var(--c-muted); margin: 0; }
@media (min-width: 720px) {
  .form-2 { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   ТЁМНАЯ СЕКЦИЯ (контакты и футер)
   ========================================================================== */
.dark {
  background: var(--c-dark-bg);
  color: var(--c-dark-text);
}
.dark .muted, .dark .mono { color: var(--c-dark-muted); }
.dark .btn-secondary { background: transparent; color: var(--c-dark-text); border-color: #333; }
.dark .input { background: #111; color: #fff; border-color: #2A2A2A; }
.dark .checks label { color: #fff; border-color: #2A2A2A; }
.dark .pill { background: transparent; color: #fff; border-color: #333; }

.cta-title {
  font-size: clamp(44px, 9vw, 120px);
  font-weight: 500; letter-spacing: -0.04em; line-height: 0.95; margin: 0 0 40px;
  color: var(--c-dark-text);
}
.cta-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 64px; }
.cta-btns .btn { flex: 1 1 auto; justify-content: center; }
.footer { padding-top: 40px; border-top: 1px solid #222; }
.footer-grid { display: grid; gap: 32px; }
.footer h4 { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--c-dark-muted); margin: 0 0 14px; font-weight: 400; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; color: var(--c-dark-text); }
.footer a:hover { text-decoration: underline; }
.copy-row { margin-top: 40px; padding: 24px 0 32px; border-top: 1px solid #222; font-family: var(--f-mono); font-size: 12px; color: var(--c-dark-muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ==========================================================================
   ПЛАВАЮЩАЯ КНОПКА WHATSAPP
   ========================================================================== */
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-bg); color: var(--c-text);
  border: 1px solid var(--c-line);
  box-shadow: 0 0 0 4px var(--c-surface);
  display: grid; place-items: center;
}
.fab svg { width: 24px; height: 24px; }

/* ==========================================================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--t-fade) var(--ease), transform var(--t-fade) var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   СНИЖЕННАЯ АНИМАЦИЯ (prefers-reduced-motion)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .w { color: var(--c-text); }
}

/* ==========================================================================
   КОНТЕНТНЫЕ СТРАНИЦЫ: статьи, услуги, чек-лист
   ========================================================================== */
.article-hero-bg {
  background: #F5F5F5;
  padding: 48px 0;
  border-radius: 0 0 24px 24px;
  margin-bottom: -24px;
}
.article-hero-bg .crumbs { margin-bottom: 16px; }
.article-hero-bg .page-title { margin-bottom: 16px; }
.article-hero-bg .meta { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.article-hero-bg .meta svg { vertical-align: -2px; color: var(--c-accent); }
.article { padding: 48px 0 40px; }
.article-narrow { max-width: 780px; }
.page-title {
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 600; letter-spacing: -0.04em; line-height: 0.95; margin: 0 0 22px;
  font-family: var(--f-sans);
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; font-family: var(--f-mono); font-size: 12px; color: var(--c-muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; }
.crumbs a { text-decoration: none; color: var(--c-muted); }
.crumbs a:hover { color: var(--c-text); }
.meta { margin: 18px 0 0; color: var(--c-muted); }
.short-answer {
  margin: 24px 0 0; padding: 22px 24px;
  background: #fff; border-radius: var(--r-card);
  border: 1px solid var(--c-line);
  color: var(--c-text); font-size: 17px;
  display: flex; gap: 16px; align-items: flex-start;
}
:root[data-theme="dark"] .short-answer { background: var(--c-surface); }
.short-answer p { margin: 0; }
.short-answer-icon {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px;
  background: var(--c-accent-light); color: var(--c-accent);
  display: grid; place-items: center;
}
.short-answer-label {
  display: block; margin-bottom: 6px;
  color: var(--c-accent); font-weight: 500;
}
.author { display: flex; align-items: center; gap: 14px; margin: 24px 0 0; }
.author-photo {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--c-accent);
  color: #fff; font-weight: 600; font-size: 16px;
  display: grid; place-items: center;
}
.author strong, .author span { display: block; }
.author span { font-size: 13px; }

.prose { margin-top: 40px; font-size: 17px; line-height: 1.7; color: var(--c-text); }
.prose p { margin: 0 0 18px; color: var(--c-text); }
.prose h2 {
  font-size: clamp(28px, 3.2vw, 38px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1;
  margin: 56px 0 18px; scroll-margin-top: 110px;
}
.prose h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; margin: 32px 0 12px; line-height: 1.2; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); opacity: .6;
}
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before {
  content: counter(n); position: absolute; left: 0; top: 0.1em; font-family: var(--f-mono); font-size: 12px; color: var(--c-muted);
}
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--c-line); }
.prose a:hover { text-decoration-color: currentColor; }

.toc {
  margin: 28px 0 8px; padding: 22px 24px;
  border: 1px solid var(--c-line); border-radius: var(--r-card);
}
.toc .mono { margin: 0 0 10px; color: var(--c-muted); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { padding: 0; margin: 0 0 6px; }
.toc li::before { content: none; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.callout {
  margin: 24px 0; padding: 18px 22px;
  background: var(--c-accent-light); border-radius: var(--r-img);
  border-left: 4px solid var(--c-accent);
}
.callout p { margin: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 24px; border-radius: var(--r-img); border: 1px solid var(--c-line); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 480px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.table-wrap th { background: var(--c-accent-light); font-weight: 500; }
.table-wrap tr:last-child td { border-bottom: 0; }

.shot-placeholder { margin: 24px 0; }
.shot-placeholder > div {
  aspect-ratio: 16 / 9; border-radius: var(--r-img); background: var(--c-surface); border: 1px dashed var(--c-line);
  display: grid; place-items: center; color: var(--c-muted); font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; text-align: center; padding: 16px;
}

.cta-mid {
  margin: 48px 0; padding: 28px; border-radius: var(--r-card);
  background: var(--c-surface); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.cta-mid-text { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; max-width: 30ch; }

details { border-bottom: 1px solid var(--c-line); }
details summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-size: 19px; font-weight: 500; letter-spacing: -0.02em;
}
details summary::-webkit-details-marker { display: none; }
details summary .plus { width: 32px; height: 32px; border-radius: 10px; flex: 0 0 32px; }
details summary .plus svg { width: 14px; height: 14px; }
details[open] summary .plus { transform: rotate(45deg); }
details .answer { padding: 0 0 20px; color: var(--c-muted); }
details .answer p { margin: 0 0 12px; color: var(--c-muted); }
.prose details { margin-bottom: 0; }

.related { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--c-line); }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.related a { text-decoration: none; font-weight: 500; font-size: 18px; letter-spacing: -0.02em; }
.related a:hover { text-decoration: underline; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 599px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  display: flex; flex-direction: column; gap: 12px; text-decoration: none;
  padding: 20px; border: 1px solid var(--c-line); border-radius: var(--r-card);
  transition: border-color .2s, background .2s;
}
.related-card:hover { border-color: var(--c-accent); background: var(--c-accent-light); }
.related-card-img { height: 6px; border-radius: 3px; background: var(--c-accent); opacity: .4; }
.related-card h3 { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; margin: 0; }

.author-box {
  display: flex; gap: 16px; align-items: flex-start;
  margin: 48px 0 0; padding: 24px; border: 1px solid var(--c-line); border-radius: var(--r-card);
}
.author-box .author-photo { width: 56px; height: 56px; font-size: 18px; flex: 0 0 56px; }

.cta-banner {
  margin: 48px 0 0; padding: 32px; border-radius: var(--r-card);
  background: var(--c-accent); color: #fff; text-align: center;
}
.cta-banner h3 { font-size: 22px; font-weight: 500; color: #fff; margin: 0 0 8px; }
.cta-banner p { margin: 0 0 20px; opacity: .9; }
.cta-banner-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 24px; border-radius: var(--r-pill);
  background: #fff; color: var(--c-accent-dark); font-weight: 500; font-size: 15px; text-decoration: none;
  transition: transform .2s;
}
.cta-banner-btn:hover { transform: translateY(-1px); }

.list-grid { margin-top: 24px; }
.list-grid .post { padding: 0; }
.list-grid + * { margin-top: 0; }

/* ==========================================================================
   БЛОГ-ВОРОНКА: прогресс чтения, оглавление сбоку, «Paylaş», серии, инструменты
   ========================================================================== */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--c-accent); transform-origin: 0 50%; transform: scaleX(0);
}
.article-wrap { display: block; }
.toc-side { display: none; }
@media (min-width: 1100px) {
  .article-wrap { display: grid; grid-template-columns: 220px minmax(0, 780px); column-gap: 56px; justify-content: center; }
  .toc-side {
    display: block; position: sticky; top: 120px; align-self: start; font-size: 14px;
    max-height: calc(100vh - 140px); overflow: auto;
  }
  .toc-side .mono { margin: 0 0 12px; color: var(--c-muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
  .toc-side ol { margin: 0; padding: 0; list-style: none; }
  .toc-side li { margin: 0 0 10px; line-height: 1.4; }
  .toc-side a { color: var(--c-muted); text-decoration: none; }
  .toc-side a:hover { color: var(--c-text); }
  .toc-side a.active { color: var(--c-accent); border-left: 2px solid var(--c-accent); padding-left: 10px; margin-left: -12px; }
  .prose .toc { display: none; }   /* на десктопе оглавление живёт сбоку */
}

/* «Paylaş» */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--c-line); }
.share .mono { margin-right: 4px; line-height: 40px; }
.share a, .share button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border: 1px solid var(--c-line); border-radius: var(--r-pill);
  background: var(--c-bg); color: var(--c-text); font-size: 14px; text-decoration: none; cursor: pointer;
  line-height: 1; margin: 0;
}
.share a svg, .share button svg { color: var(--c-accent); flex: 0 0 16px; }
.share a:hover, .share button:hover { border-color: var(--c-accent); background: var(--c-accent-light); }
@media (max-width: 599px) {
  .share { display: grid; grid-template-columns: 1fr 1fr; }
  .share .mono { grid-column: 1 / -1; }
}

/* Навигация по серии */
.series-nav { margin: 48px 0 0; padding: 22px 24px; border-radius: var(--r-card); background: var(--c-surface); }
.series-nav .mono { margin: 0 0 12px; color: var(--c-muted); }
.series-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.series-links a { font-weight: 500; text-decoration: none; line-height: 1.3; }
.series-links a:last-child { text-align: right; }
.series-links a:hover { text-decoration: underline; }
@media (max-width: 599px) { .series-links { grid-template-columns: 1fr; } .series-links a:last-child { text-align: left; } }

/* Инструменты: калькуляторы и UTM */
.calc { margin: 32px 0; display: grid; grid-template-columns: 1fr; gap: 24px; padding: 32px; border-radius: 24px; background: var(--c-bg); border: 1px solid var(--c-line); }
@media (min-width: 720px) { .calc { grid-template-columns: 1.1fr 0.9fr; } }
.tool-fields { display: grid; gap: 14px; }
.tool-fields label { display: grid; gap: 6px; font-size: 14px; color: var(--c-muted); }
.tool-fields input {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 12px;
  background: var(--c-bg); color: var(--c-text); font: inherit; font-size: 16px;
}
.tool-fields input:focus { outline: none; box-shadow: var(--focus); }
.tool-out {
  display: grid; gap: 8px; align-content: start;
  background: var(--c-accent); color: #fff; border-radius: 16px; padding: 24px;
}
.tool-out .mono { margin: 6px 0 0; color: rgba(255,255,255,.7); font-size: 12px; }
.tool-out .big { margin: 0; font-size: clamp(36px, 5vw, 56px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; color: #fff; }
.tool-out .muted { margin: 4px 0 0; font-size: 14px; color: rgba(255,255,255,.7); }
.tool-out .link-out { margin: 0; word-break: break-all; font-size: 14px; }
.tool-out button { justify-self: start; margin-top: 6px; background: #fff; color: var(--c-accent-dark); border-color: transparent; }
.tool-out .link-out { color: #fff; }
