/* ============================================================
   NBC Fest2 — лендинг фестиваля «Родина борща» (/fest2/)
   Фирменные цвета: красный #B83519, крем #EFE4D2
   ============================================================ */

/* Шрифт даты фестиваля — Despair Display (в теме: land/fonts/) */
@font-face {
    font-family: 'Despair Display';
    src: url('../../land/fonts/despairdisplay-bold.woff2') format('woff2'),
         url('../../land/fonts/despairdisplay-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* На лендинге общая шапка и футер сайта скрыты */
body.nbc-fest2-page #site-header,
body.nbc-fest2-page #nbc-header,
body.nbc-fest2-page #site-footer,
body.nbc-fest2-page .nbc-footer {
    display: none !important;
}

/* Страница непрокручиваемая: тарелка уходит под нижний край и обрезается.
   Заодно лечит горизонтальный скролл от трюка 50vw. */
body.nbc-fest2-page {
    overflow: hidden !important;
    height: 100vh;
    background: #EFE4D2 !important; /* поля по бокам при масштабировании — тоже беж */
}

.nbc-fest2 {
    --f2-red: #B83519;
    --f2-red-dark: #8f2812;
    --f2-cream: #EFE4D2;
    --f2-cream-light: #f7f0e4;
    --f2-ink: #2b1a12;
    --mx: -999px; /* курсор ещё не был на странице */
    --my: -999px;

    position: relative;
    background-color: var(--f2-cream);
    /* Паттерн: красные точки в шахматном порядке, по дефолту почти невидимые (5%) */
    background-image:
        radial-gradient(circle, rgba(184, 53, 25, .05) 4px, rgba(184, 53, 25, 0) 4.5px),
        radial-gradient(circle, rgba(184, 53, 25, .05) 4px, rgba(184, 53, 25, 0) 4.5px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px; /* второй слой со сдвигом — шахматный порядок */
    color: var(--f2-ink);
    margin: 0 calc(50% - 50vw);
    padding: 0 20px 64px;
    text-align: center;
    font-family: 'Montserrat', Arial, sans-serif;
}

/* Зона вокруг курсора (r=200px): те же точки до 80% непрозрачности,
   чем ближе к курсору — тем ярче; ездит за курсором (JS ставит --mx/--my) */
.nbc-fest2::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: var(--glow, 1); /* 0 — курсор в зоне даты/ссылки, свечение выключено (JS) */
    transition: opacity .25s ease;
    background-image:
        radial-gradient(circle, rgba(184, 53, 25, .8) 4px, rgba(184, 53, 25, 0) 4.5px),
        radial-gradient(circle, rgba(184, 53, 25, .8) 4px, rgba(184, 53, 25, 0) 4.5px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px; /* та же шахматная сетка, что и базовый слой */
    -webkit-mask-image: radial-gradient(circle 200px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, .55) 50%, transparent 100%);
    mask-image: radial-gradient(circle 200px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, .55) 50%, transparent 100%);
}

/* Контент поверх слоя свечения */
.nbc-fest2 > * {
    position: relative;
    z-index: 1;
}

/* ── Шапка лендинга ────────────────────────────────────── */

.nbc-fest2-head {
    position: relative; /* боковые блоки absolute — лого в центре через flex */
    display: flex;
    align-items: flex-start;
    justify-content: center; /* лого (единственный flex-ребёнок) строго по центру */
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 60px; /* отступ от верхнего края */
}

.nbc-fest2-date {
    position: absolute; /* слева вверху, лого в центре не зависит от неё */
    top: 60px; /* padding-top шапки */
    left: 0;
    margin-left: 30px; /* сдвинуто вправо ещё на 20px (было 10px) */
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--f2-red);
    line-height: 1.15;
}

/* В теме font-family с !important (nbc-overrides.css) — перебиваем */
.nbc-fest2 .nbc-fest2-date-num,
.nbc-fest2 .nbc-fest2-date-month {
    font-family: 'Despair Display', 'Montserrat', Arial, sans-serif !important;
}

/* Montserrat на всём лендинге — перебиваем !important темы */
.nbc-fest2 p,
.nbc-fest2 span,
.nbc-fest2 a,
.nbc-fest2 button,
.nbc-fest2 h2,
.nbc-fest2-modal,
.nbc-fest2-modal p,
.nbc-fest2-modal span,
.nbc-fest2-modal a,
.nbc-fest2-modal button,
.nbc-fest2-modal h2 {
    font-family: 'Montserrat', Arial, sans-serif !important;
}

