/* ==========================================================================
   POPI FRP XIAOMI  |  assets/css/style.css
   Tema dark tech + acento rojo Popi y plata metalica, glassmorphism.
   ========================================================================== */

/* ------------------------------- 1. TOKENS ------------------------------- */
:root {
    /* Paleta del logo POPI: rojo intenso + plata metalica */
    --primary: #d91414;
    --primary-bright: #e60000;
    --primary-deep: #8f0b0b;
    --secondary: #d1d1d1;
    --secondary-deep: #b3b3b3;

    /* Gradientes reutilizables */
    --grad-primary: linear-gradient(100deg, var(--primary-bright), var(--primary-deep));
    --grad-metal: linear-gradient(100deg, var(--secondary), var(--secondary-deep));
    --grad-brand: linear-gradient(100deg, var(--primary-bright), var(--secondary));

    --bg: #05070a;
    --bg-2: #080b11;
    --panel: #0d1117;
    --panel-2: #121821;
    --panel-3: #171e29;

    --text: #e9eef7;
    --muted: #8c97a8;
    --muted-2: #61708a;

    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .16);

    --primary-soft: rgba(217, 20, 20, .14);
    --primary-line: rgba(217, 20, 20, .35);
    --glow: 0 0 44px rgba(217, 20, 20, .38);
    --shadow: 0 24px 70px rgba(0, 0, 0, .6);

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;

    --nav-h: 74px;
    --container: 1220px;

    --font-display: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Rajdhani', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Consolas, 'Courier New', monospace;

    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-fast: cubic-bezier(.4, 0, .2, 1);
    --ease-spring: cubic-bezier(.175, .885, .32, 1.275);
}

/* ------------------------------- 2. RESET -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 20px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16.5px;
    font-weight: 500;
    line-height: 1.65;
    letter-spacing: .2px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
    margin: 0 0 .6em;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.4px;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1rem; color: var(--muted); }
a { color: inherit; text-decoration: none; transition: color .25s var(--ease-fast); }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--primary); color: #0a0a0a; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #06080c; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-bright), var(--primary-deep));
    border-radius: 20px;
    border: 2px solid #06080c;
}
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ------------------------------ 3. LAYOUT ------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}
.container--narrow { max-width: 900px; }

.section { position: relative; padding: clamp(64px, 9vw, 130px) 0; }
.section--tight { padding-top: clamp(28px, 3vw, 48px); }
.section--alt {
    background:
        radial-gradient(1100px 400px at 50% 0%, rgba(217, 20, 20, .06), transparent 70%),
        linear-gradient(180deg, rgba(255, 255, 255, .012), transparent);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section__head {
    max-width: 760px;
    margin: 0 auto clamp(36px, 5vw, 64px);
    text-align: center;
}
.section__head p { font-size: 1.06rem; }

.section__cta { display: flex; justify-content: center; margin-top: 46px; }
.section__cta[hidden] { display: none; }

/* --------------------------- 4. FONDO GLOBAL ----------------------------- */
.bg-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.bg-grid {
    position: absolute;
    inset: -10%;
    background-image:
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 78%);
}
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .5;
}
.bg-glow--1 {
    width: 780px; height: 780px;
    top: -280px; left: -200px;
    background: radial-gradient(circle, rgba(217, 20, 20, .5), transparent 65%);
    animation: floatSlow 18s ease-in-out infinite;
}
.bg-glow--2 {
    width: 640px; height: 640px;
    bottom: -240px; right: -160px;
    background: radial-gradient(circle, rgba(209, 209, 209, .28), transparent 68%);
    animation: floatSlow 22s ease-in-out infinite reverse;
}
.bg-noise {
    position: absolute;
    inset: 0;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .nav, .footer, .announce-bar { position: relative; z-index: 2; }

/* ---------------------------- 5. COMPONENTES ----------------------------- */
.glass-card {
    position: relative;
    background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--shadow);
}

.text-gradient {
    background: linear-gradient(100deg, var(--primary-bright) 0%, #ff6b6b 28%, var(--secondary) 64%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 14px;
    font-family: var(--font-display);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid var(--primary-line);
    border-radius: 100px;
}
.tag--alt { color: var(--secondary); background: rgba(209, 209, 209, .1); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    font-size: .78rem;
    font-weight: 600;
    border-radius: 100px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
}
.badge--soft { font-size: .74rem; color: var(--muted); }
.badge--live {
    border-color: var(--primary-line);
    background: var(--primary-soft);
    color: #ffd5d5;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-family: var(--font-display);
    font-size: .68rem;
    font-weight: 700;
}
.badge--verified {
    border-color: rgba(60, 210, 130, .35);
    background: rgba(60, 210, 130, .12);
    color: #7ff0b6;
    font-size: .72rem;
}

.neon-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
    animation: neonPulse 1.9s infinite;
}
.dot-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #5df2a0;
    box-shadow: 0 0 10px #5df2a0;
    animation: neonPulse 1.6s infinite;
}

