/* styles.css */
:root {
    /* Color Palette - Light Mode (Green & White) */
    --bg-primary: #ffffff;
    --bg-secondary: #f0fdf4; /* Very light emerald tint */
    --text-primary: #064e3b; /* Dark emerald */
    --text-secondary: #374151;
    --accent-primary: #10b981; /* Emerald Green */
    --accent-secondary: #34d399; /* Mint Green */
    --border-color: #d1fae5;
    --shadow-subtle: 0 4px 12px rgba(6, 78, 59, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
    
    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Layout */
    --container-width: 1100px;
    --header-height: 72px;
    --border-radius: 16px;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* 3D Effects */
    --perspective: 1200px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

[data-theme="dark"] {
    --bg-primary: #042f2e;
    --bg-secondary: #064e3b;
    --text-primary: #f0fdf4;
    --text-secondary: #99f6e4;
    --accent-primary: #34d399;
    --accent-secondary: #6ee7b7;
    --border-color: rgba(52, 211, 153, 0.15);
    --shadow-subtle: 0 15px 40px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(6, 78, 59, 0.65);
    --glass-border: rgba(52, 211, 153, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease, color 0.5s ease;
    perspective: var(--perspective);
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

/* Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.main-header nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-primary);
}

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

.theme-toggle, .mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.theme-toggle:hover, .mobile-menu-toggle:hover {
    background-color: var(--bg-secondary);
}

.mobile-menu-toggle {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 180px 0 100px;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.liquid-bg {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 65%;
    height: 120%;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-image {
    transform-style: preserve-3d;
    transition: box-shadow 0.3s ease;
    will-change: transform;
}

/* Page Header (for subpages) */
.page-header {
    padding: 160px 0 60px;
    background-color: var(--bg-secondary);
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    display: inline-block;
    transform-style: preserve-3d;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-4px) translateZ(10px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.25);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background-color: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-4px) translateZ(10px);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.75rem;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

/* Cards & Icons (SVG based) */
.icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent-primary);
    transition: var(--transition-smooth);
}

.icon-wrapper svg {
    width: 32px;
    height: 32px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.service-card, .team-member {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
    transform-style: preserve-3d;
}

.service-card:hover, .team-member:hover {
    box-shadow: 0 30px 60px rgba(6, 78, 59, 0.15);
    border-color: var(--accent-primary);
}

.icon-wrapper, h3, p, .member-photo {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.team-member {
    text-align: center;
    padding: 32px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.member-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    margin: 0 auto 24px;
    overflow: hidden;
    border: 4px solid var(--bg-secondary);
    transition: var(--transition-smooth);
}

.team-member:hover .member-photo {
    transform: translateZ(40px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.js-tilt-glare {
    border-radius: inherit;
}

/* Disable JS-driven transforms on touch or reduced motion */
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
    .service-card, .team-member, .hero-image, .liquid-bg svg {
        transform: none !important;
    }
}


/* Contact Page Specific */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-form {
    background-color: var(--bg-primary);
    padding: 48px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
    transform-style: preserve-3d;
    transition: var(--transition-smooth);
}

.contact-form:hover {
    transform: rotateY(-2deg) rotateX(2deg);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Footer */
.main-footer {
    padding: 80px 0 40px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.footer-links h4 {
    margin-bottom: 24px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 700;
    }
    
    .hero-content, .contact-container, .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        text-align: center;
        padding-top: 140px;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .tagline {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 12px;
    }
}

/* Animation classes */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade {
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
