/* ============================================
   Nancy Haugen Ph.D. — Custom Styles
   Bold Editorial | Terracotta & Sand
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: #d1411c;
    color: #faf8f5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
    background: #d4a88a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d1411c;
}

/* Navigation */
#navbar {
    backdrop-filter: blur(0px);
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-logo-text {
    color: #2a2119;
}

#navbar.scrolled .nav-logo-sub {
    color: #765b3a;
}

/* Mobile Menu */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s 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: translateY(6px) rotate(45deg);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 5;
}

/* Hero */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #faf8f5, transparent);
    pointer-events: none;
}

/* Scroll Indicator Animation */
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* Service Cards */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* About / Approach Sections */
.about-image,
.approach-image {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-image.revealed,
.approach-image.revealed {
    opacity: 1;
    transform: translateX(0);
}

.about-content,
.approach-content {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-content.revealed,
.approach-content.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Contact */
.contact-info,
.contact-form {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-info.revealed,
.contact-form.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* General Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal,
    .service-card,
    .about-image,
    .about-content,
    .approach-image,
    .approach-content,
    .contact-info,
    .contact-form {
        /* Animated states handled by JS */
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal,
    .service-card,
    .about-image,
    .about-content,
    .approach-image,
    .approach-content,
    .contact-info,
    .contact-form {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .mobile-nav-link {
        opacity: 1;
        transform: none;
    }
}

/* Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d1411c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 767px) {
    #hero::after {
        height: 60px;
    }
}

/* Print Styles */
@media print {
    #navbar,
    #mobile-menu,
    .reveal {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    #hero {
        min-height: auto;
        padding: 2rem 0;
    }
}
