/* ============================================
   RainFall Sprinklers — Custom Styles
   Palette: Terracotta + Sand
   ============================================ */

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

:root {
    --terracotta: #C2654A;
    --terracotta-deep: #A8523A;
    --terracotta-light: #D4856E;
    --sand: #F5EDE4;
    --sand-light: #FAF6F1;
    --sand-mid: #EDE3D8;
    --charcoal: #2A2522;
    --charcoal-light: #4A423D;
    --warm-gray: #8A7E78;
    --white: #FEFCFA;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --easeInOut: cubic-bezier(0.65, 0, 0.35, 1);
}

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

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--charcoal);
    background: var(--white);
    line-height: 1.7;
    -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 2rem;
}

/* --- Typography --- */
.section-eyebrow {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    color: var(--charcoal);
    margin-bottom: 1.5rem;
}

.lead {
    font-size: 1.125rem;
    color: var(--charcoal-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    border-radius: 100px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--terracotta-deep);
    border-color: var(--terracotta-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(194, 101, 74, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: all 0.5s var(--ease-out);
}

.navbar.scrolled {
    background: rgba(254, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.875rem 0;
    box-shadow: 0 1px 0 rgba(42, 37, 34, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--white);
    transition: color 0.4s ease;
}

.navbar.scrolled .nav-logo {
    color: var(--charcoal);
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--terracotta);
}

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

.nav-links a {
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

.navbar.scrolled .nav-links a {
    color: var(--warm-gray);
}

.navbar.scrolled .nav-links a:hover {
    color: var(--charcoal);
}

.nav-cta {
    background: var(--terracotta) !important;
    color: var(--white) !important;
    padding: 0.625rem 1.25rem;
    border-radius: 100px;
    font-weight: 400;
    transition: all 0.3s ease !important;
}

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

.nav-cta:hover {
    background: var(--terracotta-deep) !important;
    transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--white);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 1.5px;
    background: var(--white);
    transition: all 0.3s ease;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.navbar.scrolled .hamburger,
.navbar.scrolled .hamburger::before,
.navbar.scrolled .hamburger::after {
    background: var(--charcoal);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--charcoal) 0%,
        #3D2E26 25%,
        var(--terracotta-deep) 55%,
        var(--terracotta-light) 80%,
        var(--sand-mid) 100%
    );
    z-index: 0;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(194, 101, 74, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(212, 133, 110, 0.2) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 1.75rem;
}

.hero-title .accent {
    font-style: italic;
    color: var(--sand);
}

.hero-subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

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

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
}

.hero-scroll span {
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.4; transform: scaleY(0.6); }
}

/* --- Services --- */
.services {
    padding: 8rem 0;
    background: var(--white);
}

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

.service-card {
    padding: 2.5rem;
    border: 1px solid var(--sand-mid);
    border-radius: 16px;
    transition: all 0.5s var(--ease-out);
    position: relative;
    overflow: hidden;
}

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

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

.service-card:hover {
    border-color: transparent;
    box-shadow: 0 16px 48px rgba(42, 37, 34, 0.08);
    transform: translateY(-4px);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--terracotta);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.25rem;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--warm-gray);
    line-height: 1.7;
}

/* --- About --- */
.about {
    padding: 8rem 0;
    background: var(--sand-light);
}

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

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 12px;
    width: 100%;
    height: 750px;
    object-fit: cover;
}

.about-image-accent {
    position: absolute;
    bottom: -24px;
    right: -24px;
    width: 200px;
    height: 200px;
    border: 1.5px solid var(--terracotta-light);
    border-radius: 12px;
    z-index: -1;
}

.about-content {
    padding-top: 1rem;
}

.about-content p {
    font-size: 0.9375rem;
    color: var(--charcoal-light);
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--sand-mid);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--terracotta);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--warm-gray);
    letter-spacing: 0.02em;
}

