/* ==========================================================================
   FinancIA Partners — sistema de diseno compartido
   --------------------------------------------------------------------------
   Tokens + primitivas que usan las dos superficies del sitio:
     - index.html       la landing publica (clon de /repos)
     - biblioteca.html  la app privada, solo para quien se registro

   Todo el color, el ritmo y los componentes viven aqui. Si hay que cambiar
   la marca, se cambia en este archivo y en ninguno mas.
   ========================================================================== */

:root {
  /* --- Color ------------------------------------------------------------ */
  --fp-bg: #030a22;
  --fp-bg-deep: #02061a;
  --fp-line: rgba(91, 156, 225, 0.32);
  --fp-line-soft: rgba(91, 156, 225, 0.18);
  --fp-line-strong: rgba(91, 156, 225, 0.8);
  --fp-accent: #0070f8;
  --fp-accent-hi: #4da3ff;
  --fp-accent-ink: #1f86ff;
  --fp-glow: #8cc6ff;
  --fp-white: #ffffff;
  --fp-text: #dce7f7;
  --fp-muted: #a7b9d4;
  --fp-danger: #ff8f8f;
  --fp-ok: #5ce0a8;
  --fp-warn: #ffc46b;

  /* --- Tipografia ------------------------------------------------------- */
  --fp-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fp-serif: 'Playfair Display', 'Times New Roman', serif;
  --fp-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* --- Ritmo ------------------------------------------------------------ */
  --fp-gutter: clamp(16px, 4vw, 48px);
  --fp-sec-y: clamp(64px, 8vw, 124px);
  --fp-r-sm: 12px;
  --fp-r: 18px;
  --fp-r-lg: 26px;
  --fp-wrap: 1200px;

  /* --- Movimiento ------------------------------------------------------- */
  --fp-ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Superficies ------------------------------------------------------ */
  --fp-card: rgba(2, 14, 40, 0.66);
  --fp-card-hi: rgba(10, 40, 100, 0.42);
  --fp-solid: rgba(2, 8, 30, 0.78);
  --fp-solid-hi: rgba(2, 8, 30, 0.94);

  /* --- Neón ------------------------------------------------------------- */
  --fp-neon: 0 0 0 1px rgba(0, 112, 248, 0.3), 0 0 24px rgba(0, 112, 248, 0.34), inset 0 0 26px rgba(0, 112, 248, 0.14);
  --fp-neon-hi: 0 0 0 1px rgba(91, 156, 225, 0.6), 0 0 34px rgba(91, 156, 225, 0.62), 0 0 110px rgba(0, 112, 248, 0.3), inset 0 0 30px rgba(0, 112, 248, 0.22);
  --fp-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);

  /* --- Capas ------------------------------------------------------------ */
  --fp-z-header: 50;
  --fp-z-modal: 2147482000;
  --fp-z-confetti: 2147483000;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; background: var(--fp-bg); }

body {
  color: var(--fp-text);
  font-family: var(--fp-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

:where(h1, h2, h3, h4, p, ul, ol, figure, figcaption, blockquote) { margin: 0; padding: 0; }
:where(ul, ol) { list-style: none; }
:where(img, svg, video, canvas) { display: block; max-width: 100%; }
img { height: auto; }
:where(button) { font: inherit; cursor: pointer; }
:where(a) { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--fp-glow); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.fp-wrap { width: 100%; max-width: var(--fp-wrap); margin-inline: auto; padding-inline: var(--fp-gutter); }
.fp-nowrap { white-space: nowrap; }
.fp-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Iconos: una sola regla para todo el sitio. */
.ic {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ==========================================================================
   Tipografia
   ========================================================================== */
.fp-h1 {
  color: var(--fp-white);
  font-size: min(clamp(2.1rem, 0.9rem + 4.4vw, 4.1rem), calc((100vw - 2 * var(--fp-gutter)) / 10.6));
  font-weight: 900; line-height: 1.03; letter-spacing: -0.04em;
  text-shadow: 0 2px 22px rgba(2, 6, 26, 0.85), 0 0 46px rgba(0, 112, 248, 0.34);
}
.fp-h2 {
  color: var(--fp-white); text-wrap: balance;
  font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.5rem);
  font-weight: 900; line-height: 1.02; letter-spacing: -0.035em;
  text-shadow: 0 2px 20px rgba(2, 6, 26, 0.8);
}
.fp-h3 {
  color: var(--fp-white); font-size: clamp(1.12rem, 1rem + 0.5vw, 1.34rem);
  font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance;
}
.fp-lead { font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.22rem); color: var(--fp-text); max-width: 62ch; }
.fp-lead strong { color: var(--fp-white); font-weight: 700; }
.fp-sub { font: 600 0.7rem/1 var(--fp-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fp-muted); }
.fp-muted { color: var(--fp-muted); }

.fp-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font: 600 0.72rem/1 var(--fp-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fp-glow);
}
.fp-eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }

