/* ===========================
   Matherne's Consulting Inc
   =========================== */

:root {
    --primary: #1a2332;
    --primary-light: #243044;
    --accent: #4a90d9;
    --accent-hover: #3a7bc8;
    --bg-light: #f8f6f3;
    --bg-white: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --text-on-dark: #f0f0f0;
    --border: #e0ddd8;
    --shadow: rgba(26, 35, 50, 0.08);
    --radius: 8px;
    --nav-height: 72px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--primary);
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 12px var(--shadow);
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bg-white);
    letter-spacing: -0.01em;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-on-dark);
    font-size: 0.925rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

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

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

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

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--bg-white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ---- Hero ---- */
.hero {
    margin-top: var(--nav-height);
    padding: 100px 0 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    text-align: center;
    color: var(--bg-white);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

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

.hero p {
    font-size: 1.2rem;
    color: var(--text-on-dark);
    max-width: 560px;
    margin: 0 auto 36px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    border: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
}

.btn-outline:hover {
    background: var(--bg-white);
    color: var(--primary);
}

/* ---- Sections (shared) ---- */
section {
    padding: 80px 0;
}

.section-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 580px;
    margin-bottom: 48px;
}

.section-header {
    text-align: center;
}

.section-header .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* ---- Services ---- */
.services {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-white);
    padding: 36px 28px;
    border-radius: var(--radius);
    box-shadow: 0 2px 16px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(26, 35, 50, 0.12);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.925rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ---- About ---- */
.about .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.about-content .section-subtitle {
    margin-bottom: 24px;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 28px;
    line-height: 1.7;
}

/* ---- Contact ---- */
.contact {
    background: var(--bg-light);
}

.contact .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg-white);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-status {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.form-status-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.form-status-error {
    background: #fce4ec;
    color: #c62828;
}

.contact-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 28px;
    line-height: 1.7;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.contact-detail-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--primary);
    color: var(--bg-white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.contact-detail div p {
    margin-bottom: 0;
}

.contact-detail div p:first-child {
    font-weight: 600;
    color: var(--primary);
}

/* ---- Footer ---- */
.footer {
    background: var(--primary);
    color: var(--text-on-dark);
    padding: 48px 0 32px;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-size: 1.1rem;
    font-weight: 700;
}

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

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-on-dark);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .hero {
        padding: 64px 0 56px;
    }

    .hero h1 {
        font-size: 2.1rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    section {
        padding: 56px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

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

    .about .container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-image {
        order: -1;
    }

    .contact .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}
