/* ═══════════════════════════════════════════════════════════════
   NLG Systems — Premium Design System
   Colores de marca, animaciones, efectos y componentes
   ═══════════════════════════════════════════════════════════════ */

/* ── BRAND COLORS (override per-page :root) ─────────────────── */
:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --accent-cyan: #00c896;
    --accent-green: #00c896;
    --accent-purple: #8b5cf6;
    --verde: #00c896;
    --verde-oscuro: #007d63;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #666666;
    --border: rgba(255, 255, 255, 0.08);
    --glow: rgba(0, 200, 150, 0.15);
}

/* ── SCROLL-TRIGGERED ANIMATIONS ────────────────────────────── */

/* Fade up — default entrance */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Fade from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade from right */
.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale in */
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    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);
}

/* Stagger children — add to parent, children get delay */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.40s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.47s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.54s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ── PREMIUM CARD EFFECTS ───────────────────────────────────── */

/* Glass card */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(0, 200, 150, 0.25);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(0, 200, 150, 0.06);
}

/* Glow border on hover */
.glow-hover {
    position: relative;
    transition: all 0.4s ease;
}

.glow-hover::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, #00c896, #007d63);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    filter: blur(8px);
}

.glow-hover:hover::after {
    opacity: 0.4;
}

/* ── PREMIUM BUTTON STYLES ──────────────────────────────────── */

.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-premium-fill {
    background: #00c896;
    color: #0f0f0f;
}

.btn-premium-fill:hover {
    background: #00e0a8;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 200, 150, 0.3);
}

.btn-premium-fill::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-premium-fill:hover::before {
    width: 300px;
    height: 300px;
}

.btn-premium-outline {
    background: transparent;
    color: #00c896;
    border: 1px solid rgba(0, 200, 150, 0.3);
}

.btn-premium-outline:hover {
    border-color: #00c896;
    background: rgba(0, 200, 150, 0.08);
    transform: translateY(-2px);
}

/* ── GRADIENT TEXT ───────────────────────────────────────────── */

.text-gradient {
    background: linear-gradient(135deg, #00c896 0%, #00e0a8 50%, #007d63 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── SECTION DIVIDERS ───────────────────────────────────────── */

.section-glow-top {
    position: relative;
}

.section-glow-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 200, 150, 0.3), transparent);
}

/* ── FLOATING PARTICLES (subtle bg effect) ──────────────────── */

@keyframes float-particle {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00c896;
    border-radius: 50%;
    animation: float-particle linear infinite;
}

/* ── SMOOTH GRADIENT BACKGROUNDS ────────────────────────────── */

.hero-gradient {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 200, 150, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 200, 150, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, #0f0f0f 0%, #1a1a1a 100%);
}

.section-gradient-subtle {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0, 200, 150, 0.04) 0%, transparent 60%),
        #0f0f0f;
}

/* ── COUNTER ANIMATION ──────────────────────────────────────── */

.counter-value {
    font-variant-numeric: tabular-nums;
}

/* ── MAGNETIC CURSOR EFFECT (cards) ─────────────────────────── */

.magnetic-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── LOADING / SKELETON ─────────────────────────────────────── */

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ── TOOLTIP ────────────────────────────────────────────────── */

[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1a1a1a;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.08);
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── BADGE STYLES ───────────────────────────────────────────── */

.badge-green {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 200, 150, 0.1);
    border: 1px solid rgba(0, 200, 150, 0.25);
    color: #00c896;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ── NAVBAR COLOR OVERRIDE ──────────────────────────────────── */

.navbar {
    background: rgba(15, 15, 15, 0.95) !important;
}

.nav-cta {
    background: linear-gradient(135deg, #00c896 0%, #007d63 100%) !important;
    color: #0f0f0f !important;
}

.nav-links a:hover,
.nav-links a.active {
    color: #00c896 !important;
}

/* ── PAGE HEADER OVERRIDE ───────────────────────────────────── */

.page-header {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%) !important;
}

.page-header::before {
    background: radial-gradient(circle, rgba(0, 200, 150, 0.08) 0%, transparent 70%) !important;
}

/* ── SMOOTH PAGE TRANSITIONS ────────────────────────────────── */

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: page-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── SCROLLBAR STYLING ──────────────────────────────────────── */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 200, 150, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 200, 150, 0.4);
}

/* ── SELECTION COLOR ────────────────────────────────────────── */

::selection {
    background: rgba(0, 200, 150, 0.25);
    color: #fff;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 768px) {
    .reveal { transform: translateY(24px); }
    .reveal-left { transform: translateX(-30px); }
    .reveal-right { transform: translateX(30px); }
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .stagger-children > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .particle { display: none; }
    body { animation: none; }
}
