/* ==========================================================================
   PULSO — REDISEÑO VISUAL FINTECH PREMIUM (BLANCO, LIMPIO Y NAVIDEÑO ELEGANTE)
   ========================================================================== */

:root,
[data-theme='emerald'] {
  --bg-page: #ffffff;
  --bg-subtle: #f7f8fa;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --text-primary: #171717;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --border-subtle: rgba(23, 23, 23, 0.08);
  --border-strong: rgba(23, 23, 23, 0.14);

  --accent-1: #059669;
  --accent-2: #0d9488;
  --accent-3: #0284c7;
  --accent-soft: rgba(5, 150, 105, 0.09);
  --accent-border: rgba(5, 150, 105, 0.24);
  --accent-glow: rgba(5, 150, 105, 0.22);

  /* Paleta navideña sofisticada (uso sutil en acentos y banners) */
  --xmas-red: #b91c1c;
  --xmas-red-soft: rgba(185, 28, 28, 0.08);
  --xmas-green: #0f5132;
  --xmas-green-soft: rgba(15, 81, 50, 0.08);
  --xmas-gold: #b45309;
  --xmas-gold-light: #d97706;
  --xmas-gold-soft: rgba(217, 119, 6, 0.1);
}

[data-theme='cyan'] {
  --accent-1: #0284c7;
  --accent-2: #2563eb;
  --accent-3: #4f46e5;
  --accent-soft: rgba(2, 132, 199, 0.09);
  --accent-border: rgba(2, 132, 199, 0.24);
  --accent-glow: rgba(37, 99, 235, 0.22);
}

[data-theme='violet'] {
  --accent-1: #7c3aed;
  --accent-2: #9333ea;
  --accent-3: #db2777;
  --accent-soft: rgba(124, 58, 237, 0.09);
  --accent-border: rgba(124, 58, 237, 0.24);
  --accent-glow: rgba(124, 58, 237, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
  background-color: var(--bg-page);
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* Patrón arquitectónico ultra sutil para secciones claras */
.bg-grid-subtle {
  background-image:
    linear-gradient(to right, rgba(23, 23, 23, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 23, 23, 0.032) 1px, transparent 1px);
  background-size: 44px 44px;
}

.bg-dots-subtle {
  background-image: radial-gradient(rgba(23, 23, 23, 0.065) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Superficies limpias y elevación profesional */
.glass-panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 30px -14px rgba(15, 23, 42, 0.08);
}

.glass-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px -12px rgba(15, 23, 42, 0.07);
  transition:
    transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.22s ease,
    box-shadow 0.26s ease;
}

.glass-card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.05),
    0 18px 36px -14px var(--accent-glow);
}

/* Header limpio con vidrio blanco */
.pulso-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(23, 23, 23, 0.07);
}

/* Franja superior navideña elegante */
.holiday-promo-bar {
  background: linear-gradient(90deg, #0f5132 0%, #14532d 48%, #991b1b 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.holiday-promo-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 50%, rgba(253, 224, 71, 0.16) 0, transparent 28%),
    radial-gradient(circle at 88% 50%, rgba(255, 255, 255, 0.12) 0, transparent 26%);
  pointer-events: none;
}

/* Línea decorativa navideña ultra delicada (rojo, dorado, verde pino) */
.holiday-hairline {
  height: 3px;
  background: linear-gradient(90deg, #0f5132 0%, #d97706 50%, #b91c1c 100%);
}

/* Partículas de nieve muy sutiles en el Hero */
.snow-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.snow-dot {
  position: absolute;
  top: -12px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.38) 0%, rgba(148, 163, 184, 0.25) 60%, transparent 100%);
  animation: snowDrift linear infinite;
  opacity: 0;
}

@keyframes snowDrift {
  0% {
    transform: translate3d(0, -10px, 0);
    opacity: 0;
  }
  15% {
    opacity: 0.75;
  }
  85% {
    opacity: 0.55;
  }
  100% {
    transform: translate3d(22px, 420px, 0);
    opacity: 0;
  }
}

