:root {
    --bg: #0b0f17;
    --bg-elev: #0f1522;
    --card: #121a2a;
    --line: #222b3d;
    --text: #e7ecf3;
    --muted: #a7b1c2;
    --brand: #7aa2ff;
    --brand-2: #8b5cf6;
    --accent: #30d5c8;
    --danger: #ff6b6b;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    /* unified header height used by CSS + JS */
    --header-h: 80px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

    body.page {
        margin: 0;
        background: radial-gradient(1200px 800px at 10% -10%, rgba(123,93,246,.18), transparent 60%), radial-gradient(1000px 800px at 90% 10%, rgba(48,213,200,.12), transparent 60%), var(--bg);
        color: var(--text);
        font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
        line-height: 1.5;
    }

a {
    color: var(--text);
    text-decoration: none;
}

    a:hover {
        opacity: .9;
    }

.container-wide {
    width: min(1200px,92%);
    margin: 0 auto;
}

/* ===== Header / Nav (fixed, bulletproof) ===== */
.site-header {
    position: fixed;
    inset: 0 0 auto 0; /* top:0; left/right:0 */
    height: var(--header-h);
    z-index: 9999; /* above everything */
    backdrop-filter: blur(10px);
    background: linear-gradient(180deg, rgba(9,13,22,.7), rgba(9,13,22,.3) 60%, transparent);
    border-bottom: 1px solid rgba(255,255,255,.06);
    isolation: isolate; /* own stacking context */
}

.nav {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 24px;
    height: 100%; /* fill header height */
    padding: 0 0; /* vertical size comes from --header-h */
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* small, consistent logo in the header */
.site-header .brand-logo {
    height: calc(var(--header-h) - 28px);
    display: block;
}

.brand-text {
    font-weight: 800;
    letter-spacing: .2px;
}

.nav-links {
    display: flex;
    gap: 22px;
    align-items: center;
}

    .nav-links a {
        color: var(--muted);
        font-weight: 500;
    }

        .nav-links a:hover {
            color: var(--text);
        }

.nav-cta {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: .2s ease;
}

    .btn.solid {
        background: linear-gradient(90deg,var(--brand),var(--brand-2));
        color: #fff;
    }

    .btn.ghost {
        background: transparent;
        border-color: rgba(255,255,255,.15);
        color: var(--text);
    }

    .btn:hover {
        transform: translateY(-1px);
    }

.nav-burger {
    display: none;
    background: none;
    border: 0;
    padding: 6px;
    cursor: pointer;
}

    .nav-burger span {
        display: block;
        width: 26px;
        height: 2px;
        background: #fff;
        margin: 5px 0;
    }

@media (max-width:900px) {
    .nav {
        grid-template-columns: 1fr auto;
    }

    .nav-links, .nav-cta {
        display: none;
    }

    .site-header.open .nav-links,
    .site-header.open .nav-cta {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 14px 0;
        grid-column: 1 / -1;
    }

    .nav-burger {
        display: block;
    }
}

/* Push content below the fixed header */
.site-main {
    padding-top: var(--header-h);
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* Ensure sections never overlay the header */
.hero, .section {
    position: relative;
    z-index: 1;
}

/* ===== Hero ===== */
.hero {
    padding: 80px 0 40px;
    background: radial-gradient(1200px 600px at 50% -20%, rgba(122,162,255,.18), transparent 60%), linear-gradient(180deg, rgba(18,26,42,.6), rgba(18,26,42,0) 60%);
}

    .hero .grid {
        display: grid;
        gap: 28px;
        align-items: center;
        grid-template-columns: 1.2fr .8fr;
    }

    .hero h1 {
        font-size: clamp(36px,5vw,56px);
        line-height: 1.04;
        margin: 0 0 16px;
        letter-spacing: .2px;
    }

    .hero p {
        color: var(--muted);
        font-size: clamp(16px,2.1vw,18px);
        margin: 0 0 24px;
    }

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-card {
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.hero-img {
    width: 100%;
    height: 320px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.09);
    background: url('/img/hero-serverscape.png') center/cover no-repeat, #0f1522;
    box-shadow: var(--shadow);
}

@media (max-width:950px) {
    .hero .grid {
        grid-template-columns: 1fr;
    }

    .hero-img {
        height: 320px;
    }
}

/* Logos */
.logostrip {
    padding: 16px 0 0;
    opacity: .9;
}

    .logostrip .row {
        display: flex;
        gap: 28px;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
    }

    .logostrip img {
        height: 75px;
        opacity: .8;
    }

/* Sections */
.section {
    padding: 40px 0;
}

    .section h2 {
        text-align: center;
        font-size: clamp(28px,4vw,40px);
        margin: 0 0 10px;
    }

    .section .sub {
        text-align: center;
        color: var(--muted);
        margin-bottom: 30px;
    }

.cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0,1fr));
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}

    .card h4 {
        margin: 0 0 8px;
        font-size: 18px;
    }

    .card p {
        margin: 0;
        color: var(--muted);
    }

    .card .tag {
        display: inline-block;
        font-size: 12px;
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid var(--line);
        margin-bottom: 10px;
    }

