/* ============================================
   Ruiz Ray Marina — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: rgba(6, 78, 59, 0.15);
    color: #064e3b;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content is visible
   by default; JS adds the animation class.
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background-color: rgba(253, 252, 248, 0);
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* ============================================
   Hamburger Animation
   ============================================ */
#menuBtn.active #menuIcon line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.active #menuIcon line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active #menuIcon line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ============================================
   Image hover parallax-like effect (subtle)
   ============================================ */
.group img {
    will-change: transform;
}

/* ============================================
   Focus styles for accessibility
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #064e3b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Button ripple / press effect
   ============================================ */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   Subtle pattern overlay for sections
   ============================================ */
section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(6, 78, 59, 0.03) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

section.bg-emerald-800::before {
    background-image: radial-gradient(circle at 1px 1px, rgba(253, 252, 248, 0.04) 1px, transparent 0);
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    nav, #mobileMenu, .reveal { display: none; }
    body { background: white; color: black; }
    section { page-break-inside: avoid; }
}
