/* Modern Geometric Font Stack */
/* v3 */
:root {
    --primary-green: #1b3022;
    --accent-green: #2d5a27;
    --snow-white: #ffffff;
    --fresh-powder: #f4f7f6;
    --ice-grey: #d1d9d9;
    --text: #2c3e50;
    --font-family: "URW Gothic", "Avant Garde", Avantgarde, "Century Gothic", AppleGothic, sans-serif;
}

* { box-sizing: border-box; } 

body {
    font-family: var(--font-family);
    margin: 0;
    line-height: 1.5; /* Increased from 1.1 for better mobile readability */
    color: var(--text);
    overflow-x: hidden;
    background-color: var(--fresh-powder);
}

header {
    background: linear-gradient(rgba(27, 48, 34, 0.4), rgba(27, 48, 34, 0.6)),
                url('../img/background_day.webp') center/cover no-repeat;
    height: 55vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--snow-white);
    text-align: center;
    padding: 0 20px;
    border-bottom: 8px solid var(--primary-green);
}

header h1 {
    /* Fixed clamp order: MIN (smallest), PREFERRED, MAX (largest) */
    /* font-size: clamp(1.8rem, 8vw, 3.5rem); */
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: -1px;
    padding: 0 10px;
}

header .slide-left {
    padding: 0 20px;
    font-size: 2.5rem; 
    font-weight: 400;
}

.header-logo {
    position: absolute;
    top: 0;
    left: 0;
    margin: 20px;   /* this gives you breathing room from the edges */
    height: 70px;
    width: auto;
    z-index: 10;
}


/* Animate logo in when header enters view */
.header-logo.active {
    opacity: 1;
    transform: translateY(0);
}


section {
    padding: 10px 10px;
    max-width: 1400px;
    margin: auto; 
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    font-size: 1.4rem;
}

/* Slide Animations */
.slide-left { opacity: 0; transform: translateX(-80px); transition: all 0.9s ease-out; }
.slide-right { opacity: 0; transform: translateX(80px); transition: all 0.9s ease-out; }
.slide-up { opacity: 0; transform: translateY(80px); transition: all 0.9s ease-out; }
.active { opacity: 1; transform: translateX(0) translateY(0); }

.feature-card {
    background: var(--snow-white);
    padding: 45px;
    border-radius: 4px;
    border-top: 6px solid var(--accent-green);
    box-shadow: 0 15px 35px rgba(27, 48, 34, 0.08);
}

.feature-card h3 {
    margin-top: 0;
    color: var(--primary-green);
    font-size: 1.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cards with background images */
.card-with-image {
    padding: 0 !important;
    overflow: hidden;
    position: relative;
    height: 300px;
}

.card-overlay-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.overlay-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(27, 48, 34, 0.9) 0%, rgba(27, 48, 34, 0.4) 60%, transparent 100%);
    color: var(--snow-white);
}

.overlay-content h3 {
    color: var(--snow-white) !important;
    margin: 0 0 5px 0;
}

.overlay-content p {
    margin: 0;
}

.card-with-image:hover .overlay-img {
    transform: scale(1.05);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Contact Form */
.contact-container {
    background: var(--primary-green);
    color: var(--snow-white);
    padding: 70px 50px;
    border-radius: 4px;
    margin-top: 50px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: auto;
}

input, textarea {
    padding: 16px;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: white;
    font-family: var(--font-family);
}

input::placeholder, textarea::placeholder {
    color: var(--ice-grey);
}

button {
    background: var(--snow-white);
    color: var(--primary-green);
    padding: 18px;
    border: none;
    border-radius: 2px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--ice-grey);
    transform: translateY(-3px);
}

footer {
    text-align: center;
    padding: 80px 20px;
    opacity: 0.8; 
    font-size: 0.85rem; 
    margin: 10px auto;
    background: var(--ice-grey);
    color: var(--primary-green);
}
/* Footer Navigation Styling */
.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    font-family: var(--font-family);
}

.legal-link {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase; /* Matches your header style */
    transition: all 0.3s ease;
    opacity: 0.8;
}

.legal-link:hover {
    color: var(--snow-white); 
    opacity: 1;
    transform: translateY(-1px);
}

/* Subtle dot separator */
.dot {
    width: 4px;
    height: 4px;
    background-color: var(--accent-green);
    border-radius: 50%;
    opacity: 0.5;
}

.copyright {
    font-size: 0.8rem;
    color: var(--ice-grey);
    margin-top: 10px;
}

