/* style.css full content here */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --color-primary: #1B4F37; /* Rich forest green */
    --color-accent: #C2A06E; /* Warm tan/gold */
    --color-text: #333333; /* Dark earthy brown/grey */
    --color-bg: #F8F4ED; /* Cream/off-white */
    --color-light-grey: #DEDEDE;
    --color-dark-grey: #666666;

    /* Fonts */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: darken(var(--color-primary), 10%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.section-padding {
    padding: 5rem 0;
}

.section-alt-bg {
    background-color: #F0EDE7; /* A slightly darker cream */
}

.section-heading {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: var(--color-primary);
}

.section-subheading {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-dark-grey);
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-bg);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

nav.scrolled {
    background-color: var(--color-bg); /* Keep base bg, but maybe slightly darker or add stronger shadow */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* For mobile hamburger */
}

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

.logo span {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links li a {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Ensure it's above other elements */
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(27, 79, 55, 0.7), rgba(27, 79, 55, 0.7)), url('https://images.unsplash.com/photo-1574880061972-e5672d242940?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MDk2MHwwfDF8c2VhcmNofDh8fGhvcnNlJTIwdHJhaW5pbmclMjBwYXN0dXJlfGVufDB8fHx8MTcwMTkxNjAxNHww&ixlib=rb-4.0.3&q=80&w=1080') no-repeat center center/cover;
    color: #fff;
    padding-top: 80px; /* Offset for fixed nav */
    position: relative;
}

.hero-content {
    max-width: 900px;
}

#hero h1 {
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-subheading {
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.hero-ctas .btn {
    font-size: 1.1rem;
    padding: 1.2rem 2.5rem;
}

.hero-ctas .btn-primary {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-primary);
}

.hero-ctas .btn-primary:hover {
    background-color: darken(var(--color-accent), 10%);
    border-color: darken(var(--color-accent), 10%);
}

.hero-ctas .btn-secondary {
    color: #fff;
    border-color: #fff;
}

.hero-ctas .btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

/* Stats Strip */
.stats-strip {
    background-color: var(--color-primary);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    color: var(--color-accent);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.service-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.service-card p {
    color: var(--color-dark-grey);
    font-size: 0.95rem;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-dark-grey);
}

/* Trusted By Section */
.trusted-by-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 2rem 0;
}

.trusted-by-strip span {
    font-size: 1.2rem;
    color: #999; /* Muted gray */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    white-space: nowrap;
}

/* Work / Case Studies */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.case-study-card {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.case-study-tag {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.case-study-card h3 {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.case-study-card p {
    color: var(--color-dark-grey);
    font-size: 0.95rem;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 4px solid var(--color-accent);
}

.testimonial-card blockquote {
    font-style: italic;
    color: var(--color-dark-grey);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1rem;
}

.testimonial-card blockquote::before {
    content: '“';
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-accent);
    position: absolute;
    left: -10px;
    top: -15px;
    line-height: 1;
    opacity: 0.3;
}

.testimonial-author {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
    margin-top: 1.5rem;
    text-align: right;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.team-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 auto 1.5rem auto;
    font-family: var(--font-heading);
}

.team-name {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.team-title {
    color: var(--color-dark-grey);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.team-bio {
    font-size: 0.85rem;
    color: var(--color-dark-grey);
    line-height: 1.5;
}

/* Insights Section */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.insight-card {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.insight-date {
    font-size: 0.8rem;
    color: var(--color-dark-grey);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

.insight-card h3 {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.insight-card p {
    font-size: 0.95rem;
    color: var(--color-dark-grey);
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--color-accent);
    font-weight: 600;
    display: inline-block;
}

.read-more:hover {
    text-decoration: underline;
    color: darken(var(--color-accent), 10%);
}

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--color-dark-grey);
    margin-bottom: 0.5rem;
}

.contact-email {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-accent);
    display: block;
    margin-bottom: 2rem;
}

.contact-email:hover {
    text-decoration: underline;
    color: darken(var(--color-accent), 10%);
}

.contact-form-wrapper {
    background-color: #fff;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: left;
}

.contact-form-wrapper h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-primary);
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--color-light-grey);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent), 0.2);
}

