/* ==========================================================================
   Site Header & Navigation
   Mobile-first, breakpoints at 768px
   ========================================================================== */

/* ══════════════════════════════════════════════════════════════════════════
   HEADER BAR (collapsed)
   ══════════════════════════════════════════════════════════════════════════ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-header);
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: background 0.3s ease, -webkit-backdrop-filter 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header--solid {
    background: rgba(180, 90, 20, 0.65);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
}

/* ── Logo ── */
.site-header__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-white);
    text-decoration: none;
    flex-shrink: 0;
}

.site-header__logo-icon {
    width: 28px;
    height: auto;
}

.site-header__logo-text {
    height: 14px;
    width: auto;
}

/* ── Menu Button ── */
.site-header__menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: var(--btn-menu-height);
    background-color: var(--btn-menu-bg);
    border: none;
    border-radius: var(--btn-menu-radius);
    cursor: pointer;
    padding: 0 8px 0 20px;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.site-header__menu-btn:hover {
    opacity: 0.85;
}

.site-header__menu-text {
    font-family: var(--font-body);
    font-size: var(--btn-menu-font-size);
    font-weight: var(--btn-menu-font-weight);
    color: var(--btn-menu-color);
    line-height: 1;
    white-space: nowrap;
}

.site-header__menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--btn-menu-icon-size);
    height: var(--btn-menu-icon-size);
    flex-shrink: 0;
    background: var(--color-primary-orange);
    border-radius: 50%;
}

/* ── Burger → Smiley animation ── */
.site-header__burger {
    position: relative;
    width: 18px;
    height: 14px;
}

.site-header__burger-line {
    position: absolute;
    left: 0;
    display: block;
    height: 2px;
    background: var(--color-off-white);
    border-radius: 1px;
    transition: width 0.3s ease, height 0.3s ease, transform 0.3s ease, top 0.3s ease, left 0.3s ease, border-radius 0.3s ease;
}

.site-header__burger-line--top {
    top: 0;
    width: 100%;
}

.site-header__burger-line--mid {
    top: 6px;
    width: 100%;
}

.site-header__burger-line--bot {
    top: 12px;
    width: 100%;
}

/* Hover: lines → smiley */
.site-header__menu-btn:hover .site-header__burger-line--top {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    top: 1px;
    left: 3px;
    transform: none;
}

.site-header__menu-btn:hover .site-header__burger-line--mid {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    top: 1px;
    left: 11px;
    transform: none;
}

.site-header__menu-btn:hover .site-header__burger-line--bot {
    width: 12px;
    height: 6px;
    top: 7px;
    left: 3px;
    background: transparent;
    border-bottom: 2px solid var(--color-off-white);
    border-radius: 0 0 50% 50%;
}

/* ══════════════════════════════════════════════════════════════════════════
   NAVIGATION (expanded)
   ══════════════════════════════════════════════════════════════════════════ */

.site-nav {
    position: fixed;
    inset: 0;
    z-index: var(--z-nav-overlay);
    pointer-events: none;
    visibility: hidden;
}

.site-nav.is-open {
    pointer-events: auto;
    visibility: visible;
}

/* ── Overlay ── */
.site-nav__overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.site-nav.is-open .site-nav__overlay {
    opacity: 1;
}

/* ── Panel ── */
.site-nav__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-grey);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 1;
}

.site-nav.is-open .site-nav__panel {
    transform: translateX(0);
}

/* ── Close Button ──
   Lives outside .site-nav__panel (to avoid transform context issues).
   JS positions it at the exact same spot as the hamburger icon. */
.site-nav__close {
    position: absolute;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-grey-ultra-dark);
    z-index: 2;
}

.site-nav__close svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Content (vertically centered) ── */
.site-nav__content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: var(--grid-margin);
    right: var(--grid-margin);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* ── Nav Links ── */
.site-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.site-nav__list li {
    position: relative;
    padding: var(--space-md) 0;
}

.site-nav__list li::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-orange-mid);
}

.site-nav__list li a {
    font-family: var(--font-heading);
    font-size: var(--nav-link-size);
    font-weight: var(--nav-link-weight);
    line-height: var(--h3-line-height);
    color: var(--color-grey-ultra-dark);
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.site-nav__list li a:hover {
    color: var(--color-primary-orange);
}

.site-nav__list li.current-menu-item a {
    font-weight: var(--weight-semibold);
}

/* ── CTA Button ── */
.site-nav__cta {
    display: inline-flex;
    align-items: center;
    height: var(--btn-secondary-height);
    background-color: var(--btn-secondary-bg);
    border-radius: var(--btn-secondary-radius);
    text-decoration: none;
    width: fit-content;
    transition: opacity 0.2s ease;
    margin-top: var(--space-xs);
}

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

.site-nav__cta-text {
    font-family: var(--font-body);
    font-size: var(--btn-secondary-font-size);
    font-weight: var(--btn-secondary-font-weight);
    color: var(--btn-secondary-color);
    padding: 0 16px;
    line-height: 1;
    white-space: nowrap;
}

.site-nav__cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--btn-secondary-icon-size);
    height: var(--btn-secondary-icon-size);
    flex-shrink: 0;
}

.site-nav__cta-icon svg {
    width: 100%;
    height: 100%;
}

/* ── Decorative Icon ── */
.site-nav__decor {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    transform: rotate(-24.83deg);
    pointer-events: none;
    opacity: 0.95;
}

.site-nav__decor svg {
    width: 100%;
    height: 100%;
}

/* ── Body lock when nav is open ── */
body.nav-open {
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════
   Desktop (>= 768px)
   ══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {

    .site-header__inner {
        padding: 20px 24px;
    }

    .site-header__logo-icon {
        width: 40px;
    }

    .site-header__logo-text {
        height: 20px;
    }

    /* Panel slides in from right, narrower on desktop */
    .site-nav__panel {
        width: 491px;
    }

    /* Content */
    .site-nav__content {
        left: 42px;
        right: 42px;
    }

    /* Decorative icon larger on desktop */
    .site-nav__decor {
        width: 260px;
        height: 260px;
        bottom: -60px;
        right: -60px;
    }
}
