/* ============================================
   MERCER COUNTY ABSTRACT COMPANY
   Classic & Elegant — Teal + Slate + Gold
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #2D3748;
    background-color: #F7F5F2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.25;
    color: #1A2E35;
}

a {
    color: #0F4C5C;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #D4A853;
}

ul {
    list-style: none;
}

address {
    font-style: normal;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #0F4C5C;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1000;
    border-radius: 0 0 6px 6px;
    font-size: 0.875rem;
}

.skip-link:focus {
    top: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- HEADER ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(247, 245, 242, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 76, 92, 0.08);
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 24px rgba(26, 46, 53, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-primary {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1A2E35;
    letter-spacing: -0.01em;
}

.logo-secondary {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: #0F4C5C;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logo-light .logo-primary { color: #F7F5F2; }
.logo-light .logo-secondary { color: rgba(247, 245, 242, 0.7); }

/* Nav */
.nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-list a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #2D3748;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.nav-list a:hover {
    color: #0F4C5C;
    background: rgba(15, 76, 92, 0.06);
}

.nav-cta {
    background: #0F4C5C !important;
    color: #F7F5F2 !important;
    border-radius: 6px;
    padding: 0.5rem 1rem !important;
    margin-left: 0.5rem;
    transition: background 0.2s !important;
}

.nav-cta:hover {
    background: #1A3A45 !important;
}

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

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #1A2E35;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #0F4C5C;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 42, 52, 0.92) 0%,
        rgba(15, 76, 92, 0.85) 50%,
        rgba(26, 58, 69, 0.88) 100%
    );
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4A853' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 76px;
    padding-bottom: 8rem;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 168, 83, 0.15);
    border: 1px solid rgba(212, 168, 83, 0.35);
    color: #D4A853;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.75rem;
}

.hero-headline {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 600;
    color: #F7F5F2;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-headline .accent {
    color: #D4A853;
    font-style: italic;
    font-weight: 500;
}

.hero-sub {
    font-size: 1.125rem;
    color: rgba(247, 245, 242, 0.75);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Stats */
.hero-stats {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    gap: 0;
    padding: 0 1.5rem;
    pointer-events: none;
}

.stat-card {
    pointer-events: auto;
    background: rgba(247, 245, 242, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(247, 245, 242, 0.15);
    padding: 1.5rem 2rem;
    min-width: 180px;
    text-align: center;
}

.stat-card:not(:last-child) {
    border-right: none;
}

.stat-number {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: #D4A853;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(247, 245, 242, 0.7);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.5;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.8125rem 1.75rem;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: #D4A853;
    color: #1A2E35;
    border-color: #D4A853;
}

.btn-primary:hover {
    background: #C4973F;
    border-color: #C4973F;
    color: #1A2E35;
}

.btn-outline-light {
    background: transparent;
    color: #F7F5F2;
    border-color: rgba(247, 245, 242, 0.4);
}

.btn-outline-light:hover {
    background: rgba(247, 245, 242, 0.1);
    border-color: #F7F5F2;
    color: #F7F5F2;
}

.btn-outline-dark {
    background: transparent;
    color: #1A2E35;
    border-color: rgba(26, 46, 53, 0.25);
}

.btn-outline-dark:hover {
    border-color: #0F4C5C;
    color: #0F4C5C;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* ---------- SECTIONS ---------- */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.5rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0F4C5C;
    margin-bottom: 0.75rem;
    position: relative;
    padding: 0 0.5rem;
}

.section-tag::before,
.section-tag::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 24px;
    height: 1px;
    background: #D4A853;
}

.section-tag::before { right: 100%; }
.section-tag::after { left: 100%; }

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 600;
    color: #1A2E35;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-title .accent {
    color: #0F4C5C;
    font-style: italic;
    font-weight: 500;
}

.section-sub {
    font-size: 1.0625rem;
    color: #5A6B7A;
    line-height: 1.75;
}

/* ---------- SERVICES ---------- */
.services {
    background: #F7F5F2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: #fff;
    border: 1px solid rgba(15, 76, 92, 0.08);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0F4C5C, #D4A853);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(15, 76, 92, 0.1);
    border-color: transparent;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 76, 92, 0.06);
    border-radius: 12px;
    color: #0F4C5C;
    margin-bottom: 1.25rem;
    transition: background 0.3s;
}

.service-card:hover .service-icon {
    background: #0F4C5C;
    color: #D4A853;
}

.service-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1A2E35;
    margin-bottom: 0.625rem;
}

.service-desc {
    font-size: 0.9375rem;
    color: #5A6B7A;
    line-height: 1.7;
}

/* ---------- ABOUT ---------- */
.about {
    background: #fff;
    padding: 6rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-img-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 76, 92, 0.12);
}

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

.about-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    height: 200px;
    background: #0F4C5C;
    border-radius: 16px;
    z-index: -1;
    opacity: 0.08;
}

.about-content .section-tag {
    text-align: left;
}

.about-content .section-tag::before {
    display: none;
}

.about-body {
    font-size: 1rem;
    color: #5A6B7A;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
    margin: 2rem 0;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1A2E35;
}