/* Azul de marca: dos intensidades, una para titular y otra para texto corrido. */
.fp-blue { color: var(--fp-accent-ink); text-shadow: 0 0 22px rgba(0, 112, 248, 0.75); }
.fp-h1 .fp-blue { color: #3d97ff; text-shadow: 0 2px 14px rgba(2, 6, 26, 0.95), 0 0 30px rgba(0, 112, 248, 0.8); }
.fp-serif {
  font-family: var(--fp-serif); font-style: italic; font-weight: 700;
  letter-spacing: -0.03em; font-size: 1.04em; line-height: 0.9;
  margin-left: 0.14em; margin-right: 0.02em;
}

/* ==========================================================================
   Cabecera de seccion
   ========================================================================== */
.fp-head { display: grid; gap: 18px; margin-bottom: clamp(34px, 4vw, 58px); }
.fp-head--center { justify-items: center; text-align: center; }
.fp-head--center .fp-lead { margin-inline: auto; }

/* ==========================================================================
   Seccion con fondo procedural (sin imagenes: todo gradiente + rejilla)
   ========================================================================== */
.fp-sec { position: relative; padding-block: var(--fp-sec-y); isolation: isolate; overflow: clip; }
.fp-sec__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.fp-sec__bg::before {
  content: ''; position: absolute; inset: -20% -10%;
  background:
    radial-gradient(ellipse 46% 40% at 22% 18%, rgba(0, 112, 248, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 46% at 84% 76%, rgba(31, 134, 255, 0.18), transparent 72%);
}
.fp-sec__bg::after {
  content: ''; position: absolute; inset: 0; opacity: 0.34;
  background-image:
    linear-gradient(rgba(91, 156, 225, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 156, 225, 0.1) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 76% 70% at 50% 40%, #000, transparent 78%);
  mask-image: radial-gradient(ellipse 76% 70% at 50% 40%, #000, transparent 78%);
}
.fp-sec--flip .fp-sec__bg::before {
  background:
    radial-gradient(ellipse 46% 40% at 78% 22%, rgba(0, 112, 248, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 46% at 16% 74%, rgba(31, 134, 255, 0.18), transparent 72%);
}
.fp-sec::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, var(--fp-bg) 0, rgba(3, 10, 34, 0.5) 180px, rgba(3, 10, 34, 0.5) calc(100% - 180px), var(--fp-bg) 100%),
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(3, 10, 34, 0.45), rgba(3, 10, 34, 0));
}

/* ==========================================================================
   Tarjeta
   ========================================================================== */
.fp-card {
  position: relative; border: 1.5px solid var(--fp-line); border-radius: var(--fp-r);
  background: linear-gradient(160deg, var(--fp-card-hi) 0%, var(--fp-card) 46%, rgba(2, 8, 28, 0.82) 100%);
  box-shadow: var(--fp-neon), var(--fp-shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* ==========================================================================
   Boton
   ========================================================================== */
.fp-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.7em;
  min-height: 64px; padding: 0.95em 2.2em; border: 0; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #0a6ee0 0%, #0063d6 55%, #0048ab 100%);
  color: #fff; font: 900 1rem/1.1 var(--fp-sans); letter-spacing: 0.04em;
  text-transform: uppercase; text-align: center;
  box-shadow: 0 10px 34px rgba(0, 99, 214, 0.62), inset 0 -3px 0 rgba(0, 32, 90, 0.5);
  transition: transform 0.2s var(--fp-ease);
  animation: fp-breathe 3.2s ease-in-out infinite;
}
.fp-btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg); animation: fp-shine 4.5s ease-in-out infinite;
}
.fp-btn:hover { transform: translateY(-2px); }
.fp-btn:active { transform: scale(0.97); }
.fp-btn .ic { font-size: 1.35em; stroke-width: 2.2; transition: transform 0.25s var(--fp-ease); }
.fp-btn:hover .ic { transform: translateX(4px); }
.fp-btn > * { position: relative; z-index: 1; }
.fp-btn--sm { min-height: 44px; padding: 0.6em 1.3em; font-size: 0.8rem; border-radius: 12px; animation: none; }
.fp-btn--sm::after { display: none; }
.fp-btn--block { width: 100%; }
.fp-btn:disabled, .fp-btn[aria-disabled='true'] { opacity: 0.65; cursor: progress; animation: none; }

/* Boton secundario: misma jerarquia visual, sin el grito del primario. */
.fp-btn--ghost {
  background: var(--fp-solid); color: var(--fp-white);
  border: 1.5px solid var(--fp-line-strong); box-shadow: none; animation: none;
}
.fp-btn--ghost::after { display: none; }
.fp-btn--ghost:hover { background: rgba(0, 112, 248, 0.2); box-shadow: 0 0 20px rgba(0, 112, 248, 0.45); }

.fp-round {
  display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--fp-line-strong); background: rgba(2, 8, 30, 0.7); color: var(--fp-white);
  font-size: 18px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--fp-ease);
}
.fp-round:hover { background: rgba(0, 112, 248, 0.3); box-shadow: 0 0 20px rgba(0, 112, 248, 0.6); }
.fp-round:active { transform: scale(0.94); }

