:root {
    --primary-green: #123e14;
    --text-cream: #f6f4e4;
    --accent-green: #1e4f24;
    --glass-bg: rgba(18, 62, 20, 0.65);
    --glass-border: rgba(246, 244, 228, 0.1);
    --glass-highlight: rgba(246, 244, 228, 0.05);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: var(--primary-green);
    /* Ensures bottom overscroll matches footer */
}

body {
    font-family: 'Poppins', sans-serif;

    color: var(--text-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Dynamic Background System */
#bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: url('Background_img4k.webp');
    background-size: cover;
    background-position: center;
    transition: opacity 0.8s ease;
    opacity: 1;
    filter: blur(5px);
    transform: scale(1.05);
    /* Prevent blurred edges showing white bg */
}

body.scrolled-into-about #bg-container {
    opacity: 0;
}

#styles-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: rgba(18, 62, 20, 0.3);
    /* Initial light overlay for Hero */
    transition: opacity 0.8s ease, background-color 0.8s ease;
    /* Smooth transition */
    pointer-events: none;
}

/* Scrolled State for Overlay */
body.scrolled-into-about #styles-overlay {
    background: rgba(18, 62, 20, 1);
    /* Solid Dark Green when scrolled */
    opacity: 1;
}

/* Old scroll logic removal/adjustment */


/* Scrolled State */
#styles-overlay.bg-scrolled {
    background: rgba(8, 28, 9, 0.95);
    /* Deep dark for content */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
/* Header */
.header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: #123e14;
    /* Solid Deep Green */
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
    /* Stronger shadow for visibility */
    transition: all 0.4s ease;
}

.header.scrolled {
    padding: 15px 0;
    background: #123e14;
    /* Solid on scroll too */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    /* Very strong shadow on scroll */
}

body.high-contrast {
    background-color: #000000;
    color: #f6f4e4;
    --primary-green: #000000;
    --text-cream: #f6f4e4;
    --accent-green: #333333;
}

body.high-contrast .btn-primary {
    background-color: #ffff00;
    color: #000000;
    border: 2px solid #f6f4e4;
}

body.high-contrast .card {
    border: 2px solid #f6f4e4;
    background-color: #000000;
}

body.high-contrast a {
    text-decoration: underline;
    color: #ffff00;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 62, 20, 0.95);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
    transition: opacity 0.3s ease;
}

.search-overlay.hidden {
    display: none;
}

.search-bar-container {
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 20px;
    font-size: 1.5rem;
    border: none;
    border-bottom: 2px solid var(--text-cream);
    background: transparent;
    color: var(--text-cream);
    outline: none;
}

.close-search-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-cream);
    font-size: 2rem;
    cursor: pointer;
}

.search-results {
    margin-top: 20px;
    width: 90%;
    max-width: 600px;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid rgba(246, 244, 228, 0.2);
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.search-result-item:hover {
    background-color: rgba(246, 244, 228, 0.1);
}

/* Scroll Animations with view() timeline */
@keyframes autoShowAnimation {
    from {
        opacity: 0;
        transform: translateY(200px) scale(0.3);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animation Utilities */
.autoShow {
    animation: autoShowAnimation both;
    animation-timeline: view(70% 10%);
    /* Adjusted for smoother entry */
}

.delay-100 {
    animation-range: entry 5% cover 50%;
}

.delay-200 {
    animation-range: entry 10% cover 55%;
}

.delay-300 {
    animation-range: entry 15% cover 60%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-cream);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover {
    background-color: rgba(246, 244, 228, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    gap: 12px;
    letter-spacing: -0.5px;
    transition: gap 0.8s ease;
}

.brand-text {
    transition: all 0.8s ease;
    opacity: 1;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
}

/* Header Scrolled State */
.header.scrolled .brand-text {
    opacity: 0;
    max-width: 0;
}

.header.scrolled .logo-container {
    gap: 0;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-cream);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.3s;
    opacity: 0.8;
}

.nav-link:hover {
    opacity: 1;
}

.btn-primary {
    background-color: var(--text-cream);
    color: var(--primary-green);
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    overflow: hidden;
    /* Prevent horizontal scroll from animations */
}

.hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}



.hero-content {
    animation: fadeIn 1s ease-out;
}

/* Image styles removed */
@keyframes glowPulse {
    0% {
        filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
    }

    50% {
        filter: drop-shadow(0 20px 40px rgba(246, 244, 228, 0.1));
    }

    100% {
        filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
    }
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5.5rem);
    /* Fluid Typography */
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -2px;
    color: #123e14;
    text-shadow:
        0 0 15px rgba(246, 244, 228, 0.9),
        0 0 25px rgba(246, 244, 228, 0.7),
        0 0 35px rgba(246, 244, 228, 0.5),
        0 0 50px rgba(246, 244, 228, 0.3);
    /* Strong cream glow for visibility */
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 1;
    font-weight: 600;
    /* Thicker for legibility */
    margin-bottom: 40px;
    max-width: 550px;
    color: #123e14;
    text-shadow:
        0 0 10px rgba(246, 244, 228, 0.9),
        0 0 20px rgba(246, 244, 228, 0.6);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

/* Sections */
.section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
    background-color: var(--primary-green);
    /* Slide over the fixed bg */
}

/* Ensure Hero is transparent so the fixed bg shows through */
.hero {
    background-color: transparent;
    z-index: 1;
    /* Lower than other sections */
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-align: center;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* About */
.about {
    position: relative;
    /* important */
}

.about::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 10;
    pointer-events: none;

    background-color: transparent;
    /* Responsive SVG Valley Curve: Moves from 0,0 -> 50,80 -> 100,0 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 80' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0 Q50,160 100,0 L100,80 L0,80 Z' fill='%23123e14'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
    text-align: center;
}



.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* About Blob */
.about {
    position: relative;
    /* Ensure z-index allows blob to be behind content but visible */
}

.about-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 85%;
    height: 70%;
    background: rgba(18, 62, 20, 0.55);
    /* Requested Dark Green Overlay */
    border-radius: 50%;
    filter: blur(40px);
    /* Soft blob effect */
    z-index: -1;
    opacity: 0;
    transition: all 1s ease;
    pointer-events: none;
}

/* Blob Active State */
.about-blob.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.about-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-premium);
    display: block;
}

