/* ==========================================================================
   LANDING PAGE: CORREDOR ARTÍSTICO - UNMDP
   Estilo Principal - Grilla Base de 9px y Ritmo Vertical Áureo (1.618)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TIPOGRAFÍA (@font-face)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Degular';
    src: url('font/Degular%20(56)/Degular%20(14)/Degular-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Degular';
    src: url('font/Degular%20(56)/Degular%20(14)/Degular-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Degular';
    src: url('font/Degular%20(56)/Degular%20(14)/Degular-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Degular';
    src: url('font/Degular%20(56)/Degular%20(14)/Degular-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Degular';
    src: url('font/Degular%20(56)/Degular%20(14)/Degular-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   2. DESIGN TOKENS & VARIABLES
   -------------------------------------------------------------------------- */
:root {
    /* Fondo base requerido */
    --color-bg: #F0EEEB;

    /* Colores cromáticos */
    --color-primary-red: #DF3A3C;
    --color-primary-hover: #c82d2f;
    --color-text-main: #18191B;
    --color-white: #FFFFFF;
    --color-primary-blue: #0000ff;
    /* Módulo de grilla base */
    --grid-module: 9px;

    /* Tipografía y ritmo vertical */
    --font-base: 18px;
    /* 2 * 9px */
    --line-height-base: 27px;
    /* 3 * 9px = 1.5 * 18px */
    --ratio-golden: 1.618;

    /* Espaciados en múltiplos estrictos de 9px */
    --space-1: 9px;
    /* 1 * 9px */
    --space-2: 18px;
    /* 2 * 9px */
    --space-3: 27px;
    /* 3 * 9px */
    --space-4: 36px;
    /* 4 * 9px */
    --space-5: 45px;
    /* 5 * 9px */
    --space-6: 54px;
    /* 6 * 9px */
    --space-7: 63px;
    /* 7 * 9px */
    --space-8: 72px;
    /* 8 * 9px */
    --space-9: 81px;
    /* 9 * 9px */
    --space-10: 90px;
    /* 10 * 9px */
    --space-12: 108px;
    /* 12 * 9px */

    /* Fuentes del sistema */
    --font-sans: 'Degular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.bold {
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   3. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-base);
    line-height: var(--line-height-base);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--color-bg);
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

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

/* --------------------------------------------------------------------------
   4. LAYOUT SKELETON (CSS GRID + FLEXBOX)
   -------------------------------------------------------------------------- */
.page-container {
    /* Flex column: permite anclar el footer al bottom (sticky footer) */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
}

/* --------------------------------------------------------------------------
   5. HEADER (NAVBAR)
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: clamp(var(--space-2), 2vw, var(--space-4)) clamp(var(--space-2), 4vw, var(--space-6));
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.header-brand {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-brand:hover {
    transform: scale(1.05);
}

/* Ref 1: Isotipo header */
.header-iso {
    width: auto;
    height: clamp(36px, 4vw, 45px);
    /* Múltiplo de 9px: 36px a 45px */
    object-fit: contain;
}

/* Ref 7: Botón "Programa" en Degular Bold 27px */
.header-action {
    pointer-events: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 700;
    /* Degular Bold */
    font-size: clamp(18px, 2.2vw, 27px);
    /* Exacto 27px en desktop (3*9px) */
    line-height: 1;
    padding: clamp(9px, 1.2vw, 12px) clamp(27px, 3vw, 45px);
    /* múltiplos de 9px */
    border: none;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.2s ease,
        box-shadow 0.25s ease;
    white-space: nowrap;

}

.btn_mapa {
    color: var(--color-white);
    background-color: var(--color-primary-blue);
}


.btn-programa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 700;
    /* Degular Bold */
    font-size: clamp(18px, 2.2vw, 27px);
    /* Exacto 27px en desktop (3*9px) */
    line-height: 1;
    color: var(--color-white);
    background-color: var(--color-primary-red);
    padding: clamp(9px, 1.2vw, 12px) clamp(27px, 3vw, 45px);
    /* múltiplos de 9px */
    border: none;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.2s ease,
        box-shadow 0.25s ease;
    white-space: nowrap;
}

.btn-programa:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 24px rgba(223, 58, 60, 0.42);
}

.btn-programa:active {
    transform: translateY(0) scale(0.98);
}

/* --------------------------------------------------------------------------
   6. HERO SECTION (PRIMER VIEWPORT)
   -------------------------------------------------------------------------- */
.hero-viewport {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--space-8) + var(--space-4)) var(--space-3) var(--space-8);
    overflow: visible;
}

