/* ==========================================================================
   Hero del inicio  [jys_hero]  — efecto "latido dorado"
   Texto real (no imagen): las palabras aparecen una a una, el dorado lleva
   un destello que las recorre en secuencia y la palabra destacada (*corazon*)
   late con un brillo calido. Fondo con zoom lento y chispas que suben.
   ========================================================================== */

.jys-hero {
	--jys-hero-h: 100vh;
	--jys-hero-base: #202833;      /* color del borde inferior de la foto */
	--jys-gold: 215, 163, 79;      /* dorado del theme (#d7a34f) */
	--jys-ember: 255, 138, 30;
	--jys-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--jys-sans: Montserrat, "Helvetica Neue", Arial, sans-serif;
	--jys-t0: .9s;                 /* cuando empieza a aparecer la frase */

	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--jys-hero-h);
	min-height: 560px;
	overflow: hidden;
	background: var(--jys-hero-base);
	isolation: isolate;
}

/* --- Fondo ------------------------------------------------------------- */
.jys-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -3;
}

.jys-hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 30%;
	transform-origin: 50% 35%;
	animation: jys-hero-zoom 10s cubic-bezier(.22, .61, .36, 1) both;
}

/* Sombras: arriba para el menu, abajo para fundir con la seccion siguiente */
.jys-hero__shade {
	position: absolute;
	inset: 0;
	z-index: -2;
	pointer-events: none;
	background:
		linear-gradient(to bottom, rgba(17, 22, 28, .82) 0, rgba(17, 22, 28, .35) 140px, rgba(17, 22, 28, 0) 260px),
		linear-gradient(to top, var(--jys-hero-base) 0, rgba(32, 40, 51, .55) 22%, rgba(32, 40, 51, 0) 45%),
		radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0) 45%, rgba(10, 13, 18, .45) 100%);
}

/* --- Contenido --------------------------------------------------------- */
.jys-hero__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	width: 100%;
	max-width: 1100px;
	padding: 20vh 16px 0;
	text-align: center;
}

/* Velo oscuro suave detras del texto: separa las letras de la foto */
.jys-hero__content::before {
	content: "";
	position: absolute;
	left: 50%;
	top: calc(20vh + 50%);
	z-index: -1;
	width: 120%;
	height: 90%;
	transform: translate(-50%, -55%);
	background: radial-gradient(closest-side, rgba(14, 18, 24, .62), rgba(14, 18, 24, .32) 55%, rgba(14, 18, 24, 0));
	pointer-events: none;
	animation: jys-fade 1.8s ease .6s both;
}

.jys-hero__subtitle {
	margin: 0;
	color: #fff;
	font-family: var(--jys-sans);
	font-size: clamp(13px, 1.4vw, 18px);
	font-weight: 400;
	letter-spacing: .35em;
	text-transform: uppercase;
	text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
	animation: jys-hero-subtitle 1.6s cubic-bezier(.22, .61, .36, 1) .4s both;
}

.jys-hero__link,
.jys-hero__link:hover {
	color: inherit;
	text-decoration: none;
	border: 0;
}

/* Reset del h1/h2 del theme */
.jys-hero .jys-hero__title {
	margin: 0;
	padding: 0;
	color: #fff;
	font-size: inherit;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	background: none;
	border: 0;
}

.jys-hero__line {
	display: block;
}

/* Linea de introduccion: serif cursiva, crema */
.jys-hero__line--intro {
	margin-bottom: .35em;
	color: #f6ead0;
	font-family: var(--jys-serif);
	font-size: clamp(19px, 2.5vw, 34px);
	font-style: italic;
	font-weight: 600;
	letter-spacing: .01em;
	line-height: 1.25;
}

/* Lineas grandes: sans extra-bold, dorado */
.jys-hero__line--big {
	font-family: var(--jys-sans);
	font-size: clamp(30px, 5.4vw, 78px);
	font-weight: 800;
	letter-spacing: .015em;
	line-height: 1.04;
	text-transform: uppercase;
}

/* --- Palabras ---------------------------------------------------------- */
.jys-w {
	display: inline-block;
	/* sombra que sigue la forma de las letras: legibilidad sobre la foto */
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55)) drop-shadow(0 6px 14px rgba(0, 0, 0, .45));
}

.jys-w > span {
	display: inline-block;
	padding: .04em .02em .08em;
	animation: jys-word-in .9s cubic-bezier(.22, .61, .36, 1) calc(var(--jys-t0) + var(--i) * .11s) both;
}

