/* ============================================================
   IMPERIAL GHOSTS — «Тактический терминал Империи»
   ============================================================ */

/* ===== 1. Дизайн-токены ===== */
:root {
    /* Поверхности */
    --bg-0: #07070C;
    --bg-1: #0A0A12;
    --bg-2: #0E1018;
    --panel: rgba(10, 12, 20, 0.78);
    --panel-solid: #0C0E16;

    /* Янтарь */
    --amber: #FFB800;
    --amber-bright: #FFD24D;
    --amber-deep: #C98F00;
    --amber-glow: rgba(255, 184, 0, 0.25);
    --amber-line: rgba(255, 184, 0, 0.35);
    --amber-faint: rgba(255, 184, 0, 0.07);

    /* Призрачный голубой */
    --ghost: #00D4FF;
    --ghost-dim: #7FB8D8;
    --ghost-glow: rgba(0, 212, 255, 0.22);
    --ghost-line: rgba(0, 212, 255, 0.30);
    --ghost-faint: rgba(0, 212, 255, 0.06);

    /* Текст */
    --text-1: #EAF0F6;
    --text-2: #93A0B4;
    --text-3: #6E7B8C;

    /* Линии */
    --line: rgba(148, 170, 200, 0.14);
    --line-soft: rgba(148, 170, 200, 0.07);
    --grid: rgba(148, 170, 200, 0.045);

    /* Статусы */
    --up: #4ADE80;
    --down: #FF6B6B;

    /* Шрифты */
    --font-display: 'Tektur', 'Arial Black', sans-serif;
    --font-body: 'Exo 2', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;

    /* Геометрия */
    --cut-sm: 8px;
    --cut-md: 14px;
    --cut-lg: 22px;

    /* Свечения */
    --glow-amber-sm: 0 0 12px var(--amber-glow);
    --glow-amber-md: 0 0 24px var(--amber-glow), 0 0 64px rgba(255, 184, 0, 0.10);
    --glow-ghost-sm: 0 0 12px var(--ghost-glow);
    --glow-ghost-md: 0 0 28px var(--ghost-glow), 0 0 72px rgba(0, 212, 255, 0.08);
    --shadow-panel: 0 18px 48px rgba(0, 0, 0, 0.55);
    --text-glow-amber: 0 0 14px rgba(255, 184, 0, 0.35);
    --text-glow-ghost: 0 0 16px rgba(0, 212, 255, 0.30);

    --container: 1200px;
}

/* ===== 2. База ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg-0);
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-x: hidden;
}

img { max-width: 100%; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
/* у клипнутых кнопок внешний outline срезается clip-path — рисуем индикатор внутри */
.cta-button:focus-visible {
    outline: 2px solid var(--bg-0);
    outline-offset: -6px;
    background: var(--amber-bright);
}

.section { scroll-margin-top: 64px; }

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 1000;
    font-family: var(--font-display);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: var(--bg-0);
    background: var(--amber);
    padding: 12px 24px;
    text-decoration: none;
    transition: top 0.2s ease-out;
}
.skip-link:focus-visible { top: 16px; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: 24px;
}

main { position: relative; z-index: 2; }

/* ===== 3. Фон: космос + сетка ===== */
.bg-space {
    position: fixed;
    inset: 0;
    height: 125vh;
    z-index: 0;
    background: url('/static/images/space-bg.jpg') center / cover no-repeat;
    filter: brightness(0.55) saturate(0.85);
    will-change: transform;
}
.bg-space::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(0, 212, 255, 0.04), transparent 55%),
        radial-gradient(ellipse 100% 60% at 50% 100%, rgba(255, 184, 0, 0.05), transparent 60%),
        linear-gradient(rgba(7, 7, 12, 0.55), rgba(7, 7, 12, 0.72));
}

#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 72px),
        repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 72px),
        repeating-linear-gradient(0deg, rgba(148, 170, 200, 0.08) 0 1px, transparent 1px 360px),
        repeating-linear-gradient(90deg, rgba(148, 170, 200, 0.08) 0 1px, transparent 1px 360px);
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, #000 30%, transparent 75%);
}

