/* ============================================
   Rosewind Co Housing — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #C8A96E;
    color: #060E1F;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f1ed;
}
::-webkit-scrollbar-thumb {
    background: #0A1F44;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C8A96E;
}

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

#navbar.scrolled {
    background: rgba(245, 241, 237, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 14, 31, 0.08);
}

#navbar.scrolled .nav-text {
    color: #060E1F;
}

#navbar.scrolled .menu-line {
    background: #060E1F;
}

/* Hero nav stays dark on the image */
#navbar .nav-text {
    color: #ffffff;
    transition: color 0.4s ease;
}

#navbar .nav-link {
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-link {
    color: rgba(6, 14, 31, 0.7);
}

#navbar .nav-cta {
    background: #ffffff;
    color: #060E1F;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#navbar.scrolled .nav-cta {
    background: #0A1F44;
    color: #ffffff;
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    background: rgba(245, 241, 237, 0.98);
    backdrop-filter: blur(20px);
}

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

/* ============================================
   Hero Entrance Animations
   ============================================ */
.hero-entrance {
    opacity: 1;
    transform: translateY(0);
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-entrance:nth-child(2) { animation-delay: 0.15s; }
.hero-entrance:nth-child(3) { animation-delay: 0.3s; }
.hero-entrance:nth-child(4) { animation-delay: 0.45s; }
.hero-entrance:nth-child(5) { animation-delay: 0.6s; }

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

.hero-scroll {
    animation: heroFadeUp 1s ease 1s both;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* ============================================
   Service Card Hover
   ============================================ */
.group:hover .group-hover\:-translate-y-1 {
    transform: translateY(-0.25rem);
}

/* ============================================
   Form Styles
   ============================================ */
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' stroke='%230A1F44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    appearance: none;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.2;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, .hero-scroll, #mobile-menu {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
