/* Custom styles for Hearing Aids by Miracle Ear */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base font settings */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: rgba(196, 82, 48, 0.15);
    color: inherit;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fdfbf7;
}
::-webkit-scrollbar-thumb {
    background: #d4b87e;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c45230;
}

/* Reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Staggered reveal delays */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.15s; }
.reveal:nth-child(3) { transition-delay: 0.25s; }
.reveal:nth-child(4) { transition-delay: 0.35s; }
.reveal:nth-child(5) { transition-delay: 0.45s; }
.reveal:nth-child(6) { transition-delay: 0.55s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

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

/* Navbar transitions */
#navbar.scrolled {
    background-color: rgba(253, 251, 247, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

#navbar.scrolled a,
#navbar.scrolled svg {
    color: #1c1917;
}

#navbar.scrolled .text-terra-500 {
    color: #c45230 !important;
}

/* Mobile menu active state */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

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

/* Subtle hover lift on cards */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Image loading placeholder */
img {
    background-color: #f3e8d0;
}

/* Print styles */
@media print {
    nav, #contactForm, #formSuccess, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
