/* ============================================================
   FAMTECTOR · CAPA VISUAL "PRO" (animaciones y acabados)
   ------------------------------------------------------------
   Se carga DESPUÉS de los estilos de cada página. No reemplaza
   nada: solo añade efectos (partículas, auroras, brillos,
   revelado al hacer scroll, inclinación 3D) y refina detalles.
   Para desactivarla basta con quitar el <link> y el <script>
   de famtector-pro.* en la plantilla.
   ============================================================ */

:root {
    --ft-glow: rgba(249, 115, 22, 0.45);
    --ft-glow-suave: rgba(249, 115, 22, 0.18);
}

/* ---------- Fondo animado global (auroras + cuadrícula) ---------- */
.ft-bg-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.ft-aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.22;
    will-change: transform;
}
.ft-aurora-1 { width: 520px; height: 520px; top: -12%; left: 8%; background: #f97316; animation: ft-deriva-1 22s ease-in-out infinite alternate; }
.ft-aurora-2 { width: 560px; height: 560px; bottom: -10%; right: 4%; background: #c2410c; opacity: 0.16; animation: ft-deriva-2 26s ease-in-out infinite alternate; }
.ft-aurora-3 { width: 380px; height: 380px; top: 45%; left: 55%; background: #10b981; opacity: 0.07; animation: ft-deriva-1 30s ease-in-out infinite alternate-reverse; }
@keyframes ft-deriva-1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.12); } }
@keyframes ft-deriva-2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-50px, -30px) scale(1.08); } }

.ft-grid-layer {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
            mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- Partículas del hero ---------- */
.hero { position: relative; }
.hero > .hero-content, .hero > .hero-visual { position: relative; z-index: 1; }
.ft-particles {
    position: absolute;
    top: -4rem;
    bottom: -3rem;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
            mask-image: linear-gradient(180deg, #000 70%, transparent);
}

/* ---------- Brillo que sigue al cursor (solo escritorio) ---------- */
.ft-cursor-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.10) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    left: -500px;
    top: -500px;
    transition: opacity 0.3s ease;
}

/* ---------- Barra de progreso de lectura ---------- */
.ft-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, #f97316, #fb923c, #fdba74);
    box-shadow: 0 0 12px var(--ft-glow);
    z-index: 2000;
    pointer-events: none;
}

/* ---------- Header: sombra al hacer scroll + línea brillante ---------- */
.header, .legal-header { transition: box-shadow 0.3s ease, background 0.3s ease; }
.header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.55), transparent);
    opacity: 0.7;
}
.ft-scrolled { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); background: rgba(6, 10, 19, 0.94) !important; }
.logo img, .legal-logo img { filter: drop-shadow(0 0 14px rgba(249, 115, 22, 0.25)); transition: transform 0.3s ease, filter 0.3s ease; }
.logo img:hover, .legal-logo img:hover { transform: scale(1.04); filter: drop-shadow(0 0 20px rgba(249, 115, 22, 0.45)); }

/* Enlace activo del menú según la sección visible */
.nav-links a:not(.btn-nav) { position: relative; }
.nav-links a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    border-radius: 2px;
    background: var(--naranja);
    transition: width 0.3s ease;
}
.nav-links a:not(.btn-nav):hover::after,
.nav-links a.ft-activo::after { width: 100%; }
.nav-links a.ft-activo { color: var(--texto) !important; }

