/*
 * Restofy Pro - Landing page
 * Clases custom con prefijo .ui-
 */

/* Reveal on scroll */
.js-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fondo premium del hero: aurora suave de gradientes radiales, sin cuadrícula */
.ui-hero-aura {
    background:
        radial-gradient(ellipse 55% 45% at 50% -6%, rgba(255, 69, 0, 0.13), transparent 60%),
        radial-gradient(ellipse 42% 42% at 84% 6%, rgba(56, 130, 246, 0.10), transparent 60%),
        radial-gradient(ellipse 45% 45% at 12% 20%, rgba(255, 140, 80, 0.08), transparent 60%);
    -webkit-mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 55%, transparent 100%);
    mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 55%, transparent 100%);
    animation: ui-aura-drift 16s ease-in-out infinite;
}

.dark .ui-hero-aura {
    background:
        radial-gradient(ellipse 55% 45% at 50% -6%, rgba(255, 69, 0, 0.20), transparent 60%),
        radial-gradient(ellipse 42% 42% at 84% 6%, rgba(56, 130, 246, 0.15), transparent 60%),
        radial-gradient(ellipse 45% 45% at 12% 20%, rgba(255, 140, 80, 0.11), transparent 60%);
}

@keyframes ui-aura-drift {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-16px) scale(1.03); }
}

