/* ==========================================================================
   iManage — официален уебсайт
   Дизайн система (Epic IMDO-836 / Story IMDO-837)
   Корпоративен стил, вдъхновен от sap.com — дълбоко синьо, чисти банери,
   много бяло пространство, професионална типографика.
   ========================================================================== */

/* ---------- Fonts ----------
   IMDO-846 PageSpeed фикс: премахнат @import (сериализира заявката зад
   изтеглянето+парсването на целия styles.css); шрифтовете вече се зареждат
   директно през <link rel="stylesheet"> в <head> на всяка страница, редом
   до съществуващите preconnect hint-ове — браузърният preloader ги открива
   веднага при парсване на HTML, паралелно с всичко останало. */

/* ---------- Tokens ---------- */
:root {
    /* Марка — изведена от синьото на логото iManage */
    --brand-50:  #f2f7fd;
    --brand-100: #e2eefb;
    --brand-200: #c2dbf4;
    --brand-400: #5b93d6;
    --brand-600: #2f6cc0;   /* primary */
    --brand-700: #24549a;
    --brand-800: #1a3f77;
    --brand-900: #0c2340;   /* deep navy */
    --brand-950: #071a33;

    --accent-500: #f5a623;  /* амбър — само за акценти/CTA */
    --accent-600: #e0921a;

    --ink:      #16222f;
    --ink-soft: #33465a;
    --muted:    #5f7183;
    --line:     #e4eaf1;
    --line-2:   #d4deea;

    --bg:       #ffffff;
    --bg-soft:  #f5f8fc;
    --bg-tint:  #eef4fb;

    --white:    #ffffff;

    --radius:   14px;
    --radius-sm: 9px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(12, 35, 64, .06), 0 2px 8px rgba(12, 35, 64, .05);
    --shadow-md: 0 6px 20px rgba(12, 35, 64, .10), 0 2px 6px rgba(12, 35, 64, .06);
    --shadow-lg: 0 24px 60px rgba(12, 35, 64, .18);

    --container: 1180px;
    --ease: cubic-bezier(.4, 0, .2, 1);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-head: 'Manrope', var(--font-body);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink-soft);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand-600); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 .5em;
    letter-spacing: -.02em;
    font-weight: 800;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.06rem; font-weight: 700; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.15rem; }
li { margin: .3rem 0; }
:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.section { padding: clamp(56px, 8vw, 108px) 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: linear-gradient(180deg, var(--bg-tint), var(--bg-soft)); }
.section--deep {
    background: radial-gradient(1200px 600px at 15% -10%, var(--brand-800), transparent 60%),
                linear-gradient(160deg, var(--brand-900), var(--brand-950));
    color: #c6d6ea;
}
.section--deep h1, .section--deep h2, .section--deep h3, .section--deep h4 { color: #fff; }
.section--deep a { color: #fff; }
/* светлите бутони в тъмни секции запазват тъмния си текст (иначе е бяло върху бяло) */
.section--deep .btn--light, .section--deep .btn--light:hover { color: var(--brand-800); }

.section-head { max-width: 760px; margin: 0 auto clamp(36px, 5vw, 60px); text-align: center; }
.section-head p { font-size: 1.12rem; color: var(--muted); margin: 0; }
.section--deep .section-head p { color: #a9c0da; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-600);
    margin-bottom: 14px;
}
.section--deep .eyebrow { color: var(--brand-400); }

.lead { font-size: 1.2rem; color: var(--ink-soft); }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--brand-600);
    --btn-fg: #fff;
    display: inline-flex; align-items: center; gap: .5em;
    padding: 13px 24px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .98rem;
    line-height: 1;
    color: var(--btn-fg);
    background: var(--btn-bg);
    border: 1.5px solid var(--btn-bg);
    border-radius: 999px;
    transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
    white-space: nowrap;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--brand-700); border-color: var(--brand-700); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--brand-700); }
