/* ===== HEADER: one coloured band = top row (logo, name, language, theme) + all page links ===== */
.genesis {
    position: relative;
    color: var(--on-brand);
    background: var(--hf);
    padding-top: env(safe-area-inset-top, 0px);
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15)
}

.blessing,
.blessing-sub {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0
}

.exodus {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(1400px, 100%);
    margin: 0 auto;
    padding: 10px clamp(12px, 2vw, 24px);
    min-height: 78px
}

.shepherd {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;

}

.cross {
    width: clamp(46px, 12vw, 64px);
    
    height: auto;
    
    flex: none;
    border-radius: var(--logo-radius);
    
}

.psalm {
    font-size: clamp(13px, 3.7vw, 23px);
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .6px;
    min-width: 0;
    overflow-wrap: anywhere
}

.tools {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: none
}

.babel,
.daybreak {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-weight: 700;
    font-size: .92em;
    color: #fff;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0 12px;
    border-radius: 8px;
    transition: color .2s, transform .2s
}

.daybreak {
    width: 40px;
    padding: 0
}

.babel:hover,
.daybreak:hover {
    color: var(--accent);
    transform: translateY(-2px)
}

.daybreak svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    flex: none
}

.sun {
    display: none
}

[data-theme="dark"] .sun {
    display: block
}

[data-theme="dark"] .moon {
    display: none
}

.manna {
    display: none;
    flex: none;
    width: 40px;
    height: 40px;
    background: none;
    border: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px
}

.manna span {
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s
}

.manna:hover span:nth-child(2) {
    transform: scaleX(.6)
}

.moses,
.veil,
.tools-side,
.tongues,
.lev-toggle {
    display: none
}

.psalter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    width: min(1400px, 100%);
    margin: 0 auto;
    padding: 0 16px 8px
}

.levite {
    display: block;
    padding: 10px 14px;
    font-weight: 700;
    font-size: .88em;
    color: #fff;
    position: relative;
    white-space: nowrap
}

.levite::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform .3s
}

.levite:hover::after,
.levite.anointed::after {
    transform: scaleX(1)
}

/* sub links (dropdown on laptop) */
.mount {
    position: relative
}

.mount>a.levite {
    display: flex;
    align-items: center;
    gap: 6px
}

.mount>.lev-toggle {
    display: none
}

.jacob {
    width: 7px;
    height: 7px;
    border-right: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .25s
}

.mount:hover .jacob,
.mount:focus-within .jacob {
    transform: rotate(-135deg)
}

.jordan {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
    overflow: hidden;
    z-index: 60;
    display: none
}

.mount:hover .jordan,
.mount:focus-within .jordan {
    display: block;
    animation: shine .25s
}

.jordan .levite {
    color: var(--ink);
    padding: 12px 18px
}

.jordan .levite::after {
    display: none
}

.jordan .levite:hover {
    background: var(--soft)
}

@media(max-width:1024px) {
    .genesis {
        position: sticky;
        top: 0;
        z-index: 50
    }

    .manna {
        cursor: pointer
    }

    .manna {
        display: flex
    }

    .tools .babel,
    .tools .daybreak {
        display: none
    }

    .babel.tools-side,
    .daybreak.tools-side {
        display: flex
    }

    .sanctuary {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(82vw, 320px);
        height: 100vh;
        height: 100dvh;
        background: var(--hf-solid);
        transform: translateX(100%);
        transition: transform .3s ease;
        z-index: 100;
        overflow-y: auto;
        box-shadow: -6px 0 22px rgba(0, 0, 0, .4)
    }

    .blessing:checked~.sanctuary {
        transform: none
    }

    .moses {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
        border-bottom: 2px solid var(--accent);
        font-weight: 700;
        color: #fff
    }

    .amen {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font: inherit;
        font-size: 34px;
        line-height: 1;
        background: none;
        border: 0;
        cursor: pointer;
        width: 44px;
        height: 44px;
        color: #fff
    }

    .veil {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s;
        z-index: 90
    }

    .blessing:checked~.veil {
        opacity: 1;
        visibility: visible
    }

    body:has(.blessing:checked) {
        overflow: hidden
    }

    .psalter {
        display: block;
        padding: 8px 0;
        margin: 0;
        width: 100%
    }

    .levite,
    .babel.tools-side,
    .daybreak.tools-side {
        display: flex;
        width: 100%;
        height: auto;
        justify-content: flex-start;
        gap: 10px;
        padding: 16px 20px;
        border-radius: 0;
        font-size: 1em;
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
        white-space: normal
    }

    .levite::after {
        display: none
    }

    .levite.anointed {
        color: var(--accent)
    }

    .levite:hover,
    .babel.tools-side:hover,
    .daybreak.tools-side:hover {
        background: var(--hover);
        transform: none;
        color: #fff
    }
}

@media(max-width:1024px) {
    .mount {
        display: block
    }

    .mount>a.levite {
        display: none
    }

    .mount>.lev-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer
    }

    .jacob {
        display: inline-block
    }

    .mount>.blessing-sub:checked~.lev-toggle .jacob {
        transform: rotate(-135deg)
    }

    .jordan {
        display: none !important
    }

    .mount>.blessing-sub:checked~.jordan {
        display: block !important
    }

    .tongues {
        display: flex;
        border-bottom: 1px solid rgba(255, 255, 255, .12)
    }

    .tongues .babel.tools-side,
    .tongues .daybreak.tools-side {
        flex: 1;
        width: auto;
        justify-content: center;
        border-bottom: 0;
        padding: 14px 10px
    }

    .tongues .babel.tools-side {
        border-right: 1px solid rgba(255, 255, 255, .3)
    }

    .jordan {
        position: static;
        background: rgba(255, 255, 255, .07);
        box-shadow: none;
        border-radius: 0;
        animation: none
    }

    .jordan .levite {
        color: #fff;
        padding: 13px 20px 13px 40px;
        font-size: .95em
    }

    .jordan .levite.anointed {
        color: var(--accent)
    }

    .jordan .levite:hover {
        background: var(--hover)
    }
}

@media(max-width:480px) {
    .exodus {
        padding: 8px 12px;
        gap: 8px;
        min-height: 66px
    }

    .shepherd {
        gap: 8px
    }
}

@media(max-width:360px) {
    .psalm {
        font-size: 12px;
        letter-spacing: .2px
    }
}

/* ===== HOME ONLY: transparent header over the slider =====
   Applies only when <body class="is-home"> (set in Layout.astro).
   The header stays at the top of the page and scrolls away with it (not fixed). */
.is-home .genesis {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none
}

/* soft dark fade behind the header so white text is readable on bright slides */
.is-home .genesis::after {
    content: "";
    position: absolute;
    inset: 0 0 -24px 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(8, 16, 40, .55), rgba(8, 16, 40, 0))
}

.is-home .genesis .psalm,
.is-home .genesis .tools .babel,
.is-home .genesis .tools .daybreak {
    text-shadow: 0 1px 6px rgba(0, 0, 0, .6)
}

.is-home .genesis .daybreak svg {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6))
}

.is-home .genesis .manna span {
    box-shadow: 0 1px 4px rgba(0, 0, 0, .55)
}

@media(min-width:1025px) {
    .is-home .genesis .psalter>.levite,
    .is-home .genesis .mount>a.levite {
        text-shadow: 0 1px 6px rgba(0, 0, 0, .6)
    }
}