/* ═══════════════════════════════════════════════════════════════════════
   AIIKS — Custom Design System
   Philosophy: Organic earth tones, African craft textures, purposeful motion.
   No floating particles. Shapes feel like hand-pressed clay, not software.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── SKIP LINK (ACCESSIBILITY) ─────────────────────────────────────────── */
.skip-to-main {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    background: #a0522d;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.75rem 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: top 0.2s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.skip-to-main:focus { top: 0; }

/* ── CSS CUSTOM PROPERTIES (Light & Dark) ──────────────────────────────── */
:root {
    --clr-rust:      #a0522d;
    --clr-rust-dk:   #8b4513;
    --clr-rust-lt:   #de944a;
    --clr-teal:      #588b8b;
    --clr-forest:    #2d6a35;
    --clr-gold:      #e8a020;
    --clr-cream:     #ede7d9;
    --clr-parchment: #f4f1ea;
    --clr-smoke:     #f9f7f2;
    --clr-ink:       #2c2c2c;

    /* Surfaces */
    --bg-page:    #f9f7f2;
    --bg-card:    #ffffff;
    --bg-surface: #f4f1ea;
    --bg-hero:    #ede7d9;

    /* Text */
    --tx-primary:   #2c2c2c;
    --tx-secondary: #555555;
    --tx-muted:     #888888;
    --tx-inverse:   #ffffff;

    /* Borders */
    --br-subtle:  rgba(0,0,0,0.06);
    --br-accent:  rgba(160,82,45,0.25);

    /* Shadows */
    --sh-card:   0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    --sh-hover:  0 20px 60px rgba(160,82,45,0.14), 0 4px 16px rgba(0,0,0,0.10);
    --sh-lifted: 0 32px 80px rgba(160,82,45,0.18), 0 8px 24px rgba(0,0,0,0.12);

    /* Night mode toggle icon */
    --icon-moon: "☾";
    --icon-sun:  "☀";

    /* Easing */
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── NIGHT MODE OVERRIDES ───────────────────────────────────────────────── */
html.night-mode {
    --bg-page:    #10f808;
    --bg-card:    #544b3b;
    --bg-surface: #625745;
    --bg-hero:    #7d766a;

    --tx-primary:   #e8dfd0;
    --tx-secondary: #c8b99a;
    --tx-muted:     #8a7a68;

    --br-subtle:  rgba(255,255,255,0.06);
    --br-accent:  rgba(222,148,74,0.20);

    --sh-card:  0 4px 24px rgba(232, 14, 14, 0.35), 0 1px 4px rgba(0,0,0,0.2);
    --sh-hover: 0 20px 60px rgba(246, 129, 12, 0.12), 0 4px 16px rgba(0,0,0,0.40);
}

/* Apply CSS variables to base elements so Tailwind colours coexist */
html.night-mode body {
    background-color: var(--bg-page) !important;
    color: var(--tx-primary) !important;
}
html.night-mode section,
html.night-mode main {
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Night: override hard-coded bg/text classes */
html.night-mode .bg-white,
html.night-mode .bg-gray-50,
html.night-mode .bg-gray-100 {
    background-color: var(--bg-card) !important;
}
html.night-mode .bg-\[\#f9f7f2\],
html.night-mode .bg-\[\#FAF9F6\],
html.night-mode .bg-\[\#f4f1ea\],
html.night-mode [class*="bg-[#f4f1ea]"],
html.night-mode [class*="bg-[#f9f7f2]"] {
    background-color: var(--bg-surface) !important;
}
html.night-mode .bg-\[\#ede7d9\],
html.night-mode [class*="bg-[#ede7d9]"] {
    background-color: var(--bg-hero) !important;
}
html.night-mode .bg-\[\#e8f0f0\],
html.night-mode [class*="bg-[#e8f0f0]"] {
    background-color: #1e2828 !important;
}
html.night-mode .text-gray-700,
html.night-mode .text-gray-800,
html.night-mode .text-gray-600 {
    color: var(--tx-secondary) !important;
}
html.night-mode .text-\[\#2c2c2c\],
html.night-mode [class*="text-[#2c2c2c]"] {
    color: var(--tx-primary) !important;
}
html.night-mode .border-gray-100,
html.night-mode .border-gray-200 {
    border-color: var(--br-subtle) !important;
}
html.night-mode table {
    background: var(--bg-card);
}
html.night-mode thead { filter: brightness(0.85); }
html.night-mode tbody tr:hover { background: rgba(222,148,74,0.07) !important; }
html.night-mode input,
html.night-mode textarea,
html.night-mode select {
    background: #2a2318 !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: var(--tx-primary) !important;
}
html.night-mode .bg-\[\#f4f1ea\].rounded-xl,
html.night-mode [class*="bg-[#f4f1ea]"].rounded-xl {
    background-color: #2a2318 !important;
}

/* Smooth transition for all themed elements */
body, section, header, footer, div, article, aside, p, h1, h2, h3, h4, h5 {
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.25s ease;
}

/* ── GLOBAL BASE ────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

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

/* Improve text rendering for serif body copy */
body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

p, li { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* ── FOCUS INDICATORS (ACCESSIBILITY) ──────────────────────────────────── */
:focus-visible {
    outline: 2.5px solid var(--clr-rust);
    outline-offset: 3px;
    border-radius: 4px;
}
a:focus-visible,
button:focus-visible {
    outline: 2.5px solid var(--clr-gold);
    outline-offset: 3px;
}

/* ── ORGANIC BACKGROUND BLOBS ───────────────────────────────────────────── */
.blob-bg {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    filter: blur(72px);
    opacity: 0.35;
    border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
    animation: organic-drift 22s ease-in-out infinite;
    will-change: transform, border-radius;
}
.blob-bg-rust  { background: var(--clr-rust-lt); }
.blob-bg-teal  { background: var(--clr-teal); }
.blob-bg-forest{ background: var(--clr-forest); }
.blob-bg-gold  { background: var(--clr-gold); }
.blob-sm  { width: 220px; height: 200px; }
.blob-md  { width: 380px; height: 320px; }
.blob-lg  { width: 540px; height: 460px; }

@keyframes organic-drift {
    0%   { transform: translate(0,0)   scale(1.00); border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; }
    25%  { transform: translate(24px,-18px) scale(1.03); border-radius: 55% 45% 48% 52% / 44% 58% 42% 56%; }
    50%  { transform: translate(-18px,22px) scale(0.97); border-radius: 48% 52% 62% 38% / 56% 42% 58% 44%; }
    75%  { transform: translate(12px,-8px) scale(1.02); border-radius: 60% 40% 44% 56% / 48% 52% 48% 52%; }
    100% { transform: translate(0,0)   scale(1.00); border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; }
}
@keyframes organic-drift-slow {
    0%   { transform: translate(0,0)   scale(1.00); border-radius: 60% 40% 44% 56% / 48% 52% 48% 52%; }
    33%  { transform: translate(-30px,15px) scale(1.04); border-radius: 44% 56% 60% 40% / 55% 45% 52% 48%; }
    66%  { transform: translate(20px,-25px) scale(0.96); border-radius: 52% 48% 40% 60% / 44% 56% 44% 56%; }
    100% { transform: translate(0,0)   scale(1.00); border-radius: 60% 40% 44% 56% / 48% 52% 48% 52%; }
}
.blob-drift-slow { animation-name: organic-drift-slow; animation-duration: 28s; }
.blob-drift-rev  { animation-direction: reverse; animation-duration: 18s; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .blob-bg, [class*="blob-float"], .kente-animated, .token-bounce,
    [data-reveal], [data-stagger] > *, .glow-card, .lens-card,
    .progress-bar-fill { animation: none !important; transition: none !important; }
    [data-reveal], [data-stagger] > * { opacity: 1 !important; transform: none !important; }
}

/* ── IMAGE PLACEHOLDERS ─────────────────────────────────────────────────── */
.img-placeholder {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f4ede0 0%, #e4d8c8 60%, #d4c4ae 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #a0926e;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.img-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 18px,
        rgba(160,82,45,0.04) 18px,
        rgba(160,82,45,0.04) 36px
    );
}
.img-placeholder .ph-icon {
    width: 2.5rem;
    height: 2.5rem;
    opacity: 0.5;
    z-index: 1;
}
.img-placeholder .ph-label { z-index: 1; opacity: 0.7; }

html.night-mode .img-placeholder {
    background: linear-gradient(135deg, #2a2318 0%, #1e1a12 60%, #181410 100%);
    color: #7a6a4a;
}

/* ── HERO ENTRANCE ANIMATIONS ───────────────────────────────────────────── */
@keyframes hero-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: none; }
}
.hero-enter-1 { animation: hero-slide-up 0.9s var(--ease-spring) 0.10s both; }
.hero-enter-2 { animation: hero-slide-up 0.9s var(--ease-spring) 0.22s both; }
.hero-enter-3 { animation: hero-slide-up 0.9s var(--ease-spring) 0.34s both; }
.hero-enter-4 { animation: hero-slide-up 0.9s var(--ease-spring) 0.46s both; }
.hero-enter-5 { animation: hero-slide-up 0.9s var(--ease-spring) 0.58s both; }

/* ── NIGHT MODE TOGGLE BUTTON ───────────────────────────────────────────── */
#night-mode-toggle {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 9999;
    width: 3.25rem;
    height: 3.25rem;
    background: var(--clr-rust);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    line-height: 1;
    box-shadow: 0 4px 20px rgba(160,82,45,0.45), 0 2px 8px rgba(0,0,0,0.20);
    transition: transform 0.35s var(--ease-bounce), background 0.3s ease, box-shadow 0.3s ease;
}
#night-mode-toggle:hover {
    transform: scale(1.12) rotate(12deg);
    background: var(--clr-rust-dk);
    box-shadow: 0 8px 30px rgba(160,82,45,0.5), 0 2px 8px rgba(0,0,0,0.25);
}
#night-mode-toggle:focus-visible {
    outline: 3px solid var(--clr-gold);
    outline-offset: 4px;
}
html.night-mode #night-mode-toggle {
    background: #e8dfd0;
    color: #2c2c2c;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
html.night-mode #night-mode-toggle:hover {
    background: #fff;
}

/* ── SECTION ORGANIC DECORATORS ────────────────────────────────────────── */
.section-wave-top {
    position: relative;
}
.section-wave-top::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--clr-rust)   0px,  var(--clr-rust)   18px,
        var(--clr-gold)  18px, var(--clr-gold)  32px,
        var(--clr-forest) 32px, var(--clr-forest) 46px,
        var(--clr-cream) 46px, var(--clr-cream) 52px
    );
    opacity: 0.7;
    border-radius: 0 0 2px 2px;
}

/* ── GRADIENT TEXT ──────────────────────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, var(--clr-rust-lt), var(--clr-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── CARD ENHANCEMENTS ──────────────────────────────────────────────────── */
.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* Card shimmer on hover */
.glow-card {
    transition: box-shadow 0.4s ease, transform 0.35s var(--ease-spring), border-color 0.3s;
    position: relative;
    /* overflow: hidden intentionally removed — was clipping hover shadow */
}
.glow-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
    transform: skewX(-15deg);
    transition: left 0.55s ease;
    pointer-events: none;
    z-index: 1;
}
.glow-card:hover::before { left: 150%; }
.glow-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--sh-hover);
}