.jys-hero__line--intro .jys-w > span {
	text-shadow: 0 1px 1px rgba(0, 0, 0, .4);
}

/* Dorado con destello: capa 1 = banda de luz que se mueve; capa 2 = dorado vertical */
.jys-hero__line--big .jys-w > span {
	color: transparent;
	background-image:
		linear-gradient(100deg, rgba(255, 250, 235, 0) 40%, rgba(255, 250, 235, .95) 50%, rgba(255, 250, 235, 0) 60%),
		linear-gradient(180deg, #fff3d1 0%, #f5d27e 38%, #d9a649 66%, #b98232 100%);
	background-size: 300% 100%, 100% 100%;
	background-position: 150% 0, 0 0;
	background-repeat: no-repeat;
	-webkit-background-clip: text;
	        background-clip: text;
	animation:
		jys-word-in .9s cubic-bezier(.22, .61, .36, 1) calc(var(--jys-t0) + var(--i) * .11s) both,
		jys-shine 7s ease-in-out calc(var(--jys-t0) + 1.6s + var(--i) * .09s) infinite;
}

/* Palabra destacada (*corazon*): serif cursiva, mas grande, late */
.jys-hero__line--big .jys-w--accent {
	margin-left: .06em;
	animation: jys-glow 1.6s ease-in-out calc(var(--jys-t0) + 2.2s) infinite;
}

.jys-hero__line--big .jys-w--accent > span {
	padding: 0 .08em .12em .02em;
	font-family: var(--jys-serif);
	font-size: 1.22em;
	font-style: italic;
	font-weight: 700;
	letter-spacing: 0;
	line-height: .9;
	text-transform: none;
	background-image:
		linear-gradient(100deg, rgba(255, 250, 235, 0) 40%, rgba(255, 250, 235, .95) 50%, rgba(255, 250, 235, 0) 60%),
		linear-gradient(180deg, #ffe7b0 0%, #ffbf5a 45%, #e98a2a 100%);
	animation:
		jys-word-in .9s cubic-bezier(.22, .61, .36, 1) calc(var(--jys-t0) + var(--i) * .11s) both,
		jys-shine 7s ease-in-out calc(var(--jys-t0) + 1.6s + var(--i) * .09s) infinite,
		jys-beat 1.6s ease-in-out calc(var(--jys-t0) + 2.2s) infinite;
}

/* --- Chispas ----------------------------------------------------------- */
.jys-hero__sparks {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	overflow: hidden;
}

.jys-hero__sparks span {
	position: absolute;
	bottom: 8%;
	left: 50%;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: rgb(255, 205, 120);
	box-shadow: 0 0 6px 2px rgba(var(--jys-ember), .8), 0 0 14px 4px rgba(var(--jys-ember), .35);
	opacity: 0;
	animation: jys-hero-spark 7s linear infinite;
}

.jys-hero__sparks span:nth-child(1)  { left: 30%; animation-duration: 7.5s; animation-delay: 2.0s; --dx: 30px; }
.jys-hero__sparks span:nth-child(2)  { left: 36%; animation-duration: 9s;   animation-delay: 3.4s; --dx: -20px; width: 3px; height: 3px; }
.jys-hero__sparks span:nth-child(3)  { left: 41%; animation-duration: 6.5s; animation-delay: 2.6s; --dx: 40px; }
.jys-hero__sparks span:nth-child(4)  { left: 45%; animation-duration: 8s;   animation-delay: 5.1s; --dx: -35px; width: 5px; height: 5px; }
.jys-hero__sparks span:nth-child(5)  { left: 49%; animation-duration: 7s;   animation-delay: 2.2s; --dx: 15px; width: 3px; height: 3px; }
.jys-hero__sparks span:nth-child(6)  { left: 53%; animation-duration: 8.5s; animation-delay: 4.0s; --dx: -25px; }
.jys-hero__sparks span:nth-child(7)  { left: 57%; animation-duration: 6.8s; animation-delay: 3.0s; --dx: 30px; width: 2px; height: 2px; }
.jys-hero__sparks span:nth-child(8)  { left: 61%; animation-duration: 9.5s; animation-delay: 6.2s; --dx: -15px; }
.jys-hero__sparks span:nth-child(9)  { left: 65%; animation-duration: 7.2s; animation-delay: 2.8s; --dx: 25px; width: 3px; height: 3px; }
.jys-hero__sparks span:nth-child(10) { left: 70%; animation-duration: 8.2s; animation-delay: 4.6s; --dx: -30px; }
.jys-hero__sparks span:nth-child(11) { left: 33%; animation-duration: 10s;  animation-delay: 7.0s; --dx: 20px; width: 2px; height: 2px; }
.jys-hero__sparks span:nth-child(12) { left: 39%; animation-duration: 7.8s; animation-delay: 5.8s; --dx: -40px; }
.jys-hero__sparks span:nth-child(13) { left: 47%; animation-duration: 9.2s; animation-delay: 8.0s; --dx: 35px; width: 3px; height: 3px; }
.jys-hero__sparks span:nth-child(14) { left: 51%; animation-duration: 6.6s; animation-delay: 6.6s; --dx: -10px; }
.jys-hero__sparks span:nth-child(15) { left: 55%; animation-duration: 8.8s; animation-delay: 7.4s; --dx: 45px; width: 2px; height: 2px; }
.jys-hero__sparks span:nth-child(16) { left: 59%; animation-duration: 7.4s; animation-delay: 9.0s; --dx: -25px; }
.jys-hero__sparks span:nth-child(17) { left: 63%; animation-duration: 9.8s; animation-delay: 5.4s; --dx: 20px; width: 3px; height: 3px; }
.jys-hero__sparks span:nth-child(18) { left: 68%; animation-duration: 8.4s; animation-delay: 8.6s; --dx: -35px; }

/* --- Animaciones ------------------------------------------------------- */
@keyframes jys-hero-zoom {
	from { transform: scale(1.14); filter: brightness(.35); }
	30%  { filter: brightness(1); }
	to   { transform: scale(1); filter: brightness(1); }
}

@keyframes jys-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes jys-hero-subtitle {
	from { opacity: 0; transform: translateY(14px); letter-spacing: .7em; }
	to   { opacity: 1; transform: none; letter-spacing: .35em; }
}

/* Cada palabra sube desenfocada y se asienta */
@keyframes jys-word-in {
	from { opacity: 0; transform: translateY(.45em) rotateX(-40deg); filter: blur(8px); }
	to   { opacity: 1; transform: none; filter: blur(0); }
}

/* Banda de luz que cruza la palabra */
@keyframes jys-shine {
	0%, 12%   { background-position: 150% 0, 0 0; }
	32%, 100% { background-position: -50% 0, 0 0; }
}

/* Latido: doble pulso como un corazon */
@keyframes jys-beat {
	0%, 40%, 100% { transform: scale(1); }
	12%           { transform: scale(1.07); }
	24%           { transform: scale(1.02); }
	32%           { transform: scale(1.05); }
}

@keyframes jys-glow {
	0%, 40%, 100% { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55)) drop-shadow(0 0 10px rgba(var(--jys-ember), .25)); }
	12%, 32%      { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55)) drop-shadow(0 0 22px rgba(var(--jys-ember), .7)); }
}