/* ===== Навигация ===== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 52px;
    padding: 0 24px;
    background: rgba(7, 7, 12, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-1);
    text-decoration: none;
    white-space: nowrap;
}
.nav-brand img { width: 24px; height: 24px; }
.nav-brand:hover { color: var(--amber); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--text-2);
    text-decoration: none;
    padding: 8px 12px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease-out, border-color 0.2s ease-out;
}
.nav-links a:hover { color: var(--text-1); }
.nav-links a.active { color: var(--amber); border-bottom-color: var(--amber); }

.nav-no {
    color: var(--amber);
    opacity: 0.8;
    margin-right: 6px;
}

.nav-clock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    color: var(--text-3);
    white-space: nowrap;
}

.nav-toggle { display: none; }

/* Статусные точки (единственное место с border-radius) */
.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-online { background: var(--up); animation: status-pulse 2.4s ease-in-out infinite; }
.dot-rec { background: var(--down); animation: rec-blink 1.2s steps(2) infinite; }
.dot-ghost { background: var(--ghost); animation: status-pulse 2.4s ease-in-out infinite; }
/* в медиа-сетке REC-точки статичны — шесть мигалок в одной секции это стробоскоп */
.video-rec .dot-rec { animation: none; }

@keyframes status-pulse {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 0 rgba(74, 222, 128, 0); }
    50% { opacity: 1; box-shadow: 0 0 8px rgba(74, 222, 128, 0.4); }
}
@keyframes rec-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

/* ===== 5. Уголки-скобки ===== */
.bk {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 0 solid var(--line);
    transition: top 0.25s ease-out, right 0.25s ease-out, bottom 0.25s ease-out, left 0.25s ease-out, border-color 0.25s ease-out;
    pointer-events: none;
    z-index: 3;
}
.bk-tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.bk-tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.bk-bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.bk-br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* ===== 6. Кнопки ===== */
.cta-button {
    display: inline-block;
    position: relative;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--bg-1);
    background: var(--amber);
    padding: 16px 44px;
    cursor: pointer;
    box-shadow: var(--glow-amber-sm);
    clip-path: polygon(var(--cut-md) 0, 100% 0, 100% calc(100% - var(--cut-md)), calc(100% - var(--cut-md)) 100%, 0 100%, 0 var(--cut-md));
    transition: background 0.25s ease-out, box-shadow 0.25s ease-out;
}
.cta-button:hover { background: var(--amber-bright); box-shadow: var(--glow-amber-md); }
.cta-button:active { background: var(--amber-deep); }

.cta-secondary {
    color: var(--amber);
    background: transparent;
    border: 1px solid var(--amber-line);
    clip-path: none;
    box-shadow: none;
}
.cta-secondary:hover { background: var(--amber-faint); border-color: var(--amber); box-shadow: var(--glow-amber-sm); }

.cta-button-large { font-size: 1.05rem; padding: 20px 56px; }

.cta-with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.cta-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}
.cta-button-large .cta-icon { width: 22px; height: 22px; }

.section-cta {
    margin-top: 56px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.cta-note {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* ===== 7. Секции и заголовки ===== */
.section { position: relative; padding: 112px 0; }

.section-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
}

.section-index {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--amber);
    white-space: nowrap;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-1);
    white-space: nowrap;
}

.section-code {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: var(--ghost-dim);
    vertical-align: middle;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
}

.section-diamond {
    width: 6px;
    height: 6px;
    background: var(--amber);
    transform: rotate(45deg);
    flex-shrink: 0;
}

.section-micro {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 56px;
}

/* ===== 8. HERO ===== */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 24px 150px; /* запас под статусную строку телеметрии */
    z-index: 2;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    max-width: 920px;
    width: 100%;
}
.hero-cta { margin-top: 16px; }

/* идентичность — голубая, янтарь первого экрана остаётся только у CTA */
.alliance-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: var(--ghost-faint);
    border: 1px solid var(--ghost-line);
    clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
}
.alliance-logo { width: 28px; height: 28px; }
.alliance-name {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--ghost-dim);
}
.alliance-sub {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    color: var(--text-3);
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 24px;
}
.corp-logo { width: 96px; height: 96px; }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 6.5vw, 5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0.04em;
    color: var(--text-1);
    text-shadow: var(--text-glow-ghost);
    text-align: left;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.1875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-2);
    max-width: 640px;
    line-height: 1.7;
    text-wrap: balance; /* симметричные строки при центрировании */
}

/* --- Стримеры в hero: чипы офлайн / live-плашка в эфире --- */
.hero-streams {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
}

.hs-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--text-3);
}

.hs-chip {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--ghost-dim);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--line);
    transition: color 0.2s ease-out, border-color 0.2s ease-out;
}
.hs-chip:hover { color: var(--ghost); border-color: var(--ghost-line); }