/* Дате возвращаем Despair Display поверх общего правила выше */
.nbc-fest2 .nbc-fest2-date-num,
.nbc-fest2 .nbc-fest2-date-month {
    font-family: 'Despair Display', 'Montserrat', Arial, sans-serif !important;
}

/* Внутренний блок даты: ширина по контенту, ссылка тянется на всю ширину даты */
.nbc-fest2-date-inner {
    display: inline-block;
    text-align: left;
}

.nbc-fest2-sched-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%; /* по ширине даты сверху */
    margin-top: 14px;
    font-size: clamp(10px, 1.26vw, 14px); /* на 30% меньше */
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--f2-red);
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease;
}

.nbc-fest2-sched-link svg {
    width: 1.3em;
    height: 1.3em;
    flex: 0 0 auto;
}

.nbc-fest2-sched-link:hover,
.nbc-fest2-sched-link:focus-visible {
    color: var(--f2-red-dark);
}



.nbc-fest2-date-num {
    display: block;
    font-size: clamp(39px, 5.7vw, 66px); /* +50% */
    font-weight: 800;
}

.nbc-fest2-date-month {
    display: block;
    margin-top: -4px; /* ближе к дате */
    font-size: clamp(22px, 3vw, 33px); /* +50% */
}

.nbc-fest2-logo {
    flex: 0 0 auto;
    position: relative;
    top: -60px; /* на 60px вверх (как изначально) */
    margin-top: -15px;
    /* лого в flex-потоке по центру шапки; боковые блоки absolute — центр не смещается */
}

.nbc-fest2-logo img {
    height: clamp(185px, 29.2vw, 317px); /* +10% */
    width: auto;
    display: block;
    border-radius: 0 0 20px 20px;
}

/* ── «27 сентября — финал в день города» справа от лого ──
   Каждая строка отдельным span, шрифт Despair Display, красный. */
.nbc-fest2-final {
    position: absolute; /* справа вверху, лого в центре не зависит от неё */
    top: 60px;
    right: 0;
    margin-right: 80px; /* сдвинуто вправо на 60px: было 140px → 80px */
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* прижато к правому краю */
    color: var(--f2-red);
    text-align: right;
    line-height: .95;
}

/* Специфичность (0,2,0) — перебивает общий .nbc-fest2 span темы (Montserrat !important).
   Дата обходит тему так же — через .nbc-fest2 .nbc-fest2-date-num. */
.nbc-fest2 .nbc-fest2-final-line {
    display: block;
    font-family: 'Despair Display', 'Montserrat', Arial, sans-serif !important;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

/* «27» — крупнее, цифра финала (на 10% меньше прежнего) */
.nbc-fest2 .nbc-fest2-final-line:first-child {
    font-size: clamp(43px, 6.3vw, 74px);
    line-height: .9;
}

/* «сентября» (на 10% меньше) */
.nbc-fest2 .nbc-fest2-final-line:nth-child(2) {
    font-size: clamp(18px, 2.52vw, 31px);
    margin-top: -2px;
}

/* «финал / в день / города» — на 15px ниже блока «сентября» (на 10% меньше) */
.nbc-fest2 .nbc-fest2-final-line:nth-child(3) {
    font-size: clamp(13.5px, 1.8vw, 22px);
    margin-top: 19px; /* 4px + 15px = 19px */
}

.nbc-fest2 .nbc-fest2-final-line:nth-child(4),
.nbc-fest2 .nbc-fest2-final-line:nth-child(5) {
    font-size: clamp(13.5px, 1.8vw, 22px); /* на 10% меньше */
    margin-top: 4px;
}

/* ── Тарелка 900px, поднята на 50px ────────────────────── */

.nbc-fest2-plate {
    position: relative;
    max-width: 900px;
    margin: -82px auto 0; /* поднята ещё на 30px */
}

.nbc-fest2-plate-img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2; /* тарелка поверх логотипа */
    top: -60px; /* тарелка на 60px вверх, кнопка и расписание на месте */
    filter: drop-shadow(0 24px 40px rgba(43, 26, 18, .28));
}

