/* ============================================
   Dr. Robert Ray — Custom Styles
   ============================================ */

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

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

body {
    background-color: #030810;
    color: #D1F5E6;
}

::selection {
    background: rgba(94, 234, 212, 0.2);
    color: #F0FBF7;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(3, 8, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(94, 234, 212, 0.06);
}

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

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

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

/* ============================================
   Services Cards
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* ============================================
   Approach Cards
   ============================================ */
.approach-card {
    position: relative;
}

.approach-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.approach-card:hover::after {
    opacity: 1;
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

/* ============================================
   Form Inputs
   ============================================ */
input:focus,
textarea:focus {
    border-color: rgba(94, 234, 212, 0.6) !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(209, 245, 230, 0.15);
}

/* ============================================
   Scroll Reveal (below the fold only)
   ============================================ */
.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
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card,
    .approach-card,
    .testimonial-card {
        transition: none;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    section[id] {
        scroll-margin-top: 72px;
    }
}
