/* Capa visual de la página: fondo animado, cabecera con movimiento, tablero de widgets (adaptado de
   GlowWidgets de 21st.dev), botones con brillo y respuesta al cursor en paneles y tarjetas.
   Depende de las variables de herramienta.css. Todo el movimiento se apaga con prefers-reduced-motion. */

/* Fondo animado (shader «Silk»): fijo, detrás de todo, que se va apagando hacia abajo */
.fondo-shader {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0.28) 100%);
  mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0.28) 100%);
}

/* Legibilidad del texto de la cabecera sobre el fondo animado */
.cabecera-texto .apoyo-grande {
  color: #bcc5d8;
  text-shadow: 0 1px 14px rgba(6, 9, 18, 0.75);
}

.cabecera-texto .mono-etiqueta {
  color: #9aa5bd;
  text-shadow: 0 1px 10px rgba(6, 9, 18, 0.8);
}

/* Entrada de la cabecera y datos rápidos */
.cabecera-texto > * {
  animation: subir 800ms var(--curva) both;
}

.cabecera-texto > :nth-child(1) { animation-delay: 40ms; }
.cabecera-texto > :nth-child(2) { animation-delay: 120ms; }
.cabecera-texto > :nth-child(3) { animation-delay: 200ms; }
.cabecera-texto > :nth-child(4) { animation-delay: 280ms; }
.cabecera-texto > :nth-child(5) { animation-delay: 360ms; }

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.palabra-clave {
  background-size: 200% 100%;
  animation: brillo-palabra 7s ease-in-out infinite alternate;
}

@keyframes brillo-palabra {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 100% 50%;
  }
}

/* Tablero de widgets */
.instrumento {
  position: relative;
  min-width: 0;
}

.instrumento-luz {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0) 55%);
  mix-blend-mode: lighten;
  pointer-events: none;
}

.gw {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  container-type: inline-size;
}

/* Modo animación: la ilustración ocupa el lugar del tablero, con una sombra suave para separarla del fondo. */
.gw.gw-lottie {
  max-width: 440px;
  aspect-ratio: 1;
  filter: drop-shadow(0 26px 36px rgba(2, 4, 12, 0.5));
}

.gw.gw-lottie svg {
  display: block;
  width: 100%;
  height: 100%;
}

.gw-rejilla {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.6cqw;
}

.gw-item {
  aspect-ratio: 1;
  animation: gw-entrada 900ms cubic-bezier(0.2, 0.9, 0.25, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms + 250ms);
}

.gw-item.gw-ancho {
  grid-column: span 2;
  aspect-ratio: 2.08 / 1;
}

