:root {
    /* Design System: "The Modernist Brochure" */
    --color-background: #FFFFFF;
    --color-surface: #F8F9FA;
    --color-text: #343a40; /* Slightly lighter black for premium feel */
    --color-text-secondary: #495057;
    --color-accent: #8C1C13; /* Burgundy */
    --color-border: #DEE2E6;
    --dot-color: #E0E0E0;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-weight: 400; /* Default body text weight */
    background-color: var(--color-background);
    color: var(--color-text);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle at 1px 1px, var(--dot-color) 1px, transparent 0);
    background-size: 25px 25px;
}
/* When nav is active, prevent scroll and show overlay */
body.nav-active { overflow: hidden; }
body.nav-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    z-index: 998; /* Below mobile nav, above other content */
    transition: opacity 0.4s ease;
    opacity: 1;
    visibility: visible;
}
body::before { /* Initial state for overlay */
    opacity: 0;
    visibility: hidden;
}


.container { width: 90%; max-width: 1100px; margin: 0 auto; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700; /* Ensure headings are bold */
    color: var(--color-text);
    line-height: 1.2;
}
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; margin-bottom: 3rem; text-align: center; }
h3 { font-size: 1.75rem; margin-bottom: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; color: var(--color-text-secondary); max-width: 70ch; }
b, strong { font-weight: 700; color: var(--color-text); }
ul { list-style: none; margin-bottom: 1rem; }

.service-container li {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
}
.service-container li::before {
    content: '•';
    flex-shrink: 0;
    color: var(--color-accent);
    font-weight: 700;
}

/* --- Header & Navigation --- */
.site-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}
.header-wrapper { display: flex; justify-content: space-between; align-items: center; height: 5rem; }
.logo { font-family: var(--font-heading); font-size: 1.75rem; text-decoration: none; color: var(--color-text); display: flex; align-items: center; }
.logo-img { height: 40px; width: auto; }

.desktop-nav { display: none; }

.nav-toggle {
    width: 24px; height: 18px;
    cursor: pointer; position: relative; z-index: 1001;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background-color: var(--color-text); position: absolute; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 8px; }
.nav-toggle span:nth-child(3) { top: 16px; }
.nav-active .nav-toggle span { background-color: #FFF; }
.nav-active .nav-toggle span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.nav-active .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-active .nav-toggle span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* Mobile Navigation - Sidebar Style */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--color-accent);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem 1.5rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    transition: right 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 999;
    overflow-y: auto;
}
.nav-active .mobile-nav {
    right: 0;
}
.mobile-nav ul {
    list-style: none;
    text-align: left;
    width: 100%;
    padding-top: 3rem;
}
.mobile-nav a {
    display: block;
    padding: 0.8rem 0;
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.mobile-nav a:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.mobile-nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #FFF;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}
.mobile-nav-close .material-symbols-outlined {
    font-size: 2.5rem;
}


/* --- Page Layout & Animated Dividers --- */
main { padding-top: 5rem; }
.page-section {
    padding: 5rem 0;
    position: relative;
}
.page-section:not(:first-child)::before { /* Animated divider */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.page-section.is-visible::before {
    width: 75%;
}


/* --- Hero Section --- */
#hero { text-align: center; padding: 6rem 0; }
#hero .eyebrow { text-transform: uppercase; letter-spacing: 2px; font-weight: 700; font-size: 0.9rem; color: var(--color-accent); margin-bottom: 1rem; display: block; }
#hero h1 { font-size: 3.5rem; } /* Reverted margin as company-intro-text moved */


/* --- Philosophy Section --- */
#philosophy .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#philosophy .company-intro-text { /* Specific styling for company intro in philosophy section */
    font-family: var(--font-body); /* Use body font for consistency with eyebrow */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-accent);
    margin-bottom: 1rem; /* Space below the text */
    display: block; /* Ensures it acts like an eyebrow */
}
#philosophy h2 { margin-top: 0; } /* Adjust margin as eyebrow is now above */
#philosophy .philosophy-content { text-align: center; max-width: 800px; margin: 0 auto; } /* Adjusted margin-top */


/* --- Simplified Services Section --- */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 3rem; }
.service-container { background-color: var(--color-surface); border: 1px solid var(--color-border); padding: 2rem; border-radius: 8px; }

