/* Estilos de nexwil.com: móvil primero. Colores tomados del logo del portal (degradado azul → violeta). */

:root {
  --brand-blue: #2f55e0;
  --brand-violet: #6d44d6;
  --brand-gradient: linear-gradient(135deg, var(--brand-blue), var(--brand-violet));
  --brand-text: #7449e0;
  --ink: #0f1530;
  --muted: #475069;
  --bg: #ffffff;
  --bg-alt: #f5f7ff;
  --line: #e3e7f5;
  --dark-text: #c9d1ea;
  --focus: #6d44d6;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(15, 21, 48, 0.35);
  --container: 1120px;
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--brand-blue);
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 760px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Botones */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 10px 24px -12px var(--brand-violet);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.btn-small {
  min-height: 40px;
  padding: 0 18px;
}

/* Cabecera */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand svg {
  height: 30px;
  width: auto;
  display: block;
  /* Si Nunito no carga, la fuente de respaldo es más ancha: que el texto no se recorte en el borde del viewBox */
  overflow: visible;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
}

.menu-toggle-bar,
.menu-toggle-bar::before,
.menu-toggle-bar::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}

.menu-toggle-bar::before,
.menu-toggle-bar::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-toggle-bar::before {
  top: -6px;
}

.menu-toggle-bar::after {
  top: 6px;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-nav a:not(.btn) {
  display: block;
  padding: 12px 4px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:not(.btn):hover {
  color: var(--brand-blue);
}

.site-nav .btn {
  margin-top: 8px;
  width: 100%;
}

/* Portada */

.hero {
  background:
    radial-gradient(circle at 85% 10%, rgba(109, 68, 214, 0.14), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(47, 85, 224, 0.12), transparent 45%),
    var(--bg-alt);
  padding: 48px 0 64px;
}

.hero-inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--brand-text);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Maqueta decorativa de la bandeja */

.mock {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 520px;
  margin: 0 auto;
}

.mock-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.mock-body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
}

.mock-inbox {
  list-style: none;
  margin: 0;
  padding: 10px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 6px;
  align-content: start;
}

.mock-inbox li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
}

.mock-inbox li.is-active {
  background: var(--bg-alt);
}

.mock-badge {
  flex: none;
  min-width: 34px;
  padding: 3px 6px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  color: #ffffff;
}

.badge-wa {
  background: #1b7f4b;
}

.badge-ig {
  background: #b0306a;
}

.badge-fb {
  background: #2f55e0;
}

.badge-web {
  background: #6d44d6;
}

.mock-line {
  display: block;
  height: 8px;
  width: 100%;
  border-radius: 4px;
  background: var(--line);
}

.mock-line.short {
  width: 60%;
}

.mock-chat {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
}

.bubble {
  margin: 0;
  padding: 8px 12px;
  border-radius: 14px;
  max-width: 90%;
}

.bubble-in {
  background: var(--bg-alt);
  border-bottom-left-radius: 4px;
}

.bubble-out {
  align-self: flex-end;
  background: var(--brand-gradient);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.mock-doc {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px dashed var(--brand-violet);
  border-radius: 12px;
}

.mock-doc-title {
  font-weight: 800;
  color: var(--brand-text);
}

/* Slider del hero: diapositivas apiladas en la misma celda para que todas midan lo mismo */

.slider {
  max-width: 520px;
  margin: 0 auto;
}

.slider-viewport {
  display: grid;
}

.slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0s;
}

.slide-title {
  margin: 0 0 12px;
  font-weight: 800;
  text-align: center;
  color: var(--ink);
}

