/* typography */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f5f5f7;
  color: #0f172a;
  opacity: 0;
  transition: opacity 0.4s ease;
}
body.is-loaded {
  opacity: 1;
}

/* custom-animations */
@keyframes pulse-neon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.neon-glow {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.35);
}

.gradient-text {
  background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* demo page */
.qr-placeholder {
  background: repeating-conic-gradient(#e2e2e7 0% 25%, #ebebf0 0% 50%) 0 0 / 8px 8px;
  border-radius: 8px;
}

/* HubSpot form (embed v2 — DOM normal) — adaptado al design system de Identfy */
.hbspt-form,
.hs-form {
  width: 100% !important;
  font-family: 'Inter', sans-serif !important;
}

.hs-form-field {
  margin-bottom: 20px !important;
}

.hs-form-field > label {
  display: block !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: #64748b !important;
  margin-bottom: 8px !important;
}

.hs-form-field > label .hs-form-required {
  color: #7c3aed !important;
  margin-left: 2px !important;
}

.hs-form-field input[type="text"],
.hs-form-field input[type="email"],
.hs-form-field input[type="tel"],
.hs-form-field input[type="number"],
.hs-form-field input[type="url"],
.hs-form-field textarea,
.hs-form-field select {
  width: 100% !important;
  background-color: #f5f5f7 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  color: #0f172a !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.hs-form-field input::placeholder,
.hs-form-field textarea::placeholder {
  color: #94a3b8 !important;
}

.hs-form-field input:focus,
.hs-form-field textarea:focus,
.hs-form-field select:focus {
  outline: none !important;
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2) !important;
}

.hs-form-field textarea {
  min-height: 120px !important;
  resize: vertical !important;
}

/* Checkbox / legal consent */
.hs-form-booleancheckbox,
.legal-consent-container .hs-form-booleancheckbox {
  margin-bottom: 12px !important;
}

.hs-form-booleancheckbox label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  font-size: 12px !important;
  color: #64748b !important;
  line-height: 1.6 !important;
  cursor: pointer !important;
}

.hs-form-booleancheckbox input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background-color: #f5f5f7 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  position: relative !important;
  transition: all 0.2s !important;
}

.hs-form-booleancheckbox input[type="checkbox"]:checked {
  background-color: #7c3aed !important;
  border-color: #7c3aed !important;
}

.hs-form-booleancheckbox input[type="checkbox"]:checked::after {
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  top: 2px !important;
  width: 5px !important;
  height: 10px !important;
  border: solid white !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
}

.hs-form-booleancheckbox a {
  color: #7c3aed !important;
  text-decoration: none !important;
}

.hs-form-booleancheckbox a:hover {
  text-decoration: underline !important;
}

.hs-form-booleancheckbox span {
  display: inline !important;
}

/* Submit button */
.hs-submit {
  margin-top: 8px !important;
}

.hs-button,
input.hs-button[type="submit"] {
  width: 100% !important;
  background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 16px 24px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.35) !important;
  transition: opacity 0.2s !important;
}

.hs-button:hover,
input.hs-button[type="submit"]:hover {
  opacity: 0.9 !important;
}

/* Errores */
.hs-error-msgs {
  list-style: none !important;
  padding: 0 !important;
  margin: 6px 0 0 !important;
}

.hs-error-msg,
.hs-error-msgs label {
  font-size: 12px !important;
  color: #dc2626 !important;
}

.hs-form-field input.invalid,
.hs-form-field input.error {
  border-color: #dc2626 !important;
}

/* Mensaje de éxito (si no se redirige) */
.submitted-message {
  font-size: 14px !important;
  color: #0f172a !important;
  text-align: center !important;
  padding: 20px !important;
  background: #f5f5f7 !important;
  border-radius: 12px !important;
}

/* Layout grid de HubSpot (filas con varias columnas) */
.hs-form .hs-form-field .input {
  margin: 0 !important;
}

.hs-fieldtype-booleancheckbox > label {
  display: none !important;
}

/* =====================================================================
   UI 2026 — Home (aurora light)
   Todo el bloque está scopeado bajo `body.ui26` o clases propias
   (`.ui26-*`, `.card-soft`, `.panel-lavender`, `.stagger`…) para no
   afectar al resto de páginas del sitio.
   ===================================================================== */

body.ui26 {
  background-color: #ffffff;
}

/* Fondo aurora fijo (capa decorativa, primer hijo del body) */
.ui26-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 42rem at 12% 4%,  rgba(196, 181, 253, 0.55), transparent 62%),
    radial-gradient(52rem 38rem at 92% 0%,  rgba(232, 121, 249, 0.22), transparent 60%),
    radial-gradient(58rem 44rem at 96% 34%, rgba(191, 219, 254, 0.55), transparent 62%),
    radial-gradient(50rem 40rem at 0% 46%,  rgba(221, 214, 254, 0.45), transparent 62%),
    radial-gradient(64rem 46rem at 50% 96%, rgba(199, 210, 254, 0.40), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #fbfaff 45%, #f4f6ff 100%);
}

