/* ==========================================================
   01. VARIABLES
   ========================================================== */

:root {

    --paper: #f6f5f1;
    --ink: #111315;
    --soft: #62645f;

    --line: rgba(17, 19, 21, 0.16);

    --blue: #2384bd;
    --deep: #0e2737;

    --max: 1480px;

    --gutter: clamp(24px, 5vw, 84px);

}


/* ==========================================================
   02. RESET
   ========================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;

    overflow-x: hidden;
}

body {

    margin: 0;

    background: var(--paper);

    color: var(--ink);

    font-family: Inter, Arial, sans-serif;

    -webkit-font-smoothing: antialiased;

}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
}


/* ==========================================================
   03. UTILIDADES
   ========================================================== */

.wrap {

    width: min(100%, var(--max));

    margin: 0 auto;

    padding-left: var(--gutter);
    padding-right: var(--gutter);

}


/* ==========================================================
   04. HEADER
   ========================================================== */

#siteHeader {

    position: relative;

    z-index: 100;

    width: 100%;

    padding: 22px var(--gutter);

    background: var(--paper);

    border-bottom: 1px solid var(--line);
}


.header-inner {

    width: 100%;

    max-width: var(--max);

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 40px;
}


/* ==========================================================
   05. LOGO
   ========================================================== */

.brand {

    display: flex;

    align-items: center;
}


.brand img {

    width: auto;

    height: 42px;
}


/* ==========================================================
   06. NAVEGACIÓN
   ========================================================== */

.primary-nav {

    display: flex;

    align-items: center;

    gap: 34px;
}


.primary-nav ul {

    display: flex;

    align-items: center;

    gap: 34px;

    margin: 0;

    padding: 0;

    list-style: none;
}


.primary-nav a {

    position: relative;

    padding: 5px 0;

    color: var(--ink);

    font-size: 13px;

    font-weight: 500;
}


/* Línea inferior */

.primary-nav a::after {

    content: "";

    position: absolute;

    left: 0;

    right: 100%;

    bottom: 0;

    height: 1px;

    background: var(--ink);

    transition: right 0.25s ease;
}


.primary-nav a:hover::after,
.primary-nav a.active::after {

    right: 0;
}


/* Texto derecho */

.tagline {

    font-family: "IBM Plex Mono", monospace;

    font-size: 10px;

    letter-spacing: 0.14em;

    text-transform: uppercase;

    color: var(--soft);
}


/* ==========================================================
   07. MENÚ MÓVIL
   ========================================================== */

.menu-toggle {

    display: none;

    width: 34px;

    padding: 0;

    border: 0;

    background: transparent;
}


.menu-toggle span {

    display: block;

    width: 24px;

    height: 1px;

    margin: 6px auto;

    background: var(--ink);
}


/* ---------- Panel de menú móvil ---------- */

.mobile-panel {

    position: fixed;
    inset: 0;

    z-index: 200;

    padding: 30px var(--gutter);

    background: var(--paper);

    transform: translateX(100%);

    transition: transform 0.35s ease;
}

.mobile-panel.open {

    transform: none;
}

.mobile-close {

    position: absolute;

    top: 28px;
    right: var(--gutter);

    font-size: 13px;
}

.mobile-panel ul {

    margin-top: 100px;

    list-style: none;
}

.mobile-panel li {

    border-top: 1px solid var(--line);
}

.mobile-panel li:last-child {

    border-bottom: 1px solid var(--line);
}

.mobile-panel a {

    display: block;

    padding: 15px 0;

    font-family: Archivo, sans-serif;

    font-size: clamp(2rem, 9vw, 4rem);
}


/* ==========================================================
   08. HERO
   ========================================================== */

.projects-hero {
    min-height: auto;

    padding-top: 175px;
    padding-bottom: 70px;

    background: var(--paper);
}

.projects-hero .wrap {
    width: 100%;
}

.eyebrow {
    display: block;

    margin-bottom: 60px;

    color: var(--blue);

    font-size: 10px;
    font-weight: 500;

    letter-spacing: 0.20em;
}

