/* ============================================
   Perú Rican — Custom Styles
   Classic & Elegant | Burgundy & Blush
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(127, 31, 31, 0.15);
    color: #7f1f1f;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FAF7F5;
}

::-webkit-scrollbar-thumb {
    background: #d44040;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9c2323;
}

/* --- Primary Button --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7f1f1f 0%, #9c2323 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #9c2323 0%, #b82e2e 100%);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-primary:active {
    transform: translateY(0);
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    color: #ffffff;
}

#navbar.scrolled {
    background: rgba(250, 247, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1C1917;
    box-shadow: 0 1px 0 rgba(127, 31, 31, 0.1);
}

#navbar.scrolled .nav-link {
    color: #1C1917;
}

#navbar.scrolled .nav-link:hover {
    color: #7f1f1f;
}

#navbar.scrolled .btn-primary {
    background: linear-gradient(135deg, #7f1f1f 0%, #9c2323 100%);
    color: #ffffff;
}

#navbar.scrolled .menu-line {
    background: #1C1917;
}

/* --- Mobile Menu --- */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #7f1f1f;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mobile-link:hover::after {
    width: 80%;
}

/* --- Scroll Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .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; }
}

/* --- Scroll Line Animation --- */
@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* --- Back to Top --- */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:hover {
    transform: translateY(-3px);
}

/* --- Form Focus States --- */
input:focus,
textarea:focus {
    border-color: #d44040 !important;
    box-shadow: 0 0 0 3px rgba(212, 64, 64, 0.1) !important;
}

/* --- Image Hover Containers --- */
.overflow-hidden {
    position: relative;
}

.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61, 12, 12, 0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: inherit;
}

/* --- Section Transitions --- */
section {
    position: relative;
}

/* --- Print Styles --- */
@media print {
    #navbar,
    #back-to-top,
    .animate-scroll-line {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
