:root {

    /* COLORES BASE PREMIUM */
    --negro: #171717;
    --negro-alt: #171717;
    --blanco: #ffffff;
    --gris-suave: #f4f4f4;
    --gris-borde: #e8e8e8;

    /* SOMBRA PREMIUM */
    --sombra-soft: 0 20px 60px rgba(0, 0, 0, 0.06);
    --sombra-card: 0 25px 70px rgba(0, 0, 0, 0.08);

}

/* ==============================
           SUCCESS MESSAGE (FORMULARIO)
        ============================== */
.success-card {
    margin: 80px auto;
    max-width: 520px;
    padding: 70px 55px;
    text-align: center;

    background: var(--blanco);
    border-radius: 16px;

    box-shadow: var(--sombra-card);

    animation: fadeInUp .7s ease;
}

.success-icon {

    width: 85px;
    height: 85px;

    margin: 0 auto 28px;

    border-radius: 50%;

    background: var(--negro);
    color: var(--blanco);

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

    font-size: 38px;
}

.success-title {
    font-size: 28px;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.success-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 6px;
}

.success-subtext {
    font-size: 15px;
    color: #777;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoFade {

    from {
        opacity: 0;
        transform: translate(-50%, -35%) scale(.88);
    }

    to {
        opacity: .13;
        transform: translate(-50%, -50%) scale(1);
    }

}

/* ========================================
           RESET Y ESTILOS BASE
        ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.2px;
    line-height: 1.6;
    color: #000;
    background-color: var(--negro);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

main {
    overflow-x: hidden;
    width: 100%;
    padding-top: 120px;
}

/* Prevenir scroll horizontal en iOS Safari */
body {
    touch-action: pan-y;
}

/* ========================================
           HEADER Y NAVEGACIÓN
        ======================================== */
header {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(0);

    width: 92%;
    max-width: 1200px;

    background: rgba(255, 255, 255, 0.35);
    /* translucidez */

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border: 1px solid rgba(255, 255, 255, 0.25);

    border-radius: 18px;

    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);

    z-index: 1000;

    transition: transform 0.4s cubic-bezier(.22, .61, .36, 1),
        background 0.3s ease;
}


header.hide {
    transform: translateX(-50%) translateY(-140%);
}

/* NAV DESKTOP */
nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;

    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    /* elimina subrayado */
    color: #111;
    font-weight: 500;
}

/* Estado contraído */
header.scrolled {
    top: 15px;
    transform: translateX(-50%) scale(0.97);
}

.header-container {
    padding: 0.08rem 1rem;

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

header.scrolled .header-container {
    padding: 0.6rem 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: height 0.35s ease;
}

header.scrolled .logo-img {
    height: 42px;
}

.section-divider {
    width: 140px;
    height: 2px;
    margin: 90px auto;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.6) 20%,
            rgba(255, 255, 255, 1) 50%,
            rgba(255, 255, 255, 0.6) 80%,
            transparent 100%);
}

.quienes-somos-img {
    height: 26px;
    /* antes 22px */
    width: auto;
    transition: height 0.35s ease, opacity 0.35s ease;
}

header.scrolled .quienes-somos-img {
    height: 21px;
    /* antes 18px */
    opacity: 0.95;
}

nav ul li a {
    color: #111;
    font-weight: 500;
}

nav ul li a:hover {
    opacity: 0.6;
}

nav a:hover {
    opacity: 0.6;
}

.instagram-link {
    display: flex;
    align-items: center;
    padding: 0;
}

.instagram-link svg {
    transition: opacity 0.3s ease;
}

.instagram-link:hover svg {
    opacity: 0.6;
}

/* ========================================
           SECCIONES GENERALES
        ======================================== */
section {
    padding: 5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    scroll-margin-top: 0px;
}

h1,
h2 {
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

h1 {
    font-size: 3rem;
    color: #ffffff;
}

h2 {
    font-size: 2.5rem;
    color: #000;
    text-align: center;
    margin-bottom: 4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}



/* ========================================
           SECCIÓN INICIO (HERO)
======================================== */

#inicio {
    background-color: var(--negro);
    color: white;
    text-align: center;

    padding-top: 7rem;
    padding-bottom: 5rem;
    padding-left: 2rem;
    padding-right: 2rem;

    display: flex;
    flex-direction: column;
    align-items: center;

    position: relative;
    
}