/* --------------------------- 6. BOTONES --------------------------------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    font-family: var(--font-display);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border: 1px solid transparent;
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.btn--lg { padding: 16px 30px; font-size: .86rem; }
.btn--block { width: 100%; }

.btn--primary {
    color: #ffffff;
    background: var(--grad-primary);
    box-shadow: 0 12px 34px rgba(217, 20, 20, .34);
}
.btn--primary::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-18deg);
    transition: left .7s var(--ease);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(217, 20, 20, .5); }
.btn--primary:hover::after { left: 130%; }

.btn--ghost {
    color: var(--text);
    background: rgba(255, 255, 255, .035);
    border-color: var(--line-strong);
}
.btn--ghost:hover {
    border-color: var(--primary-line);
    color: #ffd5d5;
    background: var(--primary-soft);
    transform: translateY(-2px);
}

.btn[disabled], .btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading .btn__label { opacity: .55; }

.spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(0, 0, 0, .25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
.spinner--sm { display: none; width: 14px; height: 14px; }

/* --------------------------- 7. ANUNCIO + NAV ---------------------------- */
.announce-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 18px;
    font-size: .84rem;
    font-weight: 600;
    color: #ffe6cd;
    background: linear-gradient(90deg, rgba(217, 20, 20, .18), rgba(209, 209, 209, .08));
    border-bottom: 1px solid var(--primary-line);
}
.announce-pulse {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--primary);
    animation: neonPulse 1.6s infinite;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 90;
    min-height: var(--nav-h);
    border-bottom: 1px solid transparent;
    transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
}
.nav.is-stuck {
    background: rgba(6, 8, 12, .78);
    border-bottom-color: var(--line);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: var(--nav-h);
}
.nav__progress {
    position: absolute;
    left: 0; bottom: -1px;
    height: 2px;
    width: 0;
    background: var(--grad-primary);
    box-shadow: 0 0 14px var(--primary);
    transition: width .15s linear;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 14px;
    background: rgba(217, 20, 20, .08);
    border: 1px solid var(--primary-line);
    box-shadow: inset 0 0 22px rgba(217, 20, 20, .16);
}
/* Logo POPI (assets/POPI.jpg): caja cuadrada de 40px recortada con cover */
.brand__logo {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #0b0e13;
    border: 1px solid var(--primary-line);
    box-shadow: 0 0 20px rgba(217, 20, 20, .38);
    transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.brand:hover .brand__logo { transform: scale(1.04); box-shadow: 0 0 26px rgba(217, 20, 20, .55); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text b {
    font-family: var(--font-display);
    font-size: .96rem;
    font-weight: 700;
    letter-spacing: .4px;
}
.brand__text small {
    font-size: .66rem;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.brand--footer b { font-family: var(--font-display); font-size: 1.05rem; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
    position: relative;
    padding: 10px 14px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--muted);
    border-radius: 10px;
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-primary);
    box-shadow: 0 0 12px var(--primary);
}

.nav__auth { display: flex; align-items: center; gap: 10px; }
.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    cursor: pointer;
}
.nav__burger span {
    display: block;
    width: 20px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Chip de usuario */
.user-chip { position: relative; }
.user-chip__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line-strong);
    border-radius: 100px;
    cursor: pointer;
    transition: border-color .25s var(--ease), background .25s var(--ease);
}
.user-chip__btn:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.user-chip__avatar {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    font-family: var(--font-display);
    font-weight: 700;
    color: #ffffff;
    background: var(--grad-primary);
}
.user-chip__meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-chip__meta b { font-size: .86rem; }
.user-chip__meta small { font-size: .72rem; color: var(--primary); font-weight: 700; }
.user-chip__menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 216px;
    padding: 8px;
    display: grid;
    gap: 2px;
    background: rgba(11, 14, 20, .96);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .28s var(--ease);
}
.user-chip.is-open .user-chip__menu { opacity: 1; visibility: visible; transform: none; }
.user-chip__menu a {
    padding: 10px 12px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--muted);
    border-radius: 10px;
}
.user-chip__menu a:hover { color: var(--text); background: rgba(217, 20, 20, .12); }

/* ------------------------------- 8. HERO -------------------------------- */
.hero {
    position: relative;
    padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 5vw, 72px);
    overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--hero-image, none);
    background-size: cover;
    background-position: center;
    opacity: .22;
    mask-image: radial-gradient(circle at 60% 40%, #000 10%, transparent 75%);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero__grid {
    position: absolute;
    left: -30%; right: -30%;
    bottom: -12%;
    height: 66%;
    background-image:
        linear-gradient(rgba(217, 20, 20, .18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(217, 20, 20, .18) 1px, transparent 1px);
    background-size: 62px 62px;
    transform: perspective(560px) rotateX(66deg);
    transform-origin: bottom center;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, .95), transparent 74%);
    animation: gridScroll 6.5s linear infinite;
    opacity: .55;
}

.speed-lines { position: absolute; inset: 0; overflow: hidden; }
.speed-lines span {
    position: absolute;
    top: var(--top);
    left: -45%;
    width: var(--w);
    height: 1.4px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(217, 20, 20, .85) 45%, rgba(255, 190, 120, .9), transparent);
    filter: blur(.2px);
    opacity: 0;
    animation: speedLine var(--dur) linear infinite;
    animation-delay: var(--delay);
}
.speed-lines--soft span { opacity: .28; animation-duration: 4s; }

.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}
.hero__orb--1 {
    width: 480px; height: 480px;
    top: -120px; right: 4%;
    background: radial-gradient(circle, rgba(217, 20, 20, .35), transparent 68%);
    animation: floatSlow 16s ease-in-out infinite;
}
.hero__orb--2 {
    width: 380px; height: 380px;
    bottom: -120px; left: 2%;
    background: radial-gradient(circle, rgba(209, 209, 209, .22), transparent 70%);
    animation: floatSlow 20s ease-in-out infinite reverse;
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: clamp(28px, 4vw, 64px);
    align-items: center;
}
.hero__content { animation: fadeUp .9s var(--ease) both; }
.hero__title { margin-bottom: 18px; }
.hero__title .text-gradient { display: block; }
.hero__subtitle { max-width: 640px; font-size: 1.1rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.hero__features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}
.hero__features li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--muted);
}
.hero__features svg { color: var(--primary); flex: none; }

.hero__panel {
    display: grid;
    gap: 18px;
    animation: fadeUp 1.1s var(--ease) both;
}

