@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@700;900&family=Open+Sans:wght@400;600;700&display=swap');

:root {
    /* Light Theme - Official Logo Palette */
    --color-primary: #2068C0;      /* Logo Blue */
    --color-secondary: #63B837;     /* Logo Green */
    --color-background: #F8F9FA;   /* Off-white */
    --color-surface: #FFFFFF;      /* White */
    --color-text: #495057;         /* Dark Gray */
    --color-heading: #212529;      /* Near Black */
    --color-border: rgba(0, 0, 0, 0.1);
    --color-shadow-primary: rgba(32, 104, 192, 0.25);
    --color-shadow-dark: rgba(0, 0, 0, 0.1);
    --hero-overlay: rgba(255, 255, 255, 0.4);

    /* Shared Variables */
    --font-heading: 'Roboto Slab', serif;
    --font-body: 'Open Sans', sans-serif;
    --container-width: 1180px;
    --border-radius: 16px;
}

[data-theme="dark"] {
    /* Dark Theme - Adapted Logo Palette */
    --color-primary: #3B82F6;      /* Lighter Blue for contrast */
    --color-secondary: #84CC16;     /* Lighter Green */
    --color-background: #121212;   /* Near Black */
    --color-surface: #1E1E1E;      /* Dark Surface */
    --color-text: #A8B2C2;         /* Soft Gray-Blue */
    --color-heading: #FFFFFF;      /* White */
    --color-border: rgba(255, 255, 255, 0.1);
    --color-shadow-primary: rgba(59, 130, 246, 0.3);
    --color-shadow-dark: rgba(0, 0, 0, 0.4);
    --hero-overlay: rgba(18, 18, 18, 0.7);
}

/* --- Global Resets & Typography --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-background);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}
body.no-scroll { overflow: hidden; } /* Prevents scrolling when mobile nav is open */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-heading); color: var(--color-heading); line-height: 1.2; margin-bottom: 24px; font-weight: 700;}
h1 { font-size: clamp(3rem, 7vw, 5.5rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.03em;}
h3 { font-size: 1.75rem; letter-spacing: -0.02em;}
p { margin-bottom: 24px; max-width: 680px; font-size: 1.1rem; line-height: 1.7; }
.section { padding: 140px 0; position: relative; }
.section-title { text-align: center; margin-bottom: 80px; }
.section-title p { margin-left: auto; margin-right: auto; }

/* --- Buttons & Reusable Components --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    padding: 18px 40px; border-radius: 50px; border: none; text-decoration: none;
    font-weight: 700; font-size: 1.1rem; font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); position: relative; cursor: pointer;
}
.btn-primary {
    background-color: var(--color-primary); color: #FFFFFF;
    box-shadow: 0 10px 30px var(--color-shadow-primary);
}
.btn-primary:hover {
    transform: translateY(-6px); box-shadow: 0 18px 45px var(--color-shadow-primary);
    background-color: var(--color-primary);
}

/* --- Header & Navigation --- */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100; padding: 24px 0;
    transition: all 0.3s ease;
}
.main-header.scrolled {
    background: hsla(0, 0%, 100%, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 5px 20px var(--color-shadow-dark); padding: 16px 0;
}
[data-theme="dark"] .main-header.scrolled { background: rgba(30, 30, 30, 0.7); }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 48px; display: block; transition: height 0.3s ease; }
.main-header.scrolled .logo img { height: 40px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 10px 18px; text-decoration: none; color: var(--color-heading); font-weight: 600; transition: color 0.3s ease; border-radius: 8px; }
.main-nav a:hover { color: var(--color-primary); background-color: rgba(0,0,0,0.05); }
[data-theme="dark"] .main-nav a:hover { background-color: rgba(255,255,255,0.1); }
.main-nav .btn { padding: 12px 28px; }

/* --- Mobile Navigation Toggle --- */
.mobile-nav-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--color-heading);
    z-index: 1001; /* Above the nav overlay */
}
.mobile-nav-toggle .icon-close { display: none; }
.mobile-nav-toggle.is-active .icon-menu { display: none; }
.mobile-nav-toggle.is-active .icon-close { display: block; }

