/* =============================================================================
 * public-the-app.css — Pagina /la-app: mockups CSS de alta fidelidad de las pantallas del APK.
 *
 * EXTERNALIZADO desde el bloque `<style>` de `templates/public/the_app.html` (ola F1 del
 * endurecimiento CSP, 2026-07-26). Vivía inline en la plantilla, lo que obligaba
 * a `style-src 'unsafe-inline'` en la Content-Security-Policy: con esa concesión
 * un XSS podía inyectar CSS y exfiltrar datos por selectores + `url()`. Ahora la
 * hoja se sirve de `/static/css/` (mismo origen) y la CSP puede exigir
 * `style-src-elem 'self'` sin ninguna excepción.
 *
 * REGLA: no volver a meter `<style>` en la plantilla — el test
 * `crates/web/tests/csp_no_inline_style_test.rs` lo rompe a propósito.
 * El ORDEN de carga importa: este `<link>` va donde estaba el `<style>`, para
 * que la cascada (quién gana sobre `brand.css`) no cambie de aspecto.
 * ========================================================================== */
/* ── Layout general de la página ──────────────────────────────────────── */
.ta { --ta-gap: clamp(2.5rem, 5vw, 4.5rem); }
.ta-section { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Cabecera (intro + CTA) ───────────────────────────────────────────── */
.ta-head { text-align: center; max-width: 46ch; margin: 0 auto clamp(2rem, 4vw, 3rem); padding-top: clamp(1rem, 3vw, 2rem); }
.ta-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary-text);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 0.4rem 0.8rem; border-radius: 999px; margin-bottom: 1rem;
}
.ta-eyebrow svg { width: 14px; height: 14px; }
.ta-head h1 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.75rem; color: var(--text); }
.ta-head p { color: var(--text-soft); font-size: clamp(1rem, 1.6vw, 1.15rem); margin: 0 auto 1.75rem; line-height: 1.6; }
.ta-cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.ta-cta-row .btn { padding: 0.85rem 1.5rem; font-size: 1rem; }

/* ── Rejilla de los tres mockups ──────────────────────────────────────── */
.ta-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; padding-bottom: var(--ta-gap); }
.ta-screen { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ta-caption { margin-top: 1.25rem; max-width: 28ch; }
.ta-caption h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin: 0 0 0.35rem; color: var(--text); }
.ta-caption p { color: var(--text-soft); margin: 0; font-size: 0.92rem; line-height: 1.55; }
/* Numerito de paso (1·2·3) que ata cada mockup a su explicación. */
.ta-step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--primary); color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.6rem; }

/* ── Carcasa de móvil (adaptada de .lp-phone de la portada) ───────────── */
.ta-phone {
  position: relative; width: clamp(220px, 26vw, 280px); aspect-ratio: 9 / 19;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 36px; padding: 11px; flex: none;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.45), 0 8px 20px -10px rgba(0,0,0,0.25);
  animation: ta-float 6s ease-in-out infinite;
}
/* Desfasamos la flotación de cada móvil para que no suban/bajen a la vez. */
.ta-phone.d2 { animation-delay: 0.8s; }
.ta-phone.d3 { animation-delay: 1.6s; }
.ta-phone::before { /* muesca superior (notch) */
  content: ""; position: absolute; top: 13px; left: 50%; transform: translateX(-50%);
  width: 36%; height: 17px; background: var(--surface-2); border-radius: 0 0 12px 12px; z-index: 5;
}
/* Lienzo interior de la "pantalla": recorta el contenido a las esquinas. */
.ta-screen-inner { position: relative; width: 100%; height: 100%; border-radius: 26px; overflow: hidden; background: var(--surface-2); }