/* Marca de agua "identfy" (bg_header.webp) detrás del hero */
/* El logotipo "identfy" del asset ocupa la banda vertical 21%–47% de la
   imagen y el 87% de su ancho. Ajustada al ancho completo del dispositivo
   (width:100%), esa banda cae entre el titular del hero y el borde superior
   de la tarjeta de vídeo con top:-3.3vw. */
/* Capa contenedora: recorta la marca de agua al bloque hero + vídeo, pero
   la desvanece antes de llegar al borde inferior para que el recorte no se
   vea como una línea horizontal sobre el fondo. La máscara es relativa a la
   altura del contenedor, así que el degradado siempre termina justo en el
   corte, sea cual sea el ancho de la ventana. */
.ui26-watermark-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 42%, transparent 88%);
  mask-image: linear-gradient(to bottom, #000 42%, transparent 88%);
}

.ui26-watermark {
  position: absolute;
  top: -3.3vw;
  left: 0;
  width: 100%;
  max-width: none;
  height: auto;
  opacity: 0.45;
  filter: saturate(0.5) brightness(1.05);
  pointer-events: none;
  user-select: none;
  /* Segundo desvanecido, esta vez relativo a la propia imagen: en ventanas
     estrechas la imagen acaba antes que el contenedor y su borde inferior
     también debe difuminarse. El logotipo ocupa la banda 21%–47%. */
  -webkit-mask-image: linear-gradient(to bottom, #000 52%, transparent 82%);
  mask-image: linear-gradient(to bottom, #000 52%, transparent 82%);
}

/* En pantallas estrechas el titular ocupa más líneas y el logotipo lo cruza:
   se rebaja para que funcione solo como textura. */
@media (max-width: 767px) {
  .ui26-watermark {
    opacity: 0.26;
  }
}

/* Header flotante: transparente arriba, cristal al hacer scroll */
.ui26-header {
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}
.ui26-header.is-stuck {
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -24px rgba(15, 23, 42, 0.45);
}

/* Píldora de navegación del header */
.nav-pill {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px -20px rgba(79, 70, 229, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Píldora outline (tags del hero) */
.pill-outline {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Tarjeta blanca con sombra suave */
.card-soft {
  background: #ffffff;
  border-radius: 1.5rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 24px 48px -30px rgba(79, 70, 229, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-soft:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 34px 64px -30px rgba(79, 70, 229, 0.55);
}

/* Panel lavanda (bloque de dato destacado / CTA final) */
.panel-lavender {
  background: linear-gradient(115deg, #f7f2ff 0%, #eef2ff 55%, #faf3ff 100%);
  border: 1px solid rgba(196, 181, 253, 0.35);
  border-radius: 1.5rem;
}

/* Imagen embebida dentro de un titular */
.inline-media {
  display: inline-block;
  vertical-align: middle;
  height: 0.92em;
  width: 1.7em;
  margin: 0 0.1em;
  border-radius: 0.3em;
  overflow: hidden;
  transform: translateY(-0.07em);
  box-shadow: 0 10px 24px -14px rgba(15, 23, 42, 0.55);
}
.inline-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Rejilla escalonada (cards con desfase vertical alterno) */
@media (min-width: 1024px) {
  .stagger > *:nth-child(even) {
    margin-top: 3rem;
  }
}

/* =====================================================================
   Lightbox de vídeo (tarjeta del hero de la home)
   z-index 60: por encima de la cabecera y del menú móvil (z-50).
   ===================================================================== */
.ui26-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ui26-lightbox.is-open {
  opacity: 1;
}
.ui26-lightbox[hidden] {
  display: none;
}

.ui26-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* El ancho se limita para que el 16:9 nunca pase de 80vh de alto: así no hay
   que recortar ni añadir bandas negras en pantallas apaisadas. */
.ui26-lightbox__dialog {
  position: relative;
  width: min(1100px, 100%, calc(80vh * 16 / 9));
  transform: scale(0.97);
  transition: transform 0.25s ease;
}
.ui26-lightbox.is-open .ui26-lightbox__dialog {
  transform: scale(1);
}

/* aspect-ratio reserva el hueco antes de que cargen los metadatos del vídeo
   (identfy.mp4 es 1280×720), para que el diálogo no dé un salto. */
.ui26-lightbox__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 1.25rem;
  background: #000;
  box-shadow: 0 50px 90px -40px rgba(15, 23, 42, 0.8);
}

.ui26-lightbox__close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background-color 0.2s ease;
}
.ui26-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* En pantallas bajas no hay hueco sobre el vídeo: el cierre se solapa dentro. */
@media (max-height: 640px), (max-width: 640px) {
  .ui26-lightbox__close {
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
  }
}

/* La tarjeta que abre el lightbox es un <button>: quita el estilo nativo. */
[data-video-open] {
  padding: 0;
  border: 0;
  background: none;
  appearance: none;
}