/* Logo gigante de fondo */
#inicio .logo-hero {
    position: absolute;
    width: 700px;
    height: auto;

    opacity: 0;

    z-index: 1;

    top: 45%;
    left: 49.8%;

    transform: translate(-50%, -50%) scale(.92);

    animation: logoFade 3.2s cubic-bezier(.22, .61, .36, 1) forwards;
}

/* Asegura que el contenido va por delante del logo */
#inicio p,
#inicio h1,
#inicio a {
    position: relative;
    z-index: 2;
}

/* Mini claim superior */
.hero-mini {
    font-size: 0.70rem;
    letter-spacing: 4px;
    opacity: 0.7;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

/* Título principal */
#inicio h1 {
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 300;
    max-width: 900px;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

/* Subtítulo */
.hero-sub {
    max-width: 700px;
    font-size: 1.05rem;
    opacity: 0.75;
    font-weight: 300;
    letter-spacing: 0.3px;
    margin-bottom: 2.5rem;
}

/* Botón CTA */
.cta-hero {
    display: inline-block;
    padding: 1.2rem 2.2rem;

    background: #ffffff;
    color: #0f0f0f;

    border-radius: 14px;
    text-decoration: none;

    font-weight: 500;
    letter-spacing: 0.4px;

    transition: 0.25s ease;
}

.cta-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* ========================================
           HERO ANIMATION
======================================== */

@keyframes heroFadeUp {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* Estado inicial */
.hero-mini,
#inicio h1,
.hero-sub,
.cta-hero {
    opacity: 0;
    animation: heroFadeUp .9s cubic-bezier(.22, .61, .36, 1) forwards;
}

/* Cascada elegante */
.hero-mini {
    animation-delay: .2s;
}

#inicio h1 {
    animation-delay: .4s;
}

.hero-sub {
    animation-delay: .6s;
}

.cta-hero {
    animation-delay: .8s;
}

/* ========================================
           SECCIÓN ETAPAS
        ======================================== */
#etapas {
    background-color: var(--blanco);
    color: #000000;
}

#etapas h2 {
    color: #000000;
}

.etapas-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    position: relative;
    padding: 2rem 0;
}

.etapa-timeline-item {
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.etapa-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    left: calc(50% + 50px);
    width: calc(100% + 2rem - 100px);
    height: 2px;
    background-color: var(--negro);
    z-index: 1;
}

.etapa-numero {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--negro);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 300;
    position: relative;
    z-index: 3;
    border: 5px solid #ffffff;
}

.etapa-timeline-item h3 {
    color: #000000;
    font-size: 1.3rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    width: 100%;
}

.etapa-timeline-item p {
    color: #333333;
    line-height: 1.6;
    font-weight: 300;
    font-size: 0.9rem;
    width: 100%;
}

/* ========================================
           SECCIÓN PORTFOLIO
======================================== */

#portfolio {
    background-color: var(--negro);
    color: #ffffff;
}

#portfolio h2 {
    color: #ffffff;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 500px;
    margin: 0 auto;
    justify-items: center;
}

.portfolio-item {
    position: relative;
    width: 100%;
    max-width: 380px;

    aspect-ratio: 1 / 1;
    /* 🔥 clave */

    border-radius: 14px;
    overflow: hidden;
    cursor: zoom-in;
    background: #111;

    transition: transform .35s ease,
        box-shadow .35s ease;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

.portfolio-item img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;

    display: block;
    transition: opacity 0.4s ease;
}

/* -------- Dual View (Frontal / Trasera) -------- */

.dual-view .back {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.dual-view:hover .back {
    opacity: 1;
}

.dual-view:hover .front {
    opacity: 0;
}

/* ========================================
           LIGHTBOX PREMIUM
======================================== */

.lightbox {

    position: fixed;
    inset: 0;

    background: rgba(8, 8, 8, .92);

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

    z-index: 9999;

    opacity: 0;
    pointer-events: none;

    backdrop-filter: blur(6px);

    transition: opacity .45s cubic-bezier(.22, .61, .36, 1);
}

/* estado abierto */
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}



