:root {
  --color-green-brand: #00E599;
  --color-green-brand-hover: #00c784;
  --color-green-light: #e6fbf3;
  --color-bg-light: #ffffff;
  --color-bg-subtle-light: #f8fafc;
  --color-text-light: #0a0d12;
  --color-text-muted-light: #475569;
  --color-border-light: rgba(10, 13, 18, 0.08);

  /* Dark mode tokens */
  --color-bg-dark: #07090e;
  --color-bg-card-dark: #0f131c;
  --color-text-dark: #f8fafc;
  --color-text-muted-dark: #94a3b8;
  --color-border-dark: rgba(255, 255, 255, 0.1);

  /* Headline Sequential Pulse */
  --pulse-green: #00a86b;
  --pulse-base: #0f172a;
}

html.dark {
  --pulse-green: #00E599;
  --pulse-base: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}

/* Light Mode Defaults */
html:not(.dark) body {
  background-color: var(--color-bg-light);
  color: var(--color-text-light);
}

/* Dark Mode Overrides */
html.dark body {
  background-color: var(--color-bg-dark);
  color: var(--color-text-dark);
}

/* Custom Typography - Poppins for Headlines */
.font-display {
  font-family: 'Poppins', sans-serif;
}

.font-mono-fintech {
  font-family: 'JetBrains Mono', monospace;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #1e293b;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-green-brand);
}

/* Floating pill navigation container */
.pill-navbar {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .pill-navbar {
  background-color: rgba(15, 19, 28, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 229, 153, 0.08);
}

html:not(.dark) .pill-navbar {
  background-color: rgba(255, 255, 255, 0.92);
  border-color: rgba(10, 13, 18, 0.08);
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
}

/* 3D Floating Laptop Animation */
@keyframes floatLaptop {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-16px) rotate(0.6deg);
  }
}

.animate-float-laptop {
  animation: floatLaptop 5.5s ease-in-out infinite;
  transform-origin: center center;
  transition: filter 0.3s ease;
}

/* 3D Floating Characters & Badges Animations */
@keyframes floatGuy {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(0.4deg);
  }
}

