/* ===============================
   1. VARIABLES Y BASE BLINDADA
   =============================== */
:root {
    --bg: #0f0f10;
    --text: #eaeaea;
    --muted-text: #a0a0a5;
    --accent: #ffffff;
    --nav-bg: rgba(15, 15, 16, 0.9);
    --nav-height: 72px;
    --muted-bg: #161618;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    /* Bloqueo estricto de scroll lateral */
    overflow-x: hidden; 
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* Grilla técnica: Cambiada a absoluta para evitar que sume ancho */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    /* Opacidad aumentada de 0.015 a 0.04 para mayor presencia */
    background-image:
        linear-gradient(rgba(255,255,255,0.019) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.019) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
    transform: translateY(var(--grid-shift, 0));
}

/* ===============================
   2. NAVEGACIÓN
   =============================== */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    height: var(--nav-height);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-desktop a {
    margin-left: 32px;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted-text);
    transition: color 0.3s ease;
}

.nav-desktop a.active { color: var(--accent); }

/* ===============================
   3. LAYOUT (El fix del ancho)
   =============================== */
main {
    padding-top: var(--nav-height);
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px; /* Espacio de seguridad lateral */
}

.section {
    padding: 120px 0;
    width: 100%;
    position: relative;
    /* Evita que cualquier elemento interno desborde la sección */
    overflow: hidden; 
}

/* FIX DEFINITIVO PARA SECCIONES CON FONDO OSCURO */
.section.subtle {
    background: var(--muted-bg);
    /* Eliminamos los márgenes negativos de 100vw que causaban el desborde */
}

.section.subtle::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.03),
        transparent 30%
    );
    pointer-events: none;
}


/* ===============================
   4. TIPOGRAFÍA
   =============================== */
h1, h2 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    margin: 0;
}

h1 { font-size: clamp(34px, 7vw, 72px); line-height: 1.1; }
h2 { font-size: clamp(26px, 4vw, 42px); line-height: 1.2; margin-bottom: 24px; }

p {
    font-size: clamp(16px, 1.2vw, 18px);
    color: var(--muted-text);
    max-width: 55ch;
    margin-bottom: 24px;
}

.hero-eyebrow, .section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted-text);
    margin-bottom: 24px;
}

/* ===============================
   5. HERO
   =============================== */
.hero {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-footer {
    position: absolute;
    bottom: 40px;
    left: 24px;
}

/* ===============================
   6. ANIMACIONES
   =============================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===============================
   7. MOBILE FIXES (RESTRICCIÓN TOTAL)
   ============================== */
@media (max-width: 768px) {
    :root { --nav-height: 64px; }

    .section {
        padding: 100px 0;
    }

    .section-eyebrow {
        margin-bottom: 16px;
    }

    p {
        margin-bottom: 20px;
    }

    .container {
        padding: 0 30px; /* Un poco más de margen en móvil */
    }

    .nav-desktop { display: none; }

    .hero {
        justify-content: flex-start;
        padding-top: 60px;
    }

    /* Forzamos que los textos largos no rompan el layout */
    h1, h2, p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Forzamos que cada sección ocupe el alto total menos la nav */
  
    .section.is-scene {
        min-height: calc(100vh - var(--nav-height));
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 60px 0;
    }

    .section.is-scene .container {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    
    /* El separador horizontal ahora debe estar al final de la sección 
       para marcar el límite entre secciones de pantalla completa */
    .section::before {
        top: auto;
        bottom: 0;
    }
}





/* ===============================
   MOBILE MENU (EDITORIAL)
   =============================== */

#menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    width: 32px;
    height: 20px;
    position: relative;
}

#menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text);
    transition: transform .3s ease, opacity .3s ease;
}

#menu-toggle span:nth-child(1) { top: 0; }
#menu-toggle span:nth-child(2) { bottom: 0; }

/* Estado activo (X) */
#menu-toggle.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
#menu-toggle.is-active span:nth-child(2) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ===============================
   MOBILE MENU PANEL
   =============================== */

.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(15,15,16,0.96);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
    z-index: 999;
}

.mobile-menu a {
    font-family: 'Libre Baskerville', serif;
    font-size: 26px;
    color: var(--text);
    text-decoration: none;
}

