/* ============================================
   Bobbie Miller, Realtor — Custom Styles
   ============================================ */

/* ── Base & Typography ── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(120, 31, 45, 0.15);
    color: #781f2d;
}

/* ── Hero Gradient ── */
.hero-gradient {
    background: linear-gradient(
        135deg,
        #781f2d 0%,
        #b92b42 30%,
        #d4465e 55%,
        #e8687a 75%,
        #f0909e 100%
    );
}

/* ── Hero Blobs ── */
.hero-blob {
    animation: blobFloat 8s ease-in-out infinite;
}

.hero-blob-1 {
    animation-delay: 0s;
}

.hero-blob-2 {
    animation-delay: -3s;
    animation-duration: 10s;
}

.hero-blob-3 {
    animation-delay: -5s;
    animation-duration: 12s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.05); }
    50% { transform: translate(-15px, 15px) scale(0.95); }
    75% { transform: translate(25px, 20px) scale(1.02); }
}

/* ── Hero Badge ── */
.hero-badge {
    animation: badgeIn 0.8s ease-out both;
}

@keyframes badgeIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scroll Indicator ── */
.scroll-indicator {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(6px); }
}

/* ── Navbar ── */
#navbar.scrolled {
    background: rgba(254, 250, 246, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(120, 31, 45, 0.08);
    padding-top: 0;
    padding-bottom: 0;
}

#navbar.scrolled #nav-logo-text {
    color: #781f2d;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #781f2d, #d4465e);
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

/* ── Mobile Menu ── */
#mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

#mobile-menu.closed {
    max-height: 0;
    opacity: 0;
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fce7eb, transparent);
    margin-top: 0.25rem;
}

/* ── Scroll Reveal ── */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ── Service Cards ── */
.service-card {
    position: relative;
    overflow: hidden;
}

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

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

/* ── Area Cards ── */
.area-card {
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

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

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

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 6rem;
    color: rgba(120, 31, 45, 0.06);
    line-height: 1;
    pointer-events: none;
}

.testimonial-card {
    position: relative;
}

/* ── Form Styles ── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(120, 31, 45, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: rgba(68, 49, 40, 0.3);
}

/* ── Button Ripple Effect ── */
button, a[role="button"] {
    position: relative;
    overflow: hidden;
}

/* ── Accessibility: Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
    
    .hero-blob {
        animation: none;
    }
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
    .hero-gradient {
        background: linear-gradient(
            160deg,
            #781f2d 0%,
            #b92b42 35%,
            #d4465e 65%,
            #e8687a 100%
        );
    }
    
    #hero h1 {
        font-size: 2.5rem;
        line-height: 1.15;
    }
    
    #hero p {
        font-size: 1.05rem;
    }
    
    .testimonial-card::before {
        font-size: 4rem;
        top: 12px;
        right: 16px;
    }
    
    .hero-blob-1,
    .hero-blob-2,
    .hero-blob-3 {
        display: none;
    }
}

@media (max-width: 360px) {
    #hero h1 {
        font-size: 2rem;
    }
    
    .max-w-6xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