/* ---------- Hero: título con degradado y brillo ---------- */
.hero-content h1 {
    background: linear-gradient(180deg, #ffffff 35%, #cbd5e1 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-content h1 .hero-highlight {
    background: linear-gradient(90deg, #f97316 0%, #fdba74 25%, #f97316 50%, #fb923c 75%, #f97316 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: ft-brillo-texto 6s linear infinite;
}
@keyframes ft-brillo-texto { to { background-position: 200% center; } }

.hero .eyebrow { box-shadow: 0 0 18px rgba(249, 115, 22, 0.15); backdrop-filter: blur(8px); }
.hero .eyebrow svg { animation: ft-latido 2.4s ease-in-out infinite; }
@keyframes ft-latido { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.hero-badge { backdrop-filter: blur(8px); transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.hero-badge:hover { transform: translateY(-3px); border-color: rgba(249, 115, 22, 0.45); box-shadow: 0 8px 20px rgba(249, 115, 22, 0.15); }

/* Botones con resplandor (estilo Tector) */
.btn-hero, .plan-btn, .btn-producto, .btn-vincular { position: relative; overflow: hidden; }
.btn-hero { box-shadow: 0 0 25px rgba(249, 115, 22, 0.35); }
.btn-hero:hover { box-shadow: 0 0 38px rgba(249, 115, 22, 0.6) !important; }
.btn-hero::after, .plan-btn::after, .btn-producto::after, .btn-vincular::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}
.btn-hero:hover::after, .plan-btn:hover::after, .btn-producto:hover::after, .btn-vincular:hover::after {
    left: 140%;
    transition: left 0.75s ease;
}

/* Tarjeta de la manilla: anillo pulsante y leve flotación */
.hero-band { animation: ft-halo 3.2s ease-in-out infinite; }
@keyframes ft-halo {
    0%, 100% { box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.12), 0 0 30px rgba(249, 115, 22, 0.35); }
    50%      { box-shadow: 0 0 0 16px rgba(249, 115, 22, 0.05), 0 0 55px rgba(249, 115, 22, 0.55); }
}
.hero-visual-card { transition: transform 0.12s ease-out, box-shadow 0.3s ease, border-color 0.3s ease; }
.hero-visual-card:hover { border-color: rgba(249, 115, 22, 0.45); box-shadow: 0 0 40px rgba(249, 115, 22, 0.18), var(--sombra-md); }
.hero-pulse { transition: border-color 0.25s ease, background 0.25s ease; }
.hero-pulse:hover { border-color: rgba(249, 115, 22, 0.4); background: rgba(249, 115, 22, 0.06); }
.hero-pulse strong { color: var(--naranja); }
.floating-card { backdrop-filter: blur(10px); animation: ft-flota-insignia 4s ease-in-out infinite; }
@keyframes ft-flota-insignia {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-6px); }
}

/* ---------- Títulos de sección con línea brillante ---------- */
.section-title h2 {
    background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-title h2::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    margin: 0.9rem auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--naranja), transparent);
    box-shadow: 0 0 12px var(--ft-glow);
}

/* ---------- Tarjetas: brillo naranja e inclinación 3D ---------- */
.producto-card:hover, .card-experiencia:hover, .ejemplo-card:hover {
    box-shadow: 0 0 35px rgba(249, 115, 22, 0.16), var(--sombra-md) !important;
    border-color: rgba(249, 115, 22, 0.4) !important;
}
.plan-card:hover { box-shadow: 0 0 40px rgba(249, 115, 22, 0.18), var(--sombra-md) !important; }
.plan-rastreo:hover { box-shadow: 0 0 40px rgba(16, 185, 129, 0.22), var(--sombra-md) !important; }
.step-number { box-shadow: 0 0 22px rgba(249, 115, 22, 0.35); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.step:hover .step-number { transform: scale(1.08); box-shadow: 0 0 34px rgba(249, 115, 22, 0.6); }
.ejemplo-icon, .icon-badge, .plan-icon-badge { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.ejemplo-card:hover .ejemplo-icon, .card-experiencia:hover .icon-badge, .plan-card:hover .plan-icon-badge {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 0 22px rgba(249, 115, 22, 0.3);
}
.producto-precio { text-shadow: 0 0 18px rgba(249, 115, 22, 0.35); }

/* Mapa del mockup: pin con doble pulso */
.map-pin { filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.7)); }

/* ---------- Revelado al hacer scroll (solo si el JS está activo) ---------- */
.ft-pro-js .ft-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.ft-pro-js .ft-reveal.ft-revelado { opacity: 1; transform: none; }

/* ---------- Botón flotante de WhatsApp ---------- */
.ft-whatsapp {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.5);
    z-index: 1500;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ft-whatsapp:hover { transform: scale(1.1); box-shadow: 0 0 32px rgba(37, 211, 102, 0.85); }
.ft-whatsapp svg { width: 30px; height: 30px; fill: currentColor; }
.ft-whatsapp::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.6);
    animation: ft-onda 2.4s ease-out infinite;
}
@keyframes ft-onda { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- Footer ---------- */
.footer { position: relative; }
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.6), transparent);
}
.footer-links a { transition: color 0.25s ease, padding-left 0.25s ease; }
.footer-links a:hover { color: var(--naranja) !important; padding-left: 4px; }

