/* Single source of truth for the site top bar. Loaded on every page. */
html, body { scroll-padding-top: calc(var(--header-height, 72px) + 8px); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: var(--header-height, 72px);
    box-sizing: border-box;
    line-height: 1.6;
    background: rgba(11, 11, 12, 0.85);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header .header-inner {
    max-width: var(--maxw, 1200px);
    height: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Brand */
.site-header .brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; transition: transform .2s; }
.site-header .brand:hover { transform: translateX(2px); }
.site-header .brand-link { display: contents; color: inherit; text-decoration: none; }
.site-header .brand-logo {
    width: 46px; height: 46px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(237, 28, 36, 0.2), rgba(255, 201, 14, 0.15));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .4); overflow: hidden; flex-shrink: 0;
}
.site-header .brand-logo img { width: 40px; height: auto; border-radius: 8px; }
.site-header .brand-text { line-height: 1.3; }
.site-header .brand-name { font-weight: 700; font-size: 15px; color: #fff; }
.site-header .brand-tag { font-size: 11px; color: var(--muted, #BFBFBF); }

/* Hamburger */
.site-header .hamburger {
    display: none; flex-direction: column; gap: 5px; cursor: pointer;
    background: none; border: none; padding: 8px; z-index: 110; flex-shrink: 0;
}
.site-header .hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all .3s; }
.site-header .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header .hamburger.open span:nth-child(2) { opacity: 0; }
.site-header .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav */
.site-header nav { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.site-header nav a {
    color: var(--muted, #BFBFBF); text-decoration: none; font-weight: 500;
    padding: 8px 12px; border-radius: 10px; transition: all .3s;
    font-size: 13px; white-space: nowrap; position: relative; overflow: hidden;
}
.site-header nav a::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
    transition: left .6s;
}
.site-header nav a:hover::before { left: 100%; }
.site-header nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); transform: translateY(-1px); }
.site-header nav a.nav-highlight { color: var(--accent-gold, #FFC90E); }

/* CTA */
.site-header .cta { flex-shrink: 0; }
.site-header .cta .btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 20px; border-radius: 12px; border: 0; cursor: pointer;
    font-weight: 600; font-size: 13px; transition: all .3s;
    position: relative; overflow: hidden; text-decoration: none; white-space: nowrap;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-red, #ED1C24), #d0181f);
    box-shadow: 0 8px 25px rgba(237, 28, 36, .25);
}
.site-header .cta .btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    transition: left .6s;
}
.site-header .cta .btn:hover::before { left: 100%; }
.site-header .cta .btn:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(237, 28, 36, .35); }
.site-header .cta-label-short { display: none; }

/* Keep the full nav one line between 1025px and 1279px by trimming the tagline */
@media (max-width: 1279px) {
    .site-header .brand-tag { display: none; }
    .site-header nav a { padding: 8px 10px; font-size: 12.5px; }
}

@media (max-width: 1024px) {
    .site-header .header-inner { gap: 8px; }
    .site-header .hamburger { display: flex; }
    .site-header nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; background: #0B0B0C;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 8px 0; z-index: 100; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }
    .site-header nav.open { display: flex; }
    .site-header nav a { padding: 12px 16px; font-size: 14px; width: 100%; border-radius: 0; }
    .site-header nav a::before { display: none; }
    .site-header nav a:hover { background: rgba(255, 255, 255, 0.06); transform: none; }
    .site-header .cta .btn { font-size: 12px; padding: 10px 14px; }
    .site-header .brand-logo { width: 38px; height: 38px; }
    .site-header .brand-logo img { width: 34px; }
    .site-header .brand-name { font-size: 13px; }
}

@media (max-width: 420px) {
    .site-header .cta-label { display: none; }
    .site-header .cta-label-short { display: inline; }
}
