/* 
    PIGMENTO WEB - Design System
    Estilo: Editorial Minimalista / Glassmorphism Cálido
*/

:root {
    --bg-primary: #F9F7F2;
    --text-primary: #111111;
    --accent: #84015a;
    --accent-soft: rgba(132, 1, 90, 0.1);
    --watermark: #F0EEE9;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-shadow: 0 8px 32px 0 rgba(17, 17, 17, 0.05);
    --btn-bg: #ac0176;
    --btn-bg-rgb: 172, 1, 118;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 400; /* Regular (400) para excelente legibilidad sobre fondo claro */
    line-height: 1.65;
    overflow-x: hidden;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 300; /* Light (300) para títulos principales muy elegantes */
    margin-bottom: 3rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: -0.03em; /* Tracking sutilmente ajustado hacia adentro */
}

/* Tipografía y Acentos */
h1,
h2 {
    font-weight: 300; /* Light (300) para títulos H1 y H2 */
    line-height: 1.15;
    letter-spacing: -0.03em; /* Tracking hacia adentro para elegancia editorial */
}

h3,
h4 {
    font-weight: 500; /* Medium (500) para subtítulos y jerarquía intermedia */
    line-height: 1.25;
}

.accent-text {
    color: var(--accent);
    font-weight: 700; /* Bold (700) para énfasis y textos destacados */
}

/* Botones */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500; /* Peso Medium (500) para botones */
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-solid {
    background-color: var(--btn-bg);
    color: white;
}

.btn-solid:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(172, 1, 118, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--btn-bg);
    color: var(--btn-bg);
}

.btn-outline:hover {
    background-color: var(--btn-bg);
    color: white;
}

