:root {
  --indigo: #3a0ca3;
  --deep: #480ca8;
  --violet: #7209b7;
  --sky: #4895ef;
  --lav: #f6f3fc;
  --lilac: #c9b8f5;
  --ink: #1e1b2e;
  --muted: #3b3652;
  --line: #d9cff2;
  --grad: linear-gradient(135deg, #3a0ca3 0%, #480ca8 45%, #7209b7 100%);
  --font-title: 'Sansation', 'Trebuchet MS', sans-serif;
  --font-body: 'Sora', 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0; }
figure { margin: 0; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 16px;
}

@media (min-width: 700px) {
  .wrap { padding-inline: 24px; }
}

/* Encabezado */
.top {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon { width: 34px; height: 42px; flex: none; }

.brand-text { display: flex; flex-direction: column; }

.brand-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--indigo);
}

.brand-tag {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
}

.nav a { text-decoration: none; }
.nav a:not(.btn):hover { color: var(--violet); }

@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .brand-tag { display: none; }
}

/* Botones */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.btn-small { padding: 8px 16px; background: var(--violet); color: #ffffff; }
.btn-primary { background: var(--violet); color: #ffffff; box-shadow: 0 6px 20px rgba(114, 9, 183, .35); }
.btn-sky { background: var(--sky); color: #0d1b3d; }

.hero .btn-primary,
.contact .btn-primary { background: #ffffff; color: var(--violet); box-shadow: 0 6px 20px rgba(13, 27, 61, .3); }

.btn:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-primary:hover { box-shadow: 0 10px 28px rgba(114, 9, 183, .5); }

.btn:focus-visible,
.nav a:focus-visible,
.brand:focus-visible,
.wa-float:focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Portada */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(72, 149, 239, .35), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(114, 9, 183, .45), transparent 50%),
    var(--grad);
  color: #ffffff;
  padding-block: 36px 44px;
}

.sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tw { fill: #ffffff; opacity: .6; animation: twinkle 3.2s ease-in-out infinite; }
.d2 { animation-delay: .5s; }
.d3 { animation-delay: 1s; }
.d4 { animation-delay: 1.6s; }
.d5 { animation-delay: 2.1s; }
.d6 { animation-delay: 2.7s; }

.sky { transition: transform .6s ease-out; }

/* Hero a pantalla completa: contenido al centro y "Ver servicios" abajo */
.hero {
  display: flex;
  flex-direction: column;
  min-height: calc(86vh - var(--top-h, 62px));
  min-height: calc(86svh - var(--top-h, 62px));
  padding-top: 28px;
  padding-bottom: 56px;
}
.hero-in { flex: 1; width: 100%; align-content: center; }
/* Espaciado en múltiplos de 8 px. El bloque queda un poco sobre el centro
   (centro óptico) y la flecha abajo indica que hay más contenido. */
.hero-in { padding-bottom: 2vh; }
.scroll-cue {
  position: relative;
  z-index: 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: 8px;
}
.scroll-cue svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .85;
  animation: cue 1.8s ease-in-out infinite;
}
.scroll-cue:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; border-radius: 50%; }
@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Cruz del Sur de fondo en celular, como marca de agua */
@media (max-width: 859px) {
  .hero .hero-art {
    display: block;
    position: absolute;
    top: 50%;
    right: -22%;
    width: 92%;
    max-width: 380px;
    transform: translateY(-50%);
    opacity: .16;
    z-index: 0;
    pointer-events: none;
  }
}

/* Borde inferior del hero difuminado hacia el blanco */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 74px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55) 55%, #ffffff 92%);
  pointer-events: none;
}

/* Estrellas fugaces del hero: cada una cruza cada varios segundos */
.meteors {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.meteor {
  position: absolute;
  width: 140px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ffffff, rgba(201, 184, 245, .5) 40%, rgba(255, 255, 255, 0));
  box-shadow: 0 0 8px rgba(255, 255, 255, .6);
  opacity: 0;
  animation: meteor 7s linear infinite;
}
.m1 { top: 10%; left: 70%; animation-delay: 1s; }
.m2 { top: 30%; left: 95%; animation-delay: 3.5s; animation-duration: 9s; }
.m3 { top: 4%;  left: 40%; animation-delay: 5.5s; animation-duration: 8s; }
.m4 { top: 55%; left: 85%; animation-delay: 7.5s; animation-duration: 10s; }
.m5 { top: 18%; left: 105%; animation-delay: 2.2s; animation-duration: 11s; }

