/* Custom styles for Graystone Park Townhomes */

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fef9f0;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Selection color */
::selection {
    background: #166534;
    color: #fdfcfa;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #166534;
    outline-offset: 2px;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(253, 252, 250, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.1);
}

.navbar-scrolled .nav-link {
    color: #14532d !important;
}

.navbar-scrolled .logo-text {
    color: #14532d !important;
}

/* Mobile menu transitions */
.mobile-menu-open #mobile-menu {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

.mobile-menu-open #bar1 {
    transform: translateY(5px) rotate(45deg);
}

.mobile-menu-open #bar2 {
    opacity: 0;
}

.mobile-menu-open #bar3 {
    transform: translateY(-5px) rotate(-45deg);
}

/* Decorative line animations */
.deco-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1s ease;
}

.deco-line.visible {
    stroke-dashoffset: 0;
}

/* Button hover effects */
.btn-elegant {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-elegant::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-elegant:hover::before {
    left: 100%;
}

/* Card hover lift */
.card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(20, 83, 45, 0.1);
}

/* Image hover zoom */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s ease;
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #166534, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse animation for CTA */
@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}

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

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

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.5rem, 5vw, 2.25rem);
    }
    
    h1 {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
    
    h2 {
        font-size: clamp(2rem, 6vw, 3rem);
    }
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-emerald-950, .bg-emerald-800, .bg-emerald-700 {
        background: #166534 !important;
        color: #fff !important;
    }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .text-emerald-900\/70 {
        color: #14532d !important;
    }
    
    .text-emerald-100\/80 {
        color: #f0fdf4 !important;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 4rem 0;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
}