.btn-primary {
    background-color: var(--btn-bg);
    color: white;
    padding: 0.8rem 1.5rem;
}

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 72px;
    z-index: 1000;
    background-color: var(--bg-primary);
    background: rgba(249, 247, 242, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(17, 17, 17, 0.06);
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
    will-change: transform;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-height: 72px;
    margin: 0;
    padding: 0.8rem 5%;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.brand-logo {
    height: 30px;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

nav {
    display: flex;
    align-items: center;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 2.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

nav a:hover {
    color: var(--accent);
}

.cta-nav {
    background: var(--btn-bg);
    color: white !important;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s ease;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

.cta-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(172, 1, 118, 0.3);
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    color: var(--text-primary);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
    padding-top: 5.5rem;
    box-sizing: border-box;
}

/* Capas de Color Sutiles */
.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 80% 20%, rgba(222, 7, 93, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(47, 47, 47, 0.04) 0%, transparent 50%);
    z-index: 0;
}

/* Textura de Grano Analógico */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    /* Casi imperceptible */
    z-index: 1;
    filter: url(#grainy-noise);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1100px;
    padding: 0 20px;
}

/* Tagline Superior */
.hero-tagline {
    font-size: 0.9rem;
    font-weight: 500; /* Peso Medium (500) para subtítulos y categorías */
    color: var(--text-primary);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    opacity: 0.6;
}

/* H1: Jerarquía de la Frase Eje */
.hero h1 {
    font-size: clamp(2.5rem, 5.5vw, 4.8rem);
    color: var(--text-primary);
    line-height: 1.05;
    font-weight: 300; /* Peso Light (300) para H1 principal, ultra-elegante */
    margin-bottom: 2rem;
    letter-spacing: -0.03em; /* Tracking sutilmente ajustado hacia adentro */
    /* Kerning Editorial */
}

/* Resalte en la frase clave */
/* El JS se encargará de aplicar el resaltado mediante la clase .highlight */

/* Descripción de apoyo */
.hero-description {
    font-size: 1.25rem;
    color: var(--text-primary);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    opacity: 0.8;
}

/* Botones de Acción */
.hero-ctas {
    display: flex;
    gap: 20px;
    justify-content: center;
}


/* Scroll Cue Hero (Moderno, Circular, Flotante) */
.hero-scroll-cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 2.8rem;
    text-decoration: none;
    cursor: pointer;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.hero-scroll-cue .scroll-cue-circle {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(172, 1, 118, 0.22);
    box-shadow: 0 8px 24px rgba(172, 1, 118, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--btn-bg);
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: floatScrollCue 3.2s ease-in-out infinite;
}

/* Anillo de pulso sutil */
.hero-scroll-cue .scroll-cue-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid rgba(172, 1, 118, 0.3);
    opacity: 0;
    animation: pulseScrollRing 3.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

/* Icono animado hacia abajo */
.hero-scroll-cue .scroll-cue-icon {
    width: 20px;
    height: 20px;
    color: var(--btn-bg);
    transition: transform 0.3s ease, color 0.3s ease;
    animation: bounceChevron 3.2s ease-in-out infinite;
}

/* Hover & Focus */
.hero-scroll-cue:hover .scroll-cue-circle,
.hero-scroll-cue:focus-visible .scroll-cue-circle {
    background: #ffffff;
    border-color: var(--btn-bg);
    color: var(--btn-bg);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 30px rgba(172, 1, 118, 0.25), 0 0 20px rgba(222, 7, 93, 0.18);
}

.hero-scroll-cue:hover .scroll-cue-icon {
    color: var(--accent);
    transform: translateY(2px);
}

.hero-scroll-cue:focus-visible {
    outline: 2px solid var(--btn-bg);
    outline-offset: 4px;
    border-radius: 50%;
}

/* Animaciones */
@keyframes floatScrollCue {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

@keyframes bounceChevron {
    0%, 100% {
        transform: translateY(-1px);
    }
    50% {
        transform: translateY(3px);
    }
}

@keyframes pulseScrollRing {
    0% {
        transform: scale(0.95);
        opacity: 0.75;
    }
    50% {
        transform: scale(1.25);
        opacity: 0;
    }
    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

.btn-primary {
    background-color: var(--btn-bg);
    color: #FFFFFF;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 500; /* Peso Medium (500) para botones principales */
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-secondary {
    background-color: transparent;
    color: var(--btn-bg);
    padding: 1.2rem 2.5rem;
    border: 2px solid var(--btn-bg);
    border-radius: 50px;
    font-weight: 500; /* Peso Medium (500) para botones secundarios */
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: rgba(172, 1, 118, 0.06);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(172, 1, 118, 0.15);
}

/* Ticker Infinito al pie */
.ticker-wrapper {
    position: absolute;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    background: #fa1188;
    padding: 20px 0;
}

.ticker {
    display: flex;
    width: max-content;
    white-space: nowrap;
    will-change: transform;
    animation: scrollTicker 30s linear infinite;
}

.ticker span {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    margin-right: 50px;
}

@keyframes scrollTicker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Manifiesto - Scroll Scrub Split */
.manifiesto-section {
    position: relative;
    background: transparent;
    color: var(--text-primary);
    padding: 0;
}

.scroll-scrub-section {
    height: 400vh;
}

.scroll-scrub-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: #fbb23f;
}

.scroll-scrub-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    z-index: 20;
    will-change: width;
}

.scroll-scrub-split {
    display: flex;
    height: 100%;
}

.scroll-scrub-text-side {
    flex: 0 0 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3rem 4rem 5%;
    background: transparent;
}

.scroll-scrub-text-side h2 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.15;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.scroll-scrub-text-side .manifiesto-text {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(17, 17, 17, 0.8);
}

.scroll-scrub-text-side .accent-text {
    color: var(--accent);
    font-weight: 700;
    border-bottom: 1px solid rgba(132, 1, 90, 0.2);
    padding-bottom: 2px;
}


.manifiesto-icons {
    margin-top: 1.5rem;
    width: 100%;
}

.manifiesto-icons .icons-svg {
    width: 100%;
    max-width: 280px;
    height: auto;
    display: block;
    filter: brightness(0);
    opacity: 0.8;
}

.scroll-scrub-text-side .text-reveal-wrapper h2 {
    transition: none;
}

.scroll-scrub-visual-side {
    flex: 0 0 58%;
    position: relative;
    background: transparent;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.scroll-scrub-video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    align-self: flex-end;
}

.scroll-scrub-canvas {
    width: 100%;
    height: 100%;
    display: block;
    transform: translateY(3px);
}

.scroll-scrub-instruction {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounceInstruction 2s ease-in-out infinite;
}

@keyframes bounceInstruction {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

/* --- CONSTRUIR IDENTIDAD (Sticky Scroll Croma Avanzado) --- */
.identidad-scroll-wrapper {
    height: 150vh;
    position: relative;
    z-index: 10;
}

.identidad-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(7.5rem - 70px);
    overflow: visible;
    background-color: var(--bg-primary);
}

.identidad-bg-marquee {
    position: absolute;
    top: 44%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.identidad-bg-text {
    display: flex;
    gap: 6rem;
    white-space: nowrap;
    animation: scrollIdentidad 25s linear infinite;
    width: max-content;
}

.identidad-bg-text span {
    font-size: 18vw;
    font-weight: 900;
    color: var(--text-primary);
    opacity: 0.05;
    -webkit-text-stroke: none; /* Eliminamos contorno */
    letter-spacing: -2px;
}

@keyframes scrollIdentidad {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.relative-z {
    position: relative;
    z-index: 1;
}

.anim-card {
    opacity: 0;
    transform: translateY(40px);
    will-change: transform, opacity;
}

/* ── Contenedor principal: columna centrada (título → stage → cards) ── */
.identidad-stage-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0;
}

.identidad-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.03em;
    text-transform: none;
}

/* ── Stage: área donde viven los camaleones ── */
.chameleon-stage {
    position: relative;
    width: 100%;
    height: clamp(240px, 43vh, 430px); /* Incrementado 20% */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
    /* Perspectiva para reforzar sensación de profundidad Z */
    perspective: 1400px;
}

/* Camaleón principal — SIEMPRE centrado, nunca se mueve */
.cham-main {
    position: absolute;
    top: 50%;
    left: 50%;
    height: calc(100% + 80px);
    width: auto;
    max-width: clamp(192px, 21.6vw, 336px);
    object-fit: contain;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

/* Variantes — parten del centro (opacity 0) y vuelan hacia los lados */
.cham-variant {
    position: absolute;
    height: 95%; /* Incrementado sutilmente para mayor impacto visual */
    width: auto;
    max-width: clamp(192px, 21.6vw, 336px); /* Incrementado 20% */
    object-fit: contain;
    opacity: 0;
    transform: translateX(0) scale(1);
    will-change: transform, opacity;
    pointer-events: none;
}

/* Orden de profundidad Z por slot */
.cham-variant[data-dir="left-near"]  { z-index: 0; }
.cham-variant[data-dir="right-near"] { z-index: 0; }
.cham-variant[data-dir="left-far"]   { z-index: 0; }
.cham-variant[data-dir="right-far"]  { z-index: 0; }

/* ── Tarjetas de servicios: fila horizontal 1×4 en desktop ── */
.identidad-cards-row {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.identidad-cards-row .about-item {
    padding: 1.4rem 1.6rem;
    text-align: left;
    border-radius: 16px;
    border: 1px solid transparent;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.45), rgba(255,255,255,0.1)) padding-box,
        linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0.05)) border-box;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.06),
        0 2px 8px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.identidad-cards-row .about-item:hover {
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow:
        0 12px 48px rgba(0,0,0,0.1),
        0 4px 12px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.identidad-cards-row .about-item h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    margin-top: 0.8rem;
}

.identidad-cards-row .about-item p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #5F5F5F;
    margin: 0;
}