/* ========================================
        CONTENEDOR
======================================== */

.lightbox-stage {

    width: 88vw;
    height: 82vh;

    overflow: auto;

    cursor: grab;

    overscroll-behavior: contain;

    display: block;
}


/* ocultar barras pero mantener drag */
.lightbox-stage::-webkit-scrollbar {
    display: none;
}

.lightbox-stage {
    scrollbar-width: none;
}

.lightbox-stage:active {
    cursor: grabbing;
}



/* ========================================
            IMAGEN
======================================== */

.lightbox-stage img {

    max-width: none;
    min-width: 1200px;

    height: auto;

    display: block;

    user-select: none;
    -webkit-user-drag: none;

    will-change: transform, opacity;
}

/* Botón cerrar (X) */

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 77px;

    font-size: 36px;
    font-weight: 400;
    line-height: 1;

    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);

    cursor: pointer;
    z-index: 10001;

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

.lightbox-close:hover {
    color: #ffffff;
    transform: scale(1.15);
}

.lightbox-prev {
    position: fixed;
    top: 50%;
    left: 30px;
    /* ← mueve aquí */
    transform: translateY(-50%);
    font-size: 44px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10000;
    padding: 20px;
    opacity: 0.8;
    transition: opacity .3s ease;
}

.lightbox-next {
    position: fixed;
    top: 50%;
    right: 20px;
    /* ← mueve aquí */
    transform: translateY(-50%);
    font-size: 44px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10000;
    padding: 20px;
    opacity: 0.7;
    transition: opacity .3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.15);
}


/* ========================================
    SECCIÓN SOBRE MÍ
======================================== */
#sobre-mi {
    background-color: var(--negro-alt);
    color: #ffffff;
}

#sobre-mi h2 {
    color: #ffffff;
}

.sobre-contenido {
    max-width: 900px;
    margin: 0 auto 6rem auto;
    text-align: center;
    line-height: 2.2;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 300;
}


/* ========================================
           SECCIÓN PERSONALIZACIÓN
        ======================================== */
#personalizacion {
    background-color: var(--negro);
    color: #ffffff;
}

#personalizacion h2 {
    color: #ffffff;
}

.personalizacion-contenido {
    max-width: 1000px;
    margin: 0 auto;
}

.personalizacion-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.personalizacion-intro p {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.personalizacion-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.personalizacion-texto {
    font-size: 1rem;
    line-height: 1.8;
    color: #ffffff;
    font-weight: 300;
}

.personalizacion-lista {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
}

.personalizacion-lista li {
    padding: 1rem 0;
    border-bottom: 1px solid #333333;
    color: #ffffff;
    font-weight: 300;
    font-size: 0.95rem;
}

.personalizacion-lista li:nth-child(7),
.personalizacion-lista li:last-child {
    border-bottom: none;
}

.personalizacion-lista li::before {
    content: "— ";
    color: #ffffff;
    font-weight: 400;
}

/* ========================================
           SECCIÓN CONTACTO
        ======================================== */
#contacto {
    background-color: var(--gris-suave);
    color: #000000;
}

#contacto h2 {
    color: #000000;
}

.contacto-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    font-weight: 300;
    color: #333333;
}

.contacto-helper {

    text-align: center;

    letter-spacing: .2px;

    max-width: 700px;
    margin: 0 auto 2.8rem;

    color: #555;

    font-size: .95rem;
    line-height: 1.7;

}


/* ========================================
           SECCIÓN CARACTERÍSTICAS
        ======================================== */
#caracteristicas {
    background-color: var(--blanco);
    color: #000000;
}

.caracteristicas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.caracteristica-item {
    text-align: center;
    padding: 2rem 1rem;
}

.caracteristica-item .icono {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #000000;
    font-weight: 300;
}

.caracteristica-item h3 {
    color: #000000;
    font-size: 1.3rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.caracteristica-item p {
    color: #333333;
    line-height: 1.7;
    font-weight: 300;
    font-size: 0.95rem;
}

#contacto h2 {
    color: #000000;
}

