/* ==========================================================================
   BUSINESS AGENT S.A.C.S. — Hoja de estilos principal
   RUC 20616094824
   Sin dependencias externas. Todo el CSS del sitio vive en este archivo.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens de diseño
   -------------------------------------------------------------------------- */
:root {
  /* Superficies */
  --bg:            #070b16;
  --bg-alt:        #0b1122;
  --surface:       #0f1730;
  --surface-2:     #141d3a;
  --border:        rgba(140, 170, 255, 0.14);
  --border-strong: rgba(140, 170, 255, 0.28);

  /* Texto */
  --text:          #e6ecfb;
  --text-soft:     #b3c0dd;
  --text-mute:     #8494b8;

  /* Marca */
  --azul:          #2f8bff;
  --azul-claro:    #62b0ff;
  --violeta:       #a855f7;
  --violeta-claro: #c78bff;
  --cian:          #35e6ff;
  --ok:            #34d399;
  --alerta:        #fbbf24;

  --degradado:      linear-gradient(120deg, var(--azul) 0%, var(--violeta) 100%);
  --degradado-tenue: linear-gradient(120deg, rgba(47,139,255,.16) 0%, rgba(168,85,247,.16) 100%);

  /* Tipografía */
  --fuente: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  /* Métrica */
  --ancho: 1160px;
  --ancho-texto: 820px;
  --radio: 14px;
  --radio-sm: 9px;
  --sombra: 0 18px 50px -22px rgba(0, 0, 0, .85);
  --glow-azul: 0 0 28px -6px rgba(47, 139, 255, .55);
  --glow-violeta: 0 0 28px -6px rgba(168, 85, 247, .5);

  --nav-h: 68px;
}

/* --------------------------------------------------------------------------
   2. Reset y base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 17px;
  line-height: 1.72;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Textura de fondo: circuito difuso, puro CSS */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(760px 460px at 12% -8%,  rgba(47, 139, 255, .20), transparent 62%),
    radial-gradient(700px 480px at 92% 4%,   rgba(168, 85, 247, .17), transparent 62%),
    radial-gradient(900px 620px at 50% 104%, rgba(53, 230, 255, .07), transparent 68%);
  pointer-events: none;
}

img, svg { max-width: 100%; height: auto; display: block; }

a {
  color: var(--azul-claro);
  text-decoration: none;
  transition: color .18s ease;
}
a:hover { color: var(--violeta-claro); text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.24;
  letter-spacing: -0.02em;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.35rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: clamp(1.12rem, 2.1vw, 1.32rem); }
h4 { font-size: 1.02rem; }

p  { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.35em; }
li { margin-bottom: .5em; }
strong { color: #fff; font-weight: 650; }

::selection { background: rgba(168, 85, 247, .38); color: #fff; }

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

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 30px);
}

.seccion { padding: clamp(56px, 8vw, 96px) 0; }
.seccion--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.saltar-al-contenido {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--azul);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radio-sm) 0;
  font-weight: 600;
}
.saltar-al-contenido:focus { left: 0; text-decoration: none; }

.encabezado-seccion { max-width: 680px; margin-bottom: clamp(32px, 5vw, 52px); }
.encabezado-seccion.centrado { margin-inline: auto; text-align: center; }
.encabezado-seccion p { color: var(--text-soft); margin-bottom: 0; font-size: 1.05rem; }

.etiqueta {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cian);
  margin-bottom: .85em;
}