.animate-float-guy {
  animation: floatGuy 6s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes floatBolt {
  0%, 100% {
    transform: translateY(0px) rotate(-2deg);
  }
  50% {
    transform: translateY(-16px) rotate(3deg);
  }
}

.animate-float-bolt {
  animation: floatBolt 4.5s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes floatShield {
  0%, 100% {
    transform: translateY(0px) rotate(2deg);
  }
  50% {
    transform: translateY(-12px) rotate(-2deg);
  }
}

.animate-float-shield {
  animation: floatShield 5.2s ease-in-out infinite -1.5s;
  transform-origin: center center;
}

@keyframes floatCheck {
  0%, 100% {
    transform: translateY(0px) rotate(-1deg);
  }
  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}

.animate-float-check {
  animation: floatCheck 4.8s ease-in-out infinite -2.5s;
  transform-origin: center center;
}

/* Soft Radial Dissolve for Hero Transition */
.bg-radial-white-dissolve {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%);
}

html.dark .bg-radial-white-dissolve {
  background: radial-gradient(circle, rgba(7, 9, 14, 0.85) 0%, rgba(7, 9, 14, 0) 70%);
}

/* ======================================================= */
/* SEQUENTIAL GREEN WAVE PULSE (HERO HEADLINE)             */
/* ======================================================= */
.pulse-word-1,
.pulse-word-2,
.pulse-word-3,
.pulse-word-4,
.pulse-word-5,
.pulse-word-6 {
  color: var(--pulse-base);
  pointer-events: none;
}

/* Solo se activa la animación cuando la diapositiva está activa */
.active-pulse .pulse-word-1,
.active-pulse .pulse-word-2,
.active-pulse .pulse-word-3,
.active-pulse .pulse-word-4,
.active-pulse .pulse-word-5,
.active-pulse .pulse-word-6 {
  animation-duration: 6s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  animation-timing-function: ease-in-out;
}

.active-pulse .pulse-word-1 { animation-name: pulseGreen1; }
.active-pulse .pulse-word-2 { animation-name: pulseGreen2; }
.active-pulse .pulse-word-3 { animation-name: pulseGreen3; }
.active-pulse .pulse-word-4 { animation-name: pulseGreen4; }
.active-pulse .pulse-word-5 { animation-name: pulseGreen5; }
.active-pulse .pulse-word-6 { animation-name: pulseGreen6; }

@keyframes pulseGreen1 {
  0% {
    color: var(--pulse-base);
  }
  6%, 13% {
    color: var(--pulse-green);
  }
  16%, 100% {
    color: var(--pulse-base);
  }
}

@keyframes pulseGreen2 {
  0%, 15% {
    color: var(--pulse-base);
  }
  18%, 25% {
    color: var(--pulse-green);
  }
  28%, 100% {
    color: var(--pulse-base);
  }
}

@keyframes pulseGreen3 {
  0%, 27% {
    color: var(--pulse-base);
  }
  30%, 37% {
    color: var(--pulse-green);
  }
  40%, 100% {
    color: var(--pulse-base);
  }
}

@keyframes pulseGreen4 {
  0%, 39% {
    color: var(--pulse-base);
  }
  42%, 49% {
    color: var(--pulse-green);
  }
  52%, 100% {
    color: var(--pulse-base);
  }
}

@keyframes pulseGreen5 {
  0%, 51% {
    color: var(--pulse-base);
  }
  54%, 61% {
    color: var(--pulse-green);
  }
  64%, 100% {
    color: var(--pulse-base);
  }
}

@keyframes pulseGreen6 {
  0%, 63% {
    color: var(--pulse-base);
  }
  67%, 100% {
    color: var(--pulse-green);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-word-1,
  .pulse-word-2,
  .pulse-word-3,
  .pulse-word-4,
  .pulse-word-5,
  .pulse-word-6 {
    animation: none;
    color: var(--pulse-base);
  }
  .pulse-word-6 {
    color: var(--pulse-green);
  }
}

/* Tactile button */
.btn-pago {
  position: relative;
  font-weight: 800;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-pago:active {
  transform: scale(0.97) translateY(1px);
}

/* Sticker badge */
.badge-sticker {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

/* ======================================================= */
/* INFINITE MARQUEE CAROUSEL (FADING EDGES & SEAMLESS LOOP)*/
/* ======================================================= */
.marquee-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  user-select: none;
}

.marquee-group {
  display: flex;
  gap: 1.5rem;
  padding-right: 1.5rem;
  flex-shrink: 0;
  animation: marqueeContinuous 45s linear infinite;
  will-change: transform;
}

@keyframes marqueeContinuous {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

/* Pause on hover so users can easily read any card */
.marquee-container:hover .marquee-group,
.marquee-container:focus-within .marquee-group {
  animation-play-state: paused;
}

/* Fallback gradient side fades for all browsers */
.marquee-fade-left,
.marquee-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
  width: 24px;
}

.marquee-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--color-bg-light), transparent);
}

.marquee-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--color-bg-light), transparent);
}

@media (min-width: 640px) {
  .marquee-fade-left,
  .marquee-fade-right {
    width: 60px;
  }
}

@media (min-width: 1024px) {
  .marquee-fade-left,
  .marquee-fade-right {
    width: 130px;
  }
}

html.dark .marquee-fade-left {
  background: linear-gradient(to right, var(--color-bg-dark), transparent);
}

html.dark .marquee-fade-right {
  background: linear-gradient(to left, var(--color-bg-dark), transparent);
}

/* Base Horizontal scroll styling (fallback) */
.horizontal-scroll-container {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.horizontal-scroll-container::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Gentle bounce for Notimiga Chat Avatar */
@keyframes bounceGentle {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.animate-bounce-gentle {
  animation: bounceGentle 3.5s ease-in-out infinite;
}

/* Custom Scrollbar for Modals & Chat */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
}

html.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--color-green-brand);
}

/* ======================================================= */
/* ANIMATED WAVE TRANSITIONS (TOP & BOTTOM BORDERS)        */
/* ======================================================= */
.wave-divider-top,
.wave-divider-bottom {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  user-select: none;
  z-index: 20;
}

.wave-divider-top {
  top: -1px;
}

.wave-divider-bottom {
  bottom: -1px;
}

.wave-track {
  width: 200%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

.wave-anim-slow {
  animation: waveSlideDivider 22s linear infinite;
}

.wave-anim-mid {
  animation: waveSlideDivider 15s linear infinite reverse;
}

.wave-anim-fast {
  animation: waveSlideDivider 10s linear infinite;
}

@keyframes waveSlideDivider {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}