@keyframes starTwinkle {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.animate-twinkle {
  animation: starTwinkle 3.2s ease-in-out infinite;
}

/* ==========================================================================
   TARJETAS DE SERVICIO BLANCAS CON IDENTIDAD CROMÁTICA DE CADA MARCA
   ========================================================================== */
.service-brand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  overflow: hidden;
  border-radius: 1.375rem;
  border: 1px solid rgba(23, 23, 23, 0.08);
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 26px -16px rgba(15, 23, 42, 0.1);
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s ease,
    border-color 0.24s ease;
}

.service-brand-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    90% 60% at 100% 0%,
    color-mix(in srgb, var(--brand-color) 9%, transparent),
    transparent 65%
  );
  opacity: 0.85;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.service-brand-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--brand-color) 48%, rgba(23, 23, 23, 0.1));
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.05),
    0 22px 42px -18px color-mix(in srgb, var(--brand-color) 32%, rgba(15, 23, 42, 0.14));
}

.service-brand-card:hover::before {
  opacity: 1;
}

.service-brand-card:focus-visible {
  outline: 2px solid var(--brand-color);
  outline-offset: 2px;
}

.service-brand-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  background: color-mix(in srgb, var(--brand-color) 11%, #ffffff);
  color: var(--brand-color);
  border: 1px solid color-mix(in srgb, var(--brand-color) 22%, transparent);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s ease;
}

.service-brand-card:hover .service-brand-icon-badge {
  transform: scale(1.06);
  background: color-mix(in srgb, var(--brand-color) 16%, #ffffff);
}

.service-brand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 0.75rem;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--brand-color), var(--brand-color-2, var(--brand-color)));
  box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--brand-color) 55%, transparent);
  transition: filter 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.service-brand-btn * {
  color: #ffffff !important;
}

.service-brand-card:hover .service-brand-btn {
  filter: brightness(1.05);
  transform: translateX(2px);
  box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--brand-color) 65%, transparent);
}

.service-brand-tag {
  background: color-mix(in srgb, var(--brand-color) 10%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--brand-color) 26%, transparent);
  color: color-mix(in srgb, var(--brand-color) 85%, #171717) !important;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   ACENTOS, BOTONES E INPUTS FINTECH BLANCOS
   ========================================================================== */
.accent-text {
  color: var(--accent-1);
}

.accent-pill {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #ffffff !important;
  box-shadow: 0 8px 20px -8px var(--accent-glow);
}

.accent-pill * {
  color: #ffffff !important;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, #171717 0%, #27272a 100%);
  padding: 0.68rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff !important;
  border: 1px solid rgba(23, 23, 23, 0.9);
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 10px 22px -10px rgba(23, 23, 23, 0.38);
  transition:
    transform 0.16s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
}

.btn-primary * {
  color: #ffffff !important;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -10px var(--accent-glow);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 26px -10px var(--accent-glow);
  transition: transform 0.18s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-accent * {
  color: #ffffff !important;
}

.btn-accent:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px var(--accent-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(23, 23, 23, 0.12);
  background: #ffffff;
  padding: 0.65rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #171717;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.16s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
  background: #f7f8fa;
  border-color: rgba(23, 23, 23, 0.22);
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.08);
}

.btn-secondary:active:not(:disabled) {
  transform: scale(0.98);
}

.input-field {
  width: 100%;
  border-radius: 0.875rem;
  border: 1px solid rgba(23, 23, 23, 0.14);
  background: #ffffff;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #171717;
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input-field::placeholder {
  color: #9ca3af;
}

.input-field:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-field.input-error {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

/* Tarjeta virtual de pago en el modal (diseño metálico fintech elegante) */
.virtual-card {
  background: linear-gradient(135deg, #18181b 0%, #27272a 48%, var(--accent-1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 36px -14px rgba(15, 23, 42, 0.35);
}

.virtual-card,
.virtual-card * {
  color: #ffffff;
}

/* ==========================================================================
   HERO IMAGE FULL-WIDTH EN MÓVIL (EDGE-TO-EDGE)
   ========================================================================== */
@media (max-width: 639px) {
  .hero-media-bleed {
    width: calc(100% + 2rem) !important;
    max-width: none !important;
    margin-left: -1rem !important;
    margin-right: -1rem !important;
  }

  .hero-media-frame {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .hero-media-inner {
    border-radius: 0 !important;
  }

  .hero-media-inner img {
    display: block;
    width: 100%;
    object-position: center center;
  }
}

/* ==========================================================================
   CAROUSEL PROMOCIONAL PUBLICITARIO (SIN BOTONES, CON LOGOS ORIGINALES DE FONDO)
   ========================================================================== */
.promo-banner-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.08),
    0 26px 54px -22px rgba(15, 23, 42, 0.34);
  user-select: none;
}

.promo-banner-shell,
.promo-banner-shell * {
  color: #ffffff;
}

.promo-ad-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.22) 0%, transparent 44%),
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.12) 0%, transparent 40%),
    linear-gradient(115deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.12) 52%, rgba(0, 0, 0, 0.24) 100%);
  z-index: 2;
}

