/* ============================================================
   News Pipeline — landing page (тёмная sci-fi тема)
   Только для страницы "/", ничего из /admin/ не затрагивает.
   ============================================================ */

:root {
    --np-bg: #04070f;
    --np-bg-deep: #060b1a;
    --np-surface: rgba(13, 22, 44, 0.55);
    --np-border: rgba(94, 155, 255, 0.16);
    --np-text: #dbe6f5;
    --np-text-muted: #93a5c4;
    --np-cyan: #4cc9f0;
    --np-violet: #8b5cf6;
    --np-glow-cyan: rgba(76, 201, 240, 0.55);
    --np-glow-violet: rgba(139, 92, 246, 0.45);
    --np-font-display: 'Orbitron', 'Segoe UI', sans-serif;
    --np-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.np-page,
.np-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html:has(.np-page) {
    scroll-behavior: smooth;
    background: var(--np-bg);
}

body:has(.np-page) {
    margin: 0;
    background: var(--np-bg);
    color: var(--np-text);
    font-family: var(--np-font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Космический фон (фиксированные слои) ---------- */

.np-space {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 90% 60% at 70% -10%, rgba(76, 100, 240, 0.18), transparent 60%),
        radial-gradient(ellipse 70% 50% at 15% 110%, rgba(139, 92, 246, 0.14), transparent 55%),
        radial-gradient(ellipse 45% 35% at 85% 75%, rgba(34, 108, 170, 0.12), transparent 60%),
        linear-gradient(180deg, var(--np-bg) 0%, var(--np-bg-deep) 55%, #030510 100%);
    pointer-events: none;
}

.np-space__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Статичные звёзды-фолбэк на случай выключенного JS */
.np-space__static-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 34% 68%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 56% 14%, rgba(200,225,255,0.8), transparent),
        radial-gradient(1px 1px at 72% 42%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 88% 78%, rgba(190,215,255,0.7), transparent),
        radial-gradient(1px 1px at 8% 84%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 44% 92%, rgba(255,255,255,0.45), transparent),
        radial-gradient(1.5px 1.5px at 64% 58%, rgba(220,235,255,0.65), transparent),
        radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 93% 18%, rgba(255,255,255,0.7), transparent);
    opacity: 0.9;
}

.np-space--js .np-space__static-stars {
    display: none;
}

/* ---------- Планета в hero ---------- */

