/* ==========================================================================
   Contadores EC — "Oro vivo" (nov-2026)
   Movimiento suave sobre la misma paleta negro + oro: aparición al bajar,
   cifras que se cuentan, tarjeta flotante en la portada, brillo en el botón
   principal y fondo dorado que se mueve despacio. Solo CSS + un JS pequeño.
   Quien pide "reducir movimiento" ve todo quieto. Para volver atrás basta
   quitar este <link> y el <script> de movimiento.js.
   ========================================================================== */

:root { --verde-dinero: #0F7A3F; --verde-claro: #E9F7EE; }

/* ---------- Aparición al bajar (movimiento.js añade .mv y luego .mv-in) ---------- */
.mv { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--mv-d, 0s); }
.mv.mv-in { opacity: 1; transform: none; }

/* ---------- Botón principal: brillo dorado que lo recorre ---------- */
.btn-gold { position: relative; overflow: hidden; isolation: isolate; }
.btn-gold::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
  transform: skewX(-18deg); animation: oro-brillo 5.5s ease-in-out 1.5s infinite;
}
@keyframes oro-brillo { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.btn { transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ---------- Portada: fondo dorado que respira ---------- */
.hero { overflow: hidden; }
.hero::after {
  content: ""; position: absolute; width: 620px; height: 620px; right: -160px; top: -220px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,201,77,.30) 0%, rgba(242,169,0,.12) 40%, transparent 70%);
  animation: oro-deriva 14s ease-in-out infinite alternate;
}
@keyframes oro-deriva { from { transform: translate(0, 0) scale(1); } to { transform: translate(-140px, 90px) scale(1.15); } }

/* ---------- Portada: tarjeta flotante sobre la calculadora ---------- */
.hero-flota {
  position: absolute; top: -26px; right: 18px; z-index: 2; display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink, #171717); border-radius: 14px; padding: 9px 14px 9px 10px;
  box-shadow: 0 14px 34px rgba(0,0,0,.28), 0 0 0 1px rgba(15,122,63,.12);
  animation: flota 4.5s ease-in-out infinite; font-size: .82rem; line-height: 1.25;
}
.hero-flota .hf-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--verde-dinero); color: #fff; display: grid; place-items: center; }
.hero-flota .hf-ico svg { width: 17px; height: 17px; }
.hero-flota b { display: block; font-family: var(--font-head, Poppins, sans-serif); font-size: .84rem; }
.hero-flota span.hf-txt { color: #3d4a40; }
.hero-flota strong { color: var(--verde-dinero); }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.quick-calc { overflow: visible; }

/* ---------- Cifras que se cuentan solas ---------- */
.cifras { background: #fff; padding: 46px 0; border-bottom: 1px solid var(--line); }
.cifras .container { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.cifra { text-align: center; padding: 18px 10px; border-radius: 16px; background: linear-gradient(180deg, #fff 0%, var(--crema) 100%); border: 1px solid var(--crema-borde); transition: transform .2s, box-shadow .2s; }
.cifra:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.cifra-num { display: block; font-family: var(--font-head, Poppins, sans-serif); font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.1; background: var(--grad-oro); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.cifra-num small { font-size: .5em; font-weight: 700; }
.cifra.verde .cifra-num { background: none; color: var(--verde-dinero); }
.cifra-txt { display: block; margin-top: 6px; color: var(--ink-muted, #555); font-size: .9rem; line-height: 1.35; }
/* Total gestionado en la tarjeta verde (con detalle por año) */
.cifras .cifra.verde .cifra-num, .lp-cifras .cifra.verde .cifra-num { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--verde-dinero, #0F7A3F); }
.lp-cifras .cifra.verde .cifra-num { border-bottom-color: var(--verde-dinero, #0F7A3F); }
.cifra-suma { border-color: rgba(15,122,63,.35); background: linear-gradient(180deg, #fff 0%, #EEF8F1 100%); }
.cifra-suma .cifra-txt strong { color: var(--verde-dinero, #0F7A3F); }
.cifra-anios { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.cifra-anios > span { font-size: .78rem; color: var(--ink-muted, #555); background: #fff; border: 1px solid rgba(15,122,63,.25); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.cifra-anios b { color: var(--verde-dinero, #0F7A3F); font-weight: 700; }
@media (max-width: 760px) {
  .cifras .container > .cifra-suma, .cifras .container > .cifra-suma ~ .cifra:nth-of-type(4) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .cifras { padding: 30px 0; }
  .cifras .container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cifra { padding: 16px 8px; }
  .cifra-num { font-size: 1.45rem; white-space: nowrap; }
  .cifra-txt { font-size: .84rem; }
}

/* ---------- Firmas en portada: sección clara (menos negro seguido) ---------- */
.firmas.firmas--claro { background: radial-gradient(700px 300px at 90% 0%, rgba(255,201,77,.28), transparent 65%), linear-gradient(135deg, #FFF8EC 0%, #FFEFD2 100%); color: var(--ink, #171717); border-top: 1px solid var(--crema-borde); border-bottom: 1px solid var(--crema-borde); }
.firmas--claro h2 { color: var(--ink, #171717); }
.firmas--claro p { color: #4a3f2c; }
.firmas--claro .firmas-kicker { background: #fff; color: #8A5A00; border-color: var(--crema-borde); }
.firmas--claro .precios-mini span { box-shadow: 0 4px 12px rgba(120,80,10,.08); border: 1px solid var(--crema-borde); }
.firmas--claro .btn-outline { color: var(--ink, #171717); border-color: #171717; }
.firmas--claro .btn-outline:hover { color: #8A5A00; border-color: var(--oro); }
.firmas--claro h2 .accent { background: none; color: #A86A00; }

/* ---------- Micro-interacciones en tarjetas ---------- */
.trust-item .icon-badge, .svc .ico, .step .step-num { transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.trust-item:hover .icon-badge, .svc:hover .ico { transform: rotate(-6deg) scale(1.08); }
.card { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.accent-bar { transform-origin: left center; }
.section-head .accent-bar { transform-origin: center; }
.mv .accent-bar, .section-head.mv .accent-bar { transform: scaleX(.2); transition: transform .8s cubic-bezier(.2,.7,.2,1) .25s; }
.mv-in .accent-bar, .section-head.mv-in .accent-bar { transform: scaleX(1); }

/* ---------- Sin movimiento para quien lo pide ---------- */
@media (prefers-reduced-motion: reduce) {
  .mv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .mv .accent-bar { transform: none !important; }
  .btn-gold::after, .hero::after, .hero-flota { animation: none !important; }
  .btn-gold::after { display: none; }
  .btn:hover, .cifra:hover, .card:hover { transform: none; }
}
@media print { .hero-flota, .cifras { display: none !important; } .mv { opacity: 1 !important; transform: none !important; } }
