/* ============================================================
   GSPA - Frontend Stylesheet (Afri-Techno Design System)
   Grain Storage Projects Africa
   ============================================================ */

/* -- Design Tokens -------------------------------------------- */
:root {
    /* Surface Colors */
    --surface: #081424;
    --surface-dim: #081424;
    --surface-bright: #2f3a4c;
    --surface-container-lowest: #040e1e;
    --surface-container-low: #111c2c;
    --surface-container: #152031;
    --surface-container-high: #1f2a3c;
    --surface-container-highest: #2a3547;
    
    /* Text Colors */
    --on-surface: #d8e3fa;
    --on-surface-variant: #c4c7c7;
    
    /* Primary */
    --primary: #c8c6c5;
    --on-primary: #313030;
    --primary-container: #1a1a1a;
    --on-primary-container: #848282;
    
    /* Brand Accents */
    --clay-terracotta: #b46c28;
    --muted-copper: #B5894B;
    --steel-grey: #4A5568;
    --agricultural-green: #9CB060;
    --off-white: #F4F4F2;
    
    /* Background */
    --background: #081424;
    --on-background: #d8e3fa;
    
    /* Outline */
    --outline: #8e9192;
    --outline-variant: #444748;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --unit: 8px;
    --gutter: 24px;
    --margin-mobile: 16px;
    --margin-desktop: 64px;
    --grid-column-gap: 24px;
    --section-padding: 80px;
    
    /* Border Radius */
    --radius-sm: 0.125rem;
    --radius: 0.25rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
}

/* -- Reset & Base --------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    color: var(--on-surface);
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--clay-terracotta);
    color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* -- Typography Utility Classes ------------------------------- */
