/* ============================================
   BYRE MEDIA - Rediseño Premium 2026
   Agencia de Producción Audiovisual Aérea
   ============================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
    --bg-deep: #030305;
    --bg-surface: #0a0a0f;
    --bg-surface-elevated: #111116;
    
    --accent-blue: #0070F3;
    --accent-cyan: #00F0FF;
    --accent-purple: #8A2BE2;
    --accent-glow: rgba(0, 112, 243, 0.4);

    --text-primary: #ededed;
    --text-secondary: #888888;
    
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.02);
    
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.03em;
}

::selection {
    background: var(--accent-blue);
    color: white;
}

/* ---------- CUSTOM SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { 
    background: #222; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ---------- UTILITIES: NOISE & GLASS ---------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    opacity: 0.03;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.glass-nav {
    background: rgba(3, 3, 5, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
}

/* ---------- BENTO BOX (GLASS CARDS) ---------- */
.bento-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease, box-shadow 0.4s ease;
}

.bento-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 112, 243, 0.1);
}

/* Glow line effect inside bento box */
.bento-glow-border {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(400px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.06), transparent 40%);
    z-index: 10;
}

/* ---------- AMBIENT GLOW ORBS ---------- */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}
.glow-blue { background: var(--accent-blue); }
.glow-purple { background: var(--accent-purple); }
.glow-cyan { background: var(--accent-cyan); }

/* ---------- ANIMATIONS ---------- */
.gradient-text {
    background: linear-gradient(135deg, white 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-animated {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple), var(--accent-cyan));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-flow 6s linear infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delayed { animation: float 6s ease-in-out infinite 3s; }

/* ---------- BUTTONS ---------- */
.btn-premium {
    position: relative;
    background: linear-gradient(135deg, #111, #000);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    overflow: hidden;
}
.btn-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.btn-premium:hover {
    border-color: transparent;
    box-shadow: 0 0 20px rgba(0, 112, 243, 0.3);
}
.btn-premium:hover::before { opacity: 1; }

.btn-primary {
    background: white;
    color: black;
    font-weight: 600;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}
.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* ---------- CUSTOM PHONE MOCKUP (ULTRA MINIMAL) ---------- */
.phone-frame {
    border: 12px solid #1a1a1a;
    border-radius: 40px;
    background: #000;
    box-shadow: 
        inset 0 0 0 2px #000, 
        0 0 0 1px rgba(255,255,255,0.1), 
        0 25px 50px -12px rgba(0,0,0,0.8),
        0 0 40px rgba(0, 112, 243, 0.1);
    position: relative;
    overflow: hidden;
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* Fix for video bleeding out of border-radius */
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s var(--ease-out-expo);
}
.phone-frame:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-10px);
}
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #1a1a1a;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 20;
}

/* Hero Image Fade */
.hero-mask {
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

/* ---------- LAZY LOADING FADE-IN ---------- */
img[data-lazy-src] {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img.lazy-loaded {
    opacity: 1;
}

/* ---------- SHOWREEL MODAL ---------- */
#showreel-modal {
    animation: none;
}
#showreel-modal.flex {
    animation: modalFadeIn 0.3s ease forwards;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- SCRIPT PARA CONVERTIR IMÁGENES A WEBP ---------- */
/* 
   Para generar los archivos WebP, ejecuta en PowerShell (requiere ImageMagick):
   Get-ChildItem "assets\images\*.png" | ForEach-Object {
       & magick $_.FullName -quality 82 ($_.DirectoryName + "\" + $_.BaseName + ".webp")
   }
   O con cwebp:
   Get-ChildItem "assets\images\*.png" | ForEach-Object {
       & cwebp -q 82 $_.FullName -o ($_.DirectoryName + "\" + $_.BaseName + ".webp")
   }
*/

/* ============================================
   CLIENTES — CARRUSEL INFINITO CSS-ONLY
   ============================================ */

.clients-track-wrapper {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.clients-track {
    display: flex;
    width: max-content;
    gap: 1.5rem;
}

.clients-track.scroll-left {
    animation: clients-scroll-left 28s linear infinite;
}

.clients-track.scroll-right {
    animation: clients-scroll-right 28s linear infinite;
}

.clients-track:hover {
    animation-play-state: paused;
}

@keyframes clients-scroll-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes clients-scroll-right {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

.client-logo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 80px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.875rem;
    padding: 1rem 1.5rem;
    transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease, filter 0.35s ease;
    filter: grayscale(100%) brightness(0.6);
    cursor: default;
}

.client-logo-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    filter: grayscale(0%) brightness(1);
}

.client-logo-card svg,
.client-logo-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ============================================
   TESTIMONIOS — ESTRUCTURA OCULTA (ACTIVAR LUEGO)
   Cambiar display:none a display:block para activar
   ============================================ */

.testimonials-section {
    display: none; /* ACTIVAR: cambiar a 'block' */
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 2rem;
    min-width: 100%;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 5rem;
    line-height: 1;
    color: var(--accent-cyan);
    opacity: 0.2;
    font-family: 'Outfit', sans-serif;
}

.testimonial-stars {
    display: flex;
    gap: 0.25rem;
    color: #FBBF24;
    margin-bottom: 1rem;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.testimonial-dot.active {
    background: var(--accent-cyan);
    transform: scale(1.3);
}

/* ============================================
   NAP FOOTER — BLOQUE DE CONTACTO ESTRUCTURADO
   ============================================ */

.nap-block address {
    font-style: normal;
}

.nap-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: #9ca3af;
    line-height: 1.5;
}

.nap-item i {
    margin-top: 2px;
    flex-shrink: 0;
    color: var(--accent-blue);
    font-size: 0.75rem;
}

.nap-item a {
    transition: color 0.2s ease;
}
.nap-item a:hover { color: white; }

/* ============================================
   BLOG — CARDS Y LAYOUT
   ============================================ */

.blog-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 112, 243, 0.08);
}

.blog-card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: var(--bg-surface-elevated);
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-category-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    z-index: 100;
    transition: width 0.1s linear;
    width: 0%;
}