/* ==========================================================================
   SCJ GROUP — Custom CSS
   Complementa Tailwind CSS con animaciones, refinamientos y detalles
   ========================================================================== */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out both;
}

/* Hover lift effect para cards */
.hover-lift {
    transition: transform 0.25s ease-out, border-color 0.25s ease-out, box-shadow 0.25s ease-out;
}

.hover-lift:hover {
    transform: translateY(-3px);
    border-color: rgba(28, 124, 232, 0.4);
    box-shadow: 0 8px 24px -8px rgba(11, 30, 63, 0.1);
}

/* ==========================================================================
   HEADER scroll behavior
   ========================================================================== */

#site-header.scrolled {
    background-color: rgba(11, 30, 63, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   FORM ENHANCEMENTS
   ========================================================================== */

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

/* Form input focus ring mejorado */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.15);
}

/* Placeholder color */
input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   TYPOGRAPHY REFINEMENTS
   ========================================================================== */

/* Optical sizing para font pequeño */
.font-serif {
    font-feature-settings: "kern" 1, "liga" 1;
}

/* Leading-tight refinado para titulares grandes */
h1, h2 {
    text-wrap: balance;
}

/* ==========================================================================
   BACKGROUND PATTERNS
   ========================================================================== */

/* Subtle noise texture para heros */
.noise-overlay {
    position: relative;
}

.noise-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

/* Scroll snap para clientes (si se amerita sección horizontal en mobile futuro) */
.scroll-snap-x {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.scroll-snap-x > * {
    scroll-snap-align: start;
}

/* ==========================================================================
   MEDIA QUERIES específicas
   ========================================================================== */

/* Prevent font-size jump en mobile */
@media (max-width: 768px) {
    h1 {
        letter-spacing: -0.03em;
    }
}

/* Reduce motion para accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   PRINT STYLES (para que la web impresa quede decente)
   ========================================================================== */

@media print {
    header, footer, .hover-lift::after {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
