/* Custom styles for Joshua Goldman MD website */

/* Ensure smooth scrolling and no layout shift */
html {
    scroll-behavior: smooth;
}

/* Base font settings */
body {
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Serif font */
.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF7F2;
}
::-webkit-scrollbar-thumb {
    background: #d1ccc3;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}

/* Hero section - ensure content is visible without JS */
#hero {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Floating animation - progressive enhancement via JS */
@media (prefers-reduced-motion: no-preference) {
    @keyframes float1 {
        0%, 100% { transform: translateY(0px) rotate(0deg); }
        50% { transform: translateY(-12px) rotate(1deg); }
    }
    @keyframes float2 {
        0%, 100% { transform: translateY(0px) rotate(0deg); }
        50% { transform: translateY(-8px) rotate(-1deg); }
    }
    @keyframes float3 {
        0%, 100% { transform: translateY(0px) scale(1); }
        50% { transform: translateY(-15px) scale(1.02); }
    }
    @keyframes drift {
        0%, 100% { transform: translate(0, 0) rotate(0deg); }
        25% { transform: translate(8px, -12px) rotate(2deg); }
        50% { transform: translate(-5px, -20px) rotate(-1deg); }
        75% { transform: translate(-10px, -8px) rotate(-2deg); }
    }
    @keyframes shapeRotate {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
    @keyframes shapeRotateReverse {
        from { transform: rotate(360deg); }
        to { transform: rotate(0deg); }
    }
    
    .float-1 { animation: float1 4s ease-in-out infinite; }
    .float-2 { animation: float2 5s ease-in-out infinite; }
    .float-3 { animation: float3 6s ease-in-out infinite; }
    .drift { animation: drift 8s ease-in-out infinite; }
    .spin-slow { animation: shapeRotate 20s linear infinite; }
    .spin-slow-reverse { animation: shapeRotateReverse 25s linear infinite; }
    
    /* Scroll reveal - progressive enhancement */
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.visible {
        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; }
}

/* Reduced motion - all animations disabled */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 247, 242, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px -4px rgba(0, 0, 0, 0.08);
}

/* Primary button */
.btn-primary {
    background: linear-gradient(135deg, #e05230 0%, #c93d22 100%);
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #c93d22 0%, #a8301c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(224, 82, 48, 0.45);
}

/* Service card hover */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 50px -12px rgba(168, 48, 28, 0.2);
}
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(3deg);
}
.service-icon {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card shadows */
.card-shadow {
    box-shadow: 0 4px 40px -8px rgba(168, 48, 28, 0.12), 0 2px 12px -4px rgba(0, 0, 0, 0.06);
}
.card-shadow-lg {
    box-shadow: 0 8px 60px -12px rgba(168, 48, 28, 0.18), 0 4px 20px -6px rgba(0, 0, 0, 0.08);
}

/* Nav link underline */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e05230;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open {
    transform: translateX(0);
}

/* Dot pattern */
.geo-pattern {
    background-image: radial-gradient(circle at 2px 2px, rgba(224, 82, 48, 0.08) 1px, transparent 0);
    background-size: 24px 24px;
}

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

/* Ensure images don't shift layout */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
