/* ============================================================
   VARIABLES & FONTS
   ============================================================ */
:root {
    --dark-grey:    #252525;
    --oat:          #e5e2d3;
    --olive-branch: #dcd8cc;
    --marron-linea: #785a47;
    --marron:       #694734;
    --white-defecto:#ffffff;
    --black-defecto:#000000;
    --font-display:    'Cormorant Garamond', Georgia, serif;
    --font-body:       'Jost', sans-serif;
    --font-parrafo:    'Playfair Display', Georgia, serif;
    --font-subVariable:'Playfair Display', serif;
    --font-subtitulos: 'Quicksand', sans-serif;
}

@font-face {
    font-family: 'boungiorno-rastellino';
    src: url(./fonts/Buongiorno_Rastellino.otf) format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* ============================================================
   RESET
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-display);
    background-color: var(--oat);
    overflow-x: hidden;
}

/* ============================================================
   HEADER — DESKTOP
   ============================================================ */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    background-color: var(--dark-grey);
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

header img { width: 180px; }

ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

a {
    color: var(--marron);
    letter-spacing: 1px;
    transition: color 0.3s ease;
    font-family: var(--font-subtitulos);
    text-decoration: none;
    font-weight: bold;
}

li a { color: var(--white-defecto); }

/* Hamburger — hidden on desktop */
.hamburger { display: none; }

/* Nav drawer — hidden on desktop */
.nav-drawer  { display: none; }
.nav-overlay { display: none; }

/* ============================================================
   BANNER
   ============================================================ */
.baner {
    width: 100%;
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.baner::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    background-image: url("img/19.webp");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(3px);
    z-index: -1;
    transform: scale(1.1);
}

.description {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(38,18,10,.35) 15%,
        rgba(30,18,10,.15) 65%,
        rgba(30,18,10,.45) 110%
    );
    color: var(--white-defecto);
    filter: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.description img {
    margin-top: 20px;
    width: 30%;
}

/* ============================================================
   MANIFIESTO
   ============================================================ */
.manifiesto {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 150px;
    gap: 80px;
    border: solid 1px var(--oat);
    background-color: var(--oat);
    color: var(--marron);
}

.manifiesto h3 { font-size: 15px; }

.manifiesto h3,
.dist .fila .left h3,
.wellhall h4,
.description p {
    font-family: var(--font-subtitulos);
}

.manifiesto p {
    width: 900px;
    font-size: 23px;
    text-align: center;
}

/* ============================================================
   CARDS / SERVICES
   ============================================================ */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: solid 1px var(--marron-linea);
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: solid 1px var(--marron-linea);
    background-color: var(--oat);
    padding: 50px;
}

.card .contenedor {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    color: var(--marron);
}

.card .contenedor img {
    width: 200px;
    height: 250px;
    object-fit: cover;
}

.card h4 {
    font-family: var(--font-subVariable);
    font-weight: 100;
    letter-spacing: 3px;
}

/* ============================================================
   DIST — KAVANAH + PORTFOLIO
   ============================================================ */
.fila,
.fila-reverse {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.dist { background-color: var(--olive-branch); }

.dist .fila > div,
.dist .fila-reverse > div {
    aspect-ratio: 1 / 1;
}

.fila .left,
.fila-reverse .right {
    display: flex;
    flex-direction: column;
    padding: 0 165px;
    color: var(--marron);
    gap: 30px;
    margin: auto;
    justify-content: center;
}

.fila-reverse .right { text-align: right; }

.line-reverse hr { margin-left: 100%; }

.left .line hr,
.line-reverse hr {
    border: none;
    width: 2px;
    height: 190px;
    background-color: var(--marron);
}

.line-reverse hr { 
    height: 100px; 
}

.right img,
.fila-reverse .left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#port      { font-size: 50px; }

/* ============================================================
   GALLERY
   ============================================================ */
.galery {
    border-bottom: solid 1px var(--olive-branch);
    color: var(--marron);
}

.galery .fila {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 50px;
}

.galery .fila .left {
    width: 50%;
    margin: 0;
    padding: 0;
}

.galery .fila .left p { margin: 0; padding: 0; }

.dist .fila .left p,
.dist .fila-reverse .right p { font-size: 20px; }

.galery .fila .right {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    width: 600px;
    height: 600px;
}

.grande { grid-row: 1 / span 2; height: 100%; }

/* --- Estilos Colaboradores Galería --- */
.colab-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.colab-name {
    position: absolute;
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--marron);
    white-space: nowrap;
    pointer-events: none;
}

