/* === Custom Styles for Angelo Redeemed Properties === */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* === Hero Animations === */
.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-sub {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.35s;
    opacity: 0;
}

.hero-ctas {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-stats {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.65s;
    opacity: 0;
}

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

.hero-float-card {
    animation: floatCard 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

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

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes scroll {
    0% { top: -12px; }
    100% { top: 32px; }
}

.scroll-line {
    animation: scroll 1.2s ease-in-out infinite;
}

/* === Section Animations (Scroll-triggered) === */
.section-eyebrow,
.section-title,
.service-card,
.area-card,
.testimonial-card,
.about-image-grid {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-eyebrow.visible,
.section-title.visible,
.service-card.visible,
.area-card.visible,
.testimonial-card.visible,
.about-image-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }

/* === Navbar === */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 249, 240, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.06);
}

/* === Mobile Menu === */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

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

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

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

/* Menu button animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* === Service Cards === */
.service-card {
    /* initial state handled by JS */
}

/* === Area Cards === */
.area-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
    transition: border-color 0.3s ease;
}

.area-card:hover::after {
    border-color: rgba(255,255,255,0.25);
}

/* === Custom Select Arrow === */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* === Selection color === */
::selection {
    background: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

/* === Focus visible === */
:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* === Responsive adjustments === */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-float-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: 100%;
    }

    .hero-image-wrapper {
        margin-top: 2rem;
    }

    .about-image-grid {
        position: relative;
    }

    .about-image-grid > div:last-child {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-stats {
        gap: 1rem;
    }

    .hero-stats > div > span:first-child {
        font-size: 2rem !important;
    }
}
