/* Custom styles for Jeff Touchstone Mortgage website */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Selection color */
::selection {
    background: rgba(34, 197, 94, 0.3);
    color: #fefce8;
}

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

#navbar.scrolled {
    background-color: rgba(6, 18, 9, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(34, 197, 94, 0.1);
}

/* Mobile menu */
.mobile-menu-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease;
}

.mobile-menu-link:hover {
    padding-left: 8px;
}

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

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

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

.floating-card-1 {
    animation: float 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 0.5s;
}

.floating-card-3 {
    animation: float-slow 6s ease-in-out infinite;
    animation-delay: 1s;
}

/* Scroll reveal animations */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Service card hover glow effect */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Gradient text utility */
.text-gradient-emerald {
    background: linear-gradient(135deg, #34d399, #6ee7b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism card */
.glass-card {
    background: rgba(10, 31, 15, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(34, 197, 94, 0.1);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 2px;
}

/* Form select dropdown styling */
select option {
    background: #061209;
    color: #fefce8;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

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

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-dark-900,
    .bg-dark-850 {
        background: white !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        animation: none;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        margin-bottom: 1rem;
    }
    
    #hero {
        min-height: auto;
        padding-top: 6rem;
        padding-bottom: 4rem;
    }
    
    .hero-stats-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1023px) {
    .floating-card-1 {
        animation: float 4s ease-in-out infinite;
    }
    
    .floating-card-2 {
        animation: float-delayed 5s ease-in-out infinite;
        animation-delay: 0.5s;
    }
    
    .floating-card-3 {
        animation: float-slow 6s ease-in-out infinite;
        animation-delay: 1s;
    }
}

/* Ensure high contrast for accessibility */
@media (prefers-contrast: high) {
    .text-cream-100\/50 {
        color: rgba(254, 254, 231, 0.8);
    }
    
    .text-cream-100\/40 {
        color: rgba(254, 254, 231, 0.7);
    }
}

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