/* Grande: Lado derecho, pegado arriba, lectura arriba-abajo */
.colab-v-top { top: 15px; right: -18px; writing-mode: vertical-lr; }

/* Segunda: Parte inferior, pegado derecha, lectura izq-der */
.colab-h-bottom { bottom: -15px; right: 18px; }

/* Tercera: Lado izquierdo, pegado abajo, lectura abajo-arriba */
.colab-v-bottom { bottom: 15px; left: -18px; writing-mode: vertical-lr; transform: rotate(180deg); }

.grande img,
.foto-chica {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

@keyframes blinkEffect {
    0%, 100% { opacity: 1; transform: scale(1); }
    45%       { opacity: 1; }
    50%       { opacity: 0; transform: scale(0.95); }
    55%       { opacity: 1; }
}

.animate-8s  { animation: blinkEffect  8s infinite; }
.animate-10s { animation: blinkEffect 10s infinite; }
.animate-12s { animation: blinkEffect 12s infinite; }

.galery p { font-family: var(--font-parrafo); }

.galery h3 { font-size: 30px; }

.galery h3,
.galery p {
    color: var(--marron);
    margin-left: 8%;
}

.galery .fila .rigth2 .f {
    display: flex;
    gap: 40px;
    width: 100%;
    flex-wrap: wrap;
}

.galery .fila .rigth2 .c {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.celda p {
    width: auto;
    flex: 1;
    min-width: 150px;
}

.galery .fila .rigth2 P { margin: 0; text-align: justify; }

.galery .fila .rigth2 {
    gap: 50px;
    display: flex;
    flex-direction: column;
    width: 45%;
}

/* ============================================================
   MOOD BOARD — DESKTOP
   ============================================================ */
.mood-board {
    background-color: var(--oat);
    padding: 60px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.plano { padding: 50px !important; }

.mood-container,

.mood-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   NIVELES
   ============================================================ */
.niveles {
    padding: 100px 50px;
    background-color: var(--olive-branch);
}

.niveles .fila {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.dising {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--marron);
}

.dising img         { width: 100%; height: 500px; object-fit: cover; }
#papel img,
#manillas img       { height: 420px; }
#ceramica img       { height: 350px; }

.dising p {
    font-size: 13px;
    font-family: var(--font-parrafo);
    letter-spacing: 2px;
    line-height: 1.8;
    text-transform: uppercase;
    text-align: left;
}

/* ============================================================
   CARTOGRAFÍA
   ============================================================ */
.press {
    background-color: #623e2a;
    padding: 100px 100px;
    position: relative;
}

.press .line hr {
    border: none;
    width: 2px;
    height: 90px;
    position: absolute;
    left: 150px;
    top: 200px;
    height: 50px;
    background-color: var(--olive-branch);
}

.map-img { width: 100%; margin-top: 10px; }

#Cartografia h3 {
    position: absolute;
    font-size: 80px;
    color: var(--olive-branch);
}

/* ============================================================
   WELLHALL / CONTACTO
   ============================================================ */
.wellhall {
    background-color: var(--oat);
    color: var(--marron);
    padding: 100px 50px;
    text-align: left;
}

.wellhall h3 {
    font-size: 50px;
    font-family: serif;
    margin-bottom: 50px;
    font-weight: 300;
}

.wellhall .fila {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.wellhall .box {
    border: 1px solid var(--marron);
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 350px;
    justify-content: flex-start;
}

.wellhall .box h4 {
    font-size: 25px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 400;
}

.box p  { font-size: 20px; }
.box a  { text-align: center; }

/* Pill button */
.btn-pill {
    background-color: var(--marron);
    margin-top: auto;
    border: 1px solid var(--marron);
    padding: 15px 30px;
    border-radius: 50px;
    color: var(--marron);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    font-weight: bold;
}

.btn-pill:hover {
    border-color: var(--marron);
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.wellhall .box .btn-pill {
    cursor: pointer;
    background: transparent;
    font-family: var(--font-body);
    width: fit-content;
    align-self: flex-start;
}

.n{
    font-weight: bold;
}
/* ============================================================
   REDES
   ============================================================ */
.redes {
    display: grid;
    grid-auto-flow: column;
}

.redes i {
    text-align: center;
    font-size: 50px;
    color: var(--marron);
    transition: color 0.3s ease;
}

/* ============================================================
   MODALS — DESKTOP
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #5c3d2e;
    padding: 40px;
    font-family: var(--font-subVariable);
    border: 1px solid var(--olive-branch);
    width: 90%;
    max-width: 500px;
    position: relative;
    color: white;
    text-align: center;
    max-height: 90%;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--olive-branch);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-family: var(--font-body);
    outline: none;
}

.modal-form textarea { height: 100px; resize: none; }

.modal-form select option { background-color: #5c3d2e; }

.modal-form button {
    color: var(--oat);
    border: solid var(--oat);
}

.modal-form button:hover {
    border: solid var(--oat);
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.modal-form label {
    text-align: left;
    font-size: 14px;
    color: var(--olive-branch);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background-color: var(--dark-grey);
    color: var(--white-defecto);
    padding: 40px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

footer a { color: var(--olive-branch); text-decoration: none; }

/* ============================================================
   RESPONSIVE — TABLET  (max 1100px)
   ============================================================ */
@media (max-width: 1500px) {
    .manifiesto p { width: 90%; }

    .dist .fila-reverse .right, .dist .fila .left{
        padding: 20px
    }

    /* Separamos el comportamiento: texto flexible, imagen cuadrada */
    .dist .fila .left,
    .dist .fila-reverse .right {
        aspect-ratio: auto;
    }

    .dist .fila .right,
    .dist .fila-reverse .left {
        aspect-ratio: 1 / 1;
    }

    /* Eliminar padding en los contenedores de imagen para que peguen al borde */
    .dist .fila .right,
    .dist .fila-reverse .left {
        padding: 0;
    }

    nav{
        display: none;
    }

    .card{
        padding: 10px;
    }
    .description h1 { font-size: 100px; }
    .press .line hr { display: none; }
}

/* ============================================================
   RESPONSIVE — MOBILE  (max 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* ── Header ── */
    header { padding: 0 20px; }
    header img { width: 140px; }

    /* Ocultar nav de escritorio */
    header nav { display: none; }

    /* Mostrar hamburger */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
    }

    .hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--white-defecto);
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* ── Nav Drawer ── */
    .nav-drawer {
        display: block;
        position: fixed;
        top: 60px;
        right: 0;
        width: 72%;
        max-width: 280px;
        height: calc(100vh - 60px);
        background-color: var(--dark-grey);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-drawer.open { transform: translateX(0); }

    .nav-drawer ul {
        flex-direction: column;
        padding: 20px 24px;
        gap: 0;
    }

    .nav-drawer ul li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-drawer ul li a {
        display: block;
        padding: 16px 0;
        font-size: 13px;
        letter-spacing: 2px;
        text-transform: uppercase;
    }

    /* Overlay oscuro detrás del drawer */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    .nav-overlay.open { display: block; }

    /* ── Banner ── */
    .baner { height: 80vh; max-height: 580px; }

    .description img { 
        width: 70%;
     }
    .description p  { font-size: 12px; letter-spacing: 3px; }

    /* ── Manifiesto ── */
    .manifiesto {
        padding: 60px 24px;
        gap: 32px;
    }

    .manifiesto h3 { font-size: 11px; letter-spacing: 3px; }

    .manifiesto p {
        width: 100%;
        font-size: 11px;
        line-height: 1.8;
    }

    /* ── Cards / Services ── */

    .card { padding: 20px 10px; border-bottom: solid 1px var(--marron-linea); }

    .card .contenedor img { width: 100px; height: 120px; }

    .card .contenedor a{
        font-size: 12px;
    }

    .card h4 { font-size: 8px; letter-spacing: 4px; }

    /* ── Dist — Kavanah + Portfolio ── */
    .fila,
    .fila-reverse {
        grid-template-columns: 1fr 1fr;
        gap: 0;
        margin: 0;
    }

    .dist .fila > div,
    .dist .fila-reverse > div {
        aspect-ratio: auto; /* También en móvil evitamos el desborde */
        overflow: hidden;
    }

    /* imagen al 100% de ancho */
    .dist .fila .right img,
    .dist .fila-reverse .left img {
        width: 100%;
        height: 100%; /* Se estira para igualar la altura del texto */
        object-fit: cover;
    }

    .dist .fila .right,
    .dist .fila-reverse .left {
        padding: 0;
    }

    .fila .left,
    .fila-reverse .right {
        padding: 10px;
        gap: 10px;
        margin: 0;
    }

    .left .line hr{ height: 50px; }
    .line-reverse hr { 
        margin-left: 100%;
        height: 10px;
    }

    #Kavana { font-size: 20px !important; line-height: 1.2; }
    #port   { font-size: 20px !important; }

    .dist .fila .left p,
    .dist .fila-reverse .right p { font-size: 7px; line-height: 1.1; }
    .dist .fila .left a, .dist .fila-reverse .right a{
        font-size: 10px;
    }
    /* ── Gallery ── */
    .galery .fila {
        padding: 40px 24px;
        gap: 32px;
    }

    .galery .fila .left { 
        width: 100%; 
        padding: 0;
    }

    .galery .fila .left p { font-size: 8px; line-height: 1.7; }

    .galery .fila .right {
        width: 100%;
        height: 200px;
        grid-template-columns: 1.4fr 1fr;
    }

    .galery h3 { font-size: 20px; margin-left: 24px; }

    /* Planificación espacial — segunda .fila */
    .galery .fila:last-of-type {
        padding: 40px 415x;
        gap: 30px;
        flex-direction: column;
    }

    .galery .fila .left.plano {
        width: 100%;
        padding: 0 !important;
    }

    .galery .fila .left.plano img {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }

    .galery .fila .right span {
        font-size: 3px;
    }

    .colab-name{
        letter-spacing: 0.5px;
    }

    .galery .fila .right{
        gap: 10px;
    }

    .colab-v-top { top: 0; right: -5px; writing-mode: vertical-lr; }

    /* Segunda: Parte inferior, pegado derecha, lectura izq-der */
    .colab-h-bottom { bottom: -5px; right: 0; }

    /* Tercera: Lado izquierdo, pegado abajo, lectura abajo-arriba */
    .colab-v-bottom { bottom: 0; left: -5px; writing-mode: vertical-lr; transform: rotate(180deg); }


    .galery .fila .rigth2 {
        width: 80%;
        gap: 20px;
        font-size: 8px;
    }

    .galery .fila .rigth2 .f{ 
        justify-content: space-between;
        gap: 10px !important; 
    }

    .celda p { min-width: auto; font-size: 8px; }

    /* ── Mood Board — mobile: grid limpio ── */
    /* Ocultamos el collage absoluto en móvil y mostramos un grid */
   .mood-board{
    padding: 30px 0;
    height: auto;
   }


    /* ── Niveles ── */
    .niveles { padding: 50px 24px; }

    .niveles .fila {
        gap: 8px;
    }

    .dising img     { height: 140px; }
    #papel img      { height: 100px; }
    #ceramica img   { height: 80px; }
    #manillas img   { height: 100px; }
    .dising p       { font-size: 5px; letter-spacing: 1px; }

    /* ── Cartografía ── */
    .press { padding: 50px 24px; }
    #Cartografia h3 {
        font-size: 42px;
        top: 6%;
    }

    /* ── Wellhall / Contacto ── */
    .wellhall { 
        padding: 60px 24px; 
    }

    .wellhall h3 { font-size: 36px; margin-bottom: 28px; }

    .wellhall .fila {
        gap: 16px;
        display: flex;
        flex-direction: column;
    }

    .wellhall .box {
        padding: 15px 17px;
        min-height: auto;
        gap: 16px;
    }

    .wellhall .box h4 { 
        font-size: 20px; 
        text-align: center;
    }

    .box p { 
        font-size: 15px; 
        line-height: 1.6; 
        text-align: center;
    }

    .wellhall .box .btn-pill {
        padding: 12px 24px;
        font-size: 10px;
        align-self: center;

    }

    .redes { gap: 20px; grid-auto-flow: row; display: flex;
        justify-content: center;
    }
    .redes i { font-size: 40px; }

    /* ── Modals — bottom sheet en móvil ── */
    .modal {
        align-items: flex-end;
        justify-content: center;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 88vh;
        border-radius: 16px 16px 0 0;
        padding: 28px 20px 40px;
        animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    .modal-content h3 { font-size: 24px; }

    .modal-form { gap: 12px; margin-top: 20px; }

    .modal-form input,
    .modal-form textarea { font-size: 14px; }

    .modal-form button { width: 100%; text-align: center; }

    /* ── Footer ── */
    footer {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 32px 24px;
    }
}
