/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    /* Brand Palette */
    --rp-neon:          #C6EB34;
    --rp-blue:          #0077B6;
    --rp-navy:          #1E293B;
    --rp-white:         #FFFFFF;
    --rp-bg-alt:        #F8FAFC;
    --rp-text-muted:    #64748B;

    /* Semantic */
    --rp-bg-main:       var(--rp-white);
    --rp-text-main:     var(--rp-navy);
    --rp-accent:        var(--rp-neon);

    /* Typography */
    --rp-font-display:  'Satoshi', 'Inter', sans-serif;
    --rp-font-main:     'Inter', sans-serif;
    --rp-text-hero:     clamp(40px, 7vw, 88px);
    --rp-text-h2:       clamp(28px, 4.5vw, 56px);
    --rp-text-base:     18px;

    /* Spacing */
    --rp-space-xl:      120px;
    --rp-space-lg:      80px;
    --rp-space-md:      32px;
    --rp-space-sm:      16px;
    --rp-radius-md:     12px;

    /* Shadows */
    --rp-shadow-soft:   0 4px 20px rgba(30, 41, 59, 0.06);
    --rp-shadow-hover:  0 16px 40px rgba(30, 41, 59, 0.12);

    /* Motion */
    --rp-ease:          cubic-bezier(0.16, 1, 0.3, 1);
    --rp-duration:      0.28s;
    --rp-transition:    all var(--rp-duration) var(--rp-ease);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

/* Page frame. These rules used to sit in a <style> tag in each template. */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}
/* overflow-x only on body: on html it breaks position: sticky in iOS Safari */
body { overflow-x: hidden !important; }
/* Keep the WP admin bar off the content when logged in */
body.admin-bar .site-wrapper { padding-top: 32px !important; }
body.admin-bar.rp-blank-page .site-wrapper { padding-top: 0 !important; }

body {
    font-family: var(--rp-font-main);
    font-size: var(--rp-text-base);
    color: var(--rp-text-main);
    line-height: 1.65;
    background: var(--rp-bg-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

a {
    color: var(--rp-blue);
    text-decoration: none;
    transition: color 0.2s var(--rp-ease);
}
a:hover { color: var(--rp-neon); }

img, video { max-width: 100%; height: auto; display: block; }

p { margin-top: 0; margin-bottom: 20px; }
p:last-child { margin-bottom: 0; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5 {
    font-family: var(--rp-font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--rp-navy);
    margin-top: 0;
    margin-bottom: 20px;
}

h1 { font-size: var(--rp-text-hero); font-weight: 900; }
h2 { font-size: var(--rp-text-h2); }
h3 { font-size: clamp(22px, 3vw, 32px); }
h4 { font-size: clamp(16px, 2vw, 20px); font-weight: 700; }

/* ============================================
   LAYOUT
   ============================================ */

/* Container principal */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
    width: 100%;
}

/* Site wrapper (template blank) */
.site-wrapper { width: 100%; }

/* Sections */
.section { padding: var(--rp-space-lg) 0; }

/* Helpers */
.text-center { text-align: center; }

.section-header {
    margin-bottom: 56px;
    text-align: center;
}
.section-header p {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    color: var(--rp-text-muted);
    font-size: 1.05rem;
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.rp-grid {
    display: grid;
    gap: 28px;
    margin-top: 48px;
}

.grid-2-cols { grid-template-columns: repeat(2, 1fr); }
.grid-3-cols { grid-template-columns: repeat(3, 1fr); }
.grid-4-cols { grid-template-columns: repeat(4, 1fr); }

/* ============================================
   COMPONENTS
   ============================================ */

/* Card */
.rp-card-glass {
    background: var(--rp-white);
    border: 1px solid #E2E8F0;
    border-radius: var(--rp-radius-md);
    padding: var(--rp-space-md);
    box-shadow: var(--rp-shadow-soft);
    transition:
        transform 0.22s var(--rp-ease),
        box-shadow 0.22s var(--rp-ease),
        border-color 0.22s var(--rp-ease);
    display: flex;
    flex-direction: column;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .rp-card-glass:hover {
        transform: translateY(-4px);
        box-shadow: var(--rp-shadow-hover);
        border-color: rgba(198, 235, 52, 0.5);
    }
}

/* Botones */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    min-height: 44px;
    border-radius: 50px;
    font-family: var(--rp-font-display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    transition:
        background var(--rp-duration) var(--rp-ease),
        border-color var(--rp-duration) var(--rp-ease),
        color var(--rp-duration) var(--rp-ease),
        transform var(--rp-duration) var(--rp-ease),
        box-shadow 0.28s var(--rp-ease);
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--rp-neon);
    color: var(--rp-navy);
    border-color: var(--rp-neon);
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.12);
}
@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover {
        background: var(--rp-navy);
        border-color: var(--rp-navy);
        color: var(--rp-white);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(30, 41, 59, 0.2);
    }
}
.btn-primary:active {
    transform: scale(0.97);
    transition-duration: 100ms;
}

