/* ==========================================
   Redmon Family Practice — Custom Styles
   ========================================== */

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(154, 27, 51, 0.15);
    color: #7a1528;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FFFBF5;
}
::-webkit-scrollbar-thumb {
    background: #f3a8b8;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e86a8a;
}

/* ==========================================
   Header
   ========================================== */
#site-header {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#site-header.scrolled {
    background: rgba(255, 251, 245, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(154, 27, 51, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: #9A1B33;
    border-radius: 999px;
    transition: transform 0.3s ease, width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    width: 24px;
}

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

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

/* ==========================================
   Hero
   ========================================== */
#hero {
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF5F7 50%, #FFFBF5 100%);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ==========================================
   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, #9A1B33, #f3a8b8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

.stagger-children > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.3s; }

.stagger-children.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Form Styles
   ========================================== */
input:focus,
select:focus,
textarea:focus {
    border-color: #d4a0b5 !important;
    box-shadow: 0 0 0 4px rgba(154, 27, 51, 0.08) !important;
}

input::placeholder,
textarea::placeholder {
    color: #b8a898;
}

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='%239c8878' 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;
}

/* ==========================================
   Button Focus States
   ========================================== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #9A1B33;
    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, .stagger-children > * {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 768px) {
    #hero h1 {
        font-size: clamp(3rem, 5vw, 4.5rem);
    }
}
