/* Mejoras de J3L sobre la landing de Funny Hippo. Se carga después del CSS original. */

/* ---------- intro corta: antes 10.4 s, ahora 1.4 s y solo la primera visita */
#splash, #splash.done { transition: opacity .45s ease, visibility .45s ease !important; }
#splash img { transition: opacity .4s ease, filter .4s ease, transform .45s ease !important; }
#splash.fh-sin-intro { display: none !important; }
#mainContent, #hdr { transition: opacity .45s ease, filter .45s ease !important; }

/* ---------- barra de progreso y sección activa */
.fh-progreso { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 150; pointer-events: none; }
.fh-progreso i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--teal), #3d8bf2); }
.nav-links a { position: relative; }
.nav-links a.fh-activo { color: var(--teal); }
.nav-links a.fh-activo::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--teal); border-radius: 2px; }

/* ---------- volver arriba (escritorio) */
.fh-arriba { position: fixed; right: 22px; bottom: 22px; z-index: 80; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(17, 23, 33, .92); color: var(--text); font-size: 20px; cursor: pointer;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.fh-arriba.fh-ver { opacity: 1; transform: none; pointer-events: auto; }
.fh-arriba:hover { border-color: var(--teal); color: var(--teal); }
.prototype-tag { right: auto !important; left: 16px; }

/* ---------- secciones plegables: lo legal y lo operativo se abre a pedido */
details.fh-mas { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
details.fh-mas > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; font: 600 15px/1.4 'Space Grotesk', sans-serif; color: var(--text); }
details.fh-mas > summary::-webkit-details-marker { display: none; }
details.fh-mas > summary::after { content: "+"; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--teal); font-size: 18px; transition: transform .2s ease; }
details.fh-mas[open] > summary::after { transform: rotate(45deg); }
details.fh-mas > summary:hover { color: var(--teal); }
details.fh-mas > summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: var(--r); }
details.fh-mas > :not(summary) { margin: 0 22px 22px !important; }
details.fh-mas .creator-agreement, details.fh-mas .season-empty, details.fh-mas .vote-integrity { margin-top: 0 !important; }

/* ---------- lista de espera */
.fh-lista { margin: 34px 0 10px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; padding: 34px;
  border-radius: 14px; background: linear-gradient(var(--panel), var(--panel)) padding-box,
  linear-gradient(120deg, rgba(98, 229, 201, .7), rgba(61, 139, 242, .55)) border-box; border: 1px solid transparent; }