/* ── RESPONSIVE: Mobile ≤ 768px ── */
@media (max-width: 768px) {
    .about-section {
        padding: 0;
    }

    .about-section.scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .identidad-scroll-wrapper {
        height: 200vh;
        overflow-x: hidden;
    }

    .identidad-sticky-container {
        position: sticky;
        top: 0;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: visible;
        padding: 40px 0 20px;
        background-color: var(--bg-primary);
        box-sizing: border-box;
        z-index: 20;
    }

    .identidad-title {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
        margin-bottom: 1.5rem;
        text-align: center;
        width: 90%;
        z-index: 3;
    }

    .chameleon-stage {
        position: relative;
        width: 100%;
        height: 220px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0.5rem;
        perspective: 1000px;
        z-index: 2;
    }

    .cham-main, .cham-variant {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate3d(-50%, -50%, 0);
        max-width: 200px;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        margin: 0;
        transform-origin: center center;
        will-change: transform, opacity;
    }

    .identidad-bg-marquee {
        position: absolute;
        top: 40%;
        left: 0;
        width: 100%;
        transform: translateY(-50%);
        overflow: hidden;
        z-index: 0;
        pointer-events: none;
        user-select: none;
    }

    .identidad-bg-text span {
        font-size: 28vw;
        font-weight: 900;
        color: var(--text-primary);
        opacity: 0.04;
        letter-spacing: -2px;
    }

    .identidad-cards-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 16px !important;
        width: 100% !important;
        margin-top: 0 !important;
        padding: 0 11vw !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        scrollbar-width: none !important;
        z-index: 3;
    }

    .identidad-cards-row::-webkit-scrollbar {
        display: none !important;
    }

    .identidad-cards-row .about-item {
        flex: 0 0 78vw !important;
        box-sizing: border-box;
        opacity: 0.5;
        transform: scale(0.94);
        scroll-snap-align: center !important;
        transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
                    transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
        border-radius: 20px;
        border: 1px solid transparent;
        background:
            linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.15)) padding-box,
            linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0.05)) border-box;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow:
            0 8px 24px rgba(0,0,0,0.06),
            inset 0 1px 0 rgba(255,255,255,0.2);
        padding: 1.2rem 1.4rem;
    }

    .identidad-cards-row .about-item.active {
        opacity: 1 !important;
        transform: scale(1.02) !important;
    }
}

/* ¿Qué hacemos? Grid */
@media (min-width: 769px) {
    .about-section.scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .identidad-title {
        margin-top: -10px;
    }

    .identidad-bg-marquee {
        top: calc(44% + 30px);
    }

    .chameleon-stage {
        margin-top: 30px;
    }

    .identidad-cards-row {
        margin-top: -40px;
        align-items: stretch;
        gap: 1.5rem;
    }

    .identidad-cards-row .about-item {
        flex: 1;
    }
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.about-item i {
    color: var(--accent);
    margin-bottom: 1.5rem;
    width: 40px;
    height: 40px;
}

/* Servicios - Slider Horizontal */
.services-section {
    padding: 0;
    background-color: #fa1188;
    overflow: hidden;
}

.services-header {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.services-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fa1188;
}

.services-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 700px;
    padding: 0 2rem;
}

.services-header-content .section-tagline {
    color: rgba(255,255,255,0.7);
}

.services-header-content .section-title {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: none;
}

.services-subtitle {
    font-size: 1.15rem;
    opacity: 0.85;
    line-height: 1.6;
    font-weight: 400;
}

/* Servicios: grilla estática (sin carrusel ni movimiento) */
.services-carousel-wrapper {
    width: 100%;
    padding: 1.5rem 1rem 4rem;
}

.services-carousel {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    width: 100%;
    padding: 0;
}

.service-card {
    height: 340px;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.service-card-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-items: center;
    min-height: 100%;
    transition: min-height 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.service-icon i {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.service-card-content h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.service-card-content p {
    font-size: 0.82rem;
    color: rgba(17, 17, 17, 0.7);
    line-height: 1.45;
    margin-bottom: 1rem;
    flex-grow: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-card:hover .service-card-content p {
    -webkit-line-clamp: 8;
}

.btn-service-detail {
    background: transparent;
    border: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
    width: fit-content;
    position: relative;
    font-family: inherit;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(8px);
}

.service-card:hover .btn-service-detail {
    opacity: 1;
    transform: translateY(0);
}

.btn-service-detail i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.btn-service-detail::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.service-card:hover .btn-service-detail i {
    transform: translate(2px, -2px);
}

.service-card:hover .btn-service-detail::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ── BANNER TRABAJOS: SLIDER DE IMÁGENES ── */
.work-banner-section {
    padding: 0;
    background-color: #ffffff;
    position: relative;
}

.work-banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.3s ease, transform 0.3s ease;
}

.work-banner-arrow:hover {
    background: #fff;
}

.work-banner-arrow i {
    width: 22px;
    height: 22px;
}

.work-banner-prev {
    left: 1rem;
}

.work-banner-next {
    right: 1rem;
}

.work-banner-slider {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.work-banner-slider::-webkit-scrollbar {
    display: none;
}

.work-banner-track {
    display: flex;
}

.work-banner-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    aspect-ratio: 21 / 9;
    background-color: #d9d9d9;
    overflow: hidden;
}

.work-banner-slide picture {
    width: 100%;
    height: 100%;
    display: block;
}

.work-banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .work-banner-section {
        display: flex;
        align-items: center;
        height: 100dvh;
    }

    .work-banner-slide {
        aspect-ratio: 4 / 5;
    }
}

/* --- SECCIÓN DIFERENCIAL --- */
/* ── DIFERENCIAL SECTION (rediseñado mobile-first) ── */
.diferencial-section {
    background-color: var(--bg-primary);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* ── Fondo animado: círculos decorativos ── */
.dif-bg-circles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.dif-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.dif-circle-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(132,1,90,0.08) 0%, transparent 70%);
    top: -120px;
    right: -80px;
    animation: difFloat 8s ease-in-out infinite alternate;
}

.dif-circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(132,1,90,0.05) 0%, transparent 70%);
    bottom: -60px;
    left: -60px;
    animation: difFloat 10s ease-in-out infinite alternate-reverse;
}

.dif-circle-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(132,1,90,0.06) 0%, transparent 70%);
    top: 40%;
    left: 55%;
    animation: difFloat 12s ease-in-out infinite alternate;
}

@keyframes difFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.1); }
}

.diferencial-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ── Título con text reveal y línea animada ── */
.dif-header-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: difHeaderIn 0.8s 0.2s ease forwards;
}

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

.dif-header-reveal .text-reveal-wrapper {
    overflow: hidden;
}

.dif-header-reveal .text-reveal-wrapper .dif-title {
    display: inline-block;
    transform: translateY(100%);
    animation: difTextReveal 1s 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes difTextReveal {
    to { transform: translateY(0); }
}

.dif-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0;
    display: inline-block;
    text-transform: none;
}

.dif-title .accent-text {
    font-weight: 800;
}

.dif-title-line {
    width: 0;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    margin: 1.5rem auto 3rem;
    animation: difLineGrow 1.2s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes difLineGrow {
    to { width: 120px; }
}

/* ── Testimonios grid ── */
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.testimonio-card {
    position: relative;
    overflow: hidden;
    padding: 0;
    border-radius: 20px;
    aspect-ratio: 9 / 16;
    max-height: 500px;
    background: #000;
    cursor: pointer;
}

.testimonio-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.testimonio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.4s ease;
}

