/* Wealtfy 3D — capa HTML sobre el canvas WebGL. Paleta de marca de la landing wealtfy. */
:root {
  --w-purple: #5B2DAA;
  --w-violet: #7C4DFF;
  --w-blue: #185FA5;
  --w-cyan: #4DC9FF;
  --w-whatsapp: #25D366;
  --w-gold: #F5C76B;

  --bg: #070b1a;
  --bg-2: #0B1124;
  --surface: rgba(17, 24, 58, 0.55);
  --surface-strong: rgba(17, 24, 58, 0.82);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --fg-1: #F8F8FB;
  --fg-2: rgba(248, 248, 251, 0.74);
  --fg-3: rgba(248, 248, 251, 0.52);
  --focus: rgba(77, 201, 255, 0.55);

  --grad: linear-gradient(100deg, #9B6BFF 0%, #4DC9FF 100%);
  --font: "Poppins", "Helvetica Neue", Arial, system-ui, sans-serif;
  --radius: 16px;
  --radius-lg: 22px;
  --header-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-1);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--w-cyan); outline-offset: 3px; border-radius: 6px; }

.wf-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--fg-1); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.wf-skip:focus { left: 16px; }

.wf-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wf-ic { width: 18px; height: 18px; flex: none; }
.wf-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Escena ---------- */
.wf-scene, .wf-scene-fallback { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.wf-scene { display: block; opacity: 0; transition: opacity 1.2s ease; }
.is-scene-ready .wf-scene { opacity: 1; }
.wf-scene-fallback {
  z-index: -1;
  background:
    radial-gradient(60% 50% at 75% 35%, rgba(91, 45, 170, 0.45), transparent 70%),
    radial-gradient(40% 40% at 20% 80%, rgba(24, 95, 165, 0.35), transparent 70%),
    var(--bg);
}

/* ---------- Header ---------- */
.wf-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.wf-header.is-scrolled { background: rgba(7, 11, 26, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--border); }
.wf-header__inner { display: flex; align-items: center; gap: 24px; }
.wf-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.wf-brand__mark { width: 38px; height: 34px; overflow: hidden; flex: none; }
.wf-brand__mark img { width: 104px; height: 34px; max-width: none; }
.wf-brand__name { font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.wf-nav { margin-left: auto; }
.wf-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.wf-nav a { display: block; padding: 8px 14px; font-size: 14px; color: var(--fg-2); text-decoration: none; border-radius: 999px; transition: color .2s, background .2s; }
.wf-nav a:hover, .wf-nav a.is-active,
.wf-nav .current-menu-item > a, .wf-nav .current-menu-parent > a, .wf-nav .current_page_parent > a { color: var(--fg-1); background: rgba(255, 255, 255, 0.06); }
.wf-header__cta { display: flex; gap: 10px; align-items: center; }
.wf-burger { display: none; width: 40px; height: 40px; border: 1px solid var(--border-strong); background: transparent; border-radius: 10px; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.wf-burger span { width: 18px; height: 2px; background: var(--fg-1); border-radius: 2px; transition: transform .25s; }
.wf-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.wf-burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Botones ---------- */
.wf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  font: 500 14px/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.wf-btn:hover { transform: translateY(-1px); }
.wf-btn--lg { height: 52px; padding: 0 26px; font-size: 15px; }
.wf-btn--primary { background: linear-gradient(100deg, var(--w-purple), var(--w-blue)); color: #fff; box-shadow: 0 8px 30px -8px rgba(124, 77, 255, 0.65), inset 0 1px 0 rgba(255,255,255,.18); }
.wf-btn--primary:hover { box-shadow: 0 12px 40px -8px rgba(77, 201, 255, 0.6), inset 0 1px 0 rgba(255,255,255,.2); }
.wf-btn--light { background: #f8f8ff; color: #100925; box-shadow: 0 14px 34px -12px rgba(16, 9, 37, 0.6); }
.wf-btn--light:hover { box-shadow: 0 18px 40px -12px rgba(127, 220, 255, 0.55); }
.wf-btn--ghost { background: rgba(255, 255, 255, 0.04); color: var(--fg-1); border-color: var(--border-strong); backdrop-filter: blur(8px); }
.wf-btn--ghost:hover { border-color: rgba(77, 201, 255, 0.6); background: rgba(77, 201, 255, 0.08); }

/* ---------- Escenarios ---------- */
.wf-main { position: relative; z-index: 1; }
.wf-stage { position: relative; min-height: 120vh; display: flex; align-items: center; padding: calc(var(--header-h) + 48px) 0 64px; }
.wf-stage--hero { min-height: 100vh; }
.wf-stage[data-side="right"] .wf-panel { margin-left: auto; }
.wf-panel {
  max-width: 520px; padding: 36px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.wf-panel--bare { max-width: 600px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.is-inview .wf-panel, .is-inview .wf-plans__head, .is-inview .wf-plan, .is-inview .wf-cta { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .wf-panel, .wf-plan, .wf-plans__head, .wf-cta { opacity: 1 !important; transform: none !important; transition: none !important; } }

.wf-eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--w-cyan); }
.wf-title { margin: 0 0 18px; font-weight: 600; font-size: clamp(30px, 4vw, 46px); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
h1.wf-title { font-size: clamp(40px, 6.2vw, 72px); line-height: 1.04; letter-spacing: -0.03em; }
.wf-lead { margin: 0 0 26px; font-size: 17px; color: var(--fg-2); text-wrap: pretty; }
.wf-stage--hero .wf-lead { font-size: 18px; max-width: 540px; }

.wf-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.wf-actions--center { justify-content: center; }
.wf-stats { display: flex; gap: 36px; margin: 44px 0 0; padding-top: 26px; border-top: 1px solid var(--border); }
.wf-stats div { margin: 0; }
.wf-stats dt { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.wf-stats dd { margin: 0; font-size: 13px; color: var(--fg-3); }

.wf-scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-3); text-decoration: none; animation: wf-bob 2.4s ease-in-out infinite; }
.wf-scroll-hint .wf-ic { width: 24px; height: 24px; }
@keyframes wf-bob { 50% { transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .wf-scroll-hint { animation: none; } }

.wf-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wf-features li { display: flex; gap: 14px; padding: 12px 14px; border-radius: 12px; transition: background .2s; }
.wf-features li:hover { background: rgba(255, 255, 255, 0.04); }
.wf-features__dot { width: 10px; height: 10px; margin-top: 7px; flex: none; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px rgba(77, 201, 255, 0.8); }
.wf-features strong { display: block; font-weight: 500; font-size: 15px; }
.wf-features span { display: block; font-size: 14px; color: var(--fg-3); line-height: 1.5; }

/* ---------- Planes ---------- */
.wf-stage--plans { display: block; min-height: auto; padding-bottom: 120px; background: linear-gradient(to bottom, transparent, rgba(7, 11, 26, 0.55) 18%, rgba(7, 11, 26, 0.55)); }
.wf-plans__head { max-width: 720px; margin: 0 auto 48px; text-align: center; opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.wf-billing { display: flex; width: fit-content; gap: 4px; padding: 5px; margin: -16px auto 40px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 255, 255, 0.04); }
.wf-billing button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font: 500 14px/1 var(--font); color: var(--fg-3); cursor: pointer; transition: background .2s, color .2s; }
.wf-billing button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); color: var(--fg-1); }
.wf-billing span { padding: 2px 7px; border-radius: 6px; background: var(--grad); font-size: 11px; font-weight: 600; color: #100925; }
.wf-plans { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); max-width: calc(var(--cols, 4) * 320px); margin: 0 auto; gap: 18px; align-items: stretch; }
.wf-plan {
  position: relative; display: flex; flex-direction: column; padding: 28px 24px;
  background: var(--surface-strong); border: 1px solid var(--border); border-radius: var(--radius-lg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1), border-color .25s;
}
.wf-plan:nth-child(2) { transition-delay: .08s; } .wf-plan:nth-child(3) { transition-delay: .16s; } .wf-plan:nth-child(4) { transition-delay: .24s; }
.wf-plan:hover { border-color: var(--border-strong); }
.wf-plan.is-popular { border-color: rgba(124, 77, 255, 0.7); box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.4), 0 30px 80px -30px rgba(124, 77, 255, 0.6); }
.wf-plan__badge { position: absolute; top: -12px; left: 24px; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--grad); color: #0B1124; }
.wf-plan h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.wf-plan__desc { margin: 0 0 20px; font-size: 13px; color: var(--fg-3); min-height: 40px; }
.wf-plan__price { display: flex; align-items: baseline; gap: 6px; margin: 0 0 20px; color: var(--fg-3); font-size: 13px; }
.wf-plan__price strong { font-size: 40px; font-weight: 600; color: var(--fg-1); letter-spacing: -0.03em; line-height: 1; }
.wf-plan__price .wf-plan__custom { font-size: 26px; }
.wf-plan ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; flex: 1; align-content: start; }
.wf-plan li { display: flex; gap: 10px; font-size: 14px; color: var(--fg-2); }
.wf-plan li .wf-ic { width: 16px; height: 16px; margin-top: 3px; color: var(--w-cyan); }
.wf-plan .wf-btn { width: 100%; }

.wf-plan__price strong[data-plan-price] { font-variant-numeric: tabular-nums; }
.wf-odo { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; }
.wf-odo__reel { display: flex; flex-direction: column; }
.wf-odo__reel.is-rolling { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.wf-odo__reel span { height: 1em; line-height: 1; }
.wf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wf-plan__trial { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 2px 0 14px; padding: 5px 11px; border: 1px solid rgba(77, 201, 255, 0.45); border-radius: 999px; background: rgba(77, 201, 255, 0.10); font-size: 12px; font-weight: 600; color: var(--fg-1); }
.wf-plan__trial .wf-ic { width: 14px; height: 14px; color: var(--w-cyan); }
.wf-plan__trial[hidden], .wf-plan__bonus[hidden] { display: none; }
.wf-plan__bonus { display: flex; flex-direction: column; gap: 2px; margin: -4px 0 16px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(100deg, rgba(61, 220, 151, 0.16), rgba(61, 220, 151, 0.04)); border: 1px solid rgba(61, 220, 151, 0.4); }
.wf-plan__bonus strong { font-size: 15px; font-weight: 700; color: #6ff0b6; }
.wf-plan__bonus span { font-size: 12px; color: var(--fg-2); }
.wf-plan__bonus span:empty { display: none; }
.wf-billing .wf-billing__bonus { background: #3ddc97; color: #062a1b; }
.wf-plan__billed { min-height: 20px; margin: -12px 0 14px; font-size: 12px; color: var(--w-cyan); }
.wf-plan__limits { margin: 0 0 18px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; color: var(--fg-2); }
.wf-plan__tag { margin-left: auto; padding: 2px 8px; border-radius: 6px; background: var(--grad); font: 600 11px/1.4 var(--font); color: #100925; }
.wf-plan__inherits strong { font-weight: 600; color: var(--fg-1); }
.wf-plan__more { margin: -12px 0 22px; font-size: 13px; color: var(--fg-3); }
.wf-plan__more summary { cursor: pointer; padding: 4px 0; color: var(--w-cyan); }
.wf-plan__more ul { margin: 10px 0 0; }
/* Inclinación al pasar el cursor: ui.js da --rx/--ry (giro) y --mx/--my (posición del brillo).
   Mientras se mueve, la transición es corta y sin el retraso escalonado de la entrada. */
.is-inview .wf-plan { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.wf-plan.is-tilting { transition: opacity .8s ease, transform .12s ease-out, border-color .25s; transition-delay: 0s; }
.wf-plan.is-popular::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 77, 255, 0.2), transparent 60%); opacity: 0; transition: opacity .3s; }
.wf-plan.is-popular.is-tilting::after { opacity: 1; }
.wf-plan.is-unavailable .wf-plan__price strong { opacity: .55; }
.wf-plan.is-unavailable [data-plan-billed] { color: var(--fg-3); }
.wf-cta { max-width: 760px; margin: 120px auto 0; text-align: center; opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }

/* ---------- Footer ---------- */
.wf-footer { position: relative; z-index: 1; padding: 64px 0 28px; border-top: 1px solid var(--border); background: rgba(7, 11, 26, 0.85); backdrop-filter: blur(10px); }
.wf-footer__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px 48px; }
.wf-footer__brand p { max-width: 340px; margin: 16px 0 0; font-size: 14px; line-height: 1.6; color: var(--fg-3); }
.wf-footer__col h2 { margin: 0 0 16px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-3); }
.wf-footer__col ul:not(.wf-social) { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wf-footer__col a { font-size: 14px; color: var(--fg-2); text-decoration: none; transition: color .2s; }
.wf-footer__col a:hover { color: var(--fg-1); }
.wf-footer__bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--border); }
.wf-footer__legal { margin: 0; font-size: 12px; color: var(--fg-3); text-align: center; }
.wf-social { flex-wrap: wrap; display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wf-social a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; color: var(--fg-2); transition: color .2s, border-color .2s, background .2s; }
.wf-social a:hover { color: var(--fg-1); border-color: var(--border-strong); background: rgba(255, 255, 255, .06); }
.wf-social .wf-ic { width: 17px; height: 17px; }

