/* ==========================================================
   ENARM PRO — DESIGN SYSTEM v2
========================================================== */

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

/* VARIABLES */
:root {
    --primary:       #1d4ed8;
    --primary-dark:  #1e40af;
    --primary-light: #dbeafe;
    --dark:          #0f172a;
    --slate:         #334155;
    --mid:           #64748b;
    --light:         #94a3b8;
    --border:        #e2e8f0;
    --bg:            #f8fafc;
    --white:         #ffffff;
    --success:       #059669;
    --radius-sm:     8px;
    --radius:        12px;
    --radius-lg:     20px;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
    --shadow:        0 4px 16px rgba(15,23,42,.10);
    --shadow-lg:     0 20px 40px rgba(15,23,42,.15);
    --nav-h:         72px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    padding-top: var(--nav-h);
}

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

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: transparent;
    z-index: 1000;
    transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
}

/* Navbar se vuelve opaca al hacer scroll o cuando no hay hero dark */
.navbar.scrolled {
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow);
}

/* Links blancos sobre el hero oscuro */
.navbar:not(.scrolled) .nav-brand { color: white; }
.navbar:not(.scrolled) .nav-brand span { color: #93c5fd; }
.navbar:not(.scrolled) .nav-links a { color: rgba(255,255,255,.8); }
.navbar:not(.scrolled) .nav-links a:hover { color: white; background: rgba(255,255,255,.1); }
.navbar:not(.scrolled) .btn-nav-ghost { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.3); }
.navbar:not(.scrolled) .btn-nav-ghost:hover { background: rgba(255,255,255,.1); color: white; }
.navbar:not(.scrolled) .hamburger { border-color: rgba(255,255,255,.3); }
.navbar:not(.scrolled) .hamburger span { background: white; }

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 1.5rem;
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: .1rem;
}

.nav-links a {
    padding: 8px 13px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--slate);
    transition: all .2s;
}

.nav-links a:hover { color: var(--primary); background: var(--primary-light); }

.nav-cta { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }

.btn-nav-ghost {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 600;
    color: var(--slate);
    border: 1px solid var(--border);
    transition: all .2s;
    white-space: nowrap;
}

.btn-nav-ghost:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }

.btn-nav-primary {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 700;
    color: var(--white);
    background: var(--primary);
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(29,78,216,.25);
    white-space: nowrap;
}

.btn-nav-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(29,78,216,.35);
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px; height: 42px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 20px; height: 2px;
    background: var(--slate);
    border-radius: 2px;
    transition: all .3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   BOTONES GENERALES
============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    transition: all .25s ease;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(29,78,216,.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29,78,216,.4);
}

.btn-ghost {
    background: rgba(255,255,255,.12);
    color: white;
    border-color: rgba(255,255,255,.35);
}

.btn-ghost:hover {
    background: rgba(255,255,255,.22);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover { background: var(--primary-light); transform: translateY(-2px); }

/* ============================================================
   SECCIONES
============================================================ */
.section {
    padding: 6rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: .75rem;
    color: var(--dark);
    letter-spacing: -.03em;
}

.section-subtitle {
    text-align: center;
    color: var(--mid);
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto 3.5rem;
    line-height: 1.7;
}

/* ============================================================
   HERO — DARK PREMIUM
============================================================ */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
    margin-top: calc(-1 * var(--nav-h));
    padding: calc(var(--nav-h) + 5rem) 1.5rem 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 60%, rgba(29,78,216,.4) 0%, transparent 55%),
        radial-gradient(circle at 85% 15%, rgba(14,165,233,.25) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(29,78,216,.3);
    border: 1px solid rgba(96,165,250,.4);
    color: #93c5fd;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.hero-text h1 {
    font-size: 3.25rem;
    line-height: 1.15;
    font-weight: 900;
    margin-bottom: 1.25rem;
    color: white;
    letter-spacing: -.04em;
}

.hero-text h1 .highlight {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.05rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.75;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.1);
    flex-wrap: wrap;
}

.hero-stat-item { display: flex; flex-direction: column; }

.hero-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -.03em;
}

.hero-stat-label {
    font-size: .7rem;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.hero-img {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img img {
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(0,0,0,.5);
    border: 1px solid rgba(255,255,255,.1);
}

/* ============================================================
   BENEFICIOS
============================================================ */
.beneficios { background: var(--white); }

.beneficios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.5rem;
}

.beneficio-card {
    background: var(--bg);
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.beneficio-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    opacity: 0;
    transition: opacity .3s;
}

.beneficio-card:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow);
    background: var(--white);
}

.beneficio-card:hover::before { opacity: 1; }

.icon-circle {
    width: 48px; height: 48px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1.1rem;
}

.beneficio-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--dark);
    letter-spacing: -.01em;
}

.beneficio-card p {
    font-size: .875rem;
    color: var(--mid);
    line-height: 1.65;
}

