:root {
    /* Color Palette */
    --brand-yellow: #FFB612;
    /* SA Flag Yellow */
    --brand-green: #007A4D;
    /* SA Flag Green */
    --brand-red: #DE3831;
    /* SA Flag Red */
    --brand-dark: #111111;
    /* Very dark, almost black for background */
    --brand-black: #000000;
    
    /* 60-30-10 Layout Colors */
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --text-dark: #111111;
    --text-muted: #555555;
    
    --steel-grey: #A0A0A0;
    --clean-white: #FFFFFF;
    --dark-overlay: rgba(17, 17, 17, 0.9);
    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 80px 20px;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Sections */
section {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    border: 2px solid var(--brand-yellow);
    color: var(--brand-yellow);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: var(--brand-yellow);
    color: var(--brand-dark);
}

.btn-primary {
    background-color: var(--brand-yellow);
    color: var(--clean-white);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--brand-yellow);
}

/* Navbar Placeholder */
#navbar-placeholder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Footer Placeholder */
#footer-placeholder {
    width: 100%;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Utility */
.text-yellow {
    color: var(--brand-yellow);
}

.text-green {
    color: var(--brand-green);
}

.text-red {
    color: var(--brand-red);
}

.text-grey {
    color: var(--text-muted);
}

.bg-dark {
    background-color: var(--brand-dark);
}

.brand-gradient {
    background: linear-gradient(90deg, var(--brand-green) 0%, var(--brand-yellow) 50%, var(--brand-red) 100%);
}

/* Animations classes (to be used by JS) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Page Transitions */
body {
    opacity: 1;
    /* Reset default opacity handling */
    transition: none;
}

.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    z-index: 9999;
    transform: translateY(0);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

body.loaded .page-transition-overlay {
    transform: translateY(-100%);
}

body.exiting .page-transition-overlay {
    transform: translateY(0);
}

/* About Page Specifics */
.split-screen {
    display: flex;
    flex-wrap: wrap;
    min-height: 60vh;
}

.split-side {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 300px;
}

.split-left {
    background-color: var(--bg-white);
    border-right: 1px solid #EAEAEA;
}

.split-right {
    background-color: var(--bg-light);
}

.stat-card {
    background: var(--bg-white);
    padding: 30px;
    text-align: center;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--brand-yellow);
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

/* Services Page Specifics */
.service-section {
    padding: 100px 20px;
    border-bottom: 1px solid #EAEAEA;
}

.service-list {
    margin-top: 30px;
}

.service-list-item {
    margin-bottom: 20px;
    padding-left: 20px;
    border-left: 2px solid var(--brand-yellow);
}

.service-list-item h4 {
    transition: color 0.3s ease;
}

.service-list-item:hover h4 {
    color: var(--brand-yellow);
}

/* Contact Page Specifics */
.contact-form-container {
    background: var(--bg-white);
    padding: 40px;
    border: 1px solid #EAEAEA;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--steel-grey);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.form-control {
    width: 100%;
    padding: 12px;
    background: var(--bg-light);
    border: 1px solid #DEDEDE;
    color: var(--text-dark);
    font-family: var(--font-body);
    border-radius: 4px;
}


.form-control:focus {
    outline: none;
    border-color: var(--brand-yellow);
}

/* Standard Navbar Adjustments (No Dock) */
#navbar-placeholder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Adjust main content padding since navbar is now bottom */
/* Adjust main content padding since navbar is now top */
main {
    padding-top: 0 !important;
    /* Hero should touch top, navbar floats over */
    padding-bottom: 0 !important;
    /* Remove extra bottom padding */
}

/* --- Footer Enhancements --- */
.footer-icon-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-icon {
    color: var(--brand-yellow);
    width: 18px;
    height: 18px;
}

/* --- Standard Icon Wrapper Style --- */
.icon-squircle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--bg-light);
    color: var(--brand-yellow);
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: 1px solid #EAEAEA;
}

.icon-squircle:hover {
    background-color: var(--bg-white);
    border-color: var(--brand-yellow);
}

.icon-squircle .lucide {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

/* Services Hero Section */
.services-hero {
    position: relative;
    height: 60vh;
    /* Cinematic height */
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--clean-white);
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* Taller for parallax */
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Placeholder fallback until image is generated */
    background-color: var(--brand-dark);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient: Darker at bottom for text contrast, lighter at top for 'sky' */
    background: linear-gradient(to bottom,
            rgba(26, 26, 26, 0.4) 0%,
            rgba(26, 26, 26, 0.8) 60%,
            rgba(26, 26, 26, 1) 100%);
    z-index: 1;
}

.services-hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Enhancing the text for the cinematic background */
.hero-title-large {
    font-size: 3.5rem;
    /* Larger */
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    /* Lift off background */
}

.hero-subtitle-large {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    color: #e0e0e0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ================================================
   RESPONSIVE MEDIA QUERIES
================================================ */

/* Tablet */
@media (max-width: 900px) {
    .nav-links-wrap {
        display: none !important;
    }

    #nav-hamburger {
        display: flex !important;
    }

    .split-side {
        min-width: unset;
        width: 100%;
        padding: 60px 5%;
    }

    .split-screen {
        flex-direction: column;
    }

    .stat-card {
        padding: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* ---- TYPOGRAPHY ---- */
    h1, .hero-title, .hero-title-large {
        font-size: clamp(2rem, 8vw, 3rem) !important;
    }

    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }

    /* ---- SECTIONS ---- */
    section {
        padding: 60px 20px !important;
    }

    /* ---- SERVICE CARDS GRID ---- */
    div[style*="grid-template-columns: repeat"] {
        grid-template-columns: 1fr !important;
    }

    /* ---- VALUES / ECOSYSTEM GRIDS ---- */
    .values-grid {
        grid-template-columns: 1fr !important;
    }

    /* ---- SPLIT SCREEN ---- */
    .split-screen {
        flex-direction: column;
    }

    .split-side {
        min-width: unset !important;
        width: 100% !important;
        padding: 50px 5% !important;
    }

    /* ---- SERVICE SECTION FLEX ROWS ---- */
    .service-section .container > div {
        flex-direction: column !important;
    }

    /* ---- CONTACT FLEX COLUMNS ---- */
    #contact-content .container > div {
        flex-direction: column !important;
    }

    /* ---- ABOUT STATS GRID ---- */
    div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ---- SERVICES IMAGE BLOCK HEIGHT ---- */
    div[style*="height: 600px"] {
        height: 300px !important;
    }

    /* ---- HERO CUT LAYOUT (index.html) — hide on mobile ---- */
    div[style*="clip-path: polygon"] {
        display: none !important;
    }

    /* ---- FOOTER GRID ---- */
    .footer .container {
        grid-template-columns: 1fr !important;
    }

    /* ---- FORMS ---- */
    .contact-form-container {
        padding: 25px 20px !important;
    }
}