/* ============================================
   McIver Home Inspection — Custom Styles
   Clean minimalist · Forest green + off-white
   ============================================ */

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

:root {
    --green-900: #0d1f14;
    --green-800: #1a3a2a;
    --green-700: #234d38;
    --green-600: #2d6147;
    --green-500: #3a7d5c;
    --green-400: #5a9e7a;
    --green-100: #d4e8dc;
    --green-50:  #eef5f0;
    --cream:     #faf9f6;
    --cream-dark:#f3f1ec;
    --white:     #ffffff;
    --text-dark: #1a1a18;
    --text-mid:  #3d3d38;
    --text-light:#6b6b64;
    --text-faint:#9a9a92;
    --line:      rgba(26, 58, 42, 0.12);
    --line-strong: rgba(26, 58, 42, 0.25);
    
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    
    --nav-h: 72px;
    --container: 1200px;
    --gutter: 24px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-dark);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Thin Line Accent ---------- */
.thin-line {
    display: block;
    width: 48px;
    height: 1px;
    background: var(--green-500);
    margin-bottom: 20px;
}

/* ---------- Section Eyebrow ---------- */
.section-eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--green-600);
    margin-bottom: 12px;
}

/* ---------- Section Title ---------- */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--green-800);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 14px 32px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--green-800);
    color: var(--white);
    border-radius: 2px;
}

.btn-primary:hover {
    background: var(--green-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26, 58, 42, 0.2);
}

.btn-text {
    background: transparent;
    color: var(--green-700);
    padding: 14px 0;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
}

.btn-text:hover {
    color: var(--green-500);
    border-color: var(--green-500);
}

.btn-arrow {
    transition: transform 0.3s ease;
    font-size: 1.1em;
}

.btn-text:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    height: var(--nav-h);
    transition: box-shadow 0.3s ease;
}

.nav.scrolled {
    box-shadow: 0 1px 24px rgba(26, 58, 42, 0.06);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--green-800);
    letter-spacing: -0.01em;
}

.nav-logo-icon {
    width: 22px;
    height: 22px;
    color: var(--green-600);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
}

.nav-links a {
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text-mid);
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--green-500);
    transition: width 0.3s ease;
}

.nav-links a:not(.nav-cta):hover {
    color: var(--green-700);
}

.nav-links a:not(.nav-cta):hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--green-800);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 2px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.2s ease;
}

.nav-cta:hover {
    background: var(--green-700);
}

.nav-cta::after {
    display: none !important;
}

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

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--green-800);
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 4px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -4px);
}

/* ---------- Hero ---------- */
.hero {
    padding-top: var(--nav-h);
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--cream);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    background: var(--green-50);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 0;
}

.hero-grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px var(--gutter);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green-500);
    margin-bottom: 24px;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 300;
    line-height: 1.1;
    color: var(--green-800);
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-mid);
    margin-bottom: 40px;
    max-width: 480px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 32px;
}

.hero-right {
    position: relative;
}

.hero-image-wrap {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.hero-image-wrap img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    border-radius: 4px;
}

.hero-accent {
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 120px;
    height: 120px;
    border: 1px solid var(--green-200, #b8d8c4);
    border-radius: 4px;
    z-index: -1;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--green-800);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--line-strong);
}

/* ---------- Intro / About ---------- */
.intro {
    padding: 120px 0;
    background: var(--white);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 80px;
    align-items: start;
}

.intro-label {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 120px;
}

.intro-label p {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--green-600);
}

.intro-content .section-title {
    margin-bottom: 28px;
}

.intro-text {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-mid);
    margin-bottom: 20px;
    font-weight: 300;
}

.intro-values {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
}

.intro-value {
    display: flex;
    align-items: center;
    gap: 16px;
}

.value-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--green-600);
}

.value-icon svg {
    width: 16px;
    height: 16px;
}

.intro-value span:last-child {
    font-size: 0.9375rem;
    color: var(--text-dark);
    font-weight: 400;
}

/* ---------- Services ---------- */
.services {
    padding: 120px 0;
    background: var(--cream);
}

.services-header {
    margin-bottom: 64px;
}

.services-header .thin-line {
    margin-bottom: 20px;
}

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

.service-card {
    background: var(--white);
    border-radius: 4px;
    padding: 48px 36px;
    border: 1px solid var(--line);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--green-600);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    border-color: var(--green-200, #b8d8c4);
    box-shadow: 0 8px 32px rgba(26, 58, 42, 0.06);
    transform: translateY(-2px);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--green-100);
    line-height: 1;
    margin-bottom: 24px;
    transition: color 0.3s ease;
}

.service-card:hover .service-number {
    color: var(--green-200, #b8d8c4);
}

.service-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--green-800);
    margin-bottom: 16px;
    line-height: 1.2;
}

.service-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-mid);
    margin-bottom: 24px;
    font-weight: 300;
}

