/* === Custom Styles for Denise Coolidge Cape Cod Real Estate === */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* === Navigation === */
.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-subtext {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Scrolled state */
.nav-scrolled .nav-logo-text {
    color: #064e3b;
}

.nav-scrolled .nav-subtext {
    color: #059669;
}

.nav-scrolled .nav-link {
    color: #064e3b;
}

.nav-scrolled .nav-link:hover {
    color: #059669;
}

/* === Hero Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-ctas {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-trust {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

.hero-scroll {
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
    opacity: 0;
}

/* === Reveal Animations === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
.reveal-grid > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-grid > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-grid > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-grid > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-grid > *:nth-child(5) { transition-delay: 0.5s; }
.reveal-grid > *:nth-child(6) { transition-delay: 0.6s; }

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

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

.mobile-link {
    display: block;
}

/* === Form Styles === */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23059669' 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;
    padding-right: 2.5rem;
}

/* === Parallax-like subtle effect on hero === */
#hero {
    will-change: transform;
}

#hero img {
    will-change: transform;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* === Selection === */
::selection {
    background: #059669;
    color: white;
}

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

/* === 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;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* === Tablet === */
@media (max-width: 768px) {
    .hero-badge {
        animation-delay: 0.1s;
    }
    .hero-title {
        font-size: 2.5rem;
    }
}

/* === Large screens === */
@media (min-width: 1280px) {
    .reveal {
        transition-delay: 0.1s;
    }
}
