/* Site header (template-parts/site-header.php) + photo heroes (inc/header.php), every page.
   Enqueued after every other theme stylesheet. Behaviour: assets/js/header.js.
   - Solid white with navy text (hairline under it), sticky, by default.
   - body.saf-has-hero: fixed + transparent with white text over the photo hero; white once .is-scrolled
     or while the mega menu is open. The white-text rules are scoped to OVER_HERO below.
   - ≤991px: hamburger → full-screen white panel (.saf-header.is-open).
   Photo overlays are a neutral charcoal (rgb 17 24 32), not navy.
   z-index: header 1000 (panel inside it), lead float/bar 900, lead dialog 2500, lightbox 3000. */

:root {
    --saf-header-h: 80px;
    --saf-navy: #0f2846;
    --saf-navy-deep: #0a1d33;
    --saf-green: #58923d;
    --saf-green-light: #8fd16a;
    --saf-green-ink: #467a30;   /* buttons + green text: white on it 5.1:1 (#58923d is 3.75) */
    --saf-green-ink-hover: #3b6628;
    --saf-admin-bar: var(--wp-admin--admin-bar--height, 0px);
}
@media (max-width: 991.98px) {
    :root { --saf-header-h: 66px; }
}

html { scroll-padding-top: calc(var(--saf-header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html.saf-menu-open, html.saf-menu-open body { overflow: hidden; }

.saf-skip {
    position: absolute; top: -100px; right: 1rem; z-index: 1200;
    background: #fff; color: var(--saf-navy); padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
}
.saf-skip:focus { top: calc(var(--saf-admin-bar) + .5rem); }
#main-content { outline: 0; }

/* ---------- Bar ---------- */
.saf-header {
    position: sticky;
    top: var(--saf-admin-bar);
    z-index: 1000;
    background: #fff;
    color: var(--saf-navy);
    box-shadow: 0 1px 0 #e6ecf1;
    font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
    transition: background-color .3s ease, box-shadow .3s ease;
}
.saf-header.is-scrolled { box-shadow: 0 1px 0 #e6ecf1, 0 6px 20px rgba(15, 40, 70, .07); }
.saf-has-hero .saf-header { position: fixed; right: 0; left: 0; background: transparent; box-shadow: none; }
.saf-has-hero .saf-header.is-scrolled { background: #fff; box-shadow: 0 1px 0 #e6ecf1, 0 6px 20px rgba(15, 40, 70, .07); }

.saf-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--saf-header-h);
}

.saf-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    color: var(--saf-navy);
    text-decoration: none;
    flex-shrink: 0;
}
.saf-logo:hover, .saf-logo:focus { color: var(--saf-navy); }
.saf-logo img { height: 50px; width: auto; } /* the colour logo on white */
.saf-logo__text { display: flex; flex-direction: column; line-height: 1.3; }
.saf-logo__name { font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
.saf-logo__sub { font-size: .76rem; color: #5b6b7b; white-space: nowrap; }

/* OVER_HERO: transparent header on a photo (the hero also has a top scrim) → white logo + text. */
.saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-logo,
.saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-logo__sub { color: #fff; }
.saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-logo__sub { opacity: .85; }
.saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-logo__text { text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-logo img { filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }

.saf-nav, .saf-nav ul, .saf-nav-contacts { list-style: none; margin: 0; padding: 0; }
.saf-nav-head, .saf-nav-contacts { display: none; }

.saf-toggle, .saf-nav-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid #d5dde6;
    border-radius: 12px;
    background: #fff;
    color: var(--saf-navy);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.saf-has-hero .saf-header:not(.is-scrolled) .saf-toggle { border-color: rgba(255, 255, 255, .45); background: rgba(17, 24, 32, .25); color: #fff; }
.saf-toggle:focus-visible, .saf-nav-close:focus-visible,
.saf-nav a:focus-visible, .nav-sub-toggle:focus-visible, .saf-nav-contacts a:focus-visible {
    outline: 3px solid var(--saf-green-ink);
    outline-offset: 2px;
}
.saf-has-hero .saf-header:not(.is-scrolled) .saf-toggle:focus-visible { outline-color: var(--saf-green-light); }

/* ---------- Desktop nav (≥992px) ---------- */
@media (min-width: 992px) {
    .saf-nav { display: flex; align-items: center; gap: .15rem; }
    .saf-nav > li { position: relative; display: flex; align-items: center; }
    .saf-nav > li > a {
        color: var(--saf-navy);
        text-decoration: none;
        font-weight: 500;
        font-size: .97rem;
        padding: .55rem .9rem;
        border-radius: 10px;
        white-space: nowrap;
        transition: background-color .2s, color .2s;
    }
    .saf-nav > li > a:hover { color: var(--saf-navy); background: #f1f5f9; }
    .saf-nav > li > a.active { color: #fff; background: var(--saf-green-ink); text-shadow: none; }
    .saf-nav .nav-cta { margin-inline-start: .5rem; }
    .saf-nav .nav-cta > a { background: var(--saf-navy); color: #fff; font-weight: 600; text-shadow: none !important; }
    .saf-nav .nav-cta > a:hover { background: var(--saf-green-ink); color: #fff; }
    /* OVER_HERO */
    .saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-nav > li > a { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
    .saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-nav > li > a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
    .saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-nav > li > a.active { color: #fff; background: var(--saf-green-ink); text-shadow: none; }
    .saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-nav .nav-cta > a { background: #fff; color: var(--saf-navy); }
    .saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-nav .nav-cta > a:hover { background: var(--saf-green-ink); color: #fff; }
    .saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .nav-sub-toggle { color: rgba(255, 255, 255, .85); }
    .saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .nav-sub-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; }
    .saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .saf-nav > li > a:focus-visible,
    .saf-has-hero .saf-header:not(.is-scrolled):not(.has-mega-open) .nav-sub-toggle:focus-visible { outline-color: var(--saf-green-light); }

    .nav-has-sub > a { padding-inline-end: .3rem !important; }
    .nav-sub-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 26px; height: 32px; margin-inline-start: -.1rem; padding: 0;
        border: 0; border-radius: 8px; background: transparent; color: #3f4f61;
        font-size: .72rem; cursor: pointer;
    }
    .nav-sub-toggle:hover { background: #f1f5f9; color: var(--saf-navy); }
    .nav-sub-toggle i { transition: transform .2s; }
    .nav-has-sub.is-open .nav-sub-toggle i { transform: rotate(180deg); }

    /* "خدماتنا" mega menu: a white panel under the bar, one column group per division. */
    .saf-nav > li.nav-has-mega { position: static; }
    .nav-mega {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 1100;
        padding-top: .5rem;
    }
    .nav-mega::before { content: ""; position: absolute; inset: -1.25rem 0 auto; height: 1.75rem; } /* hover bridge */
    .nav-has-mega.is-open > .nav-mega { display: block; }
    .saf-has-hero .saf-header.has-mega-open { background: #fff; box-shadow: 0 1px 0 #e6ecf1; }
    .nav-mega__inner {
        display: flex;
        width: min(1120px, calc(100% - 2rem));
        max-height: calc(100vh - var(--saf-header-h) - var(--saf-admin-bar) - 1.5rem);
        margin-inline: auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        color: var(--saf-navy);
        border: 1px solid #e6ecf1;
        border-radius: 16px;
        box-shadow: 0 18px 40px rgba(15, 40, 70, .12);
    }
    .nav-mega__group { flex: 1 1 0; min-width: 0; padding: 1.25rem 1.5rem 1rem; }
    .nav-mega__group--consulting { flex-grow: 2; }
    .nav-mega__group + .nav-mega__group { background: #f6f8fb; border-inline-start: 1px solid #e6ebf1; }
    .nav-mega__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding-bottom: .7rem;
        margin-bottom: .5rem;
        border-bottom: 1px solid #e6ebf1;
    }
    .nav-mega__title { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 700; }
    .nav-mega__title i { color: var(--saf-green); }
    .nav-mega__toggle, .nav-mega__all-item { display: none; }
    .saf-nav .nav-mega__all {
        display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .5rem; border-radius: 8px;
        color: #3f7a26; font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap;
    }
    .saf-nav .nav-mega__all:hover { background: #eef5ea; color: #2f5f1c; }
    .nav-mega__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem .75rem; }
    .nav-mega__group--consulting .nav-mega__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-mega__group--consulting:only-child .nav-mega__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .saf-nav .nav-mega__list a {
        display: flex;
        align-items: center;
        gap: .7rem;
        min-height: 48px;
        padding: .35rem .5rem;
        border-radius: 10px;
        color: #1d2f45;
        font-size: .93rem;
        line-height: 1.45;
        text-decoration: none;
        transition: background-color .15s, color .15s;
    }
    .nav-mega__icon {
        display: inline-flex; align-items: center; justify-content: center; flex: none;
        width: 34px; height: 34px; border-radius: 9px;
        background: #eef5ea; color: var(--saf-green); font-size: 1rem;
        transition: background-color .15s, color .15s;
    }
    .saf-nav .nav-mega__list a:hover { background: #f1f5f9; color: var(--saf-navy); }
    .saf-nav .nav-mega__list a:hover .nav-mega__icon { background: var(--saf-green); color: #fff; }
    .saf-nav .nav-mega__list a[aria-current] { background: #eef5ea; color: var(--saf-navy); font-weight: 600; box-shadow: inset -3px 0 0 var(--saf-green); }
    .saf-nav .nav-mega a:focus-visible { outline: 3px solid #467a30; outline-offset: 0; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .saf-logo img { height: 44px; }
    .saf-logo__sub { display: none; }
    .saf-nav > li > a { padding: .5rem .6rem; font-size: .92rem; }
}

/* ---------- Mobile panel (≤991px) ---------- */
@media (max-width: 991.98px) {
    .saf-logo img { height: 42px; }
    .saf-logo__name { font-size: 1.05rem; }
    .saf-logo__sub { font-size: .72rem; }
    .saf-toggle { display: inline-flex; flex-shrink: 0; }

    .saf-nav-wrap {
        position: fixed;
        top: var(--saf-admin-bar);
        right: 0;
        left: 0;
        bottom: 0;
        z-index: 2;
        display: flex;
        flex-direction: column;
        background: #fff;
        color: var(--saf-navy);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
        visibility: hidden;
        opacity: 0;
        transform: translateY(-12px);
        transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
    }
    .saf-header.is-open .saf-nav-wrap {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: opacity .22s ease, transform .22s ease, visibility 0s;
    }

    .saf-nav-head {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        height: var(--saf-header-h);
        padding: 0 max(1rem, env(safe-area-inset-right, 0px)) 0 max(1rem, env(safe-area-inset-left, 0px));
        background: #f4f7fa;
        border-bottom: 1px solid #e6ecf1;
    }
    .saf-nav-head__title { font-size: 1.1rem; font-weight: 700; }
    .saf-nav-close { display: inline-flex; font-size: 1.25rem; }

    .saf-nav { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; }
    .saf-nav > li > a {
        display: flex;
        align-items: center;
        min-height: 54px;
        padding: .6rem 1rem;
        border-radius: 12px;
        color: var(--saf-navy);
        font-size: 1.1rem;
        font-weight: 500;
        text-decoration: none;
    }
    .saf-nav > li > a:hover, .saf-nav > li > a:active { background: #f4f7fa; }
    .saf-nav > li > a.active { background: #eef5ea; box-shadow: inset -4px 0 0 var(--saf-green-ink); font-weight: 600; }

    .nav-has-sub { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .nav-sub-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 54px; height: 54px; padding: 0;
        border: 1px solid #e6ecf1; border-radius: 12px;
        background: #fff; color: var(--saf-navy); font-size: 1rem; cursor: pointer;
    }
    .nav-sub-toggle i { transition: transform .2s; }
    .nav-has-sub.is-open .nav-sub-toggle { background: #f4f7fa; }
    .nav-has-sub.is-open .nav-sub-toggle i { transform: rotate(180deg); }
    /* "خدماتنا": one accordion per division inside the panel. */
    .nav-mega { grid-column: 1 / -1; display: none; margin: .4rem 0 .25rem; }
    .nav-has-sub.is-open > .nav-mega { display: block; }
    .nav-mega__inner { display: flex; flex-direction: column; gap: .4rem; }
    .nav-mega__title, .nav-mega__all { display: none; }
    .nav-mega__toggle {
        display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 52px; padding: .5rem 1rem;
        border: 1px solid #e6ecf1; border-radius: 12px; background: #f8fafc;
        color: var(--saf-navy); font: inherit; font-size: 1rem; font-weight: 600; text-align: start; cursor: pointer;
    }
    .nav-mega__toggle > .bi:first-child { color: var(--saf-green-ink); }
    .nav-mega__count {
        margin-inline-start: auto; padding: .05rem .55rem; border-radius: 999px;
        background: #e9eef3; color: var(--saf-navy); font-size: .78rem; font-weight: 600;
    }
    .nav-mega__caret { font-size: .85rem; transition: transform .2s; }
    .nav-mega__group.is-open .nav-mega__caret { transform: rotate(180deg); }
    .nav-mega__toggle:focus-visible { outline: 3px solid var(--saf-green-ink); outline-offset: 2px; }
    .nav-mega__list { display: none; padding: .3rem 0 .2rem; }
    .nav-mega__group.is-open .nav-mega__list { display: block; }
    .saf-nav .nav-mega__list a {
        display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .35rem .75rem;
        border-radius: 10px; color: #1d2f45; font-size: .98rem; line-height: 1.45; text-decoration: none;
    }
    .saf-nav .nav-mega__list a:active { background: #f4f7fa; }
    .nav-mega__icon {
        display: inline-flex; align-items: center; justify-content: center; flex: none;
        width: 32px; height: 32px; border-radius: 8px; background: #eef5ea;
        color: var(--saf-green-ink); font-size: .95rem;
    }
    .saf-nav .nav-mega__list a[aria-current] { color: var(--saf-navy); font-weight: 600; background: #eef5ea; box-shadow: inset -4px 0 0 var(--saf-green-ink); }
    .saf-nav .nav-mega__all-item a { color: var(--saf-green-ink); font-weight: 600; }

    .saf-nav .nav-cta { margin-top: .75rem; }
    .saf-nav .nav-cta > a {
        justify-content: center;
        background: var(--saf-green-ink);
        color: #fff;
        font-weight: 700;
    }
    .saf-nav .nav-cta > a:hover, .saf-nav .nav-cta > a:active { background: var(--saf-green-ink-hover); }

    .saf-nav-contacts {
        display: block;
        margin: .25rem 1rem 0;
        padding-top: 1rem;
        border-top: 1px solid #e6ecf1;
    }
    .saf-nav-contacts li { color: #5b6b7b; font-size: .95rem; }
    .saf-nav-contacts a {
        display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .25rem 1rem;
        border-radius: 10px; color: #1d2f45; text-decoration: none;
    }
    .saf-nav-contacts a:hover { background: #f4f7fa; color: var(--saf-navy); }
    .saf-nav-contacts a .ltr { margin-inline-start: auto; direction: ltr; unicode-bidi: isolate; }
    .saf-nav-contacts i { color: var(--saf-green-ink); width: 1.25rem; text-align: center; }
    .saf-nav-contacts__place { display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .25rem 1rem; }
}

/* ---------- Photo heroes ---------- */
.saf-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background-color: #18212b; /* neutral charcoal until the photo paints */
}
.saf-has-hero .saf-hero {
    padding-top: calc(var(--saf-header-h) + 2.5rem);
    padding-bottom: 3.5rem;
}
.saf-hero--full {
    min-height: calc(100vh - var(--saf-admin-bar));
    min-height: calc(100svh - var(--saf-admin-bar));
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.saf-hero--short {
    min-height: 66vh;
    min-height: 66svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.saf-hero > .container { width: 100%; }

.saf-hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #18212b; }
.saf-hero-media picture { display: contents; }
.saf-hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}
/* Neutral charcoal overlay (same strengths as the old navy one), darker on the (RTL) text side,
   plus a top scrim behind the header. */
.saf-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(12, 17, 23, .82) 0, rgba(12, 17, 23, 0) calc(var(--saf-header-h) + 120px)),
        linear-gradient(270deg, rgba(17, 24, 32, .9) 0%, rgba(17, 24, 32, .72) 50%, rgba(17, 24, 32, .5) 100%);
}
.blog-hero .saf-hero-media::after,
.post-hero .saf-hero-media::after {
    background:
        linear-gradient(180deg, rgba(12, 17, 23, .82) 0, rgba(12, 17, 23, 0) calc(var(--saf-header-h) + 120px)),
        rgba(17, 24, 32, .76);
}
@media (max-width: 767.98px) {
    .saf-hero-media::after {
        background:
            linear-gradient(180deg, rgba(12, 17, 23, .85) 0, rgba(12, 17, 23, 0) calc(var(--saf-header-h) + 90px)),
            rgba(17, 24, 32, .74);
    }
    .saf-has-hero .saf-hero { padding-top: calc(var(--saf-header-h) + 1.75rem); padding-bottom: 2.5rem; }
    .saf-hero--short { min-height: 60vh; min-height: 60svh; }
}

/* Two hero CTAs share one row on phones (equal width, 48px tall, label never wraps); they
   stack only on very narrow screens. /consulting/, /labor/, single service. */
@media (max-width: 575.98px) {
    .hero-buttons, .svc-hero .svc-hero-actions { flex-wrap: nowrap; gap: .6rem; }
    .hero-buttons > a, .svc-hero .svc-hero-actions > .svc-btn {
        flex: 1 1 50%; /* equal basis → equal widths even when one has a border */
        min-width: 0;
        min-height: 48px;
        justify-content: center;
        gap: .4rem;
        padding: .55rem .6rem;
        font-size: .95rem;
        line-height: 1.25;
        white-space: nowrap;
    }
}
@media (max-width: 339.98px) {
    .hero-buttons, .svc-hero .svc-hero-actions { flex-wrap: wrap; }
    .hero-buttons > a, .svc-hero .svc-hero-actions > .svc-btn { flex-basis: 100%; }
}

/* Division hero tweaks: the photo replaces the old decorative backgrounds. */
.lab-hero.saf-hero::after { opacity: .5; }
.hero-section.saf-hero::before, .hero-section.saf-hero::after { display: none; }
.hero-section.saf-hero .hero-content { position: relative; z-index: 1; }
.post-hero.saf-hero .post-hero-inner, .blog-hero.saf-hero > .container { position: relative; }

/* ---------- Front page: full-height split chooser ---------- */
.home-hero.saf-hero { padding: 0; justify-content: stretch; }
.home-hero__intro {
    position: relative;
    z-index: 3;
    padding-top: calc(var(--saf-header-h) + 1.25rem);
    padding-bottom: 1rem;
    text-align: center;
    pointer-events: none;
}
.home-hero__intro .site-title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); font-weight: 800; margin: 0 0 .25rem; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.home-hero__intro .site-subtitle { font-size: clamp(1rem, .9rem + .5vw, 1.3rem); font-weight: 600; margin: 0 0 .6rem; opacity: .9; }
.home-hero__intro .site-description { font-size: 1.02rem; line-height: 1.8; max-width: 760px; margin: 0 auto; opacity: .92; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.home-hero .selection-container { min-height: 0; background: transparent; }
.home-hero .selection-logo { width: 96px; height: 96px; margin-bottom: 1.25rem; }
@media (min-width: 992px) {
    .home-hero { display: block; }
    .home-hero .selection-container { position: absolute; inset: 0; z-index: 1; }
    .home-hero .selection-item { align-items: flex-end; }
    .home-hero .selection-content { padding: 2rem 2rem 3.5rem; }
    .home-hero::after {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: 52%;
        z-index: 2;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(12, 17, 23, .9) 0%, rgba(12, 17, 23, .55) 55%, rgba(12, 17, 23, 0) 100%);
    }
}
@media (max-width: 991.98px) {
    .home-hero { background: linear-gradient(180deg, #12181f 0%, #1b242e 100%); }
    .home-hero .selection-container { flex: 1 1 auto; flex-direction: column; }
    .home-hero .selection-item { min-height: 0; flex: 1 1 auto; }
    .home-hero .selection-item:hover { flex: 1 1 auto; }
    .home-hero__intro { padding-top: calc(var(--saf-header-h) + .75rem); padding-bottom: .75rem; }
    .home-hero__intro .site-description { font-size: .92rem; line-height: 1.7; }
    .home-hero .selection-content { padding: 1.25rem 1.25rem; }
    .home-hero .selection-badge { margin-bottom: .6rem; }
    .home-hero .selection-title { font-size: 1.6rem; margin-bottom: .2rem; }
    .home-hero .selection-subtitle { font-size: 1.05rem; margin-bottom: .9rem; }
    .home-hero .selection-logo, .home-hero .selection-description { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .saf-header, .saf-nav-wrap, .nav-sub-toggle i, .nav-mega__caret { transition: none !important; }
}

/* Site-wide keyboard focus ring (header.css loads on every page). :where() keeps specificity at 0,
   so component rules above (header, lead dialog) still win. Light ring over the dark photo heroes. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #467a30;
    outline-offset: 2px;
}
:where(.hero-section, .lab-hero, .blog-hero, .post-hero, .svc-hero, .home-hero) :where(a, button, summary):focus-visible {
    outline-color: #9fd27f;
}

/* Reduced motion everywhere (consulting/home/services/posts CSS have their own animations). */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
