/* --- RESET Y VARIABLES --- */
:root {
    --color-black: #000000; 
    --color-blue-text: #0026FF; 
    --bg-white: #f4f4f4;
    --font-main-title: 'Crimson Pro', serif;
    --font-labels: 'UniversLight', 'Roboto', sans-serif;
    --font-desc: 'Arapey', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main-title);
    background-color: var(--bg-white);
    color: var(--color-black);
    width: 100vw; min-height: 100vh; position: relative; overflow-x: hidden;
    opacity: 1; transition: opacity 0.5s ease-in-out;
}
body.fade-out { opacity: 0; }
body.hidden-scroll { overflow-y: hidden; height: 100vh; }
body.allow-scroll { overflow-y: auto; height: auto; }
a { text-decoration: none; color: inherit; }

/* HEADER Y LOGO */
#main-logo { position: fixed; z-index: 200; }
.invisible { display: none; opacity: 0; }
.header-wrapper { display: flex; align-items: center; gap: 15px; }

/* FLECHA */
.nav-arrow {
    width: 22px; height: 22px; fill: none; stroke: var(--color-black);
    stroke-width: 1.5px; cursor: pointer; transition: transform 0.3s ease;
}
.nav-arrow:hover { transform: translateX(-5px); fill: #00000010; }

.logo-center { display: block; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; text-align: center; }
.logo-center .header-wrapper { justify-content: center; }
.logo-center .outline-title { font-size: 4rem; } 
.logo-header { display: block; top: 35px; left: 40px; text-align: left; }
.logo-header .outline-title { font-size: 2.2rem; }

/* TITULOS */
.outline-title {
    font-family: var(--font-main-title); font-weight: 800; color: transparent;
    -webkit-text-stroke: 1.2px var(--color-black); text-transform: uppercase; cursor: default;
    transition: color 0.3s; letter-spacing: -2px; word-spacing: 10px; 
}
.outline-title.solid-black { color: var(--color-black); -webkit-text-stroke: 0px; }

/* UI FIJA */
.fixed-ui { position: fixed; z-index: 150; transition: opacity 1.5s ease; }
.hidden-ui { opacity: 0; pointer-events: none; }
.visible-ui { opacity: 1; pointer-events: auto; }
.description-container { top: 35px; left: 50%; transform: translateX(-50%); width: 520px; max-width: 90vw; z-index: 160; }
.arapey-text {
    font-family: var(--font-desc); font-size: 1.5rem; font-weight: 400; font-style: italic;
    line-height: 1.1; text-align: center; color: var(--color-blue-text);
    white-space: pre-wrap; word-spacing: normal; display: block;
}
.bottom-left-menu { bottom: 40px; left: 40px; display: flex; flex-direction: column; gap: 0px; }
.bottom-left-menu ul { list-style: none; }
.outline-menu {
    font-family: var(--font-main-title); font-weight: 700; font-size: 2.2rem; color: transparent; 
    -webkit-text-stroke: 1px var(--color-black); text-transform: uppercase; display: block; 
    cursor: pointer; letter-spacing: -1px; line-height: 0.9; 
}
.outline-menu:hover { color: var(--color-black); }
.outline-menu.solid-black { color: var(--color-black); -webkit-text-stroke: 0px; }

/* GALERIA Y OTROS */
#flash-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; transition: opacity 1.5s ease; }
.flash-faded { opacity: 0; }
.temp-flash-img { position: absolute; object-fit: cover; filter: grayscale(100%); border: none; }
.gallery-feed {
    position: relative; top: 0; left: 0; width: 100%; min-height: 100vh;
    padding-top: 180px; padding-bottom: 100px; z-index: 10; display: flex; flex-direction: column; 
    gap: 100px; padding-left: 10%; padding-right: 10%;
}
.project-block { display: flex; position: relative; width: fit-content; }
.align-start { align-self: flex-start; } .align-center { align-self: center; } .align-end { align-self: flex-end; }
.project-image-container { position: relative; z-index: 1; transition: transform 0.4s ease; }
.project-img {
    display: block; height: 60vh; width: auto; max-width: 75vw; object-fit: cover; filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.4s ease; cursor: pointer;
}
.project-image-container:hover { transform: scale(1.02); z-index: 10; }
.project-image-container:hover .project-img { filter: grayscale(0%); }
.vertical-title {
    writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg);
    font-family: var(--font-labels); font-weight: 300; font-size: 0.9rem;
    color: var(--color-black); text-transform: uppercase; letter-spacing: 1px;
    position: absolute; right: -30px; bottom: 0; height: 100%; text-align: left;
}

