/* Scroll suave */
html {
    scroll-behavior: smooth;
}

:root {
    --color-background: #131313;
    --color-outline-variant: #444748;
    --color-secondary-fixed: #007bff;
    --color-blue-300: #93c5fd;
    --color-white: #ffffff;
}

/* Fuente serif para textos descriptivos grandes */
.text-serif {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    letter-spacing: -0.01em;
}

/* Fuente serif para textos de cards y cuerpo */
.text-serif-body {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: normal;
    letter-spacing: -0.005em;
}

/* Fuente editorial para frases de impacto y CTAs */
.text-editorial {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* Bordes y fondos tipo glassmorphism y diseño futurista global */
.neo-border {
    background: rgb(59 130 246 / 0.5) !important;
    border: 1px solid rgba(147, 197, 253, 0.15) !important;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 0 -10px 20px rgba(147, 197, 253, 0.05) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

/* Spotlight and Revealing Border */
.neo-border::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
        500px circle at var(--mouse-x, -600px) var(--mouse-y, -600px), 
        rgba(147, 197, 253, 0.6),
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.neo-border:hover::after {
    opacity: 1;
}

.neo-border > * {
    position: relative;
    z-index: 1;
}

.neo-border::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        800px circle at var(--mouse-x, -600px) var(--mouse-y, -600px), 
        rgba(147, 197, 253, 0.08),
        transparent 40%
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.neo-border:hover::before {
    opacity: 1;
}

.neo-glass {
    background-color: transparent;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: auto;
}

/* Barra de progreso en la navbar */
.progress-rail {
    width: 100%;
    height: 3px;
    background-color: var(--color-outline-variant);
    position: absolute;
    left: 0;
    bottom: 0;
    opacity: 0.3;
}

.progress-rail-active {
    height: 3px;
    background-color: var(--color-secondary-fixed);
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px var(--color-secondary-fixed);
}

/* Efecto de brillo al pasar el cursor */
.glow-card {
    position: relative;
    overflow: hidden;
}

.glow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(
        600px circle at var(--mouse-x, -600px) var(--mouse-y, -600px), 
        rgba(255, 255, 255, 0.08),
        transparent 40%
    );
    z-index: 1;
    transition: opacity 0.3s;
    opacity: 0;
}

.glow-card:hover .glow-overlay {
    opacity: 1;
}

/* Animaciones al aparecer en pantalla */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Retrasos para las animaciones */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* Contenedores del scroll horizontal */
@media (min-width: 768px) {
    .horizontal-scroll-wrapper {
        height: calc(400vw + 200vh + 100px);
        position: relative;
    }

    .horizontal-scroll-container {
        position: sticky;
        top: 100px; 
        height: calc(100vh - 100px);
        width: 500vw;
        display: flex;
        flex-wrap: nowrap;
        will-change: transform;
    }

    .horizontal-section {
        width: 100vw;
        height: 100%;
        flex-shrink: 0;
            overflow: hidden;
        /* Sin bordes entre paneles */
        border: none !important;
    }
    
    .horizontal-section::-webkit-scrollbar {
        display: none;
    }
    .horizontal-section {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* Aparición del contenido de los paneles */
.panel-content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel-content.delay-1 { transition-delay: 0.15s; }
.panel-content.delay-2 { transition-delay: 0.3s; }
.panel-content.delay-3 { transition-delay: 0.45s; }

/* Elementos decorativos flotantes */
.floating-element {
    position: absolute;
    pointer-events: none;
    opacity: 0.06;
    z-index: 0;
    animation: floatOrbit 8s ease-in-out infinite;
}

.floating-element.alt {
    animation: floatOrbitAlt 10s ease-in-out infinite;
}

.floating-element.slow {
    animation: floatOrbit 14s ease-in-out infinite;
}

@keyframes floatOrbit {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, -35px) rotate(-3deg); }
    75% { transform: translate(20px, -15px) rotate(4deg); }
}

@keyframes floatOrbitAlt {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, 15px) rotate(-5deg); }
    66% { transform: translate(15px, 25px) rotate(3deg); }
}

/* Punto de disponibilidad */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981; 
    display: inline-block;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Cascada vertical de tarjetas */
.waterfall-container {
    height: clamp(320px, 50vh, 520px);
    overflow: hidden;
    position: relative;
    /* Desvanece los bordes para el efecto infinito */
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.waterfall-track {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    will-change: transform;
}

.code-module {
    background: rgb(59 130 246 / 0.5);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 20px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 0 -10px 20px rgba(147, 197, 253, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Spotlight and Revealing Border */
.code-module::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
        500px circle at var(--mouse-x, -600px) var(--mouse-y, -600px), 
        rgba(147, 197, 253, 0.6),
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.code-module:hover::after {
    opacity: 1;
}

.code-module > * {
    position: relative;
    z-index: 1;
}

.code-module::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        800px circle at var(--mouse-x, -600px) var(--mouse-y, -600px), 
        rgba(147, 197, 253, 0.08),
        transparent 40%
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.code-module:hover::before {
    opacity: 1;
}

section {
    scroll-margin-top: 85px; /* Navbar height (~60px) + ~15px gap + padding */
}

.code-module-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animación del carrusel de tecnologías */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 25%, black 75%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 25%, black 75%, transparent);
}

.marquee-content {
    display: inline-flex;
}

/* Indicador de scroll animado */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 20;
}