.headline-display {
    font-family: var(--font-heading);
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.headline-lg {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
}

.headline-md {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
}

.body-lg {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
}

.body-md {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

.label-caps {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mono-data {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* -- Material Symbols ----------------------------------------- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* -- Technical Grid Overlay ----------------------------------- */
.technical-grid {
    background-image:
        linear-gradient(to right, rgba(74, 85, 104, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(74, 85, 104, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* -- Line Accent ---------------------------------------------- */
.line-accent {
    position: relative;
}

.line-accent::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--clay-terracotta);
}

/* -- Bento Card ----------------------------------------------- */
.bento-card {
    background: rgba(21, 32, 49, 0.5);
    border: 1px solid rgba(181, 137, 75, 0.15);
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
}

.bento-card:hover {
    border-color: var(--muted-copper);
    background: rgba(21, 32, 49, 0.8);
}

/* -- Container ------------------------------------------------ */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* -- Main Content --------------------------------------------- */
main {
    flex: 1;
    padding-top: 75px; /* Offset for fixed floating nav (80px logo + 24px padding) */
}

@media (max-width: 767px) {
    main {
        padding-top: 75px; /* Slightly less on mobile (80px logo + 20px padding) */
    }
}

/* -- Floating Pill Navigation (Audiosy-style) ---------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

.floating-nav {
    background: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px;
}

@media (min-width: 768px) {
    .nav-inner {
        padding: 12px 64px;
    }
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo img {
    height: 80px;
    width: auto;
}

@media (min-width: 768px) {
    .nav-logo img {
        height: 80px;
    }
}

/* Desktop Nav */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 32px;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
}

.desktop-nav a {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s;
    white-space: nowrap;
}

.desktop-nav a:hover {
    color: var(--clay-terracotta);
}

.desktop-nav a.active {
    color: var(--clay-terracotta);
}

/* Dynamic menu <ul> inside desktop nav (from render_menu) */
.desktop-nav > ul {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-nav > ul > li {
    position: relative;
}

/* Dropdown menus */
.nav-dropdown .nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: 8px 0;
    z-index: 100;
    list-style: none;
    margin: 0;
}

/* Transparent bridge to prevent submenu from closing on gap */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 8px;
    z-index: 99;
}

.nav-dropdown:hover > .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu li {
    padding: 0;
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    transition: background 0.2s;
}

.nav-dropdown-menu a:hover {
    background: #f5f5f5;
    color: var(--clay-terracotta);
}

/* Nested dropdowns (second level) */
.nav-dropdown-menu .nav-dropdown {
    position: relative;
}

.nav-dropdown-menu .nav-dropdown-menu {
    top: 0;
    left: 100%;
    margin: 0 0 0 0;
}

/* Bridge for nested dropdowns (horizontal gap) */
.nav-dropdown-menu .nav-dropdown::after {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 8px;
    height: 100%;
    z-index: 99;
}

/* Dropdown arrow */
.nav-dropdown-arrow {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.5;
}

.nav-dropdown > a .nav-dropdown-arrow,
.nav-dropdown > span .nav-dropdown-arrow {
    transition: transform 0.2s;
}

.nav-dropdown:hover > a .nav-dropdown-arrow,
.nav-dropdown:hover > span .nav-dropdown-arrow {
    transform: rotate(180deg);
}

/* Mobile nav dynamic menu */
.mobile-nav > ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav li {
    text-align: center;
}

.mobile-nav .nav-dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    background: transparent;
    padding: 8px 0 0 0;
    margin: 0;
}

.mobile-nav .nav-dropdown.open > .nav-dropdown-menu {
    display: block;
}

.mobile-nav .nav-dropdown-menu a {
    font-size: 20px;
    color: var(--on-surface-variant);
    padding: 6px 0;
}

.mobile-nav .nav-dropdown-toggle {
    cursor: pointer;
}

/* Placeholder nav items (no link, dropdown parent only) */
.nav-placeholder {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: default;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* CTA Button (Pill-shaped) */
.btn-cta-nav {
    background: var(--clay-terracotta);
    color: var(--off-white);
    padding: 8px 20px;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    display: none;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(197, 108, 57, 0.3);
}

@media (min-width: 768px) {
    .btn-cta-nav {
        display: inline-block;
        padding: 10px 28px;
    }
}

.btn-cta-nav:hover {
    background: var(--muted-copper);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(181, 137, 75, 0.4);
}

.btn-cta-nav:active {
    transform: scale(0.97);
}

/* Mobile Toggle Button (circular, glass) */
.mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid #ccc;
    cursor: pointer;
    color: #333;
    transition: all 0.3s;
    z-index: 200;
}

.mobile-toggle:hover {
    background: #f5f5f5;
}

.mobile-toggle .menu-icon {
    font-size: 24px;
}

@media (min-width: 768px) {
    .mobile-toggle {
        display: none;
    }
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 20, 36, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 150;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.mobile-overlay.open {
    display: flex;
}

.mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    color: var(--off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.mobile-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.mobile-close .material-symbols-outlined {
    font-size: 28px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.mobile-nav a {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 600;
    color: var(--on-surface-variant);
    transition: all 0.3s;
    text-decoration: none;
}

.mobile-nav a:hover {
    color: var(--clay-terracotta);
    transform: scale(1.05);
}

.mobile-nav .mobile-cta {
    margin-top: 16px;
    display: inline-block;
    font-size: 14px;
    padding: 14px 36px;
}

/* -- Buttons -------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--clay-terracotta);
    color: var(--off-white);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.btn-secondary:hover {
    background: rgba(181, 137, 75, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* -- Section Padding ------------------------------------------ */
.section-padding {
    padding: var(--section-padding) 0;
}

@media (max-width: 767px) {
    :root {
        --section-padding: 40px;
    }
    .headline-display {
        font-size: 32px;
    }
    .headline-lg {
        font-size: 32px;
    }
}

/* -- Hero Section --------------------------------------------- */
.hero-section {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 36, 0.45);
    z-index: 1;
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.4;
}

.hero-content-wrap {
    position: relative;
    z-index: 2;
    padding: 0 var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    max-width: 768px;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--clay-terracotta);
    margin-bottom: 24px;
}

.hero-badge .line {
    width: 48px;
    height: 1px;
    background: var(--clay-terracotta);
}

.hero-title {
    margin-bottom: 24px;
    color: var(--off-white);
}

.hero-subtitle {
    margin-bottom: 40px;
    max-width: 576px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
    }
}

/* -- Credibility Strip ---------------------------------------- */
.credibility-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(4, 14, 30, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 24px 0;
    border-top: 1px solid rgba(74, 85, 104, 0.2);
    z-index: 2;
}

.credibility-strip .strip-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 0 var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
}

@media (max-width: 767px) {
    .credibility-strip .strip-inner {
        justify-content: center;
        gap: 12px;
    }
}

.credibility-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--on-surface-variant);
    font-weight: 500;
}

@media (min-width: 768px) {
    .credibility-item {
        font-size: 18px;
    }
}

.credibility-item .material-symbols-outlined {
    color: var(--clay-terracotta);
    font-size: 18px;
}

