@font-face {
  font-family: 'Nunito';
  src: url('/fonts/Nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --surface-2: #ffffff;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.28);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --body: #424245;
  --accent-text: #6d28d9;
  --brand: #8a3ff2;
  --brand-blue: #2f7bff;
  --brand-soft: #c4a4ff;
  --brand-pink: #f048b0;
  --dot: rgba(255, 255, 255, 0.075);
  --bubble-in: #232c38;
  --bubble-out: linear-gradient(120deg, #4f5bf0, #8a3ff2);
  --button: linear-gradient(100deg, #2563eb, #7c3aed 55%, #c026a0);
  --gradient: linear-gradient(95deg, #6fa8ff 0%, #a77bff 40%, #d46bf5 70%, #ff6fc1 100%);
  --ease-enter: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-move: cubic-bezier(0.2, 0, 0, 1);
  --radius: 22px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.dark, .top {
  --bg: #0b0f15;
  --surface: #131922;
  --surface-2: #161d27;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #f5f5f7;
  --muted: #a9b0ba;
  --body: #cfd3d9;
  --accent-text: #c4a4ff;
  background-color: var(--bg);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; }
p { margin: 0; }
.wrap { width: min(100%, var(--wrap)); margin-inline: auto; padding-inline: var(--gutter); }

/* Encabezado */
.top { position: sticky; top: 0; z-index: 10; background-color: rgba(11, 15, 21, 0.82); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: -0.04em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; display: block; }
.brand img.brand-word { width: auto; height: 24px; border-radius: 0; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; transition: color 120ms var(--ease-move); }
.nav a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px;
  border: 1px solid var(--line-strong); border-radius: 980px; color: var(--text); font-size: 16px; font-weight: 500; text-decoration: none;
  transition: transform 140ms var(--ease-move), background-color 140ms var(--ease-move), border-color 140ms var(--ease-move);
}
.btn:hover { border-color: var(--text); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--button) border-box; border-color: transparent; color: #fff; font-weight: 600; }
.btn-primary:hover { border-color: transparent; filter: brightness(1.1); }
.btn-sm { min-height: 32px; padding: 0 15px; font-size: 13px; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero::after {
  content: ''; position: absolute; width: 620px; height: 620px; right: -120px; top: -160px; pointer-events: none;
  background: radial-gradient(circle, rgba(138, 63, 242, 0.17), transparent 66%);
  animation: glow 11s ease-in-out infinite alternate;
}
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 8vw, 104px); }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: 14px; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: pulse 2.6s ease-in-out infinite; }
.hero h1 { margin-top: 26px; font-size: clamp(44px, 6.4vw, 82px); font-weight: 500; line-height: 1.02; letter-spacing: -0.045em; }
.grad {
  background: var(--gradient); background-size: 180% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 12s ease-in-out infinite alternate;
}
.lede { margin-top: 26px; max-width: 34em; color: var(--body); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Mosaico de conversaciones */
.mosaic-wrap { min-width: 0; }
.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 480px; margin-inline: auto; }
.mosaic:not(.is-stream) .chat:nth-child(2n) { transform: translateY(34px); }
.mosaic:not(.is-stream) .chat:nth-child(n + 5) { display: none; }
.float { animation: float 8s ease-in-out infinite alternate; }
.mosaic .chat:nth-child(2) .float, .mosaic .chat:nth-child(3) .float { animation-delay: -3s; }
.mosaic .chat:nth-child(4) .float { animation-delay: -5s; }

/* Corriente de chats: las nuevas entran abajo, las viejas suben y se deshacen arriba */
@media (prefers-reduced-motion: no-preference) {
  .js .mosaic {
    position: relative; height: 600px; overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 34px, #000 calc(100% - 36px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 34px, #000 calc(100% - 36px), transparent 100%);
  }
  .js .mosaic-note { margin-top: 16px; }
  .js .mosaic:not(.is-stream) { opacity: 0; animation: show-late 300ms 2s forwards; }
  .js .mosaic.is-stream { animation: show-soon 700ms var(--ease-move) backwards; }
}
.mosaic.is-stream { align-items: start; }
.lane { display: flex; flex-direction: column; gap: 14px; min-width: 0; will-change: transform; }
.is-stream .chat { flex: none; }
.is-stream .float { animation: none; }
.is-stream .chat-card { height: auto; }
.chat.is-leaving .chat-card { animation: chat-out 900ms cubic-bezier(0.4, 0, 1, 1) forwards; }
.spark { position: absolute; z-index: 2; width: var(--size); height: var(--size); border-radius: 50%; background: var(--color); pointer-events: none; animation: spark 780ms var(--ease-enter) forwards; }
.chat-card {
  display: flex; flex-direction: column; height: 248px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3); transition: border-color 320ms var(--ease-move), box-shadow 320ms var(--ease-move);
}
.chat.is-live .chat-card { border-color: rgba(138, 63, 242, 0.6); box-shadow: 0 22px 54px rgba(138, 63, 242, 0.15); }
.chat-head { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.avatar { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(138, 63, 242, 0.17); color: var(--brand-soft); font-size: 12px; }
.chat-body { position: relative; display: flex; flex-direction: column; justify-content: flex-end; flex: 1; gap: 7px; min-height: 0; padding: 11px; }
.bubble { max-width: 90%; padding: 8px 11px; border-radius: 13px; font-size: 13.5px; line-height: 1.35; animation: bubble 320ms var(--ease-enter) backwards; }
.bubble-in { align-self: flex-start; background: var(--bubble-in); border-bottom-left-radius: 4px; }
.bubble-out { align-self: flex-end; background: var(--bubble-out); color: #fff; font-weight: 500; border-bottom-right-radius: 4px; }
.bubble.is-hidden { visibility: hidden; animation: none; }
.typing { position: absolute; right: 11px; display: inline-flex; gap: 4px; padding: 10px 12px; border-radius: 13px; background: rgba(138, 63, 242, 0.18); }
.typing.is-hidden { display: none; }
.bubble-card { display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 100%; }
.item { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 9px; background: rgba(255, 255, 255, 0.14); font-size: 12.5px; line-height: 1.2; }
.item > span { flex: 1; min-width: 0; }
.item b { flex: none; font-weight: 700; }
.thumb { flex: none; width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, #ffffff, #c4a4ff); }
.thumb-2 { background: linear-gradient(135deg, #ffb3df, #f048b0); }
.quick { display: flex; gap: 6px; }
.quick span { flex: 1; padding: 5px 0; border-radius: 8px; background: rgba(255, 255, 255, 0.92); color: #4c1d95; font-size: 12.5px; font-weight: 700; text-align: center; }
.quick-pay span { background: #ffffff; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-soft); animation: dot 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
.mosaic-note { margin-top: 50px; color: var(--muted); font-size: 13px; text-align: center; }

/* Franja de hechos */
.facts { background: var(--surface); }
.facts-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 28px clamp(14px, 2vw, 26px); border-left: 1px solid var(--line); color: var(--body); font-size: 15px; font-weight: 500; line-height: 1.35; text-align: center; }
.fact:first-child { border-left: 0; }

/* Secciones */
.section { padding-block: clamp(72px, 10vw, 128px); text-align: center; }
.section-alt { background: var(--surface); --surface-2: #ffffff; }
.section-alt .panel { background: #ffffff; }
.eyebrow { margin-bottom: 12px; color: var(--accent-text); font-size: 17px; font-weight: 600; }
.section h2 { max-width: 16em; margin-inline: auto; font-size: clamp(36px, 5.2vw, 60px); font-weight: 600; letter-spacing: -0.035em; }
.section-lede { margin: 20px auto 0; max-width: 36em; color: var(--muted); font-size: clamp(18px, 2vw, 21px); line-height: 1.4; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 56px; text-align: left; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; text-align: left; }
.panel { padding: clamp(26px, 3.4vw, 40px); border-radius: var(--radius); background: var(--surface); }
.panel h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.panel p { margin-top: 10px; color: var(--muted); }
.tag { display: inline-block; margin-bottom: 18px; padding: 3px 11px; border-radius: 999px; background: rgba(0, 0, 0, 0.06); color: var(--muted); font-size: 13px; font-weight: 600; }
.panel-now .tag { background: rgba(138, 63, 242, 0.14); color: var(--accent-text); }
.ticks { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 26px; color: var(--body); }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.panel-now .ticks li::before { background: var(--brand); }
.step-num { display: block; margin-bottom: 28px; font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -0.04em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.table-wrap { margin-top: 56px; border-radius: var(--radius); overflow: hidden; background: var(--surface); text-align: left; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; padding: 22px clamp(18px, 3vw, 30px); border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row b { font-weight: 600; }
.row span { color: var(--muted); }

/* Cierre */
.closing p { margin: 20px auto 0; max-width: 32em; color: var(--muted); font-size: clamp(18px, 2vw, 21px); line-height: 1.4; }
.closing .cta { justify-content: center; }

/* Pie */
.foot { padding-block: 36px; background: #f5f5f7; color: #6e6e73; font-size: 13px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px 40px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--text); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot small { display: block; width: 100%; font-size: 13px; line-height: 1.55; }

/* Páginas legales */
.legal { padding-block: clamp(48px, 7vw, 84px); }
.legal-in { max-width: 760px; margin-inline: auto; }
.legal h1 { font-size: clamp(38px, 5.4vw, 56px); font-weight: 600; letter-spacing: -0.035em; }
.legal .meta { margin-top: 14px; color: var(--muted); font-size: 15px; }
.legal .lang { margin-top: 18px; font-size: 15px; }
.legal .lang a { color: var(--accent-text); }
.legal h2 { margin-top: 44px; font-size: 25px; letter-spacing: -0.02em; line-height: 1.2; }
.legal h3 { margin-top: 24px; font-size: 18px; letter-spacing: -0.01em; }
.legal p, .legal ul, .legal ol { margin: 13px 0 0; color: var(--body); }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-top: 7px; }
.legal a { color: var(--accent-text); }
.legal hr { margin-block: 60px; border: 0; border-top: 1px solid var(--line); }

/* Entrada al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 420ms var(--ease-enter), transform 520ms var(--ease-enter); }
.js .reveal.is-in { opacity: 1; transform: none; }
.hero-copy > * { animation: rise 620ms var(--ease-enter) backwards; }
.hero-copy > :nth-child(2) { animation-delay: 70ms; }
.hero-copy > :nth-child(3) { animation-delay: 140ms; }
.hero-copy > :nth-child(4) { animation-delay: 210ms; }

@keyframes bubble { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes show-late { to { opacity: 1; } }
@keyframes show-soon { from { opacity: 0; } }
@keyframes chat-out { to { opacity: 0; transform: translateY(-26px) scale(0.8) rotate(-2.5deg); filter: blur(12px); } }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 55% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); } }
@keyframes rise { from { transform: translateY(16px); } }
@keyframes float { from { translate: 0 -5px; } to { translate: 0 5px; } }
@keyframes dot { 0%, 100% { opacity: 0.35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(138, 63, 242, 0.45); } 60% { box-shadow: 0 0 0 7px rgba(138, 63, 242, 0); } }
@keyframes glow { from { opacity: 0.65; transform: translate(0, 0); } to { opacity: 1; transform: translate(-46px, 30px); } }

@media (max-width: 920px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .facts-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(odd) { border-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .nav a:not(.btn) { display: none; }
  .nav a.lang-link { display: inline; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand { font-size: 20px; }
  .btn { flex: 1 1 100%; }
  .btn-sm { flex: none; }
  .chat-card { height: 262px; }
  .bubble { font-size: 13px; }
  .mosaic { gap: 10px; }
  .mosaic:not(.is-stream) .chat:nth-child(2n) { transform: translateY(22px); }
  .mosaic-note { margin-top: 38px; }
  .js .mosaic { height: 520px; }
  .lane { gap: 10px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .step-num { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
