/* -------------------------------------------------------------------
   1. ROOT VARIABLES & GLOBAL STYLES
------------------------------------------------------------------- */

:root {
    /* Color Palette (Split-Complementary) */
    --color-primary: #4A7C59;       /* Eucalyptus Green */
    --color-secondary: #E57A44;     /* Terracotta Orange */
    --color-accent: #3C4CAD;        /* Twilight Blue */
    --color-bg-light: #F8F5F1;      /* Off-white, warm */
    --color-bg-dark: #2A363B;       /* Dark Charcoal Slate */
    --color-text-dark: #222222;
    --color-text-light: #FFFFFF;
    --color-border: #ddd;

    /* Typography */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Source Sans Pro', sans-serif;

    /* Layout */
    --container-width: 1140px;
    --header-height: 80px;

    /* Animation */
    --transition-speed: 0.4s;
    --transition-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--color-text-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
p { margin-bottom: 1rem; }
a { color: var(--color-secondary); text-decoration: none; transition: color var(--transition-speed) ease; }
a:hover { color: var(--color-primary); }

/* -------------------------------------------------------------------
   2. LAYOUT & UTILITY CLASSES
------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.columns {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1rem;
}

.column {
    flex: 1;
    padding: 0 1rem;
    min-width: 280px; /* Prevents excessive shrinking */
}

.column.is-two-thirds {
    flex: 2;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-secondary);
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

.content-section {
    padding: 6rem 0;
}

.content-section-dark {
    padding: 6rem 0;
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

.content-section-dark h2, .content-section-dark h3 {
    color: var(--color-text-light);
}

.content-section-light {
    padding: 6rem 0;
    background-color: #ffffff;
}

/* -------------------------------------------------------------------
   3. HEADER & NAVIGATION
------------------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: top var(--transition-speed) ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--color-text-dark);
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) var(--transition-ease);
}

.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text-dark);
    margin: 5px 0;
    transition: all var(--transition-speed) ease;
}

/* -------------------------------------------------------------------
   4. HERO SECTION
------------------------------------------------------------------- */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
    position: relative;
}

.hero-content {
    max-width: 800px;
    perspective: 1000px;
}

.hero-content h1 {
    color: var(--color-text-light);
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease forwards;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------------
   5. GLOBAL COMPONENTS (BUTTONS, CARDS, FORMS)
------------------------------------------------------------------- */

/* Buttons */
.button {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-ease);
    transform-style: preserve-3d;
    position: relative;
}

.primary-button {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}

.secondary-button {
    background-color: transparent;
    color: var(--color-secondary);
    box-shadow: inset 0 0 0 2px var(--color-secondary);
}

.button-hover-effect:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Cards */
.card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform var(--transition-speed) var(--transition-ease), box-shadow var(--transition-speed) var(--transition-ease);
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-content h3 {
    margin-bottom: 1rem;
}

/* Forms */
.contact-form {
    max-width: 700px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--color-text-light);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 15px rgba(229, 122, 68, 0.5);
}

.contact-form button {
    align-self: center;
}

/* -------------------------------------------------------------------
   6. SECTION-SPECIFIC STYLES
------------------------------------------------------------------- */

/* About Section */
.bio-shape {
    position: relative;
    padding: 1rem;
}
.bio-shape img {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
    transition: border-radius var(--transition-speed) ease;
    width: 100%;
    height: auto;
}
@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* Research Section - Progress Indicators */
.progress-indicators {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 2rem auto 0;
}
.progress-item {
    text-align: left;
}
.progress-item label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}
.progress-item span {
    float: right;
    font-weight: 600;
    color: var(--color-primary);
}
progress {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
}
progress::-webkit-progress-bar {
    background-color: #e0e0e0;
    border-radius: 6px;
}
progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    border-radius: 6px;
}

/* Clientele/Partners Section */
.partner-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 3rem;
}
.partner-logos img {
    max-height: 60px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition-speed) ease;
}
.partner-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Press Section */
.press-mention {
    text-align: center;
}
.press-mention blockquote {
    font-size: 1.2rem;
    font-style: italic;
    border-left: 4px solid var(--color-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.press-mention cite {
    font-weight: 600;
    color: var(--color-primary);
}

/* Resources Section */
.resource-list {
    list-style: none;
    max-width: 800px;
    margin: 2rem auto 0;
}
.resource-list li {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    transition: background-color var(--transition-speed) ease;
}
.resource-list li:hover {
    background: rgba(255, 255, 255, 0.1);
}
.resource-list a {
    color: var(--color-text-light);
    font-weight: 600;
}
.resource-list a:hover {
    color: var(--color-secondary);
}

/* Events Calendar */
.events-list {
    max-width: 800px;
    margin: 3rem auto 0;
}
.event-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.event-date {
    text-align: center;
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    border-radius: 8px;
    padding: 0.8rem;
    min-width: 70px;
}
.event-date .month {
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
}
.event-date .day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.event-details {
    flex-grow: 1;
}
.event-details h3 {
    margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------------
   7. FOOTER
------------------------------------------------------------------- */

.site-footer {
    background-color: var(--color-bg-dark);
    color: rgba(255,255,255,0.8);
    padding: 4rem 0 2rem;
}
.site-footer h4 {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}
.site-footer p {
    margin-bottom: 0;
}
.site-footer ul {
    list-style: none;
}
.site-footer ul li {
    margin-bottom: 0.5rem;
}
.site-footer a {
    color: rgba(255,255,255,0.8);
}
.site-footer a:hover {
    color: var(--color-secondary);
}
.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* -------------------------------------------------------------------
   8. PAGE-SPECIFIC STYLES
------------------------------------------------------------------- */

/* Success Page */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

/* Privacy & Terms Pages */
.legal-page {
    padding-top: calc(var(--header-height) + 4rem); /* Header height + extra space */
    padding-bottom: 4rem;
}
.legal-page h1 {
    margin-bottom: 2rem;
}
.legal-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* -------------------------------------------------------------------
   9. RESPONSIVE DESIGN (MEDIA QUERIES)
------------------------------------------------------------------- */

@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right var(--transition-speed) var(--transition-ease);
        padding-top: var(--header-height);
    }
    .main-nav.is-active {
        right: 0;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        gap: 1rem;
    }
    .main-nav a {
        font-size: 1.2rem;
    }
    .burger-menu {
        display: block;
    }
    .burger-menu.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger-menu.is-active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .columns {
        flex-direction: column;
    }

    .column {
        margin-bottom: 2rem;
    }
    
    .event-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}