/* ============================================
   Terrie Morton Acker — Medical Practice
   Classic & Elegant | Charcoal + Coral
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(232, 115, 74, 0.2);
    color: #36454F;
}

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* --- Navbar --- */
#navbar {
    background: transparent;
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: rgba(255, 250, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: rgba(226, 228, 231, 0.5);
    box-shadow: 0 1px 20px rgba(20, 27, 33, 0.06);
}

#navbar.scrolled .font-serif {
    color: #252F36 !important;
}

#navbar.scrolled .mobile-link {
    color: #4A515C;
}

/* --- Floating Card Animations --- */
.floating-card-1 {
    animation: float1 6s ease-in-out infinite;
}

.floating-card-2 {
    animation: float2 7s ease-in-out infinite;
}

.floating-card-3 {
    animation: float3 5.5s ease-in-out infinite;
}

.floating-card-4 {
    animation: float4 6.5s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(0.5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(-0.5deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(-0.3deg); }
}

/* --- Mobile Menu --- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
    padding-bottom: 0;
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(226, 228, 231, 0.5);
}

.mobile-link:last-child {
    border-bottom: none;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #A1A8B2;
}

/* --- Utility --- */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3.5rem) !important;
    }
}