.testimonio-card:hover .testimonio-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.testimonio-play-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: transform 0.4s ease, background 0.4s ease;
}

.testimonio-play-btn i {
    width: 32px;
    height: 32px;
}

.testimonio-card:hover .testimonio-play-btn {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.testimonio-card.playing .testimonio-overlay {
    opacity: 0;
    pointer-events: none;
}

/* ── Desktop testimonios ── */
@media (min-width: 769px) {
    .testimonios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .testimonios-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        justify-items: center;
    }

    .testimonio-card {
        max-height: 420px;
        width: auto;
        max-width: 280px;
    }
}

/* ── CLIENTES QUE CONFIARON EN PIGMENTO ── */
.clientes-section {
    position: relative;
    z-index: 2;
    padding: 0 0 100px;
    text-align: center;
}

.clientes-tagline {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.clientes-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 2.5rem;
    text-transform: none;
}

/* Contadores de estadísticas */
.clientes-counters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    margin-top: 3rem;
}

.clientes-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    background: #ac0176;
    border-radius: 1.5rem;
    padding: 2rem 3rem;
}

.counter-number {
    font-size: clamp(3.5rem, 10vw, 6rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.03em;
}

.counter-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    color: #ffffff;
    opacity: 1;
}

/* Fila horizontal en escritorio — carrusel infinito automático */
.clientes-marquee {
    overflow: hidden;
}

.clientes-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2.5rem 3rem;
}

.clientes-logos.is-marquee {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
    width: max-content;
    animation: marqueeScroll 45s linear infinite;
}

.clientes-logos.is-marquee:hover {
    animation-play-state: paused;
}

.clientes-logos.is-marquee .cliente-logo {
    margin-right: 3.5rem;
}

/* Segunda fila: se mueve de izquierda a derecha */
.clientes-marquee--row1 {
    margin-bottom: 2.5rem;
}

.clientes-marquee--row2 .clientes-logos.is-marquee {
    animation-name: marqueeScrollReverse;
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes marqueeScrollReverse {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.cliente-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: default;
}

.cliente-logo img {
    max-height: 72px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

/* Grilla en versión móvil: una sola grilla con todas las marcas */
@media (max-width: 768px) {
    .clientes-section {
        padding: 0 0 60px;
    }

    .clientes-section .container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem 1.5rem;
    }

    .clientes-tagline,
    .clientes-title {
        grid-column: 1 / -1;
    }

    .clientes-marquee,
    .clientes-logos {
        display: contents;
    }

    .clientes-counters {
        grid-column: 1 / -1;
        gap: 0;
        margin-top: 2rem;
        background: #ac0176;
        border-radius: 1.5rem;
        padding: 1.75rem 1rem;
    }

    .clientes-counter {
        flex: 1;
        position: relative;
        background: transparent;
        padding: 0;
        gap: 0.25rem;
    }

    .clientes-counter + .clientes-counter::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 3.5rem;
        background: rgba(255, 255, 255, 0.55);
    }

    .counter-number {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }

    .cliente-logo {
        width: 100%;
        height: 64px;
    }

    .cliente-logo img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
}

/* --- SECCIÓN VALIDACIÓN --- */
.validation-section {
    padding: 120px 0;
    background-color: var(--bg-primary);
    position: relative;
}

.validation-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.validation-info-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.validation-content-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    width: 100%;
}

.validation-info-col h2 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.somos-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.3em;
}

.somos-fixed {
    color: var(--text-primary);
}

.somos-rotator {
    position: relative;
    display: inline-block;
    min-width: 2em;
}

.somos-word {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.8s ease, filter 0.8s ease;
    pointer-events: none;
}

.somos-word.active {
    position: relative;
    opacity: 1;
    filter: blur(0);
    color: var(--accent);
}

.validation-trayectoria {
    font-size: 1.15rem;
    color: #4A4A4A;
    line-height: 1.7;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cdu-memberships {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

.cdu-membership-box {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    border: 1px solid rgba(132, 1, 90, 0.1);
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
    padding: 2rem;
    border-radius: 20px;
    height: 100%;
}

.cdu-logo-svg {
    height: 44px;
    width: auto;
    flex-shrink: 0;
}

.cdu-membership-text {
    flex: 1;
}

.cdu-membership-text h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1.3;
}

.cdu-membership-divider {
    width: 32px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin: 0.8rem 0;
}

.cdu-membership-text p {
    font-size: 0.9rem;
    color: #5F5F5F;
    line-height: 1.6;
}

.cdu-membership-text h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.cdu-membership-text p {
    font-size: 0.85rem;
    color: #5F5F5F;
    line-height: 1.4;
}

/* Galería de Caras */
.validation-team-col {
    width: 100%;
}

.team-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.team-photo-card.glass-card {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    transition: var(--transition);
}

.team-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    position: relative;
    background-color: var(--bg-primary);
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.team-photo-card:hover .team-img-wrapper img {
    filter: grayscale(0%);
    transform: scale(1.06);
}

.team-role {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6F6F6F;
    transition: color 0.3s ease;
}

.team-photo-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.team-photo-card:hover .team-role {
    color: var(--accent);
}

/* Método */
.method-section {
    position: relative;
    background-image: url('asset/Fondo-pensamos.jpeg');
    background-size: cover;
    background-position: center;
}

@media (min-width: 769px) {
    .method-section {
        background-attachment: fixed;
    }
}

.method-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(249, 247, 242, 0.35);
    z-index: 1;
}

.method-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.035;
    z-index: 2;
    filter: url(#grainy-noise);
    pointer-events: none;
}

.method-section .container {
    position: relative;
    z-index: 3;
}

.method-title {
    font-weight: 800;
    text-transform: none;
}

.method-subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    text-align: center;
    margin-top: -2rem;
    margin-bottom: 2.5rem;
    opacity: 0.8;
}

.method-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    max-width: 760px;
    margin: 0 auto;
    padding-left: 0;
}

.method-timeline::before {
    content: '';
    position: absolute;
    left: 2.35rem;
    top: 2rem;
    bottom: 2rem;
    width: 2px;
    background: linear-gradient(180deg, #ac0176 0%, #84015a 50%, #DE075D 100%);
    border-radius: 2px;
    z-index: 1;
}

.method-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding: 1.5rem 2rem 1.5rem 5.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.4));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    z-index: 2;
}

