/* =============================================
   Robin M. Ayers, OD — Custom Styles
   Classic & Elegant · Burgundy + Blush
   ============================================= */

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

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

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf2f4;
}
::-webkit-scrollbar-thumb {
    background: #c22045;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a11635;
}

/* ---------- Navbar ---------- */
#navbar {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(161, 22, 53, 0.08);
    box-shadow: 0 1px 0 rgba(161, 22, 53, 0.05);
}

#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(161, 22, 53, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #a11635;
    transition: width 0.3s ease;
}

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

/* ---------- Hero ---------- */
#hero {
    position: relative;
}

/* ---------- Service Labels ---------- */
.service-label {
    position: relative;
    display: inline-block;
}

.service-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1.5px;
    background: currentColor;
    vertical-align: middle;
    margin-right: 8px;
    opacity: 0.5;
}

/* ---------- Service Cards ---------- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #a11635, #dc3d64);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ---------- About Image ---------- */
.about-image-wrapper {
    position: relative;
    z-index: 1;
}

/* ---------- Form ---------- */
#appointment-form input:focus,
#appointment-form select:focus,
#appointment-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(161, 22, 53, 0.1);
}

/* ---------- Mobile Nav ---------- */
.mobile-nav-link {
    position: relative;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    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 entrance */
#hero .hero-icon {
    animation: scaleIn 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

#hero h1 {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

#hero p {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

#hero .flex.flex-col\/sm {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

#hero .mt-20 {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

/* Hero decorations */
.hero-decoration {
    animation: fadeIn 2s ease forwards;
}

.hero-deco-1 {
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-deco-2 {
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-deco-3 {
    animation-delay: 1s;
    opacity: 0;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Focus Styles ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #a11635;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Print ---------- */
@media print {
    #navbar, #mobile-menu-btn, .service-card::before {
        display: none !important;
    }
    
    body {
        color: #1a1a1a;
        background: white;
    }
    
    #hero {
        min-height: auto;
        background: #a11635 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
