/* ════════════════════════════════════
   Shared Header — all pages
   ════════════════════════════════════ */

:root{
    --h-fg:#0D0F0F;
    --h-fg2:#5c5348;
    --h-fg3:#8a8279;
    --h-bg:#ffffff;
    --h-bg2:#F3EFEC;
    --h-border:#e0d8d2;
    --h-brand:#8C1515;
}

.header {
    background: rgba(255,255,255,.82);
    -webkit-backdrop-filter: blur(12px) saturate(1.6);
    backdrop-filter: blur(12px) saturate(1.6);
    padding: 14px 28px;
    border-bottom: 1px solid rgba(226,232,240,.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Homepage header — transparent, floats over hero-cloud seamlessly */
body.page-home .header {
    position: fixed;
    left: 0; right: 0; top: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: none;
    transition: background .3s ease, backdrop-filter .3s ease;
}

/* After scrolling past hero, restore solid header background */
body.page-home .header.header-scrolled {
    background: rgba(255,255,255,.82);
    -webkit-backdrop-filter: blur(12px) saturate(1.6);
    backdrop-filter: blur(12px) saturate(1.6);
    border-bottom: 1px solid rgba(226,232,240,.6);
}

/* Gallery page: plain solid header, no gradient */
body.page-gallery .header {
    background: rgba(255,255,255,.95);
    -webkit-backdrop-filter: blur(12px) saturate(1.6);
    backdrop-filter: blur(12px) saturate(1.6);
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    border-radius: 6px;
    object-fit: contain;
}

.logo svg { display: none; }   /* hide fallback svg when logo image loads */

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--h-fg);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--h-fg3);
    font-weight: 400;
    line-height: 1.2;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    color: var(--h-fg2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all .12s ease;
}

.header-link:hover {
    color: var(--h-fg);
    background: var(--h-bg2);
}

.header-link.active {
    color: var(--h-fg);
    font-weight: 600;
    background: var(--h-bg2);
}

.header-link svg { flex-shrink: 0; }

.header-divider {
    width: 1px;
    height: 16px;
    background: var(--h-border);
    margin: 0 4px;
}

/* Hamburger (mobile) */
.hamburger-btn {
    display: none;
    background: none;
    border: 1px solid var(--h-border);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    color: var(--h-fg2);
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}

.hamburger-btn:hover {
    color: var(--h-fg);
    background: var(--h-bg2);
}

@media (max-width: 768px) {
    .header { padding: 12px 20px; }

    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-actions {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        background: var(--h-bg);
        border-bottom: 1px solid var(--h-border);
        padding: 8px 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,.06);
        z-index: 100;
        gap: 2px;
    }

    .header-actions.mobile-open {
        display: flex !important;
    }

    .header-actions .header-link {
        width: 100%;
        padding: 10px 12px;
        border-radius: 6px;
    }

    .header-actions .header-divider {
        width: 100%;
        height: 1px;
        margin: 2px 0;
    }

    .logo-subtitle { display: none; }
}
