/* ═══════════════════════════════════════════
   Miracle-Ear Hailey — Custom Styles
   Classic & Elegant | Burgundy + Blush
   ═══════════════════════════════════════════ */

/* ── Base & Typography ────────────────────── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    letter-spacing: -0.01em;
}

::selection {
    background-color: #7a2121;
    color: #fefdfb;
}

/* ── Smooth Scroll Offset for Fixed Nav ───── */
section[id] {
    scroll-margin-top: 80px;
}

/* ── Navigation ───────────────────────────── */
#navbar {
    background: rgba(254, 253, 251, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(122, 33, 33, 0.08);
    transition: box-shadow 0.4s ease, background 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.97);
    box-shadow: 0 1px 20px rgba(122, 33, 33, 0.08);
}

/* ── Mobile Menu ──────────────────────────── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: menuLinkIn 0.4s ease forwards;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }

@keyframes menuLinkIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-3px) rotate(-45deg);
    width: 24px;
    margin-left: 0;
}

/* ── Hero Animations ──────────────────────── */
.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-desc {
    animation: fadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-ctas {
    animation: fadeUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Service Cards ────────────────────────── */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ── Scroll Reveal (below the fold only) ─── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
    }

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

/* ── About Label ──────────────────────────── */
.about-label,
.service-label,
.location-label {
    position: relative;
    display: inline-block;
}

.about-label::before,
.service-label::before,
.location-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: currentColor;
    vertical-align: middle;
    margin-right: 10px;
    opacity: 0.5;
}

/* ── Button Focus States ──────────────────── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #7a2121;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Image Aspect Ratio Protection ────────── */
img {
    max-width: 100%;
    height: auto;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7a2121;
}

/* ── Print Styles ─────────────────────────── */
@media print {
    #navbar,
    #mobile-menu,
    .scroll-indicator {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}
