/* ------------------------------------------------------------------
   Alto Andino — animaciones y ajustes que complementan a Tailwind.
   Reemplazan el trabajo que en el boceto hacia framer-motion.
------------------------------------------------------------------ */

:root { -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }
body { font-family: 'Poppins', 'Segoe UI', sans-serif; background: #14120f; color: #f4ede0; }
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; }

/* Ocultar overflow del body cuando el menu mobile esta abierto */
body.aa-no-scroll { overflow: hidden; }

/* Menu mobile: fondo opaco solido garantizado (contraste del texto).
   Blindaje por si el Tailwind CDN no genera bg-carbon-950 en el overlay. */
#aa-overlay { background-color: #14120f !important; }

/* ---------- Reveal (scroll-in) ---------- */
.reveal {
	opacity: 0;
	transform: translateY(32px);
	transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
	will-change: opacity, transform;
}
.reveal.from-down  { transform: translateY(-32px); }
.reveal.from-left  { transform: translateX(40px); }
.reveal.from-right { transform: translateX(-40px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- TextReveal (palabra por palabra con blur) ---------- */
.text-reveal .tr-word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.text-reveal .tr-word > span {
	display: inline-block;
	opacity: 0;
	transform: translateY(.5em);
	filter: blur(6px);
	transition: opacity .55s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1), filter .55s cubic-bezier(.22,1,.36,1);
	will-change: transform, filter;
}
.text-reveal.is-visible .tr-word > span { opacity: 1; transform: none; filter: blur(0); }

/* ---------- Container Scroll (tarjeta plana, sin inclinacion) ---------- */
.cscroll-card { transform: none; }
.cscroll-title { opacity: 0; transform: translateY(40px); will-change: opacity, transform; }

/* ---------- Testimonios (fade) ---------- */
.aa-testi { transition: opacity .4s ease; }

/* ---------- Slideshow (galería con cross-fade) ---------- */
.aa-slide { opacity: 0; transition: opacity .8s ease; }
.aa-slide.is-active { opacity: 1; }

/* ---------- Header dinamico (se achica al scrollear) ---------- */
#site-header .aa-logo { transition: height .35s cubic-bezier(.22,1,.36,1); }
#site-header.aa-scrolled { padding-top: .45rem; padding-bottom: .45rem; box-shadow: 0 10px 30px -14px rgba(0,0,0,.7); }
#site-header.aa-scrolled .aa-logo { height: 3rem; }
@media (min-width: 768px) { #site-header.aa-scrolled .aa-logo { height: 3.25rem; } }

/* Logo: aparicion suave al cargar */
.aa-logo { opacity: 0; animation: aaLogoIn .9s ease .15s forwards; }
@keyframes aaLogoIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Hero: ken-burns + brillo dorado ---------- */
.aa-kenburns { animation: aaKen 20s ease-in-out infinite alternate; transform-origin: center; }
@keyframes aaKen { from { transform: scale(1.05); } to { transform: scale(1.28); } }

/* Halo dorado sutil detras del contenido del hero */
.aa-hero-glow::after {
	content: ''; position: absolute; z-index: 0; left: -10%; top: 20%;
	width: 55%; height: 60%; pointer-events: none;
	background: radial-gradient(closest-side, rgba(224,163,57,.16), transparent 70%);
	filter: blur(20px);
}

/* Indicador de scroll (hero) */
.aa-scrolldown { animation: aaBounce 1.9s ease-in-out infinite; }
@keyframes aaBounce { 0%, 100% { transform: translateY(0); opacity: .65; } 50% { transform: translateY(9px); opacity: 1; } }

/* ---------- Detalle: linea dorada antes de los subtitulos ---------- */
.aa-eyebrow { display: inline-flex; align-items: center; }
.aa-eyebrow::before {
	content: ''; display: inline-block; width: 28px; height: 1px;
	background: #e0a339; margin-right: 12px; opacity: .9;
}

/* ---------- Imagen showcase: saturacion reducida + zoom al pasar el mouse ---------- */
.cscroll-card .cscroll-img { filter: saturate(.8); transition: transform 1.4s cubic-bezier(.22,1,.36,1); }
.cscroll-card:hover .cscroll-img { transform: scale(1.06); }

/* ---------- Botones: lift + sombra dorada ---------- */
.aa-btn { transition: transform .25s ease, background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .25s ease; }
.aa-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(224,163,57,.45); }

/* Respeta usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
	.reveal, .text-reveal .tr-word > span, .cscroll-card, .cscroll-title, .aa-testi,
	.aa-logo, .aa-kenburns, .aa-scrolldown, .aa-btn {
		transition: none !important;
		animation: none !important;
		transform: none !important;
		opacity: 1 !important;
		filter: none !important;
	}
}
