:root {
    --mv-primary: #4f46e5;
    --mv-primary-dark: #3730a3;
    --mv-grad-start: #4338ca;
    --mv-grad-mid: #7c3aed;
    --mv-grad-end: #ec4899;
    --mv-accent: #ffc107;
    --mv-ink: #0a0a12;
    --mv-ink-2: #14141f;
    --mv-dark: #0b1b33;
    --mv-dark-2: #1d3a6e;
    --mv-light: #f7f7fb;
    --mv-border: #ececf3;
    --mv-text: #17171f;
    --mv-text-muted: #6c6c7c;
    --mv-radius: 1.5rem;
    --mv-radius-sm: 1rem;
    --mv-shadow: 0 1rem 2.5rem rgba(20, 20, 40, 0.08);
    --mv-shadow-lg: 0 1.5rem 3.5rem rgba(20, 20, 40, 0.14);
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--mv-text);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}

.text-muted {
    color: var(--mv-text-muted) !important;
}

/* ===== Botones ===== */
.btn {
    border-radius: 50rem;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(90deg, var(--mv-grad-start) 0%, var(--mv-grad-mid) 100%);
    border: none;
    box-shadow: 0 0.75rem 1.5rem rgba(79, 70, 229, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(90deg, var(--mv-grad-start) 0%, var(--mv-grad-mid) 100%);
    transform: translateY(-2px);
    box-shadow: 0 1rem 2rem rgba(79, 70, 229, 0.34);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.btn-outline-light:hover {
    background: #fff;
    color: var(--mv-ink);
}

.btn-dark {
    background: var(--mv-ink);
    border-color: var(--mv-ink);
}

.btn-lg {
    padding: 0.85rem 2rem;
}

/* ===== Navbar ===== */
.site-header {
    z-index: 1030;
    transition: transform 0.3s ease;
    /* Evita que el navegador reajuste el scroll cuando el header cambia de tamaño/estilo (causaba temblor) */
    overflow-anchor: none;
    /* Crea un nuevo contexto de bloque para que el margin-top de la pildora no colapse a través
       del header: si colapsara, el alto reservado por el sticky no incluiria ese margen y la
       pildora (con el translateY del estado "scrolled") acababa recortada por encima del viewport. */
    display: flow-root;
}

.site-header.header-hidden {
    transform: translateY(-130%);
}

.navbar-floating {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--mv-border);
    border-radius: 50rem;
    box-shadow: var(--mv-shadow);
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    margin-top: 1.25rem;
    transition: border-radius 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

/* Estado "scrolled": la pildora flotante pasa a barra completa, sin lados redondeados y con sombra.
   Solo se anima "transform" (no margin/padding) para no disparar reflow ni el "scroll anchoring" del navegador. */
.site-header.is-scrolled .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.site-header.is-scrolled .navbar-floating {
    transform: translateY(-1.25rem);
    border-radius: 0;
    border-width: 0 0 1px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 0.5rem 1.5rem rgba(20, 20, 40, 0.1);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Al desplegar el menu movil el panel deja de caber en una pildora: se aplana a rectangulo redondeado */
@media (max-width: 991.98px) {
    .navbar-floating.menu-open {
        border-radius: var(--mv-radius);
    }

    .navbar-floating .navbar-collapse {
        margin-top: 0.5rem;
    }
}

.navbar-floating .navbar-brand {
    letter-spacing: -0.02em;
}

.navbar-floating .nav-link {
    font-weight: 500;
    color: var(--mv-text);
    border-radius: 50rem;
    padding: 0.5rem 1rem !important;
}

.navbar-floating .nav-link:hover {
    color: var(--mv-primary);
}

.navbar-floating .btn-dark {
    padding: 0.55rem 1.4rem;
    font-size: 0.95rem;
}

/* ===== Hero ===== */
.hero {
    background: #fff;
    color: var(--mv-text);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -10%;
    width: 900px;
    height: 500px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.16) 0%, rgba(236, 72, 153, 0.08) 45%, transparent 75%);
    pointer-events: none;
}

.hero h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.hero .lead {
    color: var(--mv-text-muted);
    font-size: 1.2rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.gradient-text {
    background: linear-gradient(90deg, var(--mv-grad-start) 0%, var(--mv-grad-mid) 55%, var(--mv-grad-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-badge {
    display: inline-block;
    background: rgba(124, 58, 237, 0.1);
    color: var(--mv-grad-mid);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 50rem;
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-cta {
    justify-content: center;
}

.hero-cta .btn {
    padding: 0.85rem 1.9rem;
    font-weight: 600;
}

.hero-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    color: var(--mv-text-muted);
    font-size: 0.9rem;
}

.hero-proof .hero-proof-icons {
    display: inline-flex;
}

.hero-proof .hero-proof-icons span {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: var(--mv-ink);
    color: #fff;
    border: 2px solid #fff;
    margin-left: -0.6rem;
}

.hero-proof .hero-proof-icons span:first-child {
    margin-left: 0;
}

/* ===== Secciones ===== */
.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--mv-light);
}

.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--mv-primary);
    margin-bottom: 0.5rem;
}

.section-title {
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--mv-text-muted);
    max-width: 640px;
    margin-bottom: 2.5rem;
}