/* Texto con gradiente premium */
.ui-gradient-text {
    background: linear-gradient(120deg, #FF4500 0%, #ff743f 50%, #ff9a6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Borde con glow para el mockup del dispositivo */
.ui-device-frame {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 40px 80px -20px rgba(0, 0, 0, 0.35),
        0 0 60px -10px rgba(255, 69, 0, 0.15);
}

/* Marco de teléfono realista para los mockups de la landing (proporción real, no un cuadrado) */
.ui-phone-frame {
    aspect-ratio: 9 / 19.5;
    position: relative;
}

.ui-phone-frame::before,
.ui-phone-frame::after {
    content: "";
    position: absolute;
    right: -2px;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: inherit;
}

.ui-phone-frame::before {
    top: 5.5rem;
    height: 3rem;
}

.ui-phone-frame::after {
    top: 9.25rem;
    height: 4.5rem;
}

.ui-phone-notch {
    position: absolute;
    top: 0.85rem;
    left: 50%;
    transform: translateX(-50%);
    width: 5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background-color: #05060a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 3;
}

.ui-phone-screen {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.ui-phone-content {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.ui-phone-content::-webkit-scrollbar {
    display: none;
}

.ui-phone-statusbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Marquee de modulos: dos filas en sentidos opuestos, con desvanecido en los bordes */
.ui-marquee {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

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

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

/* Duracion base (fallback). El JS la ajusta por ancho real para que las 3
   filas avancen a la misma velocidad en px/seg. */
.ui-marquee-track {
    animation: ui-marquee 70s linear infinite;
}

.ui-marquee-track-reverse {
    animation: ui-marquee-reverse 70s linear infinite;
}

.ui-marquee-track-slow {
    animation: ui-marquee 70s linear infinite;
}

/* Offset de anclas para que el header sticky no tape el titulo de seccion */
.ui-anchor {
    scroll-margin-top: 88px;
}

/* Bandera de Colombia como moneda circular: reemplaza al chip rectangular */
.ui-flag-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: linear-gradient(to bottom, #FCD116 0 50%, #003893 50% 75%, #CE1126 75% 100%);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.10), 0 1px 3px rgba(15, 23, 42, 0.18);
    flex-shrink: 0;
}

.dark .ui-flag-badge {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ===== Icono de WhatsApp dentro de un boton neutro ===== */
.ui-wa-icon {
    color: #25D366;
}

/* ===== Entidades del ecosistema ===== */
/* Franja blanca en claro y oscuro: los logos van a color y varios tienen
   tinta negra, sobre fondo oscuro desaparecerian. */
.ui-brand-card {
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px -16px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(15, 23, 42, 0.07);
}

.ui-brand-viewport {
    display: flex;
    align-items: center;
}

.ui-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    flex: 1 0 auto;
    min-width: 100%;
}

/* En desktop entran los 8 en una sola linea: la copia sobra */
.ui-brand-row-clone {
    display: none;
}

.ui-brand {
    width: auto;
    flex-shrink: 0;
}

/* Altura optica por logotipo: los wordmarks anchos pesan mas que los apilados */
.ui-brand-dian { height: 22px; }
.ui-brand-bancolombia { height: 23px; }
.ui-brand-nequi { height: 18px; }
.ui-brand-wompi { height: 19px; }
.ui-brand-acodres { height: 21px; }
.ui-brand-impulsa { height: 26px; }
.ui-brand-aws { height: 26px; }
.ui-brand-google { height: 15px; }

/* Movil: la fila no entra completa, se desplaza sola en bucle */
@media (max-width: 767px) {
    .ui-brand-viewport {
        width: 100%;
        overflow: hidden;
    }

    .ui-brand-row {
        justify-content: flex-start;
        gap: 2rem;
        min-width: max-content;
        padding-right: 2rem;
        animation: ui-brand-scroll 26s linear infinite;
    }

    .ui-brand-row-clone {
        display: flex;
    }
}

@keyframes ui-brand-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .ui-brand-row {
        animation: none;
    }
}

/* ===== WhatsApp: colores de marca para el mockup de alertas ===== */
.ui-wa-header {
    background: #128C7E;
}

.ui-wa-bg {
    background: #ECE5DD;
}

.dark .ui-wa-bg {
    background: #1f1f23;
}

/* Ticks de "leido" (azul WhatsApp) */
.ui-wa-tick {
    color: #34B7F1;
}

/* Verde WhatsApp para acentos: mas oscuro en claro (contraste), brillante en oscuro */
.ui-wa-text {
    color: #059669;
}

.dark .ui-wa-text {
    color: #25D366;
}

/* Chip/badge con identidad WhatsApp */
.ui-wa-chip {
    background: rgba(37, 211, 102, 0.14);
    color: #0f766e;
    border: 1px solid rgba(37, 211, 102, 0.30);
}

.dark .ui-wa-chip {
    color: #4ade80;
}

/* Glow verde ambiental de la seccion (mas sutil en claro) */
.ui-wa-glow {
    background: rgba(37, 211, 102, 0.12);
}

.dark .ui-wa-glow {
    background: rgba(37, 211, 102, 0.18);
}

/* Icono flotante suave verde */
.ui-wa-brand-soft {
    background: rgba(37, 211, 102, 0.15);
    color: #128C7E;
}

.dark .ui-wa-brand-soft {
    color: #4ade80;
}

/* Cajitas de icono por tipo de alerta */
.ui-wa-danger {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
}

.ui-wa-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.ui-wa-info {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

/* ===== Avatares de testimonios (iniciales, sin foto) ===== */
.ui-av-1 { background: #334155; }
.ui-av-2 { background: #FF4500; }
.ui-av-3 { background: #0f766e; }
.ui-av-4 { background: #4f46e5; }

/* Respeta usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    .js-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .ui-hero-aura {
        animation: none;
    }
    .ui-marquee-track,
    .ui-marquee-track-reverse,
    .ui-marquee-track-slow {
        animation: none;
    }
}

/* ===== Mocks de funcionalidades (apps/page/mocks) ===== */

/* Plano del salon: cuadricula de puntos como piso */
.ui-mock-grid {
    background-image: radial-gradient(rgba(107, 114, 128, 0.18) 1px, transparent 1px);
    background-size: 16px 16px;
}

.dark .ui-mock-grid {
    background-image: radial-gradient(rgba(156, 163, 175, 0.12) 1px, transparent 1px);
}

/* Mini mapa: cuadricula de calles */
.ui-mock-map {
    background-image:
        linear-gradient(rgba(107, 114, 128, 0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 114, 128, 0.10) 1px, transparent 1px);
    background-size: 24px 24px;
}

.dark .ui-mock-map {
    background-image:
        linear-gradient(rgba(156, 163, 175, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(156, 163, 175, 0.08) 1px, transparent 1px);
}

/* Flecha del traslado: se desliza suave de origen a destino */
@keyframes ui-mock-arrow {
    0%, 100% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
}

.ui-mock-arrow {
    animation: ui-mock-arrow 1.6s ease-in-out infinite;
}

/* Anillo de margen: el porcentaje llega en --ui-pct */
.ui-mock-ring {
    background: conic-gradient(#10b981 calc(var(--ui-pct, 0) * 1%), rgba(107, 114, 128, 0.15) 0);
}

/* Tirilla termica: borde inferior dentado como papel cortado */
.ui-mock-ticket {
    clip-path: polygon(
        0 0, 100% 0, 100% calc(100% - 8px),
        95% 100%, 90% calc(100% - 8px), 85% 100%, 80% calc(100% - 8px), 75% 100%,
        70% calc(100% - 8px), 65% 100%, 60% calc(100% - 8px), 55% 100%, 50% calc(100% - 8px),
        45% 100%, 40% calc(100% - 8px), 35% 100%, 30% calc(100% - 8px), 25% 100%,
        20% calc(100% - 8px), 15% 100%, 10% calc(100% - 8px), 5% 100%, 0 calc(100% - 8px)
    );
}

/* Escenario donde se apoya cada mock en la pagina de funcionalidades */
.ui-mock-stage {
    background-image: radial-gradient(rgba(255, 69, 0, 0.12) 1px, transparent 1px);
    background-size: 22px 22px;
}