/* Lens card heading underline on hover */
.lens-card {
    position: relative;
    /* overflow: hidden removed — clips hover shadow/border */
}
.lens-card h3 {
    position: relative;
    display: inline-block;
}
.lens-card h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--clr-rust);
    border-radius: 2px;
    transition: width 0.4s var(--ease-spring);
}
.lens-card:hover h3::after { width: 100%; }

/* ── ORGANIC HEADING UNDERLINE ──────────────────────────────────────────── */
.organic-heading {
    position: relative;
    display: inline-block;
}
.organic-heading::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 72px;
    height: 3px;
    background: linear-gradient(90deg, var(--clr-rust), var(--clr-gold));
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.6s var(--ease-spring);
}
.organic-heading.is-visible::after { transform: translateX(-50%) scaleX(1); }

/* ── FLIP CARD ──────────────────────────────────────────────────────────── */
.flip-card { perspective: 1000px; width: 100%; }
.flip-card-inner {
    position: relative; width: 100%; height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden;
    border-radius: 0.5rem;
}
.flip-card-front { background-color: #fff; }
.flip-card-back  { transform: rotateY(180deg); }

/* ── FONT UTILITIES ─────────────────────────────────────────────────────── */
.font-sans    { font-family: 'Inter', system-ui, sans-serif; }
.font-heading { font-family: 'Montserrat', system-ui, sans-serif; }

/* ── FOUC PREVENTION ────────────────────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── LOGO & HEADER ──────────────────────────────────────────────────────── */
.header-logo{
    height:120px;
    width:auto;
    transition:height 320ms ease;
}

/* Scroll state */
.site-header.is-scrolled .header-logo{
    height:36px;
}

/* ── UTILITY: FLASH MESSAGES ────────────────────────────────────────────── */
.error { border-color: #ef4444 !important; }
.flash-message { padding: 0.75rem 1rem; margin-bottom: 1rem; border-radius: 0.375rem; }
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #b98310; }
.flash-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #ef4444; }
.flash-info    { background: #dbeafe; color: #1e40af; border: 1px solid #3b82f6; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }

/* ── PAGINATION ─────────────────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; margin: 2rem 0; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem 0.75rem; margin: 0 0.25rem; border-radius: 0.375rem;
    color: #1f2937; text-decoration: none;
}
.pagination a { background: #f3f4f6; border: 1px solid #d1d5db; }
.pagination a:hover { background: #e5e7eb; }
.pagination .pagination-current { background: #deb94a; color: #0f172a; font-weight: 600; border: 1px solid #deaf4a; }
.pagination .disabled { color: #9ca3af; background: #f3f4f6; cursor: not-allowed; border: 1px solid #d1d5db; }

/* ── SCROLL TO TOP ──────────────────────────────────────────────────────── */
.scroll-to-top {
    position: fixed;
    bottom: 5.5rem;
    right: 1.75rem;
    width: 3rem; height: 3rem;
    background: var(--clr-teal);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease-spring);
    box-shadow: 0 4px 16px rgba(88,139,139,0.45);
    z-index: 9998;
    border: none;
}
.scroll-to-top.show { opacity: 1; visibility: visible; }
.scroll-to-top:hover { background: #4a7a7a; transform: translateY(-4px) scale(1.08); }

/* ── FORM STYLES ────────────────────────────────────────────────────────── */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(160,82,45,0.18);
    border-color: #dea54a !important;
}
.newsletter-form { display: flex; max-width: 100%; }
.newsletter-form input[type="email"] {
    flex: 1; padding: 0.75rem;
    border: 1px solid #d1d5db; border-right: none;
    border-top-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem;
}
.newsletter-form button {
    background: #dea54a; color: #0f172a;
    padding: 0.75rem 1rem; border: none;
    border-top-right-radius: 0.375rem; border-bottom-right-radius: 0.375rem;
    font-weight: 500; cursor: pointer; transition: background 0.3s;
}
.newsletter-form button:hover { background: #efbc86; }

/* ── RESPONSIVE CONTAINER ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
}

/* ── MISSION SECTION ────────────────────────────────────────────────────── */
.mission-stats-card { transition: all 0.3s ease; }
.mission-stats-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.10); }
.mission-grid { align-items: stretch; }
.mission-content, .mission-map { display: flex; flex-direction: column; justify-content: center; }
.stats-card { position: relative; overflow: hidden; }
.stats-card::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #ca8a04, transparent);
    transition: left 0.5s;
}
.stats-card:hover::before { left: 100%; }
.map-wrapper {
    position: relative;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 1rem; padding: 2rem;
}
@media (max-width: 1024px) { .mission-grid { gap: 2rem; } }
@media (max-width: 640px) {
    .mission-grid { gap: 1.5rem; }
    .stats-grid   { gap: 1rem; }
    .map-wrapper  { padding: 1.5rem; }
}