.projects-hero h1 {
    max-width: 1050px;

    margin: 0;

    font-family: Archivo, sans-serif;

    font-size: clamp(5rem, 8.5vw, 9rem);
    font-weight: 500;

    line-height: 0.82;
    letter-spacing: -0.075em;
}

.hero-bottom {
    margin-top: 70px;

    padding-top: 22px;

    border-top: 1px solid var(--line);

    display: grid;

    grid-template-columns: 1fr 1fr;

    align-items: start;
}

.project-count {
    font-size: 10px;

    letter-spacing: 0.16em;
}

.hero-bottom p {
    width: min(100%, 390px);

    margin: 0 0 0 auto;

    color: var(--soft);

    font-size: 14px;

    line-height: 1.65;
}

/* ==========================================================
   09. PROJECT WALL
   ========================================================== */

.project-wall {

    width: 100%;

    padding: 5px;

    display: flex;

    flex-direction: column;

    gap: 5px;

    background: #ffffff;

}


/* ==========================================================
   10. PROYECTO BASE
   ========================================================== */

.project {

    position: relative;

    display: block;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #30373b,
            #111719
        );

    color: #ffffff;

    isolation: isolate;

}


/* ==========================================================
   11. PLACEHOLDER / FOTO
   ========================================================== */

.project-photo {
    position: absolute;

    inset: 0;

    z-index: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    /* Estado normal: casi blanco y negro */
    opacity: 0.72;

    transform: scale(1.02);

    filter:
        grayscale(75%)
        brightness(0.78)
        contrast(0.95)
        saturate(0.25);

    transition:
        transform 0.8s cubic-bezier(.2,.7,.2,1),
        filter 0.6s ease,
        opacity 0.6s ease;
}


/* ==========================================================
   HOVER — RECUPERA COLOR Y NITIDEZ
   ========================================================== */

.project:hover .project-photo {

    opacity: 1;

    transform: scale(1.055);

    filter:
        grayscale(0%)
        brightness(1)
        contrast(1)
        saturate(1);
}


/*
   IMPORTANTE:

   Cuando tengas las fotos reales,
   cambia esta propiedad a opacity: 1;

*/

.project-photo.has-image {

    opacity: 1;

}


/* ==========================================================
   12. OVERLAY
   ========================================================== */

.project-overlay {

    position: absolute;

    inset: 0;

    z-index: 1;

    background:
        linear-gradient(
            to top,
            rgba(5, 10, 13, 0.82) 0%,
            rgba(5, 10, 13, 0.25) 50%,
            rgba(5, 10, 13, 0.05) 100%
        );

    opacity: 0;

    transition: opacity 0.45s ease;

}


/* ==========================================================
   13. NÚMERO
   ========================================================== */

.project-number {

    position: absolute;

    top: 30px;
    left: 32px;

    z-index: 3;

    color: rgba(255, 255, 255, 0.7);

    font-size: 10px;

    letter-spacing: 0.18em;

}


/* ==========================================================
   14. INFORMACIÓN
   ========================================================== */

.project-info {

    position: absolute;

    left: 32px;
    right: 32px;
    bottom: 30px;

    z-index: 3;

    transform: translateY(25px);

    opacity: 0;

    transition:
        opacity 0.4s ease,
        transform 0.45s cubic-bezier(.2,.7,.2,1);

}

.project-category {

    display: block;

    margin-bottom: 14px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 9px;

    text-transform: uppercase;

    letter-spacing: 0.16em;

}

.project-info h2 {

    max-width: 850px;

    margin: 0;

    font-family: Archivo, sans-serif;

    font-size: clamp(2.4rem, 5vw, 5.8rem);

    font-weight: 500;

    line-height: 0.9;

    letter-spacing: -0.055em;

}

.project-details {

    margin-top: 25px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    color: rgba(255, 255, 255, 0.82);

    font-size: 20px;

}
/* BOTÓN — VER PROYECTO */