@keyframes meteor {
  0% { opacity: 0; transform: rotate(-28deg) translateX(0); }
  2% { opacity: 1; }
  12% { opacity: 0; transform: rotate(-28deg) translateX(-420px); }
  100% { opacity: 0; transform: rotate(-28deg) translateX(-420px); }
}

/* Estrella que sale donde se toca */
.meteor.tap {
  animation: meteor-tap .9s ease-out forwards;
}
@keyframes meteor-tap {
  0% { opacity: 0; transform: rotate(-28deg) translateX(0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: rotate(-28deg) translateX(-260px); }
}

@keyframes twinkle {
  0%, 100% { opacity: .2; }
  50% { opacity: .9; }
}

.hero-in {
  position: relative;
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero-copy { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(201, 184, 245, .55);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.3rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

/* Palabra que cambia: va en su propia línea para que el título no salte */
.rotator { display: block; white-space: nowrap; min-height: 1.2em; }
.caret {
  display: inline-block;
  width: 3px;
  height: .9em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: #c9b8f5;
  border-radius: 2px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* Brillo que recorre la palabra "tecnología" */
.shine {
  background: linear-gradient(110deg, #ffffff 0%, #ffffff 40%, #8fc1ff 47%, #ffffff 50%, #c9b8f5 53%, #ffffff 60%, #ffffff 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 4.5s ease-in-out 1s infinite;
}
@keyframes shine {
  0% { background-position: 100% 0; }
  35%, 100% { background-position: 0% 0; }
}

.lead {
  color: #f1ecfd;
  font-size: 1.15rem;
  line-height: 1.5;
  max-width: 30rem;
  margin-bottom: 32px;
}

/* Botón principal del hero: ancho completo en celular, con ícono */
.hero .actions {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  max-width: 26rem;
}
.hero .actions .btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 22px;
  font-size: 1.05rem;
}
.hero .actions .btn-primary svg {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.hero .actions .btn-primary svg path:last-child { fill: currentColor; stroke: none; }

.link-down {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 10px 8px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .45);
  text-underline-offset: 5px;
}
.link-down:hover { text-decoration-color: #ffffff; }
.link-down:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; border-radius: 4px; }


@media (min-width: 760px) {
  .hero .actions { flex-direction: row; align-items: center; gap: 18px; max-width: none; }
}

/* Cruz del Sur: en celular queda de fondo, en pantalla grande al lado */
.hero-art {
  display: none;
  filter: drop-shadow(0 0 10px rgba(201, 184, 245, .6));
}

.draw {
  stroke-dasharray: 300;
  animation: draw 1.4s ease-out .3s both;
}
.draw.dl { animation-delay: .7s; }

@keyframes draw {
  from { stroke-dashoffset: 300; }
  to { stroke-dashoffset: 0; }
}

.pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) both, glow 4s ease-in-out 2s infinite;
}
.p1 { animation-delay: .2s, 2s; }
.p2 { animation-delay: .5s, 2.6s; }
.p3 { animation-delay: .9s, 3.2s; }
.p4 { animation-delay: 1.2s, 3.8s; }
.p5 { animation-delay: 1.6s, 4.4s; }

@keyframes pop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes glow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@media (min-width: 860px) {
  .hero { padding-block: 80px 80px; }
  .contact { padding-block: 64px; }
  .hero-in { grid-template-columns: 1.3fr 0.7fr; }
  .hero-art {
    display: block;
    width: 100%;
    max-width: 300px;
    justify-self: center;
    opacity: 1;
  }
}

/* Bloques */
.block { padding-block: 44px; background: #ffffff; }

@media (min-width: 760px) {
  .block { padding-block: 64px; }
}
.block.alt { background: var(--lav); }

/* Sección oscura con estrellas (Cómo trabajamos) */
.block.night {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(72, 149, 239, .35), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(114, 9, 183, .45), transparent 50%),
    var(--grad);
}

.night .wrap { position: relative; }
.block.night h2 { color: #ffffff; }
.night .section-lead { color: #e6ddfb; }
.night .steps li { border-color: transparent; box-shadow: 0 10px 30px rgba(13, 5, 50, .3); }
.night .steps li:hover { box-shadow: 0 0 28px 4px rgba(255, 255, 255, .55), 0 0 0 2px #ffffff; }

.block h2,
.contact h2 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  color: var(--indigo);
  margin-bottom: 8px;
}

.section-lead {
  color: var(--muted);
  margin-bottom: 20px;
}

/* Íconos */
.ico {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--grad);
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(58, 12, 163, .25);
}

.ico svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Tarjetas de servicios */
.cards {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--lav);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  transition: translate .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover,
.steps li:hover {
  translate: 0 -4px;
  border-color: var(--lilac);
  box-shadow: 0 14px 34px rgba(114, 9, 183, .16);
}

.card h3 { font-size: 1.4rem; color: var(--indigo); margin-bottom: 6px; }

.card-sub { color: var(--violet); font-weight: 600; font-size: 0.95rem; margin-bottom: 16px; }

.card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.card li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sky);
}

/* Ilustraciones de las tarjetas */
.illus {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 18px;
}

.illus svg { display: block; width: 100%; height: auto; }

.illus text {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  fill: var(--indigo);
  text-anchor: middle;
}

.illus .small { font-size: 9.5px; font-weight: 400; fill: var(--muted); }
.illus .gx { font-size: 14px; fill: var(--violet); }

.flow { fill: none; stroke: var(--lilac); stroke-width: 2; }
.ev { fill: #ffffff; stroke: var(--sky); stroke-width: 2; }
.ev.end { stroke: var(--indigo); stroke-width: 3.5; }
.task { fill: var(--lav); stroke: var(--violet); stroke-width: 1.5; }
.gate { fill: #ffffff; stroke: var(--violet); stroke-width: 1.5; }
.token { fill: var(--sky); }

.screen { fill: var(--lav); stroke: var(--line); stroke-width: 1.5; }
.sep { stroke: var(--line); stroke-width: 1.5; }
.dot { fill: var(--lilac); }
.bar { fill: var(--line); }
.bar.strong { fill: var(--indigo); }
.cta { fill: var(--violet); }

.pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: .7; }
}

/* Pasos */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.steps li {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  transition: translate .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad);
  color: #ffffff;
  font-family: var(--font-title);
  font-weight: 700;
  margin-bottom: 12px;
}

