/* ============================================
   Smith William L DDS — Custom Styles
   Premium Dark Luxury Dental Website
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #f0f4f8;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #C9A84C;
    color: #0A1628;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    font-weight: 600;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* --- Navbar --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #C9A84C, #4ade80);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #C9A84C !important;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(3, 8, 16, 0.92) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --- Mobile Menu --- */
#mobile-menu {
    opacity: 0;
    pointer-events: none;
}

#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Menu button animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* --- Scroll Indicator --- */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C9A84C, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(201, 168, 76, 0.1);
}

/* --- Info Cards --- */
.info-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* --- Form Inputs --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #C9A84C, #96721e);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #EAC766, #C9A84C);
}

/* --- Scroll Reveal (progressive enhancement) --- */
/* Default state: visible */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }
.reveal[data-delay="6"] { transition-delay: 0.6s; }

/* Hidden state — only applied via JS */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-hidden {
        opacity: 1;
        transform: translateY(0);
    }
    html {
        scroll-behavior: auto;
    }
    .animate-scroll-indicator {
        animation: none;
    }
}

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