/* ═══════════════════════════════════════════
   BASE — переменные, сброс, хедер, общие компоненты
   ═══════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
    --bg: radial-gradient(50% 50% at 50% 50%, #293949 0%, #101520 100%);

    --content-max-width: 1372px;

    --bg-alt: #0c1019;
    --core: rgba(255, 238, 0, 1);
    --core-gradient: rgba(133, 125, 11, 1);
    --ice: rgba(0, 227, 255, 1);
    --ice-gradient: rgba(230, 248, 251, 1);
    --acid: rgba(132, 255, 6, 1);
    --acid-gradient: rgba(13, 74, 34, 1);
    --pink: rgba(255, 0, 208, 1);
    --text: #d3f0fe;
    --dim: #b8cad6;
    --muted: #717171;
    --border: rgba(211, 240, 254, 0.15);
    --blue: #00e3ff;

    --font-latin: 'Orbitron', sans-serif;
    --font-kiril: 'Tektur', sans-serif;

    /* Стекло (единый рецепт) */
    --glass-solid-bg: rgba(16, 21, 31, 1);
    --glass-bd: #d3f0fe;
    --glass-sh: 0 4px 4px rgba(0, 0, 0, 0.25), inset 0 4px 33px rgba(255, 255, 255, 0.28);
}

/* ─── RESET ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Custom cursors ─── */
html,
body {
    cursor: url('../assets/img/cursor/cursor_default.png') 15 10, auto !important;
}

a, button, [role='button'],
label[for], select,
.nav-btn-wrap, .mob-nav-link, .mob-menu-btn,
.slide-btn, .ac-card, .page-back-wrap,
.hdr-logo, .hdr-audio-btn, .mob-bar-logo .slider-track {
    cursor: url('../assets/img/cursor/cursor_pointer.png') 15 10, pointer !important;
}

input, textarea, [contenteditable] {
    cursor: url('../assets/img/cursor/cursor_text.png') 6 17, text !important;
}

html {
    overflow-x: hidden;
    overflow-y: auto;
}

* {
    text-align: left;
    text-wrap: pretty;

    hyphens: auto;
    -webkit-hyphens: auto;

    hyphenate-limit-chars: 6 3 2;
}

body {
    background: var(--bg);
    background-image: url('../assets/img/bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    padding-block: 50px;
    padding-inline: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(255, 255, 255, 0.15) 3px);
    animation: scan 10s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }
    55% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(100%);
    }
}

.main-container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ═══════════════════════════════════════════
   HEADER — стеклянная плавающая панель
   ═══════════════════════════════════════════ */

/* Обёртка — только relative + margin */
.header-wrap {
    position: relative;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 25px;
}

/* Слой рамки + тени.
 * inset: -2px — элемент на 2px больше со всех сторон чем .glass,
 * поэтому его фон виден как полоска вокруг стекла, включая диагонали среза. */
.glass-glow {
    --color: var(--glass-bd);
    --cs: 10px;
    position: absolute;
    inset: -2px;
    z-index: 0;
    pointer-events: none;
    background: transparent !important;
    clip-path: polygon(
        var(--cs) 0%,
        calc(100% - var(--cs)) 0%,
        100% var(--cs),
        100% calc(100% - var(--cs)),
        calc(100% - var(--cs)) 100%,
        var(--cs) 100%,
        0% calc(100% - var(--cs)),
        0% var(--cs)
    );
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
    box-shadow: inset 0 2px 18px var(--color);
}

.glass-glow.glass-width-bg {
    background: var(--glass-solid-bg) !important;
}

/* Универсальный класс матового стекла со срезанными углами */
.glass {
    --cs: 8px;
    position: relative;
    z-index: 1;
    box-shadow: var(--glass-sh);
    backdrop-filter: blur(4px);
    clip-path: polygon(
        var(--cs) 0%,
        calc(100% - var(--cs)) 0%,
        100% var(--cs),
        100% calc(100% - var(--cs)),
        calc(100% - var(--cs)) 100%,
        var(--cs) 100%,
        0% calc(100% - var(--cs)),
        0% var(--cs)
    );
}

.glass.glass-with-blik::after {
    content: '';
    position: absolute;
    left: -20px;
    top: -20px;
    background: url('../assets/img/blik.svg') no-repeat left top;
    background-size: 60% auto;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.glass-header {
    box-shadow:
        0px 4px 4px 0px rgba(0, 0, 0, 0.25),
        0px 4px 33.4px 0px rgba(255, 255, 255, 0.3) inset !important;
}

.glass-buttons-bg {
    box-shadow:
        0px 4px 4px 0px rgba(0, 0, 0, 0.25),
        0px 4px 33.4px 0px rgba(255, 255, 255, 0.3) inset;
}

.glass-buttons-glow {
    box-shadow: inset 0 2px 12px var(--color);
}

.glass-text-block {
    background: radial-gradient(53.39% 106.7% at 75.54% 2.76%, rgba(63, 93, 121, 0.83) 0%, rgba(25, 32, 43, 0.83) 100%);
}

.hdr-main {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 22px;
    justify-content: space-between;
}

/* ─── Левая группа: лого + разделитель + теги ─── */
.hdr-logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    margin-right: 28px;
}

