/*
 * 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;
}

/* ===== 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;
}

/* ===== Banderas de pais dibujadas con CSS (sin imagen ni emoji) ===== */
.ui-flag {
    display: inline-block;
    width: 20px;
    height: 14px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

/* Colombia: amarillo (mitad) / azul / rojo */
.ui-flag-co {
    background: linear-gradient(to bottom, #FCD116 0 50%, #003893 50% 75%, #CE1126 75% 100%);
}

/* Venezuela: amarillo / azul / rojo en tercios */
.ui-flag-ve {
    background: linear-gradient(to bottom, #FFCC00 0 33.33%, #00247D 33.33% 66.66%, #CF142B 66.66% 100%);
}

/* Ecuador: amarillo (mitad) / azul / rojo */
.ui-flag-ec {
    background: linear-gradient(to bottom, #FFDD00 0 50%, #034EA2 50% 75%, #ED1C24 75% 100%);
}

/* Mexico: verde / blanco / rojo en franjas verticales */
.ui-flag-mx {
    background: linear-gradient(to right, #006847 0 33.33%, #ffffff 33.33% 66.66%, #CE1126 66.66% 100%);
}

/* Rep. Dominicana: cuadrantes azul/rojo con cruz blanca */
.ui-flag-do {
    background:
        linear-gradient(#fff, #fff) center / 100% 28% no-repeat,
        linear-gradient(#fff, #fff) center / 26% 100% no-repeat,
        conic-gradient(from 0deg at 50% 50%, #CE1126 0 25%, #002D62 0 50%, #CE1126 0 75%, #002D62 0 100%);
}

/* ===== 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;
    }
}