/* ===== Cards ===== */
.service-card {
    border: 1px solid var(--mv-border);
    border-radius: var(--mv-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    background: var(--mv-light);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--mv-shadow-lg);
    background: #fff;
}

.service-card .card-body {
    padding: 1.75rem;
}

.service-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: var(--mv-shadow);
    margin-bottom: 1.25rem;
}

.card-icon {
    color: var(--mv-grad-mid);
}

.card-icon svg,
.benefit-icon svg,
.stat-icon svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.hero-proof-icons svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.footer-social svg {
    width: 16px;
    height: 16px;
}

.card-icon-indigo {
    color: #4f46e5;
}

.card-icon-violet {
    color: #7c3aed;
}

.card-icon-pink {
    color: #ec4899;
}

.card-icon-amber {
    color: #d97706;
}

.card-icon-cyan {
    color: #0891b2;
}

.card-icon-green {
    color: #16a34a;
}

.card-icon-muted {
    color: #9ca3af;
}

.card-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
}

.card-icon-sm svg {
    width: 20px;
    height: 20px;
}

.service-card .card-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--mv-ink);
}

/* ===== Listas de características ===== */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 18px;
    height: 18px;
}

.feature-icon-indigo {
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
}

.feature-icon-violet {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.feature-icon-pink {
    background: rgba(236, 72, 153, 0.12);
    color: #ec4899;
}

.feature-icon-amber {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.feature-icon-cyan {
    background: rgba(8, 145, 178, 0.12);
    color: #0891b2;
}

.feature-icon-green {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

/* ===== Beneficios ===== */
.benefit-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.benefit-item .benefit-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mv-ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Barra de estadísticas ===== */
.stats-bar {
    background: var(--mv-ink);
    border-radius: var(--mv-radius);
    padding: 2.5rem 1rem;
    color: #fff;
}

.stats-bar .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.stats-bar .stat-icon.stat-icon-amber {
    background: var(--mv-accent);
    color: var(--mv-ink);
}

.stats-bar .stat-icon.stat-icon-cyan {
    background: #67e8f9;
    color: var(--mv-ink);
}

.stats-bar .stat-icon.stat-icon-coral {
    background: #fca5a5;
    color: var(--mv-ink);
}

.stats-bar .stat-value {
    font-weight: 700;
    font-size: 1.05rem;
}

/* ===== Cómo funciona ===== */
.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mv-grad-start) 0%, var(--mv-grad-mid) 100%);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* ===== CTA final ===== */
.cta-banner {
    background: var(--mv-ink);
    color: #fff;
    border-radius: var(--mv-radius);
    padding: 3.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::after {
    content: "";
    position: absolute;
    right: -15%;
    top: -40%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.45) 0%, transparent 70%);
    pointer-events: none;
}

.cta-banner h2 {
    font-weight: 800;
}

.cta-banner .btn-light {
    background: #fff;
    color: var(--mv-ink);
}

/* ===== Tarjetas oscuras con resplandor (glow) ===== */
.glow-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    background: var(--mv-ink);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--mv-radius);
    padding: 2.25rem 1.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glow-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mv-shadow-lg);
}

