/* ========================================
   Caldwells Carpet Cleaning — Styles
   Bold editorial: Playfair Display + Inter
   Palette: Forest Green + Off-White
======================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-900: #0D2818;
    --green-800: #1C4532;
    --green-700: #2A6B4A;
    --green-600: #3A8F63;
    --green-500: #4DB07A;
    --green-100: #D1F5E2;
    --green-50:  #EDF9F3;
    --cream:     #FAF8F5;
    --cream-dark:#F0EDE8;
    --warm:      #D4A373;
    --warm-light:#F5E6D0;
    --text-dark: #1A1A1A;
    --text-mid:  #3D3D3D;
    --text-light:#6B6B6B;
    --white:     #FFFFFF;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans:  'Inter', system-ui, sans-serif;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Typography
======================================== */

.eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm);
    margin-bottom: 16px;
    display: block;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--green-800);
    margin-bottom: 24px;
}

/* ========================================
   Buttons
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
}

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

.btn--primary:hover {
    background: var(--green-700);
    border-color: var(--green-700);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(28, 69, 50, 0.25);
}

.btn--outline {
    background: transparent;
    color: var(--green-800);
    border-color: var(--green-800);
}

.btn--outline:hover {
    background: var(--green-800);
    color: var(--white);
    transform: translateY(-2px);
}

.btn--light {
    background: var(--white);
    color: var(--green-800);
    border-color: var(--white);
}

.btn--light:hover {
    background: var(--cream);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn--lg {
    padding: 18px 36px;
    font-size: 1rem;
}

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

/* ========================================
   Navbar
======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(28, 69, 50, 0.08);
    transition: box-shadow 0.3s var(--ease);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green-800);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

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

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

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

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

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--green-800);
    transition: all 0.3s var(--ease);
}

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

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

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

/* ========================================
   Hero
======================================== */

.hero {
    padding-top: 72px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--cream);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 520px;
}

.hero-content .eyebrow {
    margin-bottom: 20px;
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--green-900);
    margin-bottom: 24px;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-mid);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 460px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.image-frame {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(28, 69, 50, 0.15);
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-accent {
    position: absolute;
    bottom: -24px;
    left: -24px;
    z-index: 2;
}

.stat-box {
    background: var(--green-800);
    color: var(--white);
    padding: 24px 32px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 12px 32px rgba(28, 69, 50, 0.3);
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0.85;
    line-height: 1.4;
}

.hero-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: 
        radial-gradient(circle at 80% 20%, rgba(212, 163, 115, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(28, 69, 50, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ========================================
   Services
======================================== */

.services {
    padding: 100px 0;
    background: var(--white);
}

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

.section-header .eyebrow {
    margin-bottom: 12px;
}

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

.service-card {
    padding: 40px 32px;
    background: var(--cream);
    border-radius: 12px;
    transition: all 0.4s var(--ease);
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(28, 69, 50, 0.1);
    border-color: rgba(28, 69, 50, 0.1);
    background: var(--white);
}

.service-icon {
    margin-bottom: 24px;
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--green-800);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.7;
}

/* ========================================
   About
======================================== */

.about {
    padding: 100px 0;
    background: var(--cream);
}

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

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 20px 48px rgba(28, 69, 50, 0.12);
}

.about-badge {
    position: absolute;
    bottom: 32px;
    right: -16px;
    background: var(--warm);
    color: var(--white);
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 8px 24px rgba(212, 163, 115, 0.4);
}

.about-content .eyebrow {
    margin-bottom: 12px;
}

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

.about-content > p {
    font-size: 1.05rem;
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-list {
    list-style: none;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

.about-list li svg {
    flex-shrink: 0;
}

/* ========================================
   Process
======================================== */

.process {
    padding: 100px 0;
    background: var(--green-800);
    color: var(--white);
}

.process .section-header {
    margin-bottom: 72px;
}

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

.process .eyebrow {
    color: var(--warm);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.process-step {
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    right: -16px;
    width: 32px;
    height: 2px;
    background: rgba(212, 163, 115, 0.4);
}

.step-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    color: var(--warm);
    line-height: 1;
    margin-bottom: 16px;
    display: block;
}

.process-step h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--white);
}

.process-step p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.process-step a {
    color: var(--warm);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.process-step a:hover {
    color: var(--warm-light);
}

/* ========================================
   CTA Banner
======================================== */

.cta-banner {
    padding: 80px 0;
    background: var(--cream-dark);
    text-align: center;
}

.cta-content .section-title,
.cta-content h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--green-900);
    line-height: 1.2;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    color: var(--text-mid);
    margin-bottom: 32px;
}

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

/* ========================================
   Contact
======================================== */

.contact {
    padding: 100px 0;
    background: var(--white);
}

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

.contact-info .eyebrow {
    margin-bottom: 12px;
}

.contact-info .section-title {
    margin-bottom: 20px;
}

.contact-info > p {
    font-size: 1.05rem;
    color: var(--text-mid);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 4px;
}

.contact-item a {
    color: var(--green-800);
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.2s;
}

.contact-item a:hover {
    color: var(--green-600);
}

.contact-item span {
    color: var(--text-mid);
    line-height: 1.6;
}

/* Form */
.contact-form-wrapper {
    background: var(--cream);
    border-radius: 16px;
    padding: 40px;
}

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

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 12px 16px;
    border: 1.5px solid rgba(28, 69, 50, 0.2);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green-600);
    box-shadow: 0 0 0 3px rgba(74, 176, 122, 0.15);
}

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

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

.form-note {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
}

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 16px;
}

.form-success h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--green-800);
}

.form-success p {
    color: var(--text-mid);
}

/* ========================================
   Footer
======================================== */

.footer {
    background: var(--green-900);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links strong,
.footer-contact strong {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--warm);
    margin-bottom: 4px;
}

.footer-links a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   Scroll Reveal (progressive enhancement)
======================================== */

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    }

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

/* Fallback: ensure content is visible even without JS */
.no-js .reveal,
.js .reveal {
    /* JS adds .revealed; without JS, content is naturally visible via default CSS */
}

/* ========================================
   Responsive
======================================== */

@media (max-width: 1024px) {
    .hero-grid {
        gap: 40px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .process-step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--cream);
        flex-direction: column;
        padding: 32px 24px;
        gap: 24px;
        border-bottom: 1px solid rgba(28, 69, 50, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s var(--ease-out);
    }

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

    .mobile-toggle {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        padding: 40px 0;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
    }

    .hero-content p {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        max-width: 480px;
        margin: 0 auto;
    }

    .hero-accent {
        bottom: -16px;
        left: auto;
        right: -8px;
    }

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

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

    .about-badge {
        right: 16px;
    }

    .process-steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

    .contact-form-wrapper {
        padding: 28px;
    }

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

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

    .hero-content h1 {
        font-size: 2rem;
    }

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

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

    .stat-box {
        padding: 16px 24px;
    }

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