/* Custom styles for Merrill Home Loans */

/* Base reset and smooth scrolling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Floating card animations */
.floating-card-1 {
    animation: float-slow 6s ease-in-out infinite;
}

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

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

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

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

/* Geometric background shapes */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.06;
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    background: #047857;
    border-radius: 50%;
    top: -200px;
    right: -150px;
}

.geo-circle-2 {
    width: 300px;
    height: 300px;
    background: #10b981;
    border-radius: 50%;
    bottom: 10%;
    left: -80px;
}

.geo-square-1 {
    width: 200px;
    height: 200px;
    background: #059669;
    top: 40%;
    right: 5%;
    transform: rotate(45deg);
    border-radius: 24px;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 120px solid transparent;
    border-right: 120px solid transparent;
    border-bottom: 200px solid #34d399;
    top: 60%;
    left: 8%;
    opacity: 0.04;
}

.geo-circle-3 {
    width: 150px;
    height: 150px;
    background: #6ee7b7;
    border-radius: 50%;
    top: 20%;
    left: 15%;
    opacity: 0.05;
}

/* Navbar scroll behavior */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-blur-xl;
    box-shadow: 0 1px 20px rgba(4, 120, 87, 0.08);
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    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; }

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* Selection color */
::selection {
    background: #a7f3d0;
    color: #064e3b;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

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

img[data-src] {
    opacity: 0;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    .geo-shape,
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        display: none;
    }
}
