/* ==========================================================================
   ФОНДАЦИЯ „АРТЛАНДИЯ“
   Дизайн система — „Издание“
   --------------------------------------------------------------------------
   Замисълът е официален европейски сайт на фондацията: тъмносиньо мастило,
   златни акценти и чисто бяло съдържание. Типографията носи тежестта;
   златото е рядко и затова се забелязва.
   ========================================================================== */

@import url("fonts.css");

:root {
    /* --------------------------------------------------------------- цвят */
    /* Мастило — почти черно със син подтон. Не е „корпоративно синьо“. */
    --ink: #0C1A2B;
    --ink-deep: #060F1A;
    --ink-soft: #43536A;
    --ink-faint: #8593A6;

    /* Съдържание — чисто бяло с леки сиви нюанси за секции. */
    --paper: #FFFFFF;
    --paper-2: #F4F6F8;
    --paper-3: #E8ECF0;
    --paper-pure: #FFFFFF;

    /* Злато — бронзово, матово. Ярко злато изглежда евтино. */
    --gold: #B8892B;
    --gold-bright: #D4A843;
    --gold-pale: #E8D9AE;
    --gold-wash: rgba(184, 137, 43, .10);

    --red: #9B2C1E;
    --green: #1F5D45;

    /* Линии — тънки, мастилени. Заместват сенките навсякъде. */
    --rule: rgba(12, 26, 43, .18);
    --rule-soft: rgba(12, 26, 43, .10);
    --rule-invert: rgba(255, 255, 255, .20);
    --rule-invert-soft: rgba(255, 255, 255, .11);

    /* ---------------------------------------------------------- типография */
    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans: 'Commissioner', 'Segoe UI', system-ui, sans-serif;

    /* ------------------------------------------------------------- размери */
    --page: 1240px;
    --gutter: clamp(1.25rem, 4vw, 3.5rem);
    --header-h: 72px;

    /* Хоризонтално отместване, което дава асиметрия на оформлението */
    --indent: clamp(0rem, 8vw, 7rem);

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

/* ============================================================== основи == */

*,
*::before,
*::after { box-sizing: border-box; }

/* Премиум линейни икони — currentColor, без emoji */
.icon {
    display: inline-block;
    vertical-align: -0.15em;
    flex: none;
    overflow: visible;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
}

/* Слаба текстура — почти невидима върху бялото съдържание. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: .12;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -.018em;
    color: var(--ink);
    margin: 0 0 .5em;
}

h1 { font-size: clamp(2.6rem, 7.5vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

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

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

::selection {
    background: var(--ink);
    color: var(--paper);
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* Blazor мести фокуса върху h1 при всяка навигация, за да го прочете
   екранният четец. Рамка около заглавието обаче изглежда като грешка —
   заглавието не е интерактивно, така че я скриваме. */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible { outline: none; }

/* ========================================================= оформление == */

.container {
    width: 100%;
    max-width: var(--page);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

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

.section {
    padding-block: clamp(4rem, 9vw, 8rem);
    position: relative;
}

.section--tint { background: var(--paper-2); }

/* Обърнат режим: хартия върху мастило. */
.section--navy,
.section--ink {
    background: var(--ink);
    color: rgba(255, 255, 255, .82);
}

.section--navy h1, .section--navy h2, .section--navy h3, .section--navy h4,
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 {
    color: var(--paper);
}

.section--navy .lead,
.section--ink .lead { color: rgba(255, 255, 255, .70); }

.section--navy .eyebrow,
.section--ink .eyebrow { color: var(--gold-bright); }

.section--navy .eyebrow::before,
.section--ink .eyebrow::before { background: var(--gold-bright); }

.section--navy .rule,
.section--ink .rule { background: var(--rule-invert); }

.section--navy .muted,
.section--ink .muted { color: rgba(255, 255, 255, .48); }

.section--navy a:hover,
.section--ink a:hover { color: var(--gold-bright); }

/* Асиметрия: заглавният блок се отмества навътре, съдържанието — не. */
.section-head {
    max-width: 46ch;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    margin-inline-start: var(--indent);
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
    max-width: 54ch;
}

/* Рубрика — малки главни с водеща чертичка. Носещ мотив на изданието. */
/* Блоков елемент, а не flex: при пренасяне на дълга рубрика чертичката
   трябва да остане в началото на първия ред, а не да увисне между редовете. */
.eyebrow {
    display: block;
    font-family: var(--sans);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .26em;
    line-height: 1.7;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.4rem;
}

.eyebrow::before {
    content: "";
    display: inline-block;
    vertical-align: .35em;
    width: 2.2rem;
    height: 1px;
    margin-inline-end: .8rem;
    background: var(--gold);
}

@media (max-width: 520px) {
    .eyebrow { letter-spacing: .18em; }
    .eyebrow::before { width: 1.4rem; margin-inline-end: .6rem; }
}

.lead {
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.6;
    color: var(--ink-soft);
    font-weight: 350;
}

.rule {
    height: 1px;
    background: var(--rule);
    border: 0;
    margin: 0 0 1.6rem;
    width: 100%;
}

hr {
    border: 0;
    height: 1px;
    background: var(--rule);
    margin: clamp(3rem, 6vw, 5rem) 0;
}

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }

/* ============================================================= бутони == */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    padding: .95rem 2rem;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--sans);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .17em;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: color .4s var(--ease), border-color .4s var(--ease);
    white-space: nowrap;
}

/* Запълване, което се разгръща отдолу нагоре при посочване.
   z-index: -1 в изолиран контекст — така работи и когато надписът
   на бутона е гол текст, без обвиващ елемент. */
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ink);
    transform: translateY(101%);
    transition: transform .42s var(--ease);
    z-index: -1;
}

