@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ==========================================================================
   RifaQR — Landing Page
   Paleta: azul oscuro (#0F172A), azul (#2563EB), verde (#10B981), blanco,
   gris claro. Independiente del theme del panel admin/vendedor.
   ========================================================================== */

:root {
    --navy: #0F172A;
    --navy-soft: #1E293B;
    --blue: #2563EB;
    --blue-dark: #1D4ED8;
    --blue-soft: rgba(37, 99, 235, 0.10);
    --green: #10B981;
    --green-soft: rgba(16, 185, 129, 0.12);
    --white: #FFFFFF;
    --gray-light: #F1F5F9;
    --gray-100: #F8FAFC;
    --text: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --radius: 16px;
    --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
    --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-label {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}

/* ---------- Íconos (sprite SVG propio, sin dependencias externas) ---------- */

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.15em;
}

.icon .icon-solid { fill: currentColor; stroke: none; }

.section-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 560px;
}

.section-head {
    text-align: center;
    margin: 0 auto 48px;
    max-width: 640px;
}

.section-head .section-subtitle { margin: 0 auto; }

/* ---------- Botones ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 12px 26px rgba(37, 99, 235, 0.42); }

.btn-secondary {
    background: var(--white);
    color: var(--navy);
    border: 2px solid var(--border);
}

.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }

.btn-green {
    background: var(--green);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.btn-green:hover { box-shadow: 0 12px 26px rgba(16, 185, 129, 0.42); }

.btn-ghost-light {
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.35);
}

.btn-ghost-light:hover { background: rgba(255,255,255,0.16); border-color: var(--white); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 21px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 15px;
    flex-shrink: 0;
}

.brand span { color: var(--blue); }

.main-nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.main-nav a {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease;
    position: relative;
}

.main-nav a:hover { color: var(--navy); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    width: 24px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-nav { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    padding: calc(var(--header-h) + 72px) 0 90px;
    background:
        radial-gradient(circle at 15% 20%, rgba(37,99,235,0.12), transparent 45%),
        radial-gradient(circle at 90% 10%, rgba(16,185,129,0.10), transparent 40%),
        var(--white);
    position: relative;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 50px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
    background: var(--green-soft);
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero-eyebrow .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px var(--green-soft);
}

.hero h1 {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--navy);
    margin-bottom: 22px;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--blue), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 34px;
}

.hero-top-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-trust {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.hero-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.hero-trust-item i { color: var(--green); }

.hero-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-art-glow {
    position: absolute;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(37,99,235,0.18), transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-art svg { position: relative; z-index: 1; }

.hero-floating-card {
    position: absolute;
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    animation: floatCard 3.6s ease-in-out infinite;
    z-index: 2;
}

.hero-floating-card.card-a { top: 6%; left: -4%; animation-delay: 0s; }
.hero-floating-card.card-b { bottom: 10%; right: -6%; animation-delay: 1.2s; }

.hero-floating-card .icon-dot {
    width: 30px; height: 30px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 13px;
}

.card-a .icon-dot { background: var(--green); }
.card-b .icon-dot { background: var(--blue); }

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==========================================================================
   ¿Cómo funciona?
   ========================================================================== */

.section { padding: 90px 0; }
.section-alt { background: var(--gray-100); }

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.how-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.how-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
}

.how-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    color: var(--white);
    margin-bottom: 20px;
}

.how-card.role-admin .how-icon { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.how-card.role-vendedor .how-icon { background: linear-gradient(135deg, var(--green), #059669); }
.how-card.role-apostador .how-icon { background: linear-gradient(135deg, #F59E0B, #D97706); }

.how-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 6px;
}

.how-card .role-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    display: block;
}

.how-card ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    color: var(--text-muted);
    padding: 7px 0;
    border-top: 1px solid var(--gray-light);
}

.how-card ul li:first-child { border-top: none; }

.how-card ul li i { color: var(--green); font-size: 13px; flex-shrink: 0; }

/* ==========================================================================
   Flujo del sistema
   ========================================================================== */

.flow-track {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    margin-top: 20px;
}

.flow-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 8px;
}

.flow-num {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--blue);
    color: var(--blue);
    font-weight: 800;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
    flex-shrink: 0;
    transition: background 0.25s ease, color 0.25s ease;
}

.flow-step:hover .flow-num { background: var(--blue); color: var(--white); }

.flow-step p {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--navy);
    max-width: 130px;
}

.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
    font-size: 18px;
    padding-top: 24px;
    flex-shrink: 0;
}

