/* ==========================================================================
   R3C Creative Studio — Estilos personalizados
   Complementa las utilidades de Tailwind CSS (cargado vía CDN en index.html)
   ========================================================================== */

/* ===== BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0D1B2E;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 214, 0, 0.5), rgba(0, 229, 199, 0.4));
    border-radius: 3px;
}

/* ===== GLASS ===== */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== HERO GRADIENT===== */
.hero-gradient {
    background: radial-gradient(circle at top right, rgba(26, 74, 138, 0.35), transparent 50%),
        radial-gradient(circle at bottom left, rgba(255, 214, 0, 0.1), transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(0, 229, 199, 0.08), transparent 45%);
}

/* ===== AURORA ===== */
.aurora-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
    mix-blend-mode: screen;
}
.aurora-blob-1 {
    width: 42vw;
    height: 42vw;
    max-width: 640px;
    max-height: 640px;
    top: -12%;
    right: -8%;
    background: radial-gradient(circle, rgba(0, 229, 199, 0.55), transparent 70%);
    animation: driftA 26s ease-in-out infinite alternate;
}
.aurora-blob-2 {
    width: 34vw;
    height: 34vw;
    max-width: 520px;
    max-height: 520px;
    bottom: -14%;
    left: -6%;
    background: radial-gradient(circle, rgba(255, 214, 0, 0.35), transparent 70%);
    animation: driftB 32s ease-in-out infinite alternate;
}
.aurora-blob-3 {
    width: 28vw;
    height: 28vw;
    max-width: 420px;
    max-height: 420px;
    top: 30%;
    left: 40%;
    background: radial-gradient(circle, rgba(124, 108, 255, 0.30), transparent 70%);
    animation: driftC 22s ease-in-out infinite alternate;
}
@keyframes driftA {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(-6%, 8%) scale(1.15);
    }
}
@keyframes driftB {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(8%, -6%) scale(1.1);
    }
}
@keyframes driftC {
    0% {
        transform: translate(0, 0) scale(0.9);
    }
    100% {
        transform: translate(-10%, -10%) scale(1.2);
    }
}

/* ===== SPOTLIGHT ===== */
.spotlight {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(600px circle at var(--x, 50%) var(--y, 30%), rgba(255, 214, 0, 0.10), transparent 60%);
    transition: background 0.2s ease;
}