/* Número y título en la misma línea; el texto va debajo */
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
}
.steps .num { margin-bottom: 0; flex: none; }
.steps h3 { font-size: 1.15rem; color: var(--indigo); margin: 0; }
.steps p { grid-column: 1 / -1; color: var(--muted); font-size: 0.98rem; margin-top: 10px; }

/* Por qué */
.why {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

@media (min-width: 760px) {
  .why { grid-template-columns: repeat(3, 1fr); }
}

.why h3 { font-size: 1.3rem; color: var(--indigo); margin-bottom: 6px; }
.why p { color: var(--muted); }

/* Tarjetas de "Por qué Astrasur" */
.why { margin-top: 0; gap: 16px; }

.why-card {
  position: relative;
  overflow: hidden;
  background: var(--lav);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 22px 22px;
  transition: translate .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.why-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--indigo), var(--violet), var(--sky));
}

.why-card:hover {
  translate: 0 -4px;
  border-color: var(--lilac);
  box-shadow: 0 14px 34px rgba(114, 9, 183, .16);
}

.why-ico {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--grad);
  box-shadow: 0 8px 20px rgba(58, 12, 163, .3);
  margin-bottom: 16px;
}

.why-ico svg { width: 40px; height: 40px; overflow: visible; }
.why-ico svg * { transform-box: fill-box; transform-origin: center; }