@keyframes jys-hero-spark {
	0%   { opacity: 0; transform: translate(0, 0) scale(1); }
	10%  { opacity: 1; }
	70%  { opacity: .8; }
	100% { opacity: 0; transform: translate(var(--dx, 20px), -62vh) scale(.3); }
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 1024px) {
	.jys-hero__bg img { object-position: 55% 20%; }
}

@media (max-width: 767px) {
	.jys-hero { min-height: 520px; }
	.jys-hero__content { gap: 12px; padding-top: 34vh; }
	.jys-hero__content::before { top: calc(34vh + 50%); width: 150%; }
	.jys-hero__content { padding-left: 10px; padding-right: 10px; }
	.jys-hero__line--big { font-size: clamp(22px, 7.2vw, 44px); letter-spacing: 0; }
	.jys-hero__sparks span:nth-child(n+11) { display: none; }
	.jys-hero__sparks span { bottom: 12%; }
}

/* Accesibilidad: sin movimiento para quien lo prefiera */
@media (prefers-reduced-motion: reduce) {
	.jys-hero__bg img,
	.jys-hero__subtitle,
	.jys-hero__content::before,
	.jys-w,
	.jys-w > span,
	.jys-hero__line--big .jys-w > span,
	.jys-hero__line--big .jys-w--accent,
	.jys-hero__line--big .jys-w--accent > span { animation: none !important; }
	.jys-hero__sparks { display: none; }
}
