/* =============================================================================
   Landing page — tenis/pádel SaaS
   =============================================================================
   Paleta: indigo + verde cancha, sobre blanco. Tokens en :root para poder
   tunear desde un solo lugar sin tocar cada selector.
   ========================================================================== */

:root {
    /* Paleta Kluub: verde vibrante sobre azul navy. El verde toma los tonos
       del logo (neon green → emerald) y el navy replica el color del
       wordmark "kluub". */
    --brand-primary: #22c55e;          /* verde Kluub (emerald 500) */
    --brand-primary-dark: #15803d;     /* emerald 700 */
    --brand-accent: #4ade80;            /* verde más claro para acentos */
    --brand-dark: #0b1530;             /* navy del wordmark Kluub */
    --brand-muted: #64748b;            /* slate 500 */
    --brand-bg-soft: #f6fdf9;          /* blanco verdoso muy tenue */
    --brand-border: #e2e8f0;           /* slate 200 */
    --brand-gradient: linear-gradient(135deg, #16a34a 0%, #22c55e 50%, #4ade80 100%);
    --brand-gradient-soft: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 30px -10px rgba(34, 197, 94, 0.25);
    --shadow-lg: 0 25px 50px -12px rgba(11, 21, 48, 0.18);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--brand-dark);
    background: #fff;
    line-height: 1.6;
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--brand-dark);
}

.text-brand { color: var(--brand-primary); }
.bg-brand-soft { background: var(--brand-bg-soft); }

/* --- Navbar ---------------------------------------------------------------- */
.nav-landing {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: all .25s ease;
    position: sticky; top: 0; z-index: 1040;
}
.nav-landing.scrolled { border-bottom-color: var(--brand-border); box-shadow: var(--shadow-sm); }
.nav-landing .navbar-brand {
    font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em;
    color: var(--brand-dark);
    display: inline-flex; align-items: center; gap: .55rem;
}
.nav-landing .navbar-brand .brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px; margin-right: .5rem;
    background: var(--brand-gradient); color: #fff;
}
/* Logo Kluub como imagen: ocupa el mismo alto que el mark de ícono viejo
   pero sin fondo — el PNG trae los colores de marca. */
.nav-landing .navbar-brand .brand-mark-img {
    height: 40px; width: auto; display: inline-block;
}
.nav-landing .navbar-brand .brand-wordmark {
    font-weight: 800; letter-spacing: -0.03em; line-height: 1;
}
.nav-landing .nav-link {
    color: var(--brand-dark); font-weight: 500;
    padding: .5rem 1rem !important; border-radius: 8px; transition: all .2s;
}
.nav-landing .nav-link:hover { color: var(--brand-primary); background: var(--brand-bg-soft); }

/* --- Botones --------------------------------------------------------------- */
.btn-brand {
    background: var(--brand-gradient); color: #fff; font-weight: 600;
    padding: .75rem 1.5rem; border-radius: 10px; border: 0;
    transition: all .2s ease; box-shadow: var(--shadow-md);
}
.btn-brand:hover {
    transform: translateY(-1px); color: #fff;
    box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.4);
}
.btn-outline-brand {
    background: #fff; color: var(--brand-primary); border: 1.5px solid var(--brand-border);
    font-weight: 600; padding: .7rem 1.5rem; border-radius: 10px; transition: all .2s;
}
.btn-outline-brand:hover {
    border-color: var(--brand-primary); color: var(--brand-primary-dark);
    background: var(--brand-bg-soft);
}
.btn-ghost-brand {
    background: transparent; color: var(--brand-dark); font-weight: 500;
    padding: .5rem 1rem; border: 0;
}
.btn-ghost-brand:hover { color: var(--brand-primary); }