.w-line { fill: none; stroke: #ffffff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.typing { fill: #ffffff; animation: typing 1.4s ease-in-out infinite; }
.typing.k2 { animation-delay: .2s; }
.typing.k3 { animation-delay: .4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.pin-jump { animation: pin-jump 2s ease-in-out infinite; }
.pin-shadow { fill: rgba(255, 255, 255, .45); animation: pin-shadow 2s ease-in-out infinite; }

@keyframes pin-jump {
  0%, 55%, 100% { transform: translateY(0); }
  25% { transform: translateY(-6px); }
}

@keyframes pin-shadow {
  0%, 55%, 100% { transform: scale(1); opacity: 1; }
  25% { transform: scale(.6); opacity: .5; }
}

.climber { fill: var(--sky); stroke: #ffffff; stroke-width: 1.2; animation: climb 3.2s ease-in-out infinite; }

@keyframes climb {
  0%, 8% { transform: translate(0, 0); opacity: 1; }
  18% { transform: translate(4.5px, -12px); }
  26%, 32% { transform: translate(9px, -9px); }
  42% { transform: translate(13.5px, -21px); }
  50%, 56% { transform: translate(18px, -18px); }
  66% { transform: translate(22.5px, -30px); }
  74%, 88% { transform: translate(27px, -27px); opacity: 1; }
  96% { transform: translate(27px, -27px); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 0; }
}

.js-reveal .why-card:not(.in) .why-ico * { animation-play-state: paused; }

/* Ícono a la izquierda, texto a la derecha */
.why-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 18px;
  align-items: center;
  padding: 24px 20px 22px;
}

.why-card .why-ico {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin-bottom: 0;
}

.why-card .why-ico svg { width: 46px; height: 46px; }
.why-card h3 { grid-column: 2; align-self: end; }
.why-card p { grid-column: 2; align-self: start; }

/* Contacto */
.contact {
  background:
    radial-gradient(circle at 90% 20%, rgba(72, 149, 239, .3), transparent 45%),
    var(--grad);
  color: #ffffff;
  padding-block: 44px;
}

.contact h2 { color: #ffffff; }
.contact .section-lead { color: #e6ddfb; }

.zone {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--lilac);
}

/* Pie */
.foot {
  background: #ffffff;
  padding-block: 20px 88px;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .foot { padding-bottom: 20px; }
}

/* Botón flotante de WhatsApp (solo celular y tablet) */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: float-in .5s ease-out 1.2s both;
}

.wa-float svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.wa-float svg path:last-child { fill: #ffffff; stroke: none; }

/* Se oculta mientras se ve el botón del hero */
.wa-float { transition: opacity .3s ease, visibility .3s ease; }
.wa-float.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

@keyframes float-in {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

@media (min-width: 860px) {
  .wa-float { display: none; }
}

/* Aparición al bajar */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease, translate .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.js-reveal .reveal.in {
  opacity: 1;
  transform: none;
}

.js-reveal .steps .reveal:nth-child(2),
.js-reveal .cards .reveal:nth-child(2),
.js-reveal .why .reveal:nth-child(2) { transition-delay: .12s; }
.js-reveal .steps .reveal:nth-child(3),
.js-reveal .why .reveal:nth-child(3) { transition-delay: .24s; }
.js-reveal .steps .reveal:nth-child(4) { transition-delay: .36s; }

/* Servicios: bloques con tarjetas deslizables */
.service + .service { margin-top: 40px; }

.service-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.service-head .ico { margin-bottom: 0; flex: none; }
.service-head h3 { font-size: 1.5rem; color: var(--indigo); margin-bottom: 2px; }
.service-head .card-sub { margin-bottom: 0; }

.service-intro {
  max-width: 46rem;
  color: var(--muted);
  margin: -4px 0 20px;
}

.slider { position: relative; }

.track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 2px 14px;
  margin: -4px -2px 0;
}

.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; border-radius: 14px; }

.slide {
  flex: 0 0 82%;
  scroll-snap-align: start;
  background: var(--lav);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  transition: translate .25s ease, box-shadow .25s ease, border-color .25s ease;
}

@media (min-width: 560px) {
  .slide { flex-basis: 46%; }
}

.slide h4 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--indigo);
  margin: 0 0 6px;
}

