/* ==========================================================================
   1. Design Tokens
   ========================================================================== */
:root {
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    /* Brand & Accents */
    --col-maroon: #851016;
    --col-maroon-hover: #5d0b0f;
    --col-bright-red: #c8102e;
    --col-kenya-green: #006039;
    --col-charcoal: #111827;

    /* Neutrals & Surfaces */
    --col-text: #1f2937;
    --col-text-muted: #4b5563;
    --col-border: #e5e7eb;
    --col-surface: #ffffff;
    --col-bg: #fcfbfa;

    /* Tinted Surfaces */
    --col-green-surface: #f0f6f2;
    --col-green-border: #cfe0d5;
}

/* ==========================================================================
   2. Base & Primitives
   ========================================================================== */
body {
    font-family: var(--font-system);
    color: var(--col-text);
    background-color: var(--col-bg);
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
}

:focus-visible {
    outline: 2px solid var(--col-charcoal);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px #ffffff;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--col-charcoal);
    color: #ffffff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 100;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

h1,
h2,
h3 {
    color: var(--col-charcoal);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   3. Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-block: 2.5rem;
}

/* ==========================================================================
   4. Components
   ========================================================================== */

/* Badge Banner */
.badge-bar {
    background-color: var(--col-kenya-green);
    color: #ffffff;
    text-align: center;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-bottom: 3px solid var(--col-bright-red);
}

/* Hero */
.hero {
    background: linear-gradient(180deg, #f4f8f5 0%, var(--col-surface) 100%);
    border-bottom: 1px solid var(--col-border);
    padding-block: 2.5rem;
}

.hero__grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.hero__logo {
    max-width: 120px;
    height: auto;
    aspect-ratio: 1 / 1;
}

.hero__lead {
    font-size: 1.15rem;
    color: var(--col-text-muted);
    max-width: 620px;
    margin-block: 0.5rem 1.25rem;
}

.hero__nav {
    margin-top: 0.5rem;
}

.link-group {
    display: flex;
    list-style: none;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    color: var(--col-maroon);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    transition: color 0.15s ease-in-out;
}

.nav-link:hover {
    color: var(--col-maroon-hover);
}

/* Story Panel (Resilient Media / Text Card) */
.story-panel {
    background-color: var(--col-green-surface);
    border: 1px solid var(--col-green-border);
    border-radius: 8px;
    margin-block-start: 2.5rem;
    overflow: hidden;
}

.story-panel__body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-panel:has(.story-panel__media) {
    display: grid;
    grid-template-columns: 1fr;
}

.story-panel__media {
    line-height: 0;
    background-color: var(--col-surface);
    border-bottom: 1px solid var(--col-green-border);
}

.story-panel__media img {
    width: 100%;
    height: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    display: block;
}

/* Content Cards */
.card {
    background: var(--col-surface);
    border: 1px solid var(--col-border);
    border-top: 4px solid var(--col-maroon);
    border-radius: 6px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.04);
}

.card-list {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.card-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.card-list li:last-child {
    margin-bottom: 0;
}

/* Contact Block */
.contact-panel {
    background: var(--col-charcoal);
    color: #f9fafb;
    border-radius: 8px;
    padding: 3rem 2rem;
    margin-block: 3rem 4rem;
    text-align: center;
}

.contact-panel :focus-visible {
    outline: 2px solid #ffffff;
    box-shadow: 0 0 0 4px var(--col-charcoal);
}

.contact-panel h2 {
    color: #ffffff;
}

.contact-panel p {
    color: #d1d5db;
    max-width: 600px;
    margin-inline: auto;
}

.contact-list {
    display: flex;
    list-style: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0;
}

.contact-anchor {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    color: #e5e7eb;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 500;
    transition: color 0.15s ease-in-out;
}

.contact-anchor:hover {
    color: #ffffff;
}

.contact-anchor--primary {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration-thickness: 2px;
}

.icon {
    flex-shrink: 0;
}

/* ==========================================================================
   5. Footer & Legal
   ========================================================================== */
footer {
    border-top: 1px solid var(--col-border);
    background: var(--col-surface);
    padding-block: 2rem;
    color: var(--col-text-muted);
    text-align: center;
}

.disclaimer-box {
    max-width: 720px;
    margin-inline: auto;
    margin-block-end: 1.25rem;
    line-height: 1.5;
    font-size: 0.875rem;
    color: var(--col-text);
    background: #f9fafb;
    border: 1px solid var(--col-border);
    padding: 1rem;
    border-radius: 4px;
}

/* ==========================================================================
   6. Responsive Overrides (>= 768px)
   ========================================================================== */
@media (min-width: 768px) {
    .hero {
        padding-block: 3rem;
    }

    .hero__grid {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 2.5rem;
    }

    .hero__logo {
        max-width: 140px;
        flex-shrink: 0;
    }

    .hero__lead {
        margin-inline: 0;
    }

    .link-group {
        justify-content: flex-start;
    }

    .story-panel:has(.story-panel__media) {
        grid-template-columns: minmax(300px, 38%) 1fr;
    }

    .story-panel:has(.story-panel__media) .story-panel__media {
        border-bottom: none;
        border-right: 1px solid var(--col-green-border);
    }

    .story-panel__media img {
        aspect-ratio: auto;
        min-height: 100%;
    }

    .story-panel__body {
        padding: 2.5rem;
    }
}