/* ── NO-SCROLLBAR UTILITY ───────────────────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── MOBILE CAROUSEL IMPROVEMENTS ──────────────────────────────────────── */
.snap-x { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.snap-center { scroll-snap-align: center; }

/* Carousel dot indicators */
.carousel-dots { display: flex; justify-content: center; gap: 0.375rem; margin-top: 0.875rem; }
.carousel-dot  {
    height: 6px; width: 6px;
    background: #d1d5db;
    border-radius: 999px;
    transition: width 0.3s var(--ease-spring), background 0.3s ease;
    cursor: pointer; border: none; padding: 0;
}
.carousel-dot.active {
    width: 24px;
    background: var(--clr-rust);
}

/* ── SCROLL REVEAL ──────────────────────────────────────────────────────── */
[data-reveal] {
    opacity: 0;
    transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring);
    will-change: opacity, transform;
}
[data-reveal="up"]    { transform: translateY(40px); }
[data-reveal="down"]  { transform: translateY(-30px); }
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.88); }
[data-reveal="fade"]  { transform: none; }
[data-reveal].is-visible { opacity: 1 !important; transform: none !important; }

[data-stagger] > * {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s var(--ease-spring), transform 0.6s var(--ease-spring);
}
[data-stagger].is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.05s; }
[data-stagger].is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.12s; }
[data-stagger].is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.20s; }
[data-stagger].is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.28s; }
[data-stagger].is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.36s; }
[data-stagger].is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.44s; }

