/* =========================
   Variables y base
========================= */
:root {
    --bg: #101010;
    --fg: #fff;
    --muted: #aaa;
    --panel: #101010;
    --yellow: #F7F56A;
    --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --transition-fast: .2s ease;
    --transition-medium: .3s ease;
}

* {
    box-sizing: border-box;
}

html,
html {
    height: auto;
    /* permite crecer */
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 300;
    background: var(--bg);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 70px;
    min-height: 200vh;
    cursor: none;
}

body.desktop-cursor,
body.desktop-cursor * {
    cursor: none !important;
}

body.dimmed::after {
    content: "";
    position: fixed;
    inset: 0;
    /* cubre todo */
    background: rgba(0, 0, 0, 0.55);
    /* ajusta la opacidad */
    z-index: 9;
    /* debajo de hover-overlay (z-index:10) y de las cards */
    pointer-events: none;
    /* no bloquea clics */
}


h1,
h2,
h3,
h4 {
    font-weight: 300;
}

h1 {
    font-size: clamp(28px, 6vw, 80px);
    margin-bottom:20px;
}

/* =========================
   Header fijo
========================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 0 30px;
    transition: backdrop-filter 0.3s ease, background 0.3s ease;

}

.site-header.scrolled {
    backdrop-filter: blur(10px);
}

/* Logo centrado */
.site-header .logo img {
    height: 36px;
}

/* Navegación */
.header-nav {
    position: absolute;
    right: 30px;
    display: flex;
    gap: 18px;
}

.header-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: var(--fg, #fff);
    border-radius: 20px;
    transition: background 0.3s ease;
}

.header-nav .nav-link:hover,
.header-nav .nav-link:focus-visible {
    color: var(--yellow);
}

/* Íconos solo visibles en móvil */
.header-nav .icon {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-nav .text {
        display: none;
    }

    .header-nav {
        gap: 12px;
    }

    .header-nav .nav-link {
        padding: 0;
        /* quitamos padding para que el círculo sea exacto */
    }

    .header-nav .icon {
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--yellow);
        border-radius: 50%;
        width: 35px;
        /* tamaño cómodo para dedo (mín 44px) */
        height: 35px;
    }

    .header-nav .icon img {
        width: 22px;
        /* tamaño del ícono */
        height: 22px;
        display: block;
    }
}


/* Oculta el cursor nativo cuando activamos el modo desktop-cursor desde JS */
body.desktop-cursor {
    cursor: none;
    z-index: 99999;
}

/* =========================
   Efecto blur de fondo
========================= */
.blur-highlight {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(245, 219, 22, 0.3) 0%, transparent 70%);
    filter: blur(60px);
    z-index: -1;
    animation: pulse 5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: .3;
    }

    50% {
        opacity: .7;
    }
}

/* =========================
   Hero y tipografía
========================= */
.hero {
    position: relative;
    text-align: center;
    padding: 10vh 5vw;
    line-height: 1.2;
    font-weight: 400;
    max-width: 1300px;
    margin: 0 auto;
}

.sub-hero {
    text-align: center;
    font-size: clamp(18px, 3vw, 32px);
    margin-top: 1vh;
}

/* Atenuación cuando hay tarjetas visibles */
.hero.dimmed {
    color: #444;
}

.hero.dimmed .hover-word {}

/* =========================
   Hover Words (interacciones)
========================= */
.hover-word {
    display: inline-block;
    cursor: pointer;
    font-weight: 300;
    border-bottom: 2px solid transparent;
    line-height: 1.1;
    transition: color var(--transition-fast),
        border-color var(--transition-fast),
        text-decoration-color var(--transition-fast),
        background var(--transition-fast);

    text-decoration: underline;
    text-decoration-thickness: 5px;
}

.hover-word:hover,
.hover-word:focus-visible,
.hover-word.active,
.hero.dimmed .hover-word.active {
    color: var(--yellow);
    text-decoration: underline;
    text-decoration-thickness: 5px;
    background: transparent;
}

/* =========================
   Secciones genéricas
========================= */
.section {
    padding: 12vh 8vw;
    text-align: center;
    position: relative;
}

/* =========================
   Sección Nosotros
========================= */
#nosotros {
    padding-top: 0;
}

#nosotros h2 {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    font-size: clamp(15px, 6vw, 24px);
}

#nosotros span {
   
    margin-bottom: 20px;
    display: inline-block;
    text-transform: uppercase;
    color:var(--yellow);
}

/* =========================
   Logos de clientes
========================= */
#clientes {
    text-align: center;
    overflow-x: hidden;
    ;
}
#clientes h2 {
    margin-bottom: 50px;
}