.slide p { color: var(--muted); font-size: 1rem; line-height: 1.55; }

.anim {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 14px;
}

.anim svg { display: block; width: 100%; height: auto; }

.anim svg * { transform-box: fill-box; transform-origin: center; }

/* Flecha con pulso y puntitos (solo cuando hay tarjetas ocultas) */
.next {
  position: absolute;
  right: -6px;
  top: 34%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--violet);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(114, 9, 183, .4);
  animation: nudge 1.6s ease-in-out infinite;
  transition: opacity .3s ease;
}

.next::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--violet);
  animation: ring 1.6s ease-out infinite;
}

.next svg { width: 22px; height: 22px; fill: none; stroke: #ffffff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.next:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }

.slider.at-end .next { opacity: 0; pointer-events: none; }

/* Flecha para volver: aparece cuando ya se avanzó */
.prev {
  position: absolute;
  left: -6px;
  top: 34%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--violet);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(114, 9, 183, .4);
  animation: nudge-back 1.6s ease-in-out infinite;
  transition: opacity .3s ease;
}

.prev svg { width: 22px; height: 22px; fill: none; stroke: #ffffff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.prev:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }
.slider.at-start .prev { opacity: 0; pointer-events: none; }

@keyframes nudge-back {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}

/* Flechas y puntitos debajo de las tarjetas, sin tapar el contenido */
.slider-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 6px;
}

.slider-nav .prev,
.slider-nav .next {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  width: 42px;
  height: 42px;
  flex: none;
}

.slider-nav .dots { margin-top: 0; }

.slider.at-start .prev,
.slider.at-end .next { opacity: .3; pointer-events: none; animation: none; box-shadow: none; }
.slider.at-end .next::after { display: none; }

.title-gap { margin-bottom: 22px !important; }

/* Flechas sencillas: solo el trazo, sin círculo ni pulso */
.slider-nav .prev,
.slider-nav .next {
  width: 36px;
  height: 36px;
  background: transparent;
  box-shadow: none;
  border-radius: 8px;
  animation: none;
}

.slider-nav .next { animation: nudge-soft 2.4s ease-in-out infinite; }
.slider-nav .next::after { display: none; }

.slider-nav .prev svg,
.slider-nav .next svg { width: 24px; height: 24px; stroke: var(--violet); stroke-width: 2.2; }

.slider.at-start .prev,
.slider.at-end .next { opacity: .25; animation: none; }

@keyframes nudge-soft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

@keyframes ring {
  from { transform: scale(1); opacity: .8; }
  to { transform: scale(1.7); opacity: 0; }
}

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  transition: width .3s ease, background .3s ease;
}

.dots span.on { width: 22px; background: var(--violet); }