/* ==========================================================================
   Ventajas
   ========================================================================== */

.adv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.adv-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 22px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.adv-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.adv-card i {
    font-size: 30px;
    color: var(--blue);
    margin-bottom: 14px;
}

.adv-card h4 { font-size: 15px; font-weight: 700; color: var(--navy); }

/* ==========================================================================
   Campañas
   ========================================================================== */

.camp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.camp-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.camp-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.camp-cover {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    color: rgba(255,255,255,0.9);
    position: relative;
}

.camp-cover.cover-1 { background: linear-gradient(135deg, var(--blue), #1e3a8a); }
.camp-cover.cover-2 { background: linear-gradient(135deg, var(--green), #065f46); }
.camp-cover.cover-3 { background: linear-gradient(135deg, #F59E0B, #B45309); }

.camp-status {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(255,255,255,0.92);
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    padding: 5px 11px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.camp-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.camp-body { padding: 22px; }

.camp-body h3 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }

.camp-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.camp-meta span {
    font-size: 13.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.camp-meta i { color: var(--blue); width: 14px; }

.camp-body .btn { width: 100%; }

/* ==========================================================================
   Estadísticas
   ========================================================================== */

.stats-band {
    background: var(--navy);
    padding: 70px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-card {
    padding: 20px;
}

.stat-num {
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 900;
    background: linear-gradient(90deg, var(--blue), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    margin-top: 8px;
}

/* ==========================================================================
   Llamado a la acción
   ========================================================================== */

.cta-section {
    background: linear-gradient(135deg, var(--navy) 0%, #1e3a8a 100%);
    padding: 90px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(16,185,129,0.18), transparent 55%);
}

.cta-section .container { position: relative; z-index: 1; }

.cta-section h2 {
    font-size: clamp(28px, 4.5vw, 42px);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.cta-section p {
    font-size: 16.5px;
    color: rgba(255,255,255,0.75);
    max-width: 480px;
    margin: 0 auto 34px;
}

.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--navy);
    padding: 64px 0 0;
    color: rgba(255,255,255,0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .brand { color: var(--white); margin-bottom: 14px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 280px; color: rgba(255,255,255,0.55); }

.footer-social { display: flex; gap: 10px; margin-top: 20px; }

.footer-social a {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.75);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover { background: var(--blue); color: var(--white); transform: translateY(-3px); }

.footer-col h5 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--white);
    margin-bottom: 18px;
}

.footer-col ul li { margin-bottom: 12px; }

.footer-col ul li a {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    transition: color 0.2s ease;
}

.footer-col ul li a:hover { color: var(--green); }

.footer-bottom {
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}

/* ==========================================================================
   Botón volver arriba
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease;
    z-index: 900;
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--blue-dark); }

/* ==========================================================================
   Reveal-on-scroll (animación de entrada suave)
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-art { order: -1; max-width: 340px; margin: 0 auto 20px; }
    .hero p { max-width: 100%; }
    .how-grid { grid-template-columns: 1fr; }
    .adv-grid { grid-template-columns: repeat(2, 1fr); }
    .camp-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .flow-track { flex-direction: column; gap: 22px; }
    .flow-arrow { transform: rotate(90deg); padding-top: 0; }
}

@media (max-width: 720px) {
    .main-nav { display: none; }
    .nav-toggle { display: flex; }
    .header-actions .btn { display: none; }

    .mobile-nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        padding: 18px 24px 24px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
        z-index: 999;
    }

    .mobile-nav.open { transform: translateY(0); opacity: 1; visibility: visible; }

    .mobile-nav a {
        padding: 12px 4px;
        font-size: 15px;
        font-weight: 600;
        color: var(--navy);
        border-bottom: 1px solid var(--gray-light);
    }

    .adv-grid { grid-template-columns: 1fr 1fr; }
    .camp-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero-actions .btn, .cta-actions .btn { width: 100%; }
    .hero-top-buttons {
        display: flex;
        justify-content: space-between;
        gap: 6px;
        margin-bottom: 24px;
        width: 100%;
    }
    .hero-top-buttons .btn {
        flex: 1;
        padding: 12px 10px;
        font-size: 13.5px;
        gap: 6px;
        border-radius: 8px;
    }
    .hero-top-buttons .btn svg {
        font-size: 14px;
        width: 14px;
        height: 14px;
        margin-right: 4px;
    }
    .hero-floating-card { display: none; }
}

@media (max-width: 480px) {
    .section { padding: 64px 0; }
    .hero { padding-top: calc(var(--header-h) + 40px); padding-bottom: 60px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