/* Specific tweaks for legal readability */
    .legal-content {
        max-width: 1200px;
        margin: 40px auto;
        padding: 20px;
        background: #fff;
        color: #2c3e50;
        line-height: 1.6;
    }
    .legal-content h2 { color: var(--primary-green); margin-top: 30px; border-bottom: 1px solid var(--ice-grey); }
    .legal-content h3 { color: var(--accent-green); margin-top: 20px; }
    .legal-content ul { margin-bottom: 20px; }
    
    @media print {
        header, footer { display: none; }
        .legal-content { margin: 0; padding: 0; max-width: 100%; }
        body { background: white; }
    }


/* --- New Section Typography & Layout --- */

section h2 {
    font-size: 2.4rem;
    color: var(--primary-green);
    text-align: center;
    margin: 20px auto 20px auto;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.contact-container h2 {
    color: var(--snow-white);
}

section h3 {
    font-size: 1.6rem;
    color: var(--accent-green);
    margin-bottom: 10px;
    font-weight: 600;
}

.intro-text {
    max-width: 1400px;
    margin: 0 auto 40px auto;
    font-size: 1.35rem;
    text-align: center;
    line-height: 1.6;
}

/* Lists inside Why/How sections */
.why-list,
.how-list {
    max-width: 900px;
    margin: 0 auto;
    padding-left: 20px;
    font-size: 1.2rem;
    line-height: 1.6;
}

.why-list ul,
.how-list ul {
    padding-left: 20px; /* bullet indent */
}

/* Slight spacing between major sections */
section {
    padding-top: 10px;
    padding-bottom: 10px;
}


























/* --- COMPREHENSIVE MOBILE PORTRAIT FIX --- */
@media (max-width: 850px) {

    /* 1. Prevent global horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
    }

    /* 2. LOGO: Small and out of the way */
    .header-logo {
        height: 35px !important; 
        width: auto !important;
        top: 10px !important;
        left: 10px !important;
        position: absolute !important;
        margin: 0 !important;
    }

    /* 3. HEADER: Fix centering and spill */
    header {
        height: auto !important;
        min-height: 50vh !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        /* Add side padding so text doesn't touch screen edges */
        padding: 60px 20px 40px 20px !important; 
        box-sizing: border-box !important;
    }

    header .slide-left {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        /* Force remove animation offsets that cause spilling */
        transform: none !important; 
        opacity: 1 !important;
        display: block !important;
    }

    header h1 {
        font-size: 2.4rem !important; /* Slightly smaller for narrow screens */
        line-height: 1.1 !important;
        margin: 0 auto 10px auto !important;
        width: 100% !important;
        overflow-wrap: break-word; /* Prevents long words from spilling */
    }

    header p {
        font-size: 1.5rem !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    /* 4. SECTIONS & GRID: Center tiles and prevent spill */
    section#solution, section#contact {
        /* Side padding is vital to prevent edge-spilling */
        padding: 40px 20px !important; 
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .feature-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        width: 100% !important;
        margin: 20px 0 0 0 !important;
        padding: 0 !important;
    }

    .feature-card {
        margin: 0 !important; /* Removes all margins to prevent spill */
        width: 100% !important;
        max-width: 100% !important;
        height: 260px !important; /* Adjusted height for mobile ratio */
        box-sizing: border-box !important;
        /* Remove animations that shift position */
        transform: none !important;
        opacity: 1 !important;
        border-radius: 8px !important;
    }

    .overlay-content {
        padding: 20px !important;
    }

    .overlay-content h3 {
        font-size: 1.4rem !important;
        margin-bottom: 5px !important;
    }

    .overlay-content p {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
    }

    /* 5. Contact Form cleanup */
    .contact-container {
        padding: 40px 20px !important;
        margin-top: 20px !important;
    }
    .footer-nav {
        flex-direction: column;
        gap: 12px;
    }
    .dot {
        display: none;
    }
    section h2 {
        font-size: 1.9rem !important;
        margin-top: 40px !important;
    }

    section h3 {
        font-size: 1.3rem !important;
    }

    .intro-text {
        font-size: 1.15rem !important;
        padding: 0 10px !important;
    }

    .why-list ul,
    .how-list ul {
        font-size: 1.05rem !important;
        padding-left: 18px !important;
    }
}


/* --- LANDSCAPE MOBILE FIX --- */
@media (max-height: 500px) and (orientation: landscape) {
    /* Shrink the logo even more because height is very limited in landscape */
    .header-logo {
        height: 30px !important; 
        top: 10px !important;
        left: 10px !important;
        position: absolute !important;
    }

    /* Reduce header height so it doesn't take up the whole screen */
    header {
        height: 70vh !important;
        padding: 40px 20px !important;
    }

    header h1 {
        font-size: 2.1rem !important; /* Keep text small so it doesn't spill */
        margin-top: 20px !important;
    }

    /* Hide the sub-text (p tag) if it makes the header too crowded */
    header p {
        font-size: 1rem !important;
        display: none; /* Optional: hides the tagline to save space */
    }
}