/* =============================================================
   MUPY — Sitio institucional
   Tokens de marca derivados del logo oficial (celeste → violeta,
   acento dorado, fondo profundo). Si cambia el branding, se toca
   SOLO este bloque :root.
   ============================================================= */
:root {
  /* Marca */
  --brand-cyan: #2fcef5;
  --brand-blue: #4a9cf2;
  --brand-violet: #9b4dee;
  --brand-violet-deep: #6d28d9;
  --brand-gold: #f5b31e;
  --brand-gold-light: #ffe29a;

  --gradient-brand: linear-gradient(100deg, var(--brand-cyan), var(--brand-blue) 45%, var(--brand-violet));
  --gradient-gold: linear-gradient(135deg, var(--brand-gold-light), var(--brand-gold));

  /* Superficies claras */
  --bg: #ffffff;
  --bg-soft: #f7f5fd;
  --bg-cool: #f1f9fe;
  --surface: #ffffff;
  --border: #e6e0f5;

  /* Superficies oscuras (hero / footer) */
  --ink: #16141f;
  --ink-2: #1e1c2a;
  --ink-3: #2a2540;

  /* Texto */
  --text: #1c1a26;
  --text-muted: #5f5980;
  --text-on-dark: #f3f0fb;
  --text-on-dark-muted: #a9a2c6;

  /* Acción */
  --action: #6d28d9;
  --action-hover: #5b21b6;

  /* Tipografía */
  --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: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(45, 25, 90, 0.06);
  --shadow-md: 0 12px 32px rgba(45, 25, 90, 0.10);
  --shadow-lg: 0 24px 60px rgba(45, 25, 90, 0.16);
  --nav-h: 72px;
}

*, *::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-cyan); 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 10px 26px rgba(123, 47, 224, .35); }
.btn--primary:hover { box-shadow: 0 16px 34px rgba(123, 47, 224, .45); }
.btn--gold { background: var(--gradient-gold); color: #3a2a05; box-shadow: 0 10px 26px rgba(245, 179, 30, .32); }
.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: var(--brand-cyan); background: rgba(47,206,245,.10); }
.btn--outline { border-color: var(--border); color: var(--action); background: var(--surface); }
.btn--outline:hover { border-color: var(--action); }
.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(22, 20, 31, .72);
  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; }
.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% 12%, rgba(155,77,238,.30), transparent 60%),
    radial-gradient(760px 480px at 12% 78%, rgba(47,206,245,.22), transparent 62%),
    linear-gradient(170deg, #1b1829, var(--ink) 60%);
  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-gold-light);
  background: rgba(245,179,30,.10); border: 1px solid rgba(245,179,30,.28);
}
.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)); }

/* ---------- 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-gold); 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); }
.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-deep); }
.section__kicker--blue { color: #1e7ea8; }
.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: 5px solid var(--brand-gold);
  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(109,40,217,.35);
}
.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: #d6c8f5; 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-violet); border-bottom: 2.5px solid var(--brand-violet);
  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 20% 20%, rgba(47,206,245,.22), transparent 60%),
    radial-gradient(760px 460px at 82% 80%, rgba(155,77,238,.30), transparent 62%),
    linear-gradient(160deg, #1b1829, 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-violet);
}
.field input::placeholder, .field textarea::placeholder { color: #9a93bc; }
.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='%236d28d9' 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: #c0273b; min-height: 0; }
.field__error:empty { display: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea {
  border-color: #c0273b; background: #fdf3f4;
}

/* 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: #e9f9ef; color: #1c6b39; border: 1px solid #b8e6c9; }
.form__status--error { background: #fdf3f4; color: #a51f31; border: 1px solid #f2c4cb; }
.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__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;
}

/* ---------- 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; }
}