.hs-live {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 8px 10px;
    background: var(--panel);
    border: 1px solid rgba(255, 107, 107, 0.35);
    border-left: 2px solid var(--down);
    text-decoration: none;
    box-shadow: 0 0 16px rgba(255, 107, 107, 0.12);
    transition: box-shadow 0.25s ease-out, border-color 0.25s ease-out;
}
.hs-live:hover {
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 0 0 28px rgba(255, 107, 107, 0.22);
}
.hs-live img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hs-name {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-1);
}
.hs-meta {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--down);
}
.hs-go {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--text-1);
}
.hs-live:hover .hs-go { color: var(--amber); }

/* --- Телеметрия: статусная строка внизу hero --- */
.hero-telemetry {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid var(--line-soft);
}

.ht-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 8px 48px;
    padding: 14px 0;
}

.ht-stat {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-2);
    white-space: nowrap;
}

.ht-num {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--amber);
    text-shadow: var(--text-glow-amber);
    margin-left: 8px;
}

/* --- Тикер --- */
.tac-ticker {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--line-soft);
}
.tac-ticker-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--ghost-dim);
    padding: 0 16px 0 32px;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 1px solid var(--line-soft);
    align-self: stretch;
    display: flex;
    align-items: center;
}

.ticker-viewport { overflow: hidden; flex: 1; }

.ticker-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 12px 0;
    animation: ticker-scroll 60s linear infinite;
}
.ticker-viewport:hover .ticker-track,
.ticker-viewport:focus-visible .ticker-track,
.ticker-viewport.paused .ticker-track { animation-play-state: paused; }

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.nf-item {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 0 18px;
    position: relative;
}
.nf-item::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--text-3);
    transform: translateY(-50%) rotate(45deg);
}

.nf-name {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
}
.nf-price {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--amber);
}
.nf-change {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}
.nf-change.up { color: var(--up); }
.nf-change.down { color: var(--down); }
.nf-change.flat { color: var(--text-3); }

.nf-live-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--down);
}

.nf-news-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--ghost-dim);
}
.nf-news-text {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--text-1);
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* --- Boot-sequence --- */
.boot {
    opacity: 0;
    animation: boot-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.boot-1 { animation-delay: 0ms; }
.boot-2 { animation-delay: 80ms; }
.boot-3 { animation-delay: 160ms; }
.boot-4 { animation-delay: 240ms; }
.boot-5 { animation-delay: 320ms; }

@keyframes boot-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 9. Recruiting: брифинг + слоты ===== */
.briefing { max-width: 760px; margin-bottom: 64px; }

.briefing-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 20px;
}

.briefing-text {
    position: relative;
    padding-left: 28px;
    border-left: 2px solid var(--ghost-line);
}
.briefing-text p {
    font-size: 1.1875rem;
    line-height: 1.75;
    color: var(--text-2);
    margin-bottom: 18px;
}
.briefing-text p:last-child { margin-bottom: 0; }
.briefing-text strong { color: var(--ghost); font-weight: 600; }

.select-role {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--ghost-dim);
    margin-bottom: 20px;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.role-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    background: var(--line);
    clip-path: polygon(0 0, calc(100% - var(--cut-md)) 0, 100% var(--cut-md), 100% 100%, 0 100%);
    transition: transform 0.25s ease-out, background 0.25s ease-out, filter 0.25s ease-out;
}
.role-card::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--panel-solid);
    clip-path: polygon(0 0, calc(100% - var(--cut-md) + 1px) 0, 100% calc(var(--cut-md) - 1px), 100% 100%, 0 100%);
}
.role-card > * { position: relative; z-index: 1; }

.role-slot {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    color: var(--text-3);
    margin-bottom: 20px;
}

.role-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ghost-faint);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    margin-bottom: 20px;
    transition: background 0.25s ease-out;
}
.role-icon svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: var(--ghost-dim);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.25s ease-out;
}

.role-card h3 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-1);
    margin-bottom: 10px;
}
.role-card h3::after {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    margin-top: 10px;
    background: var(--ghost-dim);
    transition: background 0.25s ease-out;
}

.role-card p { color: var(--text-2); margin-bottom: 20px; }

.role-status {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--up);
    margin-top: auto;
}