/* Contenedor central del contenido (Tulipán + Logotipo) */
.hero-center {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Ref 2 & Ref 3: Isotipo Central (Tulipán) */
.tulip-stage {
    position: relative;
    width: clamp(99px, 11vw, 177px);
    /* Respeta el ancho nativo 177px */
    aspect-ratio: 177 / 353;
    margin-bottom: clamp(var(--space-2), 2vw, var(--space-4));
}

/* Ref 2: Parte superior (iso_up.png) - Animación de florecimiento inicial (5s) con 1s de retraso y balanceo orgánico */
.tulip-up-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1;
    z-index: 1;
    /* z-index menor: se desplaza por detrás */
    transform-origin: 50% 92%;
    /* Pivote en la base para balanceo orgánico de tallo */
    transform: translateY(100%) rotate(0deg);
    animation: flowerBloom 5s cubic-bezier(0.25, 1, 0.4, 1) 1s both;
    will-change: transform;
}

@keyframes flowerBloom {
    0% {
        transform: translateY(100%) rotate(0deg);
        border-radius: 50%;
    }

    18% {
        transform: translateY(78%) rotate(-4.5deg);
        border-radius: 38%;
        /* Pequeña inclinación hacia la izquierda */
    }

    48% {
        transform: translateY(36%) rotate(3.5deg);
        border-radius: 18%;
        /* Balanceo hacia la derecha conforme crece */
    }

    76% {
        transform: translateY(10%) rotate(-1deg);
        border-radius: 5%;
        /* Suave retorno amortiguado */
    }

    100% {
        transform: translateY(0%) rotate(0deg);
        border-radius: 0px;
        /* Posición final vertical */
    }
}

.tulip-up {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform, border-radius;
    mix-blend-mode: multiply;
    border-radius: 50%;
    animation: tulipUpRadius 5s cubic-bezier(0.25, 1, 0.4, 1) 1s both;
}

@keyframes tulipUpRadius {
    0% {
        border-radius: 50%;
    }

    18% {
        border-radius: 38%;
    }

    48% {
        border-radius: 18%;
    }

    76% {
        border-radius: 5%;
    }

    100% {
        border-radius: 0px;
    }
}

/* Ref 3: Parte inferior (iso_dwn.png) - Al frente */
.tulip-dwn {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1;
    z-index: 2;
    /* z-index mayor: tapa a la parte superior en reposo */
    will-change: transform;
    mix-blend-mode: multiply;
}

/* Ref 4: Logotipo Central (logo.png) */
.hero-logo-wrap {
    width: clamp(300px, 70vw, 1350px);
    /* 70% vw según consigna */
    max-width: 90vw;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: transform;
    transform-origin: center center;
}

.hero-logo {
    width: 70%;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.78);
    transform-origin: center center;
    /* Entra suavemente tras el florecimiento de la flor (1s retraso + 5s florecimiento = 6s) */
    animation: logoEntrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) 6s forwards;
    will-change: transform, opacity;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.78);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --------------------------------------------------------------------------
   7. DECORACIONES PARALLAX (REF 5 & REF 6)
   -------------------------------------------------------------------------- */

/* Ref 6: Decoración Superior Derecha */
.deco-sup-wrapper {
    position: absolute;
    top: clamp(-60px, -4vw, 0px);
    right: clamp(-60px, -4vw, 0px);
    width: clamp(340px, 54vw, 1050px);
    aspect-ratio: 1106 / 1172;
    pointer-events: none;
    z-index: 4;
    will-change: transform;
    opacity: 45%;
    width: 45%;
    mix-blend-mode: multiply;
}

.deco-sup-layer {
    position: absolute;
    height: auto;
    will-change: transform;
    transform-origin: 100% 0%; /* Pivote en extremo superior derecho para rotación tipo abanico */
}

/* Capa 1: Base exterior (1106 x 1172) */
.deco-sup-layer-1 {
    top: 0;
    left: 0;
    width: 100%;
}

/* Capa 4: dx 64px, dy 74px (1034 x 1028) */
.deco-sup-layer-4 {
    top: 6.31%;
    left: 5.79%;
    width: 93.49%;
}

/* Capa 3: dx 137px, dy 148px (963 x 882) */
.deco-sup-layer-3 {
    top: 12.63%;
    left: 12.39%;
    width: 87.07%;
}

/* Capa 2: dx 214px, dy 266px (891 x 738) */
.deco-sup-layer-2 {
    top: 19%;
    left: 19.35%;
    width: 80.56%;
}