#clientes .logos {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    white-space: nowrap;
}

#clientes .logos-track {
    display: flex;
    gap: 50px;
    align-items: center;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

#clientes .logos img {
    flex: 0 0 auto;
    height: 80px;
    width: 150px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .8;
    transition: filter var(--transition-medium), opacity var(--transition-medium);
}

#clientes .logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@media (max-width: 600px) {
    #clientes .logos-track img {
        height: 44px;
    }
}

/* =========================
   Grid de proyectos estilo collage
========================= */
.projects {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columnas fijas */
    grid-auto-rows: 220px;
    /* altura base */
    gap: 25px;
    margin-top: 50px;
}

.projects img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;

    transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
}

.projects img:hover {
    transform: scale(1.05);

}

/* Columna 1: imagen grande */
.projects img:nth-child(1) {
    grid-column: 1;
    grid-row: span 2;
    /* ocupa 2 filas de altura */
}

/* Columna 2: más abajo */
.projects img:nth-child(2) {
    grid-row: span 2;
}

/* Columna 3: dos apiladas */
.projects img:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

.projects img:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
}

/* Columna 4: alineada con la primera */
.projects img:nth-child(5) {
    grid-column: 4;
    grid-row: 1 / span 2;
}

/* ===== Tablets (768px – 1024px) ===== */
@media (max-width: 1024px) {
    .projects {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columnas */
        grid-auto-rows: auto;
    }

    .projects img {
        grid-column: auto !important;
        grid-row: auto !important;
        height: auto;
        /* mantén proporción */
    }
}

/* ===== Móviles (<=767px) ===== */
@media (max-width: 767px) {
    .projects {
        grid-template-columns: 1fr;
        /* 1 columna */
    }
}

/* =========================
   Texto de valor
========================= */
#valor {
    position: relative;
}

#valor h3 {
    font-size: clamp(25px, 5vw, 35px);
    line-height: 1.5em;
}

#valor .blur-highlight {
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 760px; /* evita que se extienda demasiado en pantallas grandes */
}

.value-text {
    font-size: clamp(20px, 4vw, 36px);
    max-width: 900px;
    margin: auto;
    position: relative;
}

.value-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.icon-hand,
.icon-heart {
    width: 92px;
    height: auto;
    flex: 0 0 auto;
    transform-origin: 50% 50%;
}

.icon-hand {
    animation: slow-rotate 4.5s ease-in-out infinite;
}

.icon-heart {
    animation: heartbeat 1.2s ease-in-out infinite;
}

.glitch-word {
    display: block;
    min-width: 0.6ch;
    /* evita salto visual con palabras cortas */
    will-change: contents;
}

@keyframes slow-rotate {
    0% {
        transform: rotate(6deg);
    }

    50% {
        transform: rotate(-6deg);
    }

    100% {
        transform: rotate(6deg);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.08);
    }

    40% {
        transform: scale(0.98);
    }

    60% {
        transform: scale(1.06);
    }

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

/* =========================
   Call to action
========================= */
.cta-section {
    padding: 8vh 5vw;
    display: flex;
    justify-content: center;
    gap: 30px;
    border-radius: 10px;
    border: none;
}

/* Buttons for "nosotros" section */
.nosotros-cta {
    margin-top: 42px;
    display: inline-flex;
    gap: 16px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .12s ease;
}

.btn-primary {
    background: var(--yellow);
    color: var(--bg);
    border: 2px solid rgba(0,0,0,0.06);
    box-shadow: 0 6px 18px rgba(247,245,106,0.08);
}

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

.btn-primary:hover,
.btn-primary:focus-visible {
    /* slightly darker yellow */
    background: #e8de3d;
    color: var(--bg);
    transform: translateY(-1px);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background: var(--yellow);
    color: var(--bg);
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .nosotros-cta { flex-direction: column; gap: 10px; }
    .btn { width: 100%; padding: 14px; }
}