/* --------------------------------------------------------------------------
   4. Barra de navegación
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(7, 11, 22, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.nav.desplazado {
  background: rgba(7, 11, 22, .94);
  border-bottom-color: var(--border);
}
.nav__interior {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 30px);
  display: flex;
  align-items: center;
  gap: 22px;
}

.marca { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.marca:hover { text-decoration: none; }
.marca__logo { width: 38px; height: 38px; flex-shrink: 0; }
.marca__texto { display: flex; flex-direction: column; line-height: 1.1; }
.marca__nombre {
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -.015em;
  color: var(--text);
}
.marca__sub {
  font-size: .63rem;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 600;
}

.nav__enlaces {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
  margin-block: 0;
  padding: 0;
}
.nav__enlaces li { margin: 0; }
.nav__enlaces a {
  display: block;
  padding: 8px 13px;
  border-radius: var(--radio-sm);
  font-size: .93rem;
  font-weight: 550;
  color: var(--text-soft);
  transition: color .16s ease, background .16s ease;
}
.nav__enlaces a:hover,
.nav__enlaces a[aria-current="page"] {
  color: #fff;
  background: rgba(140, 170, 255, .1);
  text-decoration: none;
}

.nav__boton-menu {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radio-sm);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav__boton-menu span,
.nav__boton-menu span::before,
.nav__boton-menu span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
.nav__boton-menu span::before { transform: translateY(-6px); }
.nav__boton-menu span::after  { transform: translateY(4px); }
.nav__boton-menu[aria-expanded="true"] span { background: transparent; }
.nav__boton-menu[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav__boton-menu[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1px); }

/* --------------------------------------------------------------------------
   5. Botones
   -------------------------------------------------------------------------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: .96rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.boton:hover { text-decoration: none; transform: translateY(-2px); }
.boton:active { transform: translateY(0); }

.boton--primario {
  background: var(--degradado);
  color: #fff;
  box-shadow: var(--glow-azul);
}
.boton--primario:hover { color: #fff; box-shadow: 0 0 34px -4px rgba(120, 110, 255, .7); }

.boton--secundario {
  background: rgba(140, 170, 255, .07);
  border-color: var(--border-strong);
  color: var(--text);
}
.boton--secundario:hover { color: #fff; background: rgba(140, 170, 255, .14); border-color: var(--azul); }

.boton--whatsapp { background: #1fa855; color: #fff; box-shadow: 0 0 26px -8px rgba(31, 168, 85, .8); }
.boton--whatsapp:hover { color: #fff; background: #23bd5f; }

.boton--sm { padding: 9px 17px; font-size: .87rem; }
.boton__icono { width: 18px; height: 18px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 0 clamp(52px, 8vw, 88px);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero__insignia {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 15px 6px 8px;
  margin-bottom: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--degradado-tenue);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-soft);
}
.hero__insignia .punto {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .18);
  animation: latido 2.4s ease-in-out infinite;
}
@keyframes latido {
  0%, 100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
  50%      { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
}

.hero h1 { margin-bottom: .5em; }
.hero__degradado {
  background: linear-gradient(100deg, var(--azul-claro), var(--violeta-claro) 60%, var(--cian));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__bajada {
  font-size: clamp(1.02rem, 1.9vw, 1.16rem);
  color: var(--text-soft);
  max-width: 56ch;
  margin-bottom: 1.9em;
}
.hero__acciones { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 30px; }

.hero__confianza {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: .87rem;
  color: var(--text-mute);
}
.hero__confianza span { display: inline-flex; align-items: center; gap: 7px; }
.hero__confianza svg { width: 16px; height: 16px; color: var(--ok); flex-shrink: 0; }

.hero__visual { position: relative; display: flex; justify-content: center; }
.hero__visual svg { width: min(100%, 420px); filter: drop-shadow(0 0 40px rgba(120, 110, 255, .3)); }

/* --------------------------------------------------------------------------
   7. Tarjetas
   -------------------------------------------------------------------------- */
.rejilla { display: grid; gap: 20px; }
.rejilla--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.rejilla--3 { grid-template-columns: repeat(auto-fit, minmax(276px, 1fr)); }
.rejilla--4 { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }

.tarjeta {
  position: relative;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.tarjeta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--degradado);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
}
.tarjeta:hover { transform: translateY(-4px); box-shadow: var(--sombra); }
.tarjeta:hover::after { opacity: .85; }
.tarjeta h3 { margin-bottom: .45em; }
.tarjeta p { color: var(--text-soft); font-size: .96rem; margin-bottom: 0; }

