/* Impedir selección de texto y arrastre de elementos */
body {
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE / Edge */
    user-select: none;
    /* Estándar */
}

/* Evitar que arrastren imágenes al escritorio o a otra pestaña */
img {
    -webkit-user-drag: none;
    -moz-user-drag: none;
    pointer-events: none;
    /* Opcional: deshabilita interacción directa con imágenes */
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body,
#root {
    background: #0C0C0C;
    font-family: 'Kanit', sans-serif;
}

body {
    overflow-x: hidden;
}

.hero-heading {
    background: linear-gradient(180deg, #f8f9fc 0%, #fcfcfc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: #D7E2EA;
    background-clip: text;
}

/* ---- NAVBAR ---- */
nav {
    display: flex;
    justify-content: space-between;
    padding: 24px 24px 0;
    position: relative;
    z-index: 20;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0s forwards;
}

nav a {
    color: #D7E2EA;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: clamp(0.75rem, 1.4vw, 1.4rem);
    text-decoration: none;
    transition: opacity 200ms;
}

nav a:hover {
    opacity: 0.7;
}

/* ---- HERO ---- */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    position: relative;
    background: #0C0C0C;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-heading-wrap {
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
}

.hero-h1 {
    font-size: clamp(14vw, 17.5vw, 17.5vw);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
    width: 100%;
    margin-top: clamp(8px, 2vw, -20px);
}

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: clamp(28px, 4vw, 40px);
    padding-left: 24px;
    padding-right: 24px;
    margin-top: auto;
    position: relative;
    z-index: 20;
}

.hero-desc {
    color: #D7E2EA;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.35;
    font-size: clamp(0.75rem, 1.4vw, 1.5rem);
    max-width: clamp(160px, 20vw, 260px);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s forwards;
}

/* ---- CONTACT BUTTON ---- */
.contact-btn {
    background: linear-gradient(123deg, #18011F 7%, #B600A8 37%, #7621B0 72%, #BE4C00 100%);
    box-shadow: 0px 4px 4px rgba(181, 1, 167, 0.25), inset 4px 4px 12px #7721B1;
    outline: 2px solid white;
    outline-offset: -3px;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: clamp(0.7rem, 1vw, 1rem);
    padding: clamp(12px, 1.5vw, 16px) clamp(32px, 3vw, 48px);
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0px 10px 20px rgba(181, 1, 167, 0.4), inset 4px 4px 12px #7721B1;
}

/* ---- HERO PORTRAIT ---- */
.hero-portrait-wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    bottom: 0;
    width: clamp(280px, 40vw, 520px);
    opacity: 0;
    animation: fadeInPortrait 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
}

.hero-portrait-wrap img {
    width: 100%;
    display: block;
    animation: float 6s ease-in-out infinite;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInPortrait {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ---- MARQUEE ---- */
#marquee {
    background: #0C0C0C;
    padding: clamp(80px, 10vw, 160px) 0 40px;
    overflow: hidden;
    touch-action: pan-y;
    /* horizontal gesture is handled by JS drag; vertical still scrolls the page */
    cursor: grab;
}

#marquee.dragging {
    cursor: grabbing;
}

.marquee-row {
    display: flex;
    gap: 12px;
    will-change: transform;
    margin-bottom: 12px;
    user-select: none;
    /* avoid text/image selection while dragging */
}

.marquee-img {
    width: 420px;
    height: 270px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    -webkit-user-drag: none;
    /* prevent native image-drag ghost interfering with pointer drag */
}

/* ---- ABOUT ---- */
#about {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: clamp(60px, 8vw, 120px) clamp(20px, 4vw, 60px);
    background: #0C0C0C;
    overflow: hidden;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(40px, 5vw, 64px);
    position: relative;
    z-index: 5;
    text-align: center;
}

