/* style.css - VERSIÓN FINAL INTEGRAL PIÑÓN */

/* Montserrat se carga desde cada HTML con <link rel="preconnect"> + <link rel="stylesheet">
   para evitar render-blocking por @import (B1) */

/* --- FUENTES LOCALES --- */
@font-face {
    font-family: 'TituloBold';
    src: url('material/Fuentes/FontsFree-Net-Lulo-Clean-W01-One-Bold.ttf') format('truetype');
    font-weight: normal; font-style: normal; font-display: block; /* block+preload: espera la fuente, sin salto visible */
}
@font-face {
    font-family: 'TituloOutline';
    src: url('material/Fuentes/Lulo-Clean-OutlinE.otf') format('opentype');
    font-weight: normal; font-style: normal; font-display: block; /* block+preload: espera la fuente, sin salto visible */
}

/* --- CONFIGURACIÓN BASE --- */
:root {
    --font-main:    'TituloBold',    'LULO',        sans-serif;
    --font-outline: 'TituloOutline', 'Montserrat',  sans-serif;
    --nav-height:   90px;
    /* Colors */
    --black:        #000000;
    --white:        #ffffff;
    --gray:         #888888;
    --accent:       #f0c419;
    --accent-dark:  #c9a10e;
    --accent-rgb:   240, 196, 25;
    /* Glass */
    --glass-bg:     rgba(0, 0, 0, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur:   20px;
    /* Radii */
    --r-sm:   4px;
    --r-md:   8px;
    --r-lg:   16px;
    --r-pill: 50px;
    /* Transitions */
    --t-fast: 0.2s;
    --t-base: 0.35s;
    --t-slow: 0.6s;
    --ease:   cubic-bezier(0.4, 0, 0.2, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-y: scroll; } /* reserva espacio del scrollbar siempre — evita salto de layout al navegar */
body { background-color: #000; color: #fff; font-family: 'Montserrat', sans-serif; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

/* --- VIEW TRANSITIONS API — nav persiste entre páginas sin parpadeo --- */
/* Chrome 111+ / Edge 111+. En navegadores sin soporte degrada a corte normal. */
@view-transition { navigation: auto; }

/* El nav queda "fijo" visualmente: el browser lo captura como elemento compartido
   y solo cambia el enlace activo en su interior — nunca desaparece. */
nav { view-transition-name: site-nav; }
::view-transition-old(site-nav),
::view-transition-new(site-nav) { animation: none; mix-blend-mode: normal; }

/* El resto del contenido hace un fade cruzado suave */
::view-transition-old(root) { animation: 180ms ease both vt-fade-out; }
::view-transition-new(root) { animation: 220ms ease both vt-fade-in; }
@keyframes vt-fade-out { to   { opacity: 0; } }
@keyframes vt-fade-in  { from { opacity: 0; } }

/* --- LOADER GLASSMORPHISM -------------------------------------------- */
/* Sobreescribe el background:#000 inline del #loader en todos los HTML */
#loader {
    background: rgba(0, 0, 0, 0.72) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
}

/* --- ENTRADA DE PÁGINA (keyframes disponibles, usados puntualmente) --- */
@keyframes page-enter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- FOCUS VISIBLE GLOBAL (accesibilidad) --- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }

/* --- BOTÓN VOLVER ARRIBA (global, inyectado por main.js) ---
   Esquina inferior izquierda para no chocar con el WhatsApp flotante (inf. derecha) */
#scroll-top-btn {
    position: fixed; bottom: 30px; left: 30px;
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); color: #fff; font-size: 0.9rem;
    cursor: pointer; z-index: 2400;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity var(--t-base), transform var(--t-base), background var(--t-fast), border-color var(--t-fast);
    display: flex; align-items: center; justify-content: center;
}
#scroll-top-btn.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#scroll-top-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }
@media (max-width: 768px) { #scroll-top-btn { bottom: 20px; left: 20px; width: 42px; height: 42px; } }

/* --- ESTADOS ACTIVE (feedback táctil) --- */
button:active:not(:disabled), .filter-btn:active, .cat-pill:active { opacity: 0.8; transition: opacity 0.1s !important; }
.menu-link:active { opacity: 0.6 !important; }

/* --- NAVEGACIÓN PC (WEB NORMAL) --- */
nav {
    height: var(--nav-height) !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.45) 60%, transparent 100%) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    position: fixed !important;
    top: 0; left: 0; width: 100%;
    z-index: 10002 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 50px !important;
    border-bottom: 1px solid transparent !important;
    box-sizing: border-box !important;
    transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease) !important;
}
nav.nav-scrolled {
    background: rgba(0, 0, 0, 0.84) !important;
    border-bottom-color: rgba(240, 196, 25, 0.12) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
}
.nav-logo-img { height: 32px !important; width: auto !important; display: block !important; }
.menu-items { display: flex !important; gap: 30px !important; align-items: center !important; }
.menu-link {
    font-family: var(--font-main) !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    color: #888 !important;
    letter-spacing: 2px !important;
    border-bottom: 2px solid transparent !important;
    padding-bottom: 5px !important;
    transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease) !important;
}
.menu-link.active, .menu-link:hover { color: #fff !important; border-bottom: 2px solid #fff !important; }

/* --- BOTÓN HAMBURGUESA (CON ANIMACIÓN A X) --- */
.menu-toggle {
    display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 10001; padding: 10px;
}
.menu-toggle span { display: block; width: 20px; height: 1.5px; background-color: #fff; transition: all 0.3s ease-in-out; }

/* Animación a X */
.menu-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.menu-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- MENÚ DESPLEGABLE MÓVIL (NAV OVERLAY) --- */
.nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: #000; z-index: 10000; display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 20px; transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    transform: translateY(-100%);
}
.nav-overlay.active { transform: translateY(0); }
.nav-overlay a {
    font-family: var(--font-main); font-size: 0.8rem; color: #777;
    text-transform: uppercase; letter-spacing: 4px; transition: 0.3s;
}
.nav-overlay a:hover { color: #fff; letter-spacing: 6px; }
.nav-overlay a.active { color: #fff !important; letter-spacing: 6px; }

.menu-footer-brand {
    position: absolute; bottom: 50px; font-family: var(--font-main);
    font-size: 0.5rem; color: #333; letter-spacing: 6px; text-transform: uppercase;
}

/* Botón X para cerrar el overlay del menú (inyectado por main.js) */
.nav-overlay-close-btn {
    position: fixed; top: 20px; right: 20px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%; width: 44px; height: 44px;
    color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10010;
    transition: color 0.3s, background 0.3s, transform 0.3s;
}
.nav-overlay-close-btn:hover { color: var(--accent); background: rgba(255,255,255,0.14); transform: rotate(90deg); }

/* --- GRID DE TARJETAS (16:9) --- */
.proyectos-grid, #home-proyectos-grid, #proyectos-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 15px; padding: 120px 5% 50px;
}
#home-proyectos-grid { padding-top: 20px !important; padding-bottom: 50px !important; }
#proyectos-grid { padding-top: 10px !important; transition: opacity 0.45s ease-out, transform 0.45s ease-out; }
.grid-out { opacity: 0; transform: translateY(80px); }

/* Fix: sin borde blanco en iframes de video de fondo */
iframe.video-bg, iframe.hero-video-bg, iframe.hero-video {
    display: block !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: #000 !important;
}
/* Barra negra de cierre en todos los heroes para cubrir artefactos de compositing */
.hero::after, .hero-small::after, .hero-banner::after, .hero-projects::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; background: #000; z-index: 50; pointer-events: none;
}
.hero, .hero-banner, .hero-projects {
    transform: translateZ(0);
    isolation: isolate;
}

.cine-card { position: relative; width: 100%; aspect-ratio: 16 / 9 !important; overflow: hidden; background: #000; border-radius: 12px; }
.cine-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; filter: brightness(1) grayscale(0%); }
.cine-card:hover .cine-img { transform: scale(1.05); }

.cine-overlay {
    position: absolute !important; bottom: 25px !important; left: 0 !important; width: 100% !important;
    display: flex !important; flex-direction: column !important; align-items: center !important; z-index: 10; pointer-events: none;
}
.cine-title {
    font-family: var(--font-main) !important; font-size: 1.1rem !important; 
    text-transform: uppercase; color: #fff; text-align: center !important;
    letter-spacing: 2px; text-shadow: 0 2px 10px rgba(0,0,0,0.9); margin: 0 !important;
}
.cine-info {
    font-family: var(--font-outline) !important; font-size: 0.55rem !important;
    color: #fff; margin-top: 6px !important; letter-spacing: 4px; text-transform: uppercase; opacity: 0.9;
}

/* --- BOTONES DE ACCESO RÁPIDO (INDEX) --- */
.quick-links-container { display: flex; justify-content: center; gap: 15px; padding: 20px 5%; background: #000; }
.quick-btn {
    flex: 1; max-width: 150px; padding: 10px; border: 1px solid #1a1a1a;
    color: #555; font-family: var(--font-main); font-size: 0.55rem;
    text-align: center; letter-spacing: 1px; text-transform: uppercase; transition: 0.3s;
}
.quick-btn:hover { border-color: #fff; color: #fff; }

/* --- FOOTER --- */
footer { background-color: #000; padding: 80px 10% 100px; border-top: 1px solid #111; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 60px; margin-top: 100px; }
.footer-logo { height: 40px; margin-bottom: 25px; display: block; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #888 !important; font-family: 'Montserrat', sans-serif !important; font-size: 0.85rem !important; transition: 0.3s !important; text-decoration: none !important; }
.footer-links a:hover { color: #fff !important; }
.footer-col h4 { font-family: var(--font-main) !important; color: #fff !important; font-size: 0.8rem !important; letter-spacing: 2px !important; text-transform: uppercase !important; margin-bottom: 20px !important; }
.footer-col p { color: #888 !important; font-family: 'Montserrat', sans-serif !important; font-size: 0.85rem !important; line-height: 1.6 !important; }

/* --- ESTILOS NOSOTROS --- */
.about-container { padding: 60px 10% 50px; max-width: 1200px; margin: 0 auto; }
.hero-banner { position: relative; width: 100%; height: 40vh; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #000; margin-bottom: 20px; }
.hero-video-bg { position: absolute; top: 50%; left: 50%; width: 177.78vh; height: 56.25vw; min-width: 100%; min-height: 100%; transform: translate(-50%,-50%); border: none; pointer-events: none; opacity: 1; z-index: 0; }
.hero-title-text { position: relative; z-index: 2; font-family: var(--font-main); font-size: clamp(1.5rem, 4vw, 3rem); color: #fff; text-transform: uppercase; letter-spacing: 5px; transform: translate(0, 30px); text-align: center; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 50px; margin-top: 50px; }
.team-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.member-img, .team-photo { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; border: 2px solid #333; transition: 0.3s; margin-bottom: 20px; }
.team-card:hover .member-img, .team-card:hover .team-photo { border-color: var(--accent); }
.team-name { font-family: var(--font-main); color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: 2px; margin: 0 0 6px; }
.team-role { color: var(--accent); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 14px; }
.team-bio  { color: #888; font-size: 0.85rem; line-height: 1.6; max-width: 240px; }
.team-ig   { display: inline-block; margin-top: 14px; color: #555; font-size: 1.1rem; transition: 0.3s; }
.team-ig:hover { color: var(--accent); }
.roots-section { margin-bottom: 20px; }
.roots-title { font-family: var(--font-main); color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 20px; }
.about-text { color: #888; line-height: 1.8; font-size: 1rem; max-width: min(700px, 100%); }
.about-container { padding: 60px 10% 50px; max-width: 1200px; margin: 0 auto; box-sizing: border-box; overflow-x: hidden; }

/* --- RENTAL FILTROS --- */
/* C2: .cat-pill definido en rental.css (evitar duplicación); mobile override abajo se mantiene */
.cat-filters { display: flex; gap: 10px; padding: 20px 5%; flex-wrap: wrap; justify-content: center; }

/* =========================================
   OPTIMIZACIÓN CELULAR (DISEÑO FINAL)
   ========================================= */
@media (max-width: 768px) {
    :root { --nav-height: 60px; }
    nav { height: 60px !important; padding: 0 20px !important; }
    .nav-logo-img { height: 28px !important; }
    .menu-items { display: none !important; } 
    .menu-toggle { display: flex !important; } 

    /* Video Hero Index 4:3 */
    .hero, .hero-projects { height: auto !important; aspect-ratio: 4 / 3 !important; margin-top: 60px; }
    .video-bg, .hero-video-bg { position: relative; height: 100%; width: 100%; object-fit: cover; }

    /* Títulos "Apretados" y Pequeños */
    .hero-title, .project-main-title { 
        font-size: 1.5rem !important; text-align: center; line-height: 1.1; width: 90%; margin: 0 auto; letter-spacing: 2px !important;
    }
    .main-content { margin-top: -60px !important; padding: 0 15px; }

    /* Grillas y Tarjetas */
    .proyectos-grid, #home-proyectos-grid, #proyectos-grid, .team-grid { grid-template-columns: 1fr !important; padding-top: 80px !important; }
    .filter-btn { font-size: 1.6rem !important; }
    .filter-header { overflow-x: hidden; }
    .cine-title { font-size: 0.9rem !important; }
    .cine-info { font-size: 0.45rem !important; letter-spacing: 2px; }

    /* Ficha Técnica / Créditos */
    .credits-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .credit-item { padding-top: 10px; border-top: 1px solid #222; }
    .credit-label { font-size: 0.6rem !important; }
    .credit-value { font-size: 0.9rem !important; }

    /* Rental */
    #rental-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; padding: 10px; }
    .cat-pill { font-size: 1.1rem !important; }

    /* Footer */
    footer { grid-template-columns: 1fr !important; text-align: center; padding: 40px 5% !important; margin-top: 40px; gap: 30px; }
    .footer-links a { justify-content: center; }
    .footer-logo { margin: 0 auto 20px; }
}