/* --- Hero ------------------------------------------------------------------ */
.hero {
    position: relative; padding: 5rem 0 4rem; overflow: hidden;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.12), transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 30%, rgba(34, 197, 94, 0.08), transparent 60%),
        #fff;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(79, 70, 229, 0.08) 1px, transparent 0);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 30%, transparent 70%);
    pointer-events: none;
}
.hero .hero-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #eef2ff; color: var(--brand-primary);
    padding: .35rem .85rem; border-radius: 100px;
    font-size: .8rem; font-weight: 600; border: 1px solid rgba(79, 70, 229, 0.15);
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.75rem); font-weight: 800;
    line-height: 1.05; margin: 1.25rem 0;
}
.hero h1 .highlight {
    background: var(--brand-gradient); -webkit-background-clip: text;
    background-clip: text; color: transparent;
}
.hero .hero-sub {
    font-size: 1.15rem; color: var(--brand-muted); max-width: 560px;
    margin-bottom: 2rem;
}
.hero-metrics {
    display: flex; gap: 2rem; margin-top: 2.5rem; padding-top: 2rem;
    border-top: 1px solid var(--brand-border);
}
.hero-metrics .metric-value { font-size: 1.75rem; font-weight: 800; color: var(--brand-dark); }
.hero-metrics .metric-label { font-size: .85rem; color: var(--brand-muted); }