/* -- Intro Section -------------------------------------------- */
.intro-section {
    background: var(--surface-container-lowest);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px;
    align-items: center;
    margin-bottom: 80px;
    padding: 0 var(--margin-mobile);
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1024px) {
    .intro-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.value-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--grid-column-gap);
    padding: 0 var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .value-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* -- Project Lifecycle (Stepper) ------------------------------ */
.lifecycle-section {
    background: var(--surface);
}

.lifecycle-header {
    text-align: center;
    margin-bottom: 64px;
    padding: 0 var(--margin-mobile);
}

.lifecycle-header h2 {
    margin-top: 16px;
}

.stepper-desktop {
    display: none;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    position: relative;
    padding: 0 var(--margin-desktop);
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .stepper-desktop {
        display: grid;
    }
}

.stepper-line {
    position: absolute;
    top: 24px;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(74, 85, 104, 0.3);
    z-index: 0;
}

.stepper-step {
    position: relative;
    z-index: 1;
    padding: 0 16px;
    text-align: center;
}

.stepper-step .step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--clay-terracotta);
    background: var(--surface);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clay-terracotta);
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
}

.stepper-step:hover .step-circle {
    background: var(--clay-terracotta);
    color: #fff;
}

.stepper-step h4 {
    margin-bottom: 8px;
}

.stepper-step p {
    font-size: 12px;
    color: var(--on-surface-variant);
}

/* Mobile Stepper */
.stepper-mobile {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 0 var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .stepper-mobile {
        display: none;
    }
}

.stepper-mobile-step {
    display: flex;
    gap: 16px;
}

.stepper-mobile-step .step-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stepper-mobile-step .step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--clay-terracotta);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clay-terracotta);
    font-weight: 700;
    font-size: 12px;
}

.stepper-mobile-step .step-line {
    flex: 1;
    width: 1px;
    background: rgba(74, 85, 104, 0.3);
    margin-top: 8px;
}

.stepper-mobile-step .step-content {
    padding-bottom: 16px;
}

.stepper-mobile-step .step-content h4 {
    font-size: 20px;
    margin-bottom: 4px;
}

.stepper-mobile-step .step-content p {
    font-size: 14px;
    color: var(--on-surface-variant);
}

/* -- African Footprint ---------------------------------------- */
.footprint-section {
    background: var(--surface-container);
    position: relative;
    overflow: hidden;
}

.footprint-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px;
    align-items: center;
    padding: 0 var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .footprint-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.country-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
}

@media (min-width: 768px) {
    .country-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.country-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--on-surface);
}

.country-dot {
    width: 6px;
    height: 6px;
    background: var(--clay-terracotta);
    border-radius: 50%;
    flex-shrink: 0;
}

.highlight-box {
    margin-top: 48px;
    padding: 24px;
    border-left: 4px solid var(--muted-copper);
    background: rgba(31, 42, 60, 0.5);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.highlight-box h4 {
    margin-bottom: 8px;
}

.highlight-box p {
    font-size: 14px;
    color: var(--on-surface-variant);
}

.footprint-image {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(74, 85, 104, 0.3);
}

.footprint-image img {
    width: 100%;
    border-radius: var(--radius-xl);
}

.map-pin {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--clay-terracotta);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--clay-terracotta);
}

.map-pin.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.map-pin.small {
    width: 8px;
    height: 8px;
    background: var(--muted-copper);
    box-shadow: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* -- Services Grid -------------------------------------------- */
.services-section {
    background: var(--surface-container-lowest);
}

.services-header {
    text-align: center;
    margin-bottom: 64px;
    padding: 0 var(--margin-mobile);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    padding: 32px;
    border: 1px solid rgba(74, 85, 104, 0.2);
    background: var(--surface-container-low);
    transition: all 0.3s;
    border-radius: var(--radius-lg);
}

.service-card:hover {
    border-color: var(--clay-terracotta);
}

.service-card .service-number {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.service-card h3 {
    margin: 16px 0;
    transition: color 0.3s;
}

.service-card:hover h3 {
    color: var(--clay-terracotta);
}

.service-card p {
    color: var(--on-surface-variant);
}

/* -- Projects Gallery ----------------------------------------- */
.projects-section {
    background: var(--surface);
}

.projects-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 48px;
    padding: 0 var(--margin-mobile);
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .projects-header {
        flex-direction: row;
        align-items: flex-end;
    }
}

.projects-header .view-all {
    color: var(--muted-copper);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--muted-copper);
    padding-bottom: 4px;
    transition: all 0.3s;
}

