/*
=====================================================
    Theme: Vivid
    Author: Maxwell Murray Counseling
    Version: 2.0
=====================================================
*/

/* 1. Variables & Root Styles */
:root {
    --primary-blue: #0A1931;
    --text-color: #5A6474;
    --heading-color: #183B56;
    --bg-color: #FFFFFF;
    --surface-color: #F7F9FC;
    --border-color: #E8EEF4;
    --accent-start: #4A00E0;
    --accent-end: #8E2DE2;
    --gradient: linear-gradient(90deg, var(--accent-start) 0%, var(--accent-end) 100%);
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
    --container-width: 1100px;
    --section-padding: 100px 0;
    --shadow: 0 10px 30px rgba(24, 59, 86, 0.07);
    --shadow-sm: 0 4px 15px rgba(24, 59, 86, 0.05);
}

/* 2. Base & Reset Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 1.05rem;
}

body.nav-open {
    overflow: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-weight: 800;
    line-height: 1.3;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 4.2rem);
}

h2 {
    font-size: clamp(2.2rem, 5vw, 3rem);
}

h3 {
    font-size: 1.6rem;
    margin-bottom: 2rem;
}

h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

p {
    max-width: 65ch;
}

a {
    color: var(--heading-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-start);
}

ul {
    list-style: none;
    padding: 0;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-padding {
    padding: var(--section-padding);
}

.text-center {
    text-align: center;
}

.text-center p,
.text-center h2 {
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    margin-bottom: 3rem;
}

.subtitle {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 60ch;
}

/* 3. Header & Navigation */
#main-header {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    font-size: 1.6rem;
    font-family: var(--font-heading);
    color: var(--heading-color);
}

.logo-link img {
    height: 80px;
    filter: brightness(0) invert(0);
}

#desktop-nav {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-cta {
    padding: 0.6rem 1.4rem;
    border-radius: 5px;
    color: white;
    background: var(--gradient);
    transition: all var(--transition-speed);
}

.nav-cta:hover,
.nav-cta.active {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Mobile Nav */
#hamburger-btn {
    background: none;
    border: none;
    z-index: 1002;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
}

#hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--heading-color);
    transition: all var(--transition-speed);
    position: absolute;
}

#hamburger-btn span:first-child {
    top: 0;
}

#hamburger-btn span:last-child {
    bottom: 0;
}

body.nav-open #hamburger-btn {
    position: fixed;
    right: 5%;
}

body.nav-open #hamburger-btn span:first-of-type {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

body.nav-open #hamburger-btn span:last-of-type {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

#mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

body.nav-open #mobile-nav {
    opacity: 1;
    visibility: visible;
}

#mobile-nav .mobile-nav-links li {
    margin: 1.5rem 0;
}

#mobile-nav .mobile-nav-link {
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-family: var(--font-heading);
}

/* 4. Hero & CTA Button */
#hero {
    padding: 8rem 0;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 5px;
    color: white;
    background: var(--gradient);
    transition: all var(--transition-speed);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* 5. Clients Section */
#clients {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.clients-title {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.client-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem 4rem;
}

.client-grid span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: #9DA8B6;
}

/* 6. Services Section */
index.html#services {
    background-color: var(--surface-color);
}

.service-pillar {
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-color);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 7. How We Work Section */
.how-we-work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.how-we-work-content li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="%238E2DE2"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>') no-repeat left center;
    background-size: 20px;
}

.how-we-work-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-shape {
    width: 100%;
    max-width: 350px;
    height: 350px;
    background: var(--gradient);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

/* 8. Results Section */
index.html#results {
    background-color: var(--surface-color);
}

.results-card {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.results-summary {
    margin-bottom: 3rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.result-metric {
    display: block;
    font-size: 4rem;
    font-family: var(--font-heading);
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

/* 9. Principles Section */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.principle-card {
    background-color: var(--surface-color);
    padding: 2.5rem;
    text-align: center;
    border-radius: 8px;
}

/* 10. FAQ Section */
#faq {
    background-color: var(--surface-color);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-color);
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    display: block;
    width: 100%;
    padding: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading-color);
    text-align: left;
    cursor: pointer;
    border: none;
    background: none;
    position: relative;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--text-color);
    transition: transform 0.2s;
}

details[open] .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
}

/* 11. Final CTA Section */
#final-cta {
    padding: var(--section-padding);
    background: var(--gradient);
    color: white;
}

#final-cta h2,
#final-cta .lead {
    color: white;
}

#final-cta .cta-button {
    background: white;
    color: var(--accent-start);
}

/* 12. Page & Legal Styles */
.page-header {
    padding: 6rem 0;
    background-color: var(--surface-color);
}

.legal-content .container {
    max-width: 800px;
}

.legal-content h2 {
    margin: 2rem 0 1rem;
}

.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    border-radius: 4px;
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-start);
}

/* 13. Footer */
#main-footer {
    padding: 60px 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
}

.footer-col {
    font-size: 0.95rem;
}

.footer-col .logo-link {
    margin-bottom: 0.5rem;
    display: block;
}

.footer-col p {
    font-size: 0.95rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.9rem;
}

/* 14. Responsive Design */
@media (min-width: 992px) {
    #desktop-nav {
        display: block;
    }

    #hamburger-btn {
        display: none;
    }
}

@media (max-width: 991px) {
    #desktop-nav {
        display: none;
    }

    #hamburger-btn {
        display: block;
    }
}

@media (max-width: 768px) {

    .services-grid,
    .principles-grid,
    .results-grid,
    .how-we-work-grid,
    .form-row,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .how-we-work-visual {
        display: none;
    }

    .footer-grid {
        text-align: center;
    }

    .footer-col .logo-link {
        display: inline-block;
    }
}