/**
 * header.css
 * Sticky site header — transparent at top, solid white on scroll
 * Mobile drawer navigation
 */

/* ══════════════════════════════════════════════════════
   SITE HEADER
═══════════════════════════════════════════════════════ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    padding-block: 12px;
    transition:
        background-color  0.4s var(--ease-out),
        padding           0.4s var(--ease-out),
        box-shadow        0.4s var(--ease-out);
    will-change: transform;
}

/* Transparent state (at top of page) */
.site-header--transparent {
    background-color: transparent;
}

/* Drop below overlay/drawer when mobile nav is open */
.site-header--drawer-open {
    z-index: 700;
}

/* Solid state (scrolled) */
.site-header--solid {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: 0 1px 0 rgba(11, 29, 58, 0.08),
                0 2px 24px rgba(11, 29, 58, 0.06);
    padding-block: 14px;
}

/* ── Inner Layout ────────────────────────────────────── */

.site-header__inner {
    display: flex;
    align-items: center;
    padding-inline: var(--container-gutter);
    position: relative;
}

/* ── Logo ────────────────────────────────────────────── */

.site-header__logo {
    flex-shrink: 0;
    position: relative;
    display: block;
    width: auto;
    height: 65px;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.site-header__logo:hover {
    opacity: 0.85;
}

/* Both logos stacked on top of each other */
.site-header__logo-img {
    display: block;
    width: auto;
    transition:
        opacity 0.4s var(--ease-out),
        height 0.4s var(--ease-out);
}

/* White logo (used on transparent header over dark hero) */
.site-header__logo-img--light {
    position: relative;
    height: 65px;
    opacity: 1;
}

/* Dark logo (used on solid sticky header) */
.site-header__logo-img--dark {
    position: absolute;
    top: 0;
    left: 0;
    height: 65px;
    opacity: 0;
    pointer-events: none;
}

/* Reduce logo size when header becomes solid */
/* .site-header--solid .site-header__logo-img--light,
.site-header--solid .site-header__logo-img--dark {
    height: 50px;
} */

/* Switch logos when sticky header appears */
.site-header--solid .site-header__logo-img--light {
    opacity: 0;
}

.site-header--solid .site-header__logo-img--dark {
    opacity: 1;
}


/* ── Primary Nav ─────────────────────────────────────── */

.site-header__nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 94, 221, 0.06);
    padding: 6px 16px;
    border-radius: var(--radius-full);
}

.site-header__nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
}

.site-header__nav a {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: var(--ls-label);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color var(--duration-base) var(--ease-out);
}

/* Underline indicator */
.site-header__nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--clr-gold);
    transition: width var(--duration-base) var(--ease-out);
}

.site-header__nav a:hover {
    color: var(--clr-gold);
}

.site-header__nav a:hover::after {
    width: 100%;
}

/* Scrolled state — dark nav links */
.site-header--solid .site-header__nav a {
    color: var(--clr-navy);
}

.site-header--solid .site-header__nav a:hover {
    color: var(--clr-gold);
}

/* ── Header Actions ──────────────────────────────────── */

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-left: auto;
    flex-shrink: 0;
}

.site-header__phone {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color var(--duration-base) var(--ease-out);
    white-space: nowrap;
}

.site-header__phone:hover {
    color: var(--clr-gold);
}

.site-header--solid .site-header__phone {
    color: var(--clr-text-mid);
}

.site-header--solid .site-header__phone:hover {
    color: var(--clr-gold);
}

/* ── Hamburger Button ────────────────────────────────── */

.site-header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: var(--space-3);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.site-header__hamburger-bar {
    display: block;
    width: 24px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-full);
    transition:
        background var(--duration-base) var(--ease-out),
        transform  var(--duration-base) var(--ease-out),
        opacity    var(--duration-base) var(--ease-out);
    transform-origin: center;
}

.site-header--solid .site-header__hamburger-bar {
    background: var(--clr-navy);
}

/* Open state */
.site-header__hamburger[aria-expanded="true"] .site-header__hamburger-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.site-header__hamburger[aria-expanded="true"] .site-header__hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.site-header__hamburger[aria-expanded="true"] .site-header__hamburger-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Scroll Progress Bar ─────────────────────────────── */

.site-header__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--clr-gold), var(--clr-gold-light));
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ══════════════════════════════════════════════════════
   MOBILE OVERLAY
═══════════════════════════════════════════════════════ */

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 18, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-slow) var(--ease-out);
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ══════════════════════════════════════════════════════
   MOBILE DRAWER
═══════════════════════════════════════════════════════ */

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 92vw);
    background: var(--clr-navy);
    z-index: var(--z-drawer);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease-in-out);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mobile-drawer.open {
    transform: translateX(0);
}

/* Close button */
.mobile-drawer__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--duration-fast) var(--ease-out);
}

.mobile-drawer__close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-drawer__close span {
    position: absolute;
    width: 18px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.75);
    display: block;
}

.mobile-drawer__close span:nth-child(1) { transform: rotate(45deg); }
.mobile-drawer__close span:nth-child(2) { transform: rotate(-45deg); }

/* Logo */
.mobile-drawer__logo {
    padding: 32px 36px 8px;
}

.mobile-drawer__logo img {
    height: 44px;
    width: auto;
}

/* Nav links */
.mobile-drawer__nav {
    padding: 24px 36px;
    flex: 1;
}

.mobile-drawer__nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-drawer__link {
    display: block;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 14px 0;
    transition: color var(--duration-fast) var(--ease-out), padding-left var(--duration-base) var(--ease-out);
}

.mobile-drawer__link:hover {
    color: var(--clr-gold);
    padding-left: 6px;
}

/* CTA area */
.mobile-drawer__cta {
    padding: 24px 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-drawer__cta .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: var(--space-5);
}

.mobile-drawer__contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mobile-drawer__contact a {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color var(--duration-fast);
}

.mobile-drawer__contact a:hover {
    color: var(--clr-gold);
}

/* Footer note */
.mobile-drawer__footer {
    padding: 20px 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-drawer__footer p {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.25);
    line-height: 1.6;
}
