/* Tableros Digitales Mx — Premium Styles */

/* ─── Base ────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* Noise texture overlay for hero */
.hero-noise::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* ─── Animations ──────────────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.15), 0 0 60px rgba(99, 102, 241, 0.05); }
    50% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.25), 0 0 80px rgba(99, 102, 241, 0.1); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delayed { animation: float-delayed 7s ease-in-out infinite 2s; }
.animate-glow-pulse { animation: glow-pulse 3s ease-in-out infinite; }

/* Hero gradient animation */
.hero-gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* ─── Scroll Reveal ───────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ─── Section tag ─────────────────────────────────────────── */
.section-tag { display: inline-block; }

/* ─── Glassmorphism ───────────────────────────────────────── */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ─── Mockup Card ─────────────────────────────────────────── */
.mockup-card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mockup-card.highlight {
    border-color: rgba(99, 102, 241, 0.4) !important;
    background: rgba(99, 102, 241, 0.06) !important;
    transform: translateY(-2px);
}

/* ─── Feature Cards ───────────────────────────────────────── */
.feature-card {
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--card-color, #6366f1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.feature-card:hover::before {
    opacity: 1;
}

/* ─── Theme Button ────────────────────────────────────────── */
.theme-btn.active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4f46e5;
}

/* ─── Mobile Menu ─────────────────────────────────────────── */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ─── Pricing Glow ────────────────────────────────────────── */
.pricing-popular {
    position: relative;
    overflow: visible !important;
}
.pricing-popular::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7, #6366f1);
    background-size: 300% 300%;
    border-radius: 1.1rem;
    z-index: -1;
    animation: gradient-shift 4s ease infinite;
    opacity: 0.6;
    filter: blur(8px);
}

/* ─── Form ────────────────────────────────────────────────── */
.form-success {
    background: linear-gradient(135deg, #22c55e, #4ade80) !important;
}

/* Focus ring */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* ─── CTA Banner ──────────────────────────────────────────── */
.cta-banner {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 40%, #6366f1 70%, #818cf8 100%);
    background-size: 200% 200%;
    animation: gradient-shift 10s ease infinite;
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ─── Counter Animation ──────────────────────────────────── */
.counter-value {
    display: inline-block;
    min-width: 2ch;
}

/* ─── Wave Divider ────────────────────────────────────────── */
.wave-divider {
    position: relative;
}
.wave-divider::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 48px;
    background: white;
    clip-path: ellipse(55% 100% at 50% 100%);
}

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a5b4fc; }

/* ─── Selection ───────────────────────────────────────────── */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #312e81;
}