.about-h2 {
    font-size: clamp(3rem, 12vw, 160px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1;
}

.about-text {
    color: #D7E2EA;
    font-weight: 300;
    line-height: 1.5;
    max-width: 560px;
    font-size: clamp(1rem, 2vw, 1.35rem);
}

.about-img {
    position: absolute;
    pointer-events: none;
}

.about-moon {
    top: 4%;
    left: clamp(10px, 4vw, 40px);
    width: clamp(120px, 16vw, 210px);
    opacity: 0;
    transform: translateX(-80px);
    animation: fadeInLeft 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards, float 5s ease-in-out infinite 0s;
    animation-play-state: paused;
}

.about-p59 {
    bottom: 8%;
    left: clamp(20px, 10vw, 80px);
    width: clamp(100px, 14vw, 180px);
    opacity: 0;
    transform: translateX(-80px);
    animation: fadeInLeft 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s forwards, float 7s ease-in-out infinite 1s;
    animation-play-state: paused;
}

.about-lego {
    top: 4%;
    right: clamp(10px, 4vw, 40px);
    width: clamp(120px, 16vw, 210px);
    opacity: 0;
    transform: translateX(80px);
    animation: fadeInRight 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards, float 6s ease-in-out infinite 0.5s;
    animation-play-state: paused;
}

.about-group {
    bottom: 8%;
    right: clamp(20px, 10vw, 80px);
    width: clamp(130px, 17vw, 220px);
    opacity: 0;
    transform: translateX(80px);
    animation: fadeInRight 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards, float 8s ease-in-out infinite 2s;
    animation-play-state: paused;
}

.about-text-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4rem, 6vw, 6rem);
}

/* ---- SERVICES ---- */
#services {
    background: #FFFFFF;
    border-radius: clamp(40px, 5vw, 60px) clamp(40px, 5vw, 60px) 0 0;
    padding: clamp(60px, 6vw, 128px) clamp(20px, 4vw, 40px);
}

.services-h2 {
    font-size: clamp(3rem, 12vw, 160px);
    font-weight: 900;
    text-transform: uppercase;
    color: #0C0C0C;
    text-align: center;
    line-height: 1;
    margin-bottom: clamp(64px, 7vw, 112px);
}

.services-list {
    max-width: 900px;
    margin: 0 auto;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: clamp(16px, 2vw, 32px);
    padding: clamp(32px, 4vw, 48px) 0;
    border-bottom: 1px solid rgba(12, 12, 12, 0.15);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s, transform 0.7s;
}

.service-item:first-child {
    border-top: 1px solid rgba(12, 12, 12, 0.15);
}

.service-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-num {
    font-size: clamp(3rem, 10vw, 140px);
    font-weight: 900;
    color: #0C0C0C;
    line-height: 0.9;
    flex-shrink: 0;
    min-width: clamp(60px, 10vw, 140px);
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
}

.service-name {
    font-weight: 500;
    text-transform: uppercase;
    font-size: clamp(1rem, 2.2vw, 2.1rem);
    color: #0C0C0C;
}

.service-desc {
    font-weight: 300;
    line-height: 1.65;
    max-width: 672px;
    font-size: clamp(0.85rem, 1.6vw, 1.25rem);
    color: #0C0C0C;
    opacity: 0.6;
}

/* ---- PROJECTS ---- */
#projects {
    background: #0C0C0C;
    border-radius: clamp(40px, 5vw, 60px) clamp(40px, 5vw, 60px) 0 0;
    margin-top: clamp(-40px, -3vw, -56px);
    position: relative;
    z-index: 10;
    padding: clamp(60px, 6vw, 128px) clamp(20px, 4vw, 40px) 120px;
}

