/* ============================================
   Mi Peru Borinqueno — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Custom clip for hero */
.clip-hero-right {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Eyebrow utility */
.eyebrow {
    letter-spacing: 0.25em;
}

/* Navbar transitions */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 246, 237, 0.97);
    backdrop-blur-md;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif {
    color: #782d1c !important;
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu button animation */
.menu-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #4a3728;
    transition: all 0.3s ease;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero animations */
.hero-eyebrow {
    animation: slideUp 0.8s ease forwards;
}

.hero-title {
    animation: slideUp 0.8s ease 0.15s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-subtitle {
    animation: slideUp 0.8s ease 0.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* Fallback: hide reveals by default, show via JS */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left {
    transform: translateX(-30px);
}

.reveal-right {
    transform: translateX(30px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger children */
.reveal-up:nth-child(1) { transition-delay: 0s; }
.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }
.reveal-up:nth-child(5) { transition-delay: 0.4s; }
.reveal-up:nth-child(6) { transition-delay: 0.5s; }

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s 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; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d45a2e;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #d45a2e;
    color: #faf6ed;
}

/* Smooth image loading */
img {
    loading: lazy;
}

/* Print styles */
@media print {
    #navbar, #mobileMenu, .reveal-up, .reveal-left, .reveal-right {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
