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

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

body {
    background-color: #020617;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #c9a227;
}

/* Selection */
::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #f8fafc;
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(400%); opacity: 0; }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Staggered reveal for service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.5s ease,
                background-color 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Process steps stagger */
section#proceso .reveal:nth-child(1) { transition-delay: 0.05s; }
section#proceso .reveal:nth-child(2) { transition-delay: 0.15s; }
section#proceso .reveal:nth-child(3) { transition-delay: 0.25s; }
section#proceso .reveal:nth-child(4) { transition-delay: 0.35s; }

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(2, 6, 23, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid rgba(201, 162, 39, 0.1);
}

/* Gold shimmer effect on hover for buttons */
button::after, a::after {
    content: '';
    position: relative;
    z-index: 1;
}

/* Mobile link animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* Form focus states */
input:focus, select:focus, textarea:focus {
    border-color: rgba(201, 162, 39, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

/* Smooth image loading */
img {
    opacity: 0;
    transition: opacity 0.6s ease;
}

img.loaded {
    opacity: 1;
}

/* Parallax-like subtle effect for hero */
#hero {
    will-change: transform;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Subtle gold glow on focus for inputs */
input:focus, select:focus, textarea:focus {
    border-color: rgba(201, 162, 39, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.08), 0 1px 2px rgba(2, 6, 23, 0.5);
}

/* Print styles */
@media print {
    nav, #contact-form, #form-success, iframe {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .font-serif {
        color: #0f172a !important;
    }
}