.hdr-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.hdr-logo img {
    height: 45px;
    width: auto;
    display: block;
}

.hdr-sep {
    width: 1px;
    height: 45px;
    background: var(--glass-bd);
    flex-shrink: 0;
}

.hdr-tags {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hdr-tag {
    font-family: var(--font-latin);
    font-size: 18px;
    color: var(--dim);
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* ─── Правая группа: статус + разделитель + часы ─── */
.hdr-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-left: 28px;
}

.hdr-status-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}

.hdr-stag em {
    font-style: normal;
    color: var(--acid);
    display: inline-block;
}

.hdr-stag {
    font-family: var(--font-latin);
    font-size: 18px;
    color: var(--dim);
    letter-spacing: 0.07em;
    white-space: nowrap;
    background: none;
    border: none;
    padding: 0;
    text-align: right;
}

.hdr-stag img {
    position: relative;
    top: 1px;
}

.hdr-audio-btn em {
    font-style: normal;
    color: var(--pink);
    display: inline-block;
}

.hdr-audio-btn.is-on em {
    color: var(--acid);
}

.hdr-clock {
    font-family: var(--font-latin);
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.hdr-clock * {
    overflow-wrap: normal;
}

.clock-part {
    display: inline-block;
    width: 32px;
    text-align: center;
}

.clock-colon {
    font-family: var(--font-latin);
    display: inline-block;
    text-align: center;
    opacity: 0.5;
    flex-shrink: 1;
    margin: 0 2px;
    color: #fff;
}

/* ─── Мобильное меню (скрыто на десктопе) ─── */
.mob-nav {
    display: none;
}

.mob-bar {
    display: none;
}

.mob-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: transparent;
    pointer-events: none;
}

.mob-overlay.open {
    pointer-events: all;
}

/* ═══════════════════════════════════════════
   ОБЩИЕ КОМПОНЕНТЫ
   ═══════════════════════════════════════════ */

.page {
    position: relative;
    z-index: 1;
    height: 722px;
    flex-shrink: 0;
    overflow: hidden;
    width: 100%;
}

/* Кнопки навигации — стекло */
.sec-nav {
    display: flex;
    gap: 24px;
}

.btn-nav {
    font-family: var(--font-latin);
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    height: 54px;
    background: radial-gradient(ellipse at 50% 50%, rgba(63, 93, 121, 0.83) 0%, rgba(25, 32, 43, 0.83) 100%);
    border: 1px solid var(--glass-bd);
    box-shadow: var(--glass-sh);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition:
        border-color 0.2s,
        color 0.2s;
    white-space: nowrap;
}
.btn-nav:hover {
    border-color: var(--ice);
    color: var(--ice);
}

/* Hazard stripe */
.hazard {
    background: repeating-linear-gradient(45deg, var(--core) 0, var(--core) 14px, var(--bg-alt) 14px, var(--bg-alt) 28px);
}

/* ─── RESPONSIVE ─── */