.btn-secondary {
    background: transparent;
    color: var(--rp-navy);
    border-color: var(--rp-navy);
}
@media (hover: hover) and (pointer: fine) {
    .btn-secondary:hover {
        background: var(--rp-navy);
        color: var(--rp-white);
        transform: translateY(-2px);
    }
}
.btn-secondary:active {
    transform: scale(0.97);
    transition-duration: 100ms;
}

/* Badge / Hero Tag */
.hero-tag {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(198, 235, 52, 0.1);
    color: var(--rp-navy);
    border: 1px solid rgba(198, 235, 52, 0.6);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* ============================================
   ANIMATIONS
   Only active when JS is available (html.js).
   Without JS: all content visible by default.
   ============================================ */
.rp-fade-up {
    transition: opacity 0.45s var(--rp-ease), transform 0.45s var(--rp-ease);
}

.js .rp-fade-up {
    opacity: 0;
    transform: translateY(16px);
}
.js .rp-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Grid stagger — container stays visible, children animate in sequence */
.js .rp-grid.rp-fade-up {
    opacity: 1;
    transform: none;
    transition: none;
}
.js .rp-grid.rp-fade-up > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s var(--rp-ease), transform 0.45s var(--rp-ease);
}
.js .rp-grid.rp-fade-up.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   IMAGE
   ============================================ */
.img-sport {
    border-radius: var(--rp-radius-md);
    object-fit: cover;
    box-shadow: var(--rp-shadow-soft);
}

/* ============================================
   RESPONSIVE — TABLET (≤1024px)
   ============================================ */
@media (max-width: 1024px) {

    .container {
        padding-left: 28px;
        padding-right: 28px;
    }

    /* Colapsa splits 55/45 y 2fr/1fr a 1 col */
    div[style*="grid-template-columns: 55% 45%"],
    div[style*="grid-template-columns: 45% 55%"],
    div[style*="grid-template-columns: 50% 50%"],
    div[style*="grid-template-columns: 2fr 1fr"],
    div[style*="grid-template-columns: 3fr 2fr"],
    div[style*="grid-template-columns: 1fr 1fr"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    /* Testimonials 3-col a 1-col en tablet */
    div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2px !important;
    }

    /* Handoff card en columna */
    div[style*="grid-template-columns: 1fr auto"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .grid-3-cols { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-4-cols { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================
   RESPONSIVE — MOBILE (≤768px)
   ============================================ */
@media (max-width: 768px) {

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section { padding: 56px 0; }

    /* Todos los grids a 1 col */
    .grid-2-cols,
    .grid-3-cols,
    .grid-4-cols {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Cualquier grid inline */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Flex rows a columna */
    div[style*="display: flex"][style*="gap: 60px"],
    div[style*="display: flex"][style*="gap: 48px"],
    div[style*="display: flex"][style*="gap: 40px"] {
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Padding de hero */
    section[style*="padding: 120px"] {
        padding-top: 72px !important;
        padding-bottom: 48px !important;
    }

    /* Padding de cards grandes */
    div[style*="padding: 56px 60px"],
    div[style*="padding: 60px"] {
        padding: 28px 20px !important;
    }

    /* CTAs apilados */
    div[style*="display: flex"][style*="flex-wrap: wrap"] {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .btn-primary,
    .btn-secondary {
        width: 100% !important;
        text-align: center !important;
    }

    /* Float cards — ocultar en mobile */
    div[style*="position: absolute"][style*="bottom"] {
        display: none !important;
    }

    /* Pulse stats strip */
    div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Números gigantes más pequeños */
    span[style*="clamp(72px"],
    span[style*="clamp(80px"] {
        font-size: clamp(48px, 10vw, 72px) !important;
    }

    .rp-grid { margin-top: 32px; }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE (≤480px)
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    h1 { font-size: clamp(28px, 9vw, 44px) !important; }
    h2 { font-size: clamp(22px, 7vw, 32px) !important; }
    h3 { font-size: clamp(18px, 5vw, 24px) !important; }

    .section { padding: 44px 0; }

    .rp-card-glass { padding: 20px !important; }

    div[style*="padding: 40px"] {
        padding: 20px !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

:focus-visible {
    outline: 3px solid var(--rp-neon);
    outline-offset: 3px;
    border-radius: 3px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 3px solid var(--rp-neon);
    outline-offset: 4px;
}

a:focus-visible {
    outline: 3px solid var(--rp-neon);
    outline-offset: 2px;
    border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .js .rp-fade-up,
    .js .rp-grid.rp-fade-up > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