/* ── COUNTERS ───────────────────────────────────────────────────────────── */
.count-up { display: inline-block; font-variant-numeric: tabular-nums; }

/* ── KENTE STRIPE ───────────────────────────────────────────────────────── */
@keyframes kente-slide {
    0%   { background-position: 0 0; }
    100% { background-position: 200px 0; }
}
.kente-animated {
    background: repeating-linear-gradient(
        90deg,
        #e8a020 0px,  #e8a020 16px,
        #b83225 16px, #b83225 32px,
        #2d6a35 32px, #2d6a35 48px,
        #f5ead4 48px, #f5ead4 56px,
        #2d6a35 56px, #2d6a35 72px,
        #b83225 72px, #b83225 88px,
        #e8a020 88px, #e8a020 104px
    );
    background-size: 200px 100%;
    animation: kente-slide 3s linear infinite;
}

/* ── AMBIENT GLOW BLOBS ─────────────────────────────────────────────────── */
@keyframes blob-float {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%       { transform: translate(30px,-20px) scale(1.05); }
    66%       { transform: translate(-15px,25px) scale(0.97); }
}
.blob-float-1 { animation: blob-float 12s ease-in-out infinite; }
.blob-float-2 { animation: blob-float 15s ease-in-out infinite reverse; }
.blob-float-3 { animation: blob-float 18s ease-in-out infinite 3s; }
.organic-blob { filter: blur(60px); opacity: 0.4; }