.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--paper); }
.btn:active { transform: translateY(1px); }

.btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.btn:disabled::before { transform: translateY(101%); }

.btn--gold {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--ink);
}

.btn--gold::before { background: var(--ink); }
.btn--gold:hover { color: var(--gold-bright); border-color: var(--ink); }

.btn--navy {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.btn--navy::before { background: var(--gold); }
.btn--navy:hover { color: var(--ink); border-color: var(--gold); }

/* Върху тъмен фон */
.btn--ghost {
    border-color: var(--rule-invert);
    color: var(--paper);
}

.btn--ghost::before { background: var(--paper); }
.btn--ghost:hover { color: var(--ink); border-color: var(--paper); }

.btn--outline { border-color: var(--rule); }
.btn--outline::before { background: var(--ink); }

.btn--sm { padding: .6rem 1.2rem; font-size: .7rem; letter-spacing: .14em; }
.btn--block { width: 100%; }

.btn--danger { border-color: var(--red); color: var(--red); }
.btn--danger::before { background: var(--red); }
.btn--danger:hover { color: var(--paper); }

/* Текстова връзка със стрелка — за „Прочетете още“. */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink);
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--rule);
    transition: border-color .3s var(--ease), color .3s var(--ease), gap .3s var(--ease);
}

.link-arrow:hover {
    color: var(--gold);
    border-color: var(--gold);
    gap: .9rem;
}

/* ============================================================== глава == */

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid transparent;
    transition: border-color .45s var(--ease), background-color .45s var(--ease),
                box-shadow .45s var(--ease);
}

.site-header.is-scrolled {
    border-bottom-color: var(--rule);
    background: rgba(255, 255, 255, .97);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-inline-end: auto;
}

.brand__logo {
    width: 48px;
    height: 48px;
    flex: none;
    object-fit: contain;
}

.brand__name {
    font-family: var(--serif);
    font-size: 1.4rem;
    line-height: 1;
    letter-spacing: .01em;
    color: var(--ink);
}

.brand__tag {
    display: block;
    font-family: var(--sans);
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: .25rem;
}

.nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: .05rem;
}

.nav__link {
    position: relative;
    padding: .5rem .55rem;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    transition: color .28s var(--ease);
    white-space: nowrap;
}

/* Подчертаването израства от левия край. */
.nav__link::after {
    content: "";
    position: absolute;
    left: .55rem;
    right: .55rem;
    bottom: .15rem;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .32s var(--ease);
}

.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }

.nav__link.active { color: var(--ink); }
.nav__link.active::after { transform: scaleX(1); }

.nav__cta { margin-inline-start: .6rem; }

/* Език — само кодове в хедъра; пълни имена в мобилното/таблет меню. */
.lang {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: .15rem;
    margin-inline-start: .35rem;
    padding-inline-start: .85rem;
    border-inline-start: 1px solid var(--rule);
    flex: none;
}

.lang__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border: 1px solid transparent;
    background: none;
    font-family: var(--sans);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--ink-faint);
    padding: .35rem .45rem;
    min-height: 36px;
    min-width: 2.4rem;
    cursor: pointer;
    white-space: nowrap;
    transition: color .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}

.lang__code { display: inline; }
.lang__name { display: none; }

.lang__btn:hover { color: var(--ink); }

.lang__btn.is-active {
    color: var(--ink);
    border-color: var(--gold);
    background: var(--gold-wash);
}

/* Бургер */
.burger {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--rule);
    background: transparent;
    cursor: pointer;
    padding: 0;
    place-items: center;
}

.burger span,
.burger span::before,
.burger span::after {
    display: block;
    width: 17px;
    height: 1px;
    background: var(--ink);
    transition: transform .25s var(--ease), opacity .2s;
}

.burger span { position: relative; }

.burger span::before,
.burger span::after {
    content: "";
    position: absolute;
    left: 0;
}

.burger span::before { top: -5px; }
.burger span::after { top: 5px; }

.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: translateY(5px) rotate(45deg); }
.burger.is-open span::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1280px) {
    .burger { display: grid; }

    .nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0;
        padding: 1.25rem var(--gutter) calc(2rem + env(safe-area-inset-bottom, 0px));
        background: var(--paper);
        border-bottom: 1px solid var(--rule);
        clip-path: inset(0 0 100% 0);
        transition: clip-path .45s var(--ease);
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        z-index: 70;
    }

    .nav.is-open { clip-path: inset(0 0 0 0); }

    .nav__link {
        padding: 1rem 0;
        font-size: 1rem;
        letter-spacing: .04em;
        border-bottom: 1px solid var(--rule-soft);
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .nav__link::after { display: none; }

    .nav__cta {
        margin: 1.35rem 0 0;
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }

    .lang {
        margin: 1.35rem 0 0;
        padding: 0;
        border: 0;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .5rem;
        width: 100%;
        flex-wrap: nowrap;
    }

    .lang__btn {
        flex-direction: column;
        justify-content: center;
        gap: .2rem;
        width: 100%;
        min-height: 52px;
        padding: .65rem .4rem;
        border: 1px solid var(--rule);
        font-size: .78rem;
        letter-spacing: .06em;
    }

    .lang__btn.is-active {
        border-color: var(--gold);
        background: var(--gold-wash);
    }

    .lang__code {
        display: inline;
        font-size: .72rem;
        letter-spacing: .14em;
        color: var(--gold);
    }

    .lang__name {
        display: inline;
        font-size: .78rem;
        letter-spacing: .02em;
        font-weight: 500;
        text-transform: none;
    }

    .lang__btn.is-active .lang__code { color: var(--ink); }
}

/* Тесни телефони — само кодове в менюто */
@media (max-width: 419px) {
    .lang__btn { flex-direction: row; min-height: 48px; }
    .lang__name { display: none; }
    .lang__code { display: inline; color: inherit; }
}

