/* ============================================
   Dan Hauser Medical Practice — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Geometric Background Shapes --- */
.geo-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

.geo-circle-1 {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 96, 58, 0.06) 0%, transparent 70%);
    top: -100px;
    right: -150px;
}

.geo-circle-2 {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(226, 184, 90, 0.08) 0%, transparent 70%);
    bottom: 20%;
    left: -100px;
}

.geo-square-1 {
    width: 120px;
    height: 120px;
    background: rgba(212, 96, 58, 0.05);
    border-radius: 24px;
    transform: rotate(45deg);
    top: 40%;
    right: 5%;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(226, 184, 90, 0.06);
    top: 60%;
    left: 3%;
    transform: rotate(-15deg);
}

.geo-dots {
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, rgba(212, 96, 58, 0.1) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    bottom: 10%;
    right: 10%;
    border-radius: 50%;
}

/* --- Floating Card Animations --- */
.floating-card {
    position: absolute;
    z-index: 20;
}

.card-top {
    top: -20px;
    right: -20px;
    animation: float1 4s ease-in-out infinite;
}

.card-bottom {
    bottom: 40px;
    left: -30px;
    animation: float2 5s ease-in-out infinite;
}

.float-card {
    animation-duration: 4s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

@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(-16px) rotate(-1deg); }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    display: flex;
    justify-content: center;
}

.scroll-mouse {
    width: 28px;
    height: 44px;
    border: 2px solid rgba(26, 26, 26, 0.2);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-dot {
    width: 4px;
    height: 8px;
    background: rgba(212, 96, 58, 0.6);
    border-radius: 2px;
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.3; }
}

/* --- Navbar --- */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav-scrolled {
    background-color: rgba(253, 248, 240, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* --- Mobile Menu --- */
.mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

.mobile-link {
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: #d4603a;
}

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

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

/* --- Scroll Reveal (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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; }
}

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

/* --- Selection Color --- */
::selection {
    background: rgba(212, 96, 58, 0.2);
    color: #1a1a1a;
}

/* --- Mobile responsiveness tweaks --- */
@media (max-width: 640px) {
    .card-top {
        right: 0;
        top: -15px;
    }

    .card-bottom {
        left: 0;
        bottom: 20px;
    }

    .floating-card {
        position: relative;
        margin-top: 16px;
        animation: none !important;
    }

    .geo-shape {
        display: none;
    }
}