@media (min-width: 960px) {
  .track { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .next, .prev, .dots, .slider-nav { display: none; }
  .slide:hover { translate: 0 -4px; border-color: var(--lilac); box-shadow: 0 14px 34px rgba(114, 9, 183, .16); }
}

/* Piezas de las ilustraciones */
.s-screen { fill: #ffffff; stroke: var(--line); stroke-width: 1.5; }
.s-bar { fill: var(--line); }
.s-strong { fill: var(--indigo); }
.s-cta { fill: var(--violet); }
.s-sky { fill: var(--sky); }
.s-soft { fill: var(--lav); stroke: var(--line); stroke-width: 1; }
.s-line { fill: none; stroke: var(--indigo); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.s-sep { stroke: var(--line); stroke-width: 1.5; }
.s-dot { fill: var(--lilac); }

.anim text { font-family: var(--font-body); font-weight: 600; text-anchor: middle; }
.anim .t { font-size: 11px; fill: var(--indigo); }
.anim .t-small { font-size: 10.5px; font-weight: 600; fill: var(--muted); }
.anim .t-white { font-size: 9px; fill: #ffffff; }
.anim .t-ink { font-size: 10.5px; fill: var(--ink); }
.anim .t-dark { font-size: 10.5px; fill: #0d1b3d; }

/* 1. Carga rápida */
.ld-fill { transform-origin: left; animation: ld-fill 4.5s ease-in-out infinite; }
.ld-track { animation: ld-track 4.5s infinite; }
.ld-c { animation: ld-c 4.5s ease-out infinite; }
.ld-c.c2 { animation-delay: .15s; }
.ld-c.c3 { animation-delay: .3s; }
.bolt { fill: var(--sky); animation: bolt 4.5s ease-out infinite; }

@keyframes ld-fill {
  0% { transform: scaleX(0); opacity: 1; }
  28% { transform: scaleX(1); opacity: 1; }
  36%, 100% { transform: scaleX(1); opacity: 0; }
}
@keyframes ld-track { 0%, 28% { opacity: 1; } 36%, 100% { opacity: 0; } }
@keyframes ld-c {
  0%, 32% { opacity: 0; transform: translateY(6px); }
  44%, 92% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}
@keyframes bolt {
  0%, 28% { transform: scale(0); }
  36% { transform: scale(1.25); }
  42%, 92% { transform: scale(1); }
  100% { transform: scale(0); }
}

/* 2. Mapa y contacto */
.map { fill: #eaf2fd; stroke: var(--line); stroke-width: 1.5; }
.road { fill: none; stroke: #ffffff; stroke-width: 7; stroke-linecap: round; }
.pin { animation: pin 4.5s ease-out infinite; }
.pin-sh { fill: rgba(58, 12, 163, .2); animation: pin-sh 4.5s ease-out infinite; }
.row { animation: row 4.5s ease-out infinite; }
.row.r2 { animation-delay: .2s; }
.row.r3 { animation-delay: .4s; }

@keyframes pin {
  0% { transform: translateY(-40px); opacity: 0; }
  12% { opacity: 1; }
  26% { transform: translateY(0); }
  32% { transform: translateY(-6px); }
  38%, 92% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes pin-sh {
  0%, 22% { transform: scale(.3); opacity: 0; }
  30%, 92% { transform: scale(1); opacity: 1; }
  100% { opacity: 0; }
}
@keyframes row {
  0%, 38% { opacity: 0; transform: translateX(10px); }
  50%, 92% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

/* 3. Botón de WhatsApp */
.wa { fill: #25d366; }
.wa-btn { animation: press 4.5s ease-in-out infinite; }
.touch { fill: rgba(58, 12, 163, .35); stroke: #ffffff; stroke-width: 2; animation: touch 4.5s ease-in-out infinite; }
.ripple { fill: none; stroke: #25d366; stroke-width: 2; opacity: 0; animation: ripple 4.5s ease-out infinite; }
.bubble { transform-origin: left bottom; animation: bubble 4.5s ease-out infinite; }
.bubble-box { fill: #ffffff; stroke: #25d366; stroke-width: 1.5; stroke-linejoin: round; }

@keyframes touch {
  0% { transform: translate(60px, -50px); opacity: 0; }
  12% { opacity: 1; }
  32% { transform: translate(0, 0) scale(1); }
  37% { transform: scale(.8); }
  43% { transform: scale(1); opacity: 1; }
  52%, 100% { transform: none; opacity: 0; }
}
@keyframes press {
  0%, 33% { transform: scale(1); }
  37% { transform: scale(.93); }
  43%, 100% { transform: scale(1); }
}
@keyframes ripple {
  0%, 36% { transform: scale(1); opacity: 0; }
  38% { opacity: 1; }
  58%, 100% { transform: scale(2.6); opacity: 0; }
}
@keyframes bubble {
  0%, 46% { opacity: 0; transform: translateY(8px) scale(.9); }
  56%, 92% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

/* 4. Mantención */
.teeth { fill: none; stroke: var(--violet); stroke-width: 9; stroke-dasharray: 6 4.63; }
.teeth.small { stroke: var(--sky); stroke-width: 6; stroke-dasharray: 4 3.54; }
.g1 { animation: spin 6s linear infinite; }
.g2 { animation: spin 4s linear infinite reverse; }
.badge { animation: badge 4.5s ease-out infinite; }
.check-sm { fill: none; stroke: var(--sky); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes badge {
  0%, 44% { transform: scale(0); }
  54% { transform: scale(1.15); }
  60%, 92% { transform: scale(1); }
  100% { transform: scale(0); }
}

/* 5. Procesos */
.note-a { fill: var(--lav); stroke: var(--line); }
.note-b { fill: #eaf2fd; stroke: var(--line); }
.note-c { fill: #efe6fb; stroke: var(--line); }
.note { animation: note 4.5s ease-out infinite; }
.note.n2 { animation-delay: .35s; }
.note.n3 { animation-delay: .7s; }
.arrow { fill: none; stroke: var(--violet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; animation: arrow 4.5s ease-out infinite; }
.arrow.a2 { animation-delay: .35s; }

@keyframes note {
  0% { opacity: 0; transform: translateY(-24px) rotate(-8deg); }
  14%, 92% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}
@keyframes arrow {
  0%, 36% { stroke-dashoffset: 30; }
  50%, 92% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

/* 6. Automatizar */
.type { transform-origin: left; animation: type 1.5s ease-in-out infinite; }
.type.t2 { animation-delay: .25s; }
.type.t3 { animation-delay: .5s; }
.manual { animation: manual 4.5s ease-in-out infinite; }
.arrow-go { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.2s ease-in-out infinite; }
.auto { fill: var(--lav); stroke: var(--violet); stroke-width: 1.5; animation: auto 4.5s ease-in-out infinite; }
.spark { fill: var(--sky); animation: spark 4.5s ease-in-out infinite; }

@keyframes type { 0% { transform: scaleX(0); } 30%, 100% { transform: scaleX(1); } }
@keyframes manual { 0%, 40% { opacity: 1; } 55%, 90% { opacity: .45; } 100% { opacity: 1; } }
@keyframes auto { 0%, 40% { stroke-width: 1.5; } 55%, 90% { stroke-width: 3.5; } 100% { stroke-width: 1.5; } }
@keyframes spark {
  0%, 40% { transform: scale(.4) rotate(0deg); }
  55% { transform: scale(1.2) rotate(45deg); }
  65%, 90% { transform: scale(1) rotate(90deg); }
  100% { transform: scale(.4) rotate(90deg); }
}

/* 7. Ciberseguridad */
.shield { fill: var(--lav); stroke: var(--indigo); stroke-width: 2; stroke-linejoin: round; }
.check { fill: none; stroke: var(--violet); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; animation: check 4.5s ease-out infinite; }
.shackle { fill: none; stroke: var(--sky); stroke-width: 4; animation: shackle 4.5s ease-in-out infinite; }

@keyframes check {
  0%, 16% { stroke-dashoffset: 100; }
  42%, 92% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes shackle {
  0%, 48% { transform: translateY(-7px); }
  58%, 92% { transform: none; }
  100% { transform: translateY(-7px); }
}

/* 8. Plan por etapas */
.road-base { fill: none; stroke: var(--line); stroke-width: 6; stroke-linecap: round; }
.road-go { fill: none; stroke: var(--violet); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100; animation: road 4.5s ease-in-out infinite; }
.ms { fill: #ffffff; stroke: var(--violet); stroke-width: 3; animation: ms 4.5s ease-out infinite; }
.anim .ms-n { fill: var(--violet); font-size: 11px; animation: ms-n 4.5s ease-out infinite; }
.ms.m2, .anim .ms-n.m2 { animation-delay: .9s; }
.ms.m3, .anim .ms-n.m3 { animation-delay: 1.8s; }

@keyframes road {
  0% { stroke-dashoffset: 100; }
  60%, 92% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes ms { 0%, 10% { fill: #ffffff; } 18%, 80% { fill: #7209b7; } 100% { fill: #ffffff; } }
@keyframes ms-n { 0%, 10% { fill: #7209b7; } 18%, 80% { fill: #ffffff; } 100% { fill: #7209b7; } }

/* Las ilustraciones esperan a que su tarjeta se vea en pantalla */
.js-reveal .slide:not(.play) .anim * { animation-play-state: paused; }

/* Entrada del texto de la portada */
.hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .3, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; }
.hero-copy > :nth-child(3) { animation-delay: .2s; }
.hero-copy > :nth-child(4) { animation-delay: .3s; }
.hero-copy > :nth-child(5) { animation-delay: .4s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* Intro: viaje por el cielo hasta la Cruz del Sur (máx. 3 s, una vez por visita) */
.intro { display: none; }

.intro-on body { overflow: hidden; }

.intro-on .hero *,
.intro-on .wa-float { animation-play-state: paused; }

.intro-on .intro {
  display: block;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  cursor: pointer;
  background: radial-gradient(ellipse at center, #1d0c55 0%, #0b0526 55%, #04020f 100%);
}

.intro.out {
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease .1s;
}

.intro-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: #ffffff;
}

#far { animation: warp-far 3.1s cubic-bezier(.55, 0, .9, .6) both; }
#near { animation: warp-near 3.1s cubic-bezier(.7, 0, 1, .5) both; }

@keyframes warp-far {
  from { transform: scale(.6); opacity: 0; }
  25% { opacity: .75; }
  to { transform: scale(1.7); opacity: .9; }
}

@keyframes warp-near {
  from { transform: scale(.3); opacity: 0; }
  30% { opacity: 1; }
  to { transform: scale(3.4); opacity: 1; }
}

.shoot {
  position: absolute;
  width: 170px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ffffff, rgba(201, 184, 245, .5) 40%, rgba(255, 255, 255, 0));
  box-shadow: 0 0 8px rgba(255, 255, 255, .6);
  opacity: 0;
  animation: shoot .9s ease-in both;
}
.s1 { top: 16%; left: 62%; animation-delay: .15s; }
.s2 { top: 38%; left: 88%; animation-delay: .6s; }
.s3 { top: 8%; left: 32%; animation-delay: 1.05s; }

@keyframes shoot {
  0% { opacity: 0; transform: rotate(-28deg) translateX(0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: rotate(-28deg) translateX(-460px); }
}

.intro-fly {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.intro.out .intro-fly {
  transform: scale(5);
  opacity: 0;
  transition: transform .7s cubic-bezier(.6, 0, .9, .5), opacity .45s ease .15s;
}

.intro-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #ffffff;
  animation: approach 2.8s cubic-bezier(.2, .6, .3, 1) both;
}

@keyframes approach {
  from { transform: scale(.35); opacity: 0; }
  20% { opacity: 1; }
  to { transform: scale(1.1); opacity: 1; }
}

.intro-cross {
  width: 110px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(201, 184, 245, .8));
}

.i-draw {
  stroke: #c9b8f5;
  stroke-width: 2.5;
  stroke-dasharray: 100;
  animation: i-draw .8s ease-out .35s both;
}
.i-dl { animation-delay: .6s; }

@keyframes i-draw {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

.i-pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both;
}
.q1 { animation-delay: .3s; }
.q2 { animation-delay: .5s; }
.q3 { animation-delay: .7s; }
.q4 { animation-delay: .85s; }
.q5 { animation-delay: 1s; }

.intro-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  line-height: 1;
  margin-top: 18px;
  text-shadow: 0 0 24px rgba(201, 184, 245, .7);
  animation: name-in .7s ease-out 1.05s both;
}

.intro-tag {
  color: var(--lilac);
  font-size: .95rem;
  margin-top: 8px;
  animation: rise .6s ease-out 1.35s both;
}

@keyframes name-in {
  from { opacity: 0; letter-spacing: .35em; filter: blur(6px); }
  to { opacity: 1; letter-spacing: 0; filter: blur(0); }
}

.intro-skip {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: .8rem;
  color: var(--lilac);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(201, 184, 245, .35);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
}

.intro-skip:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }

/* Sin animaciones para quien lo pide en su teléfono */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .token, .touch, .meteors, .caret { display: none; }
}
