/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--off-white);
    color: var(--sage);
    border-bottom: 1px solid var(--cream);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
}

/* ===== Burger button (phones) ===== */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--sage);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Burger turns into an X when open */
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Nav menu (phones: hidden until opened) ===== */
.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.5rem 1.5rem;
    background: var(--off-white);
    border-bottom: 1px solid var(--cream);
}

.site-nav.is-open {
    display: flex;
}

.site-nav a {
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 0;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    text-decoration: underline;
    text-decoration-color: var(--mint);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.site-nav .nav-cta {
    background: var(--butter);
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    text-align: center;
    margin-top: 0.5rem;
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
    background: var(--mint);
    text-decoration: none;
}

/* ===== Logged-in client ===== */
.site-nav .nav-greeting {
    color: var(--bubble);         /* a little softer than the main links */
}

/* Log out looks like a normal nav link, not a button */
.nav-logout button {
    padding: 0.6rem 0;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.nav-logout button:hover,
.nav-logout button:focus-visible {
    text-decoration: underline;
    text-decoration-color: var(--mint);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

/* ===== Media queries ===== */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .site-nav {
        display: flex;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 1.75rem;
        padding: 0;
        background: none;
        border: none;
    }

    .site-nav .nav-cta {
        margin-top: 0;
    }
}