.projects-header .view-all:hover {
    color: var(--off-white);
    border-color: var(--off-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--grid-column-gap);
    padding: 0 var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-lg);
}

.project-card .project-image {
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.project-card .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: all 0.7s;
}

.project-card:hover .project-image img {
    filter: grayscale(0);
    transform: scale(1.05);
}

.project-card .project-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--background), transparent);
    opacity: 0.9;
    pointer-events: none;
}

.project-card .project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
}

.project-info .project-country {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--clay-terracotta);
}

.project-info .project-name {
    margin-top: 4px;
}

.project-info .project-type {
    font-size: 12px;
    color: var(--on-surface-variant);
    margin-top: 8px;
}

.project-card .project-arrow {
    position: absolute;
    bottom: 32px;
    right: 32px;
    color: var(--off-white);
    transition: transform 0.3s;
}

.project-card:hover .project-arrow {
    transform: translateX(8px);
}

/* -- Built for Africa Section --------------------------------- */
.africa-section {
    background: var(--surface-container-lowest);
    border-top: 1px solid rgba(74, 85, 104, 0.1);
    border-bottom: 1px solid rgba(74, 85, 104, 0.1);
}

.africa-inner {
    background: var(--surface-container);
    padding: 48px 24px;
    position: relative;
    overflow: hidden;
    margin: 0 var(--margin-mobile);
    border-radius: var(--radius-xl);
}

@media (min-width: 768px) {
    .africa-inner {
        padding: 80px;
    }
}

.africa-circle {
    position: absolute;
    top: 0;
    right: 0;
    width: 256px;
    height: 256px;
    border: 1px solid rgba(197, 108, 57, 0.2);
    border-radius: 50%;
    transform: translate(50%, -50%);
    pointer-events: none;
}

.africa-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px;
}

@media (min-width: 1024px) {
    .africa-content {
        grid-template-columns: 2fr 1fr;
    }
}

.africa-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px 48px;
}

@media (min-width: 640px) {
    .africa-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

.africa-feature h4 {
    color: var(--clay-terracotta);
    font-size: 20px;
    margin-bottom: 12px;
}

.africa-feature p {
    font-size: 14px;
    color: var(--on-surface-variant);
}

.africa-quote {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-top: 1px solid rgba(74, 85, 104, 0.3);
    padding-top: 40px;
}

@media (min-width: 1024px) {
    .africa-quote {
        border-top: none;
        border-left: 1px solid rgba(74, 85, 104, 0.3);
        padding-top: 0;
        padding-left: 40px;
        align-items: flex-start;
        text-align: left;
    }
}

.africa-quote .quote-icon {
    font-size: 48px;
    color: var(--clay-terracotta);
    margin-bottom: 24px;
}

.africa-quote blockquote {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--off-white);
    font-style: italic;
    margin-bottom: 16px;
}

.africa-quote cite {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    font-style: normal;
}

/* -- Final CTA Section ---------------------------------------- */
.cta-section {
    background: var(--background);
}

.cta-content {
    max-width: 672px;
    margin: 0 auto;
    text-align: center;
    padding: 0 var(--margin-mobile);
}

.cta-content h2 {
    margin-bottom: 24px;
}

.cta-content > p {
    margin-bottom: 48px;
}

.contact-card {
    display: inline-block;
    padding: 32px;
    border: 1px solid rgba(181, 137, 75, 0.3);
    background: var(--surface-container-low);
    margin-bottom: 48px;
    border-radius: var(--radius-lg);
}

.contact-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

@media (min-width: 768px) {
    .contact-card-inner {
        flex-direction: row;
    }
}

.contact-avatar {
    width: 80px;
    height: 80px;
    background: rgba(74, 85, 104, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-avatar .material-symbols-outlined {
    font-size: 36px;
    color: var(--clay-terracotta);
}

.contact-text {
    text-align: left;
}

.contact-text h4 {
    font-size: 20px;
}

.contact-text p {
    font-size: 12px;
    color: var(--muted-copper);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 4px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--on-surface-variant);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--clay-terracotta);
}

/* -- Contact Page --------------------------------------------- */
.contact-page {
    padding: 40px var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-page {
        padding: 80px var(--margin-mobile);
    }
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 1024px) {
    .contact-layout {
        grid-template-columns: 3fr 2fr;
    }
}

.contact-form-container h2 {
    margin-bottom: 24px;
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--off-white);
}