.tarjeta__icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 17px;
  border-radius: 12px;
  background: var(--degradado-tenue);
  border: 1px solid var(--border-strong);
  color: var(--azul-claro);
}
.tarjeta__icono svg { width: 23px; height: 23px; }

/* Pasos numerados */
.pasos { counter-reset: paso; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); }
.paso {
  position: relative;
  padding: 26px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio);
}
.paso::before {
  counter-increment: paso;
  content: counter(paso);
  position: absolute;
  top: -17px;
  left: 22px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--degradado);
  color: #fff;
  font-weight: 750;
  font-size: .96rem;
  box-shadow: var(--glow-violeta);
}
.paso h3 { margin-top: 8px; font-size: 1.06rem; }
.paso p { color: var(--text-soft); font-size: .94rem; margin-bottom: 0; }

/* Lista de beneficios con check */
.lista-check { list-style: none; padding: 0; margin: 0 0 1.5em; }
.lista-check li {
  position: relative;
  padding-left: 32px;
  margin-bottom: .8em;
  color: var(--text-soft);
}
.lista-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .38em;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(52, 211, 153, .14);
  border: 1px solid rgba(52, 211, 153, .45);
}
.lista-check li::after {
  content: "";
  position: absolute;
  left: 6.5px;
  top: .62em;
  width: 5px;
  height: 9px;
  border: solid var(--ok);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.lista-check li strong { color: #fff; }

/* --------------------------------------------------------------------------
   8. Sección WhatsApp (marca paralela)
   -------------------------------------------------------------------------- */
.whatsapp-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding: clamp(28px, 5vw, 48px);
  background: linear-gradient(140deg, rgba(31,168,85,.10), rgba(47,139,255,.09) 55%, rgba(168,85,247,.10));
  border: 1px solid var(--border-strong);
  border-radius: 22px;
}
.whatsapp-panel h2 { margin-bottom: .4em; }

.chat {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 20px 18px;
  background: #0a1120;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--sombra);
}
.chat__cabecera {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 13px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.chat__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--degradado);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 750;
  font-size: .9rem;
  flex-shrink: 0;
}
.chat__nombre { font-weight: 650; font-size: .94rem; }
.chat__estado { font-size: .74rem; color: var(--ok); }
.burbuja {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 15px;
  font-size: .9rem;
  line-height: 1.55;
}
.burbuja--cliente {
  align-self: flex-start;
  background: var(--surface-2);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.burbuja--agente {
  align-self: flex-end;
  background: linear-gradient(120deg, rgba(47,139,255,.9), rgba(168,85,247,.85));
  border-bottom-right-radius: 4px;
  color: #fff;
}
.burbuja__hora { display: block; font-size: .66rem; opacity: .68; margin-top: 3px; text-align: right; }

/* --------------------------------------------------------------------------
   9. Tablas de datos
   -------------------------------------------------------------------------- */
.tabla-envoltura {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radio);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: .94rem;
}
caption {
  caption-side: top;
  text-align: left;
  padding: 16px 20px 6px;
  font-weight: 650;
  color: var(--text);
}
th, td {
  padding: 13px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
thead th {
  background: rgba(140, 170, 255, .07);
  font-size: .77rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
}
tbody th {
  width: 38%;
  font-weight: 600;
  color: var(--text-soft);
  background: rgba(140, 170, 255, .03);
}
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td, tbody tr:hover th { background: rgba(140, 170, 255, .05); }
td code, .mono { font-family: var(--mono); font-size: .92em; color: var(--cian); }

.insignia-estado {
  display: inline-block;
  padding: 2px 11px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .03em;
  background: rgba(52, 211, 153, .14);
  border: 1px solid rgba(52, 211, 153, .4);
  color: #6ee7b7;
}

/* --------------------------------------------------------------------------
   10. Acordeón de preguntas frecuentes
   -------------------------------------------------------------------------- */
.faq { max-width: var(--ancho-texto); margin-inline: auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radio-sm);
  background: var(--surface);
  margin-bottom: 12px;
  transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  cursor: pointer;
  font-weight: 620;
  list-style: none;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border: solid var(--azul-claro);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .22s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq summary:hover { color: #fff; }
.faq__cuerpo { padding: 0 20px 18px; color: var(--text-soft); font-size: .96rem; }
.faq__cuerpo > :last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   11. Contacto
   -------------------------------------------------------------------------- */
.contacto-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 20px; }
.contacto-item {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio);
}
.contacto-item h3 { font-size: 1rem; margin-bottom: .4em; }
.contacto-item p { font-size: .95rem; color: var(--text-soft); margin-bottom: .5em; }
.contacto-item a { font-weight: 600; word-break: break-word; }
.contacto-item address { font-style: normal; color: var(--text-soft); font-size: .95rem; }