/* CTA inside projects */
.projects-cta {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

.cta-section img, .projects-cta img {
    transition: .4s ease;
    
}
.projects-cta img{
    width:40px;
}
.projects-cta .btn-cta{
    max-width: 400px;
    width: 100%;
    font-size: 1.3rem;
    padding: 10px 26px;
    min-height: 90px;
}

.cta-buttons {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
}

.btn-cta {
    width: 50%;
    text-decoration: none;
    color: var(--fg);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 120px;
    padding: 48px;
    font-weight: 300;
    font-size: 3rem;
    border: 2px solid var(--yellow);
    box-sizing: border-box;
    transition: background var(--transition-medium),
        color var(--transition-medium),
        box-shadow var(--transition-medium),
        border-color var(--transition-medium);
    position: relative;
    border-radius: 6px;
}

.btn-cta:hover,
.btn-cta:focus-visible {
    background: var(--yellow);
    color: var(--bg);
    box-shadow: 0 8px 32px rgba(245, 219, 22, .18);
    border-color: var(--yellow);
}

.btn-cta:hover img,
.btn-cta:focus-visible img {
    transform: rotate(45deg);
}

/* Responsive CTA */
@media (max-width: 900px) {
    .cta-buttons {
        flex-direction: column;
        gap: 24px;
    }

    .cta-buttons a {
        min-width: 0;
        width: 100%;
        font-size: 1.3rem;
        padding: 32px 16px;
    }
}

/* =========================
   Overlay y tarjetas (interacciones)
========================= */
#hover-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

@media (min-width:1024px) {
    .hover-card {
        transition: transform 680ms cubic-bezier(.2, .9, .2, 1),
            opacity 360ms ease;
        opacity: 0;
    }
}

.hover-card {
    position: absolute;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    border: none;
    will-change: transform, opacity;
    display: inline-block;
    width: auto;
    height: auto;
    pointer-events: none;
}

.hover-card img {
    width: 100%;
    height: 200px;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {

    .hover-card img {
        height: 400px;
        object-fit: cover;
    }
}

.card-label {
    position: absolute;
    right: 4px;
    bottom: 4px;
    font-size: 12px;
    letter-spacing: .08em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: #fff;
    opacity: .8;
    font-weight: 500;
    display: none;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 999;
}

.cursor-inner {
    width: 24px;
    height: 24px;
    margin-left: -12px;
    margin-top: -12px;
    border-radius: 50%;
    background: var(--yellow);
    transition: transform 0.2s ease-out, background-color 0.2s ease;
}

.cursor-inner.scaled {
    transform: scale(1.8);
    background-color: rgba(247, 245, 106, 0.9);
    /* opcional */
}


/* =========================
   Marquee móvil
========================= */
.marquee-wrapper {
    position: absolute;
    top: 50%;
    left: 0;
    display: flex;
    gap: 16px;
    transform: translateY(-50%);
    will-change: transform;
    pointer-events: none;
}

.marquee-wrapper .hover-card {
    position: relative;
}

/* =========================
   Responsive extra
========================= */
@media (max-width: 768px) {
    .hero {
        font-size: clamp(22px, 8vw, 42px);
    }

    .cta-section {
        flex-direction: column;
    }

    .hover-card {
        width: 80vw;
        height: 40vh;
    }
}

/* =========================
   Footer
========================= */
footer {
    text-align: center;
    padding: 30px;
    font-size: 14px;
    color: var(--muted);
}

footer.section {
    padding-bottom: 0px;
}

footer .int-footer {
    border-top: 1px solid #fff;
    display: flex;
    justify-content: space-between;
    padding: 60px 0;
    flex-wrap: wrap;
}

footer img {
    height: 42px;
    object-fit: contain;
}

footer .copy {
    text-align: right;
}

footer .copy a {
    color: #fff;
}


.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    /* color oficial WhatsApp */
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
    text-decoration: none;
    z-index: 500;
    transition: transform 0.2s ease-in-out;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

/* =========================
   Full-width inclined ticker (banda)
========================= */
#banda {
    position: relative;
    width: 100vw;
    margin-bottom: 12vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 5;

    --banda-height: 56px;
    background: #383838;
    transform: rotate(-2deg);
    will-change: transform;
}

.ticker-rail {
    position: relative;
    width: 100%;
    height: var(--banda-height);
    display: flex;
    align-items: center;
    overflow: hidden;

    transform-origin: left center;
}

.ticker-track {
    display: flex;
    gap: 5px;
    align-items: center;
    will-change: transform;
    will-change: transform;
}

.ticker-item {
    display: inline-block;
    white-space: nowrap;
    font-size: 19px;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, 1);
    padding: 10px 0;
    pointer-events: none;

    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ticker-item+.ticker-item::before {
    content: "•";
    color: rgba(255, 255, 255, 0.18);
}

/* Respect prefers-reduced-motion: stop continuous motion */
@media (prefers-reduced-motion: reduce) {
    #banda .ticker-track,
    #clientes .logos-track,
    .marquee-wrapper {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 768px) {
    #banda {
        --banda-height: 46px;
    }

    .ticker-item {
        font-size: 14px;
    }
}