/* Plugin TWFS (Claude) — capa de movimiento para theweddingfilmstudio.com
   Todo cuelga de clases añadidas por el plugin: sin él, el tema queda intacto. */

:root {
	--twfs-ease: cubic-bezier(.22, .61, .12, 1);
	--twfs-soft: cubic-bezier(.4, 0, .2, 1);
}

/* ---------------------------------------------------------------------
   Ocultación previa (solo mientras arranca el JS; el script de cabecera
   la retira a los 3 s si algo falla)
   ------------------------------------------------------------------ */
html.twfs-js.twfs-f-reveal :is(
	#page_title page-title > *,
	main section-title > *,
	main button-container,
	#the_studio_section image-container,
	#contact_map_section image-container,
	#contact_map_section b-map,
	#services_section images-grid-container image-container,
	.projects-list .project-item,
	#testimonials_section text-container,
	ul.contact-links > li,
	main contact-form,
	#content_section text-container > *,
	.services-list video-container,
	.services-list image-container,
	.services-list text-container
):not(.twfs-in) {
	opacity: 0;
}

html.twfs-js.twfs-f-claim #claim_section h1:not(.twfs-claim) {
	opacity: 0;
}

/* ---------------------------------------------------------------------
   Apariciones
   ------------------------------------------------------------------ */
.twfs-r {
	transition:
		opacity 1.1s var(--twfs-soft) var(--twfs-d, 0ms),
		transform 1.4s var(--twfs-ease) var(--twfs-d, 0ms);
}
.twfs-r.twfs-up:not(.twfs-in) {
	transform: translate3d(0, 10px, 0);
}

/* Fotos y vídeos: se descubren desde dentro de su marco */
.twfs-r.twfs-unveil {
	transition:
		opacity 1s var(--twfs-soft) var(--twfs-d, 0ms),
		clip-path 1.4s var(--twfs-ease) var(--twfs-d, 0ms);
	clip-path: inset(0 round var(--twfs-rad, 24px));
}
.twfs-r.twfs-unveil:not(.twfs-in) {
	clip-path: inset(2.5% 2.5% 2.5% 2.5% round var(--twfs-rad, 24px));
}
.twfs-r.twfs-unveil img {
	transition: scale 1.6s var(--twfs-ease) var(--twfs-d, 0ms);
}
.twfs-r.twfs-unveil:not(.twfs-in) img {
	scale: 1.04;
}

/* ---------------------------------------------------------------------
   Claim: cambio de foco palabra a palabra + línea fina
   ------------------------------------------------------------------ */
.twfs-claim {
	position: relative;
}
.twfs-claim .twfs-w {
	display: inline-block;
	transition:
		opacity 1.3s var(--twfs-soft),
		filter 1.7s var(--twfs-ease),
		transform 1.8s var(--twfs-ease);
	transition-delay: calc(var(--i, 0) * 110ms + 100ms);
	will-change: opacity, filter, transform;
}
.twfs-claim:not(.twfs-claim-in) .twfs-w {
	opacity: 0;
	filter: blur(14px);
	transform: translate3d(0, .3em, 0);
}
.twfs-claim.twfs-claim-done .twfs-w {
	will-change: auto;
}
/* ---------------------------------------------------------------------
   Cabecera
   ------------------------------------------------------------------ */
html.twfs-js.twfs-f-hero #hero_section video-container > iframe {
	opacity: 0;
	transition: opacity 1.8s var(--twfs-soft);
}
html.twfs-js.twfs-f-hero #hero_section video-container > iframe.twfs-vis {
	opacity: 1;
}

.twfs-cue {
	position: absolute;
	left: 50%;
	bottom: 22px;
	z-index: 3;
	display: flex;
	justify-content: center;
	width: 44px;
	height: 76px;
	margin-left: -22px;
	opacity: 0;
	transition: opacity 1.2s var(--twfs-soft);
	-webkit-tap-highlight-color: transparent;
}
.twfs-cue.twfs-on {
	opacity: 1;
}
.twfs-cue.twfs-on.twfs-gone {
	opacity: 0;
	pointer-events: none;
}
.twfs-cue span {
	position: relative;
	display: block;
	width: 1px;
	height: 64px;
	overflow: hidden;
	background: rgba(245, 245, 235, .28);
}
.twfs-cue span::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: 40%;
	background: rgba(245, 245, 235, .95);
	animation: twfs-cue 2.6s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes twfs-cue {
	0%   { transform: translateY(-100%); }
	100% { transform: translateY(260%); }
}

/* ---------------------------------------------------------------------
   Profundidad (parallax muy suave dentro del marco)
   ------------------------------------------------------------------ */
.twfs-px {
	overflow: hidden;
	border-radius: var(--twfs-rad, 24px);
}
.twfs-px img {
	scale: 1.03;
}

/* ---------------------------------------------------------------------
   Clips de Vimeo (Servicios y previsualizaciones)
   ------------------------------------------------------------------ */
.twfs-box {
	position: relative;
	overflow: hidden;
	border-radius: var(--twfs-rad, 24px);
}
.twfs-clip {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: inherit;
	opacity: 0;
	pointer-events: none;
	transition: opacity 1.3s var(--twfs-soft);
}
.twfs-clip.twfs-on {
	opacity: 1;
}
.twfs-clip.twfs-pv {
	transition-duration: .7s;
}
.twfs-clip.twfs-st {
	transition-duration: 1.6s;
}
html.twfs-f-cuts .twfs-clip.twfs-sv,
html.twfs-f-cuts .twfs-clip.twfs-st {
	transition: none;
}
.twfs-clip iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	max-width: none;
	border: 0;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

/* Vídeos de la página Servicios: fondo cálido mientras cargan y fundido */
html.twfs-f-videos .services-list video-container {
	background-color: var(--clr-background-placeholder, #e1daca);
}
html.twfs-js.twfs-f-videos .services-list video-container > iframe {
	opacity: 0;
	transition: opacity 1.4s var(--twfs-soft);
}
html.twfs-js.twfs-f-videos .services-list video-container > iframe.twfs-vis {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.twfs-r, .twfs-claim .twfs-w, .twfs-clip { transition: none !important; }
	.twfs-cue { display: none; }
}

/* Cabecera con mix: el vídeo del tema queda oculto y en pausa */
#hero_section video-container iframe.twfs-hidden {
	visibility: hidden !important;
}
html.twfs-f-cuts .twfs-clip.twfs-hx,
.twfs-clip.twfs-hx {
	transition: none;
}