/* --------------------------------------------------------------------------
   11 bis. Formularios
   -------------------------------------------------------------------------- */
.formulario {
  max-width: 780px;
  padding: clamp(24px, 4vw, 38px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio);
}
.formulario fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radio-sm);
  padding: 18px 20px 4px;
  margin: 0 0 22px;
}
.formulario legend {
  padding: 0 9px;
  font-weight: 650;
  font-size: .95rem;
  color: var(--azul-claro);
}

.campo { margin: 0 0 18px; }
.campo-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

.campo label,
.formulario fieldset label {
  display: block;
  margin-bottom: 7px;
  font-size: .89rem;
  font-weight: 600;
  color: var(--text-soft);
}
.campo label span[aria-hidden] { color: var(--violeta-claro); }

.campo input[type="text"],
.campo input[type="email"],
.campo input[type="tel"],
.campo input[type="date"],
.campo select,
.campo textarea,
.formulario fieldset input[type="text"],
.formulario fieldset input[type="email"],
.formulario fieldset input[type="tel"],
.formulario fieldset textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: .96rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radio-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.campo textarea, .formulario fieldset textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.campo select { appearance: none; cursor: pointer; padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--azul-claro) 50%),
                    linear-gradient(135deg, var(--azul-claro) 50%, transparent 50%);
  background-position: right 18px center, right 13px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.campo input:focus, .campo select:focus, .campo textarea:focus,
.formulario fieldset input:focus, .formulario fieldset textarea:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(47, 139, 255, .2);
}
.campo input::placeholder, .campo textarea::placeholder { color: var(--text-mute); opacity: .75; }
.campo input:user-invalid, .campo select:user-invalid, .campo textarea:user-invalid { border-color: #f87171; }

.campo--check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}
.campo--check input[type="checkbox"],
.campo--check input[type="radio"],
.formulario fieldset input[type="checkbox"],
.formulario fieldset input[type="radio"] {
  width: 19px;
  height: 19px;
  margin: 3px 0 0;
  accent-color: var(--violeta);
  cursor: pointer;
  flex-shrink: 0;
}
.campo--check label {
  margin: 0;
  font-weight: 400;
  font-size: .92rem;
  line-height: 1.62;
  color: var(--text-soft);
  cursor: pointer;
}

.opciones-radio { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 6px; }
.opciones-radio span { display: inline-flex; align-items: center; gap: 8px; }
.opciones-radio label { margin: 0; font-weight: 400; color: var(--text); }

.formulario__nota { font-size: .87rem; color: var(--text-mute); margin: 16px 0 0; }
.formulario__error {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: var(--radio-sm);
  background: rgba(248, 113, 113, .12);
  border: 1px solid rgba(248, 113, 113, .4);
  color: #fca5a5;
  font-size: .92rem;
}

/* --------------------------------------------------------------------------
   12. Páginas legales
   -------------------------------------------------------------------------- */
