/* =========================================================
   Agora — дизайн система „Агора — светъл редакционен диалог"
   ========================================================= */

:root {
  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --ink: #141917;
  --accent: #0C5F52;
  --accent-soft: #0C5F521A;
  --muted: #6B736E;
  --line: #DBD5C8;
  --deep: #0E1513;

  --font: 'Manrope', Arial, Helvetica, sans-serif;
  --font-quote: 'Source Serif 4', Georgia, serif;

  --xs: 8px;
  --sm: 16px;
  --md: 32px;
  --lg: 64px;
  --xl: 120px;

  --r-sm: 6px;
  --r-md: 14px;
  --r-pill: 999px;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 68ch;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset (винаги в :where(), за да не надделява компонентите) ---------- */
*, *::before, *::after { box-sizing: border-box; }
:where(body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol) { margin: 0; padding: 0; }
:where(ul, ol) { list-style: none; }
:where(blockquote, figure) { border: 0; }
:where(img, svg) { display: block; max-width: 100%; height: auto; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(17px, 0.55vw + 15px, 19px);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- типография ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font);
  font-weight: 690;
  letter-spacing: -0.022em;
  line-height: 1.06;
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(2.6rem, 6.2vw, 5.4rem); }
h2, .h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.1; }
h3, .h3 { font-size: clamp(1.3rem, 1.6vw, 1.6rem); line-height: 1.18; letter-spacing: -0.012em; }
h4, .h4 { font-size: 1.1rem; line-height: 1.25; }

p { max-width: var(--measure); }
p + p { margin-top: 1em; }

a { color: var(--accent); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 700; }

.lead {
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.5;
  color: #2C3431;
  max-width: 46ch;
}

.muted { color: var(--muted); }