.role-card:hover {
    transform: translateY(-4px);
    background: var(--amber-line);
    filter: drop-shadow(0 0 12px var(--amber-glow));
}
.role-card:hover .role-icon { background: var(--amber-faint); }
.role-card:hover .role-icon svg { stroke: var(--amber); }
.role-card:hover h3::after { background: var(--amber); }

/* ===== 10. Advantages: bento ===== */
.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.bento-cell {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 2px solid var(--amber-line);
    padding: 28px;
    transition: border-color 0.25s ease-out, background 0.25s ease-out;
}
.bento-cell:hover { border-top-color: var(--amber); background: var(--panel-solid); }
.bento-cell:hover .cell-icon svg { stroke: var(--amber-bright); }
.bento-cell:hover > .bk-tl { top: -4px; left: -4px; }
.bento-cell:hover > .bk-tr { top: -4px; right: -4px; }
.bento-cell:hover > .bk-bl { bottom: -4px; left: -4px; }
.bento-cell:hover > .bk-br { bottom: -4px; right: -4px; }

.bento-a { grid-column: span 7; min-height: 240px; padding: 36px; clip-path: polygon(var(--cut-lg) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut-lg)); }
.bento-b { grid-column: span 5; min-height: 240px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-md)), calc(100% - var(--cut-md)) 100%, 0 100%); }
.bento-c, .bento-d, .bento-e { grid-column: span 4; min-height: 220px; }
.bento-f { grid-column: span 5; min-height: 220px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-md)), calc(100% - var(--cut-md)) 100%, 0 100%); }
.bento-g { grid-column: span 7; min-height: 220px; clip-path: polygon(0 0, 100% 0, 100% 100%, var(--cut-lg) 100%, 0 calc(100% - var(--cut-lg))); }

.cell-no {
    position: absolute;
    right: 20px;
    bottom: 8px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 40px;
    line-height: 1;
    color: rgba(255, 184, 0, 0.10);
    pointer-events: none;
}
.bento-a .cell-no { font-size: 72px; }
.bento-b .cell-no, .bento-f .cell-no, .bento-g .cell-no { font-size: 56px; }

.cell-watermark {
    position: absolute;
    top: 16px;
    right: 56px;
    width: 96px;
    opacity: 0.07;
    pointer-events: none;
}

.cell-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    color: var(--amber);
    background: var(--amber-faint);
    border: 1px solid var(--amber-line);
    padding: 3px 8px;
    clip-path: polygon(0 0, calc(100% - var(--cut-sm)) 0, 100% var(--cut-sm), 100% 100%, 0 100%);
}

/* бейдж собственных структур корпорации — голубой, в отличие от янтарного GSF */
.cell-badge-own {
    color: var(--ghost-dim);
    background: var(--ghost-faint);
    border-color: var(--ghost-line);
}

.cell-icon { margin-bottom: 16px; }
.cell-icon svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: var(--amber);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.25s ease-out;
}
.bento-a .cell-icon svg { width: 44px; height: 44px; }

.bento-cell h3 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-1);
    margin-bottom: 10px;
}

.bento-cell p { color: var(--text-2); font-size: 1rem; }
.bento-a p, .bento-g p { font-size: 1.0625rem; }

.cell-link {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--amber);
    text-decoration: none;
}
.cell-link:hover { color: var(--amber-bright); text-shadow: var(--text-glow-amber); }

.cell-tax {
    display: block;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    color: var(--text-3);
}

.cell-body {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.cell-telemetry {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding-left: 24px;
    border-left: 1px solid var(--line-soft);
    margin-right: 24px;
}
.cell-tel-num {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--amber);
}
.cell-tel-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    color: var(--text-3);
    margin-bottom: 10px;
}

/* --- Чего у нас нет --- */
.nothing-strip {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-top: 20px;
    padding: 22px 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 2px solid var(--down);
}
.nothing-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--down);
    white-space: nowrap;
}
.nothing-have {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--up);
}
.nothing-strip p { color: var(--text-2); font-size: 1.0625rem; }

