/* =============================================================
   MUPY — Sitio institucional
   Tokens del MANUAL DE MARCA oficial (design_system/3. Manual de marca).
   Paleta, degradado y tipografías salen literales de ahí.
   Si cambia el branding, se toca SOLO este bloque :root.
   ============================================================= */
:root {
  /* Marca — paleta oficial */
  --brand-blue: #0080fb;    /* Azul MUPY · principal */
  --brand-violet: #6e05fb;  /* Violeta MUPY · degradado */
  --brand-indigo: #3025c9;  /* Índigo MUPY · logo sólido */
  --brand-orange: #ff8a00;  /* Naranja acento */
  --brand-yellow: #ffc83d;  /* Amarillo acento */

  --gradient-brand: linear-gradient(90deg, var(--brand-blue), var(--brand-violet));
  --gradient-accent: linear-gradient(135deg, var(--brand-yellow), var(--brand-orange));

  /* Superficies claras
     El fondo de página no es blanco puro: con el hero oscuro arriba, el salto a
     100 % de luminancia encandilaba. Se baja a la familia del "Fondo claro" del
     manual (#F6F7FB) y se le da a la alternancia una diferencia que se vea.
     Las tarjetas quedan en blanco, así resaltan sobre el fondo. */
  --bg: #ebeff8;                      /* 86 % · el claro de las secciones */
  --bg-soft: #e3e9f5;                 /* variantes, ya casi sin uso: la alternancia */
  --bg-cool: #e6ecf7;                 /* del sitio la da .section--dark */
  --surface: #ffffff;                 /* tarjetas, formulario, FAQ */
  --border: #d8deeb;

  /* Superficies oscuras (hero / nav / footer) — derivadas del texto principal */
  --ink: #15172b;                     /* Texto principal del manual */
  --ink-2: #1c1f36;
  --ink-3: #262a45;

  /* Texto */
  --text: #15172b;
  --text-muted: #616a7c;              /* Texto secundario del manual (#687082),
                                         un punto más oscuro para llegar a AA
                                         sobre los fondos nuevos */
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #aeb5c9;

  /* Acción */
  --action: var(--brand-blue);        /* Rellenos y elementos de UI */
  --action-ink: var(--brand-indigo);  /* Links y texto en color (contraste AA) */
  --action-hover: #1a1499;            /* Hover del botón principal (kit visual) */

  /* Funcionales (kit visual app) */
  --ok: #22c55e;
  --warn: #f59e0b;
  --error: #ef4444;
  --info: #0ea5e9;

  /* Tipografía — Poppins títulos, Inter textos */
  --font-head: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Layout */
  --wrap: 1140px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(21, 23, 43, .06), 0 2px 8px rgba(21, 23, 43, .05);
  --shadow-md: 0 8px 24px rgba(21, 23, 43, .09);
  --shadow-lg: 0 24px 60px rgba(21, 23, 43, .16);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
img, svg { max-width: 100%; display: block; }
a { color: var(--action); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.grad-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 16px; line-height: 1;
  padding: 16px 28px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 8px 20px rgba(0, 128, 251, .30); }
.btn--primary:hover { background: var(--action-hover); box-shadow: 0 14px 30px rgba(26, 20, 153, .38); }
.btn--accent { background: var(--gradient-accent); color: #3d2200; box-shadow: 0 8px 20px rgba(255, 138, 0, .30); }
.btn--outline-dark { border-color: rgba(255,255,255,.35); color: var(--text-on-dark); background: rgba(255,255,255,.04); }
.btn--outline-dark:hover { border-color: #ffffff; background: rgba(255,255,255,.10); }
.btn--outline { border-color: var(--brand-blue); color: var(--action-ink); background: var(--surface); }
.btn--outline:hover { border-color: var(--action-ink); background: #eef4ff; }
.btn--sm { padding: 11px 20px; font-size: 15px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(21, 23, 43, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav__inner { display: flex; align-items: center; gap: 28px; width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.nav__logo img { height: 48px; width: auto; }
.nav__links { display: flex; gap: 26px; margin-left: auto; list-style: none; padding: 0; }
.nav__links a {
  font-family: var(--font-head); font-size: 15px; font-weight: 500;
  color: var(--text-on-dark-muted); text-decoration: none; white-space: nowrap;
}
.nav__links a:hover { color: #fff; }
.nav__cta { margin-left: 8px; flex: none; white-space: nowrap; }
.nav__links-cta { display: none; }
.nav__toggle {
  display: none; margin-left: auto; background: transparent; border: 0; padding: 8px;
  color: var(--text-on-dark); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--text-on-dark);
  background:
    radial-gradient(900px 520px at 78% 10%, rgba(110, 5, 251, .34), transparent 62%),
    radial-gradient(780px 500px at 10% 82%, rgba(0, 128, 251, .26), transparent 64%),
    linear-gradient(170deg, #1a1d36, var(--ink) 62%);
  padding: 80px 0 96px;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  font-family: var(--font-head); color: var(--brand-yellow);
  background: rgba(255, 200, 61, .10); border: 1px solid rgba(255, 200, 61, .30);
}
/* Punto que late en la etiqueta "Lanzamiento muy pronto". */
.hero__pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand-yellow);
  box-shadow: 0 0 0 0 rgba(255, 200, 61, .6); animation: pulso 2s ease-out infinite;
}
@keyframes pulso { 70% { box-shadow: 0 0 0 9px rgba(255, 200, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 200, 61, 0); } }
@media (prefers-reduced-motion: reduce) { .hero__pulse { animation: none; } }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 3.75rem); font-weight: 700; }
.hero__lead { margin-top: 22px; font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--text-on-dark-muted); max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__micro { margin-top: 22px; font-size: 15px; color: var(--text-on-dark-muted); }
.hero__art { filter: drop-shadow(0 30px 60px rgba(0,0,0,.45)); }

/* ---------- Fotos de sección ----------
   Las ilustraciones eran SVG con fondo transparente; las fotos son rectángulos
   opacos, así que necesitan esquina redondeada y un borde propio para no quedar
   pegadas al fondo. */
.foto {
  width: 100%; height: auto;
  border-radius: var(--radius-lg);
  object-fit: cover;
}
.hero__art .foto { box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.split__art .foto { box-shadow: var(--shadow-md); border: 1px solid var(--border); }

/* ---------- Marquee de frases ---------- */
.marquee {
  background: var(--ink-2); border-block: 1px solid rgba(255,255,255,.08);
  overflow: hidden; padding: 16px 0;
}
.marquee__track { display: flex; gap: 0; width: max-content; animation: marquee 42s linear infinite; }
.marquee__group { display: flex; gap: 0; }
.marquee span {
  font-family: var(--font-head); font-weight: 600; font-size: 16px; white-space: nowrap;
  color: var(--text-on-dark); padding-inline: 26px; display: inline-flex; align-items: center; gap: 26px;
}
.marquee span::after { content: "●"; color: var(--brand-yellow); font-size: 9px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--cool { background: var(--bg-cool); }

/* ---------- Sección oscura ----------
   La página alterna claro / oscuro para no ser un bloque de luz entre el hero y
   el cierre. Se redefinen los tokens dentro del bloque y los componentes de
   adentro se adaptan solos; hay que fijar `color` acá porque los hijos heredan
   el valor ya calculado de body, no la variable. */
.section--dark {
  --text: #ffffff;
  --text-muted: #aeb5c9;
  --surface: #1e2239;
  --border: #333a5c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .38);
  color: var(--text);
  background:
    radial-gradient(700px 420px at 85% 12%, rgba(110, 5, 251, .20), transparent 62%),
    radial-gradient(620px 400px at 8% 88%, rgba(0, 128, 251, .15), transparent 64%),
    var(--ink);
}
/* Los kickers de marca no llegan a contraste sobre el navy: se aclaran. */
.section--dark .section__kicker--violet { color: #a97bff; }
.section--dark .section__kicker--blue { color: #7fc0ff; }
/* La foto no necesita borde sobre oscuro, y sí una sombra más profunda. */
.section--dark .split__art .foto { border-color: transparent; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
/* El botón secundario del flow y los separadores del gráfico. */
.section--dark .flow__note { color: var(--text-muted); }
.section__head { max-width: 62ch; }
.section__kicker {
  display: inline-block; font-family: var(--font-head); font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px;
}
.section__kicker--violet { color: var(--brand-violet); }
.section__kicker--blue { color: var(--action-ink); }
.section h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); font-weight: 700; }
.section__lead { margin-top: 18px; color: var(--text-muted); font-size: 1.05rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split--reverse .split__art { order: -1; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; font-weight: 500; }
.steps li::before {
  content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--gradient-brand); color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: 14px; display: grid; place-items: center; margin-top: 3px;
}

.checks { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 13px; }
.checks li { display: flex; gap: 13px; align-items: flex-start; }
.checks li svg { flex: none; margin-top: 4px; }

.placa {
  margin-top: 34px; padding: 22px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--brand-orange);
  font-family: var(--font-head); font-size: 1.06rem; font-weight: 600; line-height: 1.45;
}

.section__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Cómo funciona ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 56px; }
.flow__step {
  position: relative; text-align: center; padding: 30px 18px 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.flow__num {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(48, 37, 201, .30);
}
.flow__icon { margin: 6px auto 14px; width: 46px; height: 46px; }
.flow__step h3 { font-size: 1.06rem; font-weight: 700; }
.flow__step p { margin-top: 8px; font-size: 15px; color: var(--text-muted); }
.flow__note {
  margin-top: 44px; text-align: center; font-family: var(--font-head);
  font-size: 1.1rem; font-weight: 600; color: var(--text-muted);
}

/* ---------- FAQ ---------- */
.faq { margin-top: 44px; display: grid; gap: 12px; max-width: 860px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px 22px; box-shadow: var(--shadow-sm);
}
.faq details[open] { border-color: #c9d7fb; box-shadow: var(--shadow-md); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative;
  font-family: var(--font-head); font-weight: 600; font-size: 1.03rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 11px; height: 11px;
  border-right: 2.5px solid var(--brand-blue); border-bottom: 2.5px solid var(--brand-blue);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq p { padding: 0 0 20px; color: var(--text-muted); }

/* ---------- Cierre ---------- */
.closing {
  color: var(--text-on-dark); text-align: center; padding: 96px 0;
  background:
    radial-gradient(700px 420px at 18% 18%, rgba(0, 128, 251, .26), transparent 62%),
    radial-gradient(780px 470px at 84% 82%, rgba(110, 5, 251, .34), transparent 64%),
    linear-gradient(160deg, #1a1d36, var(--ink));
}
.closing h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
/* Sólo la bajada del cierre: el formulario que va debajo también usa <p>. */
.closing > .wrap > p { margin: 22px auto 0; max-width: 62ch; color: var(--text-on-dark-muted); font-size: 1.08rem; }
.closing .hero__actions { justify-content: center; }

/* ---------- Formulario de contacto ---------- */
.form {
  max-width: 760px; margin: 44px auto 0; text-align: left;
  background: var(--surface); color: var(--text);
  border-radius: var(--radius-lg); padding: 34px 34px 30px;
  box-shadow: var(--shadow-lg);
}
.form__intro {
  font-family: var(--font-head); font-weight: 600; font-size: 1.08rem;
  margin-bottom: 22px;
}
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; justify-items: stretch; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0; justify-self: stretch; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--font-head); font-size: 14.5px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-soft); transition: border-color .15s ease, background .15s ease;
}
.field textarea { resize: vertical; min-height: 118px; }
.field input:focus, .field select:focus, .field textarea:focus {
  background: var(--surface); border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 128, 251, .14);
}
.field input::placeholder, .field textarea::placeholder { color: #9aa1b4; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230080fb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.field__error { font-size: 13.5px; color: var(--error); min-height: 0; }
.field__error:empty { display: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea {
  border-color: var(--error); background: #fef4f4;
}

/* Trampa para bots: invisible pero no display:none (algunos bots lo detectan). */
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-top: 26px;
}
.form__legal { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.form__status {
  margin-top: 20px; padding: 14px 18px; border-radius: var(--radius);
  font-size: 15.5px; font-weight: 500;
}
.form__status--ok { background: #ecfdf3; color: #15803d; border: 1px solid #bbf7d0; }
.form__status--error { background: #fef4f4; color: #b42318; border: 1px solid #fecaca; }
.form button[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--text-on-dark-muted); padding: 56px 0 34px; border-top: 1px solid rgba(255,255,255,.08); }
.footer__grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-start; }
.footer__logo img { height: 58px; width: auto; }
.footer__tag { margin-top: 14px; max-width: 34ch; font-size: 15px; }
.footer__nav { display: flex; gap: 48px; flex-wrap: wrap; }
.footer__nav h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer__nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer__nav a { color: var(--text-on-dark-muted); font-size: 15px; }
.footer__nav a:hover { color: #fff; }
.footer__cookies {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--text-on-dark-muted); text-decoration: underline;
}
.footer__cookies:hover { color: #fff; }
.footer__bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 14px;
}

/* ---------- Banner de cookies ----------
   Lo inyecta main.js, así que no está duplicado en cada HTML. Sólo aparece si
   hay un Measurement ID configurado y la persona todavía no eligió. */
.cookies {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--ink-2); color: var(--text-on-dark);
  border-top: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 -6px 30px rgba(0, 0, 0, .35);
}
.cookies__inner {
  width: min(100% - 40px, var(--wrap)); margin-inline: auto;
  padding: 16px 0; display: flex; align-items: center; gap: 18px 24px; flex-wrap: wrap;
}
.cookies__text {
  flex: 1 1 320px; margin: 0; font-size: 14.5px; line-height: 1.5;
  color: var(--text-on-dark-muted);
}
.cookies__text strong { color: var(--text-on-dark); font-weight: 600; }
.cookies__btns { display: flex; gap: 10px; flex: 0 0 auto; }

@media (max-width: 560px) {
  .cookies__btns { width: 100%; }
  .cookies__btns .btn { flex: 1; width: auto; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid, .split { grid-template-columns: 1fr; gap: 44px; }
  .split--reverse .split__art { order: 0; }
  .flow { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; background: var(--ink-2);
    border-bottom: 1px solid rgba(255,255,255,.1); padding: 8px 0; display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { padding: 0 24px; }
  .nav__links a { display: block; padding: 13px 0; font-size: 16px; }
  .nav__links-cta { display: block; padding: 12px 24px 16px; }
  .nav__links-cta a { display: inline-flex; padding: 12px 22px; color: #fff; }
  .nav__toggle { display: block; }
  .nav__cta { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 68px 0; }
  .hero { padding: 56px 0 72px; }
  .flow { grid-template-columns: 1fr; }
  .form { padding: 26px 20px 24px; }
  .form__grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero__actions .btn, .section__actions .btn, .closing .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
