:root {
    --bg: #071826;
    --bg-deep: #0b1f2a;
    --panel: #0c2130;
    --line: rgba(255, 255, 255, 0.09);
    --text: #ffffff;
    --muted: #c8d1d8;
    --accent: #f5b942;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background:
        linear-gradient(180deg, rgba(11, 17, 32, 0.92), rgba(11, 17, 32, 0.68)),
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.1), transparent 35%);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 40px rgba(4, 10, 22, 0.32);
}

.header-inner,
.flash-stack {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.42), rgba(139, 92, 246, 0.24));
    border: 1px solid rgba(34, 211, 238, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.08);
}

.brand-logo-shell {
    width: 64px;
    height: 64px;
    min-width: 64px;
    max-width: 64px;
    aspect-ratio: 1 / 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    flex-shrink: 0;
    padding: 0;
    line-height: 0;
    border-radius: 16px;
    background: transparent;
    border: 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.brand-logo-image {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
    border-radius: 0;
    clip-path: none;
    background: transparent;
}

.brand-text {
    display: grid;
    gap: 1px;
    align-self: center;
}

.brand-text strong {
    font-size: 1.1rem;
    font-weight: 800;
}

.brand-text small {
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    color: #ffffff;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link-active {
    color: var(--ds-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link-secondary {
    color: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.nav-form {
    margin: 0;
}

.nav-form button {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #ffffff;
    margin: 4px auto;
    transition: all 0.3s ease;
}

.flash-stack {
    padding-top: 16px;
}

.flash-message {
    background:
        linear-gradient(135deg, rgba(18, 54, 74, 0.95), rgba(27, 43, 76, 0.9)),
        #12364a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

@media (max-width: 860px) {
    .brand-logo-shell {
        width: 56px;
        height: 56px;
        min-width: 56px;
        max-width: 56px;
    }

    .brand-logo-image {
        object-position: center;
        transform: none;
    }

    .brand-text strong {
        font-size: 1rem;
    }

    .brand-text small {
        font-size: 0.66rem;
        letter-spacing: 0.1em;
    }

    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        top: 74px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
        border-radius: 18px;
        background: rgba(17, 24, 39, 0.92);
        border: 1px solid rgba(255,255,255,0.08);
        backdrop-filter: blur(16px);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }
}

@media (max-width: 640px) {
    .brand {
        min-width: 0;
        gap: 12px;
    }

    .brand-logo-shell {
        width: 52px;
        height: 52px;
        min-width: 52px;
        max-width: 52px;
    }

    .brand-text {
        min-width: 0;
    }
}