/* --- Process --- */
.process {
    padding: 8rem 0;
    background: var(--white);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.process-step {
    position: relative;
    padding: 2rem;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 3.25rem;
    right: -1rem;
    width: 2rem;
    height: 1px;
    background: var(--sand-mid);
}

.step-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 500;
    color: var(--sand-mid);
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}

.process-step h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.1875rem;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.process-step p {
    font-size: 0.875rem;
    color: var(--warm-gray);
    line-height: 1.75;
}

.process-step a {
    color: var(--terracotta);
    border-bottom: 1px solid rgba(194, 101, 74, 0.3);
    transition: border-color 0.3s ease;
}

.process-step a:hover {
    border-color: var(--terracotta);
}

/* --- Trust --- */
.trust {
    padding: 6rem 0;
    background: var(--charcoal);
}

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

.trust .section-eyebrow {
    color: var(--terracotta-light);
}

.trust blockquote {
    margin: 2rem 0 2.5rem;
}

.trust blockquote p {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: 500;
    font-style: italic;
    line-height: 1.5;
    color: var(--sand);
}

.trust footer {
    display: block;
    margin-top: 1.5rem;
}

.trust-name {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.8125rem;
    color: var(--warm-gray);
    letter-spacing: 0.05em;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
}

.trust-badge svg {
    width: 20px;
    height: 20px;
    color: var(--terracotta-light);
}

/* --- Contact --- */
.contact {
    padding: 8rem 0;
    background: var(--sand-light);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: start;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9375rem;
    color: var(--charcoal-light);
    transition: color 0.3s ease;
}

.contact-item:hover {
    color: var(--terracotta);
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--terracotta);
    flex-shrink: 0;
}

.contact-item a {
    color: inherit;
    border-bottom: 1px solid var(--sand-mid);
    transition: border-color 0.3s ease;
}

.contact-item a:hover {
    border-color: var(--terracotta);
}

/* Form */
.contact-form-wrapper {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(42, 37, 34, 0.06);
}

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

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--charcoal);
    background: var(--sand-light);
    border: 1.5px solid var(--sand-mid);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--terracotta);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(194, 101, 74, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--warm-gray);
    opacity: 0.6;
}

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

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    gap: 1rem;
}

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

.form-success svg {
    width: 48px;
    height: 48px;
    color: var(--terracotta);
}

.form-success p {
    font-size: 1rem;
    color: var(--charcoal-light);
}

/* --- Footer --- */
.footer {
    padding: 4rem 0 2rem;
    background: var(--charcoal);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

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

.footer-brand p {
    font-size: 0.875rem;
    color: var(--warm-gray);
    line-height: 1.7;
}

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

.footer-links a {
    font-size: 0.875rem;
    color: var(--warm-gray);
    transition: color 0.3s ease;
}

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

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact a {
    font-size: 0.875rem;
    color: var(--warm-gray);
    transition: color 0.3s ease;
}

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

.footer-contact span {
    font-size: 0.875rem;
    color: var(--warm-gray);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.3);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-step:not(:last-child)::after {
        display: none;
    }
    
    .about-layout {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2rem;
        transition: right 0.5s var(--ease-out);
        box-shadow: -8px 0 32px rgba(0,0,0,0.1);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        color: var(--charcoal) !important;
        font-size: 1rem;
    }

    .nav-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-toggle.active .hamburger {
        background: transparent;
    }

    .nav-toggle.active .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle.active .hamburger::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .hero {
        padding: 7rem 1.5rem 4rem;
        min-height: 100svh;
    }

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

    .hero-scroll {
        display: none;
    }

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

    .about-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image img {
        height: 450px;
    }

    .about-image-accent {
        display: none;
    }

    .about-stats {
        gap: 2rem;
    }

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

    .trust-badges {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }

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

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

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

    .service-card {
        padding: 1.75rem;
    }

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

/* Mobile nav overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(42, 37, 34, 0.4);
    z-index: 999;
}

.nav-overlay.show {
    display: block;
}
