/* ============================================
   Pleasant Valley Estates — Custom Styles
   ============================================ */

/* Base & Scroll */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #7a3d76;
    color: #f5f0f7;
}

/* ============================================
   Floating Card Animations
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes scroll-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

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

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   ============================================ */
/* Default state: visible (works without JS) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* JS-gated: animate only when JS is available and element is in viewport */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
}

.js .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-float,
    .animate-float-delayed {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Mobile Menu Transitions
   ============================================ */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding-bottom: 1rem;
}

/* ============================================
   Focus Styles (Accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7a3d76;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

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

/* ============================================
   Form Focus States
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(122, 61, 118, 0.1);
}

/* ============================================
   Image Optimization
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    header,
    footer,
    .animate-float,
    .animate-float-delayed {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
