/* ============================================
   Redroomatventanas — Custom Styles
   ============================================ */

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

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal base — content always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply animation when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    .scroll-reveal:not(.is-visible) {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(61, 102, 47, 0.08);
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.25s ease-out;
}

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

/* Custom focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #52823e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Subtle hover lift for cards */
.group:hover {
    transform: translateY(-2px);
}

/* Hero decorative blobs animation */
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(12px, -18px) scale(1.05); }
    66% { transform: translate(-8px, 10px) scale(0.97); }
}

#hero .absolute div:first-child {
    animation: float 8s ease-in-out infinite;
}

#hero .absolute div:nth-child(2) {
    animation: float 10s ease-in-out infinite reverse;
}

#hero .absolute div:nth-child(3) {
    animation: float 12s ease-in-out infinite;
}

/* Subtle pulse on the CTA button */
@keyframes soft-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(61, 102, 47, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(61, 102, 47, 0); }
}

#hero a:first-of-type:hover {
    animation: none;
}

/* Selection color */
::selection {
    background-color: #c6dbb8;
    color: #111a0c;
}

/* Image lazy load fade-in */
img[loading="lazy"] {
    transition: opacity 0.4s ease;
}

img[loading="lazy"]:not(.loaded) {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 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;
    }

    .scroll-reveal:not(.is-visible) {
        opacity: 1 !important;
        transform: none !important;
    }
}