/* Ref 5: Decoración Inferior Izquierda */
.deco-inf-wrapper {
    position: absolute;
    bottom: clamp(-40px, -3vw, 20px);
    left: clamp(-40px, -4vw, 0px);
    width: clamp(280px, 42vw, 760px);
    aspect-ratio: 731 / 775;
    pointer-events: none;
    z-index: 10;
    will-change: transform, filter, opacity;
    transform-origin: center left;
    width: 30%;
    opacity: 0.92;
}

.deco-inf-layer {
    position: absolute;
    height: auto;
    will-change: transform;
    transform-origin: 0% 100%; /* Pivote en extremo inferior izquierdo para rotación tipo abanico */
}

/* Capa 1: Base exterior (731 x 775) */
.deco-inf-layer-1 {
    top: 0;
    left: 0;
    width: 100%;
}

/* Capa 4: dx 2px, dy 48px (684 x 680) */
.deco-inf-layer-4 {
    top: 6.19%;
    left: 0.27%;
    width: 93.57%;
}

/* Capa 3: dx 0px, dy 95px (637 x 583) */
.deco-inf-layer-3 {
    top: 12.26%;
    left: 0;
    width: 87.14%;
}

/* Capa 2: dx -3px, dy 143px (589 x 488) */
.deco-inf-layer-2 {
    top: 18.45%;
    left: 0;
    width: 80.57%;
}

/* --------------------------------------------------------------------------
   8. MEDIA QUERIES (RESPONSIVE EXCELLENCE)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --space-8: 45px;
        --space-6: 36px;
    }

    .site-header {
        padding: var(--space-2) var(--space-3);
    }

    .btn-programa {
        font-size: 18px;
        /* Múltiplo de 9px (2*9) */
        padding: 8px 22px;
    }

    .hero-viewport {
        padding-top: calc(var(--space-6) + var(--space-4));
    }

    .deco-sup-wrapper {
        width: clamp(240px, 58vw, 420px);
        top: -15px;
        right: -15px;
    }

    .deco-inf-wrapper {
        width: clamp(200px, 48vw, 360px);
        bottom: -10px;
        left: -15px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 18px;
    }

    .hero-logo-wrap {
        width: 86vw;
    }

    .tulip-stage {
        width: 90px;
        /* Múltiplo de 9px (10 * 9) */
        margin-bottom: 18px;
    }

    .header-iso {
        height: 36px;
        /* Múltiplo de 9px (4 * 9) */
    }

    .btn-programa {
        font-size: 16px;
        padding: 8px 18px;
    }

    .deco-sup-wrapper {
        width: clamp(200px, 54vw, 280px);
        top: -10px;
        right: -10px;
        opacity: 0.9;
    }

    .deco-inf-wrapper {
        width: clamp(180px, 48vw, 260px);
        bottom: -10px;
        left: -10px;
        opacity: 0.9;
    }
}

/* --------------------------------------------------------------------------
   9. SEGUNDO VIEWPORT: ROTADOR DE DISCIPLINAS
   -------------------------------------------------------------------------- */
.disciplines-viewport {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    padding: var(--space-8) var(--space-4);
    z-index: 5;
    overflow: visible;
    background-image:
        url(images/trama-clara.png),
        /* Capa 1 (Arriba): Trama transparente */
        linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
        /* Capa 2 (Medio): Filtro oscuro */
        url(images/corredor.webp);
    /* Capa 3 (Abajo): Imagen de fondo */
    /* Configuras el comportamiento para cada capa en el mismo orden (Trama, Gradiente, Imagen) */
    background-size: auto, cover, cover;
    background-repeat: repeat, no-repeat, no-repeat;
    background-position: top left, center, center;


}



