/* Shared header for every page except the homepage (which has its own fixed nav):
   logo, the six site links, Get Updates, and on phones a menu button (menu.js).
   Phones get one row: logo, Get Updates, menu. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 248, 240, 0.92);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(99, 110, 114, 0.15);
    font-family: 'Quicksand', sans-serif;
    line-height: 1.6;
}
.site-header-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.35rem;
    color: var(--orange, #FF8C42);
    text-decoration: none;
    white-space: nowrap;
}
.site-logo:hover { text-decoration: none; }
.site-logo-icon { font-size: 1.7rem; }
.site-nav { display: flex; gap: 1rem; align-items: center; justify-content: flex-end; }
.site-nav-links { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-weight: 700; color: var(--dark, #2D3436); opacity: 0.9; }
.site-nav a:hover { color: var(--orange, #FF8C42); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--orange-dark, #E67A35); }
.site-nav a:focus-visible, .site-logo:focus-visible { outline: 3px solid var(--orange, #FF8C42); outline-offset: 2px; border-radius: 8px; }
.site-nav .site-nav-cta {
    background: var(--orange, #FF8C42);
    color: var(--white, #FFFFFF);
    opacity: 1;
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(255, 140, 66, 0.3);
    white-space: nowrap;
}
.site-nav .site-nav-cta:hover { color: var(--white, #FFFFFF); }
.site-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}
.site-menu span { width: 25px; height: 3px; background: var(--dark, #2D3436); border-radius: 2px; transition: all 0.3s ease; }
.site-menu:focus-visible { outline: 3px solid var(--orange, #FF8C42); outline-offset: 2px; }
/* Three bars become an X while the menu is open. */
.site-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.site-menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* A jump to a heading (#ai-processing, #data-export, ...) lands below the sticky header. */
html { scroll-padding-top: 6rem; }

@media (max-width: 900px) {
    .site-nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 4px);
        left: 0.75rem;
        right: 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem;
        background: var(--cream, #FFF8F0);
        border-radius: 12px;
        box-shadow: 0 8px 40px rgba(45, 52, 54, 0.12);
        /* A short (landscape) screen scrolls the panel itself, so every link stays reachable. */
        max-height: calc(100vh - 6rem);
        max-height: calc(100dvh - 6rem);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .site-nav-links.mobile-open { display: flex; }
    .site-nav-links a { display: block; padding: 0.7rem 0.75rem; border-radius: 10px; }
    .site-menu { display: flex; }
    .site-nav { gap: 0.5rem; }
}
@media (max-width: 640px) {
    .site-header-inner { padding: 0.5rem 1.25rem; }
    html { scroll-padding-top: 4.75rem; }
}
@media (max-width: 360px) {
    /* Logo, Get Updates and the menu button stay on one row on 320 px phones. */
    .site-header-inner { padding: 0.5rem 1rem; gap: 0.5rem; }
    .site-logo { font-size: 1.15rem; }
    .site-logo-icon { font-size: 1.4rem; }
    .site-nav .site-nav-cta { padding: 0.45rem 0.8rem; font-size: 0.9rem; }
}