/* Estado visible */
body.menu-open .mobile-menu {
    opacity: 1;
    pointer-events: auto;
}

/* Mostrar botón solo en mobile */
@media (max-width: 768px) {
    #menu-toggle { display: block; }
}

@media (max-width: 768px) {

    .hero {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 120px;
    }

    h1 {
        font-size: clamp(32px, 9vw, 44px);
    }

    .hero-description {
        font-size: 16px;
        max-width: 32ch;
    }

    .hero-footer {
        left: 30px;
        bottom: 24px;
    }
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.05), transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(255,255,255,0.03), transparent 40%);
    z-index: -1;
    animation: slowFloat 20s linear infinite;
}

@keyframes slowFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* ===============================
   MOBILE FULL-HEIGHT SECTIONS
   =============================== */
@media (max-width: 768px) {
    .is-scene {
        min-height: calc(100vh - var(--nav-height));
        display: flex;
        align-items: center;
    }
}

    .section > .container {
        width: 100%;
    }


@media (max-width: 768px) {

    .section-balanced {
        align-items: center;
    }

    .section-balanced .container {
        padding-top: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {

    .section::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: linear-gradient(
            to bottom,
            transparent,
            rgba(0,0,0,0.35)
        );
        pointer-events: none;
    }
}

/* ===============================
   DESKTOP SECTION FOCUS
   =============================== */
@media (min-width: 769px) {

     .section {
        padding-top: 50px;     /* ⬅ mucho más razonable */
        padding-bottom: 180px;
    }

    .section.subtle {
        padding-bottom: 260px;
    }
}

@media (min-width: 769px) {
    .section::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 80px;
        background: linear-gradient(
            to bottom,
            rgba(15,15,16,0.6),
            transparent
        );
        pointer-events: none;
    }
}

@media (max-width: 768px) {
    .section-with-bg {
        position: relative;
    }

    .section-with-bg::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('/images/enfoque-bg.jpg');
        background-size: cover;
        background-position: center;
        opacity: 0.12; /* CLAVE */
        filter: grayscale(100%) contrast(110%);
        pointer-events: none;
        z-index: 0;
    }

    .section-with-bg::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            to bottom,
            rgba(15,15,16,0.85),
            rgba(15,15,16,0.95)
        );
        z-index: 0;
    }

    .section-with-bg .container {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 768px) {
    #enfoque::after {
        content: "";
        position: absolute;
        left: 30px;
        top: 120px;
        bottom: 120px;
        width: 1px;
        background: linear-gradient(
            to bottom,
            transparent,
            rgba(255,255,255,0.25),
            transparent
        );
        animation: linePulse 6s ease-in-out infinite;
        pointer-events: none;
    }
}

@keyframes linePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@media (max-width: 768px) {

    #enfoque {
        position: relative;
        overflow: hidden;
    }

    #enfoque::before {
        content: "";
        position: absolute;
        inset: -20%;
        background:
            radial-gradient(
                circle at 30% 20%,
                rgba(255,255,255,0.06),
                transparent 40%
            ),
            radial-gradient(
                circle at 70% 80%,
                rgba(255,255,255,0.04),
                transparent 45%
            );
        transform: translateY(var(--bg-shift, 0px));
        transition: transform 0.1s linear;
        pointer-events: none;
        z-index: 0;
    }

    #enfoque::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            to bottom,
            rgba(15,15,16,0.9),
            rgba(15,15,16,0.95)
        );
        z-index: 0;
        pointer-events: none;
    }

    #enfoque .container {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 768px) {
    #enfoque .section-eyebrow::before {
        content: "";
        display: inline-block;
        width: 24px;
        height: 1px;
        background: rgba(255,255,255,0.4);
        margin-right: 12px;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.6s ease;
    }

    #enfoque .section-eyebrow.visible::before {
        transform: scaleX(1);
    }
}

/* ===============================
   BASE: secciones NO reactivas
   =============================== */

.section::before,
.section::after {
    content: none;
}

