/* ============================================================
   SITE HEADER
   — backdrop-filter lives on ::before so the fixed nav is NOT
     trapped inside the header's containing block.
   ============================================================ */
.si-scope.si-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid rgba(42, 42, 46, 0.6);
    transition: border-color 0.3s ease;
}

.si-scope.si-site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 15, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: -1;
    pointer-events: none;
}

.si-site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo */
.si-site-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
    margin-right: auto;
}

.si-site-header__logo:hover {
    opacity: 0.75;
}

.si-site-header__logo svg {
    height: 18px;
    width: auto;
    display: block;
    color: #D4A853;
    fill: currentColor;
}

.si-site-header__logo-text {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.25rem;
    color: #F0EDE6;
}

/* Desktop nav */
.si-nav__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.si-nav__link {
    display: block;
    padding: 0.5rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9B978E;
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    font-family: 'DM Sans', system-ui, sans-serif;
}

.si-nav__link:hover {
    color: #F0EDE6;
    background: rgba(255, 255, 255, 0.05);
}

/* Active state — double class for specificity over single-class colour rules */
.si-nav__link.si-nav__link--active {
    color: #D4A853;
}

.si-nav__link--cta {
    color: #D4A853;
    border: 1px solid rgba(212, 168, 83, 0.4);
    margin-left: 0.5rem;
}

.si-nav__link--cta:hover {
    background: rgba(212, 168, 83, 0.1);
    color: #E8C675;
    border-color: #D4A853;
}

/* Hamburger button - hidden on desktop */
.si-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.si-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.si-nav-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: #9B978E;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

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

/* Swirl canvas — hidden on desktop, shown in mobile overlay */
.si-nav__overlay-bg {
    display: none;
}

/* ============================================================
   NAV OVERLAY SWIRL ANIMATIONS
   ============================================================ */
@keyframes si-swirl-drift-a {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    30%  { transform: translateY(-18px) rotate(2.5deg); }
    70%  { transform: translateY(12px) rotate(-1.5deg); }
}

@keyframes si-swirl-drift-b {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    40%  { transform: translateY(14px) rotate(-2deg); }
    75%  { transform: translateY(-10px) rotate(1.5deg); }
}

@keyframes si-swirl-breathe {
    0%, 100% { opacity: 1; }
    50%  { opacity: 0.5; }
}

.si-swirl-a {
    animation: si-swirl-drift-a 30s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.si-swirl-b {
    animation: si-swirl-drift-b 38s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.si-swirl-c {
    animation: si-swirl-drift-a 24s ease-in-out infinite 8s reverse;
    transform-box: fill-box;
    transform-origin: center;
}

.si-swirl-bars {
    animation: si-swirl-breathe 14s ease-in-out infinite;
}

.si-swirl-bars-l {
    animation: si-swirl-breathe 18s ease-in-out infinite 4s;
}

@media (prefers-reduced-motion: reduce) {
    .si-swirl-a,
    .si-swirl-b,
    .si-swirl-c,
    .si-swirl-bars,
    .si-swirl-bars-l {
        animation: none;
    }
}

/* ============================================================
   MOBILE NAV OVERLAY
   ============================================================ */
@media (max-width: 768px) {

    /* Toggle: fixed to viewport so it stays above the overlay */
    .si-nav-toggle {
        display: flex;
        position: fixed;
        top: 12px;
        right: 1.5rem;
        z-index: 1001;
    }

    /* Bars turn light when overlay is open */
    .si-nav-toggle[aria-expanded="true"] span {
        background: #F0EDE6;
    }

    /* Full-screen overlay.
       backdrop-filter is on ::before so the swirl (z-index 0)
       renders underneath the frosted-glass layer (z-index 1). */
    .si-nav {
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        overflow: hidden;
        transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Frosted glass layer — sits above swirl, below links */
    .si-nav::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(13, 13, 15, 0.82);
        backdrop-filter: blur(28px) saturate(1.3);
        -webkit-backdrop-filter: blur(28px) saturate(1.3);
        z-index: 1;
        pointer-events: none;
    }

    /* Warm centre glow — above swirl */
    .si-nav::after {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(212, 168, 83, 0.07) 0%, transparent 70%);
        z-index: 3;
        pointer-events: none;
    }

    .si-nav.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    /* Swirl — above frosted glass, below links */
    .si-nav__overlay-bg {
        display: block;
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: 2;
    }

    .si-nav__swirl-canvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    /* Nav inner — above everything */
    .si-nav__inner {
        position: relative;
        z-index: 4;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .si-nav__list {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    /* Stagger-reveal list items */
    .si-nav__list > li {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .si-nav.is-open .si-nav__list > li {
        opacity: 1;
        transform: translateY(0);
    }

    .si-nav.is-open .si-nav__list > li:nth-child(1) { transition-delay: 0.15s; }
    .si-nav.is-open .si-nav__list > li:nth-child(2) { transition-delay: 0.23s; }
    .si-nav.is-open .si-nav__list > li:nth-child(3) { transition-delay: 0.31s; }
    .si-nav.is-open .si-nav__list > li:nth-child(4) { transition-delay: 0.39s; }

    .si-nav__link {
        font-size: 2rem;
        font-family: 'Instrument Serif', Georgia, serif;
        font-weight: 400;
        padding: 0.55rem 2rem;
        color: #F0EDE6;
        letter-spacing: 0.02em;
        background: none;
    }

    .si-nav__link:hover,
    .si-nav__link:focus-visible {
        color: #D4A853;
        background: transparent;
        text-shadow: 0 0 28px rgba(212, 168, 83, 0.35);
    }

    .si-nav__link.si-nav__link--active {
        color: #D4A853;
        text-shadow: 0 0 28px rgba(212, 168, 83, 0.35);
    }

    .si-nav__link--cta {
        font-family: 'DM Sans', system-ui, sans-serif;
        font-size: 0.85rem;
        font-weight: 500;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        margin-left: 0;
        margin-top: 2rem;
        padding: 0.75rem 2.5rem;
        border-radius: 100px;
        background: rgba(212, 168, 83, 0.10);
        border: 1px solid rgba(212, 168, 83, 0.45);
        color: #D4A853;
        text-shadow: none;
    }

    .si-nav__link--cta:hover,
    .si-nav__link--cta:focus-visible {
        background: rgba(212, 168, 83, 0.18);
        border-color: #E8C675;
        color: #E8C675;
        text-shadow: 0 0 20px rgba(232, 198, 117, 0.3);
    }
}

/* ============================================================
   SCROLL PROGRESS BAR
   Created by JS in si-scroll-observer.js, styled here.
   ============================================================ */
.si-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #D4A853, #E8C675);
    transform: scaleX(0);
    transform-origin: left center;
    z-index: 2000;
    pointer-events: none;
    will-change: transform;
}
