:root {
    --bg: #090b10;
    --bg-soft: #111522;
    --text: #f6fbff;
    --muted: #8ea2bf;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #7ae0ff;
    --accent-2: #8ab8fa;
    --danger: #f97373;
    --ok: #5de2a5;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Space Grotesk", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(1200px 500px at 50% -10%, #213b74 0%, transparent 65%), var(--bg);
    color: var(--text);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.hero-gradient {
    background: linear-gradient(135deg, #184c96 0%, #692985 100%);
    position: relative;
    overflow: hidden;
    height: 60vh;
    min-height: 450px;
}

.sphere {
    position: absolute;
    bottom: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 650px;
    height: 650px;
    background: radial-gradient(circle at 40% 10%, #3a75d8 0%, #173482 50%, #0d1236 100%);
    border-radius: 50%;
    z-index: 1;
    box-shadow: inset -20px -20px 50px rgba(0, 0, 0, 0.5), 0 0 80px rgba(58, 117, 216, 0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translate(-50%, 0px);
    }
    50% {
        transform: translate(-50%, -15px);
    }
    100% {
        transform: translate(-50%, 0px);
    }
}

.hero-text {
    position: relative;
    z-index: 2;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: hero-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.glass-box {
    background: rgba(18, 20, 33, 0.66);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.36);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.article-card:hover {
    border-color: rgba(122, 224, 255, 0.38);
    transform: translateY(-5px);
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.45), 0 0 36px rgba(122, 224, 255, 0.08);
}

.overlap-content {
    margin-top: -100px;
    position: relative;
    z-index: 10;
}

.mock-img {
    background: linear-gradient(to bottom right, #2a2a35, #1a1a24);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

.link-hover {
    transition: color 0.2s ease;
}

.link-hover:hover {
    color: var(--accent);
    text-decoration: underline;
}

.brand-mark {
    font-weight: 800;
    letter-spacing: -0.025em;
}

.accent-pill {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.top-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.intel-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

.newsletter-row {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

.form-control {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 10, 18, 0.8);
    color: var(--text);
    padding: 0.8rem 0.9rem;
    font-size: 0.95rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(122, 224, 255, 0.17);
}

.button-primary,
.button-secondary {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    padding: 0.8rem 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button-primary {
    color: #08131d;
    background: linear-gradient(120deg, #75e3ff, #9ac4ff);
}

.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(122, 224, 255, 0.25);
}

.button-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.status-text {
    min-height: 1.2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.status-text.ok {
    color: var(--ok);
}

.status-text.error {
    color: var(--danger);
}

.timeline {
    border-left: 2px solid rgba(122, 224, 255, 0.4);
    margin-left: 0.25rem;
    padding-left: 1.2rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.2rem;
}

.timeline-item::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #7ae0ff;
    position: absolute;
    left: -1.58rem;
    top: 0.25rem;
    box-shadow: 0 0 0 5px rgba(122, 224, 255, 0.15);
}

@media (min-width: 768px) {
    .intel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .newsletter-row {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

@media (max-width: 767px) {
    .hero-gradient {
        min-height: 380px;
    }

    .sphere {
        width: 370px;
        height: 370px;
        bottom: -20%;
    }

    .button-primary,
    .button-secondary {
        min-height: 44px;
    }
}

/* ── Page load fade ───────────────────────────────────────────────── */
@keyframes page-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
body { animation: page-in 0.35s ease both; }

/* ── Hero text entrance ───────────────────────────────────────────── */
@keyframes hero-in {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll progress bar ──────────────────────────────────────────── */
#scroll-prog {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #7ae0ff 0%, #8ab8fa 50%, #7ae0ff 100%);
    z-index: 99999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ── Card grid stagger ────────────────────────────────────────────── */
.intel-grid > *:nth-child(2),
#archive-grid > *:nth-child(2)  { transition-delay: 0.07s; }
.intel-grid > *:nth-child(3),
#archive-grid > *:nth-child(3)  { transition-delay: 0.14s; }
.intel-grid > *:nth-child(4),
#archive-grid > *:nth-child(4)  { transition-delay: 0.21s; }
#archive-grid > *:nth-child(5)  { transition-delay: 0.28s; }

/* ── Mobile hamburger button ──────────────────────────────────────── */
.nav-mobile-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 9px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    transition: border-color 0.2s;
}
.nav-mobile-btn:hover { border-color: rgba(122, 224, 255, 0.35); }
.nav-mobile-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #c5cedd;
    border-radius: 2px;
    transition: transform 0.26s ease, opacity 0.2s ease;
    transform-origin: center;
}
.nav-mobile-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-mobile-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile slide-down menu ───────────────────────────────────────── */
.nav-mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
    opacity: 0;
    border-top: 1px solid transparent;
    background: rgba(9, 11, 16, 0.98);
}
.nav-mobile-menu.open {
    max-height: 300px;
    opacity: 1;
    border-top-color: rgba(255, 255, 255, 0.07);
}
.nav-mobile-menu a {
    display: flex;
    align-items: center;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #8ea2bf;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: color 0.18s ease, background 0.18s ease;
    text-decoration: none;
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { color: #f6fbff; background: rgba(255, 255, 255, 0.03); }
.nav-mobile-menu a.nav-active { color: #f6fbff; }
.nav-mobile-menu a.nav-telegram { color: #48b9d1; }
.nav-mobile-menu a.nav-telegram:hover { color: #7ae0ff; }

/* ── Archive card image hover ─────────────────────────────────────── */
.archive-card-img img {
    transition: transform 0.4s ease;
}
.article-card:hover .archive-card-img img {
    transform: scale(1.04);
}
/* ── Featured-on logos ───────────────────────────────────────────────────── */
.featured-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.22s ease;
    text-decoration: none;
}
.featured-logo-link:hover { opacity: 0.9; }
.featured-logo-img {
    height: 22px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    filter: grayscale(1) brightness(2.5);
}
.featured-logo-text {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}