/* ===== 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-color: #8b4d82;
    color: #fff;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f0f7;
}

::-webkit-scrollbar-thumb {
    background: #be94bc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8b4d82;
}

/* ===== Navbar ===== */
#navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all 0.4s ease;
}

#navbar.scrolled {
    border-bottom-color: #ebe0ee;
    box-shadow: 0 1px 20px rgba(68, 34, 61, 0.06);
}

#navbar.scrolled .nav-text {
    color: #44223d;
}

#navbar.scrolled .nav-subtext {
    color: #8b4d82;
}

/* Mobile menu */
#mobile-menu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

#mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu lines animation */
.menu-line {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 6rem;
}

/* ===== Hero Animations ===== */
.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
}

.hero-title {
    animation: slideUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-desc {
    animation: slideUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-cta-primary,
.hero-cta-secondary {
    animation: slideUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

.hero-image-wrapper {
    animation: fadeInRight 1s ease 0.3s forwards;
    opacity: 0;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===== Service Cards ===== */
.service-card {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* ===== About Image ===== */
.about-image-wrapper {
    position: relative;
}

.about-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(42, 19, 37, 0.3));
    pointer-events: none;
}

/* ===== Neighborhood Cards ===== */
.neighborhood-card {
    overflow: hidden;
}

.neighborhood-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: inherit;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.neighborhood-card:hover::after {
    border-color: rgba(251, 191, 36, 0.4);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(68, 34, 61, 0.1);
}

/* ===== Back to Top ===== */
#back-to-top {
    transition: all 0.4s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* ===== Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.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; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== Counter Animation ===== */
.counter {
    display: inline-block;
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-title .italic {
        display: block;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    #navbar, #back-to-top, .scroll-line {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