/* ============================================================
   PÁGINAS DE ACCESO (login, registro, recuperar, instrucciones)
   Se activan con class="ft-auth" en el <body>.
   ============================================================ */
body.ft-auth {
    background:
        radial-gradient(1000px 520px at 15% -10%, rgba(249, 115, 22, 0.12), transparent 60%),
        radial-gradient(800px 480px at 100% 100%, rgba(16, 185, 129, 0.06), transparent 55%),
        linear-gradient(180deg, #080c16 0%, #060a13 100%) !important;
    background-attachment: fixed !important;
    color: #f8fafc;
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    min-height: 100vh;
}
.ft-auth .contenedor-admin,
.ft-auth .contenedor,
.ft-auth > .container {
    position: relative;
    background: rgba(20, 28, 46, 0.82) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(249, 115, 22, 0.28) !important;
    border-radius: 24px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(249, 115, 22, 0.08);
    animation: ft-entrada 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ft-auth .contenedor-admin::before,
.ft-auth .contenedor::before {
    content: '';
    display: block;
    width: 84px;
    height: 84px;
    margin: 0 auto 0.8rem;
    background: url('/static/imagenes/logo.png') center / contain no-repeat;
    filter: drop-shadow(0 0 16px rgba(249, 115, 22, 0.35));
}
.ft-auth .contenedor-admin::after,
.ft-auth .contenedor::after,
.ft-auth > .container::after {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f97316, transparent);
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.6);
}
@keyframes ft-entrada { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }

.ft-auth .titulo-naranja { text-align: center; letter-spacing: 0.02em; font-family: 'Sora', 'Inter', sans-serif; }
.ft-auth h2 { font-family: 'Sora', 'Inter', sans-serif; }
.ft-auth label { color: #94a3b8 !important; font-weight: 600; letter-spacing: 0.01em; }
.ft-auth input[type="email"],
.ft-auth input[type="password"],
.ft-auth input[type="text"] {
    background: rgba(8, 12, 22, 0.85) !important;
    border: 1px solid #253048 !important;
    border-radius: 12px !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ft-auth input[type="email"]:focus,
.ft-auth input[type="password"]:focus,
.ft-auth input[type="text"]:focus {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18), 0 0 18px rgba(249, 115, 22, 0.2);
    outline: none;
}
.ft-auth .btn-vincular,
.ft-auth .contenedor button:not(.btn-secondary) {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    border-radius: 12px !important;
    letter-spacing: 0.04em;
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ft-auth .btn-vincular:hover,
.ft-auth .contenedor button:not(.btn-secondary):hover {
    transform: translateY(-2px);
    box-shadow: 0 0 38px rgba(249, 115, 22, 0.6);
}
.ft-auth a { transition: color 0.25s ease; }
.ft-auth a:hover { color: #f97316 !important; }
.ft-auth .habeas-data-container { background: rgba(8, 12, 22, 0.85) !important; border-color: #253048 !important; border-radius: 12px !important; }
.ft-auth .ft-particles-fixed {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
}

/* Páginas legales: revelado suave de cada sección */
.legal-container h2 { position: relative; }
.legal-container h2::before {
    content: '';
    position: absolute;
    left: -14px; top: 0.35em;
    width: 4px; height: 1em;
    border-radius: 3px;
    background: var(--naranja);
    box-shadow: 0 0 10px var(--ft-glow);
}

/* ---------- Ajustes móviles ---------- */
@media (max-width: 768px) {
    .ft-cursor-glow { display: none; }
    .floating-card { white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 24px); }
    .ft-whatsapp { width: 52px; height: 52px; right: 16px; bottom: 16px; }
    .ft-aurora { filter: blur(80px); }
    .legal-container h2::before { left: -10px; }
}

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
    .ft-aurora, .hero-band, .floating-card,
    .hero-content h1 .hero-highlight, .ft-whatsapp::before, .hero .eyebrow svg { animation: none !important; }
    .ft-particles, .ft-particles-fixed, .ft-cursor-glow { display: none !important; }
    .ft-pro-js .ft-reveal { opacity: 1 !important; transform: none !important; }
    .ft-auth .contenedor-admin, .ft-auth .contenedor, .ft-auth > .container { animation: none !important; }
}

/* El texto legal de la casilla Habeas Data mantiene su peso normal */
.ft-auth .habeas-data-container label { font-weight: 400 !important; }