.service-includes {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-includes li {
    font-size: 0.8125rem;
    color: var(--text-light);
    padding-left: 16px;
    position: relative;
    font-weight: 400;
}

.service-includes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 1px;
    background: var(--green-400);
}

/* ---------- Process ---------- */
.process {
    padding: 120px 0;
    background: var(--green-800);
    color: var(--white);
}

.process-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.process-left .thin-line {
    background: var(--green-400);
}

.process-left .section-eyebrow {
    color: var(--green-400);
}

.process-left .section-title {
    color: var(--white);
}

.process-text {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 40px;
    font-weight: 300;
}

.process-left .btn-primary {
    background: var(--white);
    color: var(--green-800);
}

.process-left .btn-primary:hover {
    background: var(--green-100);
}

.process-right {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.process-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: start;
}

.process-step:first-child {
    padding-top: 0;
}

.step-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.step-num {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.15);
    line-height: 1;
}

.step-line {
    width: 32px;
    height: 1px;
    background: var(--green-400);
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 8px;
}

.step-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 300;
    max-width: 360px;
}

/* ---------- Trust Banner ---------- */
.trust-banner {
    padding: 100px 0;
    background: var(--cream-dark);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.trust-content {
    max-width: 720px;
    text-align: center;
    margin: 0 auto;
}

.trust-quote {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
    color: var(--green-700);
    margin-bottom: 24px;
}

.trust-source {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* ---------- Areas ---------- */
.areas {
    padding: 120px 0;
    background: var(--white);
}

.areas-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.areas-text {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-mid);
    font-weight: 300;
}

.areas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: flex-start;
}

.area-item {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-mid);
    padding: 10px 20px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.area-item:hover {
    border-color: var(--green-600);
    color: var(--green-700);
    background: var(--green-50);
}

/* ---------- CTA / Contact ---------- */
.cta {
    padding: 120px 0;
    background: var(--cream);
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.cta-left .thin-line {
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-mid);
    margin-bottom: 48px;
    font-weight: 300;
}

.cta-contact {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.cta-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--green-600);
}

.contact-icon svg {
    width: 18px;
    height: 18px;
}

.contact-label {
    display: block;
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 4px;
}

.contact-value {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-dark);
}

.contact-value a {
    color: var(--green-700);
    transition: color 0.2s ease;
}

.contact-value a:hover {
    color: var(--green-500);
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--text-dark);
    background: var(--white);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s ease;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green-500);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-faint);
}

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

.form-note {
    font-size: 0.8125rem;
    color: var(--text-faint);
    text-align: center;
    margin-top: 4px;
}

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    background: var(--white);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
}

.form-success.show {
    display: flex;
}

.success-icon {
    width: 56px;
    height: 56px;
    border: 2px solid var(--green-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--green-600);
}

.success-icon svg {
    width: 24px;
    height: 24px;
}

.form-success h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--green-800);
    margin-bottom: 12px;
}

.form-success p {
    font-size: 0.9375rem;
    color: var(--text-mid);
    line-height: 1.7;
    max-width: 320px;
    font-weight: 300;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--green-900);
    color: var(--white);
    padding: 64px 0 40px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 12px;
}

.footer-logo svg {
    width: 22px;
    height: 22px;
    color: var(--green-400);
}

.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 300;
    max-width: 280px;
    line-height: 1.6;
}

.footer-contact {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.footer-phone {
    font-size: 1rem;
    font-weight: 400;
    color: var(--white);
    transition: color 0.2s ease;
}

.footer-phone:hover {
    color: var(--green-400);
}

.footer-address {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 300;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

/* ---------- Scroll Reveal (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Default visible state for no-JS fallback */
.reveal {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero::before {
        display: none;
    }

    .hero-right {
        max-width: 480px;
    }

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

    .intro-label {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .process-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .areas-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .cta-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-h: 64px;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: rgba(250, 249, 246, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        border-bottom: 1px solid var(--line);
    }

    .nav-links.open {
        max-height: 400px;
        padding: 24px var(--gutter);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-links a:not(.nav-cta)::after {
        display: none;
    }

    .nav-cta {
        text-align: center;
        margin-top: 8px;
        border-bottom: none !important;
        padding: 14px 24px !important;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-h) + 40px);
        padding-bottom: 40px;
    }

    .hero-grid {
        padding: 40px var(--gutter);
    }

    .hero-image-wrap img {
        height: 360px;
    }

    .hero-accent {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .intro,
    .services,
    .process,
    .areas,
    .cta {
        padding: 80px 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-contact {
        align-items: flex-start;
    }

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

@media (max-width: 480px) {
    .hero-headline {
        font-size: 1.875rem;
    }

    .hero-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .hero-stat-divider {
        width: 40px;
        height: 1px;
    }

    .service-card {
        padding: 36px 28px;
    }

    .areas-grid {
        gap: 8px;
    }

    .area-item {
        padding: 8px 14px;
        font-size: 0.8125rem;
    }
}