/* ---------- AREAS ---------- */
.areas {
    background: #F7F5F2;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.area-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid rgba(15, 76, 92, 0.08);
    border-radius: 10px;
    transition: all 0.25s ease;
}

.area-item:hover {
    border-color: #0F4C5C;
    box-shadow: 0 4px 16px rgba(15, 76, 92, 0.08);
}

.area-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1A2E35;
    margin-bottom: 0.25rem;
}

.area-desc {
    font-size: 0.8125rem;
    color: #5A6B7A;
}

.areas-map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 76, 92, 0.08);
}

/* ---------- CTA BANNER ---------- */
.cta-banner {
    background: linear-gradient(135deg, #0F4C5C 0%, #1A3A45 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23D4A853' fill-opacity='1' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}

.cta-inner {
    position: relative;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.cta-headline {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 600;
    color: #F7F5F2;
    margin-bottom: 1rem;
}

.cta-headline .accent {
    color: #D4A853;
    font-style: italic;
    font-weight: 500;
}

.cta-body {
    font-size: 1.0625rem;
    color: rgba(247, 245, 242, 0.7);
    margin-bottom: 2rem;
    line-height: 1.75;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ---------- CONTACT ---------- */
.contact {
    background: #fff;
    padding: 6rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info .section-tag {
    text-align: left;
}

.contact-info .section-tag::before {
    display: none;
}

.contact-intro {
    font-size: 1rem;
    color: #5A6B7A;
    line-height: 1.75;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 76, 92, 0.06);
    border-radius: 10px;
    color: #0F4C5C;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0F4C5C;
    margin-bottom: 0.25rem;
}

.contact-item address,
.contact-item span {
    font-size: 0.9375rem;
    color: #2D3748;
    line-height: 1.6;
}

.contact-item a {
    color: #2D3748;
}

.contact-item a:hover {
    color: #D4A853;
}

/* Form */
.contact-form-wrap {
    background: #F7F5F2;
    border: 1px solid rgba(15, 76, 92, 0.08);
    border-radius: 16px;
    padding: 2.5rem;
}

.form-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1A2E35;
    margin-bottom: 0.375rem;
}

.form-note {
    font-size: 0.875rem;
    color: #5A6B7A;
    margin-bottom: 1.75rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1A2E35;
    margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: #1A2E35;
    background: #fff;
    border: 1.5px solid rgba(15, 76, 92, 0.15);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9AA8B5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0F4C5C;
    box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.08);
}

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

.form-success {
    text-align: center;
    padding: 2rem;
}

.form-success svg {
    margin: 0 auto 1rem;
}

.form-success h4 {
    font-size: 1.25rem;
    color: #1A2E35;
    margin-bottom: 0.5rem;
}

.form-success p {
    font-size: 0.9375rem;
    color: #5A6B7A;
}

/* ---------- FOOTER ---------- */
.site-footer {
    background: #1A2E35;
    color: rgba(247, 245, 242, 0.7);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(247, 245, 242, 0.08);
}

.footer-desc {
    font-size: 0.875rem;
    line-height: 1.75;
    margin-top: 1rem;
    max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #D4A853;
    margin-bottom: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: rgba(247, 245, 242, 0.6);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #D4A853;
}

.footer-contact address {
    font-size: 0.875rem;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.footer-contact p {
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

.footer-contact a {
    color: rgba(247, 245, 242, 0.7);
}

.footer-contact a:hover {
    color: #D4A853;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem 0;
    font-size: 0.8125rem;
    color: rgba(247, 245, 242, 0.4);
}

.footer-bottom a {
    color: rgba(247, 245, 242, 0.4);
}

.footer-bottom a:hover {
    color: #D4A853;
}

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .stat-card {
        min-width: 150px;
        padding: 1.25rem 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-list {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        background: rgba(247, 245, 242, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        border-bottom: 1px solid rgba(15, 76, 92, 0.08);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.35s ease, opacity 0.35s ease;
        pointer-events: none;
    }

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

    .nav-list a {
        padding: 0.75rem 0;
        border-radius: 0;
        border-bottom: 1px solid rgba(15, 76, 92, 0.06);
        width: 100%;
    }

    .nav-cta {
        margin-left: 0 !important;
        margin-top: 0.5rem;
        text-align: center;
        border-bottom: none !important;
    }

    .hero {
        min-height: auto;
        padding: 76px 0 8rem;
    }

    .hero-content {
        padding-bottom: 6rem;
    }

    .hero-stats {
        position: relative;
        justify-content: stretch;
        flex-direction: column;
        margin-top: 3rem;
    }

    .stat-card {
        border-right: none !important;
        border-bottom: 1px solid rgba(247, 245, 242, 0.15);
        padding: 1rem 1.5rem;
    }

    .stat-card:last-child {
        border-bottom: none;
    }

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

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-img {
        height: 320px;
    }

    .about-values {
        grid-template-columns: 1fr;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.125rem;
    }

    .hero-headline {
        font-size: 1.875rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

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

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .contact-form-wrap {
        padding: 1.5rem;
    }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .area-item {
        transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }

    html {
        scroll-behavior: auto;
    }
}