/* =============================================================== банер == */

.hero {
    --hero-shift: 0px;
    --hero-fade: 1;
    position: relative;
    background: var(--ink);
    color: var(--paper);
    overflow: hidden;
    isolation: isolate;
}

/* Мек златен ореол — атмосфера, не декорация. */
.hero__glow {
    position: absolute;
    inset: -20% -10% auto auto;
    width: min(70vw, 720px);
    height: min(70vw, 720px);
    border-radius: 50%;
    background: radial-gradient(circle at center,
        rgba(212, 168, 67, .18) 0%,
        rgba(184, 137, 43, .06) 38%,
        transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: glowBreathe 9s ease-in-out infinite;
    transform: translateY(var(--hero-shift));
    opacity: var(--hero-fade);
}

/* Тънък орбитален пръстен — европейски/геометричен акцент. */
.hero__orbit {
    position: absolute;
    inset-block-start: 12%;
    inset-inline-end: 8%;
    width: min(38vw, 340px);
    aspect-ratio: 1;
    border: 1px solid rgba(212, 168, 67, .18);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: orbitSpin 48s linear infinite;
    opacity: var(--hero-fade);
}

.hero__orbit::before {
    content: "";
    position: absolute;
    inset: 14%;
    border: 1px solid rgba(212, 168, 67, .10);
    border-radius: 50%;
}

.hero__orbit::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-bright);
    top: 0;
    left: 50%;
    margin-left: -3px;
    box-shadow: 0 0 18px rgba(212, 168, 67, .55);
}

/* Гигантска буква „А“ като воден знак — знакът на изданието. */
.hero::before {
    content: "А";
    position: absolute;
    font-family: var(--serif);
    font-size: min(78vh, 52vw);
    font-weight: 300;
    line-height: .74;
    color: rgba(184, 137, 43, .07);
    inset-block-start: -.06em;
    inset-inline-end: -.04em;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    transform: translateY(calc(var(--hero-shift) * .55));
    opacity: var(--hero-fade);
    will-change: transform;
}

/* Тънка растерна мрежа — намек за оформителска решетка. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: calc(100% / 6) 100%;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
}

.hero__inner {
    position: relative;
    z-index: 1;
    padding-block: clamp(4.5rem, 13vh, 9rem) clamp(3.5rem, 8vh, 6rem);
    max-width: 20ch;
}

.hero .eyebrow { color: var(--gold-bright); }
.hero .eyebrow::before { background: var(--gold-bright); }

.hero h1 {
    color: var(--paper);
    font-weight: 300;
    margin-bottom: .35em;
}

/* Мотото носи цялата емоция — курсив, злато, огромно. */
.hero__motto {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3.6vw, 2.9rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.22;
    color: var(--gold-bright);
    max-width: 22ch;
    margin: 0 0 .85rem;
    text-wrap: balance;
    background: linear-gradient(105deg,
        var(--gold-bright) 0%,
        #F0E2B0 42%,
        var(--gold-bright) 58%,
        var(--gold) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldSheen 7s ease-in-out infinite;
}

.hero__goldline {
    display: block;
    width: min(12rem, 40%);
    height: 1px;
    margin: 0 0 1.6rem;
    background: linear-gradient(90deg, var(--gold-bright), transparent);
    transform-origin: left center;
    animation: drawLine 1.1s var(--ease) both .55s;
}

.hero__text {
    font-size: 1.03rem;
    line-height: 1.72;
    color: rgba(255, 255, 255, .72);
    max-width: 46ch;
    margin-bottom: 2.6rem;
    font-weight: 350;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (min-width: 900px) {
    .hero__inner { max-width: 62ch; }
}

@media (max-width: 720px) {
    .hero__orbit { display: none; }
}

/* Лента с факти — редови колони, разделени с косми линии. */
.factbar {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    border-top: 1px solid var(--rule-invert-soft);
}

.factbar__item {
    padding: 1.6rem 0 1.9rem;
    padding-inline-start: 1.5rem;
    border-inline-start: 1px solid var(--rule-invert-soft);
}

.factbar__item:first-child {
    border-inline-start: 0;
    padding-inline-start: 0;
}

.factbar__value {
    font-family: var(--serif);
    font-size: 1.45rem;
    line-height: 1.15;
    color: var(--gold-bright);
    margin-bottom: .3rem;
}

.factbar__label {
    font-size: .64rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
}

/* ================================================= номериран указател == */
/* Деветте направления като съдържание на списание. Носещият елемент. */

.index {
    border-top: 1px solid var(--rule);
    counter-reset: idx;
}

.index__row {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0 clamp(1rem, 3vw, 2.5rem);
    align-items: start;
    padding: clamp(1.4rem, 2.6vw, 2.1rem) 0;
    border-bottom: 1px solid var(--rule);
    position: relative;
    counter-increment: idx;
    transition: color .35s var(--ease);
}

/* Мастилено поле, което се разгръща отляво при посочване. */
.index__row::before {
    content: "";
    position: absolute;
    inset: 0 -1.5rem;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--ease);
    z-index: 0;
}

.index__row > * { position: relative; z-index: 1; }

@media (hover: hover) and (pointer: fine) {
    .index__row:hover::before { transform: scaleX(1); }
    .index__row:hover { color: var(--paper); }
    .index__row:hover .index__num {
        color: var(--gold-bright);
        border-color: var(--gold-bright);
        background: rgba(184, 137, 43, .12);
    }
    .index__row:hover .index__title { color: var(--paper); }
    .index__row:hover .index__text { color: rgba(255, 255, 255, .68); }
}

.index__num {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    color: var(--gold);
    transition: color .35s var(--ease), border-color .35s var(--ease), background-color .35s var(--ease);
    border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
    border-radius: 50%;
}

.index__num .icon { display: block; }

.index__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .4rem;
}