@media (max-width: 768px) {

    .is-scene {
        position: relative;
        overflow: hidden;
    }

    .is-scene::before {
        content: "";
        position: absolute;
        inset: -20%;
        background:
            radial-gradient(
                circle at 30% 20%,
                rgba(255,255,255,0.06),
                transparent 40%
            ),
            radial-gradient(
                circle at 70% 80%,
                rgba(255,255,255,0.04),
                transparent 45%
            );
        transform: translateY(var(--bg-shift, 0px));
        transition: transform 0.1s linear;
        pointer-events: none;
        z-index: 0;
    }

    .is-scene::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            to bottom,
            rgba(15,15,16,0.9),
            rgba(15,15,16,0.95)
        );
        pointer-events: none;
        z-index: 0;
    }

    .is-scene .container {
        position: relative;
        z-index: 1;
    }
}


/* ===============================
   MICRO-SEPARADOR VISUAL
   =============================== */
.section {
    position: relative; /* Asegura que el separador se posicione respecto a la sección */
}

.section::before {
        content: "";
        position: absolute;
        bottom: 0; /* Lo movemos abajo */
        top: auto;
        left: 15%;
        right: 15%;
        height: 1px;
        background: linear-gradient(
            90deg, 
            transparent, 
            rgba(255, 255, 255, 0.05), 
            transparent
        );
        transform: scaleX(0);
        transition: transform 1.2s ease;
    }
    
    .section.visible::before {
        transform: scaleX(1);
    }

/* El Hero no necesita separador superior */
#inicio::before {
    display: none;
}

/* Ajuste: eliminar cualquier 'content: none' previo que bloquee los pseudo-elementos */
.section::before, .section::after {
    display: block !important;
}

/* Layout para la sección Enfoque */
.enfoque-layout {
    display: flex;
    flex-direction: column; /* Móvil: Imagen arriba, texto abajo */
    gap: 3rem;
    align-items: center;
}

.enfoque-image-wrapper {
    width: 100%;
    max-width: 600px; /* Evita que la imagen sea gigante en tablets */
}

.enfoque-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 4px; /* Un borde sutil como en el diseño */
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); /* Sombra suave para dar relieve */
    display: block;
}

.enfoque-content {
    width: 100%;
}

/* Diseño para Desktop (Pantallas grandes) */
@media (min-width: 992px) {
    .enfoque-layout {
        flex-direction: row; /* Desktop: Imagen lado a lado con el texto */
        gap: 6rem;
        align-items: flex-start;
    }

    .enfoque-image-wrapper {
        flex: 1.2; /* La imagen toma un poco más de espacio */
    }

    .enfoque-content {
        flex: 1;
        padding-top: 2rem;
    }
}

/* ===============================
   Split editorial (texto + imagen)
   =============================== */

.split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    align-items: center;
}

.split-media img {
    width: 100%;
    height: auto;
    border-radius: 2px;
    filter: grayscale(100%);
    opacity: 0.85;
    transition: filter 0.6s ease, opacity 0.6s ease;
}

.split-media img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Mobile */
@media (max-width: 768px) {
    .split {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .split-media {
        order: -1; /* imagen arriba en mobile */
    }
}

/* ===============================
   Split layout (texto + media)
   =============================== */

.has-media .split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(48px, 6vw, 96px);
    align-items: center;
}

.split-text {
    max-width: 520px;
}

.split-text p {
    line-height: 1.7;
}

.split-text p + p {
    margin-top: 18px;
}

/* ===============================
   Imagen editorial
   =============================== */

.split-media {
    position: relative;
}

.split-media img {
    width: 100%;
    height: auto;
    display: block;

    filter: grayscale(100%) contrast(1.05);
    opacity: 0.92;

    border-radius: 2px;
    box-shadow:
        0 30px 60px rgba(0,0,0,0.35);
}

/* ===============================
   Media caption (editorial)
   =============================== */

.media-caption {
    display: block;
    margin-top: 14px;

    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    opacity: 0.4;
}

/* ===============================
   Responsive split
   =============================== */

@media (max-width: 768px) {

    .has-media .split {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .split-media {
        order: -1; /* imagen arriba en mobile */
    }

    .split-media img {
        max-width: 100%;
    }
}


/* ===============================
   Experience carousel
   =============================== */

.experience-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.carousel-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.carousel-track::-webkit-scrollbar {
    height: 4px;
}

.carousel-track::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
}

body:not(.dark) .carousel-track::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.25);
}