.btn--ghost:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-600); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--brand-800); border-color: #fff; }
.btn--light:hover { background: var(--brand-50); color: var(--brand-800); border-color: var(--brand-50); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
/* черен бутон с бялата иконка на iM OSM — „Регистрирай сграда / Вход“ (Клиентски портал) */
.btn--dark { --btn-bg: #111; --btn-fg: #fff; }
.btn--dark:hover { background: #000; border-color: #000; color: #fff; }
.btn--dark img { width: 18px; height: 18px; flex-shrink: 0; }
.btn--lg { padding: 16px 30px; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 26px; height: 72px; }
.nav__logo { display: flex; align-items: center; flex-shrink: 0; }
.nav__logo img { height: 30px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav__links a {
    font-family: var(--font-head); font-weight: 600; font-size: .95rem;
    color: var(--ink-soft); padding: 8px 13px; border-radius: 8px;
    transition: background .15s, color .15s;
}
.nav__links a:hover, .nav__links a.is-active { background: var(--brand-50); color: var(--brand-700); }
.nav__spacer { flex: 1; }
.nav__cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav__links a { white-space: nowrap; }
.nav__cta .btn.nav__myapps { padding-inline: 12px; }
.nav__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 2px;
    border-radius: 999px; background: var(--accent-500); color: #0c2340; font-size: .74rem; font-weight: 800; line-height: 1; }   /* брой незавършени регистрации (IMWEB-92) */
.nav__myapps-short { display: none; }
@media (max-width: 1240px) { .nav__myapps-long { display: none; } .nav__myapps-short { display: inline; } }   /* „Регистрации N“ на по-тесни екрани */
@media (max-width: 1020px) { .nav__cta:has(.nav__myapps) .btn { padding-inline: 12px; } .nav:has(.nav__myapps) .nav__links a { padding-inline: 6px; } }
@media (max-width: 1100px) { .nav__links a { padding-inline: 8px; } .nav__links { margin-left: 4px; gap: 2px; } }
@media (max-width: 1200px) { .nav__cta:has(.nav__myapps) .btn--ghost:not(.nav__myapps):not(.nav__keep) { display: none; } }   /* място за „Моите заявки“ — „Контакти“ е в менюто */
/* място за „Регистрирай сграда / Вход“: „Свържи се“ отпада (Контакти е в менюто); при теснo или с „Моите заявки“ — само иконката (надписът е в title) */
.nav__cta:has(.nav__ss) > .btn--ghost:not(.nav__myapps) { display: none; }
.nav__cta .btn.nav__ss { padding-inline: 14px; }
@media (max-width: 1180px) { .nav__cta .nav__ss span { display: none; } .nav__cta .btn.nav__ss { padding-inline: 11px; } }
.nav__cta:has(.nav__myapps) .nav__ss span { display: none; }
.nav__cta:has(.nav__myapps) .btn.nav__ss { padding-inline: 11px; }
@media (max-width: 1050px) { .nav__cta:has(.nav__myapps) .nav__ss { display: none; } }   /* „Моите заявки“ също води към портала */
.nav__cta .btn { padding: 10px 18px; font-size: .9rem; }
.nav__burger {
    display: none; width: 44px; height: 44px; border: 1px solid var(--line-2);
    border-radius: 10px; background: #fff; align-items: center; justify-content: center;
}
.nav__burger span, .nav__burger span::before, .nav__burger span::after {
    content: ''; display: block; width: 20px; height: 2px; background: var(--ink);
    border-radius: 2px; transition: transform .2s var(--ease), opacity .2s;
}
.nav__burger span::before { transform: translateY(-6px); }
.nav__burger span::after  { transform: translateY(4px); }
body.nav-open .nav__burger span { background: transparent; }
body.nav-open .nav__burger span::before { transform: rotate(45deg); }
body.nav-open .nav__burger span::after  { transform: rotate(-45deg) translateY(-1.5px); }

.nav__panel { display: none; }

@media (max-width: 960px) {
    .nav__links, .nav__cta { display: none; }
    .nav__burger { display: flex; }
    .nav__panel {
        display: block; position: fixed; inset: 72px 0 auto 0;
        background: #fff; border-bottom: 1px solid var(--line);
        padding: 14px 22px 26px;
        transform: translateY(-140%); transition: transform .32s var(--ease);
        box-shadow: var(--shadow-md); max-height: calc(100vh - 72px); overflow-y: auto;
    }
    body.nav-open .nav__panel { transform: translateY(0); }
    .nav__panel a {
        display: block; font-family: var(--font-head); font-weight: 600;
        padding: 13px 6px; border-bottom: 1px solid var(--line); color: var(--ink);
    }
    .nav__panel .btn { margin-top: 16px; width: 100%; justify-content: center; }
    .nav__panel a.btn { display: flex; padding: 14px 20px; color: var(--btn-fg); border: 1.5px solid var(--btn-bg); }
    .nav__panel .btn + .btn { margin-top: 10px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 92px) 0 clamp(52px, 8vw, 104px); }
.hero--deep {
    background: radial-gradient(900px 500px at 85% -10%, var(--brand-700), transparent 55%),
                linear-gradient(155deg, var(--brand-900) 20%, var(--brand-950));
    color: #c9d8ea;
}
.hero--deep h1 { color: #fff; }
.hero--deep .eyebrow { color: var(--brand-400); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero__copy p { font-size: 1.18rem; max-width: 42ch; }
.hero--deep .hero__copy p { color: #b7cbe0; }
.hero__art { position: relative; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font-size: .92rem; }
.hero__badges span { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: inherit; }
.hero__badges svg { width: 17px; height: 17px; color: var(--brand-400); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.card h3 { margin-bottom: .35em; }
.card h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; margin-bottom: .35em; }
.card p { margin: 0; font-size: .98rem; color: var(--muted); }
.card__icon {
    width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-50); color: var(--brand-600);
    font-family: var(--font-head); font-weight: 800; font-size: 1.15rem;
}
.card__icon svg { width: 24px; height: 24px; }
.section--deep .card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.section--deep .card p { color: #a9c0da; }
.section--deep .card__icon { background: rgba(255,255,255,.08); color: var(--brand-400); }

.card--link { display: flex; flex-direction: column; }
.card--link .card__more { margin-top: auto; padding-top: 16px; font-family: var(--font-head); font-weight: 700; font-size: .92rem; color: var(--brand-600); display: inline-flex; align-items: center; gap: 6px; }
.card--link:hover .card__more { gap: 10px; }

/* Компактен списък с чекове */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 11px; align-items: flex-start; margin: 11px 0; font-size: 1rem; color: var(--ink-soft); }
.checks svg { flex-shrink: 0; width: 21px; height: 21px; margin-top: 2px; color: var(--brand-600); }
.section--deep .checks li { color: #c6d6ea; }
.section--deep .checks svg { color: var(--brand-400); }

/* ---------- Feature row (редуващи се блокове) ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 76px); align-items: center; }
.feature-row + .feature-row { margin-top: clamp(56px, 9vw, 110px); }
.feature-row:nth-child(even) .feature-row__media { order: -1; }
.feature-row__copy h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; }

/* ---------- Stat band ---------- */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat__num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; line-height: 1; letter-spacing: -.03em; }
.stat__label { margin-top: 8px; font-size: .95rem; color: #a9c0da; }

/* ---------- Two audience options ---------- */
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.option {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 34px 32px; display: flex; flex-direction: column;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.option:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }
.option--accent { border-color: var(--brand-600); box-shadow: 0 0 0 1px var(--brand-600); }
.option__tag {
    align-self: flex-start; font-family: var(--font-head); font-weight: 700; font-size: .74rem;
    letter-spacing: .1em; text-transform: uppercase; color: var(--brand-700);
    background: var(--brand-50); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.option--accent .option__tag { background: var(--brand-600); color: #fff; }
.option h3 { font-size: 1.55rem; }
.option > p { color: var(--muted); }
.option .checks { margin: 6px 0 22px; }
.option .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Detailed module catalogue ---------- */
.mod-cat + .mod-cat { margin-top: clamp(40px, 6vw, 64px); }
.mod-cat__head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.mod-cat__head .card__icon { margin: 0; flex-shrink: 0; }
.mod-cat__head h3 { margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.mod-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 44px; }
.mod-list > div { border-left: 3px solid var(--brand-100); padding-left: 20px; }
.mod-list h4 { margin: 0 0 6px; font-size: 1.06rem; }
.mod-list p { margin: 0; font-size: .97rem; color: var(--muted); }
@media (max-width: 760px) { .mod-list { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Logo / systems strip ---------- */
.systems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.systems--2 { grid-template-columns: repeat(2, 1fr); max-width: 860px; margin-inline: auto; }
.system-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 30px 28px; display: flex; flex-direction: column;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.system-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.system-card__tag {
    align-self: flex-start; font-family: var(--font-head); font-weight: 700; font-size: .74rem;
    letter-spacing: .1em; text-transform: uppercase; color: var(--brand-700);
    background: var(--brand-50); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.system-card h3 { font-size: 1.5rem; }
.system-card p { color: var(--muted); font-size: .98rem; flex: 1; }
.system-card .card__more { margin-top: 16px; font-family: var(--font-head); font-weight: 700; font-size: .92rem; color: var(--brand-600); display: inline-flex; gap: 7px; align-items: center; }
.system-card:hover .card__more { gap: 11px; }

/* ---------- CTA band ---------- */
.cta-band {
    background: radial-gradient(700px 380px at 90% 10%, var(--brand-700), transparent 60%),
                linear-gradient(150deg, var(--brand-800), var(--brand-950));
    border-radius: var(--radius-lg); padding: clamp(38px, 6vw, 68px);
    text-align: center; color: #ccdcee;
}
.cta-band h2 { color: #fff; max-width: 20ch; margin-inline: auto; }
.cta-band p { max-width: 52ch; margin: 0 auto 26px; color: #b7cbe0; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Accordion (FAQ) ---------- */
.accordion { max-width: 800px; margin: 0 auto; border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__q {
    width: 100%; text-align: left; background: none; border: 0; padding: 22px 44px 22px 4px;
    font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--ink);
    position: relative;
}
.acc__q::after {
    content: ''; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px;
    border-right: 2px solid var(--brand-600); border-bottom: 2px solid var(--brand-600);
    transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease);
}
.acc__item.is-open .acc__q::after { transform: translateY(-30%) rotate(225deg); }
.acc__a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.acc__a > div { padding: 0 4px 22px; color: var(--muted); }

/* ---------- Illustration: browser frame ---------- */
.browser {
    background: #fff; border: 1px solid var(--line-2); border-radius: 14px;
    box-shadow: var(--shadow-lg); overflow: hidden;
}
.browser__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #f2f5f9; border-bottom: 1px solid var(--line); }
.browser__bar i { width: 11px; height: 11px; border-radius: 50%; background: #cfd8e3; display: block; }
.browser__bar i:nth-child(1) { background: #ff5f57; } .browser__bar i:nth-child(2) { background: #febc2e; } .browser__bar i:nth-child(3) { background: #28c840; }
.browser__url { margin-left: 12px; flex: 1; height: 22px; border-radius: 6px; background: #fff; border: 1px solid var(--line-2); font-size: .72rem; color: var(--muted); display: flex; align-items: center; padding: 0 10px; font-family: var(--font-body); }
.browser__body { padding: 0; background: var(--bg-soft); }
.browser svg { display: block; width: 100%; height: auto; }
.hero--deep .browser, .section--deep .browser { border-color: rgba(255,255,255,.16); }
.section--deep .browser { margin-top: 8px; }

/* ---------- Illustration: phone frame ---------- */
.phone {
    width: 264px; border-radius: 42px; background: #0c1622; padding: 12px;
    box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.06); position: relative;
}
.phone::before {
    content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
    width: 92px; height: 20px; background: #0c1622; border-radius: 0 0 14px 14px; z-index: 2;
}
.phone__screen { border-radius: 32px; overflow: hidden; background: #fff; }
.phone__screen svg { display: block; width: 100%; height: auto; }
.phones { display: flex; gap: 26px; align-items: center; justify-content: center; flex-wrap: wrap; }

/* ---------- Split / persona ---------- */
.persona { display: flex; gap: 14px; align-items: flex-start; }
.persona svg { width: 26px; height: 26px; color: var(--brand-600); flex-shrink: 0; margin-top: 3px; }
.persona h3 { margin: 0 0 3px; font-size: 1.06rem; font-weight: 700; }
.persona p { margin: 0; font-size: .95rem; color: var(--muted); }

/* ---------- Module list (dense) ---------- */
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mod-grid > div { background: #fff; padding: 20px 22px; }
.mod-grid h4 { display: flex; align-items: center; gap: 9px; margin: 0 0 5px; font-size: 1rem; }
.mod-grid h4 svg { width: 19px; height: 19px; color: var(--brand-600); }
.mod-grid p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- Pricing: plan cards ---------- */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan {
    display: flex; flex-direction: column; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 22px;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan--featured { border-color: var(--brand-600); box-shadow: 0 0 0 1px var(--brand-600); }
.plan__badge {
    align-self: flex-start; font-family: var(--font-head); font-weight: 700; font-size: .68rem;
    letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--brand-600);
    padding: 5px 11px; border-radius: 999px; margin-bottom: 12px;
}
.plan__name { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--ink); margin: 0 0 4px; }
.plan__price { font-family: var(--font-head); font-weight: 800; font-size: 2.1rem; color: var(--ink); line-height: 1; letter-spacing: -.03em; }
.plan__price span { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan__price--quote { font-size: 1.4rem; }
.plan__note { margin: 10px 0 0; font-size: .88rem; line-height: 1.45; color: var(--muted); }   /* Extra — индивидуална оферта */
.plan__meta { list-style: none; padding: 0; margin: 18px 0 20px; border-top: 1px solid var(--line); }
.plan__meta li { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.plan__meta li b { font-weight: 700; color: var(--ink); text-align: right; }
.plan .btn { margin-top: auto; width: 100%; justify-content: center; }
.plan .btn.plan__reg { padding: 14px 10px; font-size: .88rem; line-height: 1.2; white-space: normal; text-align: center; }   /* „Регистрирай Сграда / Вход“ в тесните карти */

/* ---------- Pricing: comparison table ---------- */
.ptable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; -webkit-overflow-scrolling: touch; }
.ptable { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 760px; }
.ptable th, .ptable td { padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable thead th { position: sticky; top: 0; background: var(--brand-900); color: #fff; font-family: var(--font-head); font-size: .92rem; z-index: 2; }
.ptable thead th:first-child { text-align: left; }
.ptable tbody th { text-align: left; font-weight: 600; color: var(--ink-soft); }
.ptable tbody th small { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.ptable td:first-child, .ptable th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 240px; box-shadow: 1px 0 0 var(--line); }
.ptable thead th:first-child { background: var(--brand-900); z-index: 3; }
.ptable__group th { background: var(--bg-tint); color: var(--brand-800); font-family: var(--font-head); font-weight: 800; text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; text-align: left; }
.ptable__group th:first-child { background: var(--bg-tint); }
.ptable tr:hover td:not(:first-child) { background: var(--brand-50); }
.ptable .tick { color: var(--brand-600); }
.ptable .cross { color: var(--line-2); }
.ptable .cell-note { font-size: .82rem; color: var(--muted); display: block; margin-top: 3px; }
.ptable .val { font-weight: 700; color: var(--ink); }

/* ---------- Compare table ---------- */
.compare { width: 100%; border-collapse: collapse; font-size: .96rem; }
.compare th, .compare td { text-align: left; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.compare thead th { font-family: var(--font-head); color: var(--ink); font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.compare tbody th { font-weight: 600; color: var(--ink-soft); }
.compare td svg { width: 20px; height: 20px; color: var(--brand-600); }
.compare .compare__wrap { overflow-x: auto; }

/* ---------- Form ---------- */
.form { display: grid; gap: 16px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px;
    font: inherit; font-size: .98rem; color: var(--ink); background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.field textarea { min-height: 120px; resize: vertical; }
.form__note { font-size: .85rem; color: var(--muted); }

/* ---------- Registration form ---------- */
.regcard { max-width: 780px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-md); }
.reg-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 6px; }
.reg-plan {
    position: relative; display: block; cursor: pointer;
    border: 1.5px solid var(--line-2); border-radius: var(--radius); padding: 16px 14px; text-align: center;
    transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.reg-plan:hover { border-color: var(--brand-400); }
.reg-plan input { position: absolute; opacity: 0; pointer-events: none; }
.reg-plan__body { display: block; }
.reg-plan__name { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1rem; color: var(--ink); }
.reg-plan__price { display: block; font-family: var(--font-head); font-weight: 700; font-size: .92rem; color: var(--muted); margin-top: 3px; }
.reg-plan__lim { display: block; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.reg-plan:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-600); transform: translateY(-2px); }
.reg-plan:has(input:checked) .reg-plan__price { color: var(--brand-700); }
.reg-row { display: grid; gap: 16px; }
.reg-row--2 { grid-template-columns: 1fr 1fr; }
.reg-row--addr { grid-template-columns: 2.4fr 1fr 1fr 1fr; }
.reg-hint { font-size: .84rem; color: var(--brand-700); margin-top: 6px; min-height: 1.1em; transition: opacity .2s; }
.reg-hint--warn { color: var(--accent-600); font-weight: 600; }
.reg-submit { width: 100%; justify-content: center; margin-top: 8px; }
.reg-submit[disabled] { opacity: .6; cursor: progress; }
.reg-error { background: #fdecec; border: 1px solid #f5c2c2; color: #a12; border-radius: 10px; padding: 12px 14px; font-size: .92rem; }

/* success panel + checkmark draw */
.reg-success { max-width: 620px; margin: 0 auto; text-align: center; }
.reg-check { width: 96px; height: 96px; margin: 0 auto 22px; }
.reg-check circle { stroke: var(--brand-600); stroke-width: 4; fill: none; stroke-dasharray: 302; stroke-dashoffset: 302; animation: reg-draw .7s var(--ease) forwards; }
.reg-check path { stroke: var(--brand-600); stroke-width: 5; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: reg-draw .4s .55s var(--ease) forwards; }
@keyframes reg-draw { to { stroke-dashoffset: 0; } }
.reg-success h2 { animation: reg-up .5s .5s both; }
.reg-success p { animation: reg-up .5s .68s both; }
.reg-ticket { display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: 999px; padding: 8px 18px; margin: 6px 0 18px; animation: reg-up .5s .84s both; }
@keyframes reg-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .reg-check circle, .reg-check path { animation: none; stroke-dashoffset: 0; }
    .reg-success h2, .reg-success p, .reg-ticket { animation: none; }
}

@media (max-width: 640px) {
    .reg-plans { grid-template-columns: 1fr; }
    .reg-row--2, .reg-row--addr { grid-template-columns: 1fr; }
}

/* ---------- Pricing: превключвател индивидуален / професионален ---------- */
[hidden] { display: none !important; }
.pricing-switch {
    display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 999px; padding: 5px; gap: 4px; max-width: 100%;
}
.pricing-switch button {
    border: 0; background: transparent; font-family: var(--font-head); font-weight: 700;
    font-size: .95rem; color: var(--ink-soft); padding: 11px 22px; border-radius: 999px;
    transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
    white-space: nowrap;
}
.pricing-switch button:hover { color: var(--brand-700); }
.pricing-switch button.is-active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }
@media (max-width: 560px) {
    .pricing-switch { width: 100%; flex-direction: column; border-radius: var(--radius); }
    .pricing-switch button { width: 100%; border-radius: var(--radius-sm); }
}

/* Про модели на внедряване — 3 карти чрез .plan */
.deploy-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
@media (max-width: 980px) { .deploy-cards { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
.plan__price--sm { font-size: 1.65rem; }

/* Ред „смени аудиторията" */
.switch-nudge {
    max-width: 760px; margin: 0 auto; text-align: center; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 30px;
}
.switch-nudge p { margin: 0 0 14px; color: var(--muted); }

/* ---------- Вход в системата (Story IMDO-845) ---------- */
.login-note {
    max-width: 700px; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center;
    background: var(--bg-tint); border: 1px solid var(--line-2); border-radius: var(--radius);
    padding: 18px 24px; color: var(--ink-soft); font-size: .95rem; line-height: 1.6;
}
.login-note strong { color: var(--ink); }
.login-cards {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
    max-width: 880px; margin-inline: auto;
}
.login-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 40px 32px; display: flex; flex-direction: column; align-items: center; text-align: center;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.login-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }
.login-card__logo { height: 42px; width: auto; margin-bottom: 22px; }
.login-card h2 { font-size: 1.3rem; margin-bottom: .55rem; }
.login-card p { color: var(--muted); font-size: .97rem; margin: 0 0 28px; }
.login-card .btn { margin-top: auto; min-width: 170px; justify-content: center; }
@media (max-width: 760px) { .login-cards { grid-template-columns: 1fr; max-width: 420px; } }

/* ---------- Footer ---------- */
.footer { background: var(--brand-950); color: #93a9c4; padding: 66px 0 32px; }
.footer a { color: #b7c9de; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.45fr .9fr 1.15fr 1fr 1.05fr 1.3fr; gap: 26px; }
.footer a[href^="tel:"], .footer a[href^="mailto:"] { white-space: nowrap; }
.footer__brand .footer__company { color: #c9d6e6; font-weight: 600; }
.footer__brand img { height: 58px; width: auto; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer__brand p { font-size: .93rem; max-width: 34ch; color: #8ba1bd; }
.footer h2, .footer h3 { font-family: var(--font-head); color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 9px 0; font-size: .93rem; }
.footer__bar { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: #7f96b3; }

/* ---------- Reveal on scroll ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__art { max-width: 560px; }
    .feature-row { grid-template-columns: 1fr; gap: 26px; }
    .feature-row:nth-child(even) .feature-row__media { order: 0; }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .systems, .systems--2, .options { grid-template-columns: 1fr; }
    .plans { grid-template-columns: repeat(2, 1fr); }
    .mod-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-band { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .plans { grid-template-columns: 1fr; }
    .mod-grid { grid-template-columns: 1fr; }
    .form .row2 { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .btn { width: 100%; justify-content: center; }
    .btn-row .btn { width: auto; }
    .hero .btn-row .btn { width: 100%; }
}

/* --- Process flow animation (IMDO-846) --- */
.flow {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; flex-wrap: wrap;
}
.flow--hero { flex-direction: column; max-width: none; margin: 0; }
.flow--hero .flow__connector { transform: rotate(90deg); }
.flow__step {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    width: 124px; text-align: center;
    opacity: 0; transform: translateY(14px) scale(.92);
    animation: flowStepIn 9s cubic-bezier(.22,.61,.36,1) infinite;
    animation-delay: calc(var(--i) * 1.8s);
}
.flow__icon {
    width: 88px; height: 88px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.16);
    color: #8fb3e0;
    animation: flowIconPulse 9s cubic-bezier(.22,.61,.36,1) infinite;
    animation-delay: calc(var(--i) * 1.8s);
}
.flow__icon svg { width: 38px; height: 38px; }
.flow__label { font-size: .86rem; font-weight: 600; color: #b7cbe0; }
.flow__connector { color: rgba(255,255,255,.35); flex-shrink: 0; }
.flow__connector path {
    stroke-dasharray: 10 58;
    animation: flowSlide 1.3s linear infinite;
}

@keyframes flowStepIn {
    0%, 4% { opacity: 0; transform: translateY(14px) scale(.92); }
    26%, 78% { opacity: 1; transform: translateY(0) scale(1); }
    92%, 100% { opacity: 0; transform: translateY(-6px) scale(.96); }
}
@keyframes flowIconPulse {
    0%, 4% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #8fb3e0; box-shadow: none; }
    18%, 26% { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 0 0 7px rgba(47,108,192,.18); }
    34%, 78% { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; box-shadow: none; }
    92%, 100% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #8fb3e0; box-shadow: none; }
}
@keyframes flowSlide {
    from { stroke-dashoffset: 68; }
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .flow__step, .flow__icon { animation: none; opacity: 1; transform: none; }
    .flow__icon { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; }
    .flow__connector path { animation: none; stroke-dasharray: none; }
}

@media (max-width: 720px) {
    .flow-demo .flow:not(.flow--hero) { flex-direction: column; }
    .flow-demo .flow:not(.flow--hero) .flow__connector { transform: rotate(90deg); }
}

/* ==========================================================================
   Ключови функции (начална страница) — бяла секция с анимирани графики
   Анимациите тръгват при влизане във viewport (.reveal.is-in от site.js).
   Без JS / при prefers-reduced-motion се вижда финалното състояние.
   ========================================================================== */
.kf { background: #fff; }
.kf-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; }
.kf-grid > *, .kf-card > *, .kf-pay > *, .kf-portal > * { min-width: 0; }
.kf-card {
    grid-column: span 4;
    display: flex; flex-direction: column; gap: 20px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 26px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.kf-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-2); }
.kf-card--4 { grid-column: span 4; } .kf-card--5 { grid-column: span 5; }
.kf-card--6 { grid-column: span 6; } .kf-card--7 { grid-column: span 7; }
.kf-head h3 { font-size: 1.28rem; line-height: 1.25; margin: 10px 0 8px; }
.kf-head p { margin: 0; color: var(--muted); font-size: .98rem; }
.kf-tag { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.kf-tag--blue   { background: #e2eefb; color: #24549a; }
.kf-tag--amber  { background: #fdf0d5; color: #9a6208; }
.kf-tag--green  { background: #dff5e8; color: #16703c; }
.kf-tag--violet { background: #ece8fb; color: #4b3aa8; }
.kf-tag--red    { background: #fde5e6; color: #b3282d; }
.kf-vis { margin-top: auto; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.kf-svg-label { font-family: var(--font-body); font-size: 11px; font-weight: 600; fill: #5f7183; }
.kf-svg-big { font-family: var(--font-head); font-size: 20px; font-weight: 800; fill: #0c2340; }

/* --- 1. Плащане --- */
.kf-pay { display: grid; grid-template-columns: minmax(200px, 250px) 1fr; gap: 22px; align-items: center; }
.kf-pay__phone { background: #fff; border-radius: 16px; padding: 16px; box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.kf-pay__row { display: flex; justify-content: space-between; align-items: baseline; font-size: .85rem; color: var(--muted); }
.kf-pay__row b { font-family: var(--font-head); font-size: 1.5rem; color: var(--brand-900); }
.kf-pay__lines { margin: 12px 0; display: grid; gap: 7px; }
.kf-pay__lines i { height: 7px; border-radius: 4px; background: #e9eff6; }
.kf-pay__lines i:last-child { width: 62%; }
.kf-pay__btn { position: relative; height: 42px; border-radius: 11px; background: var(--brand-600); color: #fff; font-weight: 700; font-size: .92rem; display: grid; place-items: center; overflow: hidden; }
.kf-pay__btn span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; }
.kf-pay__btn svg { width: 16px; height: 16px; }
.kf-pay__btn-b { opacity: 0; }
.kf-pay__receipt { margin-top: 11px; display: flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; color: #16703c; opacity: 0; }
.kf-pay__receipt svg { width: 16px; height: 16px; }
.kf-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kf-logo { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 11px; height: 52px; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.kf-logo svg { width: 78%; height: 78%; }
.is-in .kf-logo { animation: kf-pop .5s var(--ease) both; animation-delay: calc(var(--n, 0) * .08s + .2s); }
.kf-logo:nth-child(1) { --n: 0; } .kf-logo:nth-child(2) { --n: 1; } .kf-logo:nth-child(3) { --n: 2; }
.kf-logo:nth-child(4) { --n: 3; } .kf-logo:nth-child(5) { --n: 4; } .kf-logo:nth-child(6) { --n: 5; }
.is-in .kf-pay__btn { animation: kf-btn 6s infinite; }
.is-in .kf-pay__btn-a { animation: kf-fade-out 6s infinite; }
.is-in .kf-pay__btn-b { animation: kf-fade-in 6s infinite; }
.is-in .kf-pay__receipt { animation: kf-receipt 6s infinite; }
@keyframes kf-btn { 0%,40% { background: var(--brand-600); transform: scale(1); } 32% { transform: scale(.96); } 48%,92% { background: #16a34a; } 100% { background: var(--brand-600); } }
@keyframes kf-fade-out { 0%,40% { opacity: 1; } 46%,94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes kf-fade-in  { 0%,40% { opacity: 0; } 46%,92% { opacity: 1; } 98%,100% { opacity: 0; } }
@keyframes kf-receipt  { 0%,50% { opacity: 0; transform: translateY(6px); } 60%,92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes kf-pop { from { opacity: 0; transform: scale(.7) translateY(8px); } to { opacity: 1; transform: none; } }

/* --- 2. Такси --- */
.kf-taxes { display: grid; gap: 13px; }
.kf-taxes__row { display: grid; grid-template-columns: 112px 1fr 58px; gap: 10px; align-items: center; font-size: .82rem; color: var(--ink-soft); }
.kf-taxes__row em { display: block; height: 10px; border-radius: 6px; background: #e4ecf5; overflow: hidden; }
.kf-taxes__row i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); }
.kf-taxes__row b { text-align: right; font-family: var(--font-head); color: var(--brand-900); }
.kf-taxes__foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 9px 12px; border-radius: 10px; background: #e7f7ee; color: #15803d; font-size: .8rem; font-weight: 700; }
.kf-taxes__foot svg { width: 16px; height: 16px; flex: none; }
.is-in .kf-taxes__row i { animation: kf-grow 1.3s var(--ease) both; animation-delay: var(--d); }
.is-in .kf-taxes__foot { animation: kf-rise .6s var(--ease) 1.4s both; }
@keyframes kf-grow { from { width: 0; } to { width: var(--w); } }
@keyframes kf-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- 3. Отчети --- */
.kf-chart svg { width: 100%; height: auto; display: block; }
.kf-bar { transform-box: fill-box; transform-origin: bottom; }
.kf-bar--in { fill: #2f6cc0; } .kf-bar--out { fill: #b9cde6; }
.kf-trend { stroke-dasharray: 1; stroke-dashoffset: 0; }
.is-in .kf-bar { animation: kf-bar 1s var(--ease) both; animation-delay: var(--d); }
.is-in .kf-trend { animation: kf-draw 1.6s var(--ease) .5s both; }
@keyframes kf-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes kf-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.kf-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; font-size: .78rem; color: var(--muted); }
.kf-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.kf-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.kf-dot--in { background: #2f6cc0; } .kf-dot--out { background: #b9cde6; }
.kf-pill { padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); font-weight: 600; color: var(--brand-800); }

/* --- 4. Общо събрание --- */
.kf-assembly svg { width: 100%; height: auto; display: block; }
.kf-flow { stroke-dasharray: 6 7; }
.is-in .kf-flow { animation: kf-march 1s linear infinite; }
.is-in .kf-ring { animation: kf-ring 1.6s var(--ease) .2s both; }
.is-in .kf-vote rect { transform-box: fill-box; transform-origin: left; animation: kf-scalex 1.1s var(--ease) .9s both; }
@keyframes kf-march { to { stroke-dashoffset: -26; } }
@keyframes kf-ring { from { stroke-dasharray: 0 100; } }
@keyframes kf-scalex { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --- 5. Регистър --- */
.kf-tiles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.kf-tiles i { aspect-ratio: 1; border-radius: 5px; background: #cfe0f4; }
.kf-tiles i.b { background: #5b93d6; } .kf-tiles i.c { background: #2f6cc0; }
.kf-tiles i.d { background: #f5c56b; } .kf-tiles i.e { background: #a6b9d0; }
.is-in .kf-tiles i { animation: kf-pop .45s var(--ease) both; animation-delay: calc(var(--i) * .03s); }
.kf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.kf-chips span { font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); color: var(--brand-800); }

/* --- 6. Сигнали --- */
.kf-ticket { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 11px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
.kf-ticket svg { width: 20px; height: 20px; color: #e5484d; flex: none; }
.kf-steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 26px; text-align: center; font-size: .76rem; font-weight: 600; color: var(--muted); }
.kf-steps__line { position: absolute; top: 8px; left: 16.6%; right: 16.6%; height: 4px; border-radius: 2px; background: #dbe6f3; overflow: hidden; }
.kf-steps__line i { display: block; height: 100%; width: 100%; background: #16a34a; transform-origin: left; }
.kf-step { position: relative; z-index: 1; }
.kf-step b { display: block; width: 20px; height: 20px; margin: 0 auto 8px; border-radius: 50%; background: #fff; border: 3px solid #b9cde6; }
.is-in .kf-steps__line i { animation: kf-line 5s infinite; }
.is-in .kf-step b { animation: kf-node 5s infinite; animation-delay: calc(var(--i) * 1.2s); }
@keyframes kf-line { 0% { transform: scaleX(0); } 55%,90% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes kf-node { 0%,5% { border-color: #b9cde6; background: #fff; } 12%,90% { border-color: #16a34a; background: #16a34a; } 100% { border-color: #b9cde6; background: #fff; } }

/* --- 7. Известия --- */
.kf-notify { position: relative; height: 210px; display: grid; place-items: center; overflow: hidden; }
.kf-bell { position: relative; z-index: 2; width: 62px; height: 62px; border-radius: 50%; background: var(--brand-600); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(47,108,192,.35); }
.kf-bell svg { width: 30px; height: 30px; transform-origin: 50% 10%; }
.kf-ripple { position: absolute; width: 62px; height: 62px; border-radius: 50%; border: 2px solid var(--brand-400); opacity: 0; }
.kf-ch { position: absolute; z-index: 2; font-size: .74rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); color: var(--brand-800); box-shadow: var(--shadow-sm); }
.kf-ch--1 { top: 16px; left: 14%; } .kf-ch--2 { top: 26px; right: 12%; }
.kf-ch--3 { bottom: 22px; left: 10%; } .kf-ch--4 { bottom: 16px; right: 16%; }
.is-in .kf-ripple { animation: kf-ripple 2.8s ease-out infinite; }
.is-in .kf-ripple--2 { animation-delay: 1.4s; }
.is-in .kf-bell svg { animation: kf-ring-bell 2.8s infinite; }
.is-in .kf-ch { animation: kf-float 3.6s ease-in-out infinite; }
.is-in .kf-ch--2 { animation-delay: .5s; } .is-in .kf-ch--3 { animation-delay: 1s; } .is-in .kf-ch--4 { animation-delay: 1.5s; }
@keyframes kf-ripple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.6); opacity: 0; } }
@keyframes kf-ring-bell { 0%,60%,100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-12deg); } 30% { transform: rotate(8deg); } 40% { transform: rotate(-5deg); } }
@keyframes kf-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* --- 8. Терминал --- */
.kf-term { display: grid; place-items: center; padding: 14px; }
.kf-term svg { width: 100%; max-width: 340px; height: auto; }
.kf-sign { stroke-dasharray: 1; stroke-dashoffset: 0; }
.is-in .kf-sign { animation: kf-sign 5s infinite; }
.is-in .kf-signed { animation: kf-signed 5s infinite; }
@keyframes kf-sign { 0% { stroke-dashoffset: 1; } 45%,92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes kf-signed { 0%,48% { opacity: 0; transform: translateY(6px); } 58%,92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.kf-signed { transform-box: fill-box; }

/* --- 9. Портал --- */
.kf-portal { display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: center; }
.kf-portal__donut { position: relative; width: 116px; height: 116px; }
.kf-portal__donut svg { width: 100%; height: 100%; display: block; }
.kf-portal__donut span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: .7rem; color: var(--muted); line-height: 1.15; }
.kf-portal__donut b { font-family: var(--font-head); font-size: 1.3rem; color: var(--brand-900); }
.is-in .kf-portal .kf-ring { animation: kf-ring 1.6s var(--ease) .2s both; }
.kf-portal__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kf-portal__list li { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.kf-portal__list em { font-style: normal; font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e2eefb; color: #24549a; white-space: nowrap; }
.kf-portal__list em.ok { background: #dff5e8; color: #16703c; }
.is-in .kf-portal__list li { animation: kf-slide .55s var(--ease) both; animation-delay: calc(var(--i) * .18s + .3s); }
@keyframes kf-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* --- Платформи --- */
.kf-platforms { margin-top: clamp(32px, 5vw, 52px); text-align: center; }
.kf-platforms__title { font-family: var(--font-head); font-weight: 700; color: var(--brand-900); font-size: 1.05rem; margin: 0 0 18px; }
.kf-platforms ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; }
.kf-platforms li { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
.kf-plat { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-tint); color: var(--brand-700); border: 1px solid var(--brand-200); }
.kf-plat svg { width: 28px; height: 28px; }
.kf-platforms.is-in .kf-plat { animation: kf-float 4s ease-in-out infinite; }
.kf-platforms.is-in li:nth-child(2) .kf-plat { animation-delay: .4s; } .kf-platforms.is-in li:nth-child(3) .kf-plat { animation-delay: .8s; }
.kf-platforms.is-in li:nth-child(4) .kf-plat { animation-delay: 1.2s; } .kf-platforms.is-in li:nth-child(5) .kf-plat { animation-delay: 1.6s; }
.kf-note { margin: 22px auto 0; max-width: 680px; font-size: .74rem; color: var(--muted); }

/* --- Респонсив --- */
@media (max-width: 1020px) {
    .kf-card--4 { grid-column: span 6; }
    .kf-card--5, .kf-card--6, .kf-card--7 { grid-column: span 12; }
    .kf-card--4:nth-of-type(7) { grid-column: span 12; }
}
@media (max-width: 720px) {
    .kf-card, .kf-card--4 { grid-column: span 12; }
    .kf-pay { grid-template-columns: minmax(0, 1fr); }
    .kf-portal { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    .kf-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .kf-portal__list { width: 100%; }
    .kf-taxes__row { grid-template-columns: 96px 1fr 54px; }
}

@media (prefers-reduced-motion: reduce) {
    .kf *, .kf *::before, .kf *::after { animation: none !important; }
    .kf-pay__btn-b, .kf-pay__receipt { opacity: 1; }
    .kf-pay__btn-a { display: none; }
}

/* ==========================================================================
   Hero — интерактивна схема на процеса (.hf)
   Пътека с движещи се пунктири, „пакет", който пътува между стъпките,
   кликаеми възли и панел с обяснение. Управлява се от assets/js/hero-flow.js.
   ========================================================================== */
.hf { width: 100%; max-width: 580px; margin-inline: auto; }
.hf__stage { position: relative; aspect-ratio: 560 / 300; }
.hf__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hf__track { stroke: rgba(255,255,255,.22); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2.2 2.2; animation: hf-march 1.2s linear infinite; }
.hf__done { stroke: var(--brand-400); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .9s var(--ease); filter: drop-shadow(0 0 6px rgba(91,147,214,.7)); }
.hf__packet { fill: var(--accent-500); filter: drop-shadow(0 0 8px rgba(245,166,35,.9)); }
@keyframes hf-march { to { stroke-dashoffset: -8.8; } }

.hf__node {
    position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: #b7cbe0;
    -webkit-tap-highlight-color: transparent;
}
.hf__icon {
    position: relative; width: clamp(50px, 12.5vw, 68px); aspect-ratio: 1; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.2); color: #dbe8f7;
    transition: transform .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.hf__icon svg { width: 52%; height: 52%; }
.hf__label { position: absolute; top: 100%; margin-top: 8px; white-space: nowrap; font-size: .76rem; font-weight: 600; color: #a9c0da; transition: color .3s; }
.hf__node:hover .hf__icon { transform: scale(1.1); border-color: var(--brand-400); }
.hf__node:focus-visible .hf__icon { outline: 3px solid var(--accent-500); outline-offset: 3px; }
.hf__node.is-done .hf__icon { background: rgba(91,147,214,.22); border-color: var(--brand-400); color: #fff; }
.hf__node.is-active .hf__icon { background: var(--brand-600); border-color: #fff; color: #fff; transform: scale(1.14); box-shadow: 0 0 0 0 rgba(91,147,214,.6); animation: hf-pulse 1.8s ease-out infinite; }
.hf__node.is-active .hf__label, .hf__node.is-done .hf__label { color: #fff; }
@keyframes hf-pulse { 0% { box-shadow: 0 0 0 0 rgba(91,147,214,.65); } 100% { box-shadow: 0 0 0 20px rgba(91,147,214,0); } }

.hf__panel { position: relative; margin-top: 46px; padding: 20px 22px 24px; border-radius: var(--radius-lg); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); overflow: hidden; min-height: 178px; }
.hf__item { animation: hf-in .5s var(--ease) both; }
.hf__item[hidden] { display: none; }
.hf__num { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-500); margin-bottom: 6px; }
.hf__item h3 { color: #fff; font-size: 1.15rem; margin: 0 0 6px; }
.hf__item p { margin: 0 0 12px; font-size: .92rem; color: #b7cbe0; }
.hf__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.hf__chips span { font-size: .74rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #e4eefa; }
.hf__chips .hf__amount { background: var(--accent-500); border-color: var(--accent-500); color: #2b1a00; font-family: var(--font-head); }
.hf__chips .hf__ok { background: rgba(22,163,74,.25); border-color: rgba(74,222,128,.5); color: #b9f5d0; }
.hf__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.08); }
.hf__bar i { display: block; height: 100%; width: 100%; background: var(--brand-400); transform-origin: left; transform: scaleX(0); }
.hf.is-playing .hf__bar i { animation: hf-bar var(--hf-dur, 3.6s) linear forwards; }
@keyframes hf-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hf-bar { to { transform: scaleX(1); } }

@media (max-width: 480px) {
    .hf__label { font-size: .66rem; }
    .hf__panel { margin-top: 40px; padding: 16px 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .hf__track, .hf__node.is-active .hf__icon, .hf__item { animation: none; }
    .hf__done { transition: none; }
    .hf.is-playing .hf__bar i { animation: none; }
}

/* ==========================================================================
   „Как работи" — интерактивна схема на свързаната система (.hc)
   Карти на приложенията около хъб; „пакети данни" тичат в двете посоки.
   Управлява се от assets/js/connected.js.
   ========================================================================== */
.hc { width: 100%; max-width: 700px; margin: 36px auto 0; text-align: center; }
.hc__stage { position: relative; aspect-ratio: 620 / 400; }
.hc__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hc__link { stroke: rgba(91,147,214,.55); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 8; animation: hc-march 1.4s linear infinite; transition: stroke .3s, stroke-width .3s; }
.hc__link.is-active { stroke: #9fc9f5; stroke-width: 3.5; filter: drop-shadow(0 0 6px rgba(91,147,214,.9)); }
@keyframes hc-march { to { stroke-dashoffset: -20; } }

.hc__hub { position: absolute; left: 50%; top: 50%; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; }
.hc__core { position: relative; z-index: 2; width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, #2f6cc0, #1a3f77); box-shadow: 0 14px 34px rgba(4,18,42,.55); display: grid; grid-template-columns: repeat(3, 1fr); gap: 7%; padding: 27%; }
.hc__core i { border-radius: 50%; background: #fff; }
.hc__core i:nth-child(n+4):nth-child(-n+6) { background: #a8caf0; }
.hc__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(91,147,214,.6); animation: hc-ring 3s ease-out infinite; }
.hc__ring--2 { animation-delay: 1.5s; }
@keyframes hc-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.1); opacity: 0; } }
.hc__hub em { position: absolute; top: calc(100% + 8px); font-style: normal; font-family: var(--font-head); font-weight: 800; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: #9fc0e6; }

.hc__card {
    position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 31%;
    display: flex; align-items: center; gap: 12px; padding: 14px 14px; text-align: left;
    background: #fff; border: 2px solid transparent; border-radius: 16px; cursor: pointer; font: inherit; color: var(--ink);
    box-shadow: 0 12px 30px rgba(4,18,42,.42);
    transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
    -webkit-tap-highlight-color: transparent;
}
.hc__card:hover { transform: translate(-50%, -50%) scale(1.04); }
.hc__card:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 3px; }
.hc__card.is-active { border-color: var(--accent-500); box-shadow: 0 0 0 5px rgba(245,166,35,.22), 0 16px 36px rgba(4,18,42,.5); transform: translate(-50%, -50%) scale(1.05); }
.hc__ico { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.hc__ico svg { width: 24px; height: 24px; }
.hc__card--m .hc__ico { background: #e2eefb; color: #2f6cc0; }
.hc__card--p .hc__ico { background: #e8f2fc; color: #5b93d6; }
.hc__txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.hc__txt b { font-family: var(--font-head); font-size: .95rem; color: var(--ink); }
.hc__txt small { font-size: .74rem; color: var(--muted); margin-top: 3px; }

.hc__chips { position: absolute; inset: 0; pointer-events: none; }
.hc__chip { position: absolute; left: 0; top: 0; font-size: .68rem; font-weight: 700; white-space: nowrap; padding: 3px 9px; border-radius: 999px; will-change: transform, opacity; opacity: 0; }
.hc__chip--out { background: var(--accent-500); color: #2b1a00; }
.hc__chip--in { background: #fff; color: var(--brand-800); }

.hc__panel { margin-top: 26px; padding: 20px 24px 22px; border-radius: var(--radius-lg); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); min-height: 150px; text-align: center; }
.hc__item { animation: hf-in .5s var(--ease) both; }
.hc__item[hidden] { display: none; }
.hc__item h3 { margin: 0 0 6px; font-size: 1.15rem; color: #fff; }
.hc__item p { margin: 0 auto 12px; max-width: 560px; font-size: .94rem; color: #b7cbe0; }
.hc__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.hc__tags span { font-size: .74rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #e4eefa; }

@media (max-width: 560px) {
    .hc__card { width: 39%; padding: 9px 9px; gap: 8px; border-radius: 12px; }
    .hc__ico { width: 28px; height: 28px; border-radius: 8px; }
    .hc__ico svg { width: 17px; height: 17px; }
    .hc__txt b { font-size: .72rem; }
    .hc__txt small { display: none; }
    .hc__hub { width: 17%; }
    .hc__hub em { font-size: .6rem; }
    .hc__chip { font-size: .58rem; padding: 2px 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .hc__link, .hc__ring, .hc__item { animation: none; }
    .hc__chips { display: none; }
}

/* ---------- Тултипове в менюто ---------- */
.nav-tip {
    position: fixed; z-index: 1000; max-width: 270px; padding: 12px 15px 13px;
    background: var(--brand-900); color: #c6d6ea; border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12); box-shadow: 0 16px 40px rgba(7,26,51,.35);
    font-size: .85rem; line-height: 1.45; pointer-events: none;
    opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center;
    transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.nav-tip.is-visible { opacity: 1; transform: none; }
.nav-tip::before {
    content: ""; position: absolute; top: -6px; left: var(--arrow-x, 50%); width: 12px; height: 12px;
    background: var(--brand-900); border-left: 1px solid rgba(255,255,255,.12); border-top: 1px solid rgba(255,255,255,.12);
    transform: translateX(-50%) rotate(45deg);
}
/* балонче вляво от вертикалния етикет „Вход в клиентски портал“ — стрелката сочи надясно */
.nav-tip--left { transform: translateX(6px) scale(.98); transform-origin: center right; }
.nav-tip--left.is-visible { transform: none; }
.nav-tip--left::before { top: var(--arrow-y, 50%); left: auto; right: -6px; border-left: 0; border-right: 1px solid rgba(255,255,255,.12); transform: translateY(-50%) rotate(45deg); }
.nav-tip strong { display: block; font-family: var(--font-head); font-size: .9rem; color: #fff; margin-bottom: 3px; }
.nav-tip strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-500); margin-right: 8px; vertical-align: 1px; }
@media (max-width: 900px) { .nav-tip { display: none; } }
@media (prefers-reduced-motion: reduce) { .nav-tip { transition: none; transform: none; } }

/* ==========================================================================
   Статистика — интерактивни карти (.st). Управлява се от assets/js/stats.js
   ========================================================================== */
.st-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.st {
    position: relative; overflow: hidden; text-align: center; cursor: pointer; outline: none;
    padding: 26px 18px 24px; border-radius: var(--radius-lg);
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
    transition: transform .3s var(--ease), border-color .3s, background .3s, box-shadow .3s;
}
.st:hover, .st:focus-visible, .st.is-open { transform: translateY(-5px); border-color: var(--brand-400); background: rgba(255,255,255,.08); box-shadow: 0 18px 40px rgba(4,18,42,.45); }
.st:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 3px; }
.st__vis { height: 60px; margin: 0 auto 14px; display: flex; align-items: flex-end; justify-content: center; }
.st__num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.2rem, 4.2vw, 3rem); color: #fff; line-height: 1; letter-spacing: -.03em; }
.st__label { margin-top: 8px; font-size: .95rem; color: #a9c0da; }
.st__more {
    position: absolute; inset: 0; margin: 0; padding: 18px 18px; display: grid; place-content: center;
    background: linear-gradient(160deg, var(--brand-600), var(--brand-800)); color: #fff; font-size: .92rem; line-height: 1.5;
    opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.st:hover .st__more, .st:focus-visible .st__more, .st.is-open .st__more { opacity: 1; transform: none; }

/* визуални елементи */
.st__vis svg { width: 120px; height: 60px; overflow: visible; }
.st-lines path { stroke: rgba(91,147,214,.6); stroke-width: 1.6; stroke-dasharray: 2 4; animation: hc-march 1.4s linear infinite; }
.st-hub { fill: var(--brand-600); stroke: #9fc9f5; stroke-width: 1.5; }
.st-node { fill: #fff; }
.st-band.is-in .st-node { animation: st-blink 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * .5s); }
@keyframes st-blink { 0%,100% { fill: #fff; r: 5.5; } 20% { fill: var(--accent-500); r: 7.5; } 40% { fill: #fff; r: 5.5; } }
.st:hover .st-node { fill: var(--accent-500); }

.st__vis--mods { display: grid; grid-template-columns: repeat(10, 10px); gap: 5px; align-content: end; justify-content: center; height: 60px; }
.st__vis--mods i { display: block; width: 10px; height: 10px; border-radius: 3px; background: rgba(255,255,255,.16); }
.st-band.is-in .st__vis--mods i { animation: st-mod 3.6s ease infinite; animation-delay: calc(var(--i) * .07s); }
@keyframes st-mod { 0%,8% { background: rgba(255,255,255,.16); transform: scale(.8); } 20%,70% { background: var(--brand-400); transform: scale(1); } 100% { background: rgba(255,255,255,.16); transform: scale(.8); } }
.st:hover .st__vis--mods i { background: var(--accent-500); }

.st__vis--blds { gap: 5px; }
.st__vis--blds i { display: block; width: 14px; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--brand-400), var(--brand-600)); transform-origin: bottom; }
.st__vis--blds b { align-self: center; margin-left: 4px; font-family: var(--font-head); font-size: 1.7rem; color: var(--accent-500); line-height: 1; }
.st-band.is-in .st__vis--blds i { animation: st-bld 3.6s var(--ease) infinite; animation-delay: calc(var(--i) * .16s); }
.st-band.is-in .st__vis--blds b { animation: st-inf 3.6s ease infinite; }
@keyframes st-bld { 0% { transform: scaleY(0); } 25%,85% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
@keyframes st-inf { 0%,40% { opacity: 0; transform: scale(.4); } 60%,85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.st__arrow { color: var(--brand-400); }
.st__inf { color: var(--accent-500); }

.st-ring { stroke: var(--brand-400); }
.st-band.is-in .st-ring { animation: st-ring 3.6s var(--ease) infinite; }
@keyframes st-ring { 0% { stroke-dasharray: 0 100; } 45%,88% { stroke-dasharray: 100 100; } 100% { stroke-dasharray: 0 100; } }
.st__vis--ring svg { width: 60px; }
.st:hover .st-ring { stroke: var(--accent-500); }

@media (max-width: 900px) { .st-band { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
    .st-lines path, .st-node, .st__vis--mods i, .st__vis--blds i, .st__vis--blds b, .st-ring { animation: none !important; }
    .st__vis--mods i { background: var(--brand-400); transform: none; }
    .st__vis--blds i, .st__vis--blds b { transform: none; opacity: 1; }
    .st-ring { stroke-dasharray: 100 100; }
}

/* ==========================================================================
   Мобилни приложения (начална страница) — оживени телефони (.phones--live)
   Носене, наклон, блясък по екрана, изскачащи известия, 3D реакция към мишката.
   ========================================================================== */
.section--clip { overflow-x: clip; }
.phones--live { position: relative; perspective: 1300px; gap: 34px; flex-wrap: nowrap; padding: 30px 0 46px; }
.phones__glow {
    position: absolute; left: 50%; top: 50%; width: 118%; aspect-ratio: 1; transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(91,147,214,.42), rgba(47,108,192,.16) 55%, transparent 72%);
    animation: ph-glow 6s ease-in-out infinite; pointer-events: none;
}
@keyframes ph-glow { 0%,100% { opacity: .65; transform: translate(-50%,-50%) scale(.92); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.06); } }

.phone-wrap { position: relative; z-index: 1; transform-style: preserve-3d; }
.phone-wrap--a { animation: ph-float-a 6.5s ease-in-out infinite; }
.phone-wrap--b { animation: ph-float-b 6.5s ease-in-out infinite; margin-top: 56px; }
@keyframes ph-float-a { 0%,100% { transform: translateY(0) rotate(-3.5deg); } 50% { transform: translateY(-18px) rotate(-1.5deg); } }
@keyframes ph-float-b { 0%,100% { transform: translateY(-14px) rotate(3.5deg); } 50% { transform: translateY(6px) rotate(1.5deg); } }
.phones--live .phone {
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .25s var(--ease), box-shadow .25s;
    box-shadow: 0 30px 70px rgba(4,18,42,.55), 0 0 0 1px rgba(255,255,255,.08);
}
.phones--live .phone-wrap--b .phone { transition-duration: .35s; }
.phones--live.is-tilting .phone { transition-duration: .08s; }

.phone__screen { position: relative; }
.phone__shine {
    position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.34) 50%, transparent 62%);
    transform: translateX(-130%); animation: ph-shine 6s ease-in-out infinite;
}
.phone-wrap--b .phone__shine { animation-delay: 3s; }
@keyframes ph-shine { 0%,55% { transform: translateX(-130%); } 80%,100% { transform: translateX(130%); } }

.ph-chip {
    position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    padding: 9px 14px; border-radius: 999px; background: #fff; color: var(--ink);
    font-size: .8rem; font-weight: 700; box-shadow: 0 14px 30px rgba(4,18,42,.4);
    opacity: 0; transform: translateY(10px) scale(.7); transform-origin: left center;
    animation: ph-chip 9s ease-in-out infinite;
}
.ph-chip i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-100); font-size: .72rem; }
.ph-chip--ok i { background: #16a34a; color: #fff; }
.ph-chip--1 { left: -34%; top: 22%; animation-delay: .4s; }
.ph-chip--2 { right: -30%; top: 58%; animation-delay: 4.6s; transform-origin: right center; }
.ph-chip--3 { right: -34%; top: 14%; animation-delay: 2.2s; transform-origin: right center; }
.ph-chip--4 { left: -30%; top: 64%; animation-delay: 6.6s; }
@keyframes ph-chip {
    0%   { opacity: 0; transform: translateY(14px) scale(.7); }
    6%   { opacity: 1; transform: translateY(0) scale(1.06); }
    9%   { transform: scale(1); }
    30%  { opacity: 1; transform: translateY(-6px); }
    38%  { opacity: 0; transform: translateY(-16px) scale(.96); }
    100% { opacity: 0; transform: translateY(-16px) scale(.96); }
}

@media (max-width: 720px) {
    .phones--live { gap: 12px; padding-bottom: 34px; }
    .phones--live .phone { width: min(44vw, 240px); }
    .ph-chip { font-size: .68rem; padding: 6px 10px; }
    .ph-chip--1 { left: -6%; } .ph-chip--2 { right: -6%; } .ph-chip--3 { right: -6%; } .ph-chip--4 { left: -6%; }
}
@media (prefers-reduced-motion: reduce) {
    .phone-wrap--a, .phone-wrap--b, .phones__glow, .phone__shine { animation: none; }
    .phone-wrap--a { transform: rotate(-3deg); } .phone-wrap--b { transform: rotate(3deg); }
    .ph-chip { animation: none; opacity: 1; transform: none; }
    .ph-chip--2, .ph-chip--4 { display: none; }
    .phones--live .phone { transform: none !important; }
}

/* ==========================================================================
   Страници iM Manager / iM Portal — общи интерактивни компоненти
   .mh (таб-витрина), .gal (галерия), .mx (карта на модулите), .role, .flow-steps
   Управляват се от assets/js/tabs.js и assets/js/modules.js
   ========================================================================== */

/* --- Таб-витрина в hero-то (.mh) --- */
.mh { width: 100%; max-width: 600px; margin-inline: auto; background: #fff; color: var(--ink); text-align: left; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.16); }
.mh__bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #f2f5f9; border-bottom: 1px solid var(--line); }
.mh__bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfd8e3; display: block; }
.mh__bar i:nth-child(1) { background: #ff5f57; } .mh__bar i:nth-child(2) { background: #febc2e; } .mh__bar i:nth-child(3) { background: #28c840; }
.mh__bar span { margin-left: 10px; flex: 1; font-size: .72rem; color: var(--muted); background: #fff; padding: 3px 12px; border-radius: 6px; border: 1px solid var(--line-2); }
.mh__tabs { display: flex; gap: 4px; padding: 10px 12px 0; overflow-x: auto; scrollbar-width: none; background: #fff; border-bottom: 1px solid var(--line); }
.mh__tabs::-webkit-scrollbar { display: none; }
.mh__tab { position: relative; border: 0; background: none; font: 600 .85rem var(--font-body); color: var(--muted); padding: 9px 14px 11px; border-radius: 10px 10px 0 0; cursor: pointer; white-space: nowrap; transition: color .2s, background .2s; }
.mh__tab:hover { color: var(--brand-700); }
.mh__tab.is-active { color: var(--brand-700); background: var(--bg-soft); }
.mh__tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-600); }
.mh__tab:focus-visible { outline: 3px solid var(--accent-500); outline-offset: -3px; }
.mh__body { background: var(--bg-soft); padding: 16px; min-height: 318px; }
.mh__pane[hidden] { display: none; }
.mh__pane { animation: hf-in .45s var(--ease) both; }
.mh__pane .kf-vis { background: #fff; margin-top: 0; }
.mh__cap { margin: 12px 4px 0; font-size: .84rem; color: var(--ink-soft); }
.mh__cap b { color: var(--brand-800); }
.mh__prog { height: 3px; background: var(--line); }
.mh__prog i { display: block; height: 100%; background: var(--brand-600); transform-origin: left; transform: scaleX(0); }
.mh.is-playing .mh__prog i { animation: hf-bar var(--tab-dur, 4.2s) linear forwards; }
@media (max-width: 560px) { .mh__body { padding: 12px; min-height: 300px; } .mh__tab { padding: 8px 11px 10px; font-size: .8rem; } }

/* --- Галерия със скрийншоти (.gal) --- */
.gal { max-width: 980px; margin-inline: auto; }
.gal__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.gal__tab { border: 1px solid var(--line-2); background: #fff; color: var(--ink-soft); font: 600 .88rem var(--font-body); padding: 9px 17px; border-radius: 999px; cursor: pointer; transition: all .2s var(--ease); }
.gal__tab:hover { border-color: var(--brand-400); color: var(--brand-700); transform: translateY(-2px); }
.gal__tab.is-active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 8px 20px rgba(47,108,192,.3); }
.gal__tab:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 2px; }
.gal__pane[hidden] { display: none; }
.gal__pane { margin: 0; animation: hf-in .5s var(--ease) both; }
.gal__pane img { display: block; width: 100%; height: auto; }
.gal__cap { margin: 18px auto 0; max-width: 680px; text-align: center; color: var(--muted); font-size: .98rem; }
.gal__cap b { color: var(--ink); }

/* --- Карта на модулите (.mx) --- */
.mx__tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.mx__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.mx__f { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-soft); font: 600 .84rem var(--font-body); padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: all .2s var(--ease); }
.mx__f em { font-style: normal; font-size: .72rem; background: var(--bg-tint); color: var(--brand-700); padding: 1px 8px; border-radius: 999px; }
.mx__f:hover { border-color: var(--brand-400); color: var(--brand-700); }
.mx__f.is-active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.mx__f.is-active em { background: rgba(255,255,255,.22); color: #fff; }
.mx__f:focus-visible, .mx__search input:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 2px; }
.mx__search input { font: 500 .9rem var(--font-body); padding: 9px 16px 9px 38px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7183' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center / 17px; width: 240px; max-width: 100%; color: var(--ink); }
.mx__layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 26px; align-items: start; }
.mx__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.mx__tile { display: flex; flex-direction: column; gap: 8px; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 15px 15px; cursor: pointer; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s, background .25s; animation: kf-pop .4s var(--ease) both; outline: none; }
.mx__tile:hover { transform: translateY(-4px); border-color: var(--brand-200); box-shadow: var(--shadow-md); }
.mx__tile:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 2px; }
.mx__tile.is-active { border-color: var(--brand-600); background: linear-gradient(180deg, #fff, var(--brand-50)); box-shadow: 0 0 0 4px rgba(47,108,192,.14), var(--shadow-md); }
.mx__tile[hidden] { display: none; }
.mx__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-tint); color: var(--brand-600); transition: background .25s, color .25s, transform .25s var(--ease); }
.mx__ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mx__tile:hover .mx__ico { transform: rotate(-6deg) scale(1.06); }
.mx__tile.is-active .mx__ico { background: var(--brand-600); color: #fff; }
.mx__tile h3 { font-size: .98rem; margin: 2px 0 0; line-height: 1.25; }
.mx__tile p { font-size: .82rem; color: var(--muted); margin: 0; line-height: 1.42; }
.mx__more { display: none; }

.mx__spot { position: sticky; top: 92px; padding: 28px; border-radius: 24px; color: #c6d6ea; background: radial-gradient(500px 260px at 100% 0%, rgba(91,147,214,.35), transparent 60%), linear-gradient(160deg, var(--brand-900), var(--brand-800)); box-shadow: var(--shadow-lg); overflow: hidden; min-height: 340px; }
.mx__spot-in { animation: hf-in .45s var(--ease) both; }
.mx__spot-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; margin-bottom: 16px; animation: kf-float 4s ease-in-out infinite; }
.mx__spot-ico svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mx__spot-cat { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-500); margin-bottom: 6px; }
.mx__spot h3 { color: #fff; font-size: 1.4rem; margin: 0 0 10px; }
.mx__spot-desc { margin: 0 0 16px; font-size: .96rem; color: #c6d6ea; }
.mx__pts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 9px; }
.mx__pts li { margin: 0; position: relative; padding-left: 26px; font-size: .9rem; color: #e4eefa; }
.mx__pts li::before { content: ""; position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: rgba(22,163,74,.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") no-repeat center / 11px; }
.mx__rel-t { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: #8aa6c6; margin-bottom: 8px; }
.mx__rel { display: flex; flex-wrap: wrap; gap: 7px; }
.mx__rel button { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #e4eefa; font: 600 .78rem var(--font-body); padding: 5px 12px; border-radius: 999px; cursor: pointer; transition: background .2s, transform .2s; }
.mx__rel button:hover { background: var(--brand-600); transform: translateY(-2px); }
.mx__empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 30px 10px; }

@media (max-width: 1000px) {
    .mx__layout { grid-template-columns: minmax(0, 1fr); }
    .mx__spot { display: none; }
    .mx__grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .mx__tile.is-active { grid-column: 1 / -1; }
    .mx__tile.is-active .mx__more { display: grid; gap: 10px; margin-top: 4px; }
    .mx__more .mx__d { font-size: .86rem; color: var(--ink-soft); }
    .mx__more .mx__p { display: grid; gap: 6px; font-size: .84rem; color: var(--ink-soft); }
    .mx__more .mx__p span { position: relative; padding-left: 20px; }
    .mx__more .mx__p span::before { content: "✓"; position: absolute; left: 0; color: #16a34a; font-weight: 800; }
}

/* --- Карти на ролите (.role) --- */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.role { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 24px 26px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; outline: none; }
.role::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); transform: scaleX(.18); transform-origin: left; transition: transform .5s var(--ease); }
.role:hover, .role:focus-visible { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.role:hover::before, .role:focus-visible::before { transform: scaleX(1); }
.role__ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-tint); color: var(--brand-600); margin-bottom: 16px; transition: background .3s, color .3s, transform .3s var(--ease); }
.role__ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.role:hover .role__ico, .role:focus-visible .role__ico { background: var(--brand-600); color: #fff; transform: rotate(-6deg) scale(1.08); }
.role h3 { font-size: 1.2rem; margin: 0 0 8px; }
.role > p { color: var(--muted); font-size: .96rem; margin: 0 0 14px; }
.role ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.role li { margin: 0; position: relative; padding-left: 24px; font-size: .9rem; color: var(--ink-soft); opacity: .72; transform: translateX(-6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.role li::before { content: "✓"; position: absolute; left: 0; color: #16a34a; font-weight: 800; }
.role:hover li, .role:focus-visible li { opacity: 1; transform: none; }
.role:hover li:nth-child(2) { transition-delay: .06s; } .role:hover li:nth-child(3) { transition-delay: .12s; }
@media (max-width: 900px) { .roles { grid-template-columns: minmax(0, 1fr); } .role li { opacity: 1; transform: none; } .role::before { transform: scaleX(1); } }

/* --- Стъпки „как започва" (.flow-steps) --- */
.flow-steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; max-width: 980px; margin-inline: auto; }
.flow-steps::before { content: ""; position: absolute; top: 34px; left: 17%; right: 17%; height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); }
.flow-steps::after { content: ""; position: absolute; top: 34px; left: 17%; right: 17%; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--brand-400), var(--accent-500)); transform-origin: left; transform: scaleX(0); }
.flow-steps.is-in::after { animation: hf-bar 2.4s var(--ease) .3s forwards; }
.fstep { position: relative; z-index: 1; text-align: center; padding: 0 6px; outline: none; cursor: default; }
.fstep__n { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: #fff; background: var(--brand-800); border: 2px solid var(--brand-400); box-shadow: 0 10px 26px rgba(4,18,42,.45); transition: transform .3s var(--ease), background .3s, border-color .3s; }
.fstep:hover .fstep__n, .fstep:focus-visible .fstep__n { transform: scale(1.14); background: var(--brand-600); border-color: #fff; }
.fstep h3 { font-size: 1.08rem; margin: 0 0 6px; color: #fff; }
.fstep p { margin: 0; font-size: .92rem; color: #b7cbe0; }
.flow-steps.is-in .fstep__n { animation: kf-pop .5s var(--ease) both; animation-delay: calc(var(--i) * .5s + .2s); }
@media (max-width: 760px) { .flow-steps { grid-template-columns: minmax(0, 1fr); } .flow-steps::before, .flow-steps::after { display: none; } }

@media (prefers-reduced-motion: reduce) {
    .mh__pane, .gal__pane, .mx__tile, .mx__spot-in, .mx__spot-ico { animation: none; }
    .mh.is-playing .mh__prog i, .flow-steps.is-in::after { animation: none; transform: none; }
}

/* Един телефон в „Мобилни приложения" (Manager) */
.phones--solo { justify-content: center; }
.phones--solo .phone-wrap--a { margin: 0 auto; }

.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; }

/* светъл вариант на стъпките (върху бял фон) */
.flow-steps--light::before { background: var(--line-2); }
.flow-steps--light .fstep__n { background: var(--brand-600); border-color: var(--brand-200); box-shadow: 0 10px 24px rgba(47,108,192,.28); }
.flow-steps--light .fstep:hover .fstep__n, .flow-steps--light .fstep:focus-visible .fstep__n { background: var(--brand-800); border-color: var(--accent-500); }
.flow-steps--light .fstep h3 { color: var(--ink); }
.flow-steps--light .fstep p { color: var(--muted); }

/* ==========================================================================
   Цени — интерактивни карти и калкулатор (.plan, .pcalc). assets/js/pricing-cards.js
   ========================================================================== */
.plan { position: relative; }
.plan::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(91,147,214,.20), transparent 60%);
}
.plan:hover::before { opacity: 1; }
.plan > * { position: relative; }
.plan.reveal.is-in {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
    transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s, opacity .5s, filter .3s;
}
.plan.reveal.is-in:hover { --ty: -6px; box-shadow: var(--shadow-lg); }
.plans.is-tilting .plan.is-in:hover, .deploy-cards.is-tilting .plan.is-in:hover { transition-duration: .06s, .28s, .28s, .5s, .3s; }
.plan__meta li { transition: background .2s, padding .2s, color .2s; }
.plan__meta li:hover { background: var(--brand-50); padding-left: 8px; padding-right: 8px; border-radius: 6px; }
.plan .btn { transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s; }
.plan:hover .btn { transform: translateY(-2px); }

.plan__fit { display: none; align-items: center; gap: 7px; margin: 0 0 12px; padding: 6px 12px; border-radius: 14px; line-height: 1.3; font-size: .78rem; font-weight: 700; width: fit-content; background: var(--bg-tint); color: var(--brand-700); }
.plan__fit svg { width: 15px; height: 15px; flex: none; }
.pcalc-on .plan__fit { display: inline-flex; }
.plan.is-match { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(47,108,192,.22), var(--shadow-md); }
.plan.is-match .plan__fit { background: var(--brand-600); color: #fff; }
.plan.is-match .plan__fit::after { content: ""; }
.plan.is-off { opacity: .55; filter: saturate(.55); }
.plan.is-off:hover { opacity: 1; filter: none; }
.plan.is-off .plan__fit { background: #eef1f5; color: var(--muted); }
.plan.is-alt .plan__fit { background: #fdf0d5; color: #9a6208; }

.pcalc { max-width: 860px; margin: 0 auto 34px; padding: 26px 28px 22px; background: linear-gradient(180deg, #fff, var(--brand-50)); border: 1px solid var(--brand-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.pcalc__head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.pcalc__ico { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--brand-600); color: #fff; box-shadow: 0 8px 20px rgba(47,108,192,.32); animation: kf-float 4s ease-in-out infinite; }
.pcalc__ico svg { width: 26px; height: 26px; }
.pcalc__head h3 { margin: 0 0 3px; font-size: 1.2rem; }
.pcalc__head p { margin: 0; font-size: .92rem; color: var(--muted); }
.pcalc__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.pcalc__row label { font-weight: 600; color: var(--ink-soft); }
.pcalc__row output { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.pcalc__row output b { display: inline-block; min-width: 2.4ch; text-align: right; font-size: 1.7rem; color: var(--brand-600); }
.pcalc__range { -webkit-appearance: none; appearance: none; width: 100%; height: 9px; border-radius: 6px; outline: none; cursor: pointer; background: linear-gradient(90deg, var(--brand-600) var(--p, 20%), var(--line-2) var(--p, 20%)); }
.pcalc__range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 4px solid var(--brand-600); box-shadow: 0 4px 12px rgba(12,35,64,.28); transition: transform .15s var(--ease); }
.pcalc__range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--brand-600); box-shadow: 0 4px 12px rgba(12,35,64,.28); }
.pcalc__range:hover::-webkit-slider-thumb, .pcalc__range:active::-webkit-slider-thumb { transform: scale(1.15); }
.pcalc__range:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 6px; }
.pcalc__scale { position: relative; height: 22px; margin: 8px 14px 4px; font-size: .74rem; color: var(--muted); }
.pcalc__scale span { position: absolute; top: 0; transform: translateX(-50%); }
.pcalc__check { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: .94rem; color: var(--ink-soft); cursor: pointer; }
.pcalc__check input { width: 18px; height: 18px; accent-color: var(--brand-600); }
.pcalc__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.pcalc__opt { cursor: pointer; }
.pcalc__opt input { position: absolute; opacity: 0; pointer-events: none; }
.pcalc__opt span { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font-weight: 600; font-size: .9rem; color: var(--ink-soft); transition: all .2s var(--ease); }
.pcalc__opt small { font-weight: 500; font-size: .76rem; color: var(--muted); }
.pcalc__opt:hover span { border-color: var(--brand-400); transform: translateY(-2px); }
.pcalc__opt input:checked + span { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-800); box-shadow: 0 0 0 3px rgba(47,108,192,.16); }
.pcalc__opt input:focus-visible + span { outline: 3px solid var(--accent-500); outline-offset: 2px; }
.pcalc__res { margin: 18px 0 0; padding: 14px 18px; border-radius: 14px; background: var(--brand-900); color: #c6d6ea; font-size: .98rem; line-height: 1.55; min-height: 3.6em; }
.pcalc__res strong { color: #fff; }
.pcalc__res em { font-style: normal; color: var(--accent-500); font-weight: 800; }
.pcalc__res small { display: block; margin-top: 4px; color: #8aa6c6; font-size: .84rem; }
@media (max-width: 700px) { .pcalc { padding: 20px 16px 18px; } .pcalc__opts { grid-template-columns: minmax(0, 1fr); } .pcalc__head { align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) { .pcalc__ico { animation: none; } .plan.reveal.is-in { transform: none; } }

/* ---------- Поискайте оферта (offer.html): форма по полетата на ERP + калкулатор ---------- */
.ofr { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; max-width: 1120px; margin: 0 auto; }
.ofr__form.regcard { max-width: none; margin: 0; }
.ofr__switch { display: flex; justify-content: center; margin-bottom: 22px; }
.ofr__switch .pricing-switch { margin: 0; }
.ofr__set { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.ofr__set[hidden] { display: none !important; }
.ofr__set legend { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: var(--ink); padding: 0; margin-bottom: 12px; }
.ofr__plans { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ofr__plans .reg-plan.is-off { opacity: .45; }
.ofr__epay[hidden] { display: none !important; }
.ofr__modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ofr__sum { position: sticky; top: 96px; }
.ofr__sumcard { background: linear-gradient(180deg, var(--brand-900, #0c2340), var(--brand-800, #123a66)); color: #dbe7f5; border-radius: var(--radius-lg); padding: 24px 22px; box-shadow: var(--shadow-md); }
.ofr__sumcard .eyebrow { color: #8fb4dd; }
.ofr__lines { margin: 14px 0 0; display: grid; gap: 12px; }
.ofr__lines div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ofr__lines dt { font-weight: 600; color: #fff; }
.ofr__lines dt small { display: block; font-weight: 500; font-size: .78rem; color: #8aa6c6; margin-top: 2px; }
.ofr__lines dd { margin: 0; font-family: var(--font-head); font-weight: 800; color: #fff; white-space: nowrap; text-align: right; }
.ofr__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.ofr__total span { font-weight: 600; }
.ofr__total strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--accent-500); white-space: nowrap; }
.ofr__fine { margin: 12px 0 0; font-size: .78rem; color: #8aa6c6; }
@media (max-width: 960px) { .ofr { grid-template-columns: minmax(0, 1fr); } .ofr__sum { position: static; order: -1; } }
@media (max-width: 640px) { .ofr__plans, .ofr__modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ofr .reg-row--2 { grid-template-columns: minmax(0, 1fr) !important; } .ofr__switch .pricing-switch { width: 100%; } .ofr__switch .pricing-switch button { flex: 1; padding-left: 8px; padding-right: 8px; font-size: .82rem; } }
.ofr .field input, .ofr .field textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
.ofr .reg-plan, .ofr .pcalc__opt { position: relative; } .ofr .reg-plan input, .ofr .pcalc__opt input { width: 1px; height: 1px; padding: 0; }
.ofr__note { margin: 12px 0 0; padding: 12px 14px; background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: 10px; font-size: .92rem; color: var(--ink-soft); } .ofr__note[hidden], #epayFixed[hidden] { display: none !important; }
.ofr__total { flex-wrap: wrap; } .ofr__total strong { text-align: right; } .ofr__total strong small { display: block; font-size: .78rem; font-weight: 600; color: #8aa6c6; }
#proCounts[hidden], #epayOwn[hidden], #privNote[hidden] { display: none !important; }

/* ---------- Съгласие за бисквитки (consent.js) ---------- */
.consent {
    position: fixed; z-index: 1000; left: 16px; bottom: 16px;
    max-width: 380px; box-sizing: border-box;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: #fff; color: var(--ink);
    border: 1px solid var(--brand-100); border-radius: 14px;
    box-shadow: 0 12px 32px rgba(7, 26, 51, .18);
    font-size: .9rem; line-height: 1.45;
    animation: consentIn .35s var(--ease) both;
}
.consent__text { margin: 0; }
.consent__text a { color: var(--brand-600); text-decoration: underline; }
.consent .consent__ok { flex: none; padding: 10px 16px; font-size: .88rem; width: auto; }
@keyframes consentIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) {
    .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }

/* ---------- „Вход в клиентски портал“ — черен вертикален етикет, само десктоп (като „Свържете се с нас“ в регистрацията) ---------- */
.portaltab { display: none; }
@media (min-width: 961px) {
    .portaltab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 14px;
        padding: 18px 11px 20px; border-radius: 14px 0 0 14px; background: #0b0b0c; color: #fff; text-decoration: none;
        box-shadow: -4px 6px 22px rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .14); border-right: 0; transition: padding .2s, box-shadow .2s, background .2s; }
    .portaltab:hover, .portaltab:focus-visible { padding-right: 17px; background: #000; box-shadow: -6px 8px 28px rgba(0, 0, 0, .4); color: #fff; }
    .portaltab:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; }
    .portaltab img { width: 30px; height: 30px; filter: brightness(0) invert(1); }
    .portaltab span { writing-mode: vertical-rl; font: 700 .86rem/1 var(--font-head); letter-spacing: .03em; white-space: nowrap; }
}
.login-portal-note { text-align: center; margin: 26px auto 0; color: var(--muted); font-size: .95rem; }
.login-portal-note a { font-weight: 700; }