.disciplines-inner {
    position: relative;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.disciplines-title {
    font-family: var(--font-sans);
    font-weight: 700;
    /* Degular Bold */
    font-size: clamp(15vw, 10vw, 15vw);
    /* Múltiplos de 9px: 45px (5*9) a 99px (11*9) */
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
    text-align: center;
    margin: 0;
    min-height: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.word-rotator {
    display: inline-block;
    color: #00ffc6;
    user-select: none;
    will-change: transform, opacity, filter;
}

.word-rotator.is-entering {
    animation: wordIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.word-rotator.is-leaving {
    animation: wordOut 0.4s ease forwards;
}

@keyframes wordIn {
    0% {
        opacity: 0;
        transform: translateY(27px);
        /* Múltiplo de 9px (3*9) */
        filter: blur(6px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes wordOut {
    0% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-27px);
        /* Múltiplo de 9px (3*9) */
        filter: blur(6px);
    }
}

/* Espacio inferior de scroll para fluidez de navegación */
.scroll-spacer {
    height: 40vh;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.tulip-stage {
    scale: 0.8;
}

.fondo-hero {
    position: absolute;
    z-index: 1;
    width: 170%;
    max-width: 170%;
    /* Deriva diagonal en reposo + aceleración con scroll (controlado por JS) */
    will-change: transform;
    pointer-events: none;
}

.seccion-01 {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('images/trama.png');
    background-size: auto, cover, cover;
    background-repeat: repeat, no-repeat, no-repeat;
    background-position: top left, center, center;
    text-align: center;
}

.seccion-01 h1 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(12vw, 3vw, 150px);
    line-height: 1.2;
    letter-spacing: 0.05em;
    /*color: var(--color-text-main);*/
    color: #0000ff;
    text-align: center;
    margin: 0;
    user-select: none;
}

.seccion-01 h2 {
    color: #0000ff;
}

/* --------------------------------------------------------------------------
   8. FOOTER (SITE FOOTER)
   -------------------------------------------------------------------------- */
.site-footer {
    position: relative;
    width: 100%;
    background-color: var(--color-bg);
    overflow: hidden;
    /* Recorta limpiamente la decoración perimetral derecha */
    min-height: clamp(140px, 14vw, 200px);
    display: flex;
    align-items: center;
    padding-top: clamp(var(--space-5), 4vw, var(--space-7));
    padding-bottom: clamp(var(--space-5), 4vw, var(--space-7));
    /* Misma distancia de left exacta que el isotipo del header: */
    padding-left: clamp(var(--space-2), 4vw, var(--space-6));
    padding-right: clamp(var(--space-2), 4vw, var(--space-6));
    z-index: 10;
    /* Sticky footer: siempre anclado al bottom de la página */
    margin-top: auto;
    flex-shrink: 0;
}

.footer-container {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(var(--space-4), 7vw, var(--space-12));
    width: 100%;
    max-width: 1600px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-brand:hover {
    transform: scale(1.03);
}

.footer-logo {
    width: auto;
    height: clamp(38px, 4.2vw, 54px);
    object-fit: contain;
    display: block;
}

/* Menú de enlaces horizontal */
.footer-nav {
    display: flex;
    align-items: flex-start;
    gap: clamp(var(--space-3), 4vw, var(--space-8));
    flex-wrap: nowrap;
}

.footer-nav-link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: #18191B;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(13px, 1.3vw, 18px);
    line-height: 1.2;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-nav-link:hover {
    opacity: 0.75;
    transform: translateY(-1px);
}

.footer-nav-text {
    display: block;
}

/* Underline realizado con div y border-bottom con separación pronunciada */
.footer-nav-underline {
    width: 100%;
    min-width: clamp(55px, 6.5vw, 95px);
    margin-top: clamp(8px, 0.9vw, 14px);
    /* Distancia mayor que underline estándar */
    border-bottom: 1.5px solid #18191B;
    pointer-events: none;
}

/* Decoración derecha: deco1_ full.png escalado, flipeado y recortado */
.footer-deco-wrap {
    position: absolute;
    top: 50%;
    right: clamp(-160px, -9vw, -40px);
    transform: translateY(-43%);
    /* Alinea el vértice de la curva (y=42%) con el centro vertical */
    width: clamp(280px, 28vw, 480px);
    aspect-ratio: 731 / 775;
    pointer-events: none;
    z-index: 1;
}

.footer-deco-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scaleX(-1);
    /* Flipeado horizontal para que el arco curve hacia la izquierda */
    display: block;
}

/* Adaptación responsive: en celular en 1 línea limpia */
@media (max-width: 768px) {
    .site-footer {
        min-height: auto;
        padding-top: var(--space-4);
        padding-bottom: var(--space-4);
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .footer-nav {
        width: 100%;
        justify-content: space-between;
        gap: clamp(4px, 1.5vw, 12px);
    }

    .footer-nav-link {
        font-size: clamp(10.5px, 2.7vw, 14px);
    }

    .footer-nav-underline {
        min-width: 0;
        margin-top: 6px;
        border-bottom-width: 1px;
    }

    .footer-deco-wrap {
        right: -130px;
        width: 200px;
        opacity: 0.35;
        transform: translateY(-43%);
    }
}