html:root .header,
html:root[data-home-page].home-theme-transition:not(.tag-hero-pending):not(.tag-hero-active) .header {
    transition: transform 440ms cubic-bezier(.22, .61, .36, 1), opacity 240ms ease,
        background-color 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

/* The existing entrance keeps its long fade; scrolling uses the shorter motion. */
html:root:is(.tag-hero-pending, .tag-hero-active, .tag-hero-opening) .header {
    transition: transform 440ms cubic-bezier(.22, .61, .36, 1), opacity 1100ms ease,
        background-color 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

html:root.tag-hero-opening .header { transition-delay: 0ms, 80ms, 0ms, 0ms, 0ms; }

.mobile-nav-sheet { display: contents; }
.mobile-nav-backdrop, .mobile-nav-grab, .mobile-nav-release, .mobile-nav-social-label { display: none; }

/* One full-bleed photo/overlay box; extra top padding preserves content positions. */
html:root[data-home-page] .hero--brand {
    margin-top: -64px;
    min-height: 100dvh;
    padding-top: calc(clamp(84px, 10vh, 124px) + 64px);
    overflow: hidden;
    clip-path: none;
}

@media (max-width: 768px) {
    html:root.js body:is(.nav-open, .nav-closing) .header { transform: none !important; opacity: 1; filter: none; }
    html:root.js .mobile-nav-backdrop {
        display: block; position: fixed; inset: 64px 0 0; z-index: 98;
        background: rgba(9, 14, 11, .22); opacity: 0; visibility: hidden;
        pointer-events: none; touch-action: none;
        transition: opacity 300ms ease, visibility 0ms linear 440ms;
    }
    html:root.js body.nav-open .mobile-nav-backdrop { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0ms; }
    html:root.js .mobile-nav-sheet {
        display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99;
        height: min(584px, calc(100dvh - 160px)); max-height: calc(100dvh - 64px);
        padding: 26px 24px calc(18px + env(safe-area-inset-bottom));
        overflow-y: auto; overscroll-behavior: contain; border-radius: 8px 8px 0 0;
        border-top: 1px solid #b88b6755; background: #1a201c; color: #f0f0e9;
        box-shadow: 0 -12px 40px #0003; opacity: 0; visibility: hidden; pointer-events: none;
        transform: translateY(100%);
        transition: transform 440ms cubic-bezier(.22,.61,.36,1), opacity 240ms ease, visibility 0ms linear 440ms;
    }
    html:root.js .mobile-nav-sheet[data-open=true] {
        opacity: 1; visibility: visible; pointer-events: auto;
        transform: translateY(var(--sheet-pull, 0px)); transition-delay: 0ms;
    }
    html:root.js .mobile-nav-sheet[data-dragging=true] { transition: none; }
    html:root.js .mobile-nav-grab { display: block; position: absolute; top: 0; left: calc(50% - 50px); width: 100px; height: 24px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
    .mobile-nav-grab::after { content: ''; position: absolute; left: 33px; top: 10px; width: 34px; height: 3px; border-radius: 2px; background: #607064; }
    html:root.js .mobile-nav-sheet .nav-links {
        position: relative; inset: auto; display: flex; flex: 0 0 auto; flex-direction: column; align-items: stretch;
        justify-content: flex-start; width: 100%; min-height: 0; margin: 0; padding: 0; gap: 0;
        background: none; opacity: 1; visibility: visible; transform: none; transition: none;
        backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: auto;
    }
    html:root.js .mobile-nav-sheet .nav-links > li:not(.nav-current-marker) { width: 100%; }
    html:root.js .mobile-nav-sheet .nav-links .nav-link {
        display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 61px;
        padding: 10px 32px 10px 0; border: 0; border-bottom: 1px solid #ffffff15; border-radius: 0;
        font-family: var(--font-main, 'Arabika Manrope', sans-serif); font-size: 27px; line-height: 1.3;
        font-weight: 650; text-transform: none; letter-spacing: 0; color: inherit; background: none;
    }
    html:root.js .mobile-nav-sheet .nav-link::before, html:root.js .mobile-nav-sheet .nav-link::after { display: none; }
    html:root.js .mobile-nav-sheet .nav-links .nav-link:is(.active, :hover, :focus-visible) { color: var(--accent); background: none; }
    html:root.js .mobile-nav-sheet .mobile-nav-release {
        display: flex; align-items: center; flex: 0 0 auto; gap: 14px; min-height: 89px;
        padding: 18px 0; margin-top: auto; border-bottom: 1px solid #ffffff15;
    }
    .mobile-nav-release img { width: 52px; height: 52px; flex: 0 0 52px; object-fit: cover; border-radius: 2px; }
    .mobile-nav-release-copy { display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 52px; color: inherit; }
    .mobile-nav-release-copy small { color: #9ca89c; font-size: 10px; line-height: 1.5; }
    .mobile-nav-release-copy strong { font-size: 18px; font-weight: 650; line-height: 1.4; }
    .mobile-nav-listen { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; flex: 0 0 44px; border-radius: 4px; background: #c99772; color: #161b16; font-size: 17px; }
    html:root.js body .mobile-nav-sheet.mobile-nav-sheet .nav-social {
        position: relative; inset: auto; display: flex; align-items: center; justify-content: flex-start;
        width: 100%; flex: 0 0 auto; margin: 0; padding: 12px 0 0; gap: 20px; z-index: auto;
        background: none; opacity: 1; visibility: visible; transform: none; transition: none; pointer-events: auto;
    }
    html:root.js .mobile-nav-sheet .nav-social a { width: auto; min-width: 44px; min-height: 44px; gap: 8px; color: #b8c1b7; font-size: 19px; }
    .mobile-nav-sheet .nav-social a:last-child { margin-left: auto; }
    .mobile-nav-sheet .mobile-nav-social-label { display: inline; font: 500 12px/1.4 var(--font-main, 'Arabika Manrope', sans-serif); }
    .mobile-nav-sheet a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
    html:root.js[data-home-theme=paper] .mobile-nav-sheet { background: #edece6; color: #293d32; border-color: #bdc8b4; }
    html:root.js[data-home-theme=paper] .mobile-nav-sheet .nav-links .nav-link, html:root.js[data-home-theme=paper] .mobile-nav-sheet .mobile-nav-release { border-color: #293d3220; }
    html:root.js[data-home-theme=paper] .mobile-nav-release-copy small, html:root.js[data-home-theme=paper] .mobile-nav-sheet .nav-social a { color: #52634f; }
}
@media (max-width: 350px) { html:root.js body .mobile-nav-sheet.mobile-nav-sheet .nav-social { gap: 12px; } .mobile-nav-sheet .mobile-nav-social-label { font-size: 11px; } }
@media (max-height: 740px) and (max-width: 768px) { html:root.js .mobile-nav-sheet .nav-links .nav-link { min-height: 55px; } }
@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
    html:root.js .mobile-nav-sheet, html:root.js .mobile-nav-sheet[data-open=true] { transform: none; transition: opacity 160ms ease, visibility 0ms linear 160ms; }
    html:root.js .mobile-nav-sheet[data-open=true] { transition-delay: 0ms; }
    html:root.js .mobile-nav-backdrop { transition-duration: 160ms, 0ms; }
}

html:root[data-home-page] .hero--brand .hero-backdrop {
    top: 0;
    height: 100%;
}

html:root[data-home-page] .tag-hero-veil { top: 0; }

@media (max-width: 768px) {
    html:root[data-home-page] .hero--brand {
        padding-top: calc(max(56px, 9svh) + 64px);
    }
}

@media (max-height: 500px) {
    html:root[data-home-page] .hero--brand {
        min-height: 100svh;
        padding-top: 84px;
    }
}

html:root.js[data-home-page] .header {
    background: rgba(13, 13, 13, var(--header-opacity, .7));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html:root[data-home-page][data-home-theme="paper"]:not(.tag-hero-pending):not(.tag-hero-active) .header {
    background: rgba(237, 236, 230, var(--header-opacity, .7));
}

@media (max-width: 768px) {
    body.nav-closing { overflow: hidden; }

    html:root.js body:is(.nav-open, .nav-closing) .header {
        bottom: auto;
        --header-opacity: 1 !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    html:root.js body:is(.nav-open, .nav-closing) .nav-social { position: fixed; }

    html:root.js .nav-links,
    html:root.js .nav-social {
        transition: opacity 440ms cubic-bezier(.22, .61, .36, 1),
            transform 440ms cubic-bezier(.22, .61, .36, 1), visibility 0ms linear 440ms;
        pointer-events: none;
    }

    html:root.js .nav-links {
        transform: translateY(-12px);
        background: #0d0d0d;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    html:root.js .nav-social { transform: translateY(8px); }

    html:root.js[data-home-page][data-home-theme="paper"]:not(.tag-hero-pending):not(.tag-hero-active) .nav-links {
        background: #edece6;
    }

    html:root.js .nav-links.active,
    html:root.js .nav-links.active ~ .nav-social {
        transform: translateY(0);
        transition-delay: 0ms;
        pointer-events: auto;
    }
}

/* Reduced motion is a brief fade, never a spatial slide. */
@media (prefers-reduced-motion: reduce) {
    html:root .header {
        transform: none;
        transition-duration: 0ms, 160ms, 160ms, 160ms, 160ms !important;
        transition-delay: 0ms !important;
    }

    html:root .header.hidden {
        transform: none;
        opacity: 0;
        pointer-events: none;
    }

    html:root:is(.tag-hero-pending, .tag-hero-active, .tag-hero-opening) .header {
        transition-duration: 0ms, 1100ms, 160ms, 160ms, 160ms !important;
    }

    html:root.js .nav-links,
    html:root.js .nav-social {
        transform: none;
        transition-duration: 160ms, 0ms, 0ms !important;
        transition-delay: 0ms, 0ms, 160ms;
    }

    html:root.js .nav-links.active,
    html:root.js .nav-links.active ~ .nav-social { transition-delay: 0ms; }
}