/* ── Mockup 1: FEED (tarjeta de persona) ──────────────────────────────── */
.ta-feed { position: absolute; inset: 0; }
.ta-feed img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ta-feed-grad { position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(to top, rgba(20,16,14,0.85), rgba(20,16,14,0.15) 60%, transparent); }
.ta-chip {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--primary); color: #fff; font-family: var(--font-ui); font-weight: 600; font-size: 0.72rem;
  padding: 0.3rem 0.6rem; border-radius: 999px; box-shadow: 0 4px 12px -4px rgba(0,0,0,0.4);
  animation: ta-pulse 2.6s ease-in-out infinite;
}
.ta-chip svg { width: 13px; height: 13px; }
.ta-feed-meta { position: absolute; left: 16px; right: 16px; bottom: 70px; z-index: 2; color: #fff; text-align: left; }
.ta-feed-meta strong { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; display: block; line-height: 1.15; }
.ta-feed-meta span { font-size: 0.85rem; opacity: 0.92; display: inline-flex; align-items: center; gap: 0.3rem; }
.ta-feed-meta span svg { width: 13px; height: 13px; }
/* Barra inferior con los tres botones de acción (paso / me interesa / super). */
.ta-actions { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 3; display: flex; justify-content: center; gap: 14px; }
.ta-act { width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,0.92); box-shadow: 0 6px 16px -6px rgba(0,0,0,0.5); }
.ta-act svg { width: 22px; height: 22px; }
.ta-act.pass { color: #6b6b72; }
.ta-act.like { color: var(--primary); transform: scale(1.15); animation: ta-pulse 2.6s ease-in-out infinite; }
.ta-act.super { color: var(--premium); }

/* ── Mockup 2: MATCH (¡es un match!) ──────────────────────────────────── */
.ta-match { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 22%, var(--surface-2)), var(--surface-2)); padding: 1rem; }
.ta-match h3 { font-family: var(--font-display); font-weight: 600; color: var(--primary-text); font-size: 1.5rem; margin: 0.8rem 0 0.2rem; text-align: center; }
.ta-match p { color: var(--text-soft); font-size: 0.85rem; margin: 0 0 0.8rem; text-align: center; }
/* Dos avatares circulares que se solapan, con un corazón saltarín en medio. */
.ta-avatars { position: relative; display: flex; align-items: center; }
.ta-avatars .av { width: 92px; height: 92px; border-radius: 999px; overflow: hidden; border: 3px solid var(--surface); box-shadow: 0 8px 20px -8px rgba(0,0,0,0.45); }
.ta-avatars .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ta-avatars .av:last-child { margin-left: -22px; }
.ta-heart { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 2; color: var(--primary); animation: ta-beat 1.4s ease-in-out infinite; }
.ta-heart svg { width: 40px; height: 40px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35)); }
.ta-match-btn { margin-top: 0.4rem; background: var(--primary); color: #fff; font-family: var(--font-ui); font-weight: 600; font-size: 0.85rem; padding: 0.55rem 1.1rem; border-radius: 999px; }

/* ── Mockup 3: CHAT (burbujas de conversación) ────────────────────────── */
.ta-chat { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface); }
.ta-chat-top { display: flex; align-items: center; gap: 0.55rem; padding: 1.5rem 0.9rem 0.7rem; border-bottom: 1px solid var(--border); }
.ta-chat-top .av { width: 34px; height: 34px; border-radius: 999px; overflow: hidden; flex: none; }
.ta-chat-top .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ta-chat-top .who { text-align: left; line-height: 1.2; }
.ta-chat-top .who strong { font-size: 0.9rem; color: var(--text); display: block; }
.ta-chat-top .who small { font-size: 0.72rem; color: var(--success-text); display: inline-flex; align-items: center; gap: 0.2rem; }
.ta-chat-top .who small svg { width: 10px; height: 10px; }
.ta-chat-body { flex: 1; display: flex; flex-direction: column; gap: 0.45rem; padding: 0.9rem; overflow: hidden; }
.ta-bubble { max-width: 78%; padding: 0.5rem 0.75rem; border-radius: 16px; font-size: 0.82rem; line-height: 1.35; }
/* Entrante (la otra persona): gris, pegada a la izquierda. */
.ta-in { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 5px; }
/* Saliente (tú): coral, pegada a la derecha; aparece con un fade escalonado. */
.ta-out { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 5px; }
.ta-bubble.pop { opacity: 0; animation: ta-pop 600ms ease forwards; }
.ta-bubble.pop.p2 { animation-delay: 0.5s; }
.ta-bubble.pop.p3 { animation-delay: 1s; }
/* Barra "escribir mensaje" (decorativa). */
.ta-chat-input { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.9rem; border-top: 1px solid var(--border); }
.ta-chat-input .field { flex: 1; height: 30px; border-radius: 999px; background: var(--surface-2); }
.ta-chat-input .send { width: 30px; height: 30px; border-radius: 999px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.ta-chat-input .send svg { width: 15px; height: 15px; }

/* ── Bloque "garantías" (reusa el lenguaje de la portada) ─────────────── */
.ta-trust { padding: var(--ta-gap) 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ta-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.ta-trust-card { text-align: center; padding: 1rem; }
.ta-trust-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 0.75rem; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); }
.ta-trust-ico svg { width: 24px; height: 24px; }
.ta-trust-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin: 0 0 0.3rem; }
.ta-trust-card p { color: var(--text-soft); margin: 0; font-size: 0.9rem; line-height: 1.5; }

/* ── CTA final (idéntica en estilo a la de la portada) ────────────────── */
.ta-final { padding: var(--ta-gap) 0; }
.ta-final-inner { text-align: center; background: linear-gradient(135deg, var(--primary), var(--premium)); color: #fff; border-radius: 24px; padding: clamp(2.5rem, 5vw, 4rem) 1.5rem; }
.ta-final-inner h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 0.75rem; color: #fff; }
.ta-final-inner p { max-width: 46ch; margin: 0 auto 1.75rem; opacity: 0.95; line-height: 1.6; }
.ta-final-inner .btn { background: #fff; color: var(--primary-text); padding: 0.9rem 2rem; font-size: 1.05rem; font-weight: 700; }

/* ── Animaciones ──────────────────────────────────────────────────────── */
@keyframes ta-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ta-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes ta-beat { 0%,100% { transform: translate(-50%,-50%) scale(1); } 30% { transform: translate(-50%,-50%) scale(1.22); } 60% { transform: translate(-50%,-50%) scale(0.96); } }
@keyframes ta-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Responsive: los tres móviles pasan a una columna en pantallas pequeñas. */
@media (max-width: 860px) {
  .ta-showcase { grid-template-columns: 1fr; gap: 2.5rem; }
  .ta-trust-grid { grid-template-columns: 1fr; }
  /* La animación pulse del like da por hecho transform: scale; al apilar no
     cambia. */
}

/* Accesibilidad: si el usuario pide menos movimiento, todo queda quieto. */
@media (prefers-reduced-motion: reduce) {
  .ta-phone, .ta-chip, .ta-act.like, .ta-heart, .ta-bubble.pop { animation: none !important; }
  .ta-bubble.pop { opacity: 1; }
}
