/* Frontend only: keep editor blocks freely selectable. */
html { scroll-padding-top: var(--seifert-scroll-offset, 160px); }
.wp-site-blocks > header.wp-block-template-part {
    position: sticky;
    top: var(--seifert-admin-offset, 0px);
    z-index: 1000;
    background: var(--wp--preset--color--base, #fff);
    transition: box-shadow .25s ease;
}
body.admin-bar { --seifert-admin-offset: 32px; }
.wp-site-blocks > header.seifert-scrolled { box-shadow: 0 4px 24px #182c3614; }
.seifert-card, .wp-block-button__link { transition: transform .2s ease, filter .2s ease; }
@media (hover: hover) {
    .seifert-card:hover { transform: translateY(-4px); }
    .wp-block-button__link:hover { transform: translateY(-2px); }
}
.seifert-reveal { opacity: .65; translate: 0 32px; transition: opacity 1.2s ease, translate 1.2s cubic-bezier(.25,.1,.25,1), transform .25s ease; }
.seifert-reveal.is-revealed { opacity: 1; translate: 0 0; }
@keyframes seifert-rise { from { opacity: .65; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@keyframes seifert-soft-appear { from { opacity: .65; } to { opacity: 1; } }
@keyframes seifert-photo { from { transform: scale(1); } to { transform: scale(1.06); } }
.seifert-hero-copy h1 { position: relative; }
.seifert-title-revealing > .seifert-title-original { opacity: 0; }
.seifert-title-overlay { position: absolute; inset: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
    .seifert-hero-copy > * { animation: seifert-rise 1.5s ease-out backwards; }
    .seifert-hero > .wp-block-cover__image-background { animation: seifert-photo 16s ease-out both; }
}
.seifert-to-top {
    position: fixed;
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    z-index: 900;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #ffffff55;
    border-radius: 50%;
    color: var(--wp--preset--color--base, #fff);
    background: var(--wp--preset--color--accent, #007fa8);
    box-shadow: 0 4px 18px #182c3633;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}
.seifert-to-top[hidden] { display: none; }
.seifert-to-top:hover { transform: translateY(-3px); }
.seifert-to-top svg { width: 22px; height: 22px; }
@media (min-width: 601px) and (max-width: 782px) {
    body.admin-bar { --seifert-admin-offset: 46px; }
}
@media (max-width: 600px) {
    body.admin-bar { --seifert-admin-offset: 0px; }
}
/* Preserve the Core Navigation keyboard controls, use a content-height panel. */
@media (max-width: 599px) {
    .seifert-header .wp-block-navigation__responsive-container.is-menu-open {
        position: fixed;
        inset: auto 1rem auto auto;
        top: var(--seifert-menu-top, 120px);
        width: min(360px, calc(100vw - 2rem));
        height: auto;
        min-height: 0;
        max-height: calc(100dvh - var(--seifert-menu-top, 120px) - 1rem);
        box-sizing: border-box;
        padding: 1rem 1.25rem 1.25rem;
        border: 1px solid #182c361a;
        border-radius: 8px;
        box-shadow: 0 14px 40px #182c3626;
        animation: seifert-menu-in .18s ease-out;
    }
    .seifert-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog { margin-top: 0; }
    .seifert-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 2.5rem; align-items: stretch; gap: 0; }
    .seifert-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: stretch; gap: .25rem; width: 100%; }
    .seifert-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { align-items: stretch; }
    .seifert-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: .65rem .5rem; border-radius: 3px; }
    .seifert-header .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--surface, #f0f4f4); }
    .seifert-header .wp-block-navigation__responsive-container-close { width: 40px; height: 40px; display: grid; place-items: center; }
    .seifert-header .wp-block-navigation__responsive-container-open { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
}
@keyframes seifert-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .seifert-reveal { translate: none; transition: opacity 1.2s ease; }
    .seifert-hero-copy > * { animation: seifert-soft-appear 1.5s ease-out backwards; }
    .seifert-hero > .wp-block-cover__image-background { animation: none; }
    .seifert-header .wp-block-navigation__responsive-container.is-menu-open { animation: none; }
    .wp-site-blocks > header.wp-block-template-part, .seifert-card, .wp-block-button__link, .seifert-to-top { transition: none; }
    .seifert-card:hover, .wp-block-button__link:hover, .seifert-to-top:hover { transform: none; }
    .seifert-card.seifert-reveal { transition: opacity 1.2s ease; }
}
.seifert-hero-copy > :nth-child(3) { animation-delay: 2.4s; }
.seifert-hero-copy > :nth-child(4) { animation-delay: 2.8s; }

/* Word reveal is specific to Seifert; no typewriter or blinking cursor. */
.seifert-title-word { display: inline-block; animation: seifert-word-in .9s cubic-bezier(.2,.75,.25,1) var(--word-delay, 0ms) both; }
@keyframes seifert-word-in { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
    .seifert-title-word { animation-name: seifert-word-fade; }
}
@keyframes seifert-word-fade { from { opacity: 0; } to { opacity: 1; } }

/* One-time section entrances. */
body .seifert-reveal { opacity: 0; translate: 0 38px; transition: none; }
body .seifert-reveal.is-revealed { animation: seifert-section-in 1.05s cubic-bezier(.2,.75,.25,1) var(--seifert-delay, 0ms) both; }
@keyframes seifert-section-in { from { opacity: 0; translate: 0 38px; } to { opacity: 1; translate: 0 0; } }
body .seifert-hero-copy > * { animation-name: seifert-rise; }
body .seifert-title-word { animation-name: seifert-word-in; }
body .seifert-card { transition: transform .4s ease, box-shadow .4s ease; }
@media (hover: hover) {
    body .seifert-card:hover { transform: translateY(-6px); box-shadow: 0 16px 24px -22px #007fa877; }
    body .wp-block-button__link:hover { transform: translateY(-3px); }
}