.carousel-item {
    flex: 0 0 85%;
    scroll-snap-align: start;
    position: relative;
}

@media (min-width: 1024px) {
    .carousel-item {
        flex-basis: 70%;
    }
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%) contrast(1.05);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.carousel-item img:hover {
    filter: grayscale(0%);
    transform: scale(1.01);
}

.media-caption {
    display: block;
    margin-top: 12px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.5;
}

/* ===============================
   Experience visual block
   =============================== */

.experience-visual {
    width: 100%;
    margin-bottom: 48px;
}

@media (min-width: 1024px) {
    .experience-visual {
        margin-bottom: 0;
        max-width: 720px;
    }
}

/* ===============================
   Experience split layout
   =============================== */

.experience-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 1024px) {
    .experience-split {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: center;
    }
}

/* ===============================
   Visual container
   =============================== */

.experience-visual {
    width: 100%;
    max-width: 720px;
}

@media (max-width: 1023px) {
    .experience-visual {
        order: -1; /* Imagen arriba en mobile */
    }
}

/* ===============================
   Carousel
   =============================== */

.experience-carousel {
    overflow: hidden;
    border-radius: 4px;
}

.carousel-track {
    display: flex;
    width: max-content;
    animation: carousel-scroll 24s linear infinite;
}

.experience-carousel.auto:hover .carousel-track {
    animation-play-state: paused;
}

.carousel-track img {
    width: 100%;
    max-width: 720px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.05);
    transition: filter 0.6s ease;
}

/* Desktop: imágenes controladas */
@media (min-width: 1024px) {
    .carousel-track img {
        width: 720px;
    }
}

/* ===============================
   Animation
   =============================== */

@keyframes carousel-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ===============================
   Experience – Mobile first
   =============================== */

.experience-carousel {
    position: relative;
    width: 100%;
    max-height: 420px;
    overflow: hidden;
    border-radius: 4px;
}

/* Track */
.carousel-track {
    display: flex;
    height: 100%;
    animation: carousel-scroll 28s linear infinite;
}

/* Images */
.carousel-track img {
    flex: 0 0 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.05);
}

/* ===============================
   Desktop override
   =============================== */

@media (min-width: 1024px) {
    .experience-carousel {
        height: auto;
        max-height: none;
    }

    .carousel-track img {
        width: 720px;
        height: auto;
    }
}

/* ===============================
   Pause on hover (desktop)
   =============================== */

@media (hover: hover) {
    .experience-carousel:hover .carousel-track {
        animation-play-state: paused;
    }
}

/* ===============================
   Animation
   =============================== */

@keyframes carousel-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-66.66%);
    }
}

@media (max-width: 480px) {
    .experience-carousel {
    }
}

/* ===============================
   EXPERIENCE – CAROUSEL DEFINITIVO
   =============================== */

/* Contenedor visual */
.experience-visual {
    width: 100%;
}

/* Ventana del carrusel */
.experience-carousel {
    position: relative;
    width: 100%;
    height: 48vh;
    max-height: 420px;
    overflow: hidden;
    border-radius: 4px;
}

/* Pista */
.experience-carousel .carousel-track {
    display: flex;
    height: 100%;
    width: max-content; /* Deja que el ancho se adapte a todas las fotos */
    animation: experience-scroll 45s linear infinite; /* Más segundos = más lento */
}

/* Imágenes */
.experience-carousel img {
    height: 100%;
    width: auto; /* Permite que el ancho sea proporcional a los 754px de alto */
    object-fit: cover;
    flex: 0 0 auto;
    filter: grayscale(100%) contrast(1.05);
}

/* ===============================
   EXPERIENCE – DESKTOP SIN RECORTE
   =============================== */

@media (min-width: 1024px) {

    .experience-carousel {
        height: auto;          /* ⬅ clave */
        max-height: none;
    }

    .experience-carousel .carousel-track {
        align-items: center;   /* centra verticalmente las imágenes */
    }

    .experience-carousel img {
        height: 420px;          /* Altura editorial fija */
        width: 720px;           /* Marco constante */
        object-fit: contain;    /* NO recorta */
        background: transparent;
        display: block;
    }
}


/* Pausa al hover */
@media (hover: hover) {
    .experience-carousel:hover .carousel-track {
        animation-play-state: paused;
    }
}