.cabecera-pagina {
  padding: clamp(44px, 7vw, 76px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--border);
  background: var(--degradado-tenue);
}
.cabecera-pagina h1 { margin-bottom: .35em; }
.cabecera-pagina p { color: var(--text-soft); max-width: 62ch; margin-bottom: 0; }
.cabecera-pagina .meta-fecha {
  display: inline-block;
  margin-top: 16px;
  padding: 5px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: .82rem;
  color: var(--text-mute);
}

.migas { font-size: .84rem; color: var(--text-mute); margin-bottom: 18px; }
.migas a { color: var(--text-mute); }
.migas a:hover { color: var(--azul-claro); }
.migas span { margin-inline: 7px; opacity: .5; }

.documento {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding: clamp(36px, 6vw, 64px) 0 clamp(52px, 8vw, 88px);
}

.indice {
  position: sticky;
  top: calc(var(--nav-h) + 22px);
  max-height: calc(100vh - var(--nav-h) - 46px);
  overflow-y: auto;
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radio);
  font-size: .88rem;
}
.indice h2 {
  font-size: .74rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 12px;
}
.indice ol { list-style: none; margin: 0; padding: 0; counter-reset: idx; }
.indice li { margin-bottom: 2px; }
.indice a {
  display: block;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--text-soft);
  border-left: 2px solid transparent;
  line-height: 1.4;
}
.indice a:hover { background: rgba(140, 170, 255, .08); color: #fff; text-decoration: none; }
.indice a.activo {
  color: #fff;
  background: rgba(140, 170, 255, .1);
  border-left-color: var(--violeta);
}

.contenido-legal { max-width: 76ch; }
.contenido-legal section { margin-bottom: 40px; scroll-margin-top: calc(var(--nav-h) + 22px); }
.contenido-legal h2 {
  font-size: clamp(1.24rem, 2.4vw, 1.5rem);
  padding-bottom: .42em;
  margin-bottom: .75em;
  border-bottom: 1px solid var(--border);
}
.contenido-legal h3 { font-size: 1.08rem; margin-top: 1.7em; color: var(--azul-claro); }
.contenido-legal h4 { margin-top: 1.4em; color: var(--text); }
.contenido-legal p, .contenido-legal li { color: var(--text-soft); }
.contenido-legal ul, .contenido-legal ol { padding-left: 1.4em; }
.contenido-legal table { min-width: 420px; font-size: .9rem; }
.contenido-legal .tabla-envoltura { margin-bottom: 1.5em; }

.aviso {
  padding: 18px 20px;
  margin: 1.6em 0;
  border-radius: var(--radio-sm);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--azul);
  background: rgba(47, 139, 255, .07);
  font-size: .95rem;
}
.aviso > :last-child { margin-bottom: 0; }
.aviso--importante { border-left-color: var(--alerta); background: rgba(251, 191, 36, .07); }
.aviso--ok { border-left-color: var(--ok); background: rgba(52, 211, 153, .07); }
.aviso__titulo { display: block; font-weight: 700; color: #fff; margin-bottom: .35em; }

.ficha-legal {
  padding: 22px 24px;
  margin-bottom: 2em;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radio);
}
.ficha-legal dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin: 0; font-size: .93rem; }
.ficha-legal dt { font-weight: 650; color: var(--text-mute); }
.ficha-legal dd { margin: 0; color: var(--text); }

/* --------------------------------------------------------------------------
   13. Pie de página
   -------------------------------------------------------------------------- */