textarea {
    resize: vertical;
}

#contact-form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.form-success {
    background-color: #e6ffe6;
    color: #338833;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    border: 1px solid #99cc99;
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: #fff;
    padding: 3rem 0;
    font-size: 0.9rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-brand .logo {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 1rem;
    display: block;
}

.footer-brand .logo span {
    color: var(--color-accent);
}

footer p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

footer p a {
    color: rgba(255, 255, 255, 0.8);
}

footer p a:hover {
    color: var(--color-accent);
}

footer h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-nav ul li {
    margin-bottom: 0.5rem;
}

.footer-nav ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.footer-nav ul li a:hover {
    color: var(--color-accent);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: #fff;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.15);
}

.social-icons a:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* Client Portal Modal */
#portal-modal {
    display: none; /* Hidden by default */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#portal-modal.open {
    display: flex;
    opacity: 1;
}

.modal-box {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 450px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

#portal-modal.open .modal-box {
    transform: translateY(0);
}

#modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-dark-grey);
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

#modal-close:hover {
    color: var(--color-primary);
}

.modal-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-primary);
    font-size: 2rem;
}

#portal-form .form-group {
    margin-bottom: 1rem;
}

#portal-form label {
    font-size: 0.9rem;
}

#portal-form input {
    padding: 0.9rem;
    border-color: var(--color-light-grey);
}

#portal-form input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent), 0.2);
}

#portal-submit {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    font-size: 1rem;
}

.login-error {
    color: red;
    font-size: 0.875rem;
    margin-top: 0.8rem;
    text-align: center;
}

/* Scroll Reveal Animations */
.reveal-element {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--delay, 0s);
}

.reveal-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* CRITICAL: Scroll reveal exclusion for modal */
#portal-modal, #portal-modal * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    transition-delay: 0s !important;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive Design */
/* Mobile First (up to 600px) */
nav .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--color-bg);
    padding: 1rem 0;
    position: absolute;
    top: 100%;
    left: 0;
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
}

nav.nav-open .nav-links {
    display: flex;
}

nav .nav-links li {
    text-align: center;
    width: 100%;
    padding: 0.5rem 0;
}

nav .nav-links li:last-child {
    margin-top: 1rem;
}

nav .nav-links li a, #portal-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
}

.hamburger {
    display: flex;
}

nav.nav-open .hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
nav.nav-open .hamburger span:nth-child(2) {
    opacity: 0;
}
nav.nav-open .hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

#hero h1 {
    font-size: 2.5rem;
}

.hero-subheading {
    font-size: 1rem;
}

.hero-ctas {
    flex-direction: column;
    gap: 1rem;
}

.hero-ctas .btn {
    width: 100%;
    max-width: 300px;
}

.stats-grid {
    grid-template-columns: 1fr;
}

.services-grid, .case-studies-grid, .testimonials-grid, .team-grid, .insights-grid, .footer-content {
    grid-template-columns: 1fr;
}

.section-heading {
    font-size: 2rem;
}

.section-subheading {
    font-size: 0.95rem;
}

.trusted-by-strip {
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form-wrapper {
    padding: 1.5rem;
}

/* Medium screens (600px to 960px) */
@media (min-width: 600px) {
    .hamburger {
        display: none; /* Hide hamburger on larger screens */
    }

    nav .nav-links {
        display: flex; /* Show nav links */
        position: static;
        flex-direction: row;
        width: auto;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
    }

    nav .nav-links li {
        padding: 0;
        text-align: left;
    }

    nav .nav-links li:last-child {
        margin-top: 0;
        margin-left: 1.5rem; /* Space before portal button */
    }
    
    .logo {
        flex-grow: 1;
    }

    #hero h1 {
        font-size: 3.2rem;
    }

    .hero-ctas {
        flex-direction: row;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid, .case-studies-grid, .testimonials-grid, .team-grid, .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large screens (960px and up) */
@media (min-width: 960px) {
    #hero h1 {
        font-size: 3.8rem;
    }

    .hero-ctas .btn {
        width: auto;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .services-grid, .case-studies-grid, .testimonials-grid, .team-grid, .insights-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }

    .section-heading {
        font-size: 2.8rem;
    }
}