/* ── Стопка по центру тарелки: чёрный лого «Родина борща» → × → «Локалист» ── */
.nbc-fest2-plate-stack {
    position: absolute;
    top: calc(-8% + 36px); /* весь стек на 5px ниже (как просили) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 4; /* поверх кнопок */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 26%; /* вдвое меньше прежнего 52% */
    pointer-events: none;
}

.nbc-fest2-plate-logo {
    width: 100%;
    max-width: 147px; /* на 5% больше (было 140px) */
    margin-top: 8px;
    height: auto;
    display: block;
}

.nbc-fest2-plate-x {
    margin-top: 2px; /* отступ от верхнего лого +2px */
    margin-bottom: 2px; /* отступ до нижнего лого +2px */
    font-family: 'Despair Display', 'Montserrat', Arial, sans-serif !important;
    font-size: clamp(13px, 1.6vw, 20px); /* меньше */
    font-weight: 700;
    line-height: 1;
    color: var(--f2-red);
}

.nbc-fest2-plate-local {
    margin-top: 0; /* отступ задан margin-bottom у крестика */
    width: 86%; /* на 15% больше (было 75%) */
    max-width: 120px; /* на 15% больше (было 104px) */
    height: auto;
    display: block;
}

/* ── Кнопки стопкой на фото борща ──────────────────────── */

.nbc-fest2-plate-btns {
    position: absolute;
    top: calc(5% + 83px); /* опущены ещё на 6px — под выросшим стеком лого (зазор) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.nbc-fest2-plate-btns .nbc-fest2-btn {
    position: static;
    left: auto;
    margin: 0;
    transform: none;
}

.nbc-fest2-btn {
    display: inline-block;
    min-width: 180px;
    padding: 12px 28px;
    border: 2px solid var(--f2-red);
    border-radius: 20px;
    background: var(--f2-red);
    color: var(--f2-cream-light);
    font-size: clamp(13px, 1.6vw, 16px);
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
    line-height: 1.35;
}

/* «Принять участие» — светлая (крем на борще), без обводки */
.nbc-fest2-btn-apply {
    min-width: 165px; /* на 15px уже */
    padding: 14px 30px; /* компенсация снятой рамки 2px */
    border: none;
    background: var(--f2-cream);
    color: var(--f2-red);
    box-shadow: 0 10px 30px rgba(43, 26, 18, .18); /* мягкая размытая тень */
}

.nbc-fest2-btn span {
    font-weight: 400;
    text-transform: none;
}

.nbc-fest2-btn:hover,
.nbc-fest2-btn:focus-visible {
    background: var(--f2-red-dark);
    border-color: var(--f2-red-dark);
    color: #fff;
}

.nbc-fest2-btn-apply:hover,
.nbc-fest2-btn-apply:focus-visible {
    background: var(--f2-red);
    color: var(--f2-cream-light);
}

/* ── Ссылка «О фестивале» под кнопкой ──────────────────── */

.nbc-fest2-about-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px; /* опущена на 12px ниже кнопки */
    color: var(--f2-cream);
    font-size: clamp(12px, 1.4vw, 14px);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none !important; /* у темы своё подчёркивание ссылок — глушим, оставляем только у span */
    border-bottom: none !important;
    box-shadow: none !important;
    text-shadow: 0 1px 8px rgba(43, 26, 18, .35); /* читаемость на борще */
    transition: color .2s ease;
}

.nbc-fest2-about-link svg {
    width: 1.35em;
    height: 1.35em;
    flex: 0 0 auto;
}

.nbc-fest2-about-link span {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

.nbc-fest2-about-link:hover,
.nbc-fest2-about-link:focus-visible {
    color: #fff;
}

/* ── Расписание ────────────────────────────────────────── */

.nbc-fest2-schedule {
    max-width: 760px;
    margin: 56px auto 0;
    padding: 32px 24px;
    background: var(--f2-cream-light);
    border: 2px dashed var(--f2-red);
    border-radius: 20px;
}

.nbc-fest2-h2 {
    margin: 0 0 12px;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--f2-red);
}

