/* ==========================================================
   inicio.css — Estilos exclusivos de la página de inicio
   ========================================================== */

/* =========================================================
   PRELOADER
   ========================================================= */
#preloader {
    position: fixed;
    inset: 0;
    background-color: #1A1929;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
#preloader img {
    width: 50vw;
    max-width: 420px;
    filter: brightness(0) invert(1);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1;   transform: scale(1);    }
    50%       { opacity: 0.3; transform: scale(0.97); }
}

/* =========================================================
   HERO CINÉTICO
   ========================================================= */
#hero-kinetic {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #1A1929;
}
.gallery-container {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    overflow: hidden;
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26,25,41,0.6);
    z-index: 10;
    pointer-events: none;
}
.col {
    position: absolute;
    top: 0;
    width: 33.333vw;
    display: flex;
    flex-direction: column;
    will-change: transform;
    transform: translateZ(0);
}
.col-1 { left: 0; }
.col-2 { left: 33.333vw; }
.col-3 { left: 66.666vw; }

.project-item-hero {
    width: 100%;
    padding: 1vw;
    position: relative;
    overflow: hidden;
}
.img-wrapper-hero {
    width: 100%; height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transform: translateZ(0);
}
.project-item-hero img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transform: scale(1.05);
    transition: filter 0.6s ease, transform 0.6s ease;
    will-change: transform;
}
.project-item-hero:hover img {
    filter: grayscale(20%);
    transform: scale(1);
}

/* Alturas relativas de items del hero */
.h-50 { height: 50vh; }
.h-60 { height: 60vh; }
.h-70 { height: 70vh; }
.h-80 { height: 80vh; }

/* =========================================================
   HERO — CONTENIDO LATERAL
   ========================================================= */
#hero-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 50;
    pointer-events: none;
    padding: 0 6vw 5vh;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}
#hero-content .hero-left  { pointer-events: auto; max-width: 52ch; }
#hero-content .hero-right { pointer-events: auto; text-align: right; flex-shrink: 0; }

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(16px);
}
.hero-eyebrow-line {
    width: 36px; height: 1.5px;
    background: rgba(255,255,255,0.5);
    flex-shrink: 0;
}
.hero-eyebrow-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}
.hero-tagline {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.15;
    margin: 0;
}
.hero-tagline strong { color: #fff; font-weight: inherit; }
.hero-tagline .tl { display: block; overflow: hidden; }
.hero-tagline .tl span { display: block; transform: translateY(110%); opacity: 0; }

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 2rem;
    padding: 0.85rem 2rem;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    transition: border-color 0.3s, color 0.3s;
}
.hero-cta::before {
    content: '';
    position: absolute; inset: 0;
    background: #fff;
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    z-index: 0;
}
.hero-cta:hover::before { transform: translateX(0); }
.hero-cta:hover  { color: #1A1929; border-color: #fff; }
.hero-cta span, .hero-cta svg { position: relative; z-index: 1; }
.hero-cta svg {
    width: 14px; height: 14px;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    transition: transform 0.3s ease;
}
.hero-cta:hover svg { transform: translateX(4px); }

/* Stats desktop */
.hero-stats {
    display: flex;
    gap: 0;
    align-items: flex-end;
    justify-content: flex-end;
}
.hero-stat-item {
    text-align: right;
    padding: 0 2rem;
    border-right: 1px solid rgba(255,255,255,0.15);
    opacity: 0;
    transform: translateY(20px);
}
.hero-stat-item:last-child  { border-right: none; padding-right: 0; }
.hero-stat-item:first-child { padding-left: 0; }
.hero-stat-num {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2.8rem, 5vw, 5rem);
    color: #fff;
    line-height: 1;
    display: block;
    letter-spacing: -0.02em;
}
.hero-stat-suffix { font-family: 'Anton', sans-serif; font-size: 0.6em; color: rgba(255,255,255,0.6); }
.hero-stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    display: block;
    margin-top: 0.6rem;
    line-height: 1.5;
}

/* Indicador scroll */
#scroll-indicator {
    position: absolute;
    bottom: 2.5rem; left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    pointer-events: none;
}
#scroll-indicator span {
    font-family: 'Inter', sans-serif;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}
#scroll-indicator .si-line {
    width: 1px; height: 40px;
    background: rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}