.pie {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: clamp(44px, 6vw, 66px) 0 26px;
  font-size: .93rem;
}
.pie__rejilla {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: clamp(26px, 4vw, 48px);
  margin-bottom: 38px;
}
.pie h3 {
  font-size: .77rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 16px;
}
.pie ul { list-style: none; padding: 0; margin: 0; }
.pie li { margin-bottom: 9px; }
.pie a { color: var(--text-soft); }
.pie a:hover { color: var(--azul-claro); }
.pie__descripcion { color: var(--text-mute); font-size: .9rem; margin: 16px 0 0; max-width: 38ch; }
.pie address { font-style: normal; color: var(--text-soft); line-height: 1.7; }
.pie__datos-legales {
  padding: 18px 20px;
  background: rgba(140, 170, 255, .04);
  border: 1px solid var(--border);
  border-radius: var(--radio-sm);
  margin-bottom: 26px;
  font-size: .88rem;
  color: var(--text-soft);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 26px;
}
.pie__datos-legales strong { color: var(--text); }
.pie__base {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: .86rem;
}
.pie__base p { margin: 0; }
.pie__legales { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.pie__legales li { margin: 0; }

/* Botón flotante de WhatsApp */
.wa-flotante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1fa855;
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(31, 168, 85, .75);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-flotante:hover { transform: scale(1.07); color: #fff; text-decoration: none; }
.wa-flotante svg { width: 30px; height: 30px; }

/* --------------------------------------------------------------------------
   14. Animación de aparición
   -------------------------------------------------------------------------- */
.aparece {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.aparece.visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .documento { grid-template-columns: 1fr; }
  .indice {
    position: static;
    max-height: none;
    margin-bottom: 8px;
  }
  .indice ol { columns: 2; column-gap: 20px; }
  .pie__rejilla { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 300px; margin-inline: auto; }
  .whatsapp-panel { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .nav__boton-menu { display: flex; }
  .nav__enlaces {
    position: fixed;
    inset: var(--nav-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px clamp(18px, 4vw, 30px) 22px;
    background: rgba(7, 11, 22, .985);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    /* `visibility` se conmuta de golpe (0s), con retardo solo al cerrar. Nunca se
       interpola: eso la deja en un estado indefinido si el navegador pausa las
       transiciones (pestaña en segundo plano, ventana sin componer). */
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav__enlaces.abierto {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .22s ease, transform .22s ease, visibility 0s;
  }
  .nav__enlaces a { padding: 12px 14px; font-size: 1rem; }
  .nav__enlaces .boton { margin-top: 10px; width: 100%; }
  .indice ol { columns: 1; }
  .hero__acciones .boton { width: 100%; }
  .ficha-legal dl { grid-template-columns: 1fr; gap: 2px 0; }
  .ficha-legal dd { margin-bottom: 10px; }
  .campo-fila { grid-template-columns: 1fr; }
  th, td { padding: 11px 14px; }
  tbody th { width: 42%; }
}

@media (max-width: 420px) {
  .marca__sub { display: none; }
  .wa-flotante { width: 50px; height: 50px; right: 14px; bottom: 14px; }
}

/* --------------------------------------------------------------------------
   16. Accesibilidad y preferencias del usuario
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .aparece { opacity: 1; transform: none; }
}

@media (prefers-contrast: more) {
  :root {
    --text-soft: #dbe4f7;
    --text-mute: #b6c3e0;
    --border: rgba(160, 190, 255, .34);
    --border-strong: rgba(160, 190, 255, .55);
  }
}

/* --------------------------------------------------------------------------
   17. Impresión (útil si Meta o SUNAT piden el documento en PDF)
   -------------------------------------------------------------------------- */
@media print {
  :root { --text: #000; --text-soft: #1a1a1a; --text-mute: #444; }
  body { background: #fff; color: #000; font-size: 11.5pt; line-height: 1.55; }
  body::before, .nav, .indice, .wa-flotante, .hero__visual, .pie__legales { display: none !important; }
  .documento { display: block; }
  .cabecera-pagina { background: none; border-bottom: 1px solid #999; }
  a { color: #000; text-decoration: underline; }
  .contenido-legal a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
  .tarjeta, .aviso, .ficha-legal, .tabla-envoltura { border: 1px solid #bbb; background: none; }
  h2, h3 { page-break-after: avoid; }
  section, table, .aviso { page-break-inside: avoid; }
}