.nbc-fest2-schedule-note {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

/* ── Модалка с формой ──────────────────────────────────── */

.nbc-fest2-modal {
    --f2-red: #B83519;
    --f2-red-dark: #8f2812;
    --f2-cream: #EFE4D2;
    --f2-cream-light: #f7f0e4;
    --f2-ink: #2b1a12;

    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 16px;
    background: rgba(43, 26, 18, .65);
    overflow-y: auto;
    font-family: 'Montserrat', Arial, sans-serif;
    /* плавное появление/закрытие */
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.nbc-fest2-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.nbc-fest2-modal-box {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: var(--f2-cream);
    border-radius: 20px;
    padding: 32px 28px 28px;
    text-align: left;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    overflow: hidden; /* точки не вылезают за радиус */
    /* плавное появление: лёгкий сдвиг и уменьшение */
    transform: translateY(14px) scale(.97);
    transition: transform .25s ease;
}

.nbc-fest2-modal.is-open .nbc-fest2-modal-box {
    transform: none;
}

/* Точки только внизу (~200px), градиентно появляются из пустоты */
.nbc-fest2-modal-box::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 200px;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(184, 53, 25, .12) 4px, rgba(184, 53, 25, 0) 4.5px),
        radial-gradient(circle, rgba(184, 53, 25, .12) 4px, rgba(184, 53, 25, 0) 4.5px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
}

.nbc-fest2-modal-box > * {
    position: relative;
    z-index: 1;
}

/* ── Модалка с положением об участии ───────────────────── */

.nbc-fest2-modal-rules {
    z-index: 100000; /* поверх модалки формы */
}

/* ── Модалка «О фестивале» ─────────────────────────────── */

.nbc-fest2-about-box {
    max-width: 600px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
}

.nbc-fest2-about-box .nbc-fest2-h2 {
    padding-right: 40px; /* не залезать под крестик */
}

.nbc-fest2-about-text {
    flex: 1 1 auto;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.65;
    color: var(--f2-ink);
    scrollbar-width: thin;
    scrollbar-color: var(--f2-red) transparent;
}

.nbc-fest2-about-text::-webkit-scrollbar {
    width: 6px;
}

.nbc-fest2-about-text::-webkit-scrollbar-thumb {
    background: var(--f2-red);
    border-radius: 3px;
}

.nbc-fest2-about-text p {
    margin: 0 0 14px;
}

.nbc-fest2-about-slogan {
    margin: 20px 0 0 !important;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-align: center;
    color: var(--f2-red);
}

/* Слоган — шрифтом даты фестиваля (перебиваем общий Montserrat модалок) */
.nbc-fest2-modal .nbc-fest2-about-slogan {
    font-family: 'Despair Display', 'Montserrat', Arial, sans-serif !important;
}

/* ── Модалка «Спасибо» (автоскрытие 5 сек) ─────────────── */

.nbc-fest2-modal-thanks {
    align-items: center; /* бокс по центру экрана */
    z-index: 100001; /* поверх всех модалок */
}

.nbc-fest2-thanks-box {
    max-width: 440px;
    padding: 44px 32px;
    text-align: center;
}

.nbc-fest2-thanks-text {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.55;
    color: var(--f2-ink);
}

.nbc-fest2-rules-box {
    max-width: 640px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
}

.nbc-fest2-rules-title {
    margin-bottom: 16px;
    padding-right: 30px; /* не залезать под крестик */
    font-size: clamp(13px, 2vw, 18px); /* на 6px меньше */
}

.nbc-fest2-rules-text {
    flex: 1 1 auto;
    overflow-y: auto;
    margin: 0 -6px 18px 0;
    padding-right: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--f2-ink);
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--f2-red) transparent;
}

/* Тонкий скроллбар с кирпичным ползунком (Chrome/Safari/Edge) */
.nbc-fest2-rules-text::-webkit-scrollbar {
    width: 6px;
}

.nbc-fest2-rules-text::-webkit-scrollbar-track {
    background: transparent;
}

.nbc-fest2-rules-text::-webkit-scrollbar-thumb {
    background: var(--f2-red);
    border-radius: 3px;
}

.nbc-fest2-rules-text h3 {
    margin: 20px 0 6px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--f2-red);
}

.nbc-fest2-rules-text h3:first-child {
    margin-top: 0;
}

.nbc-fest2-rules-text p {
    margin: 0 0 8px;
}