.np-planet {
    position: absolute;
    top: 6vh;
    right: -12vw;
    width: clamp(280px, 42vw, 640px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 30%, #3b5db8 0%, #22366e 38%, #101a3d 68%, #070c22 100%);
    box-shadow:
        inset -30px -24px 80px rgba(0, 0, 0, 0.75),
        0 0 90px rgba(76, 120, 240, 0.28),
        0 0 220px rgba(76, 120, 240, 0.14);
    will-change: transform;
}

.np-planet::after {
    /* кольцо планеты */
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 168%;
    height: 34%;
    border-radius: 50%;
    border: 2px solid rgba(140, 175, 255, 0.28);
    border-top-color: transparent;
    transform: translate(-50%, -50%) rotate(-16deg);
    box-shadow: 0 0 24px rgba(120, 160, 255, 0.15);
}

/* Дальние планеты у секций */
.np-moon {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #6d5bb8 0%, #3a2f70 55%, #17123a 100%);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.25);
    will-change: transform;
}

.np-moon--one {
    left: -6vw;
    top: 145vh;
    width: clamp(140px, 18vw, 280px);
    aspect-ratio: 1;
    opacity: 0.7;
}

.np-moon--two {
    right: -4vw;
    top: 260vh;
    width: clamp(90px, 12vw, 190px);
    aspect-ratio: 1;
    opacity: 0.55;
    background: radial-gradient(circle at 35% 30%, #2e8ab8 0%, #1c4a70 55%, #0a1c33 100%);
    box-shadow: 0 0 50px rgba(76, 201, 240, 0.22);
}

/* ---------- Контент поверх фона ---------- */

.np-page {
    position: relative;
    z-index: 1;
}

/* ---------- HERO ---------- */

.np-hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    position: relative;
}

.np-hero__title {
    font-family: var(--np-font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 9vw, 6.5rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.08;
    color: #f2f7ff;
    text-shadow:
        0 0 18px var(--np-glow-cyan),
        0 0 70px rgba(76, 201, 240, 0.30),
        0 0 140px rgba(139, 92, 246, 0.25);
}

.np-hero__tagline {
    margin-top: 20px;
    font-size: clamp(1rem, 2.4vw, 1.35rem);
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--np-text-muted);
}

.np-cta {
    margin-top: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 16px 54px;
    font-family: var(--np-font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: #06121f;
    background: linear-gradient(135deg, #67d8f7 0%, #4cc9f0 45%, #7aa5f8 100%);
    border: 1px solid rgba(160, 225, 255, 0.7);
    border-radius: 999px;
    cursor: pointer;
    box-shadow:
        0 0 24px var(--np-glow-cyan),
        0 0 70px rgba(76, 201, 240, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.np-cta:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 0 34px var(--np-glow-cyan),
        0 0 110px rgba(76, 201, 240, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.np-cta:active {
    transform: translateY(0) scale(0.98);
}

.np-cta:focus-visible {
    outline: 3px solid #aef0ff;
    outline-offset: 4px;
}

/* ---------- Секции ---------- */

.np-sections {
    max-width: 1120px;
    margin: 0 auto;
    padding: 4vh 24px 10vh;
    display: flex;
    flex-direction: column;
    gap: clamp(80px, 14vh, 160px);
}

.np-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 22px;
    padding: clamp(36px, 5vw, 56px);
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 60px rgba(10, 25, 70, 0.35);
}

.np-section__icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(76, 201, 240, 0.08);
    border: 1px solid rgba(76, 201, 240, 0.35);
    box-shadow: 0 0 26px rgba(76, 201, 240, 0.22), inset 0 0 18px rgba(76, 201, 240, 0.08);
    color: var(--np-cyan);
}

.np-section--violet .np-section__icon {
    background: rgba(139, 92, 246, 0.09);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 26px rgba(139, 92, 246, 0.24), inset 0 0 18px rgba(139, 92, 246, 0.09);
    color: #b39bf7;
}

.np-section__icon svg {
    width: 36px;
    height: 36px;
}

.np-section__title {
    font-family: var(--np-font-display);
    font-size: clamp(1.4rem, 3.4vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #eaf2ff;
    text-shadow: 0 0 22px rgba(76, 201, 240, 0.25);
}

.np-section--violet .np-section__title {
    text-shadow: 0 0 22px rgba(139, 92, 246, 0.3);
}

.np-section__text {
    max-width: 62ch;
    color: var(--np-text-muted);
    font-size: clamp(1rem, 1.6vw, 1.1rem);
}

/* Орбитальная декорация в углу секции */
.np-section__orbit {
    position: absolute;
    top: -40px;
    right: -30px;
    width: 140px;
    height: 140px;
    color: rgba(120, 160, 255, 0.22);
    pointer-events: none;
}

/* ---------- Футер ---------- */

.np-footer {
    padding: 40px 24px 48px;
    text-align: center;
    color: var(--np-text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    border-top: 1px solid rgba(94, 155, 255, 0.08);
}

/* ---------- Появление при скролле ---------- */

.np-reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.np-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Без JS секции должны быть видимы */
html:not(.np-js) .np-reveal {
    opacity: 1;
    transform: none;
}

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

@media (min-width: 768px) {
    .np-section {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            'icon title'
            'icon text';
        column-gap: 36px;
        row-gap: 14px;
        justify-items: start;
        text-align: left;
        align-items: start;
    }

    .np-section__icon { grid-area: icon; }
    .np-section__title { grid-area: title; align-self: center; }
    .np-section__text { grid-area: text; }
}

@media (max-width: 480px) {
    .np-planet {
        right: -40vw;
        top: 4vh;
        opacity: 0.8;
    }

    .np-cta {
        width: 100%;
        max-width: 340px;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html:has(.np-page) {
        scroll-behavior: auto;
    }

    .np-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .np-cta {
        transition: none;
    }

    .np-cta:hover {
        transform: none;
    }
}