/* ===== 11. Media ===== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 28px;
}

.video-card {
    position: relative;
    background: var(--line);
    clip-path: polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, var(--cut-lg) 100%, 0 calc(100% - var(--cut-lg)));
    transition: filter 0.25s ease-out, background 0.25s ease-out;
}
.video-card::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--panel-solid);
    clip-path: polygon(0 0, calc(100% - var(--cut-lg) + 1px) 0, 100% calc(var(--cut-lg) - 1px), 100% 100%, calc(var(--cut-lg) - 1px) 100%, 0 calc(100% - var(--cut-lg) + 1px));
}
.video-card > * { position: relative; z-index: 1; }
.video-card:hover { background: var(--ghost-line); filter: drop-shadow(0 0 18px var(--ghost-glow)); }
.video-card:hover .video-header { color: var(--ghost); }

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
    padding: 0 18px 0 30px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--ghost-dim);
    border-bottom: 1px solid var(--line);
    transition: color 0.25s ease-out;
}
.video-rec { display: flex; align-items: center; gap: 6px; }

.video-frame { padding: 6px; }
.video-frame iframe,
.video-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 1px solid var(--line-soft);
    background: #000;
}

.video-footer {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    color: var(--text-3);
    padding: 6px 18px;
    border-top: 1px solid var(--line-soft);
}

.video-caption {
    font-size: 1rem;
    color: var(--text-2);
    padding: 14px 30px 22px;
}

/* --- Стримеры --- */
.streams { margin-top: 36px; }

.streams-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 14px;
}

.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.stream-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px 16px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 2px solid var(--ghost-line);
    text-decoration: none;
    transition: border-color 0.25s ease-out, box-shadow 0.25s ease-out;
}
.stream-card:hover {
    border-color: var(--ghost-line);
    border-left-color: var(--ghost);
    box-shadow: var(--glow-ghost-sm);
}

/* стрим идёт прямо сейчас */
.stream-on-air {
    border-left-color: var(--down);
    box-shadow: 0 0 16px rgba(255, 107, 107, 0.12);
}
.stream-on-air:hover {
    border-left-color: var(--down);
    box-shadow: 0 0 24px rgba(255, 107, 107, 0.2);
}

.stream-avatar {
    width: 52px;
    height: 52px;
    object-fit: cover;
    flex-shrink: 0;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.stream-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.stream-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ghost-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stream-status.is-live { color: var(--down); }

.stream-title {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-name {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-1);
}

.stream-cta {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--ghost-dim);
    white-space: nowrap;
}
.stream-card:hover .stream-cta { color: var(--ghost); }

/* ===== 12. Что дальше ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 28px;
}
.step-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 28px;
    height: 28px;
    border-top: 2px solid var(--amber);
    border-left: 2px solid var(--amber);
}

.step-no {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--amber);
    display: block;
    margin-bottom: 14px;
}

.step-card h3 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-1);
    margin-bottom: 10px;
}

.step-card p { color: var(--text-2); font-size: 1rem; }

/* ===== 13. Footer ===== */
.footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 48px 24px 64px;
    border-top: 1px solid var(--line);
}
.footer-diamond {
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--amber);
    transform: translateX(-50%) rotate(45deg);
}

.footer-main {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--text-2);
    margin-bottom: 10px;
}

.footer-links {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    color: var(--text-3);
    margin-bottom: 10px;
}
.footer-links a { color: var(--amber); text-decoration: none; }
.footer-links a:hover { color: var(--amber-bright); }

.footer-eot {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    color: var(--ghost-dim);
    margin-bottom: 14px;
}

.footer-disclaimer {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    color: var(--text-3);
}

/* ===== 14. Плавающий Discord ===== */
.floating-discord {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(7, 7, 12, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--amber-line);
    color: var(--amber);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    transition: background 0.25s ease-out, color 0.25s ease-out, opacity 0.3s ease-out, visibility 0.3s;
    animation: cta-ping 12s ease-out infinite;
}
.floating-discord .bk { border-color: var(--amber); width: 8px; height: 8px; }
.floating-discord .bk-tl { top: -5px; left: -5px; }
.floating-discord .bk-tr { top: -5px; right: -5px; }
.floating-discord .bk-bl { bottom: -5px; left: -5px; }
.floating-discord .bk-br { bottom: -5px; right: -5px; }

.floating-discord:hover {
    background: var(--amber);
    color: var(--bg-0);
    box-shadow: var(--glow-amber-md);
    animation: none;
}
.floating-discord:hover .bk-tl { top: -8px; left: -8px; }
.floating-discord:hover .bk-tr { top: -8px; right: -8px; }
.floating-discord:hover .bk-bl { bottom: -8px; left: -8px; }
.floating-discord:hover .bk-br { bottom: -8px; right: -8px; }

