/* Reset Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }

/* Tipografias */
@font-face { font-family: 'dancingscript'; src: url('fonts/dancingscript-regular-webfont.woff2') format('woff2'); }
@font-face { font-family: 'outfitregular'; src: url('fonts/outfit-regular-webfont.woff2') format('woff2'); }
@font-face { font-family: 'outfitbold'; src: url('fonts/outfit-bold-webfont.woff2') format('woff2'); }
@font-face { font-family: 'outfitthin'; src: url('fonts/outfit-thin-webfont.woff2') format('woff2'); }

/* HEADER */
header{
    background-color: #000000;
    height: 50px;
    display: flex;
    justify-content: space-between;
    padding-top: 3rem;
    align-content: center;
    padding: 0.4rem;
}
.logo{
    width: 200px;
    padding-top: 0.2rem;
}
.boton-volver {
    display: inline-block;
    padding: 9px 24px;
    background-color: #ffffff;
    color: black;
    text-decoration: none;
    border-radius: 9px;
    font-family: 'outfitbold'; 
    font-size: 16px;
    transition: all 0.3s ease;
}
.boton-volver:hover {
    background-color: #00844E;
    color: white;
}
/* Ocultamos el icono de móvil en PC */
.nav_principal_mobile { display: none; }


/* SECTION 1 (Hero + Barra) */
.section1 {
    position: relative; /* Clave para posicionar la barra debajo */
    background-image: url('giff/Cafe_seccion1.gif'); 
    background-size: cover;
    background-position: center; 
    /* El truco: Ocupar el 100% de la pantalla MENOS los 50px de tu header */
    height: calc(100vh - 50px); 
    width: 100%;
    display: flex;
    align-items: center; /* Centra el texto verticalmente */
    overflow: hidden; /* Evita que la barra se salga por abajo */
}
.container1 {
    width: 100%;
    padding-left: 10%; /* Porcentaje, no px ni rem, para que sea responsive */
    z-index: 2;
}
.container1 h1 { font-family: 'outfitbold'; font-size: 6rem; color: #fff; line-height: 1; }
.container1 h2 { font-family: 'outfitregular'; font-size: 3rem; color: #ffffff; margin-bottom: 20px; }
.container1 p { font-family: 'outfitregular'; font-size: 1.5rem; color: #fff; max-width: 600px; margin-bottom: 30px; }
.boton-tienda {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 9px;
    font-family: 'outfitbold';
    font-size: 19px;
    background-color: #ffffff;
    border: 3px solid black;
    color: black;
    transition: all 0.3s ease;
}
.boton-tienda:hover {
    background-color: #00844E;
    color: white;
}

/* LA BARRA ANIMADA (Ahora dentro de section 1) */
.barragif {
    position: absolute; /* Se queda clavada dentro de section1 */
    bottom: 0; /* Pegada al ras del suelo */
    left: 0;
    height: 100px;
    width: 100%;
    background: url('giff/barra%20letras_4.gif');
    background-size: auto 100px; /* Asegura que la altura concuerde */
    background-repeat: repeat-x;
}

/* SECTION 3 (Fondo Blanco) */
.section3 {
    width: 100%;
    height: 100vh;
    background-image: url('giff/Cafes-rotando.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center; /* Centro horizontal */
    align-items: flex-start; /* Pegado arriba */
    padding-top: 5rem; /* Separación desde arriba */
}
.container2 {
    width: 100%;
    text-align: center; /* Asegura el centrado */
}
.texto1 {
    font-family: 'outfitbold';
    font-size: 5rem; /* Más grande */
    color: black;
    margin: -60px;
    text-transform: uppercase; /* FUERZA LAS MAYÚSCULAS */
    text-align: center; /* CENTRADO */
    text-shadow: 2px 2px 10px rgba(255, 255, 255, 0.8);
}

/* SECTION 4 (Grid 4 Cafés) */
.section4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%; height: 100vh;
    background-color: #000;
}
.coffee-item { position: relative; overflow: hidden; cursor: pointer; border-right: 1px solid rgba(255,255,255,0.1); }
.normal-state { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; z-index: 1; transition: all 0.5s ease; }
.normal-state h3 { font-family: 'outfitbold'; font-size: 4rem; color: white; text-transform: uppercase; text-shadow: 0 4px 10px rgba(0,0,0,0.9); transition: all 0.3s ease; }
.coffee-item:hover .normal-state h3 { opacity: 0; transform: translateY(-50px); }
.hover-state { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; opacity: 0; transition: opacity 0.4s ease-in-out; }
.coffee-item:hover .hover-state { opacity: 1; }
.img-flotante { height: 40%; width: auto; object-fit: contain; margin-bottom: 20px; transform: translateY(50px) scale(0.8); transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); pointer-events: none;}
.coffee-item:hover .img-flotante { transform: translateY(0) scale(1); }
.script-tag { font-family: 'dancingscript'; font-size: 2.5rem; color: #fff; margin: 0; }
.hover-state h4 { font-family: 'outfitbold'; font-size: 3rem; color: white; margin: 10px 0; line-height: 1; }
.desc { font-family: 'outfitregular'; font-size: 1.2rem; color: white; max-width: 80%; }
.espresso-theme .hover-state { background-color: #3b2f2f; }
.cappuccino-theme .hover-state { background-color: #ad1d7d; }
.light-theme .hover-state { background-color: #6a4c93; }
.desca-theme .hover-state { background-color: #d90429; }

/* SECTION 5 (Tech Lab) */
.section5 { width: 100%; min-height: 100vh; background-color: #050505; display: flex; align-items: center; justify-content: center; padding: 2rem; overflow: hidden;}
.tech-container { display: flex; width: 100%; max-width: 1600px; align-items: center; justify-content: center; gap: 4rem; }
.big-cup-area { position: relative; width: 450px; display: flex; justify-content: center; }
.hero-cup { width: 100%; max-width: 400px; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6)); z-index: 2; transition: opacity 0.3s ease; }
.glow-circle { position: absolute; width: 350px; height: 350px; background-color: #5d4037; border-radius: 50%; filter: blur(100px); z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: background-color 0.5s ease; opacity: 0.6; }
.selectors-area { display: flex; flex-direction: column; gap: 1.5rem; }
.mini-cup { width: 90px !important; height: 90px !important; background: #111; border-radius: 15px; cursor: pointer; border: 3px solid #333; transition: all 0.3s ease; padding: 10px; opacity: 0.7; }
.mini-cup img { width: 100%; height: 100%; object-fit: contain; }
.mini-cup:hover { transform: scale(1.1) translateX(10px); opacity: 1; border-color: white; }
.active-selector { opacity: 1; border-color: #fff; transform: scale(1.1); box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.info-area { flex: 1; display: flex; flex-direction: column; justify-content: center; }
#tech-title { font-family: 'outfitbold'; font-size: 7rem; line-height: 0.9; margin: 0; color: #5d4037; transition: color 0.5s ease; }
#tech-subtitle { font-family: 'outfitbold'; font-size: 2.5rem; color: white; margin: 10px 0 20px 0; text-transform: uppercase; letter-spacing: 2px; }
.thick-bar { width: 150px; height: 8px; background-color: #5d4037; margin-bottom: 30px; transition: background-color 0.5s ease; }
.big-desc { font-family: 'outfitregular'; font-size: 1.5rem; color: #ccc; line-height: 1.4; max-width: 600px; margin-bottom: 50px; }
.stats-row { display: flex; gap: 40px; }
.stat-box { display: flex; flex-direction: column; border-left: 2px solid #333; padding-left: 20px; }
.stat-number { font-family: 'outfitbold'; font-size: 3.5rem; color: white; line-height: 1; }
.stat-label { font-family: 'outfitbold'; font-size: 1rem; color: #666; letter-spacing: 3px; margin-top: 5px; }

/* SECTION 6 (Formulario) */
.section6 { min-height: 100vh; background: radial-gradient(circle at center, #00a862 0%, #00844E 40%, #003d24 100%); display: flex; justify-content: center; align-items: center; padding: 4rem 2rem; }
.contenedor-contenido { background: black; padding: 3rem; border-radius: 20px; width: 100%; max-width: 600px; box-shadow: 0 0 40px rgba(0,0,0,0.8); border: 1px solid rgba(255,255,255,0.05); }
.contenedor1-title { font-family: 'outfitbold'; font-size: 3rem; color: white; margin-bottom: 10px; text-align: center; }
.contenedor2-subtitle { font-family: 'outfitregular'; color: #888; text-align: center; margin-bottom: 2rem; }
.formulario { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-family: 'outfitregular'; color: #ccc; margin-bottom: 5px; }
.form-group input, .form-group select { padding: 12px; border-radius: 10px; border: 1px solid #333; background: #111; color: white; font-family: 'outfitregular'; font-size: 1rem; transition: all 0.3s ease; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #00844E; box-shadow: 0 0 10px rgba(0,132,78,0.5); }
.radio-group { display: flex; gap: 1rem; color: #ccc; font-family: 'outfitregular'; flex-wrap: wrap;}
.checkbox { font-size: 0.9rem; }
.boton-enviar { margin-top: 1rem; padding: 15px; border-radius: 12px; border: 3px solid black; background-color: white; color: black; font-family: 'outfitbold'; font-size: 1.2rem; cursor: pointer; transition: all 0.3s ease; }
.boton-enviar:hover { background-color: #00844E; color: #ffffff; border: 3px solid #ffffff; }

/* =========================================
   MEDIA QUERIES - EL CEREBRO RESPONSIVE
========================================= */

/* --- 1. MÓVILES (S23 Ultra y similares - Ancho Lógico < 768px) --- */
@media (max-width: 768px) {
    /* Header */
    header { padding: 0 1.5rem; }
    .logo img { width: 140px; }
    .boton-volver { padding: 6px 16px; font-size: 14px;}

    /* Section 1 */
    .container1 { padding-left: 5%; text-align: center; }
    .container1 h1 { font-size: 3.5rem; }
    .container1 h2 { font-size: 2rem; }
    .container1 p { font-size: 1.2rem; margin: 0 auto 30px auto; }
    .barragif { height: 50px; } /* Barra más fina en móvil */

    /* Section 3 */
    .section3 { padding-top: 15vh; }
    .texto1 { font-size: 2.5rem; }

    /* Section 4 (Pasamos de 4 columnas a 1 o 2) */
    .section4 { 
        grid-template-columns: 1fr; /* Todo en una columna para scrollear hacia abajo */
        height: auto; 
    }
    .coffee-item { height: 60vh; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .normal-state h3 { font-size: 3.5rem; }

    /* Section 5 (Apilamos la foto, botones y texto) */
    .section5 { height: auto; padding: 80px 20px; }
    .tech-container { flex-direction: column; gap: 2rem; text-align: center; }
    .big-cup-area { width: 100%; }
    .hero-cup { max-width: 200px; }
    .glow-circle { width: 250px; height: 250px; }
    
    .selectors-area { flex-direction: row; justify-content: center; flex-wrap: wrap; }
    .mini-cup { width: 70px !important; height: 70px !important; }
    .mini-cup:hover { transform: scale(1.1); } /* Quitamos el translateX que se ve raro en móvil */
    
    .info-area { align-items: center; }
    #tech-title { font-size: 4rem; }
    #tech-subtitle { font-size: 1.5rem; }
    .thick-bar { margin: 20px auto; }
    .stats-row { flex-wrap: wrap; justify-content: center; gap: 20px; }
    .stat-box { border-left: none; border-top: 2px solid #333; padding-left: 0; padding-top: 10px; width: 100px;}
    .stat-number { font-size: 2.5rem; }
}

/* --- 2. iMac GIGANTE CLASE (4.5K - Ancho Lógico > 2500px) --- */
@media (min-width: 2500px) {
    /* Section 1 */
    .container1 { padding-left: 15%; }
    .container1 h1 { font-size: 9rem; }
    .container1 h2 { font-size: 5rem; }
    .container1 p { font-size: 2.5rem; max-width: 1200px; }
    .barragif { height: 120px; }

    /* Section 3 */
    .texto1 { font-size: 8rem; }

    /* Section 4 */
    .normal-state h3 { font-size: 7rem; }
    .hover-state h4 { font-size: 4rem; }
    .script-tag { font-size: 4rem; }
    .desc { font-size: 2rem; }

    /* Section 5 */
    .tech-container { max-width: 3800px; gap: 8rem; }
    #tech-title { font-size: 12rem; }
    #tech-subtitle { font-size: 4rem; }
    .big-desc { font-size: 2.5rem; max-width: 1000px; }
    .big-cup-area { width: 800px; }
    .hero-cup { max-width: 750px; }
    .glow-circle { width: 700px; height: 700px; filter: blur(150px); }
    .mini-cup { width: 160px !important; height: 160px !important; border-radius: 25px;}
    .stat-number { font-size: 6rem; }
    .stat-label { font-size: 2rem; }

    /* Section 6 */
    .contenedor-contenido { max-width: 1000px; padding: 5rem; }
    .contenedor1-title { font-size: 5rem; }
    .contenedor2-subtitle { font-size: 2rem; }
    .form-group label, .form-group input, .form-group select, .checkbox { font-size: 1.5rem; }
    .boton-enviar { font-size: 2rem; padding: 25px; }
}