/* --- Principles Section --- */
.principles-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 3rem; }
.principle-item { display: flex; align-items: flex-start; gap: 1.5rem; }
.principle-item .material-symbols-outlined { font-size: 2.5rem; color: var(--color-accent); }
.principle-item h4 { font-size: 1.25rem; margin-bottom: 0.25rem; }

/* --- Search Process Section (No Bullets) --- */
.process-list { margin-top: 3rem; max-width: 900px; margin-left: auto; margin-right: auto; }
.process-item { display: flex; gap: 1.5rem; align-items: flex-start; padding: 1.5rem 0; border-bottom: 1px solid var(--color-border); }
.process-item:last-child { border-bottom: none; }
.process-number { font-family: var(--font-heading); font-size: 2rem; color: var(--color-accent); line-height: 1.3; flex-shrink: 0; }
.process-item h4 { font-size: 1.4rem; color: var(--color-text); }
.process-item p { margin-bottom: 0; }

/* --- Founder Section --- */
#founder .founder-content { max-width: 900px; margin: 3rem auto 0 auto; text-align: center;}
#founder .founder-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    border: 4px solid var(--color-accent);
}
#founder h3 { margin-bottom: 0.5rem; }
#founder .founder-title { font-family: var(--font-body); color: var(--color-text-secondary); font-size: 1.5rem; }
#founder p { text-align: left; margin-left: auto; margin-right: auto; }

/* --- Client Logo Grid --- */
.client-logo-container {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 3rem;
    border-radius: 8px;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.client-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 2rem;
    align-items: center;
    width: 100%;
    max-width: 900px;
}
.client-logo { filter: grayscale(100%) opacity(0.7); transition: filter 0.3s ease, opacity 0.3s ease; }
.client-logo:hover { filter: grayscale(0%) opacity(1); }
.client-logo img { width: 100%; height: auto; object-fit: contain; }

/* --- Contact Form --- */
#contact-form-container { }
#contact-form-container > h2 { text-align: center; }
#contact-form-container > p { max-width: 700px; margin-left: auto; margin-right: auto; text-align: center; margin-bottom: 3rem; }

#contact-form {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 700; margin-bottom: 0.5rem; font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--color-surface);
    color: var(--color-text);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(140, 28, 19, 0.2);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.submit-button-wrapper { text-align: center; }
.submit-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: #fff;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.submit-button:hover { background-color: #6a1009; }
.form-status { margin-top: 1.5rem; text-align: center; font-weight: 700; }

/* --- Footer --- */
.site-footer {
    padding: 4rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.footer-bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-social-links {
    margin-top: 0.5rem;
}
.footer-social-links p {
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 700;
}
.footer-social-links a {
    display: inline-block;
    margin: 0 0.5rem;
}
.footer-social-links img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    filter: grayscale(1) brightness(0.7);
    transition: filter 0.3s ease;
}
.footer-social-links a:hover img {
    filter: grayscale(0) brightness(1);
}

/* --- Desktop & Tablet Styles --- */
@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .desktop-nav { display: block; }
    .desktop-nav ul { list-style: none; display: flex; gap: 2rem; }
    .desktop-nav a { text-decoration: none; color: var(--color-text-secondary); font-size: 0.9rem; font-weight: 700; position: relative; padding-bottom: 0.25rem; transition: color 0.3s ease; }
    .desktop-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--color-accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
    .desktop-nav a:hover, .desktop-nav a.active { color: var(--color-accent); }
    .desktop-nav a.active::after { transform: scaleX(1); }

    h1 { font-size: 4.5rem; }
    h2 { font-size: 3rem; }

    /* Philosophy section specific adjustments for desktop */
    #philosophy .company-intro-text {
        font-size: 1rem; /* Adjusted for desktop view to match eyebrow */
        margin-bottom: 1rem;
    }

    .services-grid { grid-template-columns: 1fr 1fr; }
    .principles-grid { grid-template-columns: 1fr 1fr; }
    /* Centering and adjusting columns for client logos */
    .client-logo-grid {
        grid-template-columns: repeat(6, 1fr);
        justify-items: center;
        gap: 1.5rem;
    }

    /* Footer adjustments for desktop */
    .site-footer .container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        gap: 0;
        margin-top: 1rem;
    }

    .footer-social-links {
        margin-top: 0;
    }
}