.floating-discord.fd-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes cta-ping {
    0%, 94% { box-shadow: 0 0 0 rgba(255, 184, 0, 0); }
    97% { box-shadow: 0 0 24px var(--amber-glow); }
    100% { box-shadow: 0 0 0 rgba(255, 184, 0, 0); }
}

/* ===== 15. Пчела ===== */
.patrol-bee {
    position: fixed;
    top: 0;
    left: 0;
    width: 160px;
    z-index: 1; /* за контентом (main z=2): не перекрывает текст и панели */
    pointer-events: none;
    filter: drop-shadow(0 0 18px var(--amber-glow));
}

/* ===== 16. Появление при скролле ===== */
.fade-init {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-init.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 17. Адаптив ===== */
@media (max-width: 1100px) {
    .bento-a, .bento-b { grid-column: span 6; }
    .bento-c, .bento-d { grid-column: span 3; }
    .bento-e, .bento-f, .bento-g { grid-column: span 6; }
}

@media (max-width: 900px) {
    .bento { gap: 16px; }
    .bento-a, .bento-b, .bento-c, .bento-d, .bento-e, .bento-f, .bento-g {
        grid-column: 1 / -1;
        min-height: 0;
    }
    .media-grid { grid-template-columns: 1fr; gap: 20px; }
    .streams-grid { grid-template-columns: 1fr; }
    .roles-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .cell-body { flex-direction: column; }
    .cell-telemetry {
        flex-direction: row;
        align-items: baseline;
        gap: 10px;
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--line-soft);
        padding-top: 14px;
    }
    .cell-tel-label { margin-bottom: 0; margin-right: 16px; }
}

@media (max-width: 768px) {
    :root {
        --cut-lg: 14px;
        --cut-md: 10px;
    }

    .hud-frame, .bg-grid { display: none; }
    .video-footer { display: none; }
    .cell-watermark { display: none; }
    .bg-space { transform: none !important; }

    .section { padding: 72px 0; }
    .section-head { flex-wrap: wrap; gap: 10px; }
    .section-title { white-space: normal; font-size: 1.375rem; }
    .section-micro { margin-bottom: 40px; }

    .hero { padding: 80px 16px 170px; }
    .hero-content { gap: 22px; }
    .hero-brand { flex-direction: column; gap: 12px; }
    .hero-title { text-align: center; letter-spacing: 0.02em; }
    .corp-logo { width: 72px; height: 72px; }
    .alliance-badge { flex-wrap: wrap; justify-content: center; }
    .hero-subtitle { font-size: 1.0625rem; }

    .ht-stats { gap: 6px 20px; padding: 12px; }
    .ht-stat { font-size: 0.6875rem; letter-spacing: 0.12em; }
    .ht-num { font-size: 1.25rem; margin-left: 6px; }
    .tac-ticker-label { padding: 0 10px 0 14px; }
    .ticker-track { animation-duration: 40s; }

    .briefing-text p { font-size: 1.0625rem; }

    .floating-discord { padding: 12px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
    .discord-text { display: none; }

    /* навигация: гамбургер */
    .site-nav { padding: 0 16px; gap: 12px; }
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        margin-left: auto;
        width: 44px;
        height: 44px;
        padding: 10px;
        background: none;
        border: none;
        cursor: pointer;
    }
    .nav-toggle-bar {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--amber);
    }
    .nav-links {
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 16px 16px;
        background: rgba(7, 7, 12, 0.96);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--line);
    }
    .site-nav.nav-open .nav-links { display: flex; }
    .nav-links a { padding: 14px 8px; border-bottom: 1px solid var(--line-soft); }
    .nav-clock { display: none; }

    .patrol-bee { width: 90px; }

    .nothing-strip { flex-direction: column; gap: 8px; }

    .cta-button-large { font-size: 0.875rem; padding: 16px 32px; }
}

@media (max-width: 480px) {
    .container { padding-inline: 16px; }
    .section { padding: 56px 0; }
    .section-title { font-size: 1.25rem; }
    .cta-button { padding: 14px 28px; font-size: 0.8125rem; }
    .patrol-bee { display: none; }
    .alliance-sub { display: none; }
}

/* ===== 18. Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }

    .boot { opacity: 1; transform: none; }
    .fade-init { opacity: 1; transform: none; }

    .ticker-track { animation: none !important; }
    .ticker-viewport { overflow-x: auto; }

    .patrol-bee { display: none; }
    .dot-online, .dot-rec { opacity: 1; }
    .bg-space { transform: none !important; }
}