.slide .mock {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.slide .mock > :last-child {
  flex: 1;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.slider-controls[hidden] {
  display: none;
}

.slider-dots {
  display: flex;
  gap: 2px;
}

.slider-dot,
.slider-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.slider-dot::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #aeb8d6;
  transition: width 0.3s ease;
}

.slider-dot[aria-current='true']::before {
  width: 22px;
  background: var(--brand-gradient);
}

.slider-pause {
  border: 1px solid var(--line);
  background: var(--bg);
}

/* Ícono de pausa (dos barras) o de reproducir (triángulo) según el estado */
.slider-pause::before {
  content: '';
  width: 10px;
  height: 12px;
  border-left: 3px solid var(--ink);
  border-right: 3px solid var(--ink);
}

.slider-pause.is-paused::before {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid var(--ink);
  border-right: 0;
}

.mock-doc-solid {
  border-style: solid;
  border-color: var(--line);
  background: var(--bg);
}

.mock-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 18px 14px;
}

.mock-arrow {
  position: relative;
  height: 2px;
  background: var(--brand-gradient);
}

.mock-arrow::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -5px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--brand-violet);
}

.mock-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  align-content: start;
}

.mock-chip {
  justify-self: start;
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: #eef1ff;
  color: var(--brand-blue);
}

.chip-ok {
  background: #e3f5ec;
  color: #146c3e;
}

.chip-out {
  background: #fdecef;
  color: #a12a4f;
}

.mock-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mock-qty {
  flex: none;
  width: 24px;
  height: 8px;
  border-radius: 4px;
  background: rgba(109, 68, 214, 0.35);
}

.mock-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 110px;
}

.mock-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: var(--brand-gradient);
}

.mock-team {
  list-style: none;
  margin: 0;
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.mock-team li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
}

.mock-team li.is-active {
  background: var(--bg-alt);
}

.mock-avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
}

.avatar-a {
  background: #2f55e0;
}

.avatar-b {
  background: #6d44d6;
}

.avatar-c {
  background: #1b7f4b;
}

.avatar-d {
  background: #b0306a;
}

/* Secciones */

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin-bottom: 32px;
}

.section-head p {
  color: var(--muted);
}

.card-grid,
.benefit-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #ffffff;
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-dark {
  background: var(--ink);
  color: var(--dark-text);
}

.section-dark h2,
.section-dark h3 {
  color: #ffffff;
}

.section-dark :focus-visible {
  outline-color: #ffffff;
}

.benefit {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 209, 234, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.benefit p {
  margin: 0;
}

/* Preguntas frecuentes */

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.faq summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 700;
  list-style-position: inside;
}

.faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
}

/* Contacto */

.contact {
  text-align: center;
}

.contact-list {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.contact-list .btn {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.contact-emails {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.contact-emails li {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.contact-label,
.footer-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-label {
  color: var(--brand-text);
}

.contact-emails a {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.footer-label {
  color: var(--dark-text);
}

.footer-contact a {
  overflow-wrap: anywhere;
}

.contact-city,
.contact-portal {
  color: var(--muted);
}

.not-found {
  min-height: 50vh;
}

/* Pie */

.site-footer {
  background: var(--ink);
  color: var(--dark-text);
  padding: 48px 0 24px;
}

.site-footer a {
  color: #ffffff;
}

.site-footer :focus-visible {
  outline-color: #ffffff;
}

.footer-inner {
  display: grid;
  gap: 28px;
}

.brand-footer svg {
  height: 32px;
}

.footer-brand p {
  margin: 12px 0 0;
}

.footer-nav ul,
.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-nav a,
.footer-contact a {
  text-decoration: none;
}

.footer-nav a:hover,
.footer-contact a:hover {
  text-decoration: underline;
}

.footer-legal {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(201, 209, 234, 0.2);
  font-size: 0.9rem;
}

.footer-legal p {
  margin: 0;
}

/* Escritorio */

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0;
  }

  .site-nav a:not(.btn) {
    padding: 8px 10px;
  }

  .site-nav .btn {
    margin: 0 0 0 8px;
    width: auto;
  }

  .hero {
    padding: 88px 0 104px;
  }

  .hero-inner {
    grid-template-columns: 1.1fr 1fr;
  }

  .section {
    padding: 96px 0;
  }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }

  .slide,
  .slide.is-active,
  .slider-dot::before {
    transition: none;
  }
}