.contact-form-container h2 i {
    color: var(--clay-terracotta);
    margin-right: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.contact-success {
    text-align: center;
    padding: 48px 24px;
}

.contact-success .fa-check-circle {
    font-size: 64px;
    color: #75c785;
    margin-bottom: 24px;
    display: block;
}

.contact-success p {
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--on-surface-variant);
}

/* Contact Info sidebar */
.contact-info {
    background: var(--surface-container-low);
    border: 1px solid rgba(74, 85, 104, 0.2);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.contact-info h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--off-white);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(74, 85, 104, 0.2);
}

.contact-info h3 i {
    color: var(--clay-terracotta);
    margin-right: 8px;
}

.contact-detail {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-detail i {
    color: var(--clay-terracotta);
    font-size: 18px;
    margin-top: 4px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.contact-detail strong {
    display: block;
    font-size: 14px;
    color: var(--off-white);
    margin-bottom: 4px;
}

.contact-detail p {
    font-size: 14px;
    color: var(--on-surface-variant);
    line-height: 1.6;
}

.contact-social {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(74, 85, 104, 0.2);
}

.contact-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(74, 85, 104, 0.3);
    color: var(--on-surface-variant);
    transition: all 0.3s;
}

.contact-social a:hover {
    border-color: var(--clay-terracotta);
    color: var(--clay-terracotta);
    background: rgba(197, 108, 57, 0.1);
}

/* -- Footer --------------------------------------------------- */
.site-footer {
    background: var(--surface-container-lowest);
    border-top: 1px solid rgba(181, 137, 75, 0.3);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--grid-column-gap);
    align-items: start;
    padding: var(--section-padding) var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .footer-inner {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--clay-terracotta);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.footer-brand p {
    max-width: 288px;
    color: var(--on-surface-variant);
}

.footer-brand .copyright {
    font-size: 12px;
    color: rgba(196, 199, 199, 0.5);
    margin-top: 40px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--off-white);
    margin-bottom: 24px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-col ul li a {
    font-size: 16px;
    color: var(--on-surface-variant);
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--off-white);
}

.footer-col ul li a.active-link {
    color: var(--clay-terracotta);
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(74, 85, 104, 0.3);
    color: var(--on-surface-variant);
    font-size: 16px;
    transition: all 0.3s;
}

.footer-social a:hover {
    border-color: var(--clay-terracotta);
    color: var(--clay-terracotta);
    background: rgba(180, 108, 40, 0.1);
}

/* -- Alerts --------------------------------------------------- */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    color: #75c785;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.alert-error {
    background: rgba(220, 53, 69, 0.15);
    color: #ffb4ab;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* -- Forms ---------------------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--on-surface);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--steel-grey);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 16px;
    background: var(--surface-container-low);
    color: var(--on-surface);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clay-terracotta);
}

/* -- Login / Register Pages ----------------------------------- */
.auth-form {
    max-width: 420px;
    margin: 80px auto;
    padding: 0 var(--margin-mobile);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 8px;
}

.auth-form .hint {
    text-align: center;
    color: var(--on-surface-variant);
    margin-bottom: 24px;
}

/* -- Utility -------------------------------------------------- */
.hint {
    font-size: 14px;
    color: var(--on-surface-variant);
    margin-bottom: 12px;
}

.required {
    color: var(--clay-terracotta);
}

.text-center {
    text-align: center;
}

/* -- Responsive Utilities ------------------------------------- */
.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: inline;
    }
}

/* -- Padding utilities for bento cards ------------------------ */
.p-8 {
    padding: 32px;
}

/* -- Page Sections (for scaffolded pages) --------------------- */
.page-section {
    padding: 80px var(--margin-mobile);
    max-width: 1280px;
    margin: 0 auto;
}

/* -- Responsive Padding for all sections ---------------------- */
@media (min-width: 768px) {
    .hero-content-wrap,
    .intro-grid,
    .value-cards,
    .stepper-desktop,
    .stepper-mobile,
    .footprint-grid,
    .services-grid,
    .projects-grid,
    .projects-header,
    .cta-content,
    .lifecycle-header {
        padding-left: var(--margin-desktop) !important;
        padding-right: var(--margin-desktop) !important;
    }
    .africa-inner {
        margin-left: var(--margin-desktop);
        margin-right: var(--margin-desktop);
    }
    .nav-inner {
        padding-left: 20px;
        padding-right: 20px;
    }
    .credibility-strip .strip-inner {
        padding-left: var(--margin-desktop);
        padding-right: var(--margin-desktop);
    }
}