.scroll-indicator:hover {
    opacity: 1;
}

.mouse-body {
    width: 24px;
    height: 36px;
    border: 2px solid var(--color-outline-variant);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background-color: var(--color-white);
    border-radius: 2px;
    margin-top: 6px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* Estilos del botón del panel 5 */

/* Animación del borde con gradiente */
.animate-gradient {
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Botón holográfico */
.holo-btn {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.holo-btn-trigger {
    position: relative;
    overflow: hidden;
}

.holo-btn-trigger::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.holo-btn-trigger:hover::after {
    transform: translateX(100%);
}

/* iOS: evita zoom automático al focus (requiere font-size ≥ 16px) */
input, textarea, select {
    font-size: 16px;
}

/* Hover de las chips */
.glass-chip {
    transition: all 0.3s ease;
    cursor: default;
}

.glass-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 767px) {
    .horizontal-scroll-wrapper,
    .horizontal-scroll-container {
        height: auto !important;
        width: 100% !important;
        position: static !important;
        display: block !important;
        transform: none !important;
        will-change: auto !important;
    }

    .horizontal-section {
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
        flex-shrink: 1 !important;
    }

    .mobile-carousel {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 16px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 12px;
        padding-inline: calc(50vw - clamp(115px, 36vw, 160px)) !important;
        align-items: stretch;
    }

    .mobile-carousel::-webkit-scrollbar {
        display: none;
    }

    .mobile-carousel:not(.mobile-carousel-hero) > * {
        flex: 0 0 clamp(230px, 72vw, 320px) !important;
        max-width: clamp(230px, 72vw, 320px) !important;
        scroll-snap-align: center;
    }

    .mobile-carousel-wide > * {
        flex-basis: clamp(250px, 80vw, 360px) !important;
        max-width: clamp(250px, 80vw, 360px) !important;
    }

    .mobile-carousel-hero .waterfall-track {
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
        width: max-content;
    }

    .mobile-carousel-hero {
        display: block !important;
    }

    .mobile-carousel-hero .code-module {
        flex: 0 0 clamp(220px, 72vw, 300px);
        max-width: clamp(220px, 72vw, 300px);
        scroll-snap-align: start;
    }



    .waterfall-container {
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent) !important;
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent) !important;
        background: transparent !important;
    }

    .mobile-carousel-hero,
    .mobile-carousel-hero .waterfall-container {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        scroll-snap-type: none !important;
        padding-inline: 0 !important;
    }

    .mobile-carousel-hero .waterfall-track {
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
        width: max-content;
    }

    .mobile-carousel > .group,
    .mobile-carousel > a,
    .mobile-carousel > div:not(.waterfall-track),
    .mobile-carousel > section {
        border-radius: 28px;
        box-shadow:
            0 20px 42px rgba(0, 0, 0, 0.30),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        background: rgb(59 130 246 / 0.5) !important;
        border: 1px solid rgba(147, 197, 253, 0.18);
    }

    .mobile-carousel > .group.carousel-reveal,
    .mobile-carousel > a.carousel-reveal,
    .mobile-carousel > div:not(.waterfall-track).carousel-reveal,
    .mobile-carousel > section.carousel-reveal {
        opacity: 0.32;
        transform: translateY(12px) scale(0.965);
        filter: saturate(0.85);
        transition:
            opacity 0.55s ease,
            transform 0.55s ease,
            filter 0.55s ease;
    }

    .mobile-carousel > .group.carousel-reveal.is-visible,
    .mobile-carousel > a.carousel-reveal.is-visible,
    .mobile-carousel > div:not(.waterfall-track).carousel-reveal.is-visible,
    .mobile-carousel > section.carousel-reveal.is-visible {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: saturate(1);
    }

    .mobile-carousel .p-6,
    .mobile-carousel .p-8,
    .mobile-carousel .p-10 {
        padding: 16px !important;
    }

    .mobile-carousel h3,
    .mobile-carousel h4 {
        font-size: 1.125rem !important;
        line-height: 1.15 !important;
        margin-bottom: 0.65rem !important;
    }

    .mobile-carousel p {
        font-size: 0.84rem !important;
        line-height: 1.42 !important;
    }

    .mobile-carousel .text-5xl,
    .mobile-carousel .text-6xl,
    .mobile-carousel .text-7xl {
        font-size: clamp(2rem, 11vw, 3rem) !important;
        line-height: 0.95 !important;
    }

    .mobile-carousel .material-symbols-outlined {
        font-size: 19px !important;
    }

    .mobile-carousel .w-11,
    .mobile-carousel .w-12,
    .mobile-carousel .w-16 {
        width: 2rem !important;
        height: 2rem !important;
    }

    .mobile-carousel .rounded-2xl,
    .mobile-carousel .rounded-xl,
    .mobile-carousel .rounded-lg {
        border-radius: 20px !important;
    }

    .mobile-carousel-wide > * p {
        font-size: 0.9rem !important;
    }

    .mobile-carousel-wide > * h3,
    .mobile-carousel-wide > * h4 {
        font-size: 1.2rem !important;
    }

    .mobile-contact-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px !important;
        margin-bottom: 3rem !important;
    }

    .mobile-contact-grid > * {
        min-width: 0;
        border-radius: 20px !important;
        padding: 12px 10px !important;
        text-align: center;
        box-shadow:
            0 12px 28px rgba(0, 0, 0, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .mobile-contact-grid > * .material-symbols-outlined {
        font-size: 1.3rem !important;
        margin-bottom: 0.35rem !important;
    }

    .mobile-contact-grid > * .text-xs {
        font-size: 0.65rem !important;
        line-height: 1.1 !important;
        margin-bottom: 0.15rem !important;
    }

    .mobile-contact-grid > * .text-sm {
        font-size: 0.7rem !important;
        line-height: 1.15 !important;
        word-break: break-word;
    }

    .mobile-rail-nav {
        position: fixed;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 60;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px 8px;
        border-radius: 999px;
        background: rgba(10, 10, 15, 0.76);
        border: 1px solid rgba(147, 197, 253, 0.18);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
    }

    .mobile-rail-item {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: rgba(255, 255, 255, 0.45);
        background: transparent;
        border: 1px solid transparent;
        transition: all 0.25s ease;
    }

    .mobile-rail-item .material-symbols-outlined {
        font-size: 18px !important;
    }

    .mobile-rail-item.active {
        color: #93c5fd;
        background: #0a0a0f;
        border-color: rgba(147, 197, 253, 0.25);
        box-shadow: 0 0 0 6px rgba(147, 197, 253, 0.06);
    }

    .mobile-rail-item:active {
        transform: scale(0.96);
    }

    @keyframes heroDemoDrift {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(-10px); }
    }

    @keyframes demoShimmer {
        0% { transform: translateX(-120%); }
        45% { transform: translateX(120%); }
        100% { transform: translateX(120%); }
    }

    @keyframes pulseMobileBtn {
        0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
        50% { transform: scale(1.02); box-shadow: 0 0 15px 5px rgba(59, 130, 246, 0.2); }
    }

    .holo-btn-trigger {
        animation: pulseMobileBtn 2s infinite ease-in-out;
    }
}

