/* ==========================================================================
   VARIABLES DE SISTEMA (Diseño Premium)
   ========================================================================== */
:root {
    /* Paleta de Colores Refinada */
    --bg-base: #030303; /* Aún más oscuro que antes para mayor contraste */
    --surface-100: rgba(20, 20, 22, 0.4);
    --surface-200: rgba(30, 30, 35, 0.6);
    
    --text-primary: #F5F5F5;
    --text-secondary: #A0A0A5;
    
    /* El Celeste Metálico del Brandbook, ajustado para pantallas OLED */
    --accent-blue: #3A9AD9;
    --accent-glow: rgba(58, 154, 217, 0.15);
    
    /* Bordes y Reflejos */
    --border-light: rgba(255, 255, 255, 0.06);
    --border-highlight: rgba(255, 255, 255, 0.12);
    
    /* Timings de Animación Suaves */
    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   RESET & SCROLLBAR
   ========================================================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

::selection { 
    background-color: var(--accent-blue); 
    color: #fff; 
}

/* Custom Scrollbar Premium */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   FONDOS & AMBIENTACIÓN (Orbes Animados)
   ========================================================================== */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.35;
    animation: pulseOrb 12s infinite alternate ease-in-out;
}
.orb-1 { 
    width: 60vw; height: 60vw; 
    max-width: 600px; max-height: 600px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
    top: -20%; left: -10%; 
}
.orb-2 { 
    width: 50vw; height: 50vw; 
    max-width: 500px; max-height: 500px;
    background: radial-gradient(circle, #ffffff 0%, transparent 70%);
    bottom: 10%; right: -15%; 
    opacity: 0.1;
    animation-delay: -5s;
}

@keyframes pulseOrb {
    0% { transform: scale(1) translate(0, 0); opacity: 0.25; }
    100% { transform: scale(1.1) translate(2%, 2%); opacity: 0.4; }
}

/* ==========================================================================
   NAVBAR (Glassmorphism Avanzado)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    padding: 1.5rem 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
}
.navbar.scrolled {
    background: rgba(3, 3, 3, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 6%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.logo img { 
    height: 32px; 
    transition: var(--transition-fast);
}
.logo img:hover {
    opacity: 0.8;
}

.nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-links a { 
    color: var(--text-secondary); 
    text-decoration: none; 
    font-size: 0.85rem; 
    font-weight: 500; 
    letter-spacing: 0.5px;
    transition: var(--transition-fast); 
}
.nav-links a:hover, .nav-links a.active { 
    color: var(--text-primary); 
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.btn-nav {
    border: 1px solid var(--border-highlight);
    padding: 0.6rem 1.8rem;
    border-radius: 100px;
    background: var(--surface-100);
    color: var(--text-primary) !important;
}
.btn-nav:hover { 
    background: var(--text-primary); 
    color: var(--bg-base) !important; 
    border-color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* ==========================================================================
   HERO SECTION (Tipografía de Alto Impacto)
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 6%;
    margin-top: 40px;
    position: relative;
}
.hero-content { flex: 1.2; padding-right: 5%; z-index: 2; }

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: var(--surface-100);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    font-size: 0.7rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.fluid-title {
    font-size: clamp(3.5rem, 7vw, 7.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}
.text-gradient {
    background: linear-gradient(135deg, #ffffff 20%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: -0.01em;
}

/* Botones Principales */
.hero-btns { display: flex; align-items: center; gap: 2rem; }

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
    padding: 1.1rem 2.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}
.btn-primary:hover {
    transform: translateY(-4px);
    background: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.btn-secondary {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition-fast);
}
.btn-secondary::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; width: 0%; height: 1px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}
.btn-secondary:hover { color: var(--text-primary); }
.btn-secondary:hover::after { width: 100%; }

.hero-image { 
    flex: 1; 
    display: flex; 
    justify-content: center; 
    z-index: 2;
    position: relative;
}
.hero-image img { 
    width: 100%; 
    max-width: 550px; 
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.9)); 
}
.levitate { animation: levitatePremium 8s cubic-bezier(0.45, 0, 0.55, 1) infinite; }

@keyframes levitatePremium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(1.5deg); }
}

/* ==========================================================================
   BENTO BOX (Tarjetas de Ingeniería)
   ========================================================================== */
.bento-section { 
    padding: 10rem 6%; 
    position: relative;
    z-index: 2;
}
.bento-header { text-align: center; margin-bottom: 5rem; }
.bento-header h2 { 
    font-size: clamp(2.5rem, 5vw, 4rem); 
    font-weight: 300; 
    line-height: 1.05; 
    letter-spacing: -0.03em;
}
.bento-header p { 
    color: var(--text-secondary); 
    margin-top: 1.5rem; 
    font-size: 1.1rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-card {
    background: var(--surface-100);
    border: 1px solid var(--border-light);
    border-radius: 30px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Efecto de luz interna al hacer hover */
.bento-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top left, var(--accent-glow), transparent 60%);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 0;
}

.bento-card:hover { 
    background: var(--surface-200); 
    border-color: var(--border-highlight);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.bento-card:hover::before { opacity: 1; }

.card-content { position: relative; z-index: 1; }
.card-wide { grid-column: span 3; } 

.card-number { 
    color: var(--accent-blue); 
    font-size: 0.85rem; 
    font-weight: 700; 
    margin-bottom: auto; 
    letter-spacing: 2px;
}
.bento-card h3 { 
    font-size: 1.8rem; 
    margin-bottom: 0.8rem; 
    font-weight: 600;
    letter-spacing: -0.02em;
}
.bento-card p { 
    color: var(--text-secondary); 
    font-size: 1rem; 
    font-weight: 300;
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA (Intersection Observer)
   ========================================================================== */
.fade-in-up { opacity: 0; transform: translateY(40px); animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

@keyframes fadeInUp { 
    to { opacity: 1; transform: translateY(0); } 
}

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile First & Tablets)
   ========================================================================== */
@media (max-width: 900px) {
    .bento-grid { 
        grid-template-columns: repeat(2, 1fr); 
        grid-template-rows: auto;
    }
    .card-wide { grid-column: span 2; }
}

@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; padding-top: 120px; }
    .hero-content { padding-right: 0; margin-bottom: 4rem; }
    .hero-subtitle { margin: 0 auto 2.5rem auto; }
    .hero-btns { flex-direction: column; gap: 1.5rem; justify-content: center; }
    .btn-secondary { margin-left: 0; }
    
    .bento-grid { grid-template-columns: 1fr; }
    .card-wide { grid-column: span 1; }
    .bento-card { padding: 2rem; min-height: 250px; }
    
    .nav-links { display: none; /* Aquí iría un menú hamburguesa en JS */ }
}