/* --- Theme Switcher --- */
.theme-switcher {
    background: none; border: none; cursor: pointer; color: var(--color-heading);
    padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.theme-switcher:hover { background-color: rgba(0,0,0,0.05); }
[data-theme="dark"] .theme-switcher:hover { background-color: rgba(255,255,255,0.1); }
.theme-switcher .moon { display: none; } .theme-switcher .sun { display: block; }
[data-theme="dark"] .theme-switcher .moon { display: block; } [data-theme="dark"] .theme-switcher .sun { display: none; }

/* --- Hero Section --- */
.hero { height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
#hero-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; z-index: -2; transform: translateX(-50%) translateY(-50%); object-fit: cover; }
.hero::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: var(--hero-overlay); z-index: -1; }
.hero-content { max-width: 950px; padding: 24px; }
.hero-content h1 { color: var(--color-heading); }
.hero-content p { font-size: 1.25rem; max-width: 650px; margin: 24px auto 48px auto; color: var(--color-heading); text-shadow: 0 2px 10px rgba(0,0,0,0.2); }

/* --- Pillars & Cards --- */
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.pillar-card {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--border-radius); padding: 40px; text-align: center;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pillar-card:hover { transform: translateY(-12px); box-shadow: 0 25px 50px var(--color-shadow-dark); border-color: var(--color-primary); }
.pillar-card .icon { color: var(--color-primary); margin-bottom: 24px; }

/* --- Features Section --- */
.feature { display: flex; align-items: center; gap: 80px; margin-bottom: 140px; }
.feature:last-child { margin-bottom: 0; }
.feature:nth-child(even) { flex-direction: row-reverse; }
.feature-text, .feature-image-wrapper { flex: 1; }
.feature-image-wrapper { overflow: hidden; border-radius: var(--border-radius); }
.feature-image { width: 100%; height: auto; border-radius: var(--border-radius); box-shadow: 0 25px 60px var(--color-shadow-dark); transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.feature-image-wrapper:hover .feature-image { transform: scale(1.05); }
.feature-tag { font-weight: 700; color: var(--color-secondary); margin-bottom: 16px; letter-spacing: 1.5px; }
.feature-text ul { list-style: none; padding-left: 0; }
.feature-text li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; font-size: 1.1rem; }
.feature-text li i { color: var(--color-primary); margin-top: 5px; }

/* --- Community / Testimonial Section --- */
.community-section { text-align: center; position: relative; }
.community-section::before {
    content: ''; position: absolute; top: 50%; left: 50%; width: 900px; height: 900px;
    background: radial-gradient(circle, var(--color-shadow-primary) 0%, rgba(255, 183, 77, 0) 65%);
    transform: translate(-50%, -50%); pointer-events: none;
}
.testimonial-card {
    background: var(--color-surface); border: 1px solid var(--color-border); padding: 48px;
    border-radius: var(--border-radius); margin-top: 48px; max-width: 800px;
    margin-left: auto; margin-right: auto; position: relative;
}
.testimonial-avatar { width: 90px; height: 90px; border-radius: 50%; border: 4px solid var(--color-primary); margin: -93px auto 24px auto; position: relative; object-fit: cover;}
.testimonial-text { font-style: italic; font-size: 1.3rem; color: var(--color-heading); line-height: 1.6; }
.testimonial-author { margin-top: 24px; font-weight: 700; font-size: 1.1rem; }
.testimonial-author span { color: var(--color-primary); }
.testimonial-author small { font-weight: 400; color: var(--color-text); font-style: normal; display: block; font-size: 1rem; }

/* --- CTA Section --- */
.cta-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.cta-section p {
    margin-left: auto;
    margin-right: auto;
}

/* --- Footer --- */
.main-footer { border-top: 1px solid var(--color-border); padding: 60px 0; margin-top: 120px; text-align: center; }
.social-links a { color: var(--color-text); text-decoration: none; margin: 0 18px; display: inline-block; transition: all 0.3s ease; }
.social-links a:hover { color: var(--color-primary); transform: translateY(-4px); }
.footer-copyright {
    margin-top: 24px;
    font-size: 1rem;
    margin-left: auto;
    margin-right: auto;
}

/* --- Modal & Form Styles (Continued) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.is-visible { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--color-surface); border-radius: var(--border-radius);
    padding: 48px; max-width: 500px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative;
    transform: scale(0.95); transition: transform 0.3s ease;
}
.modal-overlay.is-visible .modal-content { transform: scale(1); }
.modal-close {
    position: absolute; top: 16px; right: 16px; background: none; border: none;
    font-size: 2.5rem; line-height: 1; color: var(--color-text);
    cursor: pointer; transition: color 0.2s ease;
}
.modal-close:hover { color: var(--color-primary); }
.modal-header { text-align: center; margin-bottom: 32px; }
.modal-icon { color: var(--color-primary); margin-bottom: 16px; }
.modal-header h2 { margin-bottom: 8px; }
.modal-header p { font-size: 1rem; max-width: 100%; margin-bottom: 0; }
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--color-heading); }
.form-group input {
    width: 100%; padding: 14px 18px; border-radius: 8px; border: 1px solid var(--color-border);
    background: var(--color-background); color: var(--color-text); font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-shadow-primary);
}
#form-submit-btn { width: 100%; padding: 18px; }
.form-status-message {
    text-align: center; padding: 24px; border-radius: var(--border-radius);
    display: none; /* Hidden by default */
}
.form-status-message.success { background-color: rgba(99, 184, 55, 0.15); color: var(--color-secondary); }
.form-status-message.error { background-color: rgba(32, 104, 192, 0.1); color: var(--color-primary); }
.form-status-message h3 { margin-bottom: 8px; color: inherit; }
.form-status-message p { margin-bottom: 0; color: inherit; }

/* --- 404 Page Styles --- */
.error-page-wrapper { display: flex; justify-content: center; align-items: center; min-height: 100vh; text-align: center; padding: 24px; }
.error-container { max-width: 600px; }
.error-icon { color: var(--color-primary); margin-bottom: 32px; animation: pulse 2.5s ease-in-out infinite; }
.error-code {
    font-family: var(--font-heading); font-weight: 900; font-size: clamp(6rem, 25vw, 12rem);
    line-height: 1; margin-bottom: 24px; color: var(--color-primary);
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.1); opacity: 1; } }

/* --- Animations --- */
.animate-on-scroll { opacity: 0; transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in { transform: translateY(60px); }
.slide-in-left { transform: translateX(-100px); }
.slide-in-right { transform: translateX(100px); }
.is-visible { opacity: 1; transform: none; }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 100%;
        height: 100vh;
        padding-top: 80px; /* Space for header */
        background: var(--color-surface);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        z-index: 1000;
    }
    .main-nav.nav-open {
        right: 0; /* Slide in */
    }
    .main-nav a {
        display: block;
        font-size: 1.5rem;
    }
    .mobile-nav-toggle {
        display: flex;
    }
    .feature { flex-direction: column !important; text-align: center; gap: 48px; }
    .feature-text ul { justify-content: center; }
}
@media (max-width: 768px) {
    .section { padding: 100px 0; }
    .header-right { gap: 4px; }
    .main-nav .btn { display: none; }
}