/* ============================================
   Diane Belanger Real Estate — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Section Eyebrow */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #4a7c56;
    margin-bottom: 0.75rem;
}

.section-eyebrow::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: #8fb89e;
    border-radius: 1px;
}

/* Section Title */
.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    color: #1b2d21;
    margin-bottom: 1rem;
}

/* Section Subtitle */
.section-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #3a6244;
    opacity: 0.75;
}

/* ============================================
   Hero Animations (above the fold — no initial hidden state)
   ============================================ */
#hero .hero-eyebrow {
    animation: heroFadeIn 0.8s ease-out both;
    animation-delay: 0.2s;
}

#hero h1 {
    animation: heroFadeIn 0.8s ease-out both;
    animation-delay: 0.4s;
}

#hero p {
    animation: heroFadeIn 0.8s ease-out both;
    animation-delay: 0.6s;
}

#hero > div > div > div:last-child {
    animation: heroFadeIn 0.8s ease-out both;
    animation-delay: 0.7s;
}

#hero .hero-stat {
    animation: heroFadeIn 0.8s ease-out both;
    animation-delay: 0.8s;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll Reveal Animations (below the fold only)
   Progressive enhancement — content visible without JS
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal-left[data-reveal] {
        opacity: 0;
        transform: translateX(-30px);
    }

    .reveal-right[data-reveal] {
        opacity: 0;
        transform: translateX(30px);
    }

    .reveal-scale[data-reveal] {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Staggered delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    background: white;
    border-radius: 1.5rem;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(191, 209, 196, 0.3);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.service-card:hover {
    box-shadow: 0 20px 60px rgba(45, 74, 53, 0.1);
    transform: translateY(-4px);
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Area Chips
   ============================================ */
.area-chip {
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.area-chip:hover {
    transform: translateY(-2px);
}

/* ============================================
   Navbar
   ============================================ */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(27, 45, 33, 0.08);
}

#navbar.scrolled .font-serif {
    color: #1b2d21;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    display: block;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 124, 86, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: #b9d1c4;
}

select option {
    color: #1b2d21;
    background: #fefdf8;
}

/* ============================================
   Floating Card Animation
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .about-float-card {
        animation: float 4s ease-in-out infinite;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================================
   Back to Top Button
   ============================================ */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .section-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    #hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: #8fb89e;
    color: #1b2d21;
}

/* ============================================
   Focus Visible for Accessibility
   ============================================ */
*:focus-visible {
    outline: 2px solid #4a7c56;
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #back-to-top,
    .hero-stat {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
