/* =========================================
   CORE VARIABLES & CSS
   ========================================= */
:root {
    --bg-deep: #020203;
    --bg-card: rgba(20, 20, 25, 0.6);
    --bg-card-hover: rgba(30, 30, 40, 0.7);
    --accent-primary: #22c55e;
    --accent-secondary: #06b6d4;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.06);
    --nav-height: 80px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --easing: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
}

body { position: relative; min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* =========================================
   LENIS SMOOTH SCROLL BASE
   ========================================= */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Base para GSAP (ocultos por defecto para evitar parpadeo) */
.fade-in-scroll { 
    opacity: 0; 
    visibility: hidden; 
}

#bgCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0.6; }
.ambient-light {
    position: fixed; inset: 0; z-index: -2;
    background: radial-gradient(circle at 15% 15%, rgba(34, 197, 94, 0.08) 0%, transparent 40%), radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
}

.wrapper { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

nav {
    height: var(--nav-height); display: flex; align-items: center; position: sticky; top: 0; z-index: 100;
    background: rgba(2, 2, 3, 0.75); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: white; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.5px; }
.logo img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 0 20px rgba(34, 197, 94, 0.2); border: 1px solid rgba(255,255,255,0.1); }
.nav-items { display: flex; gap: 8px; }
.nav-link { padding: 10px 20px; border-radius: 12px; font-size: 0.95rem; font-weight: 600; color: var(--text-muted); text-decoration: none; transition: 0.25s var(--easing); position: relative; overflow: hidden; }
.nav-link:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-link.active { color: white; background: rgba(255,255,255,0.08); }
.cta-play-small { background: var(--text-main); color: black; padding: 10px 20px; border-radius: 99px; font-weight: 800; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; text-decoration: none; transition: transform 0.2s; }
.cta-play-small:hover { transform: scale(1.05); }
.menu-btn { display: none; background: none; border: none; color: white; cursor: pointer; }
.menu-btn svg { width: 32px; height: 32px; }

.hero { padding: 80px 0 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; perspective: 1000px; }
.hero-text { z-index: 5; }
.badge-new { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.2); border-radius: 100px; color: var(--accent-primary); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 24px; }
.badge-dot { width: 8px; height: 8px; background: currentColor; border-radius: 50%; animation: pulseGlow 2s infinite; }
h1 { font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1; font-weight: 900; margin-bottom: 20px; background: linear-gradient(180deg, #fff 0%, #a5b4fc 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -2px; }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); line-height: 1.6; max-width: 500px; margin-bottom: 32px; }
.btn-group { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-xl { height: 56px; padding: 0 32px; border-radius: 16px; font-weight: 800; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: all 0.3s var(--easing); text-decoration: none; border: none; outline: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent-primary) 0%, #15803d 100%); color: white; box-shadow: 0 10px 30px -10px rgba(34, 197, 94, 0.5); position: relative; overflow: hidden; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -10px rgba(34, 197, 94, 0.6); }
.btn-secondary { background: rgba(255, 255, 255, 0.05); color: white; border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-3px); }
.hero-visual { position: relative; transform-style: preserve-3d; height: 400px; }
.banner-card { width: 100%; height: 100%; border-radius: var(--radius-lg); overflow: hidden; position: relative; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); border: 1px solid rgba(255,255,255,0.1); transition: transform 0.1s ease-out; }
.banner-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); }
.shine-fx { position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%); background-size: 200% 100%; animation: shine 6s infinite linear; pointer-events: none; }
@keyframes shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.stats-bar { margin-top: 60px; background: rgba(10, 10, 12, 0.6); border: 1px solid var(--border-light); border-radius: 20px; padding: 24px; display: flex; justify-content: space-around; backdrop-filter: blur(10px); }
.stat-val { display: block; font-size: 2rem; font-weight: 800; color: white; }
.stat-lbl { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; margin-top: 4px; }
.live-indicator { color: var(--accent-secondary); text-shadow: 0 0 15px var(--accent-secondary); }

[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::before { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-5px); background: rgba(10, 10, 15, 0.95); border: 1px solid rgba(255,255,255,0.15); padding: 6px 12px; border-radius: 8px; font-size: 0.75rem; color: white; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.2s ease; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 20; }
[data-tooltip]:hover::before { opacity: 1; transform: translateX(-50%) translateY(-10px); }