#scroll-indicator .si-line::after {
    content: '';
    position: absolute; top: -100%; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.7);
    animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
    0%   { top: -100%; }
    100% { top: 100%;  }
}
@media (max-width: 768px) { #scroll-indicator { display: none; } }

/* =========================================================
   HERO ELEMENTOS MOBILE
   ========================================================= */
#hero-stats-mobile,
#hero-text-mobile { display: none; }

#hero-stats-mobile {
    position: absolute;
    top: calc(var(--vh, 1dvh) * 16);
    left: 0; right: 0;
    z-index: 50;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
}
.hsm-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    opacity: 0;
    transform: translateY(18px);
}
.hsm-num {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2.4rem, 10vw, 3.5rem);
    color: #fff;
    line-height: 1;
    display: block;
    letter-spacing: -0.02em;
}
.hsm-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    display: block;
    margin-top: 0.4rem;
    line-height: 1.5;
}
.hsm-sep {
    width: 1px; height: 40px;
    background: rgba(255,255,255,0.15);
    align-self: center;
    flex-shrink: 0;
}
#hero-text-mobile {
    position: absolute;
    top: calc(var(--vh, 1dvh) * 65);
    left: 0; right: 0;
    z-index: 50;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 7vw;
    gap: 0;
}
.htm-tagline {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1.25rem, 6vw, 2rem);
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    line-height: 1.2;
    margin: 0 0 1.4rem;
    opacity: 0;
    transform: translateY(16px);
}
.htm-tagline strong { color: #fff; font-weight: inherit; }

/* =========================================================
   TARJETAS CERTIFICACIONES
   ========================================================= */
.cert-card {
    background: #EAE8E3;
    transition: background 0.5s ease;
}
.cert-num  { color: #1A1929; transition: color 0.5s ease; }
.cert-year { color: #9ca3af; transition: color 0.5s ease; }
.cert-body { border-color: rgba(26,25,41,0.1); transition: border-color 0.5s ease; }
.cert-title { color: #1A1929; transition: color 0.5s ease; }
.cert-sub  { color: #9ca3af; }
.cert-card.cert-active                 { background: #1A1929; }
.cert-card.cert-active .cert-num       { color: #ffffff; }
.cert-card.cert-active .cert-year      { color: #6b7280; }
.cert-card.cert-active .cert-body      { border-color: rgba(255,255,255,0.1); }
.cert-card.cert-active .cert-title     { color: #ffffff; }

/* =========================================================
   ACORDEÓN DE IMÁGENES
   ========================================================= */
.acordeon-wrap {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
.ac-panel {
    position: relative;
    flex: 1;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.7s cubic-bezier(0.25,1,0.5,1);
}
.ac-panel.ac-active { flex: 5; cursor: default; }
.ac-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(60%);
    transform: scale(1.08);
    transition: filter 0.7s ease, transform 0.7s ease;
}
.ac-panel.ac-active .ac-img { filter: grayscale(0%); transform: scale(1); }
.ac-overlay {
    position: absolute; inset: 0;
    background: rgba(26,25,41,0.65);
    transition: background 0.7s ease;
    pointer-events: none;
}
.ac-panel.ac-active .ac-overlay { background: rgba(26,25,41,0); }

/* =========================================================
   QUIÉNES SOMOS
   ========================================================= */
.qs-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(26,25,41,0.4);
    display: block;
}
.qs-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3.5rem, 9vw, 9rem);
    text-transform: uppercase;
    line-height: 0.95;
    color: #1A1929;
    margin: 0;
    overflow: hidden;
}
.qs-link-top {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #EAE8E3;
    background: #1A1929;
    text-decoration: none;
    padding: 0.75rem 1.6rem;
    white-space: nowrap;
    align-self: flex-end;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
}
.qs-link-top::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.12);
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.qs-link-top:hover::before { transform: translateX(0); }
.qs-link-top svg { width:13px; height:13px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:transform 0.3s; position:relative; z-index:1; }
.qs-link-top span { position:relative; z-index:1; }
.qs-link-top:hover svg { transform: translateX(4px); }

.qs-divider { width:100%; height:1px; background:rgba(26,25,41,0.12); position:relative; z-index:1; }

.qs-stats {
    display: flex;
    align-items: stretch;
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 3rem;
    padding-bottom: 3rem;
    gap: 0;
    position: relative; z-index:1;
}
.qs-stat-item { flex:1; display:flex; flex-direction:column; gap:0.5rem; overflow:hidden; }
.qs-stat-num {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3rem, 6vw, 6.5rem);
    line-height: 1;
    color: #1A1929;
    display: block;
    letter-spacing: -0.02em;
    transform: translateY(60px);
    opacity: 0;
}
.qs-stat-sup { font-size:0.55em; color:rgba(26,25,41,0.45); }
.qs-stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(26,25,41,0.5);
    line-height: 1.5;
    transform: translateY(20px);
    opacity: 0;
}
.qs-stat-sep { width:1px; background:rgba(26,25,41,0.12); margin:0 2.5rem; flex-shrink:0; }

.qs-cols {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 4rem;
    padding-bottom: 5rem;
    gap: 0;
    position: relative; z-index:1;
}
.qs-col-sep { width:1px; background:rgba(26,25,41,0.12); margin:0 4rem; }
.qs-col { overflow:hidden; display:flex; flex-direction:column; }
.qs-col-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #1A1929;
    display: block;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #1A1929;
    transform: translateX(-20px);
    opacity: 0;
}
.qs-col-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.85;
    color: rgba(26,25,41,0.65);
    text-align: justify;
    margin: 0;
    transform: translateY(25px);
    opacity: 0;
}
.qs-col-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #EAE8E3;
    background: #1A1929;
    text-decoration: none;
    padding: 0.75rem 1.6rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
    transform: translateY(15px);
    opacity: 0;
}
.qs-col-link::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.12);
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.qs-col-link:hover::before { transform: translateX(0); }
.qs-col-link svg { width:13px; height:13px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:transform 0.3s; position:relative; z-index:1; }
.qs-col-link span { position:relative; z-index:1; }
.qs-col-link:hover svg { transform: translateX(4px); }