.fh-lista h3 { font: 700 clamp(22px, 2.4vw, 30px)/1.2 'Sora', sans-serif; margin: 12px 0; letter-spacing: -.02em; }
.fh-lista p { color: var(--dim); }
.fh-form .field input[type=text] { min-height: 48px; }
.fh-form .btn { width: 100%; justify-content: space-between; margin-top: 4px; }
.fh-form .btn[disabled] { opacity: .6; cursor: wait; }
.fh-roles { border: 0; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fh-roles legend { font: 500 13px 'Space Grotesk', sans-serif; color: var(--dim); margin-bottom: 8px; padding: 0; }
.fh-roles legend small { opacity: .7; }
.fh-roles label { position: relative; cursor: pointer; }
.fh-roles input { position: absolute; opacity: 0; inset: 0; }
.fh-roles span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; color: var(--text); transition: background .15s, border-color .15s, color .15s; }
.fh-roles input:checked + span { background: rgba(98, 229, 201, .14); border-color: var(--teal); color: var(--teal); }
.fh-roles input:checked + span::before { content: "✓ "; white-space: pre; }
.fh-roles input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.fh-acepto { margin: 16px 0 6px !important; }
.fh-datos { margin: 0 0 14px; font-size: 13px; color: var(--dim); }
.fh-datos summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.fh-datos p { margin-top: 8px; font-size: 13px; line-height: 1.6; }
.fh-trampa { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fh-form-msg { min-height: 1.4em; margin-top: 10px; font-size: 14px; color: var(--dim); }
.fh-form-msg.fh-error { color: #ff9a8a; }
.fh-form [aria-invalid=true] { border-color: #ff9a8a !important; }
.fh-listo { padding: 22px; border: 1px solid rgba(98, 229, 201, .45); border-radius: var(--r); background: rgba(98, 229, 201, .06); }
.fh-listo strong { font: 700 18px 'Sora', sans-serif; color: var(--teal); }
.fh-listo p { margin: 8px 0 4px; }
.fh-listo-acciones { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fh-listo-acciones .btn { width: auto; }
#appDialog .fh-form, #appDialog .fh-listo { margin-top: 18px; }
.fh-avisame { margin-top: 18px; }

/* ---------- aparición suave */
.fh-revelar { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.fh-revelar.fh-visible { opacity: 1; transform: none; }

/* ---------- barra fija y carruseles: solo celular */
.fh-barra, .fh-pista { display: none; }
@media (max-width: 760px) {
  .prototype-tag, .fh-arriba { display: none !important; }

  .fh-barra { display: flex; gap: 8px; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 90;
    padding: 7px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10, 14, 22, .94); backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px); transform: translateY(160%); transition: transform .3s ease; }
  .fh-barra.fh-ver { transform: none; }
  body:has(#appDialog[open]) .fh-barra { transform: translateY(160%); }
  .fh-barra button { min-height: 48px; border-radius: 9px; font: 700 14px 'Space Grotesk', sans-serif; cursor: pointer; border: 0; }
  .fh-barra-compra { flex: 1; background: transparent; color: var(--text); border: 1px solid var(--line) !important; }
  .fh-barra-compra b { color: var(--teal); margin-left: 4px; }
  .fh-barra-principal { flex: 1.2; background: var(--grad, linear-gradient(90deg, #62e5c9, #3d8bf2)); color: #07090f; }
  footer { padding-bottom: 90px; }

  .fh-carrusel { display: flex !important; grid-template-columns: none !important; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 12px !important; padding-bottom: 6px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .fh-carrusel::-webkit-scrollbar { display: none; }
  .fh-carrusel > * { scroll-snap-align: start; flex: 0 0 80%; min-width: 0; }
  .collection-grid.fh-carrusel > * { flex-basis: 72%; }
  .steps.fh-carrusel { border: 0 !important; }
  .steps.fh-carrusel > .stepc { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
  .fh-pista { display: block; margin: 8px 0 0; font: 500 12px 'Space Grotesk', sans-serif; color: var(--dim); letter-spacing: .03em; transition: opacity .3s; }
  .fh-pista-usada { opacity: 0; }

  .fh-lista { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  details.fh-mas > summary { padding: 16px 18px; }
  details.fh-mas > :not(summary) { margin: 0 16px 18px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .fh-revelar { opacity: 1; transform: none; transition: none; }
  .fh-barra, .fh-arriba, .fh-pista { transition: none; }
}
@media print { .fh-barra, .fh-arriba, .fh-progreso { display: none !important; } }

/* =====================================================================
   Personalidad: ruta 001 → 002, hoodie de Hippo y preventa
   ===================================================================== */
.fh-mano { font: 700 clamp(22px, 2.2vw, 28px)/1.1 'Caveat', cursive; color: var(--teal); display: inline-block; transform: rotate(-4deg); }

/* ---------- ruta 001 → 002 */
.fh-ruta { margin-top: 56px; padding: 44px 0 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr minmax(120px, .9fr) 1fr; align-items: center; column-gap: 28px; row-gap: 28px; }
.fh-ruta-paso { position: relative; }
.fh-ruta-paso strong { display: block; font: 700 18px 'Sora', sans-serif; margin-top: 6px; }
.fh-ruta-paso p { color: var(--dim); font-size: 14.5px; margin-top: 6px; max-width: 280px; }
.fh-ruta-num { display: block; font: 900 clamp(64px, 9vw, 124px)/.95 'Unbounded', sans-serif; letter-spacing: -.04em; color: var(--text); margin-top: 14px; }
.fh-hueco { color: transparent; -webkit-text-stroke: 2px var(--teal); transition: color .4s ease; }
.fh-ruta-sig:hover .fh-hueco { color: rgba(98, 229, 201, .16); }
.fh-ruta-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px;
  font: 700 11px 'Space Grotesk', sans-serif; letter-spacing: .12em; color: var(--dim); }
.fh-vivo { color: var(--teal); border-color: rgba(98, 229, 201, .5); }
.fh-vivo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: fhLatido 1.8s ease-out infinite; }
@keyframes fhLatido { 0% { box-shadow: 0 0 0 0 rgba(98, 229, 201, .7); } 100% { box-shadow: 0 0 0 9px rgba(98, 229, 201, 0); } }
.fh-ruta-nota { position: absolute; top: 8px; left: 140px; white-space: nowrap; }
.fh-ruta-nota::before { content: "↙"; font-family: sans-serif; font-size: 22px; margin-right: 4px; display: inline-block; transform: translateY(6px) rotate(-20deg); }
.fh-ruta-camino { position: relative; height: 48px; }
.fh-ruta-camino svg { position: absolute; inset: 50% 0 auto 0; width: 100%; height: 20px; transform: translateY(-50%); overflow: visible; }
.fh-ruta-camino line { stroke: var(--teal); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; opacity: .7; animation: fhMarcha 1s linear infinite; }
@keyframes fhMarcha { to { stroke-dashoffset: -11; } }
.fh-ruta-camino img { position: absolute; top: 50%; width: 38px; height: auto; transform: translate(-50%, -60%);
  filter: drop-shadow(0 0 14px rgba(61, 139, 242, .55)); animation: fhCamina 5.5s ease-in-out infinite; }
@keyframes fhCamina {
  0% { left: 0; opacity: 0; } 10% { opacity: 1; }
  45% { transform: translate(-50%, -78%); } 50% { transform: translate(-50%, -60%); }
  85% { opacity: 1; } 100% { left: 100%; opacity: 0; }
}
.fh-ruta-camino::after { content: "→"; position: absolute; right: -6px; top: 50%; transform: translateY(-54%); color: var(--teal); font-size: 22px; }
.fh-ruta-cta { grid-column: 1 / -1; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.fh-ruta-cta .btn { width: auto; margin: 0; }

/* ---------- la hoodie de Hippo */
.fh-hoodie { margin-top: 40px; display: grid; grid-template-columns: minmax(260px, .8fr) 1.2fr; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: radial-gradient(120% 140% at 100% 0%, rgba(61, 139, 242, .16), transparent 55%),
  radial-gradient(90% 120% at 100% 100%, rgba(98, 229, 201, .10), transparent 60%), var(--panel); }
.fh-hoodie-foto { position: relative; background: #d8cfbe; min-height: 360px; overflow: hidden; display: flex; justify-content: center; align-items: flex-end; }
.fh-hoodie-foto img { height: 560px; width: auto; max-width: none; display: block; transform: translateY(70px); transition: transform .5s cubic-bezier(.2, .8, .3, 1); }
.fh-hoodie:hover .fh-hoodie-foto img { transform: translateY(58px) rotate(-2deg); }
.fh-cinta { position: absolute; left: -30%; right: -30%; top: 76%; display: flex; overflow: hidden; transform: rotate(-11deg);
  background: var(--teal); color: #07090f; padding: 9px 0; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.fh-cinta span { flex-shrink: 0; white-space: nowrap; font: 400 22px/1 'Bebas Neue', sans-serif; letter-spacing: .08em; padding-right: 12px; animation: fhCinta 16s linear infinite; }
@keyframes fhCinta { to { transform: translateX(-100%); } }
.fh-hoodie-copy { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; }
.fh-hoodie-copy h3 { font: 700 clamp(26px, 3vw, 38px)/1.12 'Unbounded', sans-serif; letter-spacing: -.03em; }
.fh-hoodie-copy p { color: var(--dim); max-width: 440px; }
.fh-hoodie-copy .fh-mano { margin: 2px 0 6px 4px; }
.fh-hoodie-copy .btn { width: auto; margin: 0; }

/* ---------- preventa */
.fh-preventa { margin-top: 28px; position: relative; padding: clamp(24px, 3.5vw, 40px); border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); display: grid; grid-template-columns: 1fr 1fr; gap: 26px 40px; }
.fh-preventa-copy h3 { font: 700 clamp(22px, 2.4vw, 30px)/1.2 'Sora', sans-serif; letter-spacing: -.02em; margin: 10px 0; padding-right: 120px; }
.fh-preventa-copy p { color: var(--dim); font-size: 15px; }
.fh-preventa-pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-self: center; }
.fh-preventa-pasos li { display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; align-items: baseline; }
.fh-preventa-pasos b { grid-row: span 2; font: 400 34px/1 'Bebas Neue', sans-serif; color: var(--teal); }
.fh-preventa-pasos strong { font: 700 16px 'Space Grotesk', sans-serif; }
.fh-preventa-pasos span { color: var(--dim); font-size: 14px; }
.fh-medidor { grid-column: 1 / -1; position: relative; height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.fh-medidor i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: repeating-linear-gradient(-45deg, var(--teal) 0 10px, #4fd0b5 10px 20px);
  transition: width 2.2s cubic-bezier(.2, .8, .2, 1); }
.fh-preventa.fh-lleno .fh-medidor i { width: 68%; }
.fh-medidor em { position: absolute; left: 80%; top: -24px; transform: translateX(-50%); font: 700 10px 'Space Grotesk', sans-serif; letter-spacing: .14em; font-style: normal; color: var(--dim); }
.fh-medidor::after { content: ""; position: absolute; left: 80%; top: -6px; bottom: -6px; width: 2px; background: var(--text); border-radius: 2px; }
.fh-sello { position: absolute; top: -26px; right: clamp(16px, 3vw, 36px); width: 128px; height: 128px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px;
  background: #0a0e16; color: var(--teal); border: 2px solid var(--teal); outline: 1px dashed rgba(98, 229, 201, .55); outline-offset: 5px;
  transform: rotate(-12deg); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.fh-sello span { font: 700 9px/1.25 'Space Grotesk', sans-serif; letter-spacing: .12em; }
.fh-sello strong { font: 400 40px/1 'Bebas Neue', sans-serif; letter-spacing: .02em; }

@media (max-width: 760px) {
  .fh-ruta { grid-template-columns: 1fr; padding: 32px 0; row-gap: 6px; }
  .fh-ruta-camino { height: 64px; width: 20px; margin-left: 22px; }
  .fh-ruta-camino svg { inset: 50% auto auto 50%; width: 64px; height: 20px; transform: translate(-50%, -50%) rotate(90deg); }
  .fh-ruta-camino img { width: 30px; left: 50% !important; animation: fhBaja 4s ease-in-out infinite; }
  @keyframes fhBaja { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
  .fh-ruta-camino::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -14px; transform: translateX(-50%); }
  .fh-ruta-nota { left: auto; right: 0; top: 46px; }
  .fh-ruta-cta { margin-top: 18px; gap: 16px; }
  .fh-ruta-cta .btn { width: 100%; }
  .fh-hoodie { grid-template-columns: 1fr; }
  .fh-hoodie-foto { min-height: 300px; }
  .fh-hoodie-foto { min-height: 0; height: 340px; }
  .fh-hoodie-foto img { height: 440px; transform: translateY(70px); }
  .fh-hoodie-copy .btn { width: 100%; }
  .fh-preventa { grid-template-columns: 1fr; margin-top: 54px; }
  .fh-preventa-copy h3 { padding-right: 0; margin-top: 46px; }
  .fh-sello { width: 112px; height: 112px; top: -40px; }
  .fh-sello strong { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .fh-vivo::before, .fh-ruta-camino line, .fh-ruta-camino img, .fh-cinta span { animation: none !important; }
  .fh-ruta-camino img { left: 50%; }
  .fh-medidor i { transition: none; }
}