.projects-h2 {
    font-size: clamp(3rem, 12vw, 160px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1;
    text-align: center;
    margin-bottom: clamp(40px, 5vw, 80px);
}

.cards-container {
    position: relative;
}

.card-sticky-wrap {
    height: 100vh;
    position: relative;
}

.project-card {
    position: sticky;
    top: 96px;
    border-radius: clamp(40px, 5vw, 60px);
    border: 2px solid #D7E2EA;
    background: #0C0C0C;
    padding: clamp(16px, 2vw, 32px);
    will-change: transform;
    max-width: 1100px;
    margin: 0 auto;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(16px, 2vw, 24px);
    flex-wrap: wrap;
    gap: 12px;
}

.card-num {
    font-size: clamp(2.5rem, 8vw, 100px);
    font-weight: 900;
    color: #D7E2EA;
    line-height: 0.9;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-category {
    color: #D7E2EA;
    opacity: 0.5;
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-title {
    color: #D7E2EA;
    font-size: clamp(1rem, 2.5vw, 2rem);
    font-weight: 600;
    text-transform: uppercase;
}

.live-btn {
    border: 2px solid #D7E2EA;
    color: #D7E2EA;
    background: transparent;
    border-radius: 9999px;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: clamp(0.7rem, 1vw, 1rem);
    padding: clamp(10px, 1.2vw, 14px) clamp(24px, 2.5vw, 40px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.live-btn:hover {
    background: rgba(215, 226, 234, 0.1);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(215, 226, 234, 0.2);
}

.card-images {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: clamp(8px, 1vw, 16px);
}

.card-col1 {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vw, 16px);
}

.card-col1 img:first-child {
    height: clamp(130px, 16vw, 230px);
    width: 25px;
    object-fit: cover;
    border-radius: clamp(24px, 4vw, 60px);
}

.card-col1 img:last-child {
    height: clamp(160px, 22vw, 340px);
    width: 100%;
    object-fit: cover;
    border-radius: clamp(24px, 4vw, 60px);
}

.card-col2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: clamp(24px, 4vw, 60px);
    display: block;
}

/* ---- CURSOR ---- */
.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background: white;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.custom-cursor-ring {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(215, 226, 234, 0.5);
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, opacity 0.3s, border-color 0.3s;
}

.cursor-active {
    width: 60px !important;
    height: 60px !important;
    opacity: 0.3 !important;
    border-color: white !important;
}

/* ---- NUEVOS ESTILOS PARA CONTENIDO EXTENDIDO ---- */
.section-title {
    font-size: clamp(2.5rem, 10vw, 140px);
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 60px;
    line-height: 1;
}

.section-container {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}


.grid-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(215, 226, 234, 0.2);
    border-radius: 40px;
    padding: 40px;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-10px);
}

.info-card h3 {
    color: #D7E2EA;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.info-card p,
.info-card li {
    color: rgba(215, 226, 234, 0.7);
    line-height: 1.6;
    font-weight: 300;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.info-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #B600A8;
}

.metrics-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: rgba(215, 226, 234, 0.2);
    border: 1px solid rgba(215, 226, 234, 0.2);
    border-radius: 40px;
    overflow: hidden;
    margin-bottom: 100px;
}

.metric-item {
    background: #0C0C0C;
    padding: 40px;
    text-align: center;
}

.metric-item strong {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: #D7E2EA;
}

.metric-item span {
    color: rgba(215, 226, 234, 0.6);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.process-step {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    border-left: 4px solid #B600A8;
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateX(10px);
}

.process-list {
    transition: transform 0.3s ease;
}

.process-list .reveal:hover {
    transform: translateY(-10px) scale(1.05);
}

.step-num {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(215, 226, 234, 0.2);
}

.step-content h3 {
    font-size: 1.5rem;
    color: #D7E2EA;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.step-content p {
    color: rgba(215, 226, 234, 0.7);
    line-height: 1.6;
}

.logo-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 40px;
}

.logo-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(215, 226, 234, 0.2);
    color: #D7E2EA;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logo-pill:hover {
    background: white;
    color: #0C0C0C;
    transform: scale(1.1);
}

.logo-pill.featured {
    background: #B600A8;
    border-color: #B600A8;
    color: white;
}

