/* Keep Moving Physical Therapy — Custom Styles */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #e55a3a;
    color: white;
}

/* ===== Navigation ===== */
.nav {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav.scrolled {
    background: rgba(254, 253, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(45, 36, 32, 0.08);
}

.nav.scrolled .nav-link {
    color: #5C4A40;
}

.nav.scrolled .font-serif {
    color: #2D2420;
}

.nav.scrolled .text-warm-600 {
    color: #7A6558;
}

.nav.scrolled .mobile-menu {
    background: #fefdf9;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
}

/* ===== Floating Cards ===== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
}

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

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e55a3a, #f4ad94);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

/* ===== Mobile Menu ===== */
.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

.mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
}

.mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

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

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

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

/* ===== Form Styles ===== */
input:focus, select:focus, textarea:focus {
    outline: none;
}

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

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

/* ===== Utility ===== */
.text-balance {
    text-wrap: balance;
}
