/* ============================================
   OWEN JAMES MD — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: #c9a84c;
    color: #0a1a3a;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f3f9;
}
::-webkit-scrollbar-thumb {
    background: #0a1a3a;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1e2a48;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Navbar solid state */
nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(10, 26, 58, 0.06);
}

nav.scrolled .nav-logo-text,
nav.scrolled .nav-logo-sub,
nav.scrolled .nav-link,
nav.scrolled .nav-btn-border,
nav.scrolled .nav-menu-btn {
    color: #0a1a3a !important;
}

nav.scrolled .nav-logo-border {
    border-color: rgba(10, 26, 58, 0.3) !important;
}

nav.scrolled .nav-btn-border:hover {
    background: #0a1a3a !important;
    color: #ffffff !important;
}

/* Dark navbar (hero area) */
nav:not(.scrolled) .nav-logo-text,
nav:not(.scrolled) .nav-logo-sub,
nav:not(.scrolled) .nav-link,
nav:not(.scrolled) .nav-btn-border,
nav:not(.scrolled) .nav-menu-btn {
    color: #0a1a3a;
}

/* --- Hero Badge Animation --- */
.hero-badge {
    animation: fadeSlideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-badge {
    opacity: 0;
    transform: translateY(20px);
}

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

/* --- Hero Headline --- */
h1 {
    animation: fadeSlideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s forwards;
    opacity: 0;
    transform: translateY(24px);
}

/* Hero paragraphs and CTAs */
#hero p,
#hero > div > div > div:last-child > a {
    animation: fadeSlideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
    opacity: 0;
    transform: translateY(24px);
}

#hero > div > div:last-child {
    animation: fadeSlideUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
    opacity: 0;
    transform: translateX(20px);
}

/* --- Scroll Line Animation --- */
.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* --- Service Cards --- */
.service-card {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
    background: #fafbfc;
    transform: translateY(-2px);
}

/* --- Scroll Reveal (progressive enhancement) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion - never hide content */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .reveal.revealed {
        opacity: 1;
        transform: none;
    }
    .scroll-line {
        animation: none;
    }
    h1, .hero-badge {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* --- Mobile Menu --- */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-link:hover {
    color: #c9a84c;
}

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

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

/* --- Form Select Arrow --- */
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='%230a1a3a' 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 0 center;
    padding-right: 2rem;
}

/* --- Utility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