/* Resplandor a partir de una imagen de blob difuminado; se rota y desplaza por variante. */
.glow-card.has-glow::before {
    content: "";
    position: absolute;
    top: -35%;
    right: -18%;
    width: 300px;
    height: 300px;
    background: url("../images/glow-HPkR5Tg.svg") no-repeat center center / contain;
    opacity: 0.85;
    transform: translateY(var(--glow-y, 0px)) rotate(15deg);
    transition: transform 0.15s ease-out;
    pointer-events: none;
}

/* Variante con el resplandor centrado y girado en la parte superior. */
.glow-card.has-glow.glow-top::before {
    top: -45%;
    right: 50%;
    width: 360px;
    height: 360px;
    transform: translateX(50%) translateY(var(--glow-y, 0px)) rotate(-40deg);
}

/* Variante espejada para un tercer aspecto distinto. */
.glow-card.has-glow.glow-flip::before {
    top: -30%;
    right: auto;
    left: -18%;
    transform: translateY(var(--glow-y, 0px)) scaleX(-1) rotate(25deg);
}

.glow-card>* {
    position: relative;
    z-index: 1;
}

.glow-card .glow-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 1.5rem;
}

.glow-card .glow-icon svg {
    width: 26px;
    height: 26px;
}

.glow-card h3 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.glow-card p {
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 0;
}

.glow-card a:not(.btn) {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.glow-card a:not(.btn):hover {
    text-decoration: underline;
}

/* Variante de tarjeta de servicio oscura para destacar dentro de una rejilla clara. */
.service-card.service-card-dark {
    background: var(--mv-ink);
    border-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.service-card.service-card-dark:hover {
    background: var(--mv-ink);
}

.service-card.service-card-dark::before {
    content: "";
    position: absolute;
    top: -32%;
    right: -20%;
    width: 260px;
    height: 260px;
    background: url("../images/glow-HPkR5Tg.svg") no-repeat center center / contain;
    opacity: 0.82;
    transform: translateY(var(--glow-y, 0px)) rotate(130deg);
    transition: transform 0.15s ease-out;
    pointer-events: none;
}

/* Segundo aspecto para alternar entre paneles oscuros contiguos. */
.service-card.service-card-dark.glow-alt::before {
    top: -28%;
    right: auto;
    left: -20%;
    transform: translateY(var(--glow-y, 0px)) scaleX(-1) rotate(60deg);
}

.service-card.service-card-dark .card-body {
    position: relative;
    z-index: 1;
}

.service-card.service-card-dark h3 {
    color: #fff;
}

.service-card.service-card-dark .text-muted {
    color: rgba(255, 255, 255, 0.62) !important;
}

.service-card.service-card-dark .card-icon {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    color: #fff;
}

.service-card.service-card-dark a.stretched-link {
    color: #fff !important;
}

/* ===== Sección de contacto ===== */
.contact-panel {
    background: var(--mv-light);
    border: 1px solid var(--mv-border);
    border-radius: var(--mv-radius);
    padding: 2.5rem;
    color: var(--mv-text);
}

.contact-panel .form-label {
    color: var(--mv-text);
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-panel .form-control {
    background: #fff;
    border: 1px solid var(--mv-border);
    color: var(--mv-text);
    border-radius: var(--mv-radius-sm);
    padding: 0.75rem 1rem;
}

.contact-panel .form-control::placeholder {
    color: var(--mv-text-muted);
}

.contact-panel .form-control:focus {
    background: #fff;
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.15);
    color: var(--mv-text);
}

.contact-panel .invalid-feedback,
.contact-panel .form-error {
    color: #dc2626;
    font-size: 0.85rem;
}

.contact-panel .form-control.is-invalid {
    border-color: #dc2626;
}

.contact-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-submit svg {
    width: 18px;
    height: 18px;
}

/* ===== Precios ===== */
.price-tag {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--mv-ink);
}

/* ===== Footer ===== */
.footer-dark {
    background: var(--mv-ink);
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

.footer-dark::before {
    content: "";
    position: absolute;
    left: -10%;
    bottom: -30%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.footer-dark::after {
    content: "";
    position: absolute;
    right: -10%;
    top: -20%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.footer-dark .container {
    position: relative;
}

.footer-dark a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-dark a:hover {
    color: #fff;
}

.footer-dark h6 {
    color: #fff;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
}

.footer-social:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Accesibilidad ===== */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--mv-grad-mid);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 3rem;
    }

    .section {
        padding: 3.5rem 0;
    }
}