.project-details span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    padding: 0;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;

    font-family: 'Archivo', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;

    color: #fff;
    background: transparent;
    border: 0;
    box-shadow: none;

    transition: opacity .25s ease, transform .25s ease;
}

.project-details span:last-child:hover {
    background: transparent;
    border: 0;
    transform: translateX(4px);
    opacity: .75;
}

/* ==========================================================
   15. HOVER
   ========================================================== */

.project:hover .project-overlay {

    opacity: 1;

}

.project:hover .project-info {

    opacity: 1;

    transform: translateY(0);

}



/* ==========================================================
   16. PROYECTO PRINCIPAL
   ========================================================== */

.project-hero {

    height: min(82vh, 850px);

}

.project-hero .project-info {

    left: var(--gutter);

    right: var(--gutter);

    bottom: 55px;

}

.project-hero .project-number {

    left: var(--gutter);

    top: 45px;

}

.project-hero .project-info h2 {

    font-size: clamp(4rem, 8vw, 9rem);

}


/* ==========================================================
   17. PAREJA 50 / 50
   ========================================================== */

.project-pair {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 5px;

}

.project-tall {

    height: min(72vh, 760px);

}


/* ==========================================================
   18. COMPOSICIÓN ASIMÉTRICA
   ========================================================== */

.project-asymmetric {

    display: grid;

    grid-template-columns:
        0.75fr
        1.25fr;

    gap: 5px;

}

.project-asymmetric.reverse {

    grid-template-columns:
        1.25fr
        0.75fr;

}

.project-small,
.project-wide {

    height: min(68vh, 700px);

}

.project-small .project-info h2 {

    font-size: clamp(2.5rem, 4vw, 4.8rem);

}


/* ==========================================================
   19. PLACEHOLDER SIN FOTO
   ========================================================== */

.project::before {

    content: "IECG";

    position: absolute;

    top: 50%;
    left: 50%;

    z-index: 0;

    transform: translate(-50%, -50%);

    color: rgba(255, 255, 255, 0.055);

    font-family: Archivo, sans-serif;

    font-size: clamp(5rem, 12vw, 13rem);

    font-weight: 600;

    letter-spacing: -0.08em;

}


/* ==========================================================
   20. CIERRE
   ========================================================== */

.projects-end {
    position: relative;

    min-height: 55vh;

    display: flex;
    align-items: flex-end;

    overflow: hidden;

    background: var(--deep);
    color: #ffffff;
}

.projects-end-image {
    position: absolute;
    inset: 0;
}

.projects-end-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    filter: saturate(0.75);
}

.projects-end-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(7, 18, 25, 0.82) 0%,
            rgba(7, 18, 25, 0.48) 48%,
            rgba(7, 18, 25, 0.15) 100%
        );
}

.projects-end-content {
    position: relative;
    z-index: 2;

    width: 100%;

    padding-top: 110px;
    padding-bottom: 80px;
}

.projects-end span {
    display: block;

    margin-bottom: 55px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 10px;
    letter-spacing: 0.20em;
}

.projects-end h2 {
    max-width: 760px;

    margin: 0;

    font-family: Archivo, sans-serif;

    font-size: clamp(4rem, 6.2vw, 7.2rem);
    font-weight: 500;

    line-height: 0.88;
    letter-spacing: -0.065em;
}

/* ==========================================================
   21. FOOTER
   ========================================================== */

.footer {

    background: #0d1215;

    color: rgba(255, 255, 255, 0.75);

}

.footer-inner {

    width: min(100%, var(--max));

    min-height: 92px;

    margin: 0 auto;

    padding: 0 var(--gutter);

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 28px;

    font-size: 13px;

    white-space: nowrap;

}

.footer a {

    color: inherit;

    transition: color 0.2s ease;

}

.footer a:hover {

    color: #ffffff;

}

.footer-logo {

    display: flex;

    align-items: center;

}

.footer-logo img {

    width: auto;

    height: 27px;

}

.footer-copy {

    color: rgba(255, 255, 255, 0.45);

}


/* ==========================================================
   22. TABLET
   ========================================================== */