.cta-footer {
    text-align: center;
    padding: 120px 24px;
    background: linear-gradient(180deg, #0C0C0C 0%, #1a1a1a 100%);
}

.cta-footer h2 {
    font-size: clamp(2rem, 6vw, 4rem);
    color: #D7E2EA;
    margin-bottom: 30px;
    line-height: 1.1;
}

.cta-footer p {
    color: rgba(215, 226, 234, 0.6);
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1.2rem;
}

/* ---- SCROLL REVEAL ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ---- ANIMATED TEXT ---- */
.animated-text-wrap {
    position: relative;
}

.animated-text-wrap .char {
    display: inline-block;
    opacity: 0.2;
    transform: translateY(0) scale(1);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animated-text-wrap .char.lit {
    opacity: 1;
    transform: translateY(-2px) scale(1.05);
}

@media (max-width: 640px) {
    nav {
        padding: 20px 20px 0;
    }

    .hero-h1 {
        font-size: 14vw;
        margin-top: 8px;
    }

    .hero-portrait-wrap {
        top: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
    }

    .card-images {
        grid-template-columns: 1fr 1.5fr;
    }
}

@media (min-width: 768px) {
    nav {
        padding: 32px 40px 0;
    }
}

/* ---- FOOTER ---- */
.footer {
    background: #0C0C0C;
    color: #D7E2EA;
    padding: clamp(60px, 8vw, 100px) 24px clamp(40px, 5vw, 60px);
    border-top: 1px solid rgba(215, 226, 234, 0.1);
    font-family: 'Kanit', sans-serif;
    position: relative;
    z-index: 20;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1.5fr;
        align-items: start;
    }
}

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-start;
}

.logo-section .img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo-section .logo {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 0.8;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    color: #D7E2EA;
}

.logo-section .tagline {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #ffffff;
    margin-left: 4px;
}

.logo-section .description {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(215, 226, 234, 0.6);
    max-width: 300px;
    margin-top: 12px;
    line-height: 1.4;
}

.right-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 480px) {
    .right-section {
        grid-template-columns: 1fr 1fr;
    }
}

.newsletter {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.newsletter h3 {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #D7E2EA;
}

.newsletter input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(215, 226, 234, 0.2);
    border-radius: 99px;
    padding: 12px 24px;
    color: white;
    font-family: 'Kanit', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 320px;
}

.newsletter input:focus {
    outline: none;
    border-color: #B600A8;
    background: rgba(255, 255, 255, 0.1);
}