/* ── CIRCULAR ECOSYSTEM TOKEN BOUNCE ───────────────────────────────────── */
@keyframes token-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
.token-bounce:nth-child(1) { animation: token-bounce 2.4s ease-in-out infinite 0.0s; }
.token-bounce:nth-child(2) { animation: token-bounce 2.4s ease-in-out infinite 0.3s; }
.token-bounce:nth-child(3) { animation: token-bounce 2.4s ease-in-out infinite 0.6s; }
.token-bounce:nth-child(4) { animation: token-bounce 2.4s ease-in-out infinite 0.9s; }
.token-bounce:nth-child(5) { animation: token-bounce 2.4s ease-in-out infinite 1.2s; }
.token-bounce:nth-child(6) { animation: token-bounce 2.4s ease-in-out infinite 1.5s; }
.token-bounce:nth-child(7) { animation: token-bounce 2.4s ease-in-out infinite 1.8s; }

/* ── SPOTLIGHT CARD HEADER ──────────────────────────────────────────────── */
.spotlight-card .card-header { transition: transform 0.4s ease; border-radius: 1rem 1rem 0 0; }
.spotlight-card:hover .card-header { transform: translateY(-3px); }

/* ── TABLE ROW ANIMATE ──────────────────────────────────────────────────── */
.table-animate tbody tr {
    opacity: 0; transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.table-animate.is-visible tbody tr:nth-child(1) { opacity:1; transform:none; transition-delay:0.05s; }
.table-animate.is-visible tbody tr:nth-child(2) { opacity:1; transform:none; transition-delay:0.10s; }
.table-animate.is-visible tbody tr:nth-child(3) { opacity:1; transform:none; transition-delay:0.15s; }
.table-animate.is-visible tbody tr:nth-child(4) { opacity:1; transform:none; transition-delay:0.20s; }
.table-animate.is-visible tbody tr:nth-child(5) { opacity:1; transform:none; transition-delay:0.25s; }
.table-animate.is-visible tbody tr:nth-child(6) { opacity:1; transform:none; transition-delay:0.30s; }

/* ── STAT ACCENT LINE GROW ──────────────────────────────────────────────── */
.stat-accent::before {
    content: ''; display: block; height: 3px;
    background: currentColor; border-radius: 2px;
    width: 0; transition: width 1.2s var(--ease-spring); margin-bottom: 12px;
}
.stat-accent.is-visible::before { width: 40px; }

/* ── GRADIENT WIPE ──────────────────────────────────────────────────────── */
@keyframes gradient-wipe {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0% 0 0); }
}
.gradient-wipe { animation: gradient-wipe 1.2s var(--ease-spring) both; }