#contacto>p {
    color: #333333;
}

.contacto-info {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 2rem;

    max-width: 900px;
    margin: 0 auto 4rem;

}

.contacto-metodo {

    background: #ffffff;
    padding: 2.2rem;

    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, .06);

    box-shadow: 0 12px 35px rgba(0, 0, 0, .06);

    transition: .28s ease;

    cursor: pointer;

    text-decoration: none;
    color: inherit;
    display: block;

}

.contacto-metodo:hover {

    transform: translateY(-6px);

    box-shadow: 0 25px 60px rgba(0, 0, 0, .10);

}

.contacto-metodo h3 {
    font-weight: 600;
    letter-spacing: .4px;
}

.contacto-metodo p {
    margin: 0;
    font-size: 1rem;
    font-weight: 300;
}

.contacto-metodo a {
    color: #0f0f0f;
    text-decoration: none;
}

.contacto-metodo a:hover {
    opacity: 0.6;
}

.contacto-form {

    max-width: 720px;
    margin: 4rem auto 0;

    padding: 3rem;

    background: var(--blanco);

    border-radius: 20px;

    box-shadow: var(--sombra-soft);

}


.form-group {
    margin-bottom: 1.5rem;

}

.form-group label {

    font-size: .8rem;
    letter-spacing: .5px;
    color: #444;
    font-weight: 500;

}

.form-group input,
.form-group textarea {

    width: 100%;
    padding: 1.15rem;

    border-radius: 14px;
    border: 1px solid var(--gris-borde);

    background: var(--blanco);

    font-size: .95rem;

    transition: .25s ease;
}


.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #666666;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {

    width: 100%;
    padding: 1.3rem;

    background: #111;
    color: #fff;

    border-radius: 16px;
    border: none;

    font-weight: 600;
    letter-spacing: .6px;

    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);

    transition: .25s;
}


/* ========================================
           EFECTO PRO
        ======================================== */
.btn-submit:hover {

    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .18);

}


/* ========================================
           EFECTO CLICK
        ======================================== */
.btn-submit:active {
    transform: translateY(-1px);
}

/* ========================================
           FOOTER
        ======================================== */
footer {
    background-color: var(--negro);
    border-top: 1px solid #1f1f1f;
    color: white;
    text-align: center;
    padding: 2rem;
}

footer p {
    color: #ffffff;
    font-weight: 300;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* ========================================
           BOTÓN WHATSAPP FLOTANTE
        ======================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: var(--blanco);
    color: #000000;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000000;
}

.whatsapp-float:hover {
    background-color: var(--negro);
    transform: scale(1.1);
}

.whatsapp-float:hover svg {
    fill: #ffffff;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #000000;
    transition: fill 0.3s ease;
}

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

/* Tablets */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .logo-section {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    #inicio .logo-hero {
        width: 350px;
    }

    #inicio h1 {
        font-size: 2rem;
        white-space: normal;
    }

    #inicio p {
        font-size: 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .etapas-timeline {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .etapa-timeline-item:not(:last-child)::after {
        display: none;
    }

    .etapa-timeline-item {
        margin-bottom: 3rem;
    }

    .personalizacion-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .personalizacion-lista {
        grid-template-columns: 1fr;
    }

    .caracteristicas-grid,
    .portfolio-grid,
    .contacto-info {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header-container {
        padding: 1rem;
        align-items: center;
    }

    .logo-img {
        height: 40px;
    }

    .quienes-somos-img {
        height: 28px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        align-items: center;
    }

    nav a {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .instagram-link svg {
        width: 18px;
        height: 18px;
    }

    #inicio {
        padding: 5rem 1rem;
        min-height: 70vh;
    }

    #inicio .logo-hero {
        width: 450px;

    }

    #inicio h1 {
        font-size: 1.6rem;
        white-space: normal;
    }

    #inicio p {
        font-size: 0.95rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .quienes-somos-titulo {
        height: 50px !important;
    }

    section {
        padding: 3rem 1rem;
    }
}