@media (min-width: 900px) {
    .index__body {
        grid-template-columns: minmax(0, 22ch) minmax(0, 1fr);
        gap: 0 clamp(1.5rem, 4vw, 4rem);
        align-items: baseline;
    }
}

.index__title {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2.3vw, 1.8rem);
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: -.012em;
    color: var(--ink);
    margin: 0;
    transition: color .35s var(--ease);
    text-wrap: balance;
}

.index__text {
    font-size: .92rem;
    line-height: 1.62;
    color: var(--ink-soft);
    transition: color .35s var(--ease);
    max-width: 58ch;
}

/* Указател върху тъмен фон — обръщаме посоката на подсветката. */
.section--ink .index,
.section--navy .index { border-color: var(--rule-invert); }

.section--ink .index__row,
.section--navy .index__row { border-color: var(--rule-invert); }

.section--ink .index__title,
.section--navy .index__title { color: var(--paper); }

.section--ink .index__text,
.section--navy .index__text { color: rgba(255, 255, 255, .6); }

.section--ink .index__row::before,
.section--navy .index__row::before { background: var(--paper); }

.section--ink .index__row:hover .index__title,
.section--navy .index__row:hover .index__title { color: var(--ink); }

.section--ink .index__row:hover .index__text,
.section--navy .index__row:hover .index__text { color: var(--ink-soft); }

.section--ink .index__row:hover .index__num,
.section--navy .index__row:hover .index__num { color: var(--gold); }

/* ================================================== регистър (програми) == */
/* Европейските програми като счетоводен регистър, не като плочки. */

.ledger {
    border-top: 1px solid var(--rule-invert);
}

.ledger__row {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 15ch) minmax(0, 1fr) auto;
    gap: clamp(.75rem, 2.5vw, 2rem);
    align-items: center;
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--rule-invert);
    transition: background-color .35s var(--ease), padding-inline .35s var(--ease),
                transform .35s var(--ease);
}

.ledger__row:hover {
    background: rgba(255, 255, 255, .045);
    padding-inline: 1rem;
    transform: translateX(4px);
}

.ledger__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    color: var(--gold-bright);
    opacity: .92;
}

.ledger__icon .icon { display: block; }

.ledger__name {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--paper);
    line-height: 1.2;
}

.ledger__text {
    font-size: .88rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .58);
}

.ledger__link {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-bright);
    white-space: nowrap;
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.ledger__row:hover .ledger__link { opacity: 1; }

@media (max-width: 860px) {
    .ledger__row {
        grid-template-columns: 2rem minmax(0, 1fr);
        row-gap: .35rem;
        align-items: start;
    }

    .ledger__text { grid-column: 2; }
    .ledger__link { grid-column: 2; opacity: 1; }
    .ledger__row:hover { padding-inline: 0; }
}

/* ================================================================ карти == */
/* Без сенки и без ъгли — само линии. Изданието не използва „плочки“. */

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 0 1.6rem;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--ink);
    transition: border-color .35s var(--ease), transform .5s var(--ease);
}

a.card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.card__icon {
    display: grid;
    place-items: start;
    margin: 1.4rem 0 .9rem;
    color: var(--gold);
}

.card__icon .icon { display: block; }

.card__title {
    font-family: var(--serif);
    font-size: clamp(1.25rem, 1.9vw, 1.55rem);
    line-height: 1.18;
    color: var(--ink);
    margin: 1.3rem 0 .55rem;
    text-wrap: balance;
    transition: color .3s var(--ease);
}

a.card:hover .card__title { color: var(--gold); }

.card__text {
    font-size: .93rem;
    line-height: 1.65;
    color: var(--ink-soft);
    margin: 0;
}

.card__media {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--paper-3);
    order: -1;
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(.35) contrast(1.04);
    transition: transform .8s var(--ease), filter .5s var(--ease);
}

a.card:hover .card__media img {
    transform: scale(1.045);
    filter: grayscale(0) contrast(1);
}

.card__meta {
    font-size: .64rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 1.3rem;
}

.card__media + .card__meta { margin-top: 1.3rem; }

.card__foot {
    margin-top: auto;
    padding-top: 1.2rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    transition: color .3s var(--ease);
}

a.card:hover .card__foot { color: var(--gold); }

.card--onNavy { border-top-color: var(--rule-invert); }
.card--onNavy .card__title { color: var(--paper); }
.card--onNavy .card__text { color: rgba(255, 255, 255, .62); }

.section--navy .card,
.section--ink .card { border-top-color: var(--rule-invert); }

.section--navy .card__title,
.section--ink .card__title { color: var(--paper); }

.section--navy .card__text,
.section--ink .card__text { color: rgba(255, 255, 255, .62); }

/* ------------------------------------------------------------- етикети -- */

.badge {
    display: inline-block;
    padding: .3rem .7rem;
    border: 1px solid var(--rule);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .17em;
    text-transform: uppercase;
    color: var(--gold);
    background: transparent;
}

.badge--muted {
    color: var(--ink-faint);
    border-color: var(--rule-soft);
}

.section--navy .badge,
.section--ink .badge {
    border-color: var(--rule-invert);
    color: var(--gold-bright);
}

/* ------------------------------------------------------------ ценности -- */
/* Изброени като колофон: разделени с тънки вертикални черти. */

.values {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: var(--serif);
}

.values li {
    font-size: clamp(1.35rem, 2.9vw, 2.15rem);
    line-height: 1.4;
    color: var(--paper);
    transition: color .35s var(--ease), transform .35s var(--ease);
}

.values li:hover {
    color: var(--gold-bright);
    transform: translateY(-2px);
}