.fp-cta-row { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: clamp(36px, 4vw, 56px); }
@media (min-width: 920px) { .fp-cta-row--start { align-items: flex-start; } }

/* ==========================================================================
   Pastilla / chip / ficha
   ========================================================================== */
.fp-pill {
  display: inline-flex; align-items: center; gap: 0.6em; padding: 0.62em 1.1em;
  border: 1.5px solid var(--fp-line-strong); border-radius: 999px;
  background: rgba(2, 8, 30, 0.62); color: var(--fp-white);
  font: 600 0.7rem/1 var(--fp-sans); letter-spacing: 0.12em; text-transform: uppercase;
  box-shadow: 0 0 16px rgba(0, 112, 248, 0.3), inset 0 0 12px rgba(0, 112, 248, 0.16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.fp-pill .ic { font-size: 1.25em; color: var(--fp-accent-hi); }

.fp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.fp-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--fp-line); background: rgba(2, 8, 30, 0.6);
  font-size: 0.84rem; color: var(--fp-text); white-space: nowrap;
}
.fp-chip .ic { color: var(--fp-accent-hi); font-size: 1.05em; }

.fp-tile {
  display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px;
  border: 1.5px solid var(--fp-line-strong);
  background: linear-gradient(160deg, rgba(0, 112, 248, 0.34), rgba(2, 10, 34, 0.9));
  color: var(--fp-white); font-size: 24px;
  box-shadow: 0 0 18px rgba(0, 112, 248, 0.4), inset 0 0 12px rgba(0, 112, 248, 0.3);
}
.fp-tile--emoji { font-size: 26px; line-height: 1; filter: drop-shadow(0 0 14px rgba(77, 163, 255, 0.6)); }
.fp-tile--solid { background: linear-gradient(160deg, #2e9bff, #0070f8); border-color: #8cc6ff; }
.fp-tile--sm { width: 40px; height: 40px; border-radius: 11px; font-size: 18px; }

/* ==========================================================================
   Cinta de cifras
   ========================================================================== */
.fp-marquee {
  overflow: hidden; border-block: 1px solid var(--fp-line);
  background: linear-gradient(180deg, rgba(2, 8, 30, 0.96), rgba(3, 12, 44, 0.96));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.fp-marquee__track { display: flex; width: max-content; gap: 56px; padding-block: 16px; animation: fp-marquee 38s linear infinite; }
.fp-marquee:hover .fp-marquee__track { animation-play-state: paused; }
.fp-marquee__i { white-space: nowrap; font-size: 0.95rem; color: var(--fp-muted); }
.fp-marquee__i b { color: var(--fp-accent-hi); font-weight: 800; margin-right: 0.35em; }

/* ==========================================================================
   Formularios
   ========================================================================== */
.fp-field { display: grid; gap: 8px; }
.fp-field label { font-size: 0.84rem; font-weight: 600; color: var(--fp-text); }
.fp-input, .fp-select {
  width: 100%; min-height: 58px; padding: 14px 16px;
  border: 1.5px solid var(--fp-line); border-radius: 14px;
  background: var(--fp-solid); color: var(--fp-white);
  font: 500 16px/1.2 var(--fp-sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.fp-input::placeholder { color: #6f84a8; }
.fp-input:focus, .fp-select:focus {
  outline: none; border-color: var(--fp-glow);
  box-shadow: 0 0 0 4px rgba(0, 112, 248, 0.28), 0 0 22px rgba(0, 112, 248, 0.4);
}
.fp-input.is-bad { border-color: #ff6b6b; box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.18); }
.fp-select { width: auto; flex: none; padding-right: 12px; -webkit-appearance: none; appearance: none; }
.fp-phone { display: flex; gap: 8px; }
.fp-phone .fp-input { flex: 1; min-width: 0; }
.fp-err { font-size: 0.8rem; color: var(--fp-danger); }
.fp-err:empty { display: none; }
.fp-help { font-size: 0.8rem; color: var(--fp-muted); }
.fp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; color: transparent; }
.fp-consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.84rem; color: var(--fp-muted); line-height: 1.5; cursor: pointer; }
.fp-consent input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--fp-accent); cursor: pointer; }
.fp-consent a { color: var(--fp-accent-hi); text-decoration: underline; }
.fp-hp input, .fp-hp label, .fp-consent input { color: transparent; }
.fp-note { font-size: 0.8rem; color: var(--fp-muted); }

/* ==========================================================================
   Modal
   ========================================================================== */
html.fp-locked, html.fp-locked body { overflow: hidden !important; }

.fp-pop {
  position: fixed; inset: 0; z-index: var(--fp-z-modal);
  display: grid; justify-items: center; align-items: start;
  padding: 14px; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(2, 5, 18, 0.8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: fp-fade 0.3s ease;
}
.fp-pop__card {
  position: relative; width: min(100%, 540px); margin-block: auto;
  padding: clamp(26px, 5vw, 44px) clamp(20px, 5vw, 44px) clamp(24px, 4vw, 36px);
  border: 1.5px solid var(--fp-line); border-radius: 24px;
  background: linear-gradient(170deg, #07163f 0%, #040c28 46%, #030a22 100%);
  box-shadow: 0 0 0 1px rgba(0, 112, 248, 0.22), 0 0 60px rgba(0, 112, 248, 0.3), 0 40px 100px rgba(0, 0, 0, 0.7);
  animation: fp-step 0.45s var(--fp-ease);
}
.fp-pop__close {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--fp-line);
  background: rgba(2, 8, 30, 0.7); color: var(--fp-muted); font-size: 18px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.fp-pop__close:hover { color: var(--fp-white); border-color: var(--fp-line-strong); }
.fp-pop__close .ic { width: 18px; height: 18px; }
.fp-pop__title {
  padding-inline: 34px; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); font-weight: 900;
  letter-spacing: -0.035em; line-height: 1.08; color: var(--fp-white); text-align: center; text-wrap: balance;
}
.fp-pop__title:focus { outline: none; }
.fp-pop__sub { margin-top: 10px; color: var(--fp-muted); text-align: center; font-size: 1rem; line-height: 1.5; text-wrap: balance; }
.fp-pop__form { display: grid; gap: 14px; margin-top: 24px; }
.fp-pop__form .fp-btn { width: 100%; margin-top: 4px; }

/* ==========================================================================
   Cuestionario
   ========================================================================== */
.fp-quiz { display: grid; gap: clamp(18px, 3vw, 26px); padding-top: clamp(18px, 3vw, 24px); }
.fp-quiz__top { display: flex; align-items: center; gap: 4px; }
.fp-quiz__segs { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-right: 10px; }
.fp-seg { height: 5px; border-radius: 5px; background: rgba(91, 156, 225, 0.22); overflow: hidden; }
.fp-seg i {
  display: block; height: 100%; width: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #0070f8, #4da3ff);
  box-shadow: 0 0 12px rgba(0, 136, 248, 0.9);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--fp-ease);
}
.fp-icon-btn {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0;
  border-radius: 50%; background: none; color: var(--fp-muted); font-size: 19px;
  transition: color 0.2s ease, background 0.2s ease;
}
.fp-icon-btn:hover { color: var(--fp-white); background: rgba(0, 112, 248, 0.2); }
.fp-icon-btn .ic { width: 20px; height: 20px; }
.fp-quiz__body { min-height: 320px; }
.fp-quiz__body:focus { outline: none; }
.fp-q { display: grid; gap: 18px; animation: fp-step 0.45s var(--fp-ease); }
.fp-q__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.82rem; color: var(--fp-muted); }
.fp-q__meta b { color: var(--fp-text); font-weight: 600; }
.fp-q__count { font-variant-numeric: tabular-nums; }
.fp-q__title {
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.7rem); font-weight: 900;
  letter-spacing: -0.03em; line-height: 1.15; color: var(--fp-white); text-wrap: balance;
}
.fp-q__title:focus { outline: none; }
.fp-q__text { color: var(--fp-muted); font-size: 0.98rem; }

.fp-opts { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fp-opts--emoji .fp-opt { grid-template-columns: auto 1fr auto; align-items: center; }
.fp-opt {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--fp-line); background: rgba(2, 8, 30, 0.6);
  color: var(--fp-text); font: 600 0.95rem/1.3 var(--fp-sans); text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s var(--fp-ease);
}
.fp-opt:hover { border-color: var(--fp-line-strong); background: rgba(0, 112, 248, 0.14); }
.fp-opt:active { transform: scale(0.98); }
.fp-opt.is-picked {
  border-color: var(--fp-glow); background: rgba(0, 112, 248, 0.22); color: var(--fp-white);
  box-shadow: 0 0 0 3px rgba(0, 112, 248, 0.22), 0 0 22px rgba(0, 112, 248, 0.4);
}
.fp-opt__e { font-size: 1.25em; line-height: 1; }
.fp-opt__k { margin-left: auto; flex: none; color: var(--fp-muted); font: 700 0.72rem/1 var(--fp-mono); }

.fp-wait { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 30px 0; animation: fp-step 0.45s var(--fp-ease); }
.fp-wait__spin {
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid rgba(91, 156, 225, 0.22); border-top-color: var(--fp-accent-hi);
  animation: fp-spin 0.9s linear infinite;
}
.fp-wait__icon { font-size: 3rem; line-height: 1; filter: drop-shadow(0 0 18px rgba(77, 163, 255, 0.6)); }
.fp-wait__eyebrow { font: 600 0.72rem/1 var(--fp-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fp-glow); }
.fp-wait__bar { display: block; width: 100%; max-width: 280px; height: 4px; border-radius: 4px; background: rgba(91, 156, 225, 0.22); overflow: hidden; }
.fp-wait__bar i {
  display: block; height: 100%; width: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #0070f8, #4da3ff);
  transform-origin: left; animation: fp-fill linear forwards;
}

.fp-result { display: grid; justify-items: center; gap: 16px; text-align: center; animation: fp-step 0.45s var(--fp-ease); }
.fp-result__ok {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid var(--fp-glow); background: rgba(0, 112, 248, 0.22); color: #fff;
  animation: fp-pop 0.5s var(--fp-ease) both;
}
.fp-result__ok .ic { width: 34px; height: 34px; stroke-width: 3; }
.fp-result .fp-btn { margin-top: 6px; }
.fp-result .fp-lead { text-align: center; }

.fp-toast {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--fp-line-strong);
  background: var(--fp-solid-hi); color: var(--fp-white);
  font-size: 0.8rem; font-weight: 700; white-space: nowrap; z-index: 5;
  box-shadow: 0 0 20px rgba(0, 112, 248, 0.5);
  animation: fp-toast 2.4s ease forwards;
}