@media (max-width: 950px) {

    .tagline {

        display: none;

    }

    .projects-hero {

        min-height: 70vh;

    }

    .project-hero {

        height: 70vh;

    }

    .project-tall,
    .project-small,
    .project-wide {

        height: 60vh;

    }

}


/* ==========================================================
   23. MÓVIL
   ========================================================== */

@media (max-width: 700px) {


    /* HEADER */

    .header-inner {

        height: 78px;

    }

    .brand img {

        height: 34px;

    }

    /* NAVEGACIÓN */

    .primary-nav {

        display: none;

    }

    .menu-toggle {

        display: block;

    }


    /* HERO */

    .projects-hero {

        min-height: 72vh;

        padding-top: 135px;
        padding-bottom: 65px;

    }

    .eyebrow {

        margin-bottom: 30px;

    }

    .projects-hero h1 {

        font-size: clamp(4rem, 19vw, 6rem);

        line-height: 0.86;

    }

    .hero-bottom {

        margin-top: 45px;

        display: block;

    }

    .hero-bottom p {

        margin-top: 20px;

        max-width: 320px;

    }


    /* PROJECT WALL */

    .project-wall {

        gap: 4px;

        padding: 4px;

    }

    .project-pair,
    .project-asymmetric,
    .project-asymmetric.reverse {

        display: block;

    }

    .project {

        height: 68vh;

        min-height: 480px;

        margin-bottom: 4px;

    }


    /*
       En móvil mostramos la información siempre.
       No dependemos del hover.
    */

    .project-overlay {

        opacity: 1;

    }

    .project-info {

        left: 22px;
        right: 22px;
        bottom: 24px;

        opacity: 1;

        transform: none;

    }

    .project-number {

        top: 22px;
        left: 22px;

    }

    .project-hero .project-number {

        top: 22px;
        left: 22px;

    }

    .project-hero .project-info {

        left: 22px;
        right: 22px;
        bottom: 24px;

    }

    .project-info h2,
    .project-hero .project-info h2,
    .project-small .project-info h2 {

        max-width: 90%;

        font-size: clamp(2.8rem, 13vw, 4.5rem);

    }
.project-details {

    margin-top: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

}


    /* CIERRE */

    .projects-end {

        min-height: 65vh;

        padding: 90px 0;

    }

    .projects-end h2 {

        font-size: clamp(3.7rem, 17vw, 6rem);

    }


    /* FOOTER */

    .footer-inner {

        min-height: auto;

        padding-top: 35px;
        padding-bottom: 35px;

        flex-direction: column;

        align-items: flex-start;

        gap: 14px;

        white-space: normal;

    }

    .footer-logo {

        margin-bottom: 10px;

    }

}


/* ==========================================================
   24. ACCESIBILIDAD
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {

        transition-duration: 0.01ms !important;

    }

}
/* ==========================================================
   25. MODAL DE PROYECTO
   ========================================================== */

.project-modal {

    position: fixed;

    inset: 0;

    z-index: 500;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 5vh 5vw;

    visibility: hidden;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/* ----------------------------------------------------------
   FONDO OSCURO
   ---------------------------------------------------------- */

.project-modal-backdrop {

    position: absolute;

    inset: 0;

    background: rgba(8, 12, 15, 0.68);

    backdrop-filter: blur(4px);

}


/* ----------------------------------------------------------
   VENTANA
   ---------------------------------------------------------- */

.project-modal-window {

    position: relative;

    z-index: 2;

    width: min(70vw, 1180px);

    max-height: 88vh;

    overflow: hidden;

    background: var(--paper);

    color: var(--ink);

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.25);

    transform: translateY(20px) scale(0.98);

    transition:
        transform 0.35s cubic-bezier(.2,.7,.2,1);
}


/* ----------------------------------------------------------
   MODAL ABIERTO
   ---------------------------------------------------------- */

.project-modal.is-open {

    visibility: visible;

    opacity: 1;

    pointer-events: auto;
}