/* Разделителят е СЛЕД елемента, не преди него. Вертикална черта преди
   първата дума на нов ред виси в празното и изглежда като грешка;
   точка в края на реда се чете като нормална набора. */
.values li:not(:last-child)::after {
    content: "·";
    color: var(--gold);
    margin-inline: .65em .5em;
    vertical-align: .06em;
}

/* Всяка трета — в злато и курсив, за ритъм. */
.values li:nth-child(3n) {
    color: var(--gold-bright);
    font-style: italic;
}

/* ============================================================== галерия == */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: clamp(.5rem, 1.2vw, 1rem);
}

.gallery__item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--paper-3);
    border: 0;
    padding: 0;
    cursor: zoom-in;
    display: block;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(.3);
    transition: transform .8s var(--ease), filter .5s var(--ease);
}

.gallery__item:hover img {
    transform: scale(1.05);
    filter: grayscale(0);
}

.gallery__caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.6rem .9rem .8rem;
    font-family: var(--sans);
    font-size: .78rem;
    letter-spacing: .04em;
    color: var(--paper);
    text-align: start;
    background: linear-gradient(transparent, rgba(6, 15, 26, .9));
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 5vw, 4rem);
    background: rgba(6, 15, 26, .96);
    border: 0;
    animation: fade .3s var(--ease);
}

.lightbox img {
    max-width: min(1200px, 100%);
    max-height: 84vh;
    object-fit: contain;
}

.lightbox__close {
    position: absolute;
    top: 1.5rem;
    inset-inline-end: 1.5rem;
    width: 46px;
    height: 46px;
    border: 1px solid var(--rule-invert);
    background: transparent;
    color: var(--paper);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color .25s var(--ease), color .25s var(--ease);
}

.lightbox__close:hover {
    background: var(--paper);
    color: var(--ink);
}

/* ============================================================ документи == */

.doclist {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--rule);
}

.doclist a {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.35rem .25rem;
    border-bottom: 1px solid var(--rule);
    transition: padding-inline .35s var(--ease), background-color .35s var(--ease);
}

.doclist a:hover {
    background: var(--gold-wash);
    padding-inline: 1rem .25rem;
}

.doclist__icon {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    flex: none;
    color: var(--gold);
    border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
    border-radius: 50%;
}

.doclist__icon .icon { display: block; }

.doclist__body {
    display: grid;
    gap: .2rem;
    min-width: 0;
    margin-inline-end: auto;
}

.doclist__name {
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.25;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.doclist__meta {
    font-size: .63rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.doclist__action {
    flex: none;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .17em;
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
}

@media (max-width: 560px) {
    .doclist a { flex-wrap: wrap; }
    .doclist__action { width: 100%; text-align: end; }
}

/* ================================================================ видео == */

.video { margin: 0; }

.video__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--ink);
    overflow: hidden;
    border: 1px solid var(--rule);
}

.video__frame iframe,
.video__frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video figcaption {
    margin-top: .8rem;
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--ink-soft);
}

/* ================================================================ форми == */

.field { margin-bottom: 1.6rem; }

.field label {
    display: block;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: .55rem;
}

.field .req { color: var(--gold); }

/* Полета само с долна линия — както се попълва формуляр на хартия. */
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: .6rem 0;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    transition: border-color .3s var(--ease);
    appearance: none;
}

.field select {
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
                      linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
    background-position: calc(100% - 12px) 1.25em, calc(100% - 7px) 1.25em;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-inline-end: 2rem;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-bottom-color: var(--gold);
    border-bottom-width: 2px;
    padding-bottom: calc(.6rem - 1px);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }

.field .hint {
    display: block;
    font-size: .78rem;
    color: var(--ink-faint);
    margin-top: .45rem;
    line-height: 1.5;
}

.field .error,
.validation-message {
    display: block;
    font-size: .78rem;
    color: var(--red);
    margin-top: .45rem;
}

.field input.invalid,
.field textarea.invalid,
.field select.invalid { border-bottom-color: var(--red); }

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-panel {
    background: var(--paper-pure);
    border: 1px solid var(--rule);
    padding: clamp(1.75rem, 4vw, 3.25rem);
}

.section--tint .form-panel { background: var(--paper); }

.alert {
    padding: 1.1rem 1.35rem;
    font-size: .93rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    border: 1px solid;
    border-inline-start-width: 3px;
}

.alert--ok { border-color: var(--green); color: var(--green); background: rgba(31, 93, 69, .05); }
.alert--err { border-color: var(--red); color: var(--red); background: rgba(155, 44, 30, .05); }
.alert--info { border-color: var(--gold); color: #7A5A18; background: var(--gold-wash); }

/* =============================================================== подвал == */

.site-footer {
    background: var(--ink-deep);
    color: rgba(255, 255, 255, .6);
    padding-block: clamp(3.5rem, 7vw, 6rem) 0;
    font-size: .92rem;
}

.site-footer h4 {
    font-family: var(--sans);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.4rem;
}

.site-footer a {
    color: rgba(255, 255, 255, .62);
    transition: color .25s var(--ease);
}

.site-footer a:hover { color: var(--gold-bright); }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
}

@media (max-width: 820px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2.75rem; }
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .6rem;
}

.footer-list--contacts li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
}

.footer-icon {
    flex: none;
    margin-top: .15rem;
    color: var(--gold);
    opacity: .9;
}