/* ===== GRADIENT TEXT ANIM ===== */
.gradient-text-anim {
    background: linear-gradient(90deg, #FFD600, #e5e100, #FFD600);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 6s linear infinite;
}
.gradient-text-anim2 {
    background: linear-gradient(90deg, #FFD600, #eaff31, #FFD600);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 6s linear infinite;
}
@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* ===== NORMAL CARD WITHOUT TILT ===== */
.normal-card {
    transition: box-shadow 0.3s ease;
}
.normal-card:hover {
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.55);
}
/* ===== NORMAL CARD PARA IMAGENES 4:5 con ajuste de tamaño de imagen ===== */

.normal-card2 {
    aspect-ratio: 4/5;
    transition: box-shadow 0.3s ease;
}
/* ===== TILT / 3D ===== */
.tilt-container {
    perspective: 1200px;
}
.tilt-container2 {
    perspective: 9600px;
}
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    will-change: transform;
}
.tilt-card>* {
    transform: translateZ(0);
}
.tilt-glow {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 214, 0, 0.18), transparent 65%);
    pointer-events: none;
    z-index: 1;
}
.tilt-card:hover .tilt-glow {
    opacity: 1;
}
@media (max-width: 767px) {
    .tilt-card {
        transform: none !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .tilt-card {
        transform: none !important;
        transition: none;
    }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-stagger.revealed {
    transition-delay: var(--delay, 0ms);
}

/* ===== REVEAL WITH SCALE ===== */
.reveal-scale {
    opacity: 0;
    transform: scale(0.85) translateY(30px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ===== REVEAL ROTATE ===== */
.reveal-rotate {
    opacity: 0;
    transform: rotateY(-15deg) translateX(-30px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-rotate.revealed {
    opacity: 1;
    transform: rotateY(0) translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-scale,
    .reveal-rotate {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== FLOATING ===== */
.float-anim {
    animation: levitate 5s ease-in-out infinite;
}
.float-anim-delay {
    animation: levitate 5s ease-in-out infinite;
    animation-delay: 1.2s;
}
@keyframes levitate {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(-1deg);
    }
}
@media (prefers-reduced-motion: reduce) {

    .float-anim,
    .float-anim-delay {
        animation: none;
    }
}  

/* ===== MARQUEE ===== */
.marquee-mask {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    overflow: hidden;
}
.marquee-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: -moz-max-content;
    width: max-content;
    animation: marquee 30s linear infinite;
    will-change: transform;
    /* ===== velocidad: ajusta la duración (segundos) para más o menos rapidez ===== */

}

/* Layout del grupo de logos escrito a mano (no depende de las utilidades
   de Tailwind flex/gap/shrink, por si el bundle purgado no las incluye) */
.logo-ca {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
    column-gap: 2.5rem; /* equivalente a gap-x-10 */
    padding-left: 2.5rem; /* equivalente a pl-10 */
}
@media (min-width: 640px) {
    .logo-ca {
        column-gap: 3.5rem; /* equivalente a sm:gap-x-14 */
        padding-left: 3.5rem; /* equivalente a sm:pl-14 */
    }
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    /* Desplaza exactamente el 50% de la pista (un grupo de logos completo), dejando el segundo grupo idéntico en su lugar para el loop infinito */
    transform: translateX(-50%);
  }
}

/* ===== HERO IMAGE BOX ===== */
.hero-image-box {
    position: relative;
    width: 80%;
    aspect-ratio: 4/5;
    max-height: 700px;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #08111D;
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
}
.hero-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.7;
}

/* ===== NAVBAR ===== */
#navbar {
    transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
#navbar.scrolled {
    background: rgba(8, 17, 29, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(0, 229, 199, 0.15);
}
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FFD600;
    border-radius: 1px;
    transition: width 0.25s ease;
}
.nav-link:hover {
    color: #fff;
}
.nav-link:hover::after {
    width: 100%;
}

/* ===== HAMBURGER ===== */
.hamburger-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}
#mobile-menu-btn.open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#mobile-menu-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#mobile-menu-btn.open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 1.5rem;
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
    transform: translateY(-100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
#mobile-menu.open {
    transform: translateY(0);
    pointer-events: auto;
}
.mobile-nav-link {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}
#mobile-menu.open .mobile-nav-link:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.12s;
}
#mobile-menu.open .mobile-nav-link:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.19s;
}
#mobile-menu.open .mobile-nav-link:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.26s;
}
#mobile-menu.open .mobile-nav-link:nth-child(4) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.33s;
}

/* ===== FLOATING WHATSAPP ===== */
#float-wa {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: waPulse 2.4s ease-in-out infinite;
}
#float-wa:hover {
    transform: scale(1.08);
}
@keyframes waPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
    }
}

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== DOT GRID ===== */
.dot-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 35%, transparent 100%);
}

/* ===== BLOBS REUTILIZABLES ===== */
.blob-tl {
    top: -10%;
    left: -8%;
    width: 32vw;
    height: 32vw;
    max-width: 480px;
    max-height: 480px;
    animation: driftA 28s ease-in-out infinite alternate;
}
.blob-br {
    bottom: -12%;
    right: -8%;
    width: 30vw;
    height: 30vw;
    max-width: 460px;
    max-height: 460px;
    animation: driftB 30s ease-in-out infinite alternate;
}
.blob-mid {
    top: 15%;
    left: 55%;
    width: 24vw;
    height: 24vw;
    max-width: 380px;
    max-height: 380px;
    animation: driftC 24s ease-in-out infinite alternate;
}

/* ===== PARALLAX ===== */
.parallax-layer {
    will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
    .parallax-layer {
        transform: none !important;
    }
}

/* ===== ICON 3D ===== */
.icon-3d {
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease;
}
.group:hover .icon-3d {
    transform: translateZ(46px) scale(1.08) rotate(-4deg);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.55);
}

/* ===== CAROUSEL ABOUT ===== */
#carousel-track {
    display: flex;
    will-change: transform;
    transition: transform 700ms cubic-bezier(0.65, 0, 0.35, 1);
}
.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
}
.carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    height: 560px;
}
@media (max-width: 768px) {
    #carousel-wrapper {
        height: 320px;
    }
}

