/* ========================================
   Marita Q Barlahan-Biag — Custom Styles
   Classic & Elegant Medical Practice
   ======================================== */

/* --- Custom Properties --- */
:root {
    --color-midnight-800: #0A2342;
    --color-midnight-900: #06172e;
    --color-mint-400: #6bb3a6;
    --color-mint-500: #4f968a;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-body: 'Lora', 'Times New Roman', serif;
    --font-sans: 'Inter', system-ui, sans-serif;
}

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

body {
    font-family: var(--font-body);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
}

/* --- Scroll Reveal Animations --- */
.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[data-state="hidden"] {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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[data-state="visible"] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Navbar Transition --- */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(6, 23, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

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

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

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

/* --- Menu Button Animation --- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 20px;
    margin-right: 0;
}

/* --- Input Focus Styles --- */
input:focus, textarea:focus {
    background-color: rgba(10, 35, 66, 0.8);
}

/* --- Selection Color --- */
::selection {
    background-color: rgba(107, 179, 166, 0.3);
    color: #fff;
}

/* --- Smooth Scroll Offset for Fixed Nav --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- Subtle Card Tilt on Hover --- */
.group:hover .group-hover\:-translate-y-1 {
    will-change: transform;
}

/* --- Print Styles --- */
@media print {
    #navbar, #mobileMenu, .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: #1a1a1a !important;
    }
    
    a {
        color: #0A2342 !important;
    }
}