.promo-logo-backdrop {
  position: absolute;
  inset: -18% -8%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: center;
  justify-items: center;
  transform: rotate(-10deg) scale(1.08);
  pointer-events: none;
  z-index: 1;
  opacity: 0.26;
}

.promo-logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 4.5rem;
  padding: 0.7rem 1rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.35);
}

.promo-logo-tile img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.promo-brand-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  max-width: 380px;
}

.promo-brand-showcase-single {
  grid-template-columns: 1fr;
  max-width: 300px;
}

.promo-brand-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 5.25rem;
  padding: 1rem 1.35rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 14px 32px -12px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.promo-brand-card img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.promo-brand-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.promo-brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.35rem;
  min-width: 4.9rem;
  padding: 0.38rem 0.7rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.3);
}

.promo-brand-chip img {
  max-height: 100%;
  max-width: 4.4rem;
  object-fit: contain;
}

@media (max-width: 639px) {
  .promo-banner-shell {
    border-radius: 1.35rem;
  }

  .promo-logo-backdrop {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    opacity: 0.22;
  }

  .promo-logo-tile {
    height: 3.35rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.85rem;
  }
}

/* ==========================================================================
   REPRODUCTORES DE VIDEO RESPONSIVE Y GALERÍA COMERCIAL
   ========================================================================== */
.video-showcase-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(23, 23, 23, 0.09);
  background: #ffffff;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.04),
    0 20px 44px -20px rgba(15, 23, 42, 0.14);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}

.video-showcase-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.06),
    0 26px 52px -20px rgba(15, 23, 42, 0.18);
}

.video-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f7f8fa;
  overflow: hidden;
}

.video-frame-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   ANIMACIONES Y MICROINTERACCIONES
   ========================================================================== */
@keyframes bannerSlideIn {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes bannerProgress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spinSlow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseRing {
  0% {
    transform: scale(0.92);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.42);
    opacity: 0;
  }
}

.animate-banner-in {
  animation: bannerSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-banner-progress {
  animation: bannerProgress 4.5s linear forwards;
}

.animate-float {
  animation: floatGentle 4.6s ease-in-out infinite;
}

.animate-fade-up {
  animation: fadeSlideUp 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-modal-pop {
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-spin-fast {
  animation: spinSlow 0.9s linear infinite;
}

.animate-pulse-ring {
  animation: pulseRing 1.45s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* Scrollbar limpia para fondo blanco */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f7f8fa;
}

::-webkit-scrollbar-thumb {
  background: rgba(23, 23, 23, 0.18);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(23, 23, 23, 0.32);
}

/* Impresión de comprobante en hoja blanca limpia */
@media print {
  body * {
    visibility: hidden;
  }
  #receipt-printable,
  #receipt-printable * {
    visibility: visible;
  }
  #receipt-printable {
    position: fixed;
    inset: 0;
    background: #ffffff !important;
    color: #171717 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* Respeto estricto a las preferencias de movimiento reducido del SO */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .snow-layer {
    display: none !important;
  }
}