/* ===== Logos para el carrusel con max de tamaño===== */
.logo-ca img {
    width: auto;
    max-width: 160px;
    flex-shrink: 0;
}

/* Clase personalizada para limitar y autoajustar los logos del carrusel */
.logo-auto-fit {
    height: 5rem; /* antes 3.5rem (56px) → ahora 80px en móvil */
    width: auto;
    max-width: 260px; /* antes 200px, subido para que no se recorte al agrandar la altura */
    flex-shrink: 0; /* evita que se compriman de forma distinta entre las dos copias del loop */
    object-fit: contain; /* equivalente a object-contain */
    opacity: 0.7; /* equivalente a opacity-70 */
    transition: opacity 0.3s ease;
}
.logo-auto-fit:hover {
    opacity: 1; /* equivalente a hover:opacity-100 */
}
@media (min-width: 640px) {
    .logo-auto-fit {
        height: 6.5rem; /* antes 4.5rem (72px) → ahora 104px en escritorio */
    }
}

/* ===== TRABAJOS CARRUSEL ===== */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ===== CURSOR PERSONALIZADO ===== */
.custom-cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 214, 0, 0.25);
    backdrop-filter: blur(1px);
    border: 1.5px solid rgba(255, 214, 0, 0.5);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s, border-color 0.2s;
    will-change: transform;
    display: none;
}
.custom-cursor.active {
    display: block;
}
.custom-cursor.hover {
    width: 18px;
    height: 18px;
    background: rgba(255, 214, 0, 0.08);
    border-color: rgba(255, 213, 0, 0.8);
}
/* ===== Eliminar cursor predeterminado ===== */
body {
    cursor: none;
}

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFD600, #ffff18, #ffff60);
    z-index: 100;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 12px rgba(255, 214, 0, 0.3);
}

/* ===== ANIMATED GRADIENT BORDER (cards) ===== */
.gradient-border {
    position: relative;
    border-radius: 1.5rem;
    background-clip: padding-box;
    border: 1px solid transparent;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 214, 0, 0.4), rgba(0, 229, 199, 0.4), rgba(255, 111, 94, 0.4), rgba(255, 214, 0, 0.4));
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: borderFlow 6s ease-in-out infinite alternate;
}
@keyframes borderFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .gradient-border::before {
        animation: none;
    }
}


/* ===== BOTÓN CON EFECTO SHAKE ===== */
.btn-shake:hover {
    animation: shake 0.4s ease-in-out;
}
@keyframes shake {
    0%,
    100% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(-4deg);
    }
    40% {
        transform: rotate(4deg);
    }
    60% {
        transform: rotate(-2deg);
    }
    80% {
        transform: rotate(2deg);
    }
}

/* ===== MESH ANIMATED ===== */
.mesh-animated {
    background: radial-gradient(circle at 20% 20%, rgba(0, 229, 199, 0.18), transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(255, 214, 0, 0.14), transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(124, 108, 255, 0.16), transparent 50%);
    background-size: 180% 180%;
    animation: meshMove 18s ease-in-out infinite alternate;
}
@keyframes meshMove {
    100% {
        background-position: 100% 40%;
    }
}

/* ===== FOOTER GLOW BORDER ===== */
@keyframes borderFlowFooter {
    100% {
        background-position: 0% 0%, 200% 0%;
    }
}
.footer-glow-border {
    background-size: 100% 100%, 200% 100%;
    animation: borderFlowFooter 8s linear infinite;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1023px) {
    .floating-badge {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .aurora-blob,
    .float-anim,
    .float-anim-delay,
    .marquee-track,
    .gradient-text-anim,
    .mesh-animated,
    .footer-glow-border,
    .gradient-border::before {
        animation: none !important;
    }
    .custom-cursor {
        display: none !important;
    }
    #scroll-progress {
        display: none;
    }
    .tilt-card {
        transform: none !important;
        transition: none !important;
    }
    .reveal,
    .reveal-scale,
    .reveal-rotate {
        opacity: 1;
        transform: none !important;
        transition: none !important;
    }
}