/*
 * Публичный CSS-модуль.
 *
 * Модуль: header-footer.
 *
 * Временный этап точного переноса из site-core.css.
 *
 * Важно:
 * - все правила ниже дословно соответствуют существующим правилам
 *   в site-core.css;
 * - в site-core.css они пока остаются только для проверки;
 * - после визуальной проверки те же блоки будут удалены из site-core.css
 *   без изменения порядка и значений деклараций.
 */

/* ============================================================
   Доступность и индикатор чтения
   ============================================================ */

.skip-link {
    position: fixed;
    left: 16px;
    top: -60px;
    z-index: 100;
    background: var(--dark);
    color: var(--white);
    padding: 10px 14px;
}

.skip-link:focus {
    top: 16px;
}

.reading-progress {
    position: fixed;
    z-index: 100;
    inset: 0 auto auto 0;
    height: 3px;
    width: 0;
    background: var(--accent);
}

/* ============================================================
   Шапка – обновлённая структура
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 243, 239, .95);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

/* ===== Строки шапки ===== */

.site-header__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.site-header__row--top {
    border-bottom: 1px solid var(--line);
}

.site-header__row--main {
    padding: 12px 0;
}

/* ===== Верхняя строка ===== */

.site-header__eyebrow {
    font: 11px/1.2 var(--ui);
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
}

.site-header__date {
    font: 11px/1.2 var(--ui);
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
}

/* ===== Логотип ===== */

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 700;
    font-family: var(--display);
    letter-spacing: -.04em;
    text-decoration: none;
}

.site-logo__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--white);
    background: var(--accent);
    font-size: 22px;
    border-radius: 4px;
}

.site-logo__word {
    white-space: nowrap;
}

/* ===== Иконки справа ===== */

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-nav-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.site-nav-dropdown-toggle {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
    padding: 4px 8px;
}

.site-nav-dropdown-toggle:hover {
    color: var(--accent);
}

.site-nav-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 8px 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-nav-dropdown a {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--ink);
    font: 13px/1.4 var(--ui);
    transition: background 0.15s ease;
}

.site-nav-dropdown a:hover {
    background: var(--soft);
    color: var(--accent);
}

.site-nav-dropdown a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.icon-link {
    font-size: 27px;
    text-decoration: none;
    line-height: 1;
}

.menu-toggle {
    display: none;
    font: 12px var(--ui);
    text-transform: uppercase;
    letter-spacing: .08em;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* ===== Строка рубрик ===== */

.site-header__nav {
    border-bottom: 2px solid var(--line-strong);
    background: var(--paper);
}

.site-header__nav .site-container {
    display: flex;
    justify-content: center;
}

.site-nav {
    display: flex;
    gap: 28px;
    padding: 10px 0;
    font: 12px/1 var(--ui);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.site-nav a {
    text-decoration: none;
    color: var(--ink);
    transition: color 0.15s ease;
}

.site-nav a:hover {
    color: var(--accent);
}

/* ===== Мобильное меню ===== */

.site-header__mobile-nav {
    display: none;
    padding: 16px 0 20px;
}

.mobile-nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-section__title {
    font: 11px/1.2 var(--ui);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 6px;
}

.mobile-nav-divider {
    border: none;
    border-top: 1px solid var(--line);
    margin: 12px 0;
}

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

.site-footer {
    margin-top: 70px;
    padding: 54px 0 18px;
    background: var(--dark);
    color: var(--white);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 50px;
}

.site-footer__brand {
    font: 700 32px var(--display);
    text-decoration: none;
}

.site-footer__tagline {
    max-width: 330px;
    color: #aaa69e;
    font-size: 16px;
}

.site-footer__label {
    margin-bottom: 14px;
    color: #e56b5e;
    font: 10px var(--ui);
    text-transform: uppercase;
    letter-spacing: .12em;
}

.site-footer__links {
    display: grid;
    gap: 8px;
    font: 14px var(--ui);
}

.site-footer__links a {
    text-decoration: none;
}

.site-footer__small {
    color: #aaa69e;
    font: 14px var(--ui);
}

.footer-cta {
    color: var(--white);
    font: 12px var(--ui);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 48px;
    padding-top: 15px;
    border-top: 1px solid #3b3b38;
    color: #77736d;
    font: 10px var(--ui);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ============================================================
   Адаптивность для новой шапки
   ============================================================ */

@media (max-width: 1050px) {
    .site-header__nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .site-header__mobile-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        font: 12px var(--ui);
        text-transform: uppercase;
    }

    .site-header__mobile-nav a {
        text-decoration: none;
        color: var(--ink);
        font: 13px/1.4 var(--ui);
        padding: 4px 0;
    }

    .site-header__mobile-nav a:hover {
        color: var(--accent);
    }
}

@media (max-width: 760px) {
    .site-header__date {
        display: none;
    }

    .site-header__mobile-nav {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .site-header__row--main {
        padding: 8px 0;
    }

    .site-logo {
        font-size: 23px;
    }

    .site-logo__mark {
        width: 29px;
        height: 29px;
        font-size: 18px;
    }
}

@media (max-width: 640px) {
    .site-header__mobile-nav {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ============================================================
   Адаптивность подвала
   ============================================================ */

@media (max-width: 640px) {
    .site-footer {
        margin-top: 48px;
        padding-top: 38px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .site-footer__bottom {
        flex-direction: column;
        gap: 8px;
        margin-top: 32px;
    }
}