/* ── PILL TAG POP ───────────────────────────────────────────────────────── */
@keyframes tag-pop {
    0%   { transform: scale(0.7) rotate(-4deg); opacity: 0; }
    70%  { transform: scale(1.08) rotate(1deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}
.tag-pop { animation: tag-pop 0.5s var(--ease-bounce) both; }

/* ── ICON SPIN ON HOVER ─────────────────────────────────────────────────── */
.icon-spin-hover svg { transition: transform 0.4s var(--ease-bounce); }
.icon-spin-hover:hover svg { transform: rotate(15deg) scale(1.15); }

/* ── SHIMMER BAR ────────────────────────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}
.shimmer-bar {
    background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.15) 50%, transparent 75%);
    background-size: 400px 100%;
    animation: shimmer 2.5s infinite;
}

/* ── SECTION LINE DRAW ──────────────────────────────────────────────────── */
@keyframes line-draw {
    from { width: 0; }
    to   { width: 80px; }
}
.section-line {
    height: 2px; background: var(--clr-rust-lt);
    border-radius: 2px;
    animation: line-draw 0.8s var(--ease-spring) both;
}

/* ── BADGE PULSE ────────────────────────────────────────────────────────── */
@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(232,160,32,0.4); }
    50%       { box-shadow: 0 0 0 8px rgba(232,160,32,0); }
}
.badge-pulse { animation: badge-pulse 2.5s ease-in-out infinite; }

/* ── PROGRESS BAR FILL ──────────────────────────────────────────────────── */
.progress-bar-fill {
    height: 3px; border-radius: 2px;
    width: 0; transition: width 1.4s var(--ease-spring);
}
.progress-bar-fill.is-filled { width: var(--fill, 100%); }

/* ── RIPPLE ─────────────────────────────────────────────────────────────── */
.ripple-container { position: relative; overflow: hidden; }
.ripple {
    position: absolute; border-radius: 50%;
    background: rgba(222,148,74,0.25);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* ── HORIZONTAL BOUNCE ──────────────────────────────────────────────────── */
@keyframes bounce-horizontal {
    0%, 100% { transform: translateX(-3px); }
    50%       { transform: translateX(3px); }
}
@keyframes bounce-horizontal-reverse {
    0%, 100% { transform: translateX(3px); }
    50%       { transform: translateX(-3px); }
}
.animate-bounce-horizontal         { animation: bounce-horizontal 1s infinite; }
.animate-bounce-horizontal-reverse { animation: bounce-horizontal-reverse 1s infinite; }

/* ── MAP CONTAINER ──────────────────────────────────────────────────────── */
.map-container { position: relative; z-index: 10; }
.map-container img { z-index: 5; }
.map-container div span { z-index: 100 !important; pointer-events: none; }

/* ── TABLE ZEBRA / HOVER ────────────────────────────────────────────────── */
table tbody tr:hover { background: rgba(232,160,32,0.04); }
html.night-mode table tbody tr:hover { background: rgba(222,148,74,0.07) !important; }

/* ── NEWSLETTER ORGANIC ACCENT ──────────────────────────────────────────── */
#subscribe-container {
    position: relative;
    overflow: hidden;
}
#subscribe-container::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -60px;
    width: 220px; height: 200px;
    background: var(--clr-rust-lt);
    opacity: 0.06;
    border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
    pointer-events: none;
    animation: organic-drift 20s ease-in-out infinite;
}