/* --- Mockup del hero (simula el dashboard sin imagen externa) -------------- */
.hero-mockup {
    position: relative;
    background: #fff; border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: perspective(1500px) rotateY(-6deg) rotateX(2deg);
    transition: transform .5s ease;
}
.hero-mockup:hover { transform: perspective(1500px) rotateY(-3deg) rotateX(1deg); }
.mockup-header {
    display: flex; align-items: center; gap: .4rem; padding: .75rem 1rem;
    background: var(--brand-bg-soft); border-bottom: 1px solid var(--brand-border);
}
.mockup-header .dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.mockup-header .dot.red { background: #ef4444; }
.mockup-header .dot.yellow { background: #eab308; }
.mockup-header .dot.green { background: #22c55e; }
.mockup-body { padding: 1.25rem; }
.mockup-kpi {
    display: flex; gap: .75rem; margin-bottom: 1rem;
}
.mockup-kpi .kpi-card {
    flex: 1; background: var(--brand-bg-soft); padding: .85rem;
    border-radius: 10px; border: 1px solid var(--brand-border);
}
.mockup-kpi .kpi-label { font-size: .7rem; color: var(--brand-muted); text-transform: uppercase; letter-spacing: .05em; }
.mockup-kpi .kpi-value { font-size: 1.3rem; font-weight: 700; margin-top: .15rem; }
.mockup-row {
    display: flex; align-items: center; gap: .75rem; padding: .6rem 0;
    border-bottom: 1px dashed var(--brand-border); font-size: .85rem;
}
.mockup-row:last-child { border-bottom: 0; }
.mockup-row .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--brand-gradient-soft); display: flex;
    align-items: center; justify-content: center; color: var(--brand-primary);
    font-weight: 600; font-size: .75rem;
}
.mockup-row .pill { margin-left: auto; font-size: .7rem; padding: .15rem .6rem; border-radius: 100px; }
.mockup-row .pill.green { background: #dcfce7; color: #15803d; }
.mockup-row .pill.blue { background: #dbeafe; color: #1e40af; }
.mockup-row .pill.amber { background: #fef3c7; color: #92400e; }

/* Dispersa dos bolas flotantes decorativas (tenis) alrededor del mockup */
.floating-ball {
    position: absolute; width: 72px; height: 72px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #facc15 0%, #ca8a04 100%);
    box-shadow: inset -8px -8px 12px rgba(0,0,0,0.15), var(--shadow-md);
    animation: float 6s ease-in-out infinite;
}
.floating-ball::before, .floating-ball::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
}
.floating-ball::before { transform: scaleX(1.2); }
.floating-ball::after  { transform: scaleY(1.2); }
.floating-ball.b1 { top: -20px; right: -25px; }
.floating-ball.b2 { bottom: -15px; left: -25px; animation-delay: -3s; width: 50px; height: 50px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* --- Logos clientes (trust bar) ------------------------------------------- */
.trust-bar {
    padding: 2rem 0; border-top: 1px solid var(--brand-border);
    border-bottom: 1px solid var(--brand-border); background: #fff;
}
.trust-bar .trust-label {
    font-size: .75rem; color: var(--brand-muted); text-transform: uppercase;
    letter-spacing: .1em; text-align: center; margin-bottom: 1rem;
}
.trust-bar .trust-logos {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 2rem; opacity: .5;
}
.trust-bar .trust-logos span {
    font-weight: 700; color: var(--brand-muted); font-size: 1.1rem; letter-spacing: -0.01em;
}

/* --- Secciones genéricas --------------------------------------------------- */
.section { padding: 5rem 0; }
.section-tag {
    display: inline-block; background: #eef2ff; color: var(--brand-primary);
    padding: .3rem .85rem; border-radius: 100px; font-size: .75rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
}
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 1rem auto .75rem;
    max-width: 720px;
}
.section-sub {
    color: var(--brand-muted); max-width: 640px; margin: 0 auto;
    font-size: 1.05rem;
}

/* --- Beneficios ------------------------------------------------------------ */
.benefit-card {
    background: #fff; border: 1px solid var(--brand-border);
    border-radius: 16px; padding: 1.75rem; height: 100%;
    transition: all .25s ease;
}
.benefit-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-md);
    border-color: rgba(79, 70, 229, 0.3);
}
.benefit-card .benefit-icon {
    width: 52px; height: 52px; border-radius: 12px;
    background: var(--brand-gradient-soft); color: var(--brand-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; margin-bottom: 1.25rem;
}
.benefit-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.benefit-card p { color: var(--brand-muted); font-size: .95rem; margin: 0; }

/* --- Cómo funciona --------------------------------------------------------- */
.steps-section { background: var(--brand-bg-soft); }
.step-card { position: relative; padding-top: 2rem; }
.step-card .step-number {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--brand-gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.2rem; box-shadow: var(--shadow-md);
}
.step-card .step-body {
    background: #fff; border: 1px solid var(--brand-border);
    border-radius: 16px; padding: 2.5rem 1.5rem 1.5rem; text-align: center;
    height: 100%;
}
.step-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.step-card p { color: var(--brand-muted); font-size: .9rem; margin: 0; }

/* --- Showcase visual ------------------------------------------------------- */
.showcase-card {
    border-radius: 20px; overflow: hidden; position: relative;
    min-height: 280px; color: #fff; padding: 2rem;
    display: flex; flex-direction: column; justify-content: flex-end;
    box-shadow: var(--shadow-lg); transition: transform .3s ease;
}
.showcase-card:hover { transform: translateY(-6px); }
.showcase-card .sc-icon {
    position: absolute; top: 1.25rem; right: 1.25rem;
    font-size: 2.25rem; opacity: .4;
}
.showcase-card.tennis {
    background: linear-gradient(135deg, #14532d 0%, #16a34a 70%, #22c55e 100%);
}
.showcase-card.padel {
    background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 70%, #7c3aed 100%);
}
.showcase-card.reservas {
    background: linear-gradient(135deg, #9a3412 0%, #ea580c 70%, #f59e0b 100%);
}
.showcase-card h3 { color: #fff; font-size: 1.35rem; margin-bottom: .35rem; }
.showcase-card p { color: rgba(255,255,255,0.85); font-size: .9rem; margin: 0; }

/* --- CTA intermedio -------------------------------------------------------- */
.cta-section {
    background: var(--brand-gradient); color: #fff;
    border-radius: 24px; padding: 3.5rem 2rem; text-align: center;
    margin: 4rem 0; position: relative; overflow: hidden;
}
.cta-section::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0);
    background-size: 30px 30px;
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
.cta-section h2 { color: #fff; font-size: clamp(1.75rem, 3vw, 2.25rem); }
.cta-section p { color: rgba(255,255,255,0.9); max-width: 560px; margin: 1rem auto 2rem; }
.cta-section .btn-brand { background: #fff; color: var(--brand-primary); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.cta-section .btn-brand:hover { color: var(--brand-primary-dark); }

/* --- Footer ---------------------------------------------------------------- */
.footer {
    background: var(--brand-dark); color: #cbd5e1; padding: 4rem 0 2rem;
}
.footer h5 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer a { color: #cbd5e1; text-decoration: none; font-size: .9rem; line-height: 2.1; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer .brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px; margin-right: .5rem;
    background: var(--brand-gradient); color: #fff;
}
/* En el footer el fondo es navy: el logo en PNG trae suficiente contraste
   verde para resaltar sobre ese fondo. */
.footer .brand-mark-img-footer {
    height: 36px; width: auto; margin-right: .6rem;
    background: #fff; padding: 4px; border-radius: 8px;
}
.footer .social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255,255,255,0.05); margin-right: .5rem;
    transition: all .2s;
}
.footer .social a:hover { background: var(--brand-primary); color: #fff; }
.footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08); padding-top: 2rem; margin-top: 3rem;
    display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
    color: #94a3b8; font-size: .85rem;
}

/* --- Auth (login / selector de perfil) ------------------------------------ */
.auth-wrapper {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse 40% 40% at 20% 20%, rgba(79, 70, 229, 0.12), transparent 60%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(34, 197, 94, 0.08), transparent 60%),
        var(--brand-bg-soft);
}
.auth-card {
    width: 100%; max-width: 440px; background: #fff;
    border-radius: 20px; padding: 2.5rem; box-shadow: var(--shadow-lg);
    border: 1px solid var(--brand-border);
}
.auth-card .auth-brand {
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    text-decoration: none;
}
.auth-card .auth-brand .brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--brand-gradient); color: #fff;
}
.auth-card .auth-brand .brand-mark-img,
.profile-picker .auth-brand .brand-mark-img {
    height: 72px; width: auto; display: block;
}
.auth-card .auth-brand .brand-wordmark,
.profile-picker .auth-brand .brand-wordmark {
    font-weight: 800; letter-spacing: -0.03em; line-height: 1;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: .35rem; }