.fp-confetti {
  position: fixed; top: -12px; z-index: var(--fp-z-confetti); pointer-events: none;
  animation-name: fp-confetti; animation-timing-function: ease-in; animation-fill-mode: forwards;
}

/* ==========================================================================
   Entrada del hero
   --------------------------------------------------------------------------
   Solo CSS, con el retardo en --i. No depende del JS ni de las fuentes
   externas, asi que el hero nunca parpadea: aparece una vez y ya.
   ========================================================================== */
.fp-in { animation: fp-up 0.8s var(--fp-ease) both; animation-delay: calc(var(--i, 0) * 90ms); }

/* ==========================================================================
   Aparicion al entrar en pantalla
   --------------------------------------------------------------------------
   El estado oculto solo se aplica bajo html.fp-anim, que anade el JS despues
   de armar el observador. Si el script no llega a correr, o falla antes de
   armarse, el contenido se ve igual: nunca hay una pagina en blanco.
   ========================================================================== */
html.fp-anim .fp-reveal { opacity: 0; transform: translateY(18px); }
html.fp-anim .fp-reveal.is-in { animation: fp-up 0.8s var(--fp-ease) both; }

/* ==========================================================================
   Animaciones
   ========================================================================== */
@keyframes fp-breathe {
  0%, 100% { box-shadow: 0 10px 34px rgba(0, 112, 248, 0.55), inset 0 -3px 0 rgba(0, 40, 110, 0.5); }
  50% { box-shadow: 0 12px 46px rgba(0, 112, 248, 0.85), inset 0 -3px 0 rgba(0, 40, 110, 0.5); }
}
@keyframes fp-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@keyframes fp-marquee { to { transform: translateX(-50%); } }
@keyframes fp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fp-step { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fp-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fp-spin { to { transform: rotate(360deg); } }
@keyframes fp-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fp-pop { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes fp-toast {
  0% { opacity: 0; transform: translate(-50%, 14px) scale(0.94); }
  12%, 82% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -6px) scale(0.98); }
}
@keyframes fp-confetti { from { transform: translateY(-12px) rotate(0deg); opacity: 1; } to { transform: translateY(108vh) rotate(720deg); opacity: 0; } }

/* ==========================================================================
   Movil
   ========================================================================== */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .fp-opts { grid-template-columns: minmax(0, 1fr); }
  .fp-btn { min-height: 58px; font-size: 0.92rem; padding-inline: 1.2em; }
  .fp-btn--sm { min-height: 40px; padding-inline: 0.9em; font-size: 0.75rem; }
  .fp-chip { font-size: 0.78rem; padding: 7px 12px; }
  .fp-cta-row .fp-btn, .fp-hero__cta .fp-btn { width: 100%; }
}

/* ==========================================================================
   Accesibilidad: menos movimiento
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.fp-anim .fp-reveal { opacity: 1; transform: none; }
  .fp-marquee__track { animation: none !important; }
}