.stat-inline {
    display: inline-block;
    margin-top: 8px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: 999px;
}

/* ============================================================
   PRECIOS
============================================================ */
.precios { background: var(--bg); }

.planes { display: flex; justify-content: center; }

.plan.destacado {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.plan-badge {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 6px 24px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    white-space: nowrap;
}

.plan h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mid);
    margin-bottom: .75rem;
    margin-top: 1.75rem;
}

.plan .precio {
    font-size: 4rem;
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
    margin-bottom: .4rem;
    letter-spacing: -.04em;
}

.precio-moneda { font-size: 1.4rem; font-weight: 500; color: var(--light); }

.precio-sub {
    font-size: .8rem;
    color: var(--mid);
    margin-bottom: 2rem;
}

.plan ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    text-align: left;
}

.plan ul li {
    padding: .7rem 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .925rem;
    color: var(--slate);
    line-height: 1.5;
}

.plan ul li:last-child { border-bottom: none; }

.check-icon { color: var(--success); flex-shrink: 0; margin-top: 3px; }

.plan-btn {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 700;
}

.plan-disclaimer {
    max-width: 820px;
    margin: 3rem auto 0;
    padding: 1.5rem 2rem;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: var(--radius);
    text-align: center;
}

.plan-disclaimer p {
    font-size: .75rem;
    color: var(--mid);
    line-height: 1.65;
}

.plan-disclaimer p + p { margin-top: .5rem; }

.plan-disclaimer a { color: var(--primary); font-weight: 600; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
    background: #0a0f1e;
    color: var(--light);
    padding: 4rem 1.5rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
    letter-spacing: -.04em;
    margin-bottom: .75rem;
}

.footer-logo span { color: #60a5fa; }

.footer-brand p {
    font-size: .875rem;
    line-height: 1.7;
    max-width: 280px;
    color: #64748b;
}

.footer-links-group h4 {
    font-size: .7rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.footer-links-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.footer-links-group a {
    font-size: .875rem;
    color: #64748b;
    transition: color .2s;
}

.footer-links-group a:hover { color: #60a5fa; }

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    text-align: center;
}

.footer-bottom p { font-size: .75rem; color: #334155; }

/* ============================================================
   LOGIN CARD (landing)
============================================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f7ff, #e8f0fe);
}

.login-card {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    text-align: center;
}

.login-card h1 { font-size: 1.75rem; font-weight: 800; color: var(--dark); margin-bottom: .5rem; }
.login-card h1 span { color: var(--primary); }
.login-sub { color: var(--mid); font-size: .9rem; margin-bottom: 2rem; }
.login-card form { text-align: left; }
.login-card label { display: block; font-size: .85rem; font-weight: 700; color: var(--dark); margin-bottom: .4rem; }

.login-card input[type="email"],
.login-card input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    margin-bottom: 1.1rem;
    transition: all .2s;
    font-family: inherit;
    background: var(--bg);
    color: var(--dark);
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,.1);
    background: var(--white);
}

.login-card .btn-primary { width: 100%; justify-content: center; font-size: 1rem; padding: 13px; margin-top: .4rem; }

.alert-error {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid #bfdbfe;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.login-foot {
    margin-top: 1.5rem;
    font-size: .875rem;
    color: var(--mid);
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.login-foot a { color: var(--primary); font-weight: 600; }
.login-foot a:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE MOBILE
============================================================ */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-menu {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        gap: .25rem;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        z-index: 999;
    }

    .nav-menu.open { display: flex; }

    .nav-links { flex-direction: column; gap: 0; }
    .nav-links a { display: block; padding: 10px 14px; }

    .nav-cta {
        flex-direction: row;
        padding-top: .75rem;
        border-top: 1px solid var(--border);
        gap: .5rem;
    }

    .btn-nav-ghost,
    .btn-nav-primary {
        flex: 1;
        text-align: center;
        padding: 10px;
        display: block;
    }

    .hero { padding: calc(var(--nav-h) + 3rem) 1rem 3rem; }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-text h1 { font-size: 2.25rem; }
    .hero-sub { font-size: .95rem; max-width: 100%; }
    .hero-badge { justify-content: center; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .hero-img { order: -1; }
    .hero-img img { max-width: 100%; }
    .hero-stats { justify-content: center; gap: 1.5rem; }

    .section { padding: 3.5rem 1rem; }
    .section-title { font-size: 1.8rem; }

    .beneficios-grid { grid-template-columns: repeat(2,1fr); gap: 1rem; }
    .beneficio-card { padding: 1.1rem; }
    .beneficio-card h3 { font-size: .9rem; }
    .beneficio-card p { font-size: .8rem; }

    .plan.destacado { padding: 2rem 1.5rem; }
    .plan .precio { font-size: 3rem; }
    .plan-disclaimer { padding: 1.25rem; }

    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
    .footer-brand p { max-width: 100%; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 2rem; }
    .beneficios-grid { grid-template-columns: 1fr; }
}