.label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- фокус и достъпност ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- лейаут ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--dark { background: var(--deep); color: #EFEDE6; }
.section--dark .lead { color: #C3CAC6; }
.section--dark .label { color: #8F9994; }
.section--dark a { color: #7FD2C0; }
.rule { height: 1px; background: var(--line); border: 0; }
.section--dark .rule { background: #263230; }

/* ---------- бутони ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px;
  border-radius: var(--r-pill);
  font-weight: 700; font-size: 1rem; letter-spacing: -0.01em;
  text-decoration: none; border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #0A4E44; color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.section--dark .btn--ghost { border-color: #35423F; color: #EFEDE6; }
.section--dark .btn--ghost:hover { border-color: #EFEDE6; }
.btn .arw { transition: transform .18s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

/* ---------- глава ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.site-head.is-stuck { border-bottom-color: var(--line); }
.site-head__inner {
  display: flex; align-items: center; gap: var(--md);
  min-height: 74px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); font-weight: 800;
  letter-spacing: -0.02em; font-size: 1.02rem; line-height: 1.1;
  flex: 0 0 auto;
}
.brand__mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand__name span { display: block; font-weight: 500; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px); }
.nav__list a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.97rem;
  padding: 8px 0; position: relative; white-space: nowrap;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .22s var(--ease);
}
.nav__list a:hover::after, .nav__list .current-menu-item > a::after { transform: scaleX(1); }
.head-cta { flex: 0 0 auto; }
/* Призивът вътре в менюто се показва само в мобилния панел. */
.nav .head-cta { display: none; }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; margin-left: auto;
    background: transparent; border: 1px solid var(--line); border-radius: var(--r-pill);
    padding: 10px 18px; font-weight: 700; cursor: pointer;
  }
  .nav {
    position: fixed; inset: 74px 0 0 0; background: var(--bg);
    margin: 0; padding: var(--md) var(--gutter) var(--xl);
    overflow-y: auto; display: none;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__list a { display: block; padding: 18px 0; font-size: 1.3rem; font-weight: 700; }
  .nav__list a::after { display: none; }
  .head-cta { display: none; }
  .nav .head-cta { display: inline-flex; margin-top: var(--md); }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(32px, 4vw, 56px) clamp(40px, 5vw, 72px); }
@media (min-width: 1025px) { .hero__grid { min-height: 62vh; } }
.hero__grid {
  display: grid; gap: clamp(28px, 4vw, 56px);
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
}
.hero__title {
  max-width: 18ch;
  font-size: clamp(2.05rem, 3.6vw, 3.6rem);
  line-height: 1.08;
  text-wrap: pretty;
}
.hero__title .accent { color: var(--accent); }
.hero__lead { margin-top: clamp(18px, 2vw, 26px); }
.hero__actions { margin-top: clamp(24px, 3vw, 36px); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__note { margin-top: 18px; font-size: 0.92rem; color: var(--muted); max-width: 42ch; }
.hero__stage { position: relative; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__title { max-width: 18ch; }
  .hero__stage { order: 2; }
}

/* ---------- ставни фигури и сцена ---------- */
.stage { width: 100%; height: auto; overflow: visible; }
.stage .floor { fill: #E7E2D6; opacity: .6; }
.stage .ring { fill: none; stroke: var(--ink); stroke-width: 1.3; opacity: .2; }
.stage .ring--accent { stroke: var(--accent); opacity: .42; }
.stage .axis { stroke: var(--accent); stroke-width: 1.4; opacity: .55; stroke-linecap: round; }
.section--dark .stage .floor { fill: #16201E; opacity: 1; }
.section--dark .stage .ring { stroke: #EFEDE6; }
.stage--hero .ring { transition: transform .9s var(--ease); }

.rig { will-change: transform; }
.rig line { stroke-linecap: round; }

/* влизане в кадъра */
.has-js .hero .fig-left, .has-js .hero .fig-right { opacity: 0; }
.hero.is-ready .fig-left, .hero.is-ready .fig-right { opacity: 1; transition: opacity .5s var(--ease); }
/* ---------- разказ при скрол ----------
   Основното състояние е статично и напълно четимо без скрипт.
   Закачането се включва само с класа is-live и само над 900 px. */
.scrolly { position: relative; }
.scrolly__sticky { display: grid; gap: clamp(24px, 4vw, 60px); }
.scrolly__step { padding-block: 26px; border-top: 1px solid var(--line); }
.scrolly__step h3 { margin-bottom: 14px; }
.scrolly__nav { display: none; align-items: center; gap: 14px; margin-top: 30px; }
.scrolly__count { font-size: 0.82rem; letter-spacing: 0.08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.scrolly__count b { color: var(--ink); font-weight: 700; }
.scrolly__rail { display: flex; gap: 5px; }
.scrolly__rail span { height: 3px; width: 26px; background: var(--line); border-radius: 2px; transition: background-color .3s var(--ease); }
.scrolly__rail span.is-on { background: var(--accent); }

.scrolly.is-live .scrolly__sticky {
  position: sticky; top: 74px;
  height: calc(100svh - 74px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
}
.scrolly.is-live .scrolly__copy { position: relative; min-height: 16em; padding-bottom: 58px; }
.scrolly.is-live .scrolly__step {
  position: absolute; inset: 0 0 58px 0; padding-block: 0; border-top: 0;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.scrolly.is-live .scrolly__step.is-active {
  opacity: 1; transform: none; pointer-events: auto;
  transition: opacity .3s ease .2s, transform .3s ease .2s;
}
.scrolly.is-live .scrolly__nav { display: flex; position: absolute; left: 0; right: 0; bottom: 0; margin-top: 0; }
.scrolly.is-live .scrolly__track { height: 170vh; }

/* Телефон и таблет: без задържане на екрана. Шестте текста са нормални
   вертикални карти, а илюстрацията стои отгоре и следи прогреса на секцията. */
@media (max-width: 900px) {
  .scrolly__sticky { display: flex; flex-direction: column; gap: 0; }
  .scrolly__stage-wrap {
    order: -1;
    position: sticky; top: 0; z-index: 1;
    margin-inline: calc(var(--gutter) * -1);
    padding: 6px var(--gutter) 10px;
    background: linear-gradient(to bottom, var(--bg) 84%, color-mix(in srgb, var(--bg) 0%, transparent));
  }
  .scrolly__stage-wrap .stage { max-height: 32vh; width: 100%; }
  .scrolly__copy { position: relative; z-index: 0; }
  .scrolly__step:first-of-type { border-top: 0; }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .scrolly__stage-wrap { position: static; background: none; }
}
/* ---------- трите пътя (редове, не карти) ---------- */
.paths { border-top: 1px solid var(--line); }
.path {
  display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) minmax(0, 1.1fr) auto;
  gap: clamp(16px, 3vw, 44px); align-items: baseline;
  padding-block: clamp(26px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
  position: relative;
}
.path::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  background: var(--accent-soft); opacity: 0;
  transition: opacity .25s var(--ease);
  margin-inline: calc(var(--gutter) * -0.4);
  border-radius: var(--r-md);
  z-index: -1;
}
.path:hover::before, .path:focus-visible::before { opacity: 1; }
.path__kind { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.path__title { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 690; letter-spacing: -0.02em; line-height: 1.1; }
.path__text { color: var(--muted); font-size: 1rem; }
.path__go { font-weight: 700; color: var(--accent); white-space: nowrap; }
.path:hover .path__go .arw { transform: translateX(5px); }
.path__go .arw { display: inline-block; transition: transform .2s var(--ease); }
@media (max-width: 860px) {
  .path { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- позиция / интерес ---------- */
.switcher__controls { display: inline-flex; padding: 5px; border: 1px solid #35423F; border-radius: var(--r-pill); gap: 4px; }
.switcher__btn {
  border: 0; background: transparent; color: #C3CAC6; font-weight: 700;
  padding: 10px 22px; border-radius: var(--r-pill); cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.switcher__btn[aria-selected="true"] { background: #EFEDE6; color: var(--deep); }
.switcher__panels { margin-top: var(--md); display: grid; }
.switcher__panel { grid-area: 1 / 1; opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.switcher__panel[hidden] { display: none; }
.switcher__panel.is-on { opacity: 1; transform: none; }
.switcher__quote {
  font-family: var(--font-quote); font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.28; letter-spacing: -0.01em; max-width: 22ch;
}
.switcher__body { margin-top: 18px; color: #C3CAC6; max-width: 48ch; }

/* ---------- филтър по области ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: var(--md); }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: var(--r-pill); padding: 9px 18px; font-weight: 600; font-size: 0.94rem;
  cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.area {
  background: var(--surface); padding: 22px 22px 26px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 8px; min-height: 148px;
  transition: background-color .2s var(--ease);
}
.area:nth-child(4n+2) { background: #FBFAF6; }
.area:hover { background: var(--accent); color: #fff; }
.area:hover .area__meta { color: #CFE7E1; }
.area__name { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.015em; }
.area__meta { color: var(--muted); font-size: 0.9rem; margin-top: auto; }
.area[hidden] { display: none; }

/* ---------- стълбица на ескалацията ---------- */
.ladder { display: grid; gap: 2px; }
.rung {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  padding: 16px 20px; background: var(--surface); border-radius: var(--r-sm);
  border-left: 3px solid var(--line);
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.rung.is-on { border-left-color: var(--accent); }
.rung__bar { width: 64px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rung__bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .7s var(--ease); }
.rung.is-on .rung__bar i { width: var(--fill, 40%); }

/* ---------- правна бележка / цитат ---------- */
.note, .wp-block-quote {
  background: var(--surface);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 20px 24px;
  font-family: var(--font-quote);
  font-size: 1.05rem;
  line-height: 1.55;
  margin-block: var(--md);
  max-width: 62ch;
}
.note p, .wp-block-quote p { max-width: none; }
.note strong { font-family: var(--font); }

/* ---------- съдържание на вътрешни страници ---------- */
.page-hero { padding-block: clamp(40px, 6vw, 84px) clamp(28px, 4vw, 52px); }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.9rem); max-width: 17ch; }
@media (max-width: 900px) { .page-hero__grid { grid-template-columns: 1fr; } }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.88rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

.prose { max-width: none; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: clamp(48px, 6vw, 88px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  max-width: 20ch;
}
.prose h3 { margin-top: clamp(28px, 3vw, 40px); }
.prose ul { margin-top: 1em; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 26px; max-width: var(--measure); }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: 0.62em;
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--accent);
}
.prose .wp-block-buttons { margin-top: var(--md); }
.prose .wp-block-button__link {
  display: inline-flex; background: var(--accent); color: #fff;
  padding: 15px 28px; border-radius: var(--r-pill); font-weight: 700; text-decoration: none;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 960px) { .content-grid { grid-template-columns: 1fr; } }

.toc { position: sticky; top: 100px; border-top: 2px solid var(--ink); padding-top: 16px; }
.toc h2 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 12px; border: 0; padding: 0; }
.toc ol { display: grid; gap: 9px; counter-reset: toc; }
.toc a { display: block; color: var(--ink); text-decoration: none; font-size: 0.94rem; line-height: 1.35; border-left: 2px solid transparent; padding-left: 12px; margin-left: -14px; transition: border-color .2s var(--ease), color .2s var(--ease); }
.toc a:hover, .toc a.is-current { border-left-color: var(--accent); color: var(--accent); }
@media (max-width: 960px) { .toc { display: none; } }

/* ---------- свързани страници ---------- */
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.related a { background: var(--bg); padding: 24px 4px 26px 0; text-decoration: none; color: inherit; display: block; padding-left: 20px; transition: background-color .2s var(--ease); }
.related a:hover { background: var(--surface); }
.related span { display: block; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.related strong { font-size: 1.12rem; font-weight: 690; letter-spacing: -0.015em; line-height: 1.2; display: block; }

/* ---------- заключителен призив ---------- */
.cta-band { background: var(--deep); color: #EFEDE6; border-radius: var(--r-md); padding: clamp(32px, 5vw, 64px); position: relative; overflow: hidden; }
.cta-band h2 { max-width: 16ch; }
.cta-band p { color: #C3CAC6; margin-top: 16px; max-width: 46ch; }
.cta-band__art { position: absolute; right: -60px; bottom: -40px; width: 340px; opacity: .5; pointer-events: none; }
@media (max-width: 720px) { .cta-band__art { display: none; } }

/* ---------- долен колонтитул ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 80px) var(--md); margin-top: clamp(48px, 6vw, 96px); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h2 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.foot-grid ul { display: grid; gap: 9px; }
.foot-grid a { color: var(--ink); text-decoration: none; font-size: 0.96rem; }
.foot-grid a:hover { color: var(--accent); text-decoration: underline; }
.foot-about { margin-top: 18px; max-width: 34ch; color: var(--muted); font-size: 0.96rem; }
.foot-links { margin-top: var(--lg); padding-top: var(--md); border-top: 1px solid var(--line); }
.foot-links ul { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.foot-links a { color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.foot-links a:hover { color: var(--accent); text-decoration: underline; }
.foot-legal { margin-top: var(--md); display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: baseline; font-size: 0.88rem; color: var(--muted); }
.foot-legal p { max-width: 70ch; }

/* ---------- решетка на стълбицата ---------- */
.ladder-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .ladder-grid { grid-template-columns: 1fr; } }

/* ---------- абстрактна графика ---------- */
.art { width: 100%; height: auto; overflow: visible; }
.page-hero__art { position: relative; }
@media (min-width: 901px) {
  /* композицията излиза извън контейнера вместо да получава сянка */
  .page-hero__art { margin-right: calc(var(--gutter) * -1); }
}
@media (max-width: 900px) { .page-hero__art { max-width: 340px; } }

/* водещият абзац, който редакторът вижда и в блоковия редактор */
.agora-lead {
  font-size: clamp(1.12rem, 1.4vw, 1.34rem);
  line-height: 1.5;
  color: #2C3431;
  max-width: 52ch;
}

/* ---------- поява при скрол ---------- */
.has-js .reveal { opacity: 0; transform: translateY(18px); }
.has-js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .has-js .reveal, .has-js .hero .fig-left, .has-js .hero .fig-right { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .scrolly__step { position: static; opacity: 1; transform: none; padding-block: 26px; border-top: 1px solid var(--line); }
  .scrolly__sticky { position: static; height: auto; display: block; }
  .scrolly__track { height: auto; }
  .scrolly__copy { min-height: 0; }
  .scrolly__progress { display: none; }
  .rung__bar i { transition: none; }
}

/* ---------- лого ----------
   Логото стои само, без дублиращ текст до него.
   Умножаващото смесване премахва бялата подложка на файла
   и смекчава ръба върху топлия фон, вместо да го оставя като лепенка. */
.brand { gap: 0; }
.brand__logo {
  width: auto; height: 46px; max-width: 200px; object-fit: contain; flex: 0 0 auto;
  mix-blend-mode: multiply;
  transition: opacity .2s var(--ease);
}
.brand:hover .brand__logo { opacity: .82; }
.site-foot .brand__logo { height: 58px; }
@media (max-width: 768px) { .brand__logo { height: 38px; } }

/* ---------- лента за прочетеното ---------- */
.read-bar { position: sticky; top: 0; z-index: 59; height: 2px; background: transparent; }
.read-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .12s linear; }
body.is-front .read-bar { display: none; }

/* ---------- главата се прибира при четене надолу ---------- */
.site-head.is-hidden { transform: translateY(-100%); }

/* ---------- по-живи появи ---------- */
.has-js .reveal { opacity: 0; transform: translateY(22px) scale(.988); }
.has-js .reveal[data-from="left"]  { transform: translateX(-26px); }
.has-js .reveal[data-from="right"] { transform: translateX(26px); }
.has-js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.has-js .h-clip { overflow: hidden; display: block; }
.has-js .h-clip > span { display: block; transform: translateY(105%); }
.has-js .h-clip.is-in > span { transform: none; transition: transform .85s var(--ease); }

.path { overflow: hidden; }
.path::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.path:hover::after, .path:focus-visible::after { transform: scaleX(1); }
.path__title { transition: transform .35s var(--ease); }
.path:hover .path__title { transform: translateX(6px); }

.area { transition: background-color .25s var(--ease), transform .25s var(--ease); }
.area:hover { transform: translateY(-3px); }

.has-js .rung { opacity: 0; transform: translateX(-16px); }
.has-js .rung.is-on { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .4s var(--ease); }

.prose a:not(.wp-block-button__link) {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  text-decoration: none; transition: background-size .35s var(--ease);
}
.prose a:not(.wp-block-button__link):hover { background-size: 100% 1px; }

/* ---------- таблет и телефон ---------- */
@media (max-width: 1280px) {
  .content-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 250px); gap: clamp(28px, 4vw, 56px); }
}

@media (max-width: 1024px) {
  :root { --wrap: 900px; }
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --gutter: clamp(18px, 5vw, 28px); }
  .site-head__inner { min-height: 64px; }
  .nav { inset: 64px 0 0 0; }
  .hero { padding-block: 24px 40px; }
  .hero__title { max-width: 100%; }
  .section { padding-block: 52px; }
  .prose h2 { max-width: 100%; }
  .cta-band { padding: 28px 22px 32px; }
  .foot-legal { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
  .areas { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .chip { flex: 1 1 45%; }
}

@media (hover: none) and (pointer: coarse) {
  .nav__list a, .foot-grid a, .toc a { min-height: 44px; display: flex; align-items: center; }
  .chip, .switcher__btn { min-height: 44px; }
  .btn { min-height: 48px; }
  .path { padding-block: 22px; }
}

.mobile-cta { display: none; }
@media (max-width: 768px) {
  body:not(.is-front) .mobile-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 58;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(8px); border-top: 1px solid var(--line);
    transform: translateY(120%); transition: transform .35s var(--ease);
  }
  body:not(.is-front) .mobile-cta.is-on { transform: none; }
  body:not(.is-front) .site-foot { padding-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .has-js .h-clip > span { transform: none !important; }
  .hero .fig3d__body, .hero .fig3d__shadow,
  .hero .leg-a, .hero .leg-b, .hero .arm-a, .hero .arm-b { animation: none !important; }
  .has-js .rung { opacity: 1 !important; transform: none !important; }
  .stage--hero .ring { transition: none !important; }
  .read-bar { display: none; }
  .mobile-cta { transition: none !important; }
}

/* ---------- форма за запитване ---------- */
.form-wrap {
  margin-top: clamp(40px, 5vw, 72px);
  padding: clamp(24px, 3.5vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  max-width: 780px;
}
.form-wrap > h2 { margin: 0 0 10px; border: 0; padding: 0; font-size: clamp(1.5rem, 2.2vw, 2rem); }

.form { margin-top: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

.field { display: block; margin: 0 0 18px; max-width: none; }
.field label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 7px; }
.field .req { color: var(--accent); }
.field .opt { font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.field__hint { display: block; color: var(--muted); font-size: 0.88rem; margin-bottom: 8px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #C4BCA9; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); background: var(--surface);
}
.field [aria-invalid="true"] { border-color: #9B3A22; }
.field__err { display: block; margin-top: 7px; color: #9B3A22; font-size: 0.9rem; font-weight: 600; }

.field--check label { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-weight: 400; font-size: 0.96rem; line-height: 1.5; }
.field--check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); }

.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin: 26px 0 0; }
.form-legal { margin-top: 18px; color: var(--muted); font-size: 0.88rem; max-width: none; }

.form-note { border-radius: var(--r-sm); padding: 16px 18px; margin-bottom: 22px; }
.form-note p { margin-top: 6px; max-width: none; }
.form-note--ok { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.form-note--err { background: #F6E9E4; border-left: 3px solid #9B3A22; }
.form-note--err ul { margin-top: 8px; display: grid; gap: 6px; }
.form-note--err a { color: #9B3A22; }

@media (max-width: 480px) { .form-actions .btn { width: 100%; justify-content: center; } }

/* ---------- обемни фонове (генерирани 3D композиции) ---------- */
.hero { isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -6%;
  top: -10%;
  width: min(680px, 52vw);
  aspect-ratio: 21 / 9;
  background-image: var(--bg-hero);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .82;
  pointer-events: none;
  animation: agora-drift 19s var(--ease) infinite alternate;
}
@media (max-width: 900px) { .hero::before { display: none; } }

.section--dark { position: relative; overflow: hidden; isolation: isolate; }
.section--dark[data-switcher]::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -8%;
  top: 50%;
  width: min(620px, 55vw);
  aspect-ratio: 16 / 9;
  background-image: var(--bg-dark);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .55;
  -webkit-mask-image: linear-gradient(to left, var(--deep) 55%, transparent 100%);
  mask-image: linear-gradient(to left, var(--deep) 55%, transparent 100%);
  pointer-events: none;
  animation: agora-drift-dark 23s var(--ease) infinite alternate;
  animation-delay: -6s;
}
@media (max-width: 900px) { .section--dark[data-switcher]::before { width: 78vw; opacity: .35; } }

.section--texture { position: relative; isolation: isolate; }
.section--texture::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--bg-texture);
  background-size: cover;
  background-position: center;
  opacity: .3;
  pointer-events: none;
}

.cta-band { position: relative; overflow: hidden; isolation: isolate; }
.cta-band::before {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: -2;
  background-image: var(--bg-cta);
  background-size: cover;
  background-position: center;
  opacity: .92;
  pointer-events: none;
  animation: agora-drift 21s var(--ease) infinite alternate;
  animation-delay: -3s;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(14, 21, 19, .62);
  pointer-events: none;
}

@keyframes agora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2.4%, -3.2%, 0) scale(1.03); }
}
@keyframes agora-drift-dark {
  0%   { transform: translateY(-50%) translate3d(0, 0, 0) scale(1); }
  100% { transform: translateY(-50%) translate3d(-2%, -3%, 0) scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before, .section--dark[data-switcher]::before, .cta-band::before { animation: none !important; }
}

@media print {
  .site-head, .site-foot, .scrolly__stage-wrap, .cta-band__art { display: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