.footer-bottom {
    margin-top: clamp(3rem, 6vw, 5rem);
    padding-block: 1.6rem;
    border-top: 1px solid var(--rule-invert-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .8rem;
    font-size: .72rem;
    letter-spacing: .07em;
    color: rgba(255, 255, 255, .38);
}

.footer-bottom__links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.privacy-doc h2 {
    margin-top: 2.2rem;
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}

.privacy-doc ul {
    margin: 0 0 1.2rem;
    padding-inline-start: 1.2rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.field--check { margin-top: .5rem; }

.check {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .92rem;
    line-height: 1.5;
    color: var(--ink-soft);
    cursor: pointer;
}

.check input {
    margin-top: .25rem;
    width: 1.1rem;
    height: 1.1rem;
    flex: none;
    accent-color: var(--gold);
}

.cookie-banner {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 120;
    padding: 1rem var(--gutter) calc(1rem + env(safe-area-inset-bottom, 0px));
    background: var(--ink);
    border-top: 1px solid rgba(212, 168, 67, .35);
}

.cookie-banner__inner {
    max-width: var(--page);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.cookie-banner strong {
    display: block;
    color: var(--gold-bright);
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin-bottom: .35rem;
}

.cookie-banner p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: .9rem;
    max-width: 62ch;
}

.cookie-banner a { color: var(--gold-bright); text-decoration: underline; }

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

@media (max-width: 720px) {
    .cookie-banner__actions { width: 100%; }
    .cookie-banner__actions .btn { flex: 1; min-height: 44px; }
}

.eu-disclaimer {
    font-size: .8rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .42);
    border-inline-start: 1px solid var(--gold);
    padding-inline-start: 1.1rem;
    margin-top: 1.6rem;
    max-width: 60ch;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.footer-brand img {
    display: block;
    width: min(168px, 52vw);
    height: auto;
}

/* ================================================== премиум motion == */
/* Йерархия: банер при зареждане → разкриване при скрол → микроинтеракции.
   Златото е рядко; движението е бавно и уверено. */

@keyframes rise {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: none; }
}

@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes drawLine {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes glowBreathe {
    0%, 100% { opacity: .55; transform: translateY(var(--hero-shift, 0px)) scale(1); }
    50% { opacity: 1; transform: translateY(var(--hero-shift, 0px)) scale(1.06); }
}

@keyframes orbitSpin {
    to { transform: rotate(360deg); }
}

@keyframes goldSheen {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes brandPulse {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); }
    50% { filter: drop-shadow(0 0 10px rgba(184, 137, 43, .35)); }
}

/* ---- зареждане на банера ---- */
.hero .eyebrow { animation: rise .85s var(--ease) both .08s; }
.hero h1 { animation: rise .95s var(--ease) both .18s; }
.hero__motto { animation: rise 1s var(--ease) both .3s, goldSheen 7s ease-in-out 1.2s infinite; }
.hero__goldline { animation: drawLine 1.1s var(--ease) both .55s; }
.hero__text { animation: rise .95s var(--ease) both .48s; }
.hero__actions { animation: rise .95s var(--ease) both .6s; }
.hero__glow { animation: fade 1.4s var(--ease) both .2s, glowBreathe 9s ease-in-out 1.4s infinite; }
.hero__orbit { animation: fade 1.6s var(--ease) both .45s, orbitSpin 48s linear 1.6s infinite; }
.hero::before { animation: fade 1.8s var(--ease) both .35s; }

.factbar__item { animation: rise .85s var(--ease) both; }
.factbar__item:nth-child(1) { animation-delay: .7s; }
.factbar__item:nth-child(2) { animation-delay: .78s; }
.factbar__item:nth-child(3) { animation-delay: .86s; }
.factbar__item:nth-child(4) { animation-delay: .94s; }

.brand__logo { animation: brandPulse 4.5s ease-in-out infinite; }

/* ---- разкриване при скрол ---- */
/* Само когато JS е маркирал — иначе съдържанието остава видимо (без празни страници). */
html.js-motion [data-reveal]:not(.is-revealed) {
    opacity: 0;
    transform: translateY(1.6rem);
}

[data-reveal] {
    transition:
        opacity 0.95s var(--ease),
        transform 0.95s var(--ease);
}

html.js-motion [data-reveal="left"]:not(.is-revealed) { transform: translateX(-1.4rem); }
html.js-motion [data-reveal="right"]:not(.is-revealed) { transform: translateX(1.4rem); }
html.js-motion [data-reveal="scale"]:not(.is-revealed) { transform: scale(.975); }

[data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

/* Stagger за списъци / регистър / ценности */
[data-reveal="stagger"] {
    opacity: 1;
    transform: none;
}

html.js-motion [data-reveal="stagger"]:not(.is-revealed) > .index__row,
html.js-motion [data-reveal="stagger"]:not(.is-revealed) > .ledger__row,
html.js-motion [data-reveal="stagger"]:not(.is-revealed) > li,
html.js-motion [data-reveal="stagger"]:not(.is-revealed) > .card {
    opacity: 0;
    transform: translateY(1.1rem);
}

[data-reveal="stagger"] > .index__row,
[data-reveal="stagger"] > .ledger__row,
[data-reveal="stagger"] > li,
[data-reveal="stagger"] > .card {
    transition:
        opacity .7s var(--ease),
        transform .7s var(--ease);
}

[data-reveal="stagger"].is-revealed > .index__row,
[data-reveal="stagger"].is-revealed > .ledger__row,
[data-reveal="stagger"].is-revealed > li,
[data-reveal="stagger"].is-revealed > .card {
    opacity: 1;
    transform: none;
}

[data-reveal="stagger"].is-revealed > :nth-child(1) { transition-delay: .04s; }
[data-reveal="stagger"].is-revealed > :nth-child(2) { transition-delay: .1s; }
[data-reveal="stagger"].is-revealed > :nth-child(3) { transition-delay: .16s; }
[data-reveal="stagger"].is-revealed > :nth-child(4) { transition-delay: .22s; }
[data-reveal="stagger"].is-revealed > :nth-child(5) { transition-delay: .28s; }
[data-reveal="stagger"].is-revealed > :nth-child(6) { transition-delay: .34s; }
[data-reveal="stagger"].is-revealed > :nth-child(7) { transition-delay: .4s; }
[data-reveal="stagger"].is-revealed > :nth-child(8) { transition-delay: .46s; }
[data-reveal="stagger"].is-revealed > :nth-child(9) { transition-delay: .52s; }
[data-reveal="stagger"].is-revealed > :nth-child(10) { transition-delay: .58s; }
[data-reveal="stagger"].is-revealed > :nth-child(n+11) { transition-delay: .64s; }

/* ---- микроинтеракции ---- */
.btn span {
    position: relative;
    z-index: 1;
    transition: letter-spacing .4s var(--ease);
}

.btn:hover span { letter-spacing: .2em; }

.eyebrow::before {
    transition: width .45s var(--ease);
}

.section:hover .eyebrow::before { width: 3rem; }

/* ============================================================== помощни == */

.stack > * + * { margin-top: 1.2rem; }
.muted { color: var(--ink-faint); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }

.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 1px solid var(--rule);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--ink);
    color: var(--paper);
    padding: .9rem 1.4rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.skip-link:focus { left: 0; }

/* ==================================================== административен панел == */
/* Панелът е работен инструмент: същите мастило и хартия, но по-плътен ритъм. */

.admin {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
    background: var(--paper-2);
}

@media (max-width: 920px) {
    .admin { grid-template-columns: 1fr; }
    .admin__side { position: static; height: auto; }
}

.admin__side {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--ink);
    color: var(--paper);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    border-inline-end: 1px solid var(--ink-deep);
}