/* Tarjeta de servidores */
.servers-card { padding: 24px; }
.servers-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(130deg, rgba(217, 20, 20, .55), transparent 45%, rgba(209, 209, 209, .3));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.servers-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.servers-card__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffc9c9;
}
.servers-card__status {
    padding: 4px 10px;
    font-family: var(--font-display);
    font-size: .62rem;
    letter-spacing: 2px;
    color: #7ff0b6;
    background: rgba(60, 210, 130, .12);
    border: 1px solid rgba(60, 210, 130, .3);
    border-radius: 100px;
}
.servers-card__value {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}
.servers-card__value span {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 3.4rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(100deg, #fff, var(--secondary) 60%, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 38px rgba(217, 20, 20, .55);
    animation: neonText 2.6s ease-in-out infinite;
}
.servers-card__value small {
    font-size: .78rem;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.servers-card__bar {
    height: 6px;
    border-radius: 100px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
    margin-bottom: 14px;
}
.servers-card__bar span {
    display: block;
    height: 100%;
    width: 80%;
    border-radius: 100px;
    background: var(--grad-primary);
    box-shadow: 0 0 16px var(--primary);
    transition: width .8s var(--ease);
}
.servers-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: .82rem;
    color: var(--muted);
}
.servers-card__foot b { color: var(--text); }
.live-tag { display: inline-flex; gap: 6px; align-items: center; color: var(--muted-2); }

/* Consola */
.console-card { padding: 0; overflow: hidden; }
.console-card__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .03);
    border-bottom: 1px solid var(--line);
}
.c-dot { width: 10px; height: 10px; border-radius: 50%; }
.c-dot--r { background: #ff5f57; }
.c-dot--y { background: #febc2e; }
.c-dot--g { background: #28c840; }
.console-card__title {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: .74rem;
    color: var(--muted-2);
}
.console-card__body {
    margin: 0;
    padding: 18px;
    min-height: 178px;
    font-family: var(--font-mono);
    font-size: .78rem;
    line-height: 1.85;
    color: #b8e6c6;
    white-space: pre-wrap;
    word-break: break-word;
}
.console-card__body .ln-cmd { color: var(--secondary); }
.console-card__body .ln-ok { color: #7ff0b6; }
.console-card__body .ln-done { color: #ffdede; }
.console-card__body .caret {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: var(--primary);
    animation: blink 1s steps(2) infinite;
    vertical-align: -2px;
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: clamp(34px, 5vw, 58px);
    padding: 26px 24px;
    border-radius: var(--radius);
}
.stat { text-align: center; }
.stat b {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 900;
    letter-spacing: -.5px;
}
.gradient-number {
    background: linear-gradient(100deg, #fff, var(--secondary) 70%, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.stat span {
    font-size: .8rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--muted-2);
}

/* ----------------------------- 9. MARCAS -------------------------------- */
.brands { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .012); }
.brands__track {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 26px;
    padding: 20px 24px;
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--muted-2);
}
/* Nombres de dispositivo con acabado metalico (plata del logo) */
.brands__track span:not(.brands__sep) {
    background: linear-gradient(100deg, var(--text), var(--secondary) 55%, var(--secondary-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.brands__sep { color: var(--primary); opacity: .6; font-size: .6rem; }

/* ---------------------------- 10. FEATURES ------------------------------ */
/* Cuadricula de "La Herramienta": columnas automaticas y tarjetas de altura
   uniforme. Las tarjetas usan flex en columna para que el contenido nunca
   se desborde y los espacios internos sean consistentes. */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.feature {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.feature::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(420px 200px at 10% 0%, rgba(217, 20, 20, .16), transparent 70%);
    opacity: 0;
    transition: opacity .4s var(--ease);
    pointer-events: none;
}
.feature:hover { transform: translateY(-6px); border-color: var(--primary-line); box-shadow: 0 30px 70px rgba(0, 0, 0, .6), var(--glow); }
.feature:hover::after { opacity: 1; }

/* El resplandor queda por detras del contenido de la tarjeta */
.feature > * { position: relative; z-index: 1; }

/* Cabecera de la tarjeta: icono + titulo sin margenes heredados */
.feature__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: none;
    margin: 0 0 16px;
    color: var(--primary);
    background: rgba(217, 20, 20, .1);
    border: 1px solid var(--primary-line);
    border-radius: 16px;
    box-shadow: inset 0 0 24px rgba(217, 20, 20, .14);
}

.feature h3,
.feature h4 {
    margin: 0 0 10px;
    font-size: 1.06rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.feature p {
    margin: 0 0 14px;
    font-size: .9rem;
    line-height: 1.6;
    color: var(--muted);
    overflow-wrap: anywhere;
}

/* El pie de la tarjeta se ancla abajo para alinear todas las filas */
.feature__meta {
    display: inline-block;
    margin-top: auto;
    padding-top: 4px;
    font-size: .74rem;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.feature__link {
    margin-top: auto;
    padding-top: 4px;
    font-size: .88rem;
    font-weight: 700;
    color: var(--primary);
}
.feature__link:hover { color: var(--primary-bright); }

/* La tarjeta que combina texto + enlace mantiene el pie alineado */
.feature .feature__meta + .feature__link { margin-top: 8px; }

/* ------------------------------ 11. PASOS ------------------------------- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
}
.steps::before {
    content: '';
    position: absolute;
    top: 44px; left: 6%; right: 6%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-line), transparent);
}
.step {
    position: relative;
    padding: 26px 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.step:hover { transform: translateY(-6px); border-color: var(--primary-line); }
.step__num {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-weight: 900;
    color: #ffffff;
    background: var(--grad-primary);
    border-radius: 14px;
    box-shadow: 0 0 26px rgba(217, 20, 20, .4);
}
.step h3 { font-size: 1.04rem; }
.step p { font-size: .93rem; margin: 0; }

/* ----------------------------- 12. PRECIOS ------------------------------ */
.pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: stretch;
}
.price-card {
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    text-align: center;
    transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.price-card:hover { transform: translateY(-6px); border-color: var(--primary-line); }
.price-card--featured {
    border-color: var(--primary-line);
    box-shadow: 0 30px 80px rgba(217, 20, 20, .18), var(--shadow);
    transform: scale(1.03);
}
.price-card--featured:hover { transform: scale(1.03) translateY(-6px); }
.price-card__ribbon {
    position: absolute;
    top: 18px; right: -34px;
    width: 140px;
    padding: 5px 0;
    font-family: var(--font-display);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--grad-primary);
    transform: rotate(38deg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}
.price-card h3 { font-size: 1.05rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.price-card__amount { display: flex; flex-direction: column; align-items: center; margin: 10px 0 22px; }
.price-card__amount b {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(100deg, #fff, var(--secondary) 70%, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.price-card__amount span {
    font-size: .78rem;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.price-card ul { display: grid; gap: 11px; margin-bottom: 26px; text-align: left; }
.price-card li {
    position: relative;
    padding-left: 26px;
    font-size: .95rem;
    color: var(--muted);
}
.price-card li::before {
    content: '';
    position: absolute;
    left: 0; top: 7px;
    width: 14px; height: 8px;
    border-left: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(-45deg);
}
.price-card .btn { margin-top: auto; }
.pricing__note {
    margin: 30px auto 0;
    max-width: 720px;
    text-align: center;
    font-size: .92rem;
    color: var(--muted-2);
}

/* ---------------------------- 13. RESELLERS ----------------------------- */
.reseller-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.reseller-card {
    display: flex;
    flex-direction: column;
    padding: 24px 22px;
    overflow: hidden;
    transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.reseller-card__glow {
    position: absolute;
    inset: -40% -40% auto -40%;
    height: 70%;
    background: radial-gradient(circle at 50% 100%, rgba(217, 20, 20, .22), transparent 70%);
    opacity: 0;
    transition: opacity .4s var(--ease);
    pointer-events: none;
}
.reseller-card:hover { transform: translateY(-6px); border-color: var(--primary-line); box-shadow: 0 28px 70px rgba(0, 0, 0, .55), var(--glow); }
.reseller-card:hover .reseller-card__glow { opacity: 1; }
.reseller-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.reseller-card__logo {
    display: grid;
    place-items: center;
    width: 66px; height: 66px;
    flex: none;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line-strong);
}
.reseller-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.reseller-card__initials {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    background: var(--grad-primary);
    width: 100%; height: 100%;
    display: grid;
    place-items: center;
}
.reseller-card__title h3 { margin: 0 0 6px; font-size: 1.02rem; }
.reseller-card__desc { flex: 1; font-size: .92rem; margin-bottom: 18px; }
.reseller-card__socials { display: flex; gap: 10px; flex-wrap: wrap; }
.reseller-card__no-contact { font-size: .85rem; color: var(--muted-2); }

.social-btn {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 13px;
    color: var(--muted);
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line-strong);
    transition: transform .3s var(--ease), color .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.social-btn:hover { transform: translateY(-3px); color: #fff; }
.social-btn--wa:hover { background: #25d366; border-color: #25d366; box-shadow: 0 10px 24px rgba(37, 211, 102, .38); }
.social-btn--tg:hover { background: #29a9eb; border-color: #29a9eb; box-shadow: 0 10px 24px rgba(41, 169, 235, .38); }
.social-btn--fb:hover { background: #1877f2; border-color: #1877f2; box-shadow: 0 10px 24px rgba(24, 119, 242, .38); }
.social-btn--web:hover { background: var(--primary); border-color: var(--primary); box-shadow: 0 10px 24px rgba(217, 20, 20, .4); }

.info-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; }
.info-card { padding: 32px 30px; }
.info-card--accent { border-color: var(--primary-line); background: linear-gradient(160deg, rgba(217, 20, 20, .12), rgba(255, 255, 255, .012)); }
.info-list { display: grid; gap: 12px; }
.info-list li { position: relative; padding-left: 22px; font-size: .96rem; color: var(--muted); }
.info-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 10px;
    width: 8px; height: 8px;
    border-radius: 2px;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
}
.info-card__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; }
.info-card__note { font-size: .86rem; color: var(--muted-2); margin: 0; }

/* ------------------------------- 14. FAQ -------------------------------- */
.faq { display: grid; gap: 12px; }
.faq__item {
    padding: 4px 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .3s var(--ease), background .3s var(--ease);
}
.faq__item[open] { border-color: var(--primary-line); background: linear-gradient(160deg, rgba(217, 20, 20, .08), rgba(255, 255, 255, .012)); }
.faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 600;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary i {
    position: relative;
    flex: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1px solid var(--primary-line);
    background: var(--primary-soft);
}
.faq__item summary i::before,
.faq__item summary i::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 9px; height: 1.8px;
    background: var(--primary);
    transform: translate(-50%, -50%);
    transition: transform .3s var(--ease);
}
.faq__item summary i::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] summary i::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__item p { margin: 0 0 18px; font-size: .96rem; }

/* ----------------------------- 15. CTA BAND ------------------------------ */
.cta-band { padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 100px); }
.cta-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding: 40px 44px;
    border-color: var(--primary-line);
    background:
        radial-gradient(600px 240px at 15% 120%, rgba(217, 20, 20, .2), transparent 70%),
        linear-gradient(150deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .01));
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { margin: 0; }

/* ------------------------------ 16. FOOTER ------------------------------ */
.footer {
    padding: clamp(48px, 6vw, 78px) 0 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent 40%), #04060a;
    border-top: 1px solid var(--line);
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 34px;
}
.footer__col h4 {
    margin-bottom: 16px;
    font-size: .78rem;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.footer__col a {
    display: block;
    padding: 6px 0;
    font-size: .95rem;
    color: var(--muted);
}
.footer__col a:hover { color: var(--primary); }
.footer__col--brand p { margin: 18px 0; max-width: 340px; font-size: .95rem; }
.footer__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: .84rem;
    color: var(--muted-2);
}
.footer__legal { max-width: 620px; text-align: right; }

.float-support {
    position: fixed;
    right: 22px; bottom: 22px;
    z-index: 80;
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    color: #06210f;
    background: linear-gradient(120deg, #4ff08a, #25d366);
    border-radius: 50%;
    box-shadow: 0 16px 36px rgba(37, 211, 102, .35);
    animation: floatY 3.4s ease-in-out infinite;
}
.float-support:hover { transform: scale(1.06); }

/* ------------------------------ 17. MODALES ----------------------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: grid;
    place-items: center;
    padding: 22px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .32s var(--ease), visibility .32s var(--ease);
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; visibility: visible; }
.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 8, .74);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.modal__card {
    position: relative;
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    width: min(1000px, 100%);
    max-height: min(92vh, 780px);
    overflow: hidden auto;
    background: linear-gradient(150deg, rgba(20, 25, 33, .95), rgba(8, 11, 16, .97));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 120px rgba(0, 0, 0, .75);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    opacity: 0;
    transform: translateY(26px) scale(.95);
    transition: opacity .3s var(--ease), transform .55s var(--ease-spring);
}

/* .is-active es la clase que dispara la entrada con efecto rebote (spring).
   .is-open se mantiene por retrocompatibilidad con el JS anterior. */
.modal.is-active .modal__card,
.modal.is-open .modal__card {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.modal.is-active,
.modal.is-open { opacity: 1; visibility: visible; }

/* ------------------- MODALES DE LOGIN Y REGISTRO (compactos) ------------- */
/* Card reducida a 420px, sin panel lateral y con paddings ajustados para
   que el formulario quede a la vista sin scroll en movil. */
.modal__card--auth {
    grid-template-columns: 1fr;
    width: min(420px, 100%);
    max-height: min(94vh, 700px);
    border-radius: 22px;
}
.modal__card--auth .modal__aside { display: none; }
.modal__card--auth .modal__body { padding: 30px 26px 26px; }
.modal__card--auth .modal__head { margin-bottom: 20px; }
.modal__card--auth .modal__head h2 { font-size: 1.4rem; margin-bottom: 6px; }
.modal__card--auth .modal__head p { font-size: .89rem; }
.modal__card--auth .modal__head .tag { margin-bottom: 12px; font-size: .62rem; padding: 5px 12px; }
.modal__card--auth .form { gap: 14px; }
.modal__card--auth .form__grid { grid-template-columns: 1fr; gap: 14px; }
.modal__card--auth .field > label { font-size: .74rem; }
.modal__card--auth .field__control { border-radius: 12px; }
.modal__card--auth .field__control input { padding: 12px 0; font-size: .96rem; }
.modal__card--auth .modal__close { top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px; }
.modal__card--auth .modal__switch { margin-top: 16px; font-size: .89rem; }
.modal__card--auth .check--terms { font-size: .84rem; }
.modal__card--auth .btn--lg { padding: 14px 22px; font-size: .8rem; }

/* Para volver a mostrar el panel lateral informativo en escritorio,
   sustituye "display:none" por "display:flex" en la regla anterior y
   devuelve a .modal__card--auth un width mayor (ej. 860px). */
.modal__close {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    color: var(--muted);
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    cursor: pointer;
    transition: all .25s var(--ease);
}
.modal__close:hover { color: #fff; background: rgba(255, 60, 60, .22); border-color: rgba(255, 90, 90, .5); transform: rotate(90deg); }

.modal__aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 46px 34px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(217, 20, 20, .22), rgba(255, 255, 255, .02) 55%), #0a0d13;
    border-right: 1px solid var(--line);
}
.modal__aside--alt { background: linear-gradient(160deg, rgba(209, 209, 209, .18), rgba(255, 255, 255, .02) 55%), #0a0d13; }
.aside__glow {
    position: absolute;
    width: 420px; height: 420px;
    top: -160px; left: -140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 20, 20, .45), transparent 68%);
    filter: blur(60px);
    animation: floatSlow 14s ease-in-out infinite;
}
.modal__aside h3 { position: relative; font-size: 1.5rem; }
.aside__list { position: relative; display: grid; gap: 12px; }
.aside__list li {
    position: relative;
    padding-left: 24px;
    font-size: .93rem;
    color: #d9dee8;
}
.aside__list li::before {
    content: '';
    position: absolute;
    left: 0; top: 8px;
    width: 12px; height: 7px;
    border-left: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(-45deg);
}
.aside__price {
    position: relative;
    margin-top: auto;
    padding: 14px 16px;
    border: 1px dashed var(--primary-line);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, .25);
}
.aside__price small { display: block; font-size: .74rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted-2); }
.aside__price b { font-family: var(--font-display); font-size: 1.15rem; color: var(--secondary); }

.modal__body { padding: 40px 38px; }
.modal__head { margin-bottom: 24px; }
.modal__head h2 { font-size: 1.7rem; margin-bottom: 8px; }
.modal__head p { font-size: .95rem; margin: 0; }
.modal__switch { margin: 20px 0 0; font-size: .93rem; text-align: center; color: var(--muted); }
.modal__switch a { font-weight: 700; color: var(--primary); }
.modal__switch a:hover { color: var(--primary-bright); }
.modal__switch--muted { margin-top: 10px; font-size: .85rem; color: var(--muted-2); }

/* Aviso informativo dentro del modal de recuperacion */
.recover-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    font-size: .84rem;
    line-height: 1.55;
    color: var(--muted);
    background: rgba(217, 20, 20, .07);
    border: 1px solid var(--primary-line);
    border-radius: 12px;
}
.recover-note svg { flex: none; margin-top: 2px; color: var(--primary); }
.recover-note b { color: var(--text); }

.recover-debug {
    margin-top: 12px;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: .74rem;
    word-break: break-all;
    color: #a8e8c4;
    background: rgba(60, 210, 130, .1);
    border: 1px solid rgba(60, 210, 130, .35);
    border-radius: 10px;
}

/* --------------------------- 18. FORMULARIOS ---------------------------- */
.form { display: grid; gap: 16px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form__link { font-size: .88rem; font-weight: 600; color: var(--primary); }
.form__link:hover { color: var(--secondary); }

.field { display: grid; gap: 8px; }
.field > label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.field__control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.field__control:focus-within {
    border-color: var(--primary);
    background: rgba(217, 20, 20, .07);
    box-shadow: 0 0 0 4px rgba(217, 20, 20, .12);
}
.field__icon { color: var(--muted-2); flex: none; }
.field__control input,
.field__control textarea,
.field__control select {
    flex: 1;
    min-width: 0;
    padding: 14px 0;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
}
.field__control input::placeholder { color: var(--muted-2); font-weight: 500; }
.field__control select option { background: #0d1117; color: var(--text); }
.field__toggle {
    display: grid;
    place-items: center;
    padding: 6px;
    color: var(--muted-2);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color .25s var(--ease);
}
.field__toggle:hover { color: var(--primary); }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check input {
    appearance: none;
    width: 20px; height: 20px;
    flex: none;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
    transition: all .25s var(--ease);
}
.check input:checked {
    background: var(--grad-primary);
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(217, 20, 20, .18);
}
.check input:checked::after {
    content: '';
    display: block;
    width: 5px; height: 9px;
    margin: 3px 0 0 6px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(42deg);
}
.check--terms { align-items: flex-start; font-size: .88rem; line-height: 1.5; }

.form__msg {
    display: none;
    padding: 12px 14px;
    font-size: .92rem;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid transparent;
}
.form__msg.is-visible { display: block; animation: fadeUp .35s var(--ease); }
.form__msg.is-error { color: #ffb4b4; background: rgba(255, 70, 70, .12); border-color: rgba(255, 90, 90, .4); }
.form__msg.is-success { color: #9df7c4; background: rgba(60, 210, 130, .12); border-color: rgba(60, 210, 130, .4); }

/* ---------------------------- 19. PAGINA HERO --------------------------- */
.page-hero {
    position: relative;
    padding: clamp(38px, 5vw, 66px) 0 clamp(28px, 4vw, 46px);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: radial-gradient(900px 320px at 20% 0%, rgba(217, 20, 20, .12), transparent 70%);
}
.page-hero__fx { position: absolute; inset: 0; overflow: hidden; }
.page-hero__head { max-width: 720px; }
.page-hero__head h1 { margin-bottom: 12px; }
.page-hero__tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 30px;
    padding: 16px 20px;
    border-radius: var(--radius);
}
.page-hero__count { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--muted); }
.page-hero__count b { color: var(--secondary); font-family: var(--font-display); }

.breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: .86rem; color: var(--muted-2); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb b { color: var(--text); font-weight: 700; }

.search-field {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 520px;
    padding: 4px 16px;
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--line-strong);
    border-radius: 100px;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(217, 20, 20, .12); }
.search-field svg { color: var(--muted-2); flex: none; }
.search-field input {
    flex: 1;
    min-width: 0;
    padding: 12px 0;
    font-family: var(--font-body);
    font-size: .98rem;
    font-weight: 600;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
}
.search-field.is-loading .spinner--sm { display: inline-block; }

/* --------------------------- 20. ESTADOS VACIOS ------------------------- */
.empty-state { display: grid; place-items: center; padding: 20px 0; }
.empty-state[hidden] { display: none; }
.empty-state__card {
    display: grid;
    place-items: center;
    gap: 10px;
    width: min(560px, 100%);
    padding: 46px 34px;
    text-align: center;
}
.empty-state svg { color: var(--primary); }
.empty-state h3 { margin: 6px 0 0; }

/* ------------------------------ 21. TOASTS ------------------------------ */
.toasts {
    position: fixed;
    right: 22px; bottom: 92px;
    z-index: 200;
    display: grid;
    gap: 12px;
    width: min(360px, calc(100vw - 44px));
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    font-size: .93rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(13, 17, 23, .96);
    border: 1px solid var(--line-strong);
    border-left: 3px solid var(--primary);
    border-radius: 14px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    animation: toastIn .45s var(--ease) both;
    pointer-events: auto;
}
.toast.is-out { animation: toastOut .35s var(--ease) both; }
.toast--success { border-left-color: #3cd282; }
.toast--error { border-left-color: #ff5252; }
.toast__icon { flex: none; margin-top: 2px; }
.toast--success .toast__icon { color: #3cd282; }
.toast--error .toast__icon { color: #ff5252; }
.toast--info .toast__icon { color: var(--primary); }

/* --------------------------- 22. ANIMACIONES ---------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes floatSlow {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(24px, -28px, 0) scale(1.06); }
}
@keyframes floatY { 50% { transform: translateY(-8px); } }
@keyframes neonPulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 20, 20, .65); }
    70% { box-shadow: 0 0 0 16px rgba(217, 20, 20, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 20, 20, 0); }
}
@keyframes neonText {
    0%, 100% { text-shadow: 0 0 32px rgba(217, 20, 20, .45); }
    50% { text-shadow: 0 0 52px rgba(217, 20, 20, .8); }
}
@keyframes gridScroll { to { background-position: 0 62px, 62px 0; } }
@keyframes speedLine {
    0% { transform: translateX(0) scaleX(.35); opacity: 0; }
    12% { opacity: .75; }
    100% { transform: translateX(230vw) scaleX(1.5); opacity: 0; }
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------------------------- 23. RESPONSIVE ---------------------------- */
@media (max-width: 1100px) {
    .hero__inner { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .reseller-grid { grid-template-columns: repeat(3, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .steps::before { display: none; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
    .nav__links {
        position: fixed;
        inset: calc(var(--nav-h)) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 18px 22px 26px;
        background: rgba(6, 9, 13, .97);
        border-bottom: 1px solid var(--line);
        backdrop-filter: blur(20px);
        transform: translateY(-140%);
        transition: transform .4s var(--ease);
    }
    .nav__links.is-open { transform: none; }
    .nav__link { padding: 14px 12px; font-size: 1.02rem; }
    .nav__link.is-active::after { display: none; }
    .nav__burger { display: inline-flex; }
    .nav__auth .btn { padding: 10px 16px; font-size: .72rem; }
    /* Los modales de autenticacion ya son compactos (columna unica).
       Aqui solo se ajusta el modal generico del panel. */
    .modal__card:not(.modal__card--auth) { grid-template-columns: 1fr; max-height: 94vh; }
    .modal__card:not(.modal__card--auth) .modal__aside { display: none; }
    .modal__card:not(.modal__card--auth) .modal__body { padding: 34px 26px; }
    .reseller-grid, .pricing { grid-template-columns: repeat(2, 1fr); }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .cta-band__inner { flex-direction: column; text-align: center; padding: 34px 26px; }
}

@media (max-width: 760px) {
    body { font-size: 16px; }
    .container { padding: 0 18px; }
    .reseller-grid, .pricing, .info-grid, .steps { grid-template-columns: 1fr; }
    .price-card--featured { transform: none; }
    .price-card--featured:hover { transform: translateY(-6px); }
    .stat-strip { padding: 22px 16px; }
    .brand__text small { display: none; }
    .user-chip__meta { display: none; }
    .page-hero__tools { flex-direction: column; align-items: stretch; }
    .search-field { max-width: none; }
    .page-hero__count { justify-content: center; }
    .footer__grid { grid-template-columns: 1fr; gap: 26px; }
    .footer__legal { text-align: left; }
    .form__grid { grid-template-columns: 1fr; }
    .toasts { right: 14px; left: 14px; bottom: 86px; width: auto; }
    .nav__auth { gap: 6px; }
    .nav__auth > .btn:not(.nav__burger) { display: none; }
    .nav__auth .user-chip { display: none; }
}

@media (max-width: 520px) {
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { width: 100%; }
    .modal { padding: 12px; }
    .modal__card:not(.modal__card--auth) .modal__body { padding: 30px 20px; }
    .modal__card--auth .modal__body { padding: 26px 20px 22px; }
    .float-support { right: 14px; bottom: 14px; width: 50px; height: 50px; }
}

/* --------------------- 23.b PAGINA DE RESETEO -------------------------- */
.reset-page { padding-top: clamp(34px, 5vw, 62px); }
.reset-card {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    padding: 38px 36px 32px;
    overflow: hidden;
    text-align: center;
}
.reset-card__glow {
    position: absolute;
    top: -180px; left: 50%;
    width: 460px; height: 460px;
    margin-left: -230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 20, 20, .38), transparent 68%);
    filter: blur(50px);
    pointer-events: none;
}
.reset-card__glow--error { background: radial-gradient(circle, rgba(255, 90, 90, .32), transparent 68%); }
.reset-card__head { position: relative; margin-bottom: 26px; }
.reset-card__head h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-bottom: 10px; }
.reset-card__head p { font-size: .95rem; margin: 0; }
.reset-card .form { position: relative; text-align: left; }
.reset-card .form__msg { text-align: left; }
.reset-card .modal__switch { position: relative; }

.reset-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px; height: 64px;
    margin: 0 auto 20px;
    border-radius: 20px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .04);
}
.reset-icon--error {
    color: #ffb4b4;
    border-color: rgba(255, 90, 90, .4);
    background: rgba(255, 70, 70, .12);
    box-shadow: 0 0 34px rgba(255, 70, 70, .22);
}

.reset-rules,
.reset-tips {
    display: grid;
    gap: 8px;
    margin: 4px 0 0;
    padding: 0;
    text-align: left;
}
.reset-rules li,
.reset-tips li {
    position: relative;
    padding-left: 22px;
    font-size: .84rem;
    line-height: 1.5;
    color: var(--muted-2);
}
.reset-rules li::before {
    content: '';
    position: absolute;
    left: 0; top: 6px;
    width: 10px; height: 6px;
    border-left: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(-45deg);
}
.reset-tips li::before {
    content: '';
    position: absolute;
    left: 4px; top: 7px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}
.reset-tips { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.reset-tips b { color: var(--text); }

.reset-card--error { text-align: center; }
.reset-card--error h1 { font-size: clamp(1.5rem, 3.6vw, 1.95rem); margin-bottom: 12px; }
.reset-card--error > p { max-width: 430px; margin: 0 auto 24px; font-size: .95rem; }
.reset-card__actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

@media (max-width: 560px) {
    .reset-card { padding: 30px 22px 26px; }
    .reset-card__actions { flex-direction: column; }
    .reset-card__actions .btn { width: 100%; }
}

/* --------------------- 24. INFORME DEL PROYECTO ------------------------ */
.report-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
.report-stat {
    padding: 20px 16px;
    text-align: center;
    border-radius: var(--radius);
    transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.report-stat:hover { transform: translateY(-4px); border-color: var(--primary-line); }
.report-stat b {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.15;
    background: linear-gradient(100deg, #fff, var(--secondary) 75%, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.report-stat span {
    display: block;
    margin-top: 6px;
    font-size: .74rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.report-stat .report-warn {
    background: linear-gradient(100deg, #ffd479, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
}

.report-panel { padding: 20px 22px; border-radius: var(--radius); margin-bottom: 18px; }
.report-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.report-panel__head h3 { margin: 0; font-size: 1.05rem; }

.audit-row {
    display: grid;
    grid-template-columns: 30px 250px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
}
.audit-row:last-child { border-bottom: 0; }
.audit-row--ok .audit-row__mark { color: #7ff0b6; border-color: rgba(60, 210, 130, .4); background: rgba(60, 210, 130, .12); }
.audit-row--bad .audit-row__mark { color: #ffb4b4; border-color: rgba(255, 90, 90, .4); background: rgba(255, 70, 70, .12); }
.audit-row--bad .audit-row__label { color: #ffd0d0; }
.audit-row__mark {
    display: grid;
    place-items: center;
    width: 24px; height: 24px;
    font-size: .72rem;
    font-weight: 700;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .05);
}
.audit-row__mark--todo { color: var(--primary); border-color: var(--primary-line); background: var(--primary-soft); }
.audit-row__label { font-weight: 700; font-size: .95rem; }
.audit-row__detail { font-size: .92rem; color: var(--muted); }
.audit-row__tag {
    padding: 3px 10px;
    font-size: .68rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted-2);
    border: 1px solid var(--line);
    border-radius: 100px;
    white-space: nowrap;
}
.layout-row { grid-template-columns: 30px 1fr; }
.layout-row .audit-row__detail { color: var(--muted); }

.report-group { margin-bottom: 42px; }
.report-group__head { margin-bottom: 18px; }
.report-group__head h3 {
    display: inline-block;
    margin: 0 0 6px;
    padding-left: 14px;
    font-size: 1.15rem;
    border-left: 3px solid var(--primary);
}
.report-group__head span { display: block; font-size: .92rem; color: var(--muted-2); }
.report-files { display: grid; gap: 14px; }
.report-file { padding: 18px 20px; border-radius: var(--radius); transition: border-color .3s var(--ease), transform .3s var(--ease); }
.report-file:hover { border-color: var(--primary-line); transform: translateX(4px); }
.report-file__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.report-file__path {
    padding: 5px 11px;
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--secondary);
    background: rgba(217, 20, 20, .1);
    border: 1px solid var(--primary-line);
    border-radius: 8px;
}
.report-file__meta { margin-left: auto; font-size: .78rem; color: var(--muted-2); white-space: nowrap; }
.report-file__desc { margin: 0; font-size: .95rem; }
.report-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.chip {
    padding: 3px 10px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .6px;
    color: var(--muted);
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line);
    border-radius: 100px;
}

.report-flows { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.report-flow {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius);
}
.report-flow__num {
    flex: none;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1.4px var(--primary);
}
.report-flow h3 { margin-bottom: 6px; font-size: 1rem; }
.report-flow p { margin: 0; font-size: .93rem; }
.report-tables { display: grid; gap: 18px; }
.report-tables code { color: var(--secondary); }

/* Paleta antes / despues */
.swatch {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    vertical-align: -6px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
}
.swatch--old { opacity: .55; filter: saturate(.7); }

/* Bloques de codigo antes / despues */
.report-diff {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
.report-code {
    position: relative;
    padding: 40px 18px 18px;
    overflow: hidden;
    border-radius: var(--radius);
}
.report-code pre {
    margin: 0;
    max-height: 420px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: .76rem;
    line-height: 1.65;
    color: #b9c4d4;
    white-space: pre;
    tab-size: 4;
}
.report-code--before { border-color: rgba(255, 90, 90, .28); }
.report-code--before pre { color: #d9a2a2; }
.report-code--after { border-color: rgba(60, 210, 130, .3); }
.report-code--after pre { color: #a8e8c4; }
.report-code__tag {
    position: absolute;
    top: 12px;
    left: 16px;
    padding: 3px 10px;
    font-family: var(--font-display);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    border-radius: 100px;
    border: 1px solid var(--line-strong);
    color: var(--muted);
}
.report-code--before .report-code__tag { color: #ffb4b4; border-color: rgba(255, 90, 90, .4); background: rgba(255, 70, 70, .1); }
.report-code--after .report-code__tag { color: #9df7c4; border-color: rgba(60, 210, 130, .4); background: rgba(60, 210, 130, .1); }

@media (max-width: 1100px) {
    .report-stats { grid-template-columns: repeat(3, 1fr); }
    .report-flows { grid-template-columns: 1fr; }
    .report-diff { grid-template-columns: 1fr; }
    .audit-row { grid-template-columns: 30px 1fr; row-gap: 4px; }
    .audit-row__tag { justify-self: start; }
}
@media (max-width: 760px) {
    .report-stats { grid-template-columns: repeat(2, 1fr); }
    .report-tools { width: 100%; }
    .report-tools .btn { flex: 1; }
    .report-file__meta { margin-left: 0; }
}

/* ---------------------- 25. OVERLAY DEL GUARD ------------------------- */
#guard-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(3, 5, 8, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
#guard-overlay.is-open { opacity: 1; visibility: visible; }
.guard-card {
    width: min(420px, 100%);
    padding: 34px 30px;
    text-align: center;
    background: linear-gradient(150deg, rgba(22, 27, 36, .96), rgba(8, 11, 16, .97));
    border: 1px solid var(--primary-line);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .7), var(--glow);
    transform: translateY(20px) scale(.97);
    transition: transform .4s var(--ease);
}
#guard-overlay.is-open .guard-card { transform: none; }
.guard-icon {
    display: grid;
    place-items: center;
    width: 58px; height: 58px;
    margin: 0 auto 16px;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffffff;
    background: var(--grad-primary);
    border-radius: 18px;
    box-shadow: 0 0 34px rgba(217, 20, 20, .45);
}
.guard-card h3 { margin-bottom: 8px; }
.guard-card p { font-size: .95rem; margin-bottom: 20px; }

/* ------------------------- 25. ACCESIBILIDAD --------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
}

@media print {
    .nav, .footer, .bg-fx, .modal, .toasts, .float-support { display: none !important; }
}
