/* Catcher — interactions, animations & "enterprise polish" layer.
   Cargado DESPUÉS de style.css. Solo agrega; no override agresivo. */

/* ─── Scroll progress bar ───────────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #4285F4 0%, #64B5F6 60%, #FFA726 100%);
  z-index: 100;
  transition: width 80ms linear;
  box-shadow: 0 0 12px rgba(66,133,244,0.6);
  pointer-events: none;
}

/* ─── Reveal on scroll ──────────────────────────────────────────────────── */
/* El estado oculto está gateado tras html.js-reveal (agregado pre-paint por
   i18n-boot.js): sin JS nada queda invisible, y el hero no lleva data-reveal
   para que el H1 pinte en el primer frame (LCP).
   reveal-armed lo agrega site.js al inicializar el IO; si site.js no llega a
   correr, la animación de fallback revela todo a los 5s. */
html.js-reveal:not(.reveal-armed) [data-reveal] {
  animation: reveal-fallback 1ms 5s forwards;
}
html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
html.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@keyframes reveal-fallback {
  to { opacity: 1; transform: none; }
}
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }
[data-reveal-delay="6"] { transition-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
  html.js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; animation: none; }
}

/* ─── Card hover: lift + glow follow mouse ──────────────────────────────── */
.card,
.card-accent,
.card-soft {
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 240ms ease,
              box-shadow 240ms ease;
}
.card:hover,
.card-accent:hover,
.card-soft:hover {
  transform: translateY(-3px);
  border-color: rgba(66,133,244,0.45);
  box-shadow: 0 22px 40px -22px rgba(66,133,244,0.30),
              0 0 0 1px rgba(66,133,244,0.12);
}

/* Mouse-follow spotlight on cards (set via JS --mx/--my) */
.card-spot {
  position: relative;
  overflow: hidden;
}
.card-spot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%),
                              rgba(66,133,244,0.16), transparent 60%);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
  z-index: 0;
}
.card-spot:hover::before { opacity: 1; }
.card-spot > * { position: relative; z-index: 1; }

/* ─── Section eyebrow / heading rhythm ──────────────────────────────────── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--catcher-primary-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--catcher-primary-light);
  opacity: 0.6;
}

/* ─── Stats strip ──────────────────────────────────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--catcher-border);
  border: 1px solid var(--catcher-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (min-width: 768px) {
  .stats-strip { grid-template-columns: repeat(4, 1fr); }
}
.stat-cell {
  background: var(--catcher-bg-2);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}
.stat-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 100% at 50% 0%, rgba(66,133,244,0.10), transparent 70%);
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}
.stat-cell:hover::after { opacity: 1; }
.stat-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--catcher-text-dim);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.stat-value {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-value .unit {
  font-size: 0.45em;
  font-weight: 700;
  color: var(--catcher-text-dim);
  margin-left: 4px;
  letter-spacing: 0;
}
.stat-label {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--catcher-text-muted);
  font-weight: 500;
}
.stat-trend {
  margin-top: 6px;
  font-size: 11px;
  color: #81c784;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── Logo marquee ─────────────────────────────────────────────────────── */
.marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--catcher-text-muted);
  font-size: 15px;
  font-weight: 600;
  opacity: 0.7;
  transition: opacity 200ms ease, color 200ms ease;
  white-space: nowrap;
}
.marquee-item:hover { opacity: 1; color: #fff; }
.marquee-item .icon {
  font-size: 22px;
  line-height: 1;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ─── Tabs ─────────────────────────────────────────────────────────────── */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--catcher-surface);
  border: 1px solid var(--catcher-border);
  border-radius: var(--r-pill);
}
.tab-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  color: var(--catcher-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--catcher-text); }
.tab-btn.is-active {
  background: var(--catcher-primary);
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(66,133,244,0.65);
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade-in 360ms ease; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Comparison table ─────────────────────────────────────────────────── */
.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--catcher-surface);
  border: 1px solid var(--catcher-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.compare th,
.compare td {
  padding: 14px 16px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid var(--catcher-border);
  vertical-align: middle;
}
.compare th {
  font-weight: 700;
  color: var(--catcher-text);
  background: var(--catcher-bg-2);
  font-size: 13px;
  letter-spacing: -0.005em;
}
.compare td:first-child,
.compare th:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--catcher-text);
}
.compare tr:last-child td { border-bottom: 0; }
.compare .col-catcher {
  background: linear-gradient(180deg, rgba(66,133,244,0.10), rgba(66,133,244,0.04));
  border-left: 1px solid rgba(66,133,244,0.30);
  border-right: 1px solid rgba(66,133,244,0.30);
  color: #fff;
  position: relative;
}
.compare th.col-catcher {
  background: linear-gradient(180deg, rgba(66,133,244,0.22), rgba(66,133,244,0.08));
  color: #fff;
}
.compare th.col-catcher::after {
  content: "Recomendado";
  position: absolute;
  top: -6px; left: 50%;
  transform: translate(-50%, -100%);
  background: var(--catcher-primary);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  box-shadow: 0 6px 14px -4px rgba(66,133,244,0.6);
  white-space: nowrap;
}
.compare .yes { color: #81c784; font-weight: 700; }
.compare .no  { color: #5b6a85; }
.compare .partial { color: #FFA726; font-weight: 600; font-size: 12.5px; }

/* ─── Steps section: big watermark number ──────────────────────────────── */
.step-num {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 3rem;
  line-height: 1;
  font-weight: 900;
  color: var(--catcher-primary);
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
}

/* ─── Testimonials ─────────────────────────────────────────────────────── */
.testimonial-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.testimonial {
  position: relative;
  padding: 24px;
  background: var(--catcher-surface);
  border: 1px solid var(--catcher-border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
}
.testimonial::before {
  content: "“";
  position: absolute;
  top: 6px; left: 16px;
  font-size: 56px;
  line-height: 1;
  color: var(--catcher-primary);
  opacity: 0.18;
  font-family: Georgia, serif;
  font-weight: 700;
}
.testimonial-quote {
  font-size: 15px;
  line-height: 1.6;
  color: var(--catcher-text);
  position: relative;
  z-index: 1;
  flex: 1;
}
.testimonial-author {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--catcher-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.testimonial-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--catcher-primary), #1f6fe3);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.testimonial-meta {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.testimonial-meta .sub {
  display: block;
  color: var(--catcher-text-dim);
  font-weight: 500;
  font-size: 11.5px;
  margin-top: 2px;
}

/* ─── Sticky mobile CTA ────────────────────────────────────────────────── */
.sticky-cta {
  position: fixed;
  left: 12px; right: 12px;
  bottom: 12px;
  z-index: 40;
  background: rgba(13, 20, 33, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--catcher-border-strong);
  border-radius: var(--r-lg);
  padding: 10px 12px 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,0.6);
  transform: translateY(120%);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta .text {
  flex: 1;
  font-size: 13px;
  line-height: 1.3;
}
.sticky-cta .text strong { color: #fff; font-weight: 700; }
.sticky-cta .text .sub { color: var(--catcher-text-dim); font-size: 11px; display: block; margin-top: 2px; }
.sticky-cta .btn-primary { width: auto; padding: 9px 14px; font-size: 13px; }
@media (min-width: 768px) {
  .sticky-cta { display: none; }
}

/* ─── Subtle floating noise / grain (premium feel) ──────────────────────── */
.bg-noise::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/></svg>");
  mix-blend-mode: overlay;
}

/* ─── Section divider with label ────────────────────────────────────────── */
.section-rule {
  display: flex; align-items: center; gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  color: var(--catcher-text-dim);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}
.section-rule::before,
.section-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--catcher-border) 50%, transparent);
}

/* ─── Pill button (CTA arrow) ───────────────────────────────────────────── */
.btn-primary svg,
.btn-secondary svg { transition: transform 160ms ease; }
.btn-primary:hover svg,
.btn-secondary:hover svg { transform: translateX(3px); }

/* ─── Trust strip (security/privacy badges) ─────────────────────────────── */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  align-items: center;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--catcher-border);
  background: var(--catcher-surface);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--catcher-text-muted);
}
.trust-badge svg { color: var(--catcher-primary-light); }

/* ─── Tighten anchor underline so links look pro ────────────────────────── */
a.btn-ghost:hover,
nav a:hover { text-decoration: none; }

/* ─── Counter (used by animated stats) ──────────────────────────────────── */
.counter[data-target] { font-variant-numeric: tabular-nums; }

/* ─── Language switcher (header dropdown: globo + EN/ES/PT) ─────────────── */
.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px !important;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--r-md);
  cursor: pointer;
  font-family: inherit;
  color: var(--catcher-text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.lang-trigger:hover {
  background: var(--catcher-surface-2);
  color: var(--catcher-text);
}
.lang-trigger svg:first-of-type { opacity: 0.85; }
.lang-trigger svg:last-of-type {
  transition: transform 200ms ease;
  opacity: 0.7;
}
.lang-switcher .lang-menu.is-open ~ button .lang-trigger,
.lang-switcher:has(.lang-menu.is-open) .lang-trigger {
  background: var(--catcher-surface-2);
  color: var(--catcher-text);
  border-color: var(--catcher-border);
}
.lang-switcher:has(.lang-menu.is-open) .lang-trigger svg:last-of-type {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--catcher-surface);
  border: 1px solid var(--catcher-border);
  border-radius: var(--r-md);
  box-shadow:
    0 18px 40px -12px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
              visibility 180ms;
  z-index: 50;
}
.lang-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-menu li { margin: 0; }
.lang-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  color: var(--catcher-text);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.lang-option:hover {
  background: var(--catcher-surface-2);
  color: #fff;
}
.lang-option.is-active {
  background: var(--catcher-primary-soft);
  color: var(--catcher-primary-light);
  font-weight: 600;
}
.lang-option.is-active::after {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
  flex-shrink: 0;
}

/* Compact label on small screens */
@media (max-width: 640px) {
  .lang-trigger { padding: 7px 8px !important; }
  .lang-trigger svg:first-of-type { display: none; }
}

/* Note: .lang-option-link y .footer-grid se movieron a style.css
   para que estén disponibles en todas las páginas (no solo donde
   se carga interactions.css). */

/* ─── Global reduced-motion guard ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