/* Выделенный блок-предупреждение: красный фон, белый текст */
.nbc-fest2-rules-highlight {
    margin: 14px 0 8px;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--f2-red);
    color: #fff;
}

.nbc-fest2-rules-highlight p {
    margin: 0;
    color: #fff;
    font-weight: 600;
}

.nbc-fest2-rules-highlight p + p {
    margin-top: 6px;
}

.nbc-fest2-rules-text ul {
    margin: 0 0 8px;
    padding-left: 20px;
}

.nbc-fest2-rules-text li {
    margin-bottom: 3px;
}

.nbc-fest2-rules-text li::marker {
    color: var(--f2-red);
}

.nbc-fest2-rules-box .nbc-fest2-rules-ok {
    flex: 0 0 auto;
    align-self: center;
    width: 50%;
    font-size: 15px; /* чтобы текст влез в одну строку */
    white-space: nowrap;
}

.nbc-fest2-rules-ok[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

/* Красный алерт у чекбокса правил */
.nbc-fest2-check-alert {
    display: none;
    margin: 4px 0 6px 34px;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--f2-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.nbc-fest2-check-alert.is-show {
    display: inline-block;
    animation: nbc-f2-fade .2s ease;
}

/* Крестик: кирпичный круг, бежевый × */
.nbc-fest2-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 40px; /* на 2px меньше */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px;
    border: none;
    border-radius: 50%;
    background: var(--f2-red);
    color: var(--f2-cream-light);
    font-size: 28px; /* × на 2px крупнее */
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease;
}

.nbc-fest2-modal-close:hover {
    background: var(--f2-red-dark);
    transform: scale(1.07);
}

/* Заголовок формы: на 4px меньше, отступ до подзаголовка −7px */
#nbcFest2FormTitle {
    margin-bottom: 5px;
    font-size: clamp(18px, 2.6vw, 28px);
}

.nbc-fest2-form-sub {
    margin: 0 0 20px;
    font-size: 18px; /* на 4px больше */
    color: #6b5a4e;
}

.nbc-fest2-field {
    position: relative;
    display: block;
    margin-bottom: 8px;
    padding-top: 22px; /* место под всплывший лейбл */
}

/* Плавающий лейбл: внутри поля, при фокусе/вводе уезжает вверх */
.nbc-fest2-label {
    position: absolute;
    left: 2px;
    top: 33px;
    font-size: 15px;
    font-weight: 500;
    color: #8a7360;
    pointer-events: none;
    transition: top .2s ease, font-size .2s ease, color .2s ease, font-weight .2s ease;
}

.nbc-fest2-field input:focus + .nbc-fest2-label,
.nbc-fest2-field input:not(:placeholder-shown) + .nbc-fest2-label,
.nbc-fest2-field textarea:focus + .nbc-fest2-label,
.nbc-fest2-field textarea:not(:placeholder-shown) + .nbc-fest2-label {
    top: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--f2-red);
}

.nbc-fest2-label i,
.nbc-fest2-check i {
    color: var(--f2-red);
    font-style: normal;
}

/* Поля: без фона, обводка только снизу */
.nbc-fest2-field input[type="text"],
.nbc-fest2-field input[type="url"],
.nbc-fest2-field textarea {
    width: 100%;
    padding: 11px 2px 8px;
    border: none;
    border-bottom: 2px solid #cbbba5;
    border-radius: 0;
    background: transparent;
    font: inherit;
    color: var(--f2-ink);
    box-sizing: border-box;
    transition: border-color .2s ease;
}

.nbc-fest2-field textarea {
    resize: vertical;
}

.nbc-fest2-field input:focus,
.nbc-fest2-field textarea:focus {
    outline: none;
    border-bottom-color: var(--f2-red);
}

/* Поле файла: скрытый нативный input + стильная кнопка */
.nbc-fest2-field-file {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 8px;
    cursor: pointer;
}

.nbc-fest2-field-file input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.nbc-fest2-file-btn {
    flex: 0 0 auto;
    padding: 10px 20px;
    border-radius: 20px;
    background: var(--f2-red);
    color: var(--f2-cream-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    transition: background .2s ease, transform .15s ease;
}

.nbc-fest2-field-file:hover .nbc-fest2-file-btn {
    background: var(--f2-red-dark);
    transform: translateY(-1px);
}

.nbc-fest2-file-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: left;
}

