/* ============================================
   Cheryl E. Smith, MD — Primary Care Website
   Bold Editorial Style | Navy + Gold Palette
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #0A1628;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0A1628;
}
::-webkit-scrollbar-thumb {
    background: #C9A84C;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4B96A;
}

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

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-navy-900 {
    color: #fff !important;
}

#navbar.scrolled .text-navy-600,
#navbar.scrolled .text-navy-700 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

#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; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }

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

/* ---- Hero Animations ---- */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-anim:nth-child(1) { transition-delay: 0.2s; }
.hero-anim:nth-child(2) { transition-delay: 0.4s; }
.hero-anim:nth-child(3) { transition-delay: 0.6s; }
.hero-anim:nth-child(4) { transition-delay: 0.8s; }

/* ---- Hero Orbs ---- */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, transparent 70%);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(30, 58, 107, 0.4) 0%, transparent 70%);
    bottom: -5%;
    left: -5%;
    animation-delay: -3s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.1) 0%, transparent 70%);
    top: 40%;
    left: 20%;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ---- Section Eyebrow ---- */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-sans;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #C9A84C;
}

.section-eyebrow::before {
    content: '';
    display: block;
    width: 32px;
    height: 1.5px;
    background: #C9A84C;
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default state for reveal elements (progressive enhancement) */
.reveal {
    transform: translateY(24px);
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---- Service Cards ---- */
.service-card {
    opacity: 1;
    transform: translateY(0);
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.service-card {
    transform: translateY(30px);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Button Hover Effects ---- */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ---- 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;
    }
    
    .hero-anim {
        opacity: 1;
        transform: none;
    }
    
    .hero-orb {
        animation: none;
    }
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .font-serif.text-5xl {
        font-size: 2.5rem;
    }
    
    .font-serif.text-4xl {
        font-size: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .font-serif.text-6xl {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .font-serif.text-6xl {
        font-size: 4.5rem;
    }
}

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

/* ---- Print ---- */
@media print {
    #navbar, .hero-orb, button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
