/* ============================================
   Andis Offices — Custom Styles
   Color Palette: Burgundy + Blush
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #fce7eb;
    color: #6f1530;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.7s ease-out both;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.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; }

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(132, 20, 55, 0.06), 0 4px 24px rgba(132, 20, 55, 0.04);
}

.nav-logo-text {
    transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #fff;
}

#navbar.scrolled .nav-logo-text {
    color: #3d0715;
}

.nav-link {
    position: relative;
}

#navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.75);
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fce7eb;
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

#navbar.scrolled .nav-link::after {
    background: #841437;
}

/* ---------- Buttons ---------- */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: linear-gradient(135deg, rgba(132, 20, 55, 0.02) 0%, rgba(253, 240, 242, 0.5) 100%);
    pointer-events: none;
}

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

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 6rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

/* ---------- Neighborhood Cards ---------- */
.neighborhood-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
}

.neighborhood-card img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.neighborhood-card:hover img {
    transform: scale(1.08);
}

.neighborhood-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61, 7, 21, 0.8) 0%, rgba(61, 7, 21, 0.1) 60%, transparent 100%);
    transition: background 0.4s ease;
}

.neighborhood-card:hover .overlay {
    background: linear-gradient(to top, rgba(61, 7, 21, 0.85) 0%, rgba(61, 7, 21, 0.2) 60%, transparent 100%);
}

/* ---------- Input Focus States ---------- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ---------- Mobile Menu ---------- */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
    animation: slideDown 0.3s ease-out;
}

.mobile-nav-link {
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

#mobileMenu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* ---------- Smooth Scroll Offset ---------- */
section[id] {
    scroll-margin-top: 80px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