/* Animación */
@keyframes experience-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-66.666%); }
}


@media (max-width: 768px) {
    /* NO forzar altura completa en experiencia */
    #experiencia.section {
        min-height: auto;
        justify-content: flex-start;
    }

    #experiencia .container {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .experience-carousel {

    }
}

/* ===============================
   EXPERIENCE – AJUSTE FINO MOBILE
   =============================== */

@media (max-width: 768px) {

    /* Reducimos el espacio entre carrusel y texto */
    #experiencia .split {
        gap: 20px; /* antes 32px */
    }

    /* Ajuste fino del título */
    #experiencia h2 {
        margin-top: 8px;
    }

    /* Compensamos el reveal (evita sensación de "caído") */
    #experiencia .reveal {
        transform: translateY(12px);
    }
}


/* ===============================
   SCROLL ANCHOR REAL (FIX DEFINITIVO)
   =============================== */

.scroll-anchor {
    position: absolute;
    top: 0;
    height: 0;
    pointer-events: none;
}


/* ===============================
   SCROLL ANCHOR DEFINITIVO
   =============================== */

.scroll-anchor {
    position: absolute;
    top: 0;
    height: 0;
    pointer-events: none;
}

/* ===============================
   GLOBAL SCROLL OFFSET (FIX REAL)
   =============================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 24px);
}


/* ===============================
   BRAND – HEADER
   =============================== */

.brand {
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 30px;            /* CLAVE: no más */
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.brand-logo:hover {
    opacity: 1;
}

/* Mobile: aún más sutil */
@media (max-width: 768px) {
    .brand-logo {
        height: 26px;
    }
}

/* ===============================
   SIGNATURE – FOOTER
   =============================== */

.footer-signature {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.signature-logo {
    height: 48px;        /* MÁS PRESENTE */
    width: auto;
    opacity: 0.6;
    filter: grayscale(100%);
}

/* Mobile */
@media (max-width: 768px) {
    .footer-signature {
        margin-top: 64px;
    }

    .signature-logo {
        height: 42px;
    }
}

/* ===============================
   SVG FIRMA – DARK MODE TUNING
   =============================== */

.brand-logo,
.signature-logo {
    filter: 
        brightness(1.15)
        contrast(1.05);
}


/* ===============================
   FIRMA – LUZ SUTIL (HEADER)
   =============================== */

.brand {
    position: relative;
    overflow: hidden;
}

.brand::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -120%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.18),
        transparent
    );
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
}

/* Animación al cargar */
.brand.animate-once::after {
    animation: light-sweep 1.6s ease-out forwards;
}

/* Hover: repetir */
.brand:hover::after {
    animation: light-sweep 1.6s ease-out;
}

/* Keyframes */
@keyframes light-sweep {
    0% {
        left: -120%;
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    85% {
        opacity: 0.4;
    }
    100% {
        left: 160%;
        opacity: 0;
    }
}


/* ===============================
   CONTACT FORM – EDITORIAL
   =============================== */

.contact-form {
    max-width: 520px;
    margin-top: 48px;
}

.form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 28px;
}

.form-field label {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted-text);
    margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding: 8px 0;
    font-size: 16px;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,0.45);
}

/* Submit */
.form-submit {
    margin-top: 12px;
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text);
    cursor: pointer;
    position: relative;
}

.form-submit::after {
    content: "";
    display: block;
    margin-top: 6px;
    width: 24px;
    height: 1px;
    background: rgba(255,255,255,0.4);
    transition: width 0.4s ease;
}

.form-submit:hover::after {
    width: 48px;
}


/* ===============================
   CONTACTO – SECCIÓN AISLADA FINAL
   =============================== */

.contact-section {
    position: relative;
    width: 100%;
    display: block;
    min-height: auto;
    padding-top: 96px;
    padding-bottom: 80px;
}

/* Desktop */
@media (min-width: 769px) {
    .contact-section {
        padding-top: 1px;
        padding-bottom: 80px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .contact-section {
        padding-top: 0px;
        padding-bottom: 64px;
    }
}

/* Layout interno NORMAL */
.contact-section .container {
    display: block;
}

.contact-section .contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .contact-section .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.contact-section .reveal {
    transform: none;
}

/* 1. Corrección de Scroll para Contacto: 
   Usamos un margen negativo y padding positivo para que el "id" 
   esté físicamente más arriba de lo que se ve */
#contacto {
    scroll-margin-top: 0px; /* Anula el padding global solo aquí si es necesario */
}