.admin__brand {
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--paper);
    padding: 0 .5rem 1.5rem;
    border-bottom: 1px solid var(--rule-invert);
    margin-bottom: 1.4rem;
    display: block;
}

.admin__brand small {
    display: block;
    font-family: var(--sans);
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--gold-bright);
    margin-top: .35rem;
}

.admin__link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .6rem;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .05em;
    color: rgba(255, 255, 255, .68);
    border-inline-start: 2px solid transparent;
    transition: color .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}

.admin__link:hover {
    color: var(--paper);
    background: rgba(255, 255, 255, .05);
}

.admin__link.active {
    color: var(--gold-bright);
    border-inline-start-color: var(--gold);
    background: rgba(184, 137, 43, .09);
}

.admin__icon {
    flex: none;
    color: var(--gold-bright);
    opacity: .85;
}

.admin__link.active .admin__icon,
.admin__link:hover .admin__icon { opacity: 1; }

.admin-icon-title {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.admin-icon-title .icon { color: var(--gold); flex: none; }

.admin-icon-field {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.admin-icon-field .icon { color: var(--gold); flex: none; }

.admin-perms {
    border: 1px solid var(--rule);
    padding: 1rem 1.1rem;
    margin: 1rem 0 0;
}

.admin-perms legend {
    padding: 0 .4rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.admin-perms__item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .45rem .7rem;
    padding: .35rem 0;
    font-size: .92rem;
    cursor: pointer;
}

.admin-perms__item input { width: auto; margin: 0; }

.admin__main { padding: clamp(1.25rem, 3vw, 2.5rem); min-width: 0; }

.admin__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--rule);
}

.admin__head h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.panel {
    background: var(--paper-pure);
    border: 1px solid var(--rule);
    padding: clamp(1.1rem, 2.2vw, 1.7rem);
    margin-bottom: 1.5rem;
}

.panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .9rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--rule-soft);
}

.panel__head h3 { margin: 0; }

.table-wrap { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .89rem;
}

.table th,
.table td {
    text-align: start;
    padding: .8rem .7rem;
    border-bottom: 1px solid var(--rule-soft);
    vertical-align: middle;
}

.table th {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    white-space: nowrap;
    border-bottom-color: var(--rule);
}

.table tbody tr:hover { background: var(--gold-wash); }

.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

.langtabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
}

.langtabs button {
    border: 0;
    background: transparent;
    font-family: var(--sans);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--ink-faint);
    padding: .7rem 1.1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .25s var(--ease), border-color .25s var(--ease);
}

.langtabs button:hover { color: var(--ink); }

.langtabs button.is-active {
    color: var(--ink);
    border-bottom-color: var(--gold);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0;
    margin-bottom: 2rem;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.stat {
    padding: 1.3rem 1.4rem;
    border-inline-start: 1px solid var(--rule-soft);
    background: var(--paper-pure);
}

.stat:first-child { border-inline-start: 0; }

.stat__value {
    font-family: var(--serif);
    font-size: 2.3rem;
    line-height: 1;
    color: var(--ink);
    margin-bottom: .35rem;
}

.stat__label {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: var(--ink);
    position: relative;
    overflow: hidden;
}

.login-shell::before {
    content: "А";
    position: absolute;
    font-family: var(--serif);
    font-size: 90vh;
    font-weight: 300;
    line-height: .7;
    color: rgba(184, 137, 43, .05);
    inset-block-start: -.08em;
    inset-inline-end: -.02em;
    pointer-events: none;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--paper);
    border: 1px solid var(--gold);
    padding: clamp(2rem, 5vw, 3rem);
}

/* Общият размер на h2 е предвиден за цяла страница и не се побира в картата. */
.login-card h2 {
    font-size: 1.7rem;
    line-height: 1.15;
}

.thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    background: var(--paper-3);
    filter: grayscale(.25);
}

/* ==================================================== първоначално зареждане == */
/* Основните keyframes са и инлайн в index.html — тук синхронизираме app.css. */

.app-loading {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 2.25rem;
    padding: 2rem;
    background: #0C1A2B;
    color: #FFFFFF;
}

