/*
==================================================
    Digital Marketing Agency Stylesheet (V4 - Organic)
==================================================
    - 1. Global Styles & Variables
    - 2. Typography
    - 3. Layout & Helpers
    - 4. Header & Navigation
    - 5. Footer
    - 6. Buttons & Forms
    - 7. Hero Section
    - 8. Services Section
    - 9. Funnel Section
    - 10. Path Section (SVG)
    - 11. Testimonials Section
    - 12. CTA Section
    - 13. Contact & Legal Pages
    - 14. Animations & Keyframes
    - 15. Responsive Design
==================================================
*/

/* 1. Global Styles & Variables
-------------------------------------------------- */
:root {
    --bg-off-white: #F9F7F3;
    --dark-green: #143A3A;
    --medium-green: #4A6C6C;
    --light-green: #B2C9C9;
    --charcoal: #333333;
    --accent-terracotta: #D98C72;

    --font-heading: 'Lora', serif;
    --font-body: 'Nunito Sans', sans-serif;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-off-white);
    color: var(--charcoal);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 2. Typography
-------------------------------------------------- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--dark-green);
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: #555;
    max-width: 65ch;
}

a {
    text-decoration: none;
    color: var(--medium-green);
    font-weight: 600;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-green);
}

/* 3. Layout & Helpers
-------------------------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 120px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title p {
    max-width: 600px;
    margin: 0.5rem auto 0;
    font-size: 1.1rem;
}

/* 4. Header & Navigation
-------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    background-color: rgba(249, 247, 243, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo img {
    height: 50px;
    filter: brightness(0);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--dark-green);
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--dark-green);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-green);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* 5. Footer
-------------------------------------------------- */
.site-footer {
    background-color: var(--dark-green);
    color: var(--bg-off-white);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-column h4 {
    color: var(--light-green);
    font-family: var(--font-body);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-column p,
.footer-column a {
    color: var(--light-green);
}

.footer-column a:hover {
    color: var(--bg-off-white);
}

.footer-column ul li {
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--medium-green);
    font-size: 0.9rem;
}

/* 6. Buttons & Forms
-------------------------------------------------- */
.cta-button {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--accent-terracotta);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--accent-terracotta);
    color: #fff;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--accent-terracotta);
}

.header-cta {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-green);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-green);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--medium-green);
    box-shadow: 0 0 0 3px rgba(74, 108, 108, 0.2);
}

.error-message {
    color: #d9534f;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

#form-status {
    margin-top: 1rem;
    font-weight: 600;
}

/* 7. Hero Section
-------------------------------------------------- */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero-text h1 {
    font-size: 3.8rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin: 1.5rem 0 2.5rem;
}

.hero-image-wrapper {
    position: relative;
    height: 500px;
}

.hero-image {
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1521791136064-7986c2920216?q=80&w=2069') no-repeat center center;
    background-size: cover;
    border-radius: 12px;
    transform: scale(1);
    transition: transform 0.6s ease;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.05);
}

/* 8. Services Section
-------------------------------------------------- */
.services-section {
    background-color: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.07);
    border-color: transparent;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* 9. Funnel Section
-------------------------------------------------- */
.funnel-wrapper {
    max-width: 900px;
    margin: auto;
}

.funnel-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
}

.funnel-stage {
    background: var(--light-green);
    color: var(--dark-green);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    clip-path: polygon(10% 0, 90% 0, 100% 100%, 0% 100%);
}

.funnel-stage:hover,
.funnel-stage.active {
    background: var(--dark-green);
    color: #fff;
    transform: scale(1.05);
}

.funnel-stage:nth-child(1) {
    width: 350px;
}

.funnel-stage:nth-child(2) {
    width: 280px;
    margin-top: -1px;
}

.funnel-stage:nth-child(3) {
    width: 210px;
    margin-top: -1px;
}

.funnel-panel {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s;
}

.funnel-panel.active {
    display: block;
}

.funnel-panel ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.funnel-panel li {
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--light-green);
    font-weight: 600;
    font-size: 0.9rem;
}

/* 10. Path Section (SVG)
-------------------------------------------------- */
.path-section {
    background: var(--dark-green);
    color: var(--bg-off-white);
}

.path-section h2,
.path-section p {
    color: var(--bg-off-white);
}

.path-wrapper {
    position: relative;
    max-width: 800px;
    margin: auto;
}

.path-svg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 100%;
    z-index: 1;
}

#svg-path {
    stroke: var(--accent-terracotta);
}

.path-steps {
    position: relative;
    z-index: 2;
}

.step-item {
    max-width: 350px;
    margin-bottom: 8rem;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-item:nth-child(even) {
    margin-left: auto;
    text-align: right;
}

/* 11. Testimonials Section
-------------------------------------------------- */
.testimonial-content {
    text-align: center;
    max-width: 800px;
    margin: auto;
}

.testimonial-quote {
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.5;
    color: var(--dark-green);
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-quote::before {
    content: '“';
    position: absolute;
    top: -1rem;
    left: -2rem;
    font-size: 5rem;
    color: var(--light-green);
    z-index: -1;
}

.testimonial-author h4 {
    margin: 0;
}

.testimonial-author span {
    color: var(--medium-green);
}

/* 12. CTA Section
-------------------------------------------------- */
.cta-section {
    position: relative;
    padding: 120px 0;
    text-align: center;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1454425064876-2a89b039b342?q=80&w=2070') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    opacity: 0.1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content p {
    margin: 1rem auto 2.5rem;
}

/* 13. Contact & Legal Pages
-------------------------------------------------- */
.contact-page-section,
.legal-page-section {
    padding-top: calc(var(--header-height) + 100px);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.legal-content {
    max-width: 800px;
}

.legal-content h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--light-green);
    padding-bottom: 0.5rem;
}

.legal-content ul {
    padding-left: 1.5rem;
}

/* 14. Animations & Keyframes
-------------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-load {
    animation: fadeIn 0.8s ease-out 0.2s both;
    opacity: 0;
}

.animate-on-load:nth-child(2) {
    animation-delay: 0.4s;
}

.animate-on-load:nth-child(3) {
    animation-delay: 0.6s;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 15. Responsive Design
-------------------------------------------------- */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.4rem;
    }

    .hero-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-text {
        text-align: center;
    }

    .hero-image-wrapper {
        height: 350px;
        margin-top: 2rem;
    }

    .path-svg {
        display: none;
    }

    .step-item,
    .step-item:nth-child(even) {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    h1 {
        font-size: 2.5rem;
    }

    section {
        padding: 80px 0;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--bg-off-white);
        width: 100%;
        height: calc(100vh - var(--header-height));
        text-align: center;
        transition: 0.3s;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
        padding: 1.5rem 0;
        border-bottom: 1px solid #eee;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .header-cta {
        display: none;
    }
}