/* ==========================================================================
   Vitalii Bokhin — Software Engineer — site header stylesheet
   Shares the design tokens with home.css (ink-navy surface, amber signal
   accent). Kept standalone so the header can be included on any page.
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Tokens (mirrors home.css — keep in sync if you update one)
   ------------------------------------------------------------------------- */
:root {
    --bg: #0b1220;
    --bg-raised: #101b2d;

    --ink: #edeef0;
    --ink-dim: #c7cbd6;
    --ink-muted: #8b93a7;

    --amber: #f5a623;
    --amber-ink: #241804;
    --teal: #4fd1c5;

    --line: rgba(237, 238, 240, 0.09);
    --line-strong: rgba(237, 238, 240, 0.16);

    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

    --container-w: 1080px;
    --radius-sm: 6px;
}

/* -------------------------------------------------------------------------
   2. Header shell
   ------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 18, 32, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 72px;
}

/* -------------------------------------------------------------------------
   3. Logo
   ------------------------------------------------------------------------- */
.header-logo {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    flex-shrink: 0;
}

.header-logo::before {
    content: '~/';
    color: var(--amber);
}

/* -------------------------------------------------------------------------
   4. Nav links
   ------------------------------------------------------------------------- */
.header-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-right: auto;
}

.header-nav-link {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    transition: color 0.15s ease;
    white-space: nowrap;
}

.header-nav-link:hover {
    color: var(--ink);
}

/* -------------------------------------------------------------------------
   5. Locale switcher
   ------------------------------------------------------------------------- */
.header-locales {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: var(--font-mono);
    font-size: 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 3px;
    flex-shrink: 0;
}

.header-locale-link {
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--ink-muted);
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.header-locale-link:hover {
    color: var(--ink);
}

.header-locale-link.is-active {
    background: var(--amber);
    color: var(--amber-ink);
}

/* -------------------------------------------------------------------------
   6. CTA button
   ------------------------------------------------------------------------- */
.header-cta {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--amber);
    color: var(--amber-ink);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}

.header-cta:hover {
    background: #ffb63d;
    transform: translateY(-1px);
}

/* -------------------------------------------------------------------------
   7. Burger (mobile only)
   ------------------------------------------------------------------------- */
.header-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.header-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .header-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .header-burger span:nth-child(2) {
    opacity: 0;
}

.site-header.is-open .header-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* -------------------------------------------------------------------------
   8. Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .header-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--bg-raised);
        border-bottom: 1px solid var(--line);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .site-header.is-open .header-nav {
        max-height: 320px;
    }

    .header-nav-link {
        width: 100%;
        padding: 14px 32px;
        border-bottom: 1px solid var(--line);
    }

    .header-locales {
        display: none;
    }

    .header-cta {
        display: none;
    }

    .header-burger {
        display: flex;
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .header-inner {
        padding: 0 20px;
    }
}