/* ═══════════════════════════════════════════════════════════
   Dr Cell Repair — Custom Styles
   Palette: Midnight Blue (#0A1628) + Mint (#5EEAD4)
   ═══════════════════════════════════════════════════════════ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(94, 234, 212, 0.25);
    color: #5EEAD4;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0A1628;
}
::-webkit-scrollbar-thumb {
    background: #325184;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5EEAD4;
}

/* ── Navbar ── */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

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

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #5EEAD4;
    transition: width 0.3s ease;
}

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

/* ── Mobile menu ── */
#mobileMenu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobileMenu.open .mobile-link {
    animation: fadeDown 0.4s ease forwards;
    opacity: 1;
}

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

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Menu toggle animation ── */
#menuToggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(8px);
}
#menuToggle.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

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

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 70% 40%, rgba(94, 234, 212, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Service cards ── */
.service-card {
    position: relative;
    overflow: hidden;
}

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

.service-card:hover::before {
    background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.5), transparent);
}

/* ── Testimonial cards ── */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 20px;
    right: 28px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 80px;
    font-weight: 700;
    color: rgba(94, 234, 212, 0.06);
    line-height: 1;
    pointer-events: none;
}

/* ── Scroll reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ── Focus styles ── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #5EEAD4;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Image hover zoom ── */
img {
    display: block;
    max-width: 100%;
}