/* =========================================
   ESTILOS CONTACTO (BASE DESKTOP)
   ========================================= */
.contact-wrapper {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90%; max-width: 1400px; z-index: 10; margin-top: 40px; 
}
.contact-grid {
    display: grid; grid-template-columns: 0.6fr 1.4fr 1fr; 
    border: 1px solid #aaa; background-color: transparent;
}
.grid-cell { padding: 15px 20px; border-bottom: 1px solid #aaa; display: flex; align-items: center; }
.title-cell {
    border-right: 1px solid #aaa; font-family: var(--font-labels); font-size: 0.9rem; font-weight: bold;
    color: #000; text-transform: capitalize; 
}
.info-cell {
    border-right: 1px solid #aaa; font-family: var(--font-desc); font-size: 1.8rem; font-style: italic; 
    color: var(--color-blue-text); justify-content: flex-start; text-align: left;
}
.form-cell { flex-direction: column; align-items: flex-start; justify-content: center; position: relative; }
.form-cell label { 
    font-family: var(--font-labels); font-size: 0.8rem; font-weight: bold; 
    margin-bottom: 5px; color: #000; text-transform: capitalize; 
}
.form-cell input, .form-cell textarea {
    width: 100%; border: none; background: transparent; font-family: var(--font-desc);
    font-size: 1.1rem; font-style: italic; color: #555; outline: none; text-align: left;
}
.form-cell textarea { height: 80px; resize: none; }
.rowspan-2 { grid-row: span 2; height: 100%; justify-content: flex-start; padding-top: 20px; }
.no-border-bottom { border-bottom: none; }
.contact-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 30px; padding-right: 0; }
.send-block { text-align: right; width: 100%; display: flex; flex-direction: column; align-items: flex-end; padding-right: 20px; }
.send-btn { 
    background: none; border: none; font-family: var(--font-desc); font-size: 1.2rem; 
    font-style: italic; cursor: pointer; margin-bottom: 10px; transition: all 0.2s; opacity: 1;
}
.send-btn:hover { transform: translateX(5px); }
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none !important; }
.sent-msg { font-family: var(--font-labels); font-size: 0.8rem; letter-spacing: 5px; color: var(--color-blue-text); opacity: 0; }
.internship-block { position: absolute; bottom: -120px; right: 0; text-align: right; font-family: var(--font-desc); color: #444; }
.intern-title { font-size: 1.2rem; font-style: italic; }
.intern-subtitle { font-size: 1.2rem; font-style: italic; font-weight: bold; }
.intern-email { font-size: 1.1rem; color: #444; }

/* =========================================
   ESTILOS OFICINA (BASE DESKTOP)
   ========================================= */
.office-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 200px 5% 150px 5%; 
    z-index: 10;
}
.office-intro { width: 70%; margin: 0 auto 80px auto; text-align: center; }
.office-intro .arapey-text { color: var(--color-blue-text); font-size: 1.6rem; line-height: 1.2; }

/* Fundadores */
.founders-section { display: grid; grid-template-columns: 350px 1fr; gap: 60px; margin-bottom: 100px; align-items: flex-start; }
.placeholder-img { width: 100%; height: 350px; background-color: #ffffff; border: 1px solid #000; }
.founders-text { display: flex; flex-direction: column; gap: 30px; }
.founder-bio-block { margin-bottom: 10px; }
.founder-text { font-family: var(--font-desc); font-size: 1rem; line-height: 1.3; color: #000; text-align: justify; margin-bottom: 5px; }
.founder-text strong { font-weight: 900; text-transform: uppercase; font-size: 1rem; }
.founder-handle { font-family: var(--font-desc); font-size: 1.3rem; font-weight: bold; font-style: italic; color: var(--color-blue-text); display: block; margin-top: 5px; }
.team-block { margin-top: 20px; }
.team-title { font-family: var(--font-desc); font-size: 1.1rem; font-weight: 900; font-style: italic; text-transform: uppercase; margin-bottom: 5px; color: #000; }
.team-names, .intern-names { font-family: var(--font-desc); font-size: 1.1rem; font-style: italic; color: #000; }

/* Socios */
.partners-section { margin-bottom: 80px; }
.section-title { font-family: var(--font-desc); font-size: 1.8rem; font-style: italic; color: #000; margin-bottom: 30px; text-transform: uppercase; font-weight: normal; }
.text-blue { color: var(--color-blue-text); }
.partners-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.partner-card { padding: 30px 20px; border-right: 1px solid #000; display: flex; flex-direction: column; justify-content: space-between; min-height: 300px; }
.partner-card:last-child { border-right: none; }
.partner-bio { font-family: var(--font-desc); font-size: 0.95rem; line-height: 1.3; color: #000; margin-bottom: 30px; text-align: justify; }
.partner-bio strong { font-weight: 900; font-style: italic; font-size: 1rem; }
.partner-role { font-family: var(--font-desc); font-size: 1.2rem; font-style: italic; color: #666; margin-top: auto; }

/* Otros */
.interns-section { margin-bottom: 60px; }
.awards-section { margin-bottom: 100px; }
.awards-list { list-style: none; font-family: var(--font-desc); font-size: 1.1rem; color: #000; }
.awards-list li { margin-bottom: 8px; }
.award-year { font-weight: 900; color: var(--color-blue-text); }
.award-desc { font-style: italic; font-weight: 900; color: var(--color-blue-text); }
.award-collab { font-style: italic; font-weight: normal; color: var(--color-blue-text); opacity: 0.8; }


/* ====================================================================
   !!! RESPONSIVE CORREGIDO PARA MÓVIL !!!
   ==================================================================== */

@media (max-width: 900px) {
    /* 1. AJUSTES GENERALES */
    .logo-header { top: 20px; left: 20px; } /* Logo más pegado arriba */
    .logo-header .outline-title { font-size: 1.8rem; }
    
    /* 2. REINICIO DE POSICIONAMIENTO (FUNDAMENTAL PARA NO SOLAPAR) */
    .contact-wrapper, .office-wrapper {
        position: relative; /* Ya no absolute/center */
        top: auto;
        left: auto;
        transform: none;
        margin: 0 auto;
        
        /* Padding SUPERIOR grande para limpiar el logo */
        padding-top: 100px; 
        /* Padding INFERIOR grande para limpiar el menú */
        padding-bottom: 400px; 
        width: 90%;
    }

    /* 3. ARREGLOS PAGINA OFICINA */
    .office-intro { width: 100%; margin-bottom: 50px; }
    .office-intro .arapey-text { font-size: 1.3rem; text-align: left; }

    .founders-section {
        grid-template-columns: 1fr; /* Una columna */
        gap: 30px;
        margin-bottom: 50px;
    }
    .placeholder-img { height: 300px; width: 100%; max-width: 100%; }
    
    .partners-grid { 
        grid-template-columns: 1fr; /* Una columna */
        border-top: 1px solid #aaa;
    }
    .partner-card { 
        border-right: none; 
        border-bottom: 1px solid #aaa; 
        padding: 20px 0;
    }

    /* 4. ARREGLOS PAGINA CONTACTO */
    .contact-grid {
        display: flex; /* Flex para apilar ordenadamente */
        flex-direction: column;
    }
    
    /* Forzamos que cada celda ocupe todo el ancho */
    .title-cell, .info-cell, .form-cell {
        width: 100%;
        border-right: none; /* Sin bordes verticales */
    }
    
    /* Estilo tipo "Tarjeta" para cada fila en móvil */
    .title-cell {
        background-color: #f0f0f0;
        border-bottom: none;
        padding-top: 15px;
        padding-bottom: 5px;
        color: #666;
        text-transform: uppercase;
        font-size: 0.8rem;
    }
    
    .info-cell {
        padding-top: 5px;
        padding-bottom: 15px;
        font-size: 1.4rem;
        word-break: break-word; /* Evitar que emails largos rompan */
    }
    
    .form-cell {
        padding: 15px;
        border-bottom: 2px solid #000; /* Separador más fuerte entre bloques */
        margin-bottom: 20px;
    }
    .rowspan-2 { grid-row: auto; }

    /* Footer Contacto */
    .contact-footer { flex-direction: column; align-items: center; gap: 40px; }
    .send-block { text-align: center; padding-right: 0; align-items: center; }
    .internship-block { position: static; text-align: center; }

    /* 5. MENÚ AL FONDO (SIN TAPAR) */
    .bottom-left-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 20px;
        background: linear-gradient(to top, rgba(255,255,255,1) 80%, rgba(255,255,255,0));
        padding-bottom: 40px;
    }
    .outline-menu { font-size: 1.8rem; }
    
    /* TEXTO HOME */
    .description-container {
        top: 150px; width: 90%; 
        left: 50%; transform: translateX(-50%);
    }
    .logo-center .outline-title { font-size: 3rem; word-spacing: 5px; }
}