/* Clientes */
.marquee-track { display:flex; white-space:nowrap; will-change:transform; transform:translateZ(0); }

/* =========================================================
   RESPONSIVE MOBILE — inicio
   ========================================================= */
@media (max-width: 768px) {
    /* Galería: 2 columnas (col-3 oculta) */
    .col { width: 50vw; }
    .col-1 { left: 0; }
    .col-2 { left: 50vw; }
    .col-3 { display: none; }

    .project-item-hero { padding: 1.5vw; }
    .h-50 { height: 32vh; }
    .h-60 { height: 38vh; }
    .h-70 { height: 44vh; }
    .h-80 { height: 50vh; }

    #hero-kinetic      { height: calc(var(--vh, 1dvh) * 100); }
    .gallery-container { height: calc(var(--vh, 1dvh) * 100); }
    #hero-content      { display: none; }

    #hero-stats-mobile { display: flex; }
    #hero-text-mobile  { display: flex; }

    #hero-text-mobile .hero-cta {
        margin-top: 0;
        align-self: center;
        border-color: rgba(255,255,255,0.45);
        font-size: 0.62rem;
        padding: 0.75rem 1.6rem;
    }

    /* Acordeón mobile: vertical */
    .acordeon-wrap { flex-direction: column; height: 100dvh; }
    .ac-panel.ac-active { flex: 5; }
    .ac-img { filter: none !important; transform: none !important; transition: none !important; }

    /* Quiénes somos mobile */
    .qs-header { padding: 4rem 1.5rem 2.5rem !important; }
    .qs-title  { font-size: clamp(3rem, 14vw, 5rem); }
    .qs-link-top { display: none; }
    .qs-stats { flex-wrap: wrap; padding: 2rem 1.5rem; gap: 1.5rem 0; }
    .qs-stat-item { flex: 1 1 40%; min-width: 0; }
    .qs-stat-sep  { display: none; }
    .qs-stat-num  { font-size: clamp(2.5rem, 10vw, 4rem); }
    .qs-cols  { grid-template-columns: 1fr; padding: 3rem 1.5rem 5rem; gap: 0; }
    .qs-col-sep { display: none; }
    .qs-col:first-child { padding-bottom: 4rem; }
    .qs-col + .qs-col { padding-top: 3.5rem; border-top: 1px solid rgba(26,25,41,0.12); }

    /* Anular animaciones GSAP en mobile — visibles siempre */
    .qs-col-label,
    .qs-col-text,
    .qs-col-link,
    .qs-stat-num,
    .qs-stat-label {
        opacity: 1 !important;
        transform: none !important;
    }
    .qs-col-link {
        display: inline-flex;
        align-self: flex-start;
        margin-top: 3rem;
        margin-bottom: 0.5rem;
    }
}
