/* ============================================================
   APBF SHARED STYLES — tokens, global resets, shared components
   ============================================================ */

/* --- Design Tokens --- */
:root {
    --color-navy:       #1D4363;
    --color-blue:       #204C8D;
    --color-lime:       #A4FF2D;
    --color-bg:         #f4f7fb;
    --color-bg-white:   #ffffff;
    --color-text:       #1D4363;
    --color-text-muted: rgba(29, 67, 99, 0.65);
    --font-body:        'Montserrat', sans-serif;
}

/* --- Global Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

p { line-height: 1.55; margin-bottom: 0.5rem; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Skip Navigation --- */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    background: #A4FF2D;
    color: #1D4363;
    padding: 0.75rem 1.5rem;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.15s ease;
}
.skip-nav:focus { top: 0; outline: 3px solid #1D4363; outline-offset: 2px; }

/* --- Brand Colour Utilities --- */
.brand-navy   { color: #1D4363; }
.bg-brand-navy { background-color: #1D4363; }
.text-lime    { color: #A4FF2D; }
.bg-lime      { background-color: #A4FF2D; }
.heading-blue { color: #204C8D; }

/* --- Navigation --- */
.glass-nav {
    background: rgba(29, 67, 99, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    pointer-events: none;
}
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.nav-subgroup { position: relative; }
.nav-submenu {
    margin-top: 0.35rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(29, 67, 99, 0.08);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background-color: #1D4363;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
.mobile-menu-overlay.is-open { transform: translateX(0); }

.mobile-menu-shell {
    min-height: 100vh;
    background-color: #1D4363;
    display: flex;
    flex-direction: column;
}

/* --- Buttons --- */
.btn-hover:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -12px rgba(164, 255, 45, 0.5);
}
.btn-hover:focus-visible {
    outline: 3px solid #A4FF2D;
    outline-offset: 3px;
}

.header-pill-dark {
    background: #2a5aa0;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.24);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 0 10px rgba(255,255,255,0.18), 0 8px 18px -10px rgba(0,0,0,0.35);
}
.header-pill-dark:hover {
    background: #3268b8;
    border-color: rgba(255,255,255,0.34);
}
.header-pill-dark:focus-visible { outline: 3px solid #A4FF2D; outline-offset: 3px; }

/* --- Section Kicker (accessible contrast ≥4.5:1 on white) --- */
.section-kicker {
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 900;
    color: rgba(29, 67, 99, 0.70);
}

/* --- Surface Panels --- */
.surface-panel {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(29, 67, 99, 0.08);
    box-shadow: 0 24px 60px -42px rgba(29, 67, 99, 0.38);
}
.surface-panel-dark {
    background: rgba(29, 67, 99, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 40px -30px rgba(8, 20, 32, 0.28);
}

/* --- Path Cards --- */
.path-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.path-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(164, 255, 45, 0.36);
    transform: translateY(-1px);
}
.path-card:focus-visible { outline: 3px solid #A4FF2D; outline-offset: 2px; }

/* --- Card Hover States --- */
.news-card:hover, .event-card:hover, .series-card:hover, .structured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 50px -38px rgba(29, 67, 99, 0.45);
}

/* --- Section Shell --- */
.section-shell { position: relative; overflow: hidden; }

/* --- Mini Stat / Metric Chips --- */
.mini-stat {
    background: rgba(29, 67, 99, 0.06);
    border: 1px solid rgba(29, 67, 99, 0.09);
}
.metric-chip {
    background: rgba(164, 255, 45, 0.1);
    border: 1px solid rgba(164, 255, 45, 0.2);
}

/* --- Page Hero (shared across inner pages) --- */
.page-hero-lockup { display: flex; align-items: flex-start; gap: 2rem; }
.page-hero-shield {
    width: auto;
    height: clamp(10rem, 17vw, 16rem);
    flex-shrink: 0;
    object-fit: contain;
}
@media (max-width: 767px) {
    .page-hero-lockup { flex-direction: column; gap: 1rem; }
    .page-hero-shield { height: 7rem; }
}

/* --- Shared Form Styles --- */
.apbf-label {
    display: block;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.75);
}
.apbf-input,
.apbf-textarea,
.apbf-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    outline: none;
}
.apbf-input::placeholder, .apbf-textarea::placeholder {
    color: rgba(255, 255, 255, 0.40);
}
.apbf-input:focus, .apbf-textarea:focus, .apbf-select:focus {
    border-color: #A4FF2D;
    box-shadow: 0 0 0 3px rgba(164, 255, 45, 0.2);
}
.apbf-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.apbf-select option { background: #1D4363; color: #ffffff; }
.apbf-select-wrap { position: relative; }
.apbf-select-wrap::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(164, 255, 45, 0.85);
    border-bottom: 2px solid rgba(164, 255, 45, 0.85);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

/* --- Shared Footer --- */
.apbf-footer {
    padding: 4rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}
.apbf-footer .footer-inner {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
}
@media (min-width: 768px) {
    .apbf-footer .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}