.links {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.links>div {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.links h4 {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(215, 226, 234, 0.4);
    margin-bottom: 4px;
}

.links a {
    color: #D7E2EA;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 300;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.links a:hover {
    opacity: 1;
    color: #B600A8;
    transform: translateX(5px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding-top: 30px;
    border-top: 1px solid rgba(215, 226, 234, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(215, 226, 234, 0.4);
}

.footer-bottom a {
    color: rgba(215, 226, 234, 0.4);
    text-decoration: none;
    margin-left: 10px;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #D7E2EA;
}

/* ---- CLIENTES ---- */
#clientes {
    background: #0C0C0C;
    padding: clamp(60px, 8vw, 140px) 0;
    /* Ligera reducción de padding vertical en móvil */
    overflow: hidden;
}

.clientes-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}

.clientes-header {
    text-align: center;
    margin-bottom: clamp(48px, 6vw, 80px);
}

.clientes-h2 {
    font-size: clamp(3rem, 12vw, 140px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 16px;
}

.clientes-sub {
    color: rgba(215, 226, 234, 0.5);
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    /* Reducido de 180px para mejor ajuste */
    gap: 8px;
    /* Pequeño espacio para evitar solapamiento de bordes */
}

.logo-cell {
    aspect-ratio: 3/2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    /* Reducido para dar más espacio al logo */
    border: 1px solid rgba(215, 226, 234, 0.07);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(20px);
    cursor: default;
    box-sizing: border-box;
    width: 100%;
    /* Asegura que la celda no supere la grilla */
}

/* Corregido: eliminado 'gap: 30px' del :hover */
.logos-grid .logo-cell:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(215, 226, 234, 0.2);
    transform: translateY(-5px) scale(1.02);
    /* Efecto más suave para no desbordar */
}

.logo-cell img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(1.8);
    opacity: 0.6;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-cell:hover img {
    filter: grayscale(0) brightness(1);
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 768px) {

    /* Estado Base / Desktop (Mantiene tu Grid si es conveniente) */
    .logos-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .logo-cell {
        padding: 12px 16px;
        aspect-ratio: 16/9;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .logos-slider-wrapper {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        /* Scroll suave en iOS */
        scroll-snap-type: x mandatory;
        /* Enganche al deslizar */
        scroll-behavior: smooth;
        padding-bottom: 8px;
        /* Espacio para scrollbar si no se oculta */
    }

    /* Ocultar barra de scroll para un acabado limpio */
    .logos-slider-wrapper::-webkit-scrollbar {
        display: none;
    }

    .logos-slider-wrapper {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .logos-grid {
        display: grid;
        /* Define 2 FILAS de altura fija/automática */
        grid-template-rows: repeat(2, 1fr);
        /* Permite que las columnas fluyan hacia la derecha indefinidamente */
        grid-auto-flow: column;
        grid-auto-columns: calc(50% - 6px);
        /* Muestra 2 tarjetas por pantalla */
        gap: 8px;
    }

    .logo-cell {
        scroll-snap-align: start;
        /* Encaja cada elemento al deslizar */
        width: 100%;
    }
}


@media (max-width: 768px) {
    #logosGrid {
        display: grid;
        /* Define exactamente 2 filas de la misma altura */
        grid-template-rows: repeat(2, 1fr);
        /* Fuerza a que las columnas fluyan hacia la derecha */
        grid-auto-flow: column;
        /* Ancho de las tarjetas visible en pantalla (ej: 40% del ancho para ver ~2.5 columnas) */
        grid-auto-columns: calc(45% - 6px);
        gap: 8px;

        /* Habilita el Scroll Horizontal */
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: auto;
        /* IMPORTANTE: Mantener en auto para que el JS fluya suave */

        /* Ocultar barra de scroll para un aspecto más limpio */
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    #logosGrid::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }

    .logo-cell {
        width: 100%;
        aspect-ratio: 16/9;
    }
}

/* ==========================================
   AJUSTES RESPONSIVOS Y MOBILE
   ========================================== */

/* 1. Ocultar cursor personalizado en pantallas táctiles */
@media (max-width: 768px) {
    body {
        cursor: auto !important;
    }

    .custom-cursor-dot,
    .custom-cursor-ring {
        display: none !important;
    }

}

/* ---- MARQUEE RESPONSIVE (MOBILE) ---- */
@media (max-width: 640px) {
    #marquee {
        padding: 40px 0 20px;
        /* Reduce el relleno superior/inferior en móvil */
    }

    .marquee-row {
        gap: 8px;
        /* Reduce el espacio horizontal entre imágenes */
        margin-bottom: 8px;
    }

    .marquee-img {
        width: 220px;
        /* Ancho más compacto para móvil */
        height: 140px;
        /* Altura proporcional */
        border-radius: 10px;
        /* Esquinas acordes al nuevo tamaño */
    }
}

/* 2. Ajuste del Navbar en dispositivos pequeños */
@media (max-width: 640px) {
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 18px;
        padding: 16px 16px 0;
        padding-top: max(24px, env(safe-area-inset-top));
    }

    nav a {
        font-size: 0.8rem;
    }

    /* Evitar desbordes por 100vh rígido */
    #hero {
        min-height: 100dvh;
        /* dvh evita brincos con la barra del navegador móvil */
    }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding-bottom: 30px;
    }

    .hero-desc {
        max-width: 100%;
    }

    .contact-btn {
        width: 100%;
        text-align: center;
    }

    /* Ajuste de cuadrículas y métricas */
    .grid-info {
        grid-template-columns: 1fr;
    }

    .metrics-strip {
        grid-template-columns: 1fr 1fr;
    }

    .process-step {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Ajuste del Footer */
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-bottom a {
        margin-left: 0;
    }
}