/* 2. Alineación de Redes a la izquierda */
.contact-social {
    margin-top: 48px;
    display: flex;
    justify-content: flex-start; /* Alinea a la izquierda en escritorio */
    gap: 12px;
    width: 100%;
}

/* 3. Alineación de Firma a la izquierda */
.footer-signature {
    margin-top: 64px;
    justify-content: flex-start; /* Alinea firma a la izquierda */
}

/* Ajustes específicos para Mobile */
@media (max-width: 768px) {
    .contact-social {
        justify-content: flex-start; /* Asegura izquierda en mobile */
        padding-left: 0;
    }
    
    .footer-signature {
        margin-top: 48px;
        justify-content: flex-start;
    }

    /* Forzamos que la sección tenga suficiente aire abajo para que 
       el navegador permita scrollear hasta el final */
    .contact-section {
        padding-bottom: 120px; 
    }
}

.form-whatsapp .whatsapp-group {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
}

.form-whatsapp input {
    text-align: left;
}


/* ===============================
   REDES SOCIALES (ESTILO EDITORIAL)
   =============================== */
.contact-social {
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-social a {
    color: var(--text); /* Texto blanco/claro */
    text-decoration: none;
    font-size: 13px;
    font-weight: 700; /* Bold */
    letter-spacing: 0.05em;
    position: relative;
    transition: opacity 0.3s ease;
}

.contact-social .sep {
    color: var(--muted-text);
    opacity: 0.5;
}

/* Efecto Hover: Subrayado minimalista que crece del centro */
.contact-social a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.contact-social a:hover::after {
    width: 100%;
}

/* Animación diferente para Redes: Entrada lateral sutil */
.contact-social.reveal {
    opacity: 0;
    transform: translateX(-20px); /* Viene desde la izquierda */
    transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.contact-social.reveal.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===============================
   FIRMA Y CIERRE DE SCROLL
   =============================== */
.contact-section {
    /* Agregamos padding extra al final para asegurar que la firma entre en el viewport */
    padding-bottom: 120px !important;
}

.footer-signature {
    margin-top: 100px;
    width: 100%;
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center;
}

.signature-logo {
    height: 50px;
    width: auto;
    opacity: 0.7;
    /* Evita que la firma se vea azul si tuviera un link */
    filter: brightness(0) invert(1); 
}

/* Ajuste Mobile */
@media (max-width: 768px) {
    .contact-section {
        padding-bottom: 80px !important;
    }
    
    .footer-signature {
        margin-top: 80px;
    }

    .contact-social {
        margin-top: 32px;
        justify-content: flex-start;
    }
    
    .contact-form {
    margin-top: 10px;
    }
}

/* ===============================
   AJUSTE DE ICONOS REDES
   =============================== */
.contact-social a svg {
    width: 20px;
    height: 20px;
    display: block;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* El efecto hover ahora es un sutil brillo o escala, 
   ya que el subrayado no aplica bien a iconos */
.contact-social a:hover svg {
    transform: translateY(-2px);
    color: var(--accent);
}

/* Eliminamos el efecto after anterior para los iconos */
.contact-social a::after {
    display: none !important;
}

/* ===============================
   MOBILE: LÍNEA DIVISORIA FORMULARIO
   =============================== */
@media (max-width: 768px) {
    .contact-form {
        margin-top: 0px; /* Espacio para la línea */
        padding-top: 00px;
        position: relative;
    }

    /* Línea delicada */
    .contact-form::before {
        content: "";
        position: absolute;
        top: -30px;
        left: 0;
        width: 100%;
        height: 1px;
        background: linear-gradient(
            90deg, 
            rgba(255, 255, 255, 0.1), 
            rgba(255, 255, 255, 0.02)
        );
    }
}

/* Limpieza de estilos previos de redes para asegurar el Bold/Blanco */
.contact-social a {
    color: #ffffff !important;
    opacity: 0.8;
}

.contact-social a:hover {
    opacity: 1;
}

/* Asegura que el contenedor de la izquierda no rompa la grilla */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Grilla de escritorio */
.contact-section .contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: clamp(40px, 8vw, 100px); /* Espacio flexible entre columnas */
    align-items: flex-start;
}

@media (max-width: 768px) {
    .contact-section .contact-layout {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
        gap: 48px;
    }
    
    /* En móvil, las redes deben estar pegadas al texto antes del formulario */
    .contact-social {
        margin-top: 32px;
        margin-bottom: 10px;
    }
}

/* Estilo de los iconos (Asegurar blanco y tamaño) */
.contact-social a svg {
    width: 22px;
    height: 22px;
    color: #ffffff;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.contact-social a:hover svg {
    opacity: 1;
    transform: translateY(-3px);
}


/* ===============================
   EXPERIENCE – MOBILE FIX REAL
   =============================== */

@media (max-width: 768px) {

    /* Carrusel sin altura forzada */
    .experience-carousel {
        height: auto;
        max-height: none;
    }

    /* Track se adapta al contenido */
    .experience-carousel .carousel-track {
        height: auto;
        align-items: center;
    }

    /* Imágenes COMPLETAS, sin recorte */
    .experience-carousel img {
        height: auto;
        max-width: 100%;
        object-fit: contain; /* ⬅ CLAVE */
        margin: 0 auto;
    }
}

/* ===============================
   EXPERIENCE – TEXTO MOBILE FIX
   =============================== */

@media (max-width: 768px) {

    /* El texto debe usar todo el ancho */
    #experiencia .split-text {
        max-width: 100%;
        margin-top: 0; /* ⬅ quitamos el empuje negativo */
    }

    #experiencia p {
        max-width: 100%;
    }

    /* Más aire entre imagen y texto */
    #experiencia .split {
        gap: 32px;
    }
}