/* ── Планшет: ниже 1400px десктоп не влазит — включаем скролл ── */
@media (max-width: 1400px) {
    body {
        padding-block: 30px;
        align-items: flex-start;
    }

    .page {
        height: auto;
        flex-shrink: 1;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 600px) {
    .sec-nav {
        flex-direction: column;
    }
    .btn-nav {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════
   SHARED — полоса загрузки (splash + main)
   ═══════════════════════════════════════════ */

.loader-track {
    height: 28px;
    overflow: hidden;
    position: relative;
    background: repeating-linear-gradient(-45deg, #2a2a2a 0, #2a2a2a 12px, #111416 12px, #111416 24px);
}

.loader-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    background: repeating-linear-gradient(-45deg, var(--core) 0, var(--core) 12px, var(--bg-alt) 12px, var(--bg-alt) 24px);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.4s ease;
}

.loader-label {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-latin);
    font-size: 9px;
    color: rgba(255, 238, 0, 0.75);
    letter-spacing: 0.18em;
    z-index: 1;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════
   КНОПКА НАЗАД — общая для всех страниц
   ═══════════════════════════════════════════ */

.page-back-wrap {
    position: relative;
    flex-shrink: 0;
}

.page-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 54px;
    font-family: var(--font-kiril);
    font-size: 20px;
    color: var(--text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0;
    transition: color 0.2s;
}

.page-back-arrow {
    display: inline-block;
    position: relative;
    top: -2px;
}

.page-back-wrap:hover .glass-glow {
    --color: var(--blue);
}

.page-back-wrap:hover .glass {
    box-shadow:
        0px 4px 4px 0px #00000040,
        0px 4px 33.4px 0px #00e3ffcc inset;
}

.page-back-wrap:hover .page-back {
    color: var(--blue);
}

/* ═══════════════════════════════════════════
   НАВИГАЦИЯ — общая для всех страниц
   ═══════════════════════════════════════════ */

.nav-wrap {
    margin-top: 16px;
    width: 100%;
    gap: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 3px;
}

.nav-btn-wrap {
    position: relative;
}

.nav-btn-wrap .glass {
    box-shadow:
        0px 4px 4px 0px #00000040,
        0px 4px 33.4px 0px #ffffff1a inset;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-btn {
    width: 100%;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-kiril);
    font-size: 20px;
    color: var(--text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

.nav-btn-wrap:hover .glass-glow {
    --color: var(--blue);
}

.nav-btn-wrap:hover .glass {
    box-shadow:
        0px 4px 4px 0px #00000040,
        0px 4px 33.4px 0px #00e3ffcc inset;
}

.nav-btn-wrap.active .glass-glow {
    --color: var(--blue);
}

.nav-btn-wrap.active .glass {
    box-shadow:
        0px 4px 4px 0px #00000040,
        0px 4px 33.4px 0px #00e3ffcc inset;
}

.nav-bracket {
    display: inline-block;
    min-width: 0.6em;
    text-align: center;
}

.nav-bracket.is-arrow {
    position: relative;
    top: -2px;
}

.nav-btn-wrap.active {
    pointer-events: none;
}

@keyframes bracket-glitch {
    0% {
        opacity: 1;
        transform: scaleX(1) translateX(0);
    }
    20% {
        opacity: 0.1;
        transform: scaleX(0.4) translateX(-2px);
    }
    40% {
        opacity: 0.9;
        transform: scaleX(1.3) translateX(1px);
    }
    60% {
        opacity: 0.2;
        transform: scaleX(0.6) translateX(2px);
    }
    80% {
        opacity: 0.7;
        transform: scaleX(1.1) translateX(-1px);
    }
    100% {
        opacity: 1;
        transform: scaleX(1) translateX(0);
    }
}

.nav-bracket.is-glitching {
    animation: bracket-glitch 0.35s steps(1) forwards;
}

/* ═══════════════════════════════════════════
   СТАТУС-ПОЛОСА — фиксированная снизу
   ═══════════════════════════════════════════ */

.page-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 30px;
    flex-shrink: 0;
    background: #000000;
}

.page-bottom-bar span {
    font-family: var(--font-latin);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.pb-cursor {
    display: inline-block;
    margin-left: 3px;
    position: relative;
    top: -1px;
    color: var(--muted);
    animation: pb-blink 1s step-end infinite;
}

@keyframes pb-blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.pb-glitch {
    animation: pb-glitch-flash 0.26s steps(1) forwards;
}

@keyframes pb-glitch-flash {
    0% {
        opacity: 1;
        color: var(--muted);
    }
    15% {
        opacity: 0;
        color: var(--acid);
    }
    30% {
        opacity: 1;
        color: var(--acid);
    }
    50% {
        opacity: 0;
        color: var(--acid);
    }
    70% {
        opacity: 1;
        color: var(--acid);
    }
    85% {
        opacity: 0;
        color: var(--acid);
    }
    100% {
        opacity: 1;
        color: var(--muted);
    }
}

/* ═══════════════════════════════════════════
   PANEL-EDGE — декоративные акцентные полоски
   ═══════════════════════════════════════════ */

.panel-edge {
    position: absolute;
    pointer-events: none;
    z-index: 4;
    background: var(--lc, var(--glass-bd));
    opacity: 0.22;
}

.panel-edge--left,
.panel-edge--right {
    width: 10px;
    height: 120px;
    transform: translateY(-50%);
    top: 50%;
}

.panel-edge--left {
    left: -1px;
    clip-path: polygon(0 0, 100% 9%, 100% 91%, 0 100%);
}

.panel-edge--right {
    right: -1px;
    clip-path: polygon(0 9%, 100% 0, 100% 100%, 0 91%);
}

.panel-edge--top,
.panel-edge--bottom {
    --gradient-color: rgba(230, 248, 251, 0.7);
    background: linear-gradient(90deg, var(--lc, var(--glass-bd)) 0%, var(--gradient-color) 50%, var(--lc, var(--glass-bd)) 100%);
    height: 6px;
    width: 120px;
    transform: translateX(-50%);
    left: 50%;
    opacity: 0.5;
}

.panel-edge--top {
    top: -1px;
    clip-path: polygon(0 0, 100% 0, 91% 100%, 9% 100%);
}

.panel-edge--bottom {
    bottom: -1px;
    clip-path: polygon(9% 0, 91% 0, 100% 100%, 0 100%);
}

/* ── Эллипс-блик по нижнему краю (только у блоков с panel-edge, кроме хедера) ── */
*:has(> .panel-edge) > .glass:not(.header)::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 133px;
    height: 10px;
    background: url('../assets/img/glass-bottom-elipse.svg') center / contain no-repeat;
    pointer-events: none;
    z-index: 3;
}
.core *:has(> .panel-edge) > .glass::before {
    background-image: url('../assets/img/glass-bottom-elipse-core.svg');
}
.acid *:has(> .panel-edge) > .glass::before {
    background-image: url('../assets/img/glass-bottom-elipse-acid.svg');
}
.ice *:has(> .panel-edge) > .glass::before {
    background-image: url('../assets/img/glass-bottom-elipse-ice.svg');
}

/* ── Мобильная версия: < 900px ── */
@media (max-width: 900px) {
    /* ─── Скрыть десктопный хедер и навигацию ─── */
    .header-wrap,
    .nav-wrap {
        display: none;
    }

    .mob-overlay {
        display: block;
    }

    /* ─── Отступ под фиксированную нижнюю полосу ─── */
    body {
        padding-top: 16px;
        padding-bottom: 84px;
        background-image: none;
    }

    /* Фиксированный фон — не реагирует на прыжки адресной строки */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: -1;
        background-image: url('../assets/img/bg.jpg');
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
    }

    /* ─── Скрыть десктопную статус-полосу ─── */
    .page-bottom-bar {
        display: none;
    }

    /* ─── Мобильная нижняя панель ─── */
    .mob-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 20px 30px;
        background: radial-gradient(59.33% 171.69% at 45.17% -12.65%, rgba(25, 32, 43, 0.53) 0%, rgba(63, 93, 121, 0.53) 100%);
        border-top: 1px solid var(--glass-bd);
        box-shadow:
            0px 4.46px 4.46px 0px #00000040,
            0px 4.46px 37.22px 0px #ffffff4d inset;

        z-index: 200;
    }

    .mob-bar::after {
        background: linear-gradient(0deg, #10151f 24.03%, rgba(16, 21, 31, 0.7) 74.52%, rgba(16, 21, 31, 0) 100%);
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 150px;
        pointer-events: none;
        z-index: -1;
    }

    .mob-bar-logo img {
        height: 36px;
        width: auto;
    }

    .mob-menu-btn {
        all: unset;
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: var(--font-latin);
        font-size: 22px;
        color: var(--text);
        font-weight: 600;
    }

    .mob-menu-btn svg {
        width: 24px;
        height: 24px;
    }

    /* ─── Меню: bottom sheet ─── */
    .mob-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: radial-gradient(59.33% 171.69% at 45.17% -12.65%, rgba(25, 32, 43, 0.53) 0%, rgba(63, 93, 121, 0.53) 100%);
        border-top: 1px solid var(--glass-bd);
        padding: 32px 50px 50px;
        z-index: 201;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1);
        box-shadow:
            0px 4.46px 4.46px 0px #00000040,
            0px 4.46px 37.22px 0px #ffffff4d inset;
    }

    .mob-nav::after {
        background: linear-gradient(0deg, #10151f 58.17%, rgba(16, 21, 31, 0.7) 86.06%, rgba(16, 21, 31, 0) 100%);
        content: '';
        position: absolute;
        pointer-events: none;
        z-index: -1;
        left: 0;
        right: 0;
        bottom: 0;
        height: 500px;
        display: none;
    }

    .mob-nav.open {
        transform: translateY(0);
    }

    .mob-nav.open::after {
        display: block;
    }

    .mob-nav-logo {
        margin-bottom: 33px;
    }

    .mob-nav-logo img {
        height: 44px;
        width: auto;
    }

    .mob-nav-links {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .mob-nav-item {
        position: relative;
    }

    .mob-nav-item .glass-glow {
        inset: -2px;
    }

    .mob-nav-item.active .glass-glow {
        --color: var(--blue);
    }

    .mob-nav-item.active .glass {
        box-shadow:
            0px 4px 4px 0px #00000040,
            0px 4px 33.4px 0px #00e3ffcc inset;
    }

    .mob-nav-link {
        --cs: 8px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 8px 0;
        font-family: var(--font-kiril);
        font-size: 18px;
        color: var(--text);
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0;
        white-space: nowrap;
    }

    .mob-nav-item .glass-glow {
        --cs: 8px;
    }
}
