/* ============================================
   Crescent Clinic Indy — Custom Styles
   Premium Dark Luxury Theme
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --color-dark: #0d0d0d;
    --color-dark-light: #1a1a1a;
    --color-dark-card: #141414;
    --color-terracotta: #c4956a;
    --color-terracotta-dark: #a07850;
    --color-sand: #e8d5c4;
    --color-sand-light: #f5ece4;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-dark);
    color: var(--color-sand);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Selection --- */
::selection {
    background-color: var(--color-terracotta);
    color: var(--color-dark);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--color-terracotta);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-terracotta-dark);
}

/* --- Hero Animations --- */
.hero-element {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s ease forwards;
}

.hero-element:nth-child(1) { animation-delay: 0.1s; }
.hero-element:nth-child(2) { animation-delay: 0.3s; }
.hero-element:nth-child(3) { animation-delay: 0.5s; }
.hero-element:nth-child(4) { animation-delay: 0.7s; }
.hero-element:nth-child(5) { animation-delay: 0.9s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Reveal (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Default state: always visible for accessibility */
.scroll-reveal {
    opacity: 1;
    transform: none;
}

/* --- Navbar --- */
#navbar {
    backdrop-filter: blur(0px);
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(196, 149, 106, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-terracotta);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-terracotta) !important;
}

/* --- Mobile Menu --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }

/* --- Mobile Menu Button --- */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* --- Buttons --- */
button, a[type="submit"] {
    cursor: pointer;
}

/* --- Form Styles --- */
input:focus, select:focus, textarea:focus {
    border-color: rgba(196, 149, 106, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.1);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c4956a' 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;
}

/* --- Back to Top --- */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* --- Utility --- */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}