/* Ajuste de contraste para los textos en tarjetas */
.neo-border p, 
.neo-border span, 
.neo-border h3, 
.neo-border h4,
.code-module p, 
.code-module span, 
.code-module h3, 
.code-module h4 {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.neo-border [class*="text-blue-100"],
.neo-border [class*="text-blue-300"],
.neo-border [class*="text-blue-400"] {
    color: #ffffff !important;
}





/* --- Mini-Web Industry Styles --- */

/* Shared dark base for all mini-webs */
.code-module {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
}

/* 1. Luxury Real Estate */
.mini-luxury {
    background: linear-gradient(160deg, #0c0c0e 0%, #141418 100%) !important;
}
.text-gold { color: #c9a96e; }
.bg-gold { background: #c9a96e; }
.border-gold { border-color: #c9a96e; }

/* 2. Artisan Coffee */
.mini-coffee {
    background: linear-gradient(160deg, #0e0c0a 0%, #1a1510 100%) !important;
}
.text-bean { color: #a0764a; }
.bg-bean { background: #a0764a; }

/* 3. High-Performance Gym */
.mini-gym {
    background: linear-gradient(160deg, #0c0c0c 0%, #1a0a0a 100%) !important;
}
.text-gym-red { color: #c43030; }
.bg-gym-red { background: #c43030; }

/* 4. Creative Agency */
.mini-agency {
    background: linear-gradient(160deg, #08081a 0%, #0f1029 100%) !important;
}
.text-agency-accent { color: #6d8cff; }
.bg-agency-accent { background: #6d8cff; }

/* 5. Health & Wellness */
.mini-health {
    background: linear-gradient(160deg, #080f0e 0%, #0c1a18 100%) !important;
}
.text-health-teal { color: #3db8a0; }
.bg-health-teal { background: #3db8a0; }

/* 6. Futuristic SaaS */
.mini-saas {
    background: linear-gradient(160deg, #08080f 0%, #10101e 100%) !important;
}
.text-saas-neon { color: #7c8cf4; }
.bg-saas-neon {
    background: #7c8cf4;
    box-shadow: none;
}

/* 7. Law Firm */
.mini-law {
    background: linear-gradient(160deg, #0a0d14 0%, #12161e 100%) !important;
}

/* 8. Architecture */
.mini-arch {
    background: linear-gradient(160deg, #0c0c0c 0%, #161616 100%) !important;
}
.mini-arch .text-dark-custom { color: #e0e0e0 !important; }
.bg-dark-custom { background: #e0e0e0; }

/* Glass effect */
.mini-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
