/* ==========================================================
   Entrada de estrella para el nombre de la portada
   Flashes de fotógrafos · letras de título de cine · brillo dorado
   Se activa con body.er-efecto-estrella (Personalizar → Datos de la artista)
   ========================================================== */
body.er-efecto-estrella .er-hero__nombre { position: relative; isolation: isolate; }

/* Luz de reflector detrás del nombre */
body.er-efecto-estrella .er-hero__nombre::before {
	content: ""; position: absolute; z-index: -1; left: -12%; top: -30%; width: 110%; height: 160%; pointer-events: none;
	background: radial-gradient(ellipse at 40% 50%, rgba(214, 178, 110, .38), rgba(214, 178, 110, 0) 64%);
	opacity: 0; animation: er-e-reflector 3.4s .2s ease-out both;
}
/* Línea dorada que se dibuja debajo, como una firma */
body.er-efecto-estrella .er-hero__nombre::after {
	content: ""; display: block; height: 1px; width: 0; margin-top: 22px;
	background: linear-gradient(90deg, #b08a4a, #e6cf98, #b08a4a);
	animation: er-e-linea 1.2s 2s cubic-bezier(.2, .7, .2, 1) forwards;
}

/* Letras: entran desenfocadas y grandes, como el título de una película */
body.er-efecto-estrella .er-hero .er-letra {
	display: inline-block;
	animation: er-e-letra 1.25s cubic-bezier(.16, .84, .24, 1) both;
	animation-delay: calc(var(--i) * 55ms + .35s);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	body.er-efecto-estrella .er-hero .er-letra {
		/* Dorado: oro viejo con un reflejo que pasa cada tanto */
		background-image: linear-gradient(110deg, #9a7431 0%, #c9a35b 18%, #e8d08f 30%, #a77f3a 42%, #fff4cf 50%, #b8913f 58%, #e3c47e 72%, #9a7431 100%);
		background-size: 300% 100%; background-position: 100% 0;
		-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
		filter: drop-shadow(0 2px 0 rgba(122, 88, 30, .18));
		animation:
			er-e-letra 1.25s cubic-bezier(.16, .84, .24, 1) both,
			er-e-brillo 6s ease-in-out infinite;
		animation-delay: calc(var(--i) * 55ms + .35s), calc(var(--i) * 40ms + 1.9s);
	}
}

/* Flashes de cámaras */
.er-flashes { position: absolute; inset: -40px -30px; pointer-events: none; z-index: 2; }
.er-flashes i {
	position: absolute; width: 150px; height: 150px; margin: -75px 0 0 -75px; opacity: 0;
	background:
		linear-gradient(90deg, transparent 48%, rgba(201, 163, 91, .9) 50%, transparent 52%),
		linear-gradient(0deg, transparent 48%, rgba(201, 163, 91, .9) 50%, transparent 52%),
		radial-gradient(circle, #fff 0 7%, rgba(255, 238, 196, .95) 13%, rgba(214, 178, 110, .45) 30%, rgba(214, 178, 110, 0) 58%);
	filter: drop-shadow(0 0 18px rgba(201, 163, 91, .85));
	animation: er-e-flash .42s ease-out both;
}
.er-flashes i:nth-child(1) { left: 6%;  top: 18%; animation-delay: .15s; }
.er-flashes i:nth-child(2) { left: 72%; top: 8%;  animation-delay: .38s; transform: scale(.8); }
.er-flashes i:nth-child(3) { left: 38%; top: 70%; animation-delay: .55s; }
.er-flashes i:nth-child(4) { left: 92%; top: 62%; animation-delay: .78s; transform: scale(.7); }
.er-flashes i:nth-child(5) { left: 20%; top: 88%; animation-delay: 1.02s; transform: scale(.9); }
.er-flashes i:nth-child(6) { left: 58%; top: 26%; animation-delay: 1.25s; transform: scale(.75); }
.er-flashes i:nth-child(7) { left: 84%; top: 30%; animation-delay: 1.5s; transform: scale(.6); }
.er-flashes i:nth-child(8) { left: 2%;  top: 58%; animation-delay: 1.72s; transform: scale(.65); }
.er-flashes i:nth-child(9)  { left: 48%; top: 96%; animation-delay: 1.9s;  transform: scale(.7); }
.er-flashes i:nth-child(10) { left: 66%; top: 80%; animation-delay: 2.05s; transform: scale(.85); }
.er-flashes i:nth-child(11) { left: 28%; top: 4%;  animation-delay: 2.2s;  transform: scale(.6); }
.er-flashes i:nth-child(12) { left: 98%; top: 12%; animation-delay: 2.4s;  transform: scale(.7); }

/* Estrellitas doradas que titilan alrededor del nombre */
.er-destellos { position: absolute; inset: -30px -40px; pointer-events: none; z-index: 1; }
.er-destellos i {
	position: absolute; width: 28px; height: 28px; opacity: 0;
	background: radial-gradient(circle, #fff6d8 0 12%, #e2c27a 30%, #b8913f 60%);
	clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
	filter: drop-shadow(0 0 6px rgba(226, 194, 122, .9));
	animation: er-e-titila 3.2s ease-in-out infinite;
}
.er-destellos i:nth-child(1)  { left: 2%;  top: 10%; animation-delay: 2.4s; }
.er-destellos i:nth-child(2)  { left: 14%; top: 92%; animation-delay: 3.1s; transform: scale(.7); }
.er-destellos i:nth-child(3)  { left: 24%; top: -4%; animation-delay: 2.8s; transform: scale(.55); }
.er-destellos i:nth-child(4)  { left: 33%; top: 88%; animation-delay: 4s;   }
.er-destellos i:nth-child(5)  { left: 44%; top: 2%;  animation-delay: 3.5s; transform: scale(.8); }
.er-destellos i:nth-child(6)  { left: 52%; top: 96%; animation-delay: 2.6s; transform: scale(.6); }
.er-destellos i:nth-child(7)  { left: 61%; top: -6%; animation-delay: 4.4s; }
.er-destellos i:nth-child(8)  { left: 70%; top: 90%; animation-delay: 3.3s; transform: scale(.75); }
.er-destellos i:nth-child(9)  { left: 79%; top: 6%;  animation-delay: 2.5s; transform: scale(.6); }
.er-destellos i:nth-child(10) { left: 88%; top: 84%; animation-delay: 3.8s; }
.er-destellos i:nth-child(11) { left: 97%; top: 30%; animation-delay: 2.9s; transform: scale(.8); }
.er-destellos i:nth-child(12) { left: -1%; top: 60%; animation-delay: 4.2s; transform: scale(.65); }
.er-destellos i:nth-child(13) { left: 38%; top: 46%; animation-delay: 5s;   transform: scale(.45); }
.er-destellos i:nth-child(14) { left: 74%; top: 50%; animation-delay: 5.6s; transform: scale(.45); }
.er-destellos i:nth-child(15) { left: 8%;  top: 40%; animation-delay: 6.1s; transform: scale(.5); }
.er-destellos i:nth-child(16) { left: 93%; top: 64%; animation-delay: 4.8s; transform: scale(.5); }
@keyframes er-e-titila {
	0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
	45% { opacity: 1; transform: scale(1) rotate(45deg); }
	60% { opacity: .9; }
}

/* Destello general de la página al primer flash */
.er-flash-pantalla { position: fixed; inset: 0; z-index: 150; pointer-events: none; background: radial-gradient(circle at 25% 35%, #fff 0, #fff8e6 40%, #f3e6c8 100%); opacity: 0; animation: er-e-pantalla .5s .12s ease-out both; }


@keyframes er-e-letra {
	0%   { opacity: 0; transform: translateY(.18em) scale(1.6); filter: blur(14px); }
	60%  { opacity: 1; filter: blur(0); }
	100% { opacity: 1; transform: none; filter: none; }
}
@keyframes er-e-brillo { 0% { background-position: 100% 0; } 30%, 100% { background-position: 0 0; } }
@keyframes er-e-flash {
	0%   { opacity: 0; transform: scale(.3) rotate(0deg); }
	18%  { opacity: 1; }
	100% { opacity: 0; transform: scale(1.15) rotate(25deg); }
}
@keyframes er-e-pantalla { 0% { opacity: 0; } 15% { opacity: .7; } 100% { opacity: 0; } }
@keyframes er-e-reflector { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: .55; } }
@keyframes er-e-linea { to { width: min(180px, 40%); } }

@media (max-width: 640px) {
	.er-flashes i { width: 110px; height: 110px; margin: -55px 0 0 -55px; }
	body.er-efecto-estrella .er-hero__nombre::after { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.er-flashes, .er-flash-pantalla, .er-destellos { display: none; }
	body.er-efecto-estrella .er-hero .er-letra { -webkit-text-fill-color: currentColor; background: none; }
}
