/* ============================================
   Pelham Falls Subdivision — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2dd4bf;
}

/* Selection */
::selection {
    background: #0d9488;
    color: white;
}

/* ============================================
   Navbar
   ============================================ */
.navbar-text {
    transition: color 0.5s ease;
}

#navbar.scrolled .navbar-text {
    color: #0f172a;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

#navbar.scrolled .w-9 {
    background: #0d9488;
}

#navbar.scrolled svg {
    stroke: white;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.3s;
}

.hero-headline {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards 0.5s;
}

.hero-subheadline {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.7s;
}

.hero-ctas {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.9s;
}

.hero-stats {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 1.1s;
}

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

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* Menu Icon Animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

/* ============================================
   Buttons
   ============================================ */
button, a[href^="#"] {
    cursor: pointer;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus, textarea:focus {
    outline: none;
}

input::placeholder, textarea::placeholder {
    transition: opacity 0.3s ease;
}

input:focus::placeholder, textarea:focus::placeholder {
    opacity: 0.5;
}

/* ============================================
   Image Hover Effects
   ============================================ */
.group:hover .group-hover\:scale-105 {
    will-change: transform;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-eyebrow,
    .hero-headline,
    .hero-subheadline,
    .hero-ctas,
    .hero-stats {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .group:hover .group-hover\:scale-105 {
        transform: none;
        transition: none;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}