.section-header { margin: 120px 0 40px; text-align: center; }
.section-header h2 { font-size: 2.5rem; font-weight: 800; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.member-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 24px; text-align: center; transition: 0.3s var(--easing); position: relative; overflow: hidden; }
.member-card:hover { transform: translateY(-10px); background: var(--bg-card-hover); border-color: var(--accent-primary); }
.member-pfp { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 20px; overflow: hidden; border: 2px solid rgba(255,255,255,0.1); transition: 0.3s; }
.member-card:hover .member-pfp { transform: scale(1.1) rotate(3deg); border-color: var(--accent-primary); }
.member-pfp img { width: 100%; height: 100%; object-fit: cover; }
.member-name { font-size: 1.2rem; font-weight: 700; color: white; margin-bottom: 4px; }
.member-role { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.join-container { margin: 100px auto; max-width: 800px; background: linear-gradient(145deg, rgba(20,20,25,0.9), rgba(10,10,12,0.95)); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 40px; box-shadow: 0 40px 100px -20px rgba(0,0,0,0.5); position: relative; }
.join-container::before { content:""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 60%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-primary), transparent); opacity: 0.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.input-group { position: relative; margin-bottom: 20px; }
.input-group.full { grid-column: span 2; }
.form-input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border-light); border-radius: 12px; padding: 16px; color: white; font-family: inherit; font-size: 1rem; transition: 0.3s; outline: none; }
.form-input:focus { border-color: var(--accent-primary); background: rgba(0,0,0,0.5); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1); }
.form-input.error { border-color: #ef4444; background: rgba(239, 68, 68, 0.05); }
textarea.form-input { min-height: 140px; resize: none; }

/* --- ERROR TOOLTIP (Dark Mode) --- */
.error-msg { position: absolute; left: 0; top: 100%; margin-top: 8px; background: #1a1a1f; color: #ff6b6b; font-size: 0.85rem; padding: 8px 14px; border-radius: 8px; font-weight: 600; border: 1px solid #ef4444; box-shadow: 0 8px 20px rgba(0,0,0,0.6); z-index: 10; display: flex; align-items: center; gap: 8px; animation: slideUp 0.2s ease-out; pointer-events: none; }
.error-msg::before { content:""; position: absolute; bottom: 100%; left: 16px; border: 6px solid transparent; border-bottom-color: #ef4444; }
@keyframes slideUp { from{opacity:0; transform:translateY(-5px)} to{opacity:1; transform:translateY(0)} }

/* ===== FIX CHECKBOX VISUAL ===== */
.checkbox-wrapper { display: flex; align-items: center; gap: 12px; cursor: pointer; position: relative; color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.checkbox-wrapper input { position: absolute; left: 0; top: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; z-index: 5; }
.checkmark { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border-light); background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: 0.2s; position: relative; z-index: 1; pointer-events: none; }
.checkbox-wrapper input:checked + .checkmark { background: var(--accent-primary); border-color: var(--accent-primary); color: black; }
.checkmark svg { width: 14px; height: 14px; display: none; }
.checkbox-wrapper input:checked + .checkmark svg { display: block; }
.checkbox-wrapper.error .checkmark { border-color: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.2); }

.select-trigger { background: rgba(0,0,0,0.3); border: 1px solid var(--border-light); padding: 16px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-weight: 500; cursor: pointer; transition: 0.3s; }
.select-trigger.error { border-color: #ef4444; background: rgba(239, 68, 68, 0.05); }
.select-options { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #1a1a1f; border: 1px solid var(--border-light); border-radius: 12px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: 0.2s var(--easing); z-index: 50; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.custom-select.open .select-options { opacity: 1; visibility: visible; transform: translateY(0); }
.option { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); color: #ccc; cursor: pointer; }
.option:hover { background: var(--accent-primary); color: black; }
.option.selected { color: var(--accent-primary); font-weight: 700; }

footer { border-top: 1px solid var(--border-light); background: #000; padding: 60px 0 30px; margin-top: 100px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer-brand h3 { font-size: 1.5rem; color: white; margin-bottom: 10px; }
.footer-col h4 { color: white; margin-bottom: 20px; font-size: 1rem; }
.footer-col a { display: block; color: var(--text-muted); margin-bottom: 10px; text-decoration: none; transition: .2s; }
.footer-col a:hover { color: var(--accent-primary); transform: translateX(5px); }
.copy { text-align: center; margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--border-light); color: #555; font-size: 0.85rem; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
.modal-box { background: #121214; border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; max-width: 600px; width: 100%; max-height: 80vh; overflow-y: auto; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,0.8); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.close-modal { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: white; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.modal-content h3 { margin-top: 20px; margin-bottom: 10px; color: white; }
.modal-content p, .modal-content li { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(50px); background: #111; border: 1px solid rgba(255,255,255,0.1); padding: 12px 24px; border-radius: 50px; color: white; font-weight: 600; display: flex; align-items: center; gap: 10px; opacity: 0; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 10000; box-shadow: 0 10px 30px rgba(0,0,0,0.5); pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--accent-primary); }
.toast.error { border-color: #ef4444; }
.toast-icon { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-primary); box-shadow: 0 0 10px var(--accent-primary); }
.toast.error .toast-icon { background: #ef4444; box-shadow: 0 0 10px #ef4444; }

#loader { position: fixed; inset: 0; background: #000; z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.5s ease; }
.spinner { width: 40px; height: 40px; border: 3px solid rgba(34,197,94,0.3); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 15px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-visual { height: 250px; }
    .btn-group { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .form-grid { grid-template-columns: 1fr; }
    .input-group.full { grid-column: span 1; }
    .stats-bar { flex-direction: column; gap: 20px; }
    .nav-items { position: fixed; top: var(--nav-height); left: 0; right: 0; background: rgba(5,5,5,0.95); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-light); display: none; }
    .nav-items.open { display: flex; animation: fadeIn 0.2s ease; }
    .menu-btn { display: block; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }