/* ==================================================
   Astronaut — estilos propios de la plantilla (hero: tu app en gravedad cero)
   Barra, botones, secciones comunes, similares, CTA y WhatsApp vienen de themes/_kit/am-kit.css
   ================================================== */

.as-hero {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100svh;
	min-height: 640px;
	padding-top: 68px;
	overflow: hidden;
	color: #f5f5f0;
	background: #1d154b;
}

/* Cielo índigo con el brillo magenta del original y estrellas pixeladas que titilan */
.as-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: radial-gradient(120% 90% at 50% 0%, #2a1f6e 0%, #1d154b 45%, #0b0824 100%); }
.as-glow { position: absolute; display: block; border-radius: 50%; filter: blur(60px); }
.as-glow--a { left: 34%; top: 30%; width: 46vw; height: 30vw; background: radial-gradient(closest-side, rgba(229, 25, 126, .85), rgba(229, 25, 126, 0)); animation: as-glow 14s ease-in-out infinite alternate; }
.as-glow--b { left: 8%; top: -10%; width: 40vw; height: 40vw; background: radial-gradient(closest-side, rgba(98, 61, 255, .55), rgba(98, 61, 255, 0)); animation: as-glow 18s ease-in-out -6s infinite alternate-reverse; }
@keyframes as-glow { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vw, 4vh) scale(1.15); } }
.as-stars {
	position: absolute;
	inset: 0;
	display: block;
	background-image:
		radial-gradient(2px 2px at 12% 18%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 28% 64%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 41% 12%, #ffe000 50%, transparent 51%),
		radial-gradient(2px 2px at 63% 22%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 77% 58%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 88% 14%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 92% 72%, #ffe000 50%, transparent 51%),
		radial-gradient(2px 2px at 6% 82%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 54% 86%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 35% 38%, #fff 50%, transparent 51%);
	animation: as-twinkle 3.2s steps(2) infinite;
}
@keyframes as-twinkle { 50% { opacity: .45; } }

/* Llamas de los propulsores (as-fx, canvas) */
.as-fx { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }

/* Titular */
.as-head { position: relative; z-index: 4; padding: clamp(18px, 3.5vh, 40px) var(--gutter) 0; text-align: center; }
.as-kicker {
	display: inline-block;
	margin: 0 0 12px;
	padding: 4px 10px;
	font-family: var(--mb-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #0a0a0a;
	background: var(--accent);
}
.as-page .as-title {
	margin: 0;
	font-family: var(--mb-display);
	font-weight: 900;
	font-size: clamp(48px, 7.4vw, 132px);
	line-height: .86;
	letter-spacing: -.045em;
	text-align: center;
	text-transform: uppercase;
	color: #f5f5f0;
	text-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
.as-title__l { display: block; }
.as-title__l + .as-title__l { color: transparent; -webkit-text-stroke: 2px #f5f5f0; }

/* ---------- Órbita: los teléfonos ---------- */
.as-orbit { position: relative; z-index: 4; flex: 1 1 auto; min-height: 0; perspective: 1400px; }
.as-phone {
	--h: 86%;
	position: absolute;
	bottom: 6%;
	left: 50%;
	height: var(--h);
	aspect-ratio: 310 / 672;
	translate: -50% 0;   /* centrado (el transform lo usa la física en astro.js) */
	will-change: transform;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}
.as-phone--c { --h: 92%; z-index: 3; }
.as-phone--l,
.as-phone--r { --h: 74%; z-index: 2; cursor: grab; }
.as-phone--l { left: calc(50% - 22vw); }
.as-phone--r { left: calc(50% + 22vw); }
.as-phone.is-dragging { cursor: grabbing; }
.as-phone__body {
	position: relative;
	width: 100%;
	height: 100%;
	padding: 4.2%;
	background: linear-gradient(160deg, #f5f6ff, #d8dcf5);
	border-radius: 13% / 6%;
	box-shadow: 0 40px 80px rgba(5, 2, 30, .55), inset 0 0 0 2px rgba(255, 255, 255, .7), inset 0 -6px 14px rgba(40, 30, 110, .25);
}
.as-phone__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 10% / 4.8%; background: #1d154b; }
.as-phone__screen img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.as-phone__notch { position: absolute; top: 4.2%; left: 50%; width: 38%; height: 4%; margin-left: -19%; background: #e9ecfb; border-radius: 0 0 14px 14px; }

/* La app del teléfono central: pantallas que se deslizan */
.as-app__screen { position: absolute; inset: 0; visibility: hidden; }
.as-app__screen.is-on { visibility: visible; }
.as-app__screen img { position: absolute; inset: 0; }
.as-app__zoom { animation: as-zoom 12s ease-in-out infinite alternate; }
@keyframes as-zoom { to { transform: scale(1.12); } }
.ak-page .as-app__hit {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 3;
	width: 50%;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
}
.as-app__hit--prev { left: 0; cursor: w-resize; }
.as-app__hit--next { right: 0; cursor: e-resize; }
.ak-page .as-app__hit:hover { background: transparent; }
.ak-page .as-app__hit:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; }
.as-app__dots { position: absolute; left: 0; right: 0; bottom: 4%; z-index: 4; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.as-app__dots i { width: 8px; height: 8px; background: rgba(255, 255, 255, .45); }
.as-app__dots i.is-on { width: 22px; background: #e5197e; }

/* El mono astronauta en órbita */
.as-monkey { position: absolute; left: 0; top: 0; z-index: 1; width: 84px; height: 84px; image-rendering: pixelated; pointer-events: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.as-monkey.is-front { z-index: 5; }

.as-hint {
	position: relative;
	z-index: 5;
	align-self: flex-start;
	margin: -46px 0 12px var(--gutter);
	padding: 6px 10px;
	font-family: var(--mb-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #f5f5f0;
	background: rgba(10, 10, 10, .65);
	border: 2px solid var(--accent);
}

/* ---------- Pie del hero ---------- */
.as-foot {
	position: relative;
	z-index: 6;
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: minmax(260px, 1fr) auto auto;
	gap: 14px clamp(20px, 3vw, 44px);
	align-items: center;
	/* a la derecha queda libre el lugar del botón flotante de WhatsApp */
	padding: 14px calc(var(--gutter) + 140px) 16px var(--gutter);
	background: #0a0a0a;
	border-top: 3px solid var(--accent);
}
.as-foot__meta { margin: 0 0 4px; font-family: var(--mb-mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.as-foot__lead { max-width: 60ch; margin: 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; color: rgba(245, 245, 240, .86); }
.as-ctrl { display: flex; align-items: center; gap: 10px; }
.as-count { margin: 0 6px 0 0; font-family: var(--mb-mono); font-size: 14px; color: rgba(245, 245, 240, .7); white-space: nowrap; }
.as-idx { display: inline-block; font-family: var(--mb-display); font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -.02em; vertical-align: -5px; color: var(--accent); }
@media (max-width: 1180px) {
	.as-foot { grid-template-columns: minmax(0, 1fr) auto; }
	.as-foot .ak-actions { grid-column: 1 / -1; }
	.as-hint { display: none; }
}

/* ---------- Móvil ---------- */
@media (max-width: 700px) {
	.as-hero { height: auto; min-height: 0; padding-top: 60px; }
	.as-orbit { flex: none; height: 62svh; min-height: 420px; }
	.as-page .as-title { font-size: clamp(42px, 13vw, 72px); }
	.as-phone--c { --h: 92%; }
	.as-phone--l,
	.as-phone--r { --h: 66%; }
	.as-phone--l { left: 16%; }
	.as-phone--r { left: 84%; }
	.as-monkey { width: 60px; height: 60px; }
	.as-foot { grid-template-columns: 1fr; padding: 14px var(--gutter) 88px; }
	.as-ctrl { order: -1; }
	.as-foot .ak-actions .ak-btn { flex: 1 1 auto; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
	.as-glow, .as-stars, .as-app__zoom { animation: none; }
}
