/* assets/app.css — estilos propios que complementan a Tailwind */

[x-cloak] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.texto-grande { font-size: 118%; }
body { background-image: radial-gradient(rgba(6, 78, 59, .045) 1px, transparent 1px); background-size: 22px 22px; }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; border-radius: .75rem; }
.primera-mayus::first-letter { text-transform: uppercase; }
.primera-mayus { display: inline-block; }

/* ---------- Héroe ---------- */
.hero-selva {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(56, 189, 248, .35), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(250, 204, 21, .18), transparent 60%),
    linear-gradient(135deg, #064e3b 0%, #047857 45%, #0f766e 75%, #155e75 100%);
}
.mancha { position: absolute; border-radius: 9999px; filter: blur(70px); opacity: .55; animation: deriva 16s ease-in-out infinite alternate; pointer-events: none; }
.mancha-a { width: 26rem; height: 26rem; left: -8rem; top: -6rem; background: #34d399; }
.mancha-b { width: 22rem; height: 22rem; right: -6rem; top: 20%; background: #38bdf8; animation-duration: 20s; }
.mancha-c { width: 20rem; height: 20rem; left: 35%; bottom: -10rem; background: #fbbf24; opacity: .3; animation-duration: 24s; }
.mancha-d { width: 30rem; height: 30rem; right: -10rem; top: -10rem; background: #ea580c; opacity: .25; }
@keyframes deriva { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(40px, 30px, 0) scale(1.15); } }

.emoji-flota { position: absolute; font-size: 2.6rem; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .3)); animation: flotar 6s ease-in-out infinite; pointer-events: none; user-select: none; }
.flotar { display: inline-block; animation: flotar 4s ease-in-out infinite; }
@keyframes flotar { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(5deg); } }

.texto-arcoiris { background: linear-gradient(90deg, #fde047, #fb923c, #f472b6, #fde047); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: brillo 6s linear infinite; }
@keyframes brillo { to { background-position: 200% center; } }
a:hover .dado { animation: girar .6s ease; display: inline-block; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Tarjetas ---------- */
.tarjeta { transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease; }
.tarjeta:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 24px 60px -20px rgba(6, 78, 59, .45); }
.dato { transition: transform .25s ease; }
.dato:hover { transform: translateX(6px); }

/* ---------- Botones de escucha ---------- */
.mini-escuchar { display: inline-flex; align-items: center; gap: .5rem; border-radius: 9999px; background: #fde68a; color: #022c22; font-weight: 800; padding: .6rem 1.1rem; transition: background .2s, transform .2s; }
.mini-escuchar:hover { background: #fbbf24; transform: translateY(-1px); }
.mini-escuchar-oscuro { background: rgba(255, 255, 255, .14); color: #fff; }
.mini-escuchar-oscuro:hover { background: rgba(255, 255, 255, .25); }
.boton-escuchar span:first-child { transition: transform .2s; }
.boton-escuchar:hover span:first-child { transform: scale(1.1); }

/* ---------- Lectura en voz alta ---------- */
.tts-o { border-radius: .4em; transition: background-color .2s, box-shadow .2s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tts-o.tts-activa { background: #fde047; color: #022c22; box-shadow: 0 0 0 .18em #fde047; }
#tts-bar { visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; }
#tts-bar.visible { transform: translateY(0); visibility: visible; transition: transform .3s ease, visibility 0s; }
body.tts-abierto { padding-bottom: 5.5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  header, footer, #tts-bar, aside, button, .mini-escuchar { display: none !important; }
  body { background: #fff; }
}