@media (max-width:900px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

/* Pricing */
.pricing {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0,1fr));
}

.plan {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
    border-radius: 16px;
    padding: 22px;
}

    .plan h3 {
        margin: 0 0 6px;
    }

    .plan .price {
        font-size: 34px;
        font-weight: 800;
        margin: 8px 0 14px;
    }

    .plan ul {
        list-style: none;
        padding: 0;
        margin: 0 0 16px;
    }

    .plan li {
        padding: 6px 0;
        color: var(--muted);
        border-bottom: 1px dashed rgba(255,255,255,.08);
    }

    .plan .btn {
        width: 100%;
    }

@media (max-width:900px) {
    .pricing {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.site-footer {
    margin-top: 40px;
    padding: 40px 0 20px;
    background: var(--bg-elev);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.2fr repeat(3, minmax(0,1fr));
}

    .footer-grid h5 {
        margin: 0 0 10px;
        font-size: 14px;
        color: #fff;
    }

    .footer-grid ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-grid li {
        margin: 8px 0;
    }

    .footer-grid a {
        color: var(--muted);
    }

        .footer-grid a:hover {
            color: var(--text);
        }

.footer-brand .brand-logo {
    height: 150px;
}

.footer-brand .muted {
    color: var(--muted);
    margin: 10px 0 12px;
}

.socials a {
    color: var(--muted);
    margin-right: 12px;
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 14px;
}

/* Utilities */
.grid {
    display: grid;
}

.row {
    display: flex;
}

.center {
    text-align: center;
}

.muted {
    color: var(--muted);
}

.badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
}

hr.sep {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 24px 0;
    opacity: .6;
}

/* A11y */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 10000;
    background: #000;
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    transform: translateY(-150%);
    transition: transform .15s ease;
}

    .skip-link:focus {
        transform: translateY(0);
    }

/* Active nav */
.nav-links a.active {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

/* Mobile menu appearance */
.site-header.open {
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    background: linear-gradient(180deg, rgba(9,13,22,.92), rgba(9,13,22,.75) 60%, rgba(9,13,22,.5));
}

/* Buttons focus */
.btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(122,162,255,.35);
    border-color: rgba(122,162,255,.65);
}

/* Small screens */
@media (max-width:480px) {
    .site-main {
        gap: 56px;
    }

    .hero {
        padding: 56px 0 28px;
    }
}

/* "Coming soon" badge */
.badge-soon {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    margin-left: 8px;
}

/* Status UI */
.status-cards {
    grid-template-columns: repeat(2, minmax(0,1fr));
}

.status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.2);
}

.status-up {
    background: #30d5c8;
}

.status-down {
    background: #ff6b6b;
}

.status-deg {
    background: #f6c453;
}

@media (max-width:900px) {
    .status-cards {
        grid-template-columns: 1fr;
    }
}

/* Anchor scroll offset for sticky/fixed header */
#features, #pricing, #docs, #status {
    scroll-margin-top: var(--header-h);
}