.app-loading__stage {
    position: relative;
    width: min(200px, 52vw);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.app-loading__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(184, 137, 43, .22);
    border-top-color: #D4A843;
    border-right-color: rgba(212, 168, 67, .55);
    animation: artlandia-spin 1.15s linear infinite;
}

.app-loading__ring::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .08);
}

.app-loading__logo {
    position: relative;
    z-index: 1;
    display: block;
    width: 72%;
    height: auto;
    animation: artlandia-breathe 2s ease-in-out infinite;
}

.app-loading__bar {
    width: min(180px, 48vw);
    height: 2px;
    border-radius: 1px;
    background: rgba(255, 255, 255, .12);
    overflow: hidden;
}

.app-loading__bar span {
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, #D4A843, #B8892B, transparent);
    animation: artlandia-slide 1.25s ease-in-out infinite;
}

@keyframes artlandia-spin {
    to { transform: rotate(360deg); }
}

@keyframes artlandia-breathe {
    0%, 100% { opacity: .7; transform: scale(.97); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes artlandia-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 1.4rem;
    background: var(--ink);
    color: var(--paper);
    font-size: .88rem;
    border-top: 2px solid var(--gold);
}

#blazor-error-ui .reload {
    color: var(--gold-bright);
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    top: .7rem;
    right: 1rem;
}

/* ================================================================ печат == */

/* ======================================================== мобилен UX == */
@media (max-width: 860px) {
    :root {
        --header-h: 64px;
        --gutter: clamp(1rem, 4.5vw, 1.5rem);
        --indent: 0;
    }

    body {
        font-size: 16px;
        padding-left: env(safe-area-inset-left, 0);
        padding-right: env(safe-area-inset-right, 0);
    }

    h1 { font-size: clamp(2.1rem, 11vw, 3.2rem); }
    h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }

    .site-header__inner { min-height: var(--header-h); gap: .75rem; }

    .brand__logo { width: 42px; height: 42px; }

    .brand__tag { display: none; }

    .brand__name {
        font-size: .95rem;
        letter-spacing: .04em;
    }

    .burger {
        width: 44px;
        height: 44px;
        flex: none;
    }

    .hero__inner {
        padding-block: clamp(3.2rem, 10vh, 5rem) clamp(2.4rem, 6vh, 3.5rem);
        max-width: none;
    }

    .hero__motto {
        max-width: none;
        font-size: clamp(1.35rem, 6.2vw, 1.85rem);
    }

    .hero__text {
        font-size: 1rem;
        margin-bottom: 1.8rem;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .btn {
        width: 100%;
        min-height: 48px;
        white-space: normal;
        text-align: center;
    }

    .factbar {
        grid-template-columns: 1fr 1fr;
    }

    .factbar__item {
        padding: 1.15rem .85rem 1.25rem;
        border-inline-start: 0;
        border-top: 1px solid var(--rule-invert-soft);
    }

    .factbar__item:nth-child(-n+2) { border-top: 0; }

    .factbar__item:nth-child(odd) { padding-inline-start: 0; }

    .factbar__item:nth-child(even) {
        border-inline-start: 1px solid var(--rule-invert-soft);
    }

    .index__row {
        grid-template-columns: 2.6rem minmax(0, 1fr);
        gap: .75rem;
        padding: 1.15rem 0;
    }

    .index__row::before { inset: 0 -.25rem; }

    .btn {
        min-height: 46px;
        padding: .9rem 1.25rem;
        letter-spacing: .12em;
    }

    .btn--sm { min-height: 44px; }

    .section-head {
        margin-inline-start: 0;
        max-width: none;
    }

    .container--narrow { max-width: none; }

    .field input,
    .field select,
    .field textarea {
        font-size: 16px; /* без iOS zoom при фокус */
        min-height: 48px;
        padding: .85rem 0;
    }

    .field textarea { min-height: 8rem; }

    .form-panel { padding: 1.35rem 1.1rem; }

    .flex-row {
        flex-direction: column;
        align-items: stretch;
    }

    .flex-row .btn,
    .flex-row .link-arrow {
        width: 100%;
        justify-content: center;
    }

    .values li {
        font-size: clamp(1.15rem, 5.5vw, 1.55rem);
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid--4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .grid--2,
    .grid--3,
    .grid--4 { grid-template-columns: 1fr; }

    .brand__text { display: none; }

    .hero__goldline { width: 7rem; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    /* Спинерът остава видим — единственият feedback при WASM зареждане. */
    .app-loading__ring,
    .app-loading__ring::after {
        animation: artlandia-spin 1.15s linear infinite !important;
        animation-duration: 1.15s !important;
        animation-iteration-count: infinite !important;
    }

    .app-loading__logo {
        animation: artlandia-breathe 2s ease-in-out infinite !important;
        animation-duration: 2s !important;
        animation-iteration-count: infinite !important;
    }

    .app-loading__bar span {
        animation: artlandia-slide 1.25s ease-in-out infinite !important;
        animation-duration: 1.25s !important;
        animation-iteration-count: infinite !important;
    }

    [data-reveal],
    [data-reveal="stagger"] > .index__row,
    [data-reveal="stagger"] > .ledger__row,
    [data-reveal="stagger"] > li,
    [data-reveal="stagger"] > .card {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero__motto {
        -webkit-text-fill-color: var(--gold-bright);
        background: none;
        color: var(--gold-bright);
    }

    .hero__glow,
    .hero__orbit,
    .brand__logo {
        animation: none !important;
    }

    .hero {
        --hero-shift: 0px !important;
        --hero-fade: 1 !important;
    }
}

@media print {
    body::after,
    .site-header,
    .site-footer,
    .hero__actions,
    .admin__side { display: none; }

    body { background: #fff; color: #000; }
}