.project-modal.is-open .project-modal-window {

    transform: translateY(0) scale(1);
}


/* ----------------------------------------------------------
   BOTÓN CERRAR
   ---------------------------------------------------------- */

.project-modal-close {

    position: absolute;

    top: 18px;

    right: 22px;

    z-index: 5;

    width: 38px;

    height: 38px;

    padding: 0;

    border: 0;

    background: rgba(246, 245, 241, 0.92);

    color: var(--ink);

    font-family: Arial, sans-serif;

    font-size: 30px;

    font-weight: 300;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.project-modal-close:hover {

    background: #ffffff;

    transform: rotate(90deg);
}


/* ----------------------------------------------------------
   GRID
   ---------------------------------------------------------- */

.project-modal-grid {

    display: grid;

    grid-template-columns: 44% 56%;

    min-height: 600px;

    max-height: 88vh;
}


/* ----------------------------------------------------------
   IMAGEN
   ---------------------------------------------------------- */

.project-modal-image {

    min-height: 600px;

    background: #d9d9d5;

    overflow: hidden;
}

.project-modal-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    filter: grayscale(15%);

}


/* ----------------------------------------------------------
   CONTENIDO
   ---------------------------------------------------------- */

.project-modal-content {

    min-width: 0;

    max-height: 88vh;

    overflow-y: auto;

    padding: 65px 60px 60px;
}


/* número */

.project-modal-number {

    display: block;

    margin-bottom: 25px;

    color: var(--blue);

    font-family: "IBM Plex Mono", monospace;

    font-size: 10px;

    letter-spacing: 0.18em;
}


/* categoría */

.project-modal-category {

    display: block;

    margin-bottom: 18px;

    color: var(--soft);

    font-size: 10px;

    font-weight: 500;

    letter-spacing: 0.16em;

    text-transform: uppercase;
}


/* título */

.project-modal-content h2 {

    max-width: 560px;

    margin: 0 0 45px;

    font-family: Archivo, sans-serif;

    font-size: clamp(3rem, 5vw, 5.5rem);

    font-weight: 500;

    line-height: 0.88;

    letter-spacing: -0.06em;
}


/* ----------------------------------------------------------
   DATOS
   ---------------------------------------------------------- */

.project-modal-meta {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 25px;

    padding: 22px 0;

    border-top: 1px solid var(--line);

    border-bottom: 1px solid var(--line);

}


.project-modal-meta div {

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.project-modal-meta span,
.project-modal-section > span {

    color: var(--soft);

    font-family: "IBM Plex Mono", monospace;

    font-size: 9px;

    letter-spacing: 0.16em;

    text-transform: uppercase;
}


.project-modal-meta strong {

    font-size: 13px;

    font-weight: 500;

    line-height: 1.4;
}


/* ----------------------------------------------------------
   DESCRIPCIÓN / ALCANCE
   ---------------------------------------------------------- */

.project-modal-section {

    padding-top: 30px;
}


.project-modal-section p {

    max-width: 600px;

    margin: 12px 0 0;

    color: #4f5350;

    font-size: 14px;

    line-height: 1.75;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 900px) {

    .project-modal {

        padding: 30px;
    }

    .project-modal-window {

        width: 90vw;

    }

    .project-modal-grid {

        grid-template-columns: 1fr;

        max-height: 88vh;

        overflow-y: auto;
    }

    .project-modal-image {

        min-height: 320px;

        height: 320px;
    }

    .project-modal-content {

        max-height: none;

        overflow: visible;

        padding: 45px 40px 50px;
    }

}


@media (max-width: 600px) {

    .project-modal {

        padding: 15px;
    }

    .project-modal-window {

        width: 94vw;

        max-height: 92vh;
    }

    .project-modal-image {

        min-height: 240px;

        height: 240px;
    }

    .project-modal-content {

        padding: 40px 25px 35px;
    }

    .project-modal-content h2 {

        font-size: 3rem;

        margin-bottom: 35px;
    }

    .project-modal-meta {

        grid-template-columns: 1fr;
    }

}