/* ── WAVY UNDERLINES ────────────────────────────────────────────────────── */
blockquote em, .quote-wavy {
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-color: var(--clr-rust-lt);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}

/* ── PAGE LOAD TRANSITION ───────────────────────────────────────────────── */
.page-loading::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--clr-cream);
    z-index: 99999;
    animation: page-fade-out 0.6s 0.2s var(--ease-spring) both;
}
@keyframes page-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; pointer-events: none; }
}

/* ── ACCESSIBLE ICON BUTTONS ────────────────────────────────────────────── */
button[aria-label] { cursor: pointer; }

/* ── PRINT STYLES ───────────────────────────────────────────────────────── */
@media print {
    #night-mode-toggle, .scroll-to-top, .skip-to-main { display: none !important; }
    .blob-bg, [class*="blob-float"], .organic-blob { display: none !important; }
}


/* ══════════════════════════════════════════════════════════════════════════
   GLASS SYSTEM v3 — Visible, balanced, organic glassmorphism
   ══════════════════════════════════════════════════════════════════════ */

/* ── CARD HOVER CLIPPING FIX ────────────────────────────────────────── */
.cards-overflow-fix {
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding-top: 14px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}
.cards-overflow-fix > * {
    margin-top: 4px;
    margin-bottom: 4px;
}
.glow-card,
.lens-card,
.spotlight-card {
    overflow: visible !important;
}

/* ── LIQUID GLASS BLOBS ──────────────────────────────────────────────── */
/* These work on COLOURED backgrounds — backdrop-filter blurs what's BEHIND */
.glass-blob {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 55%;
    backdrop-filter: blur(24px) saturate(1.6) brightness(1.05);
    -webkit-backdrop-filter: blur(24px) saturate(1.6) brightness(1.05);
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.38) 0%,
        rgba(255,255,255,0.18) 50%,
        rgba(255,255,255,0.28) 100%
    );
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.6),
        inset 0 -1px 0 rgba(0,0,0,0.04),
        0 16px 60px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.06);
    animation: glass-morph 20s ease-in-out infinite;
    will-change: border-radius, transform;
}

.glass-blob-warm {
    background: linear-gradient(
        135deg,
        rgba(255,248,230,0.52) 0%,
        rgba(255,232,180,0.30) 45%,
        rgba(255,248,230,0.42) 100%
    );
    border-color: rgba(232,160,32,0.35);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.7),
        0 20px 70px rgba(160,82,45,0.14),
        0 2px 10px rgba(160,82,45,0.08);
}

.glass-blob-cool {
    background: linear-gradient(
        135deg,
        rgba(220,240,240,0.50) 0%,
        rgba(180,220,220,0.28) 45%,
        rgba(220,240,240,0.40) 100%
    );
    border-color: rgba(88,139,139,0.32);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.65),
        0 20px 70px rgba(88,139,139,0.12),
        0 2px 10px rgba(88,139,139,0.07);
}

.glass-blob-rust {
    background: linear-gradient(
        135deg,
        rgba(255,235,215,0.50) 0%,
        rgba(240,200,170,0.28) 45%,
        rgba(255,235,215,0.40) 100%
    );
    border-color: rgba(160,82,45,0.30);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.65),
        0 20px 70px rgba(160,82,45,0.12),
        0 2px 10px rgba(160,82,45,0.07);
}

