html { scroll-behavior: smooth; }
.site-header { transition: box-shadow .25s ease, background-color .25s ease; }
.site-header.is-stuck { box-shadow: 0 8px 24px rgba(16, 42, 67, .08); }
.site-nav, .nav-sub { transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
@media (min-width: 992px) {
    .nav-sub { opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none; }
    .nav-drop:hover .nav-sub, .nav-drop:focus-within .nav-sub { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
}
@media (max-width: 991px) {
    .nav-drop.is-open > .nav-sub { display: grid; }
}
.nav-toggle { transition: background-color .2s ease, transform .2s ease; }
.nav-toggle[aria-expanded="true"] { background: #102A43; }
.hero-visual { animation: hero-image .7s ease both; }
.hero-copy .eyebrow { animation: rise .45s ease both; }
.hero-copy h1 { animation: rise .5s ease .08s both; }
.hero-copy .lede { animation: rise .5s ease .16s both; }
.hero-copy .hero-actions { animation: rise .5s ease .24s both; }
.hero { position: relative; }
.hero:not(.hero-banner)::before, .hero:not(.hero-banner)::after {
    content: "";
    position: absolute;
    width: 72px; height: 72px;
    border-radius: 0 70% 0 70%;
    background: rgba(46, 139, 60, .16);
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}
.hero:not(.hero-banner)::before { left: 4%; bottom: 12%; }
.hero:not(.hero-banner)::after { right: 6%; top: 18%; width: 48px; height: 48px; animation-duration: 10s; background: rgba(242, 140, 24, .18); }
.card-media, .topic-card, .video-thumb { overflow: hidden; }
.card-media img, .topic-card img, .video-thumb img { transition: transform .45s ease; }
.card:hover .card-media img, .topic-card:hover img, .video-thumb:hover img { transform: scale(1.06); }
.topic-grid .topic-card { animation: rise .55s ease both; }
.video-thumb { position: relative; display: block; }
.video-thumb::after {
    content: "";
    position: absolute; left: 50%; top: 50%;
    width: 58px; height: 58px; margin: -29px 0 0 -29px;
    border-radius: 50%;
    background: rgba(255,255,255,.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23063B73' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center/22px no-repeat;
    box-shadow: 0 8px 20px rgba(16,42,67,.2);
    transition: transform .2s ease;
}
.video-thumb:hover::after { transform: scale(1.06); }
.btn:active { transform: scale(.98); }
input:focus, textarea:focus, select:focus { outline: none; border-color: #063B73; box-shadow: 0 0 0 3px rgba(6,59,115,.12); }
.reveal { animation: rise .55s ease both; }
.card-grid .card:nth-child(2), .topic-grid .topic-card:nth-child(2), .video-grid .video-card:nth-child(2) { animation-delay: .08s; }
.card-grid .card:nth-child(3), .topic-grid .topic-card:nth-child(3), .video-grid .video-card:nth-child(3) { animation-delay: .16s; }
.card-grid .card:nth-child(4), .topic-grid .topic-card:nth-child(4), .video-grid .video-card:nth-child(4) { animation-delay: .24s; }
.listing-swap { animation: fade .28s ease; }
.to-top {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
    width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: #063B73; color: #fff; font-size: 1.2rem; cursor: pointer;
    opacity: 0; transform: translateY(8px); pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.video-modal {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(16, 42, 67, .72);
    display: grid; place-items: center; padding: 1rem;
}
.video-modal[hidden] { display: none; }
.video-modal .player { width: min(960px, 100%); animation: pop .2s ease; }
.video-modal .close-video {
    position: absolute; top: 1rem; right: 1rem;
    min-width: 44px; min-height: 44px; border: 0; border-radius: 999px;
    background: #fff; color: #102A43; font-weight: 700; cursor: pointer;
}
.search-overlay {
    position: fixed; inset: 0; z-index: 55;
    background: rgba(16, 42, 67, .45);
    display: flex; align-items: flex-start; justify-content: center; padding: 12vh 1rem 1rem;
}
.search-overlay[hidden] { display: none; }
.search-overlay form {
    width: min(640px, 100%); box-sizing: border-box;
    background: #fff; border-radius: 1rem; padding: .7rem;
    display: flex; align-items: center; gap: .55rem;
}
.search-overlay input {
    flex: 1; min-width: 0; width: 100%; box-sizing: border-box;
    min-height: 34px; border: 1px solid #D5E2D4; border-radius: 4px;
    padding: .35rem .6rem; font: inherit; font-size: .88rem; color: #102A43; background: #fff;
}
.search-overlay input:focus { outline: 3px solid #F28C18; outline-offset: 1px; border-color: #F28C18; }
.search-overlay .btn { flex: none; }
@media (max-width: 520px) {
    .search-overlay form { flex-direction: column; align-items: stretch; }
    .search-overlay .btn { width: 100%; }
}
.toast {
    position: fixed; right: 1rem; bottom: 4.5rem; z-index: 70;
    background: #063B73; color: #fff; border-radius: .8rem; padding: .8rem 1rem;
    max-width: min(360px, calc(100% - 2rem));
    animation: rise .25s ease;
}
.sidebar { transition: transform .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hero-image { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes fade { from { opacity: .35; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .hero::before, .hero::after { display: none; }
}