.method-step:hover {
    transform: translateX(8px);
    border-color: rgba(172, 1, 118, 0.25);
    box-shadow: 0 12px 36px rgba(172, 1, 118, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.step-num {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ac0176, #84015a);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    z-index: 3;
    transition: transform 0.3s ease;
}

.method-step:hover .step-num {
    transform: translateY(-50%) scale(1.08);
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.step-content p {
    font-size: 0.98rem;
    color: #4A4A4A;
    line-height: 1.6;
}

/* Footer */
#main-footer {
    background-color: #f0eee9;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.footer-logo {
    height: 30px;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: #5F5F5F;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul a {
    text-decoration: none;
    color: #5F5F5F;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--accent);
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-contact-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #5F5F5F;
}

.footer-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-info-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #5F5F5F;
}

.footer-info-list li i {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

.footer-contact-list li i {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

.footer-contact-list li a {
    color: #5F5F5F;
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact-list li a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--text-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-contact-info {
    font-size: 0.8rem;
    color: #8F8F8F;
    margin-top: 1rem;
    line-height: 1.5;
}

.footer-legal-links {
    margin-top: 1rem;
}

.footer-legal-links a {
    font-size: 0.8rem;
    color: #8F8F8F;
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(47, 47, 47, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: #8F8F8F;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .services-header {
        height: 40vh;
        min-height: 280px;
    }

    .services-carousel {
        grid-template-columns: repeat(3, 1fr);
    }

    .service-card {
        height: 300px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 100dvh;
        height: auto;
        padding-top: 6rem;
        padding-bottom: 2.5rem;
        box-sizing: border-box;
    }

    /* El filtro SVG feTurbulence es costoso en GPU móvil; es un grano casi
       imperceptible (opacity 0.04) y se elimina en pantallas pequeñas. */
    .hero::after {
        display: none;
    }

    .iphone-mockup {
        display: flex;
    }

    .scroll-scrub-canvas {
        display: none;
    }

    .scroll-scrub-section {
        height: auto;
    }

    .scroll-scrub-sticky {
        position: sticky;
        height: 100dvh;
        background: #fbb23f;
    }

    .scroll-scrub-split {
        flex-direction: column;
        height: 100%;
    }

    .scroll-scrub-text-side {
        flex: 0 0 auto;
        padding: 2rem 1.5rem 0.5rem;
        text-align: center;
    }

    .scroll-scrub-text-side h2 {
        font-size: 1.3rem;
    }

    .scroll-scrub-text-side .manifiesto-text {
        font-size: 0.9rem;
    }

    .manifiesto-icons .icons-svg {
        max-width: 180px;
        margin: 0 auto;
    }

    .scroll-scrub-visual-side {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        width: 100%;
        background: #fbb23f;
    }

    .scroll-scrub-video-wrapper {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .scroll-scrub-progress-bar {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    body.menu-open {
        overflow: hidden;
    }

    .mobile-menu-toggle {
        display: none;
    }

    nav a {
        margin-left: 0;
        font-size: 1rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    .hero-tagline {
        font-size: 0.8rem;
        letter-spacing: 3px;
        margin-bottom: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.3rem;
        line-height: 1.15;
    }

    /* Rotador de palabras dinámicas en el Hero para móvil */
    .word-rotator .rotator-word,
    .word-rotator .rotator-ghost {
        font-size: 1.1em;
        font-weight: 500;
    }

    .hero-description {
        font-size: 1.05rem;
        line-height: 1.6;
        margin: 0 auto 2.5rem;
        max-width: 550px;
    }

    .hero-ctas {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-ctas .btn-primary,
    .hero-ctas .btn-secondary {
        padding: 1rem 2rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .ticker {
        animation-duration: 20s;
    }

    .service-card {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .scroll-scrub-instruction {
        display: none;
    }

    /* Somos rotator: en móvil las palabras que rotan van siempre en su propia línea */
    .somos-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.4rem;
    }

    .somos-word,
    .somos-word.active {
        transition: none;
        filter: none;
    }
}




/* Estilo para el revelado de palabras (Efecto Máscara Estricto) */
.word-container {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    margin-right: 0.25em;
    padding-bottom: 0.15em;
    margin-bottom: -0.15em;
}

.word {
    display: inline-block;
    transform: translateY(calc(100% + 0.3em));
    /* Transición de bajada: más rápida y directa */
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform;
}

body.start-hero-animation .word.active {
    transform: translateY(0);
    /* Transición de subida: lujosa y pausada */
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.highlight .word {
    color: var(--accent);
    font-weight: 700;
}

/* --- TEXT ROTATOR 100% CSS (HERO) --- */
.word-rotator {
    position: relative;
    display: inline-flex;
    vertical-align: bottom;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 0 1px;
}

/* Elemento fantasma invisible para reservar el espacio de la palabra más larga */
.rotator-ghost {
    visibility: hidden;
    display: inline-block;
    pointer-events: none;
    height: 100%;
}

/* Lista vertical que contiene las palabras */
.rotator-list {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400%;
    /* 4 items * 100% */
    display: flex;
    flex-direction: column;
    pointer-events: none;
    /* Animación fluida de 7.5 segundos totales (2s pausa + 0.5s transición por palabra) */
    animation: rotateWordsCSS 7.5s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

/* Palabras individuales del rotador */
.rotator-word {
    height: 25%;
    /* Cada palabra ocupa exactamente 1/4 de la lista (100% de la máscara) */
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.85em;
}

.rotator-ghost {
    text-transform: uppercase;
    font-size: 0.85em;
}

.rotator-list .rotator-word:nth-child(3) {
    letter-spacing: -3px;
}

@media (min-width: 769px) {
    .rotator-list .rotator-word:nth-child(3) {
        letter-spacing: -5px;
    }
}

/* Fotogramas Clave para la rotación vertical continua */
@keyframes rotateWordsCSS {

    /* Palabra 1: marcas (Estática por 2 segundos) */
    0%,
    26.67% {
        transform: translateY(0);
    }

    /* Transición a Palabra 2 (0.5 segundos) -> 33.33% */
    /* Palabra 2: empresas (Estática por 2 segundos) */
    33.33%,
    60% {
        transform: translateY(-25%);
        /* Desplaza 1 palabra hacia arriba */
    }

    /* Transición a Palabra 3 (0.5 segundos) -> 66.67% */
    /* Palabra 3: negocios (Estática por 2 segundos) */
    66.67%,
    93.33% {
        transform: translateY(-50%);
        /* Desplaza 2 palabras hacia arriba */
    }

    /* Transición final a Palabra 4: marcas (0.5 segundos) */
    100% {
        transform: translateY(-75%);
        /* Desplaza 3 palabras hacia arriba (bucle continuo) */
    }
}


/* --- PRELOADER --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    background-color: #84015a;
}

.preloader.split {
    background-color: transparent;
}

.preloader.hidden {
    display: none !important;
}

.preloader-half {
    position: absolute;
    left: 0;
    width: 100vw;
    height: calc(50vh + 2px);
    background-color: #84015a;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
    pointer-events: auto;
}

.preloader-top {
    top: 0;
}

.preloader-bottom {
    bottom: 0;
}

.preloader.split .preloader-top {
    transform: translateY(-100%);
}

.preloader.split .preloader-bottom {
    transform: translateY(100%);
}

.preloader-content {
    position: relative;
    z-index: 10000;
}

.preloader-text-wrapper {
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;
}

.preloader-text {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: #FFFFFF;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 4px;
    transform: translateY(110%);
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.preloader-icon {
    max-height: 80px;
    width: auto;
    margin-bottom: 24px;
    /* Asegurar contraste perfecto con blanco, en caso de que la silueta sea oscura */
    filter: brightness(0) invert(1);
}

.preloader-words {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.preloader-text.step-1 {
    transform: translateY(0);
}

.preloader-text.step-2 {
    transform: translateY(-110%);
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.3rem;
        line-height: 1.15;
    }

    .word-rotator {
        min-width: 6em;
    }

    .rotator-word {
        font-size: 0.75em;
        letter-spacing: -1px;
    }

    .rotator-ghost {
        font-size: 0.75em;
        letter-spacing: -1px;
    }

    .preloader-words {
        flex-direction: column;
        gap: 0;
        line-height: 1.4;
    }

    .preloader-icon {
        max-height: 56px;
        margin-bottom: 12px;
    }

    .preloader-dot {
        display: none;
    }
}

/* --- COMPONENTES Y SECCIONES PREMIUM ADICIONALES --- */

.section-tagline {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Portfolio Premium */
.portfolio-section .section-title {
    font-weight: 800;
    text-transform: none;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.portfolio-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    height: 100%;
}

.portfolio-img-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    border-top-left-radius: 23px;
    border-top-right-radius: 23px;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-decor-icon {
    width: 70px;
    height: 70px;
    color: rgba(255, 255, 255, 0.15);
    stroke-width: 1;
    transition: transform 0.6s ease, color 0.6s ease;
}

.portfolio-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(222, 7, 93, 0.1);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.portfolio-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
}

.portfolio-item h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.portfolio-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.portfolio-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.detail-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}

.detail-value {
    font-size: 0.85rem;
    color: #5F5F5F;
    line-height: 1.5;
}

.portfolio-result {
    margin-bottom: 1.2rem;
}

.result-badge {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    line-height: 1.4;
}

.portfolio-summary {
    font-size: 0.95rem;
    color: #5F5F5F;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-project-detail {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
    width: fit-content;
    position: relative;
    font-family: inherit;
}

.btn-project-detail i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.btn-project-detail::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Hover effects en proyectos */
.portfolio-item:hover .portfolio-img {
    transform: scale(1.08);
}

.portfolio-item:hover .portfolio-decor-icon {
    transform: scale(1.1) rotate(5deg);
    color: rgba(255, 255, 255, 0.3);
}

.portfolio-item:hover .portfolio-img-overlay {
    opacity: 1;
}

.portfolio-item:hover .btn-project-detail i {
    transform: translate(2px, -2px);
}

.portfolio-item:hover .btn-project-detail::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Recursos / Blog Section */
.resources-section {
    padding: 120px 0;
    position: relative;
}

.resources-section .container {
    max-width: 100%;
    padding: 0 1rem;
}

.resources-section .section-title {
    font-weight: 800;
    text-transform: none;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

.resource-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
}

.resource-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.resource-card:hover .resource-image img {
    transform: scale(1.05);
}

.resource-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 2rem;
}

.resource-tag-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.resource-tag {
    background-color: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.resource-time {
    font-size: 0.8rem;
    color: #8F8F8F;
    font-weight: 500;
}

.resource-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.resource-card p {
    font-size: 0.95rem;
    color: #5F5F5F;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.btn-read-more {
    background: transparent;
    border: none;
    color: var(--btn-bg);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 0;
    width: fit-content;
    font-family: inherit;
    position: relative;
}

.btn-read-more i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.btn-read-more::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--btn-bg);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.resource-card:hover .btn-read-more i {
    transform: translateX(4px);
}

.resource-card:hover .btn-read-more::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Contacto Section */
.contact-section {
    padding: 120px 0;
    position: relative;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: flex-start;
}

.contact-info-col {
    display: flex;
    flex-direction: column;
}

.contact-info-col h2 {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.contact-intro {
    font-size: 1.1rem;
    color: #4A4A4A;
    line-height: 1.7;
    margin-bottom: 3rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-detail-item {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.contact-detail-item i {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-detail-item h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #8F8F8F;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.contact-detail-item p,
.contact-detail-item a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-detail-item a:hover {
    color: var(--accent);
}

.cdu-validation-badge {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-color: rgba(222, 7, 93, 0.15);
    background: rgba(255, 255, 255, 0.6);
}

.cdu-badge-icon {
    height: 50px;
    width: auto;
    flex-shrink: 0;
}

.cdu-validation-badge h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cdu-validation-badge p {
    font-size: 0.85rem;
    color: #5F5F5F;
    line-height: 1.4;
}

/* Formulario Premium */
.contact-form-col {
    position: relative;
    overflow: hidden;
    padding: 3.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.premium-form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6F6F6F;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(47, 47, 47, 0.1);
    border-radius: 12px;
    outline: none;
    transition: var(--transition);
    width: 100%;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232F2F2F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
    cursor: pointer;
}

.form-group textarea {
    resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9F9F9F;
    opacity: 0.8;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: #FFFFFF;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(222, 7, 93, 0.08);
}

.btn-form-submit {
    background-color: var(--btn-bg);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(172, 1, 118, 0.15);
}

.btn-form-submit i {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(172, 1, 118, 0.3);
}

.btn-form-submit:hover i {
    transform: translateX(5px);
}

.btn-form-submit:active {
    transform: translateY(0);
}

/* Success Message Container */
.form-success-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2;
}

.form-success-container.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.success-icon-wrapper i {
    width: 44px;
    height: 44px;
    stroke-width: 1.5;
}

.form-success-container h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.form-success-container p {
    font-size: 1.05rem;
    color: #5F5F5F;
    line-height: 1.6;
    max-width: 420px;
    margin-bottom: 2.5rem;
}

/* Modales Dinámicos */
body.modal-open {
    overflow: hidden;
}

.dynamic-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.dynamic-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(249, 247, 242, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.modal-wrapper {
    position: relative;
    width: 90%;
    max-width: 1100px;
    height: 85vh;
    background: #FFFFFF;
    border: 1px solid rgba(47, 47, 47, 0.08);
    border-radius: 32px;
    box-shadow: 0 30px 70px rgba(47, 47, 47, 0.12);
    z-index: 10;
    transform: scale(0.96) translateY(20px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dynamic-modal.active .modal-wrapper {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(249, 247, 242, 0.8);
    border: 1px solid rgba(47, 47, 47, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: var(--transition);
}

.modal-close-btn i {
    width: 20px;
    height: 20px;
}

.modal-close-btn:hover {
    background-color: var(--text-primary);
    color: white;
    transform: rotate(90deg);
}

.modal-scroll-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 4rem;
}

/* Custom Scrollbar para el modal */
.modal-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll-container::-webkit-scrollbar-track {
    background: rgba(249, 247, 242, 0.5);
    border-radius: 0 32px 32px 0;
}

.modal-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(47, 47, 47, 0.15);
    border-radius: 10px;
}

.modal-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(47, 47, 47, 0.3);
}

/* Grid del contenido inmersivo del modal */
.modal-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    align-items: flex-start;
}

/* Columna Izquierda del modal (Media + Metadata) */
.modal-visual-col {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.modal-hero-gradient {
    width: 100%;
    height: 380px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.modal-hero-gradient i {
    width: 100px;
    height: 100px;
    stroke-width: 1;
    opacity: 0.3;
}

.modal-meta-card {
    padding: 2rem;
    background-color: var(--bg-primary);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.meta-group h5 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8F8F8F;
    margin-bottom: 0.35rem;
}

.meta-group p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Columna Derecha del modal (Descripción editorial) */
.modal-desc-col {
    display: flex;
    flex-direction: column;
}

.modal-desc-col .modal-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.modal-desc-col h2 {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.modal-body-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4A4A4A;
}

.modal-body-text h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body-text ul {
    list-style-position: inside;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-left: 0.5rem;
}

.modal-body-text li strong {
    color: var(--text-primary);
}

.modal-action-row {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(47, 47, 47, 0.08);
}

/* Responsive del Diseño */
@media (max-width: 992px) {

    .contact-grid,
    .modal-content-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .modal-scroll-container {
        padding: 2.5rem;
    }

    .contact-info-col h2 {
        font-size: 2.5rem;
    }

    .contact-form-col {
        padding: 2.5rem;
    }

    .modal-hero-gradient {
        height: 260px;
    }

    .modal-desc-col h2 {
        font-size: 2rem;
    }

    .validation-grid-container {
        grid-template-columns: 1fr !important;
        gap: 3rem;
    }

    .validation-info-col {
        text-align: center;
    }

    .validation-content-row {
        gap: 1.5rem;
    }

    .cdu-memberships {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .cdu-membership-box {
        justify-content: center;
        text-align: left;
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Touch devices: always show service CTA */
@media (hover: none) {
    .btn-service-detail {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .service-card-content p {
        -webkit-line-clamp: 8 !important;
    }

    .service-card-content {
        min-height: 100% !important;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }

    .contact-info-col h2 {
        font-size: 2.2rem;
    }

    .modal-wrapper {
        width: 95%;
        height: 90dvh;
        border-radius: 24px;
    }

    .modal-close-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }

    .modal-scroll-container {
        padding: 1.5rem;
    }

    .modal-content-grid {
        gap: 1.5rem;
    }

    .modal-hero-gradient {
        height: 120px !important;
    }

    .modal-hero-gradient i {
        width: 48px !important;
        height: 48px !important;
    }

    .modal-meta-card {
        padding: 1rem;
        gap: 0.8rem;
    }

    .modal-meta-card .meta-group h5 {
        font-size: 0.65rem;
    }

    .modal-meta-card .meta-group p {
        font-size: 0.85rem;
    }

    .modal-desc-col h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .modal-action-row {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }

    .modal-body-text {
        font-size: 0.95rem;
        gap: 1rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .services-carousel {
        grid-template-columns: 1fr;
    }

    .service-card {
        height: 300px;
    }

    .services-header {
        height: 35vh;
        min-height: 240px;
    }

    .services-header-content .section-title {
        font-size: 1.8rem;
    }

    .services-subtitle {
        font-size: 1rem;
    }

    /* Método responsive */
    .method-section {
        background-image: none;
        background-color: #ffffff;
    }

    .method-section::before,
    .method-section::after {
        display: none;
    }

    .method-timeline {
        position: relative;
        max-width: 100%;
        padding-left: 0;
    }

    .method-timeline::before {
        content: '';
        position: absolute;
        left: 1.75rem;
        top: 0;
        bottom: 0;
        width: 2px;
        background: #ac0176;
    }

    .method-step {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 0.25rem;
        padding: 0 0 2rem 3.5rem;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
    }

    .method-step:last-child {
        padding-bottom: 0;
    }

    .method-step:hover {
        border-color: transparent;
        box-shadow: none;
        transform: none;
    }

    .step-num {
        position: absolute;
        left: 0.625rem;
        top: 0;
        transform: none;
        width: 2.25rem;
        height: 2.25rem;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #ac0176;
        color: #ffffff;
        font-size: 1.1rem;
    }

    .method-step:hover .step-num {
        transform: none;
        box-shadow: none;
    }

    .method-section .section-title {
        font-size: 1.3rem;
    }

    /* Footer responsive */
    #main-footer {
        padding: 50px 0 30px;
    }

    .footer-grid {
        gap: 1.5rem;
    }

    .footer-col h4 {
        margin-bottom: 1rem;
    }

    /* CDU card responsive */
    .cdu-membership-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem;
    }

    .team-photos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .team-photos-grid {
        grid-template-columns: 1fr !important;
    }

    .chameleon-stage {
        height: 220px !important;
    }

    .cham-main, .cham-variant {
        max-width: 150px !important;
    }

    .identidad-cards-row .about-item {
        flex: 0 0 82vw !important;
        padding: 1rem 1.2rem !important;
    }

    .identidad-cards-row {
        margin-top: 0.8rem !important;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.1;
    }

    .hero-tagline {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .hero-scroll-cue {
        margin-top: 1.6rem;
    }

    .hero-scroll-cue .scroll-cue-circle {
        width: 42px;
        height: 42px;
    }

    .hero-scroll-cue .scroll-cue-icon {
        width: 18px;
        height: 18px;
    }

    .service-card {
        flex: 0 0 240px;
        height: 360px;
    }
}

/* ── IPHONE MOCKUP (visible solo en mobile) ── */
@media (min-width: 769px) {
    .iphone-mockup {
        display: none;
    }
}

.iphone-mockup {
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

.iphone-body {
    position: relative;
    width: 280px;
    max-width: 100%;
    background: #111;
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.3),
        0 0 0 2px #333,
        inset 0 0 0 1px rgba(255,255,255,0.05);
    aspect-ratio: 9 / 19.5;
}

.iphone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 26px;
    background: #000;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.iphone-notch::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #1a1a2e;
    border-radius: 50%;
    border: 1px solid #333;
}

.iphone-screen {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    position: relative;
}

.ig-feed {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.ig-feed::before,
.ig-feed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    z-index: 5;
    pointer-events: none;
}

.ig-feed::before {
    top: 0;
    background: linear-gradient(to bottom, #fff, transparent);
}

.ig-feed::after {
    bottom: 0;
    background: linear-gradient(to top, #fff, transparent);
}

.ig-feed-inner {
    /* animación movida a JS para mayor control */
}

.ig-post {
    padding: 10px 12px;
    border-bottom: 1px solid #efefef;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ig-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ig-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #DE075D, #84015a);
    flex-shrink: 0;
}

.ig-name {
    font-size: 11px;
    font-weight: 700;
    color: #262626;
    line-height: 1.2;
}

.ig-sub {
    font-size: 9px;
    color: #8e8e8e;
    line-height: 1.2;
}

.ig-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.ig-media-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.ig-actions {
    display: flex;
    gap: 14px;
    padding: 4px 0;
    color: #262626;
}

.ig-actions svg {
    width: 18px;
    height: 18px;
}

.ig-caption {
    font-size: 11px;
    color: #262626;
    line-height: 1.4;
}

.ig-caption strong {
    font-weight: 700;
}

@media (max-width: 768px) {
    .iphone-mockup {
        padding: 0.5rem;
    }

    .iphone-body {
        width: 240px;
        border-radius: 32px;
        padding: 10px;
    }

    .iphone-notch {
        width: 80px;
        height: 22px;
        top: 6px;
    }

    .iphone-screen {
        border-radius: 24px;
    }

    .ig-post {
        padding: 8px 10px;
    }

    .ig-avatar {
        width: 24px;
        height: 24px;
    }

    .ig-name {
        font-size: 10px;
    }

    .ig-sub {
        font-size: 8px;
    }

    .ig-media-content {
        font-size: 9px;
    }

    .ig-caption {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .iphone-body {
        width: 220px;
        border-radius: 28px;
        padding: 8px;
    }

    .iphone-notch {
        width: 66px;
        height: 18px;
        top: 5px;
    }

    .iphone-notch::after {
        width: 6px;
        height: 6px;
        top: 4px;
    }

    .iphone-screen {
        border-radius: 20px;
    }
}

/* ── CTA FINAL ── */
.cta-card {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.cta-card h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.cta-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(17, 17, 17, 0.75);
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

.cta-card .btn {
    margin-top: 0.5rem;
}

/* ── UTILITY: desktop-only / mobile-only ── */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .cta-card p {
        display: none;
    }
}

/* ── MANIFIESTO MOBILE ── */
.manifiesto-mobile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background: #fbb23f;
    padding: 0 !important;
}

.manifiesto-mobile-text {
    width: 100%;
    padding: 1.5rem 1.5rem 0.5rem;
    text-align: center;
}

.manifiesto-mobile-text h2 {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.manifiesto-mobile-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(17, 17, 17, 0.8);
    margin-bottom: 1.5rem;
}

.manifiesto-mobile-text .manifiesto-icons {
    margin-top: 0;
}

.manifiesto-mobile-text .icons-svg {
    max-width: 200px;
    margin: 0 auto;
    filter: brightness(0);
    opacity: 0.8;
}

.manifiesto-mobile-video {
    text-align: center;
    background: #fbb23f;
    line-height: 0;
}

.manifiesto-mobile-video img {
    width: 95%;
    max-width: 360px;
    height: auto;
    display: inline-block;
}

/* ── QUÉ HACEMOS MOBILE ── */
.about-section-mobile {
    background-color: var(--bg-primary);
    padding: 60px 0;
}

.quehacemos-mobile-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.03em;
    text-transform: none;
}

.quehacemos-mobile-chams {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.quehacemos-mobile-chams img {
    height: 240px;
    width: auto;
    object-fit: contain;
}

.quehacemos-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quehacemos-mobile-cards .about-item {
    padding: 1.2rem 1.4rem;
    border-radius: 20px;
    border: 1px solid transparent;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.15)) padding-box,
        linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0.05)) border-box;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 8px 24px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.quehacemos-mobile-cards .about-item h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    margin-top: 0.6rem;
}

.quehacemos-mobile-cards .about-item p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #5F5F5F;
    margin: 0;
}

.quehacemos-mobile-cards .about-item i {
    color: var(--accent);
    width: 32px;
    height: 32px;
}

/* ── PROYECTOS: OCULTO TEMPORALMENTE (se activará más adelante) ── */
#proyectos {
    display: none;
}

/* ── SERVICIOS: OCULTO TEMPORALMENTE (se activará más adelante) ── */
#servicios {
    display: none;
}