@keyframes gw-entrada {
  from {
    opacity: 0;
    transform: translateY(5cqw) scale(0.94);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.gw-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: #fff;
  border-radius: 10.5cqw;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.18);
  user-select: none;
  transform: perspective(900px) rotateX(var(--gw-rx, 0deg)) rotateY(var(--gw-ry, 0deg)) scale(var(--gw-s, 1));
  transition: transform 550ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.gw-shell:hover {
  --gw-s: 1.012;
}

.gw-shell:active {
  --gw-s: 0.985;
}

.gw-sheen,
.gw-aro {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gw-sheen {
  background: radial-gradient(60% 70% at var(--gw-mx, 50%) var(--gw-my, 0%), rgba(255, 255, 255, 0.13), transparent 62%);
  opacity: var(--gw-hl, 0);
  transition: opacity 450ms ease;
}

.gw-aro {
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.gw-cuerpo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.gw-cabeza {
  position: absolute;
  inset-inline: 0;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.gw-fila {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.gw-fila-base {
  align-items: flex-end;
}

.gw-num {
  font-variant-numeric: tabular-nums;
}

.gw-arco {
  position: absolute;
  inset-inline: 0;
  top: 13.4cqw;
  height: 23cqw;
  cursor: ew-resize;
  touch-action: pan-y;
}

.gw-arco-svg,
.gw-curva-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gw-curva {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 62%;
  cursor: crosshair;
  touch-action: pan-y;
}

.gw-linea {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: gw-trazar 1900ms cubic-bezier(0.3, 0.7, 0.2, 1) 350ms forwards;
}

.gw-area {
  opacity: 0;
  animation: gw-aparecer 1200ms ease 900ms forwards;
}

@keyframes gw-trazar {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes gw-aparecer {
  to {
    opacity: 1;
  }
}

.gw-bolita {
  position: absolute;
  width: 3.4cqw;
  height: 3.4cqw;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0.9cqw rgba(107, 155, 255, 0.35), 0 0 12px rgba(107, 155, 255, 0.7);
  pointer-events: none;
}

.gw-globo {
  position: absolute;
  top: -6%;
  padding: 1cqw 2.4cqw;
  font-size: 2.9cqw;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.gw-ola {
  cursor: ew-resize;
  touch-action: pan-y;
}

.gw-ola-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.gw-cuerpo-ola {
  padding: 0;
}

.gw-fila-ruta {
  display: flex;
  align-items: center;
  gap: 3.4cqw;
}

.gw-ruta {
  position: relative;
  flex: 1;
  height: 7cqw;
}

.gw-puntos {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gw-rastro {
  position: absolute;
  inset: 0;
  clip-path: inset(0 95% 0 0);
  animation: gw-estela 7500ms cubic-bezier(0.5, 0, 0.25, 1) infinite;
}

.gw-extremo {
  position: absolute;
  top: 50%;
  width: 1.4cqw;
  height: 1.4cqw;
  border-radius: 50%;
}

.gw-origen {
  left: 0;
  background: #dbe7ff;
  transform: translate(-50%, -50%);
}

.gw-destino {
  right: 0;
  background: rgba(219, 231, 255, 0.55);
  transform: translate(50%, -50%);
}

.gw-vuelo {
  position: absolute;
  top: 50%;
  left: 5%;
  margin: -3.7cqw 0 0 -3.7cqw;
  animation: gw-vuelo 7500ms cubic-bezier(0.5, 0, 0.25, 1) infinite;
}

.gw-avion {
  display: block;
  filter: drop-shadow(0 0 8px rgba(219, 231, 255, 0.5));
  animation: gw-vaiven 2400ms ease-in-out infinite;
}

.gw-codigo {
  max-width: 28cqw;
  white-space: nowrap;
}

.gw-leyenda {
  margin: 14px 0 0;
  text-align: center;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #9aa5bd;
  text-shadow: 0 1px 10px rgba(6, 9, 18, 0.8);
}

.gw-leyenda strong {
  font-weight: 500;
  color: var(--texto);
}

.gw-ciudades {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 1.6cqw;
}

.gw-duracion {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gw-pie-datos {
  display: flex;
  gap: 2.6cqw;
}

.gw-respira {
  animation: gw-respira 3600ms ease-in-out infinite;
}

.gw:not([data-activo="true"]) :is(.gw-respira, .gw-vuelo, .gw-rastro, .gw-avion) {
  animation-play-state: paused;
}

@keyframes gw-respira {
  0%, 100% { opacity: 0.78; }
  50% { opacity: 1; }
}

@keyframes gw-vuelo {
  0% { left: 5%; opacity: 0; }
  7% { opacity: 1; }
  86% { left: 95%; opacity: 1; }
  94%, 100% { left: 95%; opacity: 0; }
}

@keyframes gw-estela {
  0% { clip-path: inset(0 95% 0 0); opacity: 0; }
  7% { opacity: 1; }
  86% { clip-path: inset(0 5% 0 0); opacity: 1; }
  94%, 100% { clip-path: inset(0 5% 0 0); opacity: 0; }
}

@keyframes gw-vaiven {
  0%, 100% { transform: translateY(-1.5px); }
  50% { transform: translateY(1.5px); }
}

/* Botones: degradado sutil, brillo al pasar y flecha que avanza */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  /* El punto más claro sigue dando 4,5 a 1 con letra blanca (WCAG AA). */
  background: linear-gradient(180deg, #2f68ec 0%, #2563eb 55%, #1f56d4 100%);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 700ms var(--curva);
  pointer-events: none;
}

.btn:hover::after {
  transform: translateX(120%);
}

.btn-vidrio {
  background: rgba(255, 255, 255, 0.06);
}

.btn-vidrio::after {
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
}

.btn:disabled::after {
  display: none;
}

.btn-flecha {
  flex: none;
  transition: transform var(--duracion) var(--curva);
}

.btn:hover .btn-flecha {
  transform: translateX(3px);
}

.btn[data-estado="copiado"] {
  background: linear-gradient(180deg, #2fd16e 0%, #16a34a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 20px rgba(22, 163, 74, 0.32);
}

.btn[data-estado="copiado"]::before {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Tarjetas de estilo: la vista avanza al pasar el cursor y la marca aparece con suavidad */
.vista-estilo {
  object-position: 50% 0%;
  transition: object-position 1400ms var(--curva);
}

.tarjeta-estilo:hover .vista-estilo {
  object-position: 50% 38%;
}

.cuerpo-estilo {
  transition: border-color var(--duracion) var(--curva), background-color var(--duracion) var(--curva), box-shadow var(--duracion) var(--curva), transform var(--duracion) var(--curva);
}

.tarjeta-estilo:hover .cuerpo-estilo {
  transform: translateY(-2px);
}

.marca-elegido {
  animation: marca-entra 200ms var(--curva);
}

@keyframes marca-entra {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Pasos laterales: la línea se llena con los pasos hechos */
@media (min-width: 960px) {
  .pasos li:has(a.hecho):not(:last-child)::after {
    background: var(--acento);
  }
}

/* Brillo y resalte de letras en el hero */
.cabecera h1 {
  text-shadow: 0 2px 18px rgba(6, 9, 18, 0.55);
}

.cabecera h1 .resalte {
  color: #fff;
  text-shadow: 0 0 22px rgba(120, 160, 255, 0.28), 0 2px 18px rgba(6, 9, 18, 0.55);
}

.cabecera h1 .palabra-clave {
  text-shadow: none;
}

.apoyo-grande .resalte-suave {
  color: #fff;
  font-weight: 600;
}

/* Marca AdsMastery: esquina superior izquierda y cierre de la página */
.marca-logo {
  display: block;
  width: auto;
  height: 32px;
}

.pie-logo {
  display: block;
  width: auto;
  height: 35px;
  align-self: flex-start;
  margin-bottom: 4px;
}

/* Respuesta al cursor en paneles y tarjetas de estilo */
.panel,
.cuerpo-estilo {
  position: relative;
  isolation: isolate;
}

.panel::before,
.cuerpo-estilo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--px, 50%) var(--py, 0%), rgba(110, 145, 255, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.panel:hover::before,
.cuerpo-estilo:hover::before {
  opacity: 1;
}

.revela {
  transition: opacity 600ms var(--curva), transform 700ms var(--curva);
}

.revela.antes-de-ver:not(.visto):not(:focus-within) {
  opacity: 0;
  transform: translateY(16px);
}

/* ==== Legibilidad, botones y tarjetas ====
   El fondo animado tiene franjas claras: los textos grises se perdían sobre ellas y los paneles eran
   casi transparentes. Se sube un poco el gris de apoyo, se da cuerpo a los paneles y se añade una
   sombra oscura y corta a las letras (sombra de texto, nunca sobre el texto con degradado). */
:root {
  --apoyo: #adb7cc;
  --tenue: #929db6;
  --sombra-texto: 0 1px 2px rgba(3, 5, 12, 0.6), 0 0 14px rgba(3, 5, 12, 0.5);
  --cristal: linear-gradient(180deg, rgba(12, 18, 36, 0.74), rgba(8, 12, 25, 0.62));
}

/* La sombra se hereda: se pone en las zonas con texto y se quita donde no corresponde. */
.barra,
.cabecera-texto,
.pasos,
.contenido,
.pie {
  text-shadow: var(--sombra-texto);
}

.palabra-clave {
  text-shadow: none;
  filter: drop-shadow(0 2px 10px rgba(3, 5, 12, 0.5));
}

.pasos a {
  color: var(--apoyo);
}

.pasos a[aria-current="step"] {
  color: var(--texto);
}

/* En móvil la barra de pasos queda fija sobre el contenido: fondo casi opaco para que nada se cuele detrás de las etiquetas. */
@media (max-width: 959px) {
  .pasos {
    background: linear-gradient(rgba(6, 9, 18, 0.96) 85%, rgba(6, 9, 18, 0));
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.barra {
  background: rgba(6, 9, 18, 0.82);
}

.barra-enlaces a {
  color: var(--cuerpo);
}

.barra-enlaces a:hover {
  color: var(--texto);
  background: rgba(255, 255, 255, 0.08);
}

/* Botones: relieve, sombra de contacto y brillo de color; sube un punto al pasar y se hunde al pulsar. */
.btn {
  letter-spacing: -0.005em;
  text-shadow: 0 1px 1px rgba(8, 22, 70, 0.45);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(6, 20, 80, 0.28),
    0 1px 2px rgba(3, 5, 12, 0.55),
    0 10px 24px -6px rgba(37, 99, 235, 0.55);
  transition:
    transform var(--duracion) var(--curva),
    box-shadow 220ms var(--curva),
    filter var(--duracion) var(--curva),
    background-color var(--duracion) var(--curva),
    border-color var(--duracion) var(--curva);
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(6, 20, 80, 0.28),
    0 1px 2px rgba(3, 5, 12, 0.55),
    0 16px 32px -6px rgba(37, 99, 235, 0.7);
}

.btn:not(:disabled):active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    inset 0 2px 5px rgba(6, 20, 80, 0.4),
    0 4px 12px -4px rgba(37, 99, 235, 0.5);
}

/* El texto del botón no se parte en dos líneas junto a un bloque de texto largo. */
.btn {
  white-space: nowrap;
}

.panel-accion > .btn {
  flex: none;
}

.btn-chico {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(6, 20, 80, 0.28),
    0 1px 2px rgba(3, 5, 12, 0.55),
    0 6px 16px -6px rgba(37, 99, 235, 0.55);
}

.btn-vidrio {
  color: var(--texto);
  text-shadow: var(--sombra-texto);
  background: rgba(10, 15, 30, 0.62);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 1px 2px rgba(3, 5, 12, 0.5),
    0 8px 20px -10px rgba(0, 0, 0, 0.7);
}

.btn-vidrio:not(:disabled):hover {
  background: rgba(22, 31, 58, 0.78);
  border-color: rgba(143, 176, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 1px 2px rgba(3, 5, 12, 0.5),
    0 14px 28px -10px rgba(0, 0, 0, 0.75);
}

.btn-vidrio:not(:disabled):active {
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45);
}

.btn[data-estado="copiado"]:not(:disabled):hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 1px 2px rgba(3, 5, 12, 0.55),
    0 16px 32px -6px rgba(22, 163, 74, 0.6);
}

/* Paneles y tarjetas: más cuerpo, borde que cambia al pasar el cursor, sombra que los separa del fondo. */
.panel {
  background: var(--cristal);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 26px 50px -30px rgba(0, 0, 0, 0.75);
  transition: border-color 220ms var(--curva);
}

.panel:hover {
  border-color: rgba(255, 255, 255, 0.17);
}

.aviso-inicial {
  background: rgba(37, 99, 235, 0.13);
  border-color: rgba(91, 140, 255, 0.4);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.7);
}

.estado-vacio {
  background: rgba(8, 12, 24, 0.5);
}

.campo input,
.campo textarea,
.campo select {
  background: rgba(5, 8, 18, 0.58);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.cortina {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color var(--duracion) var(--curva),
    background-color var(--duracion) var(--curva),
    box-shadow 220ms var(--curva);
}

.cortina:not(.abierta):hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}

.cortina.abierta {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(91, 140, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(91, 140, 255, 0.12),
    0 18px 38px -24px rgba(37, 99, 235, 0.55);
}

.cortina.lista:not(.abierta) {
  border-color: rgba(52, 211, 153, 0.42);
}

.cortina-boton {
  border-radius: 14px;
}

.cortina.abierta .cortina-boton {
  border-radius: 14px 14px 0 0;
}

.cortina-num {
  color: var(--texto);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.28);
}

.cortina.abierta:not(.lista) .cortina-num {
  color: #ffffff;
  background: var(--acento);
  border-color: var(--acento);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.24);
}

.cuerpo-estilo {
  background: rgba(11, 16, 32, 0.68);
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 30px -18px rgba(0, 0, 0, 0.75);
}

.tarjeta-estilo:hover .radio-oculto:not(:checked) + .cuerpo-estilo {
  background: rgba(16, 24, 46, 0.78);
  border-color: rgba(143, 176, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 38px -18px rgba(0, 0, 0, 0.8);
}

.radio-oculto:checked + .cuerpo-estilo {
  background: rgba(37, 99, 235, 0.16);
}

.nombre-estilo {
  color: var(--texto);
}

.descripcion-estilo {
  color: var(--cuerpo);
}

@media (prefers-reduced-motion: reduce) {
  .btn:not(:disabled):hover,
  .btn:not(:disabled):active {
    transform: none;
  }

  .gw-linea {
    stroke-dashoffset: 0;
  }

  .gw-area {
    opacity: 1;
  }

  .gw-shell {
    transform: none;
    transition: none;
  }

  .revela.antes-de-ver:not(.visto) {
    opacity: 1;
    transform: none;
  }
}