/* ---------- Páginas internas (legales) ---------- */
.wf-page { padding: calc(var(--header-h) + 60px) 0 96px; background: var(--bg-2); min-height: 70vh; }
.wf-page__inner { max-width: 820px; }
.wf-page__updated { margin: -6px 0 36px; font-size: 13px; color: var(--fg-3); }
.wf-prose { font-size: 15px; line-height: 1.7; color: var(--fg-2); }
.wf-prose .wf-title { font-size: clamp(30px, 4.4vw, 44px); color: var(--fg-1); }
.wf-prose h2, .wf-prose h3 { margin: 32px 0 10px; font-size: 17px; font-weight: 600; color: var(--fg-1); }
.wf-prose p { margin: 0 0 14px; }
.wf-prose ul, .wf-prose ol { margin: 0 0 14px; padding-left: 22px; }
.wf-prose li { margin-bottom: 6px; }
.wf-prose b, .wf-prose strong { color: var(--fg-1); font-weight: 600; }
.wf-prose a { color: var(--w-cyan); text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .wf-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wf-footer__brand { grid-column: 1 / -1; }
  .wf-footer .wf-social { gap: 6px; }
  .wf-footer .wf-social a { width: 34px; height: 34px; }
  .wf-plans { grid-template-columns: repeat(min(2, var(--cols, 4)), minmax(0, 1fr)); row-gap: 28px; }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .wf-burger { display: inline-flex; }
  .wf-hide-sm { display: none; }
  .wf-nav {
    position: fixed; inset: var(--header-h) 0 auto; margin: 0; padding: 12px 16px 20px;
    background: rgba(7, 11, 26, 0.96); border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .wf-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .wf-nav ul { flex-direction: column; }
  .wf-nav a { padding: 12px 14px; font-size: 16px; }
  .wf-header__cta { margin-left: auto; }
  /* Móvil: la escena ocupa la parte superior y el panel entra por debajo. */
  /* Escena libre arriba; el texto entra por debajo (parada móvil: narrowTopAnchor en stage-kit.js). */
  .wf-stage { min-height: auto; align-items: flex-end; padding-top: 72svh; padding-bottom: 24vh; }
  .wf-stage--hero { min-height: 100svh; padding-top: 40vh; padding-bottom: 48px; }
  .wf-stage--hero .wf-panel--bare { text-shadow: 0 2px 18px rgba(7, 11, 26, 0.9); }
  .wf-stage--plans { padding-top: calc(var(--header-h) + 48px); }
  .wf-scroll-hint { display: none; }
  .wf-panel { max-width: none; padding: 26px 22px; background: var(--surface-strong); }
  .wf-panel--bare { background: none; padding: 0; }
  .wf-stats { gap: 22px; }
}
@media (max-width: 560px) {
  .wf-container { padding: 0 16px; }
  .wf-footer { padding-top: 48px; }
  .wf-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .wf-footer__grid > .wf-footer__col:last-child { grid-column: 1 / -1; }
  /* Selector de ciclos: con 3+ opciones no cabe en una fila; pasa a cuadrícula de 2. */
  .wf-billing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 360px; border-radius: 16px; }
  .wf-billing button { flex-wrap: wrap; justify-content: center; gap: 4px 6px; height: auto; min-height: 36px; padding: 6px 8px; }
  .wf-billing span { white-space: nowrap; }
  .wf-plans { grid-template-columns: minmax(0, 1fr); }
  .wf-header__cta .wf-btn--primary { height: 36px; padding: 0 14px; font-size: 13px; }
  .wf-brand__name { font-size: 19px; }
  .wf-btn--lg { width: 100%; }
  .wf-stats { justify-content: space-between; }
  .wf-stats dt { font-size: 22px; }
}
