/* MALI — hoja de estilos compartida del sitio público (rojasrojas.com)
   Mismos tokens de marca que ya usa la app (mali-pro-pwa/src/styles/global.css):
   negro cálido + dorado + garnet, Fraunces (display) + Manrope (texto). */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0806;
  --bg-raised: #14100b;
  --text: #f4ecd8;
  --text-muted: #b6a888;
  --text-faint: #7a6d54;
  --border: #2a2318;
  --gold-100: #f7e7b8;
  --gold-300: #eecd7c;
  --gold-500: #d4af37;
  --gold-600: #c19a2e;
  --gold-700: #a3801f;
  --garnet-500: #b3323f;
  --garnet-600: #8a2530;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-300); }

h1, h2, .display {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---------- Fondo ambiental — mismo lenguaje que el login/toda la app: 2 glows radiales +
   motas de luz dorada subiendo + línea de escaneo, sobre un negro cálido. Portado tal cual de
   AmbientBackground.tsx/global.css (mismas animaciones, mismos valores) — pedido explícito
   2026-08-26: "el super efecto en movimiento que tiene la app". ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 600px at 50% -10%, rgba(212, 175, 55, 0.14), transparent 60%),
    radial-gradient(ellipse 700px 600px at 100% 100%, rgba(179, 50, 63, 0.09), transparent 60%);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 700px 500px at 50% 0%, rgba(212, 175, 55, 0.1), transparent 65%);
  animation: mali-ambient-breathe 14s ease-in-out infinite;
}

@keyframes mali-ambient-breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.ambient-particle {
  position: absolute;
  bottom: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-100), var(--gold-500) 55%, transparent 75%);
  animation-name: ambient-particle-float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes ambient-particle-float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: var(--peak-opacity, 0.5); }
  88% { opacity: var(--peak-opacity, 0.5); }
  100% { transform: translateY(-640px) translateX(24px); opacity: 0; }
}

/* Línea de escaneo — cruza la pantalla una vez cada tanto, como un radar tomando lectura. */
.ambient-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.05), transparent);
  animation: ambient-scanline-sweep 7s ease-in-out infinite;
}

@keyframes ambient-scanline-sweep {
  0% { top: -140px; }
  45%, 100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient::after, .ambient-particle, .ambient-scanline { animation: none; }
}

/* ---------- Logo "vivo" — aura pulsante + 2 anillos orbitales + flotación lenta. Portado tal
   cual de .live-logo/.login-logo en global.css. 100% CSS, cero JS. ---------- */
.live-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 6px 18px rgba(212, 175, 55, 0.35));
  animation: mali-logo-float 5s ease-in-out infinite;
}

.live-logo img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 30%;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.45),
    0 3px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Brillo diagonal — el mismo aire "app icon" que .ai-robot-icon-shine en la app, aquí estático
   (no barrido) para no competir con el aura/anillos que ya están en movimiento. */
.live-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05) 40%, transparent 65%);
  pointer-events: none;
}

@keyframes mali-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.live-logo-aura {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.35), transparent 70%);
  animation: mali-aura-pulse 3.2s ease-in-out infinite;
  z-index: -1;
}

@keyframes mali-aura-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.12); }
}

.live-logo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
}

.live-logo-ring-1 {
  inset: -10px;
  border-top-color: rgba(212, 175, 55, 0.55);
  border-right-color: rgba(212, 175, 55, 0.15);
  animation: mali-orbit-spin 6s linear infinite;
}

.live-logo-ring-2 {
  inset: -18px;
  border-bottom-color: rgba(212, 175, 55, 0.35);
  border-left-color: rgba(212, 175, 55, 0.1);
  animation: mali-orbit-spin 9s linear infinite reverse;
}

@keyframes mali-orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .live-logo, .live-logo-aura, .live-logo-ring { animation: none; }
}

/* ---------- Header compartido (logo + nombre) ---------- */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  width: fit-content;
}

.site-header img {
  width: 100%;
  height: 100%;
  display: block;
}

.site-header span {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* ---------- Botones tipo "pill" con borde dorado — mismo lenguaje que .link/.notif-reply-btn
   de la app. ---------- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-100);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.65rem 1.4rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 99px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-pill:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold-500);
  transform: translateY(-1px);
}

.btn-pill.primary {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-600));
  color: #1a1409;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.22);
}

.btn-pill.primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* ---------- Animación de entrada, sutil — mismo mali-fade-up que usa la app. ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; }
}

/* ---------- Footer compartido ---------- */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
  line-height: 1.8;
}

.site-footer a { color: var(--text-muted); }

/* ---------- Páginas de documento (privacidad/términos) ---------- */
.doc-page {
  max-width: 700px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem 3rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-300);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
  opacity: 0.85;
  transition: opacity 0.2s ease, gap 0.2s ease;
}

.back-link:hover { opacity: 1; gap: 9px; }

.doc-page h1 {
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  color: var(--text);
  margin-bottom: 0.6rem;
}

.doc-date {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 2.5rem;
}

.doc-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 2.5rem;
}

.doc-page h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-300);
  margin-bottom: 0.75rem;
  margin-top: 2.25rem;
}

.doc-page p {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
  max-width: 62ch;
}

.doc-page ul {
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
}

.doc-page li {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.45rem;
  max-width: 60ch;
}

.doc-page a { text-decoration: underline; text-underline-offset: 2px; }

.highlight {
  background: var(--bg-raised);
  border-left: 3px solid var(--gold-500);
  padding: 1rem 1.25rem;
  border-radius: 0 10px 10px 0;
  margin-bottom: 1.1rem;
}

.highlight p { margin-bottom: 0; color: var(--gold-100); }