.auth-card .sub { color: var(--brand-muted); font-size: .95rem; margin-bottom: 2rem; }
.auth-card .form-label { font-weight: 500; font-size: .9rem; color: var(--brand-dark); margin-bottom: .35rem; }
.auth-card .form-control {
    padding: .7rem .9rem; border-radius: 10px; border: 1.5px solid var(--brand-border);
    font-size: .95rem; transition: all .2s;
}
.auth-card .form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.auth-card .btn-brand { width: 100%; padding: .8rem; font-size: 1rem; margin-top: .5rem; }
.auth-card .auth-footer { text-align: center; margin-top: 1.5rem; font-size: .9rem; color: var(--brand-muted); }
.auth-card .auth-footer a { color: var(--brand-primary); font-weight: 500; text-decoration: none; }

/* Selector de perfil (post-login) */
.profile-picker { width: 100%; max-width: 720px; }
.profile-card {
    background: #fff; border: 2px solid var(--brand-border);
    border-radius: 16px; padding: 1.75rem 1.25rem; text-align: center;
    cursor: pointer; transition: all .2s ease;
    display: flex; flex-direction: column; align-items: center;
    height: 100%;
}
.profile-card:hover {
    border-color: var(--brand-primary); transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.profile-card .p-icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: var(--brand-gradient-soft); color: var(--brand-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin-bottom: 1rem;
}
.profile-card h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.profile-card p { color: var(--brand-muted); font-size: .85rem; margin: 0; }

/* --- Animación reveal on scroll ------------------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: all .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive tweaks ----------------------------------------------------- */
@media (max-width: 991.98px) {
    .hero { padding: 3rem 0 2rem; text-align: center; }
    .hero .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-metrics { justify-content: center; }
    .hero-mockup { margin-top: 3rem; transform: none; }
    .hero-mockup:hover { transform: none; }
    .floating-ball { display: none; }
    .section { padding: 3rem 0; }
    .cta-section { padding: 2.5rem 1.5rem; }
}
@media (max-width: 575.98px) {
    .hero-metrics { flex-direction: column; gap: 1rem; }
    .auth-card { padding: 1.75rem; }
}