.about-full-width-container {
    width: 100%;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.full-bleed-image {
    width: 100%;
    height: auto;
    display: block;
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* Ideals */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

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

    /* Specific 2-col grid for Principles */
    .principles-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        /* Limit width to keep them centered and nice */
        margin: 0 auto;
    }
}

.card {
    background: #f6f4e4;
    /* Solid Cream */
    padding: 40px 30px;
    border-radius: 24px;
    text-align: left;
    /* transition: transform removed to let Vanilla Tilt handle it */
    transition: box-shadow 0.6s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
    will-change: transform;
    border: 1px solid rgba(18, 62, 20, 0.1);
    color: #123e14;
    /* Dark Green Text */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card:hover {
    /* transform handled by Vanilla Tilt (scale) */
    background: #ffffff;
    /* Pop to white/bright cream */
    border-color: #123e14;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.75rem;
    font-weight: 600;
}

.card-icon {
    margin-bottom: 20px;
    color: #123e14;
    /* Dark Green Icon */
    opacity: 1;
    padding: 12px;
    /* background circle can be added if desired */
    display: inline-flex;
    background: rgba(18, 62, 20, 0.1);
    /* Light green background */
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.card p {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.7;
}

/* Goals */
.goals-text {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.5rem;
    line-height: 1.6;
    font-weight: 300;
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(246, 244, 228, 0.1);
    background-color: var(--primary-green);
    color: var(--text-cream);
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    margin-bottom: 60px;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1.5fr 1.5fr;
        text-align: left;
    }
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
    color: var(--text-cream);
}

.footer-col h4 {
    color: var(--text-cream);
    font-size: 1rem;
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

.footer-col p {
    color: var(--text-cream);
    opacity: 0.8;
    line-height: 1.8;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.footer-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-vertical a {
    color: var(--text-cream);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: all 0.2s;
}

.footer-links-vertical a:hover {
    opacity: 1;
    transform: translateX(5px);
}

.email-link {
    color: var(--text-cream);
    text-decoration: none;
    border-bottom: 1px solid rgba(246, 244, 228, 0.3);
    padding-bottom: 2px;
    transition: all 0.2s;
}

.email-link:hover {
    border-color: rgba(246, 244, 228, 1);
    opacity: 1;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(246, 244, 228, 0.1);
    text-align: center;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.4;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .nav {
        margin: 10px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 3rem;
    }
}

/* Team Section */
.team-scroll-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 200px;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-10px);
}

.member-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: rgba(246, 244, 228, 0.05);
    border: 2px solid rgba(246, 244, 228, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.member-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member:hover .member-circle {
    border-color: var(--text-cream);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.member-circle svg {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.team-member:hover .member-circle svg {
    opacity: 1;
}

.team-member h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.team-member p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Mobile Scroll for Team */
@media (max-width: 768px) {
    .team-scroll-container {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 40px;
        /* Space for scrollbar */
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-left: 20px;
        /* Start padding */
        padding-right: 20px;
    }

    .team-member {
        scroll-snap-align: center;
        flex: 0 0 auto;
        /* Don't shrink */
        width: 160px;
        margin-right: 20px;
    }
}