/* ==========================================================================
   CUSTOM ANIMATIONS & STYLES
   ========================================================================== */

/* Smooth Scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* --------------------------------------------------------------------------
   Scroll Reveal Animations
   -------------------------------------------------------------------------- */

/* Base Reveal - Elements start slightly lower and invisible */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    /* Custom easing for premium feel */
}

/* Active State - Elements move to original position and become visible */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In - Elements start invisible without movement */
.fade-in {
    opacity: 0;
    transform: scale(1.02);
    /* Slight zoom out effect */
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active State - Elements become visible */
.fade-in.active {
    opacity: 1;
    transform: scale(1);
}

/* Staggered Reveal Delays */
.reveal-delay-1 {
    transition-delay: 0.15s;
}

.reveal-delay-2 {
    transition-delay: 0.30s;
}

.reveal-delay-3 {
    transition-delay: 0.45s;
}

.reveal-delay-4 {
    transition-delay: 0.60s;
}


/* --------------------------------------------------------------------------
   Micro-Animations & Interactions
   -------------------------------------------------------------------------- */

/* Button Hover Enhancements */
button {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease !important;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(147, 0, 12, 0.5);
    /* Using primary color */
}

button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 10px -5px rgba(147, 0, 12, 0.3);
}

/* Image Scale on Hover Enhancements */
img.object-cover {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
}

/* Navigation Links Underline Animation */
nav a {
    position: relative;
    text-decoration: none;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #EC1C24;
    /* Primary color */
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Exclude the already active residential link from this generic animation or adapt it */
nav a.border-b-2::after {
    display: none;
    /* Hide for already active links */
}

/* Navbar backdrop transition */
nav {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Enhanced Pillar Icons Hover */
.group:hover .group-hover\:rotate-\[360deg\] {
    transform: rotate(360deg) scale(1.1);
}

/* Input/Textarea Focus Ring Animation */
input,
textarea,
select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(147, 0, 12, 0.1);
}