.nbc-fest2-file-caption {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--f2-red);
}

.nbc-fest2-file-name {
    font-size: 13px;
    color: #8a7360;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nbc-fest2-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0;
    font-size: 12px; /* на 2px меньше */
    line-height: 1.45;
    cursor: pointer;
}

.nbc-fest2-check input {
    appearance: none;
    -webkit-appearance: none;
    margin: 1px 0 0;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border: 2px solid var(--f2-red);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: background .15s ease;
}

.nbc-fest2-check input:checked {
    background: var(--f2-red);
}

/* Галочка */
.nbc-fest2-check input:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--f2-cream-light);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.nbc-fest2-check input:focus-visible {
    outline: 2px solid var(--f2-red);
    outline-offset: 2px;
}

.nbc-fest2-check a {
    color: var(--f2-red);
    text-decoration: underline;
}

.nbc-fest2-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.nbc-fest2-form-msg {
    min-height: 20px;
    margin: 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.nbc-fest2-form-msg.is-ok { color: #1d7a3a; }
.nbc-fest2-form-msg.is-err { color: var(--f2-red); }

.nbc-fest2-btn-submit {
    position: static;
    transform: none;
    width: 100%;
}

.nbc-fest2-btn-submit[disabled] {
    opacity: .6;
    cursor: wait;
}

/* ── Адаптив ───────────────────────────────────────────── */

/* Мобильная версия: нормальная вёрстка без JS-масштаба (fitFest на ≤720px выкл.).
   Шапка — grid: лого слева на 2 строки (прибито к верхнему левому углу),
   партнёры справа, дата сразу под ними по правому краю; тарелка прибита к низу. */
@media (max-width: 720px) {
    body.nbc-fest2-page {
        height: 100vh;
        height: 100dvh; /* без учёта строки адреса в моб. браузерах */
    }

    .nbc-fest2 {
        height: 100vh;
        height: 100dvh;
        overflow: hidden; /* тарелка под краем обрезается здесь, а не body */
        padding: 0 16px 0 0; /* лого приклеено к левому краю, справа поля 16px */
    }

    /* ── Шапка: grid — лого слева на 2 строки, партнёры и дата в правой колонке ── */
    .nbc-fest2-head {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: start;
        justify-items: end; /* партнёры и дата — по правому краю */
        column-gap: 12px;
        max-width: none;
        padding-top: 0; /* лого прибито к верхнему краю */
    }

    .nbc-fest2-logo {
        position: relative;
        top: auto;
        margin-top: 0;
        margin-left: 20px; /* отступ слева от края */
        grid-column: 1;
        grid-row: 1 / 3; /* три строки: партнёры + дата справа */
        justify-self: start;
    }

    /* +30% к прежнему мобильному (166px → ~216px) */
    .nbc-fest2-logo img {
        height: clamp(143px, 55vw, 216px);
    }

    /* «27 сентября — финал в день города» — теперь ПОД датой «13–27 сентября» */
    .nbc-fest2-final {
        position: relative; /* на десктопе absolute — на моб возвращаем в grid-поток */
        top: auto;
        right: auto;
        grid-column: 2;
        grid-row: 2; /* было row 1 — теперь снизу */
        align-items: flex-end;
        margin-top: 8px;
        margin-right: 0; /* десктопный сдвиг на моб не нужен */
    }

    .nbc-fest2-final-line:first-child {
        font-size: clamp(40px, 13vw, 60px);
    }

    .nbc-fest2-final-line:nth-child(2) {
        font-size: clamp(18px, 5.5vw, 26px);
    }

    /* «финал» — на 10px ниже блока «сентября» (было +15px, на 5px ближе) */
    .nbc-fest2-final-line:nth-child(3) {
        font-size: clamp(13px, 4vw, 19px);
        margin-top: 13px; /* было 18px, −5px ближе к «27 сентября» */
    }

    .nbc-fest2-final-line:nth-child(4),
    .nbc-fest2-final-line:nth-child(5) {
        font-size: clamp(13px, 4vw, 19px);
        margin-top: 3px;
    }

    /* Дата «13–27 сентября» — теперь СВЕРХУ, над финал-блоком */
    .nbc-fest2-date {
        position: relative; /* на десктопе absolute — на моб возвращаем в grid-поток */
        top: auto;
        left: auto;
        grid-column: 2;
        grid-row: 1; /* было row 2 — теперь сверху */
        display: flex;
        justify-content: flex-end;
        margin-top: 20px;
        margin-left: 0; /* десктопный сдвиг на моб не нужен */
    }

    .nbc-fest2-date .nbc-fest2-sched-link {
        display: none;
    }

    /* ── Тарелка: прибита к низу, уменьшена на 10%, опущена на 50px ── */
    .nbc-fest2-plate {
        position: absolute;
        left: 50%;
        bottom: calc(100px - 30vw);
        transform: translateX(-50%);
        width: 108vw;
        max-width: none;
        margin: 0;
    }

    .nbc-fest2-plate-img {
        top: 0;
    }

    /* Стопка лого на тарелке — оба лого на 10px выше; Локалист +10% */
    .nbc-fest2-plate-stack {
        top: calc(-4% - 10px); /* было -4%, поднято на 10px */
        width: 27%;
    }

    .nbc-fest2-plate-logo {
        max-width: none;
    }

    .nbc-fest2-plate-local {
        max-width: none;
        width: 75%; /* +10% к десктопным 68% — Локалист крупнее */
    }

    /* ── Кнопка: на 10px ниже, чтобы под ней помещался стек лого ── */
    .nbc-fest2-plate-btns {
        top: calc(3% + 63px); /* было +53px, опущено на 10px */
    }

    .nbc-fest2-plate-btns .nbc-fest2-btn {
        transform: scale(.9);
    }

    /* «О фестивале» — на 5px выше (ближе к кнопке «Принять участие») */
    .nbc-fest2-about-link {
        margin-top: 7px; /* было 12px, поднято на 5px */
    }

    /* Кнопка «С правилами ознакомился» в модалке — в одну строку, не вылезает за край */
    .nbc-fest2-rules-box .nbc-fest2-rules-ok {
        width: 100%;
        min-width: 0;
        padding: 12px 10px;
        font-size: clamp(11px, 3.6vw, 14px);
        white-space: nowrap;
    }
}



/* ── Анимация загрузки страницы ──────────────────────────
   0мс: пустой бежевый фон с паттерном
   300мс: шапка выезжает сверху (лого → дата → партнёры), 1000мс
   700мс: тарелка выезжает снизу, раскручиваясь -90° → 0°, 1500мс
   2500мс: кнопка «Принять участие» — fade in, 200мс */

@keyframes nbc-f2-drop {
    from { transform: translateY(-160%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

@keyframes nbc-f2-plate-in {
    from { transform: translateY(70vh) rotate(-90deg); opacity: 0; }
    to   { transform: translateY(0)    rotate(0deg);   opacity: 1; }
}

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

/* Появление кнопки и ссылки: слайд снизу вверх на 50px + fade, 200мс.
   Анимируем свойство translate (а не transform) — иначе на мобильном
   слетел бы transform: scale(.9) у кнопки. */
@keyframes nbc-f2-rise {
    from { translate: 0 50px; opacity: 0; }
    to   { translate: 0 0;    opacity: 1; }
}

.nbc-fest2-logo {
    animation: nbc-f2-drop 1s cubic-bezier(.22, .8, .3, 1) .3s both;
}

.nbc-fest2-date {
    animation: nbc-f2-drop 1s cubic-bezier(.22, .8, .3, 1) .5s both;
}

.nbc-fest2-final {
    animation: nbc-f2-drop 1s cubic-bezier(.22, .8, .3, 1) .7s both;
}

.nbc-fest2-plate-img {
    animation: nbc-f2-plate-in 1.5s cubic-bezier(.22, .8, .3, 1) .7s both;
}

/* Стопка лого на тарелке — появляется после тарелки, fade + лёгкий подъём */
.nbc-fest2-plate-stack {
    animation: nbc-f2-rise .5s ease 1.9s both;
}

/* Кнопка — в 2300мс, ссылка «О фестивале» — на 200мс позже */
.nbc-fest2-plate-btns .nbc-fest2-btn-apply {
    animation: nbc-f2-rise .4s ease 2.3s both;
}

.nbc-fest2-about-link {
    animation: nbc-f2-rise .4s ease 2.5s both;
}

/* Уважение к настройке «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
    .nbc-fest2-logo,
    .nbc-fest2-date,
    .nbc-fest2-final,
    .nbc-fest2-plate-img,
    .nbc-fest2-plate-stack,
    .nbc-fest2-plate-btns .nbc-fest2-btn-apply,
    .nbc-fest2-about-link {
        animation: none !important;
    }
}

/* ============================================================
   Фиксированная карусель логотипов внизу экрана (бегущая строка)
   — Десктоп: 1200px по центру, 6 лого в кадре
   — Моб: во всю ширину, ~2 лого в кадре
   — Едет справа-налево, pause on hover
   — Затухание по краям (маска), серый градиентный фон снизу
   ============================================================ */

.nbc-fest2-carousel {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 1200px;
    max-width: 100vw; /* моб — во всю ширину */
    z-index: 50; /* поверх лендинга, но под модалками (99999) */
    overflow: hidden; /* лого уезжают за края, затухают через маску */
    background: transparent; /* фон вынесен в ::before, чтобы не гаснуть вместе с лого по краям */
    padding: 18px 0 14px;
    /* затухание лого по бокам */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
}

/* Бледно-серый размытый фон под лого: затухает по бокам (в прозрачность)
   и мягче, чем маска самих лого. Лежит на тарелке — лого читаются. */
.nbc-fest2-carousel::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -10px; /* чуть выше контейнера, чтобы градиент начинался плавно */
    bottom: 0;
    z-index: -1;
    /* серый, полупрозрачный, размытый; плавная заливка сверху-вниз */
    background: linear-gradient(to bottom, rgba(220, 210, 198, 0) 0%, rgba(220, 210, 198, .45) 35%, rgba(200, 188, 172, .65) 100%);
    filter: blur(8px);
    /* затухание по бокам — мягче, чем у самих лого */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
    pointer-events: none;
}

/* Дорожка: два одинаковых ряда лого подряд → бесшовный loop */
.nbc-fest2-carousel-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    /* анимация: сдвиг ровно на половину дорожки (один ряд) → стык незаметен */
    animation: nbc-f2-carousel-scroll 32s linear infinite;
}

.nbc-fest2-carousel:hover .nbc-fest2-carousel-track {
    animation-play-state: paused;
}

/* Каждый слот фиксированной ширины: 6 в кадре по 1200px → 200px (десктоп).
   Лого внутри центрируются и нормализованы по высоте — широкие не раздуваются. */
.nbc-fest2-carousel-item {
    flex: 0 0 200px;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    box-sizing: border-box;
}

.nbc-fest2-carousel-item img {
    /* нормализация: все лого одной высоты, ширина по пропорциям → визуально одинаковы */
    height: 46px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    filter: grayscale(1) opacity(.78); /* унификация под серый фон */
    transition: filter .25s ease;
}

.nbc-fest2-carousel-item:hover img {
    filter: grayscale(0) opacity(1);
}

/* Индивидуальные размеры логотипов (поверх нормализации по высоте) */
/* BB.svg — на 15% меньше (46px → 39px) */
.nbc-fest2-carousel-item img[src*="BB.svg"] {
    height: 39px;
}

/* kk.svg — на 10% больше (46px → 51px) */
.nbc-fest2-carousel-item img[src*="kk.svg"] {
    height: 51px;
}

@keyframes nbc-f2-carousel-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); } /* ровно один ряд из двух */
}

/* ── Моб. версия карусели: во всю ширину, ~2 лого в кадре ── */
@media (max-width: 720px) {
    .nbc-fest2-carousel {
        width: 100vw;
        padding: 14px 0 12px;
    }

    .nbc-fest2-carousel-item {
        flex: 0 0 33.333vw; /* 3 лого одновременно */
        max-width: 33.333vw;
        padding: 0 8px; /* отступы меньше, чтобы лого не сжались */
    }

    .nbc-fest2-carousel-item img {
        height: 40px;
    }

    /* на моб пауза при наведении не нужна (тач) — медленнее */
    .nbc-fest2-carousel-track {
        animation-duration: 26s;
    }
}

/* Карусель — без анимации при «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
    .nbc-fest2-carousel-track {
        animation: none !important;
    }
}
