/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    background-color: #ffffff;
    color: #000000;
    overflow-x: hidden;
    width: 100%;
    text-transform: uppercase;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}
.descripcion-texto,
.home-contact-info,
.home-contact-info * { text-transform: none; }
img { max-width: 100%; }

/* Intro */
.intro-title {
    font-family: 'Archivo Black', sans-serif;
    color: #000000;
    font-size: clamp(2.4rem, 12vw, 9rem);
    letter-spacing: 2px;
    text-align: center;
    transition: transform 0.3s ease;
}
.intro-title:hover { transform: scale(1.03); color: #000000; }

/* Grid: flex para acomodar 5 items (3 arriba + 2 centrados abajo) */
.proyectos-contenedor {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 6vh 6vw 12vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.proyectos-grid {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    row-gap: 6vh;
    column-gap: 0;
    align-items: center;
    justify-items: center;
}
.proyecto-nombre {
    font-family: 'Archivo Black', sans-serif;
    color: #000000;
    text-decoration: none;
    font-size: clamp(0.95rem, 1.6vw, 1.4rem);
    white-space: nowrap;
    text-align: center;
    transition: transform 0.25s ease;
}
/* Fila 1: 3 items ocupando pares de columnas */
.pos-a1 { grid-column: 1 / span 2; grid-row: 1; }
.pos-a2 { grid-column: 3 / span 2; grid-row: 1; }
.pos-a3 { grid-column: 5 / span 2; grid-row: 1; }
/* Fila 2: 2 items desplazados a la mitad (quedan entre los de arriba) */
.pos-b1 { grid-column: 2 / span 2; grid-row: 2; }
.pos-b2 { grid-column: 4 / span 2; grid-row: 2; }
.proyecto-nombre:hover { transform: scale(1.05); color: #000000; }

/* Carrusel */
.carrusel-3d-contenedor {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tarjetas-track {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1200px;
    --ratio: 1.3333;
}
.tarjeta {
    position: absolute;
    top: 52%;
    left: 50%;
    width: min(1268px, 62vw, calc(56.25vh * var(--ratio)));
    aspect-ratio: var(--ratio);
    border-radius: 4px;
    overflow: hidden;
    background-color: #f2f2f2;
    background-size: cover;
    background-position: center;
    transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 1s cubic-bezier(0.25, 1, 0.5, 1),
                filter 1s ease;
    will-change: transform, opacity, filter;
}
.tarjeta img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.tarjeta.no-activa { filter: blur(1.5px) brightness(0.85); }

/* Iniciales A.M */
.iniciales {
    font-family: 'Archivo Black', sans-serif;
    color: #5F040E;
    text-decoration: none;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
}
.iniciales:hover { color: #5F040E; }
.iniciales-fija {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}
.iniciales-overlay {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Flechas: SVG minimalista (linea gruesa + cabeza triangular solida) */
.flecha-nav {
    position: absolute;
    bottom: 36px;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: none;
    width: 48px;
    height: 26px;
    cursor: pointer;
    z-index: 10;
    text-decoration: none;
    text-indent: -9999px;
    overflow: hidden;
    color: transparent;
    transition: transform 0.2s ease;
}
.flecha-nav:hover { transform: scale(1.15); }
.flecha-nav-der {
    right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 20'%3E%3Cpath d='M2 10 L46 10' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M42 3 L56 10 L42 17 Z' fill='%23000'/%3E%3C/svg%3E");
}
.flecha-nav-izq {
    left: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 20'%3E%3Cpath d='M14 10 L58 10' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M18 3 L4 10 L18 17 Z' fill='%23000'/%3E%3C/svg%3E");
}
.flecha-nav-fija { position: fixed; }

/* Descripcion: columna mas ancha + titulo mas chico para que quepa mejor */
.descripcion-contenedor {
    width: 100%;
    min-height: 100vh;
    padding: 40px 80px 110px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
}
.descripcion-grid {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    align-items: center;
    justify-content: center;
}
.descripcion-columna-texto { flex: 1 1 420px; max-width: 620px; }
.descripcion-titulo {
    font-family: 'Archivo Black', sans-serif;
    color: #000000;
    text-align: left;
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.1;
    margin-bottom: 28px;
    text-wrap: balance;
}
.descripcion-texto {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    color: #2b2b2b;
    font-size: clamp(1.05rem, 1.15vw, 1.25rem);
    line-height: 1.75;
    max-width: 520px;
}
.descripcion-columna-imagen {
    flex: 1 1 480px;
    max-width: 780px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.render-marco { border: none; background-color: #f7f7f7; overflow: hidden; position: relative; }
.render-marco img { object-fit: contain; transition: opacity 0.3s ease; }
.render-marco-grande {
    border: none;
    background-color: #f7f7f7;
    width: 100%;
    height: 62vh;
    max-height: 560px;
    cursor: pointer;
}
.render-capa {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
}
.render-capa.render-capa-activa {
    opacity: 1;
    z-index: 2;
}
.descripcion-indicadores { display: flex; gap: 8px; justify-content: center; }
.descripcion-indicadores .punto {
    width: 10px; height: 10px; border-radius: 50%;
    background-color: rgba(0,0,0,0.25);
    transition: background-color 0.3s ease;
}
.descripcion-indicadores .punto.activo { background-color: #000000; }

/* Home */
.home-contenedor {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 6vh 6vw 12vh;
}
.home-am-giant {
    font-family: 'Archivo Black', sans-serif;
    color: #000000;
    text-align: center;
    font-size: clamp(4rem, 22vw, 18rem);
    line-height: 1;
    margin: 0;
    letter-spacing: 0.02em;
}
.home-nav {
    position: absolute;
    bottom: 6vh;
    left: 6vw;
    right: 6vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.home-link {
    font-family: 'Archivo Black', sans-serif;
    color: #000000;
    text-decoration: none;
    font-size: clamp(0.95rem, 2vw, 1.4rem);
    letter-spacing: 1px;
    white-space: nowrap;
    display: inline-block;
}
.home-link:hover { color: #000000; }
.home-contact-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.home-contact-info {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 16px;
    text-align: right;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.home-contact-info.activo {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.home-contact-desc,
.home-contact-dato {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    color: #000000;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.home-contact-ciudad {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    color: #5F040E;
    font-size: 0.7rem;
    margin-top: 6px;
}

/* Responsive: tablets (5 items -> 2+2+1 centrados) */
@media (max-width: 900px) {
    .tarjeta { width: min(1268px, 78vw, calc(52.57vh * var(--ratio))); }
    .descripcion-contenedor { padding: 50px 30px 90px; }
    .proyecto-nombre { flex: 0 0 calc(50% - 4vw); }
    .proyectos-grid { gap: 4vh 4vw; }
}

/* Responsive: telefonos (5 items -> 1 por fila) */
@media (max-width: 600px) {
    .intro-title { letter-spacing: 1px; }
    .proyecto-nombre { flex: 0 0 100%; font-size: 1.15rem; white-space: nowrap; }
    .proyectos-grid { gap: 3.5vh 0; }

    /* Solo la tarjeta activa */
    .tarjeta.no-activa { opacity: 0 !important; pointer-events: none; }
    .tarjeta { width: min(1268px, 90vw, calc(36.2vh * var(--ratio))); }

    /* Flechas mas cerca del borde */
    .flecha-nav-izq { left: 14px; }
    .flecha-nav-der { right: 14px; }
    .flecha-nav { width: 40px; height: 20px; bottom: 32px; }

    .descripcion-contenedor { padding: 40px 20px 90px; }
    .descripcion-columna-imagen { max-width: 100%; }
    .render-marco-grande { height: 44vh; }

    .home-nav { bottom: 4vh; }
    .home-link { font-size: 1rem; }
    .home-contact-info {
        right: -10px;
        white-space: normal;
        max-width: 180px;
        text-align: right;
    }
    .home-contact-desc, .home-contact-dato { font-size: 0.8rem; }
    .home-contact-ciudad { font-size: 0.62rem; }
}

/* Grid: los 2 de abajo se alinean con las columnas 1 y 2 (no centrados) */
.proyectos-grid { justify-content: flex-start; }
.proyecto-vacio { visibility: hidden; pointer-events: none; }

/* Responsive del grid intercalado: en tablet/movil, apilar */
@media (max-width: 900px) {
    .proyectos-grid { grid-template-columns: repeat(2, 1fr); row-gap: 4vh; }
    .pos-a1, .pos-a2, .pos-a3, .pos-b1, .pos-b2 {
        grid-column: auto; grid-row: auto;
    }
}
@media (max-width: 600px) {
    .proyectos-grid { grid-template-columns: 1fr; row-gap: 3.5vh; }
}