@keyframes glass-morph {
    0%   { border-radius: 60% 40% 55% 45% / 50% 60% 40% 55%; transform: translate(0,0) rotate(0deg); }
    20%  { border-radius: 42% 58% 48% 52% / 58% 42% 58% 42%; transform: translate(10px,-8px) rotate(2deg); }
    40%  { border-radius: 55% 45% 62% 38% / 44% 56% 44% 56%; transform: translate(-8px,12px) rotate(-2deg); }
    60%  { border-radius: 46% 54% 44% 56% / 56% 44% 60% 40%; transform: translate(14px,-5px) rotate(3deg); }
    80%  { border-radius: 52% 48% 58% 42% / 42% 58% 46% 54%; transform: translate(-10px,7px) rotate(-1deg); }
    100% { border-radius: 60% 40% 55% 45% / 50% 60% 40% 55%; transform: translate(0,0) rotate(0deg); }
}
@keyframes glass-morph-b {
    0%   { border-radius: 44% 56% 50% 50% / 56% 44% 56% 44%; transform: translate(0,0) rotate(0deg); }
    25%  { border-radius: 58% 42% 44% 56% / 44% 56% 42% 58%; transform: translate(-12px,9px) rotate(-3deg); }
    50%  { border-radius: 48% 52% 58% 42% / 60% 40% 54% 46%; transform: translate(9px,-14px) rotate(4deg); }
    75%  { border-radius: 56% 44% 46% 54% / 46% 54% 48% 52%; transform: translate(-6px,6px) rotate(-2deg); }
    100% { border-radius: 44% 56% 50% 50% / 56% 44% 56% 44%; transform: translate(0,0) rotate(0deg); }
}
.glass-blob-b { animation-name: glass-morph-b; animation-duration: 26s; animation-delay: -10s; }

/* ── GLASS STAT CARD ─────────────────────────────────────────────────── */
.glass-stat-card {
    position: absolute;
    pointer-events: none;
    z-index: 5;
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    background: rgba(255,255,255,0.42);
    border: 1px solid rgba(255,255,255,0.60);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.80),
        0 12px 40px rgba(0,0,0,0.12),
        0 2px 8px rgba(0,0,0,0.06);
    min-width: 140px;
    animation: card-float 8s ease-in-out infinite;
}
.glass-stat-card .stat-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: #a0522d;
    letter-spacing: -0.02em;
}
.glass-stat-card .stat-lbl {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b5a48;
    margin-top: 0.25rem;
    opacity: 0.85;
}
@keyframes card-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}
.glass-stat-card-b { animation-delay: -4s; animation-duration: 10s; }
.glass-stat-card-c { animation-delay: -6s; animation-duration: 12s; }

/* ── KENTE ACCENT LINE ───────────────────────────────────────────────── */
.kente-accent {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        #e8a020 15%,
        #a0522d 35%,
        #2d6a35 55%,
        #a0522d 75%,
        #e8a020 85%,
        transparent
    );
    opacity: 0;
    animation: kente-reveal 1.5s ease forwards, kente-pulse 5s ease-in-out 1.5s infinite;
}
@keyframes kente-reveal {
    from { opacity: 0; transform: scaleX(0.3); }
    to   { opacity: 0.35; transform: scaleX(1); }
}
@keyframes kente-pulse {
    0%, 100% { opacity: 0.30; }
    50%       { opacity: 0.50; }
}

/* ── NIGHT MODE GLASS ────────────────────────────────────────────────── */
html.night-mode .glass-blob {
    background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.08) 100%);
    border-color: rgba(255,255,255,0.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.20), 0 12px 40px rgba(0,0,0,0.30);
}
html.night-mode .glass-blob-warm {
    background: linear-gradient(135deg, rgba(232,160,32,0.18) 0%, rgba(255,200,80,0.10) 50%, rgba(232,160,32,0.14) 100%);
    border-color: rgba(232,160,32,0.30);
}
html.night-mode .glass-blob-cool {
    background: linear-gradient(135deg, rgba(88,139,139,0.18) 0%, rgba(120,180,180,0.10) 50%, rgba(88,139,139,0.14) 100%);
    border-color: rgba(88,139,139,0.28);
}
html.night-mode .glass-blob-rust {
    background: linear-gradient(135deg, rgba(160,82,45,0.18) 0%, rgba(200,120,80,0.10) 50%, rgba(160,82,45,0.14) 100%);
    border-color: rgba(160,82,45,0.28);
}
html.night-mode .glass-stat-card {
    background: rgba(40,32,22,0.65);
    border-color: rgba(255,255,255,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 12px 40px rgba(0,0,0,0.45);
}
html.night-mode .glass-stat-card .stat-num { color: #e8a020; }
html.night-mode .glass-stat-card .stat-lbl { color: #b09878; }

/* ── REDUCED MOTION ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .glass-blob, .glass-stat-card, .kente-accent { animation: none !important; }
    .kente-accent { opacity: 0.35; }
}