/* =================================================
   EXPERIENCE – MOBILE RESET DEFINITIVO
   ================================================= */

@media (max-width: 768px) {

    /* 1. RESET TOTAL del carrusel */
    .experience-carousel {
        height: auto !important;
        max-height: none !important;
        overflow: hidden;
    }

    .experience-carousel .carousel-track {
        height: auto !important;
        animation-duration: 60s; /* más lento */
        align-items: center;
    }

    /* 2. Imágenes MOBILE: tamaño CONTROLADO */
    .experience-carousel img {
        width: 100%;
            height: auto;
        max-height: 260px;    /* ⬅ CLAVE */
        object-fit: contain; /* nunca recorta */
        margin: 0 auto;
        display: block;
    }

    /* 3. Layout: una sola columna limpia */
    #experiencia .split {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* 4. Texto: usar TODO el ancho disponible */
    #experiencia .split-text {
        max-width: 100% !important;
        margin: 0;
    }

    #experiencia p,
    #experiencia h2 {
        max-width: 100%;
    }

    /* 5. Contenedor más sano */
    #experiencia .container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

.toast-success {
    position: fixed;
    top: calc(var(--nav-height) + 16px);
    right: 24px;
    z-index: 2000;

    background: rgba(20, 20, 22, 0.95);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);

    padding: 14px 20px;
    border-radius: 6px;

    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text);

    opacity: 0;
    transform: translateY(-10px);
    animation: toastIn 0.5s ease forwards,
               toastOut 0.5s ease forwards 4s;
}

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

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .toast-success {
        left: 16px;
        right: 16px;
        text-align: center;
    }
}

/* ===============================
   SUBMIT – ESTADO ENVIANDO
   =============================== */

.form-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Línea animada */
.form-submit::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 1px;
    width: 24px;
    background: rgba(255,255,255,0.4);
    transition: width 0.4s ease;
}

/* Estado hover normal */
.form-submit:hover::after {
    width: 48px;
}

/* Estado enviando */
.form-submit.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Texto cambia sutilmente */
.form-submit.is-loading .submit-label {
    letter-spacing: 0.28em;
}

/* Línea “respirando” */
.form-submit.is-loading::after {
    width: 100%;
    animation: submitPulse 1.2s ease-in-out infinite;
}

@keyframes submitPulse {
    0%   { opacity: 0.3; }
    50%  { opacity: 0.9; }
    100% { opacity: 0.3; }
}


.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


