/* ==========================================================================
   Hero Video Block
   ========================================================================== */

.pillar-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--pillar-hero-min-height, 100vh);
	overflow: hidden;
	color: var(--pillar-white, #fff);
}

.pillar-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.pillar-hero__video,
.pillar-hero__poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pillar-hero__poster {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.pillar-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.15) 0%,
		rgba(0, 0, 0, 0.35) 45%,
		rgba(0, 0, 0, 0.55) 100%
	);
}

.pillar-hero__content {
	position: relative;
	z-index: 1;
	width: 100%;
	padding: calc(var(--pillar-header-height, 72px) + 2rem) 1.5rem 3rem;
}

.pillar-hero__inner {
	max-width: 900px;
	margin: 0 auto;
	text-align: center;
}

.pillar-hero__headline {
	margin: 0 0 1rem;
	font-size: clamp(1.75rem, 4.5vw, 3rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
	opacity: 0;
	animation: pillar-hero-fade-down 0.95s ease forwards;
	animation-delay: 0.25s;
}

.pillar-hero__subheadline {
	margin: 0 0 0.65rem;
	font-size: clamp(1rem, 2.5vw, 1.35rem);
	font-weight: 400;
	line-height: 1.4;
	text-wrap: balance;
	opacity: 0;
	animation: pillar-hero-fade-down-soft 0.95s ease forwards;
	animation-delay: 0.55s;
}

.pillar-hero__accent {
	display: block;
	width: 140px;
	height: 1px;
	margin: 0 auto;
	background: var(--pillar-yellow, #ffa800);
	border-radius: 1px;
	opacity: 0;
	transform-origin: center;
	animation:
		pillar-hero-accent-in 0.7s ease 1.05s forwards,
		pillar-hero-accent-pulse 2.8s ease-in-out 1.85s infinite;
}

@keyframes pillar-hero-fade-down {
	from {
		opacity: 0;
		transform: translateY(-1.5rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes pillar-hero-fade-down-soft {
	from {
		opacity: 0;
		transform: translateY(-1.25rem);
	}
	to {
		opacity: 0.95;
		transform: translateY(0);
	}
}

@keyframes pillar-hero-accent-in {
	from {
		opacity: 0;
		transform: translateY(-0.6rem) scaleX(0.45);
	}
	to {
		opacity: 1;
		transform: translateY(0) scaleX(1);
	}
}

@keyframes pillar-hero-accent-pulse {
	0%,
	100% {
		transform: scaleX(0.72);
		opacity: 0.75;
	}
	50% {
		transform: scaleX(1);
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pillar-hero__headline,
	.pillar-hero__subheadline,
	.pillar-hero__accent {
		opacity: 1;
		transform: none;
		animation: none;
	}

	.pillar-hero__subheadline {
		opacity: 0.95;
	}
}

.editor-styles-wrapper .pillar-hero__headline,
.editor-styles-wrapper .pillar-hero__subheadline,
.editor-styles-wrapper .pillar-hero__accent {
	opacity: 1;
	transform: none;
	animation: none;
}

.editor-styles-wrapper .pillar-hero__subheadline {
	opacity: 0.95;
}

/* Editor preview empty state */
.pillar-hero--preview-empty {
	background: #1a1a1a;
}

.pillar-hero--preview-empty .pillar-hero__overlay {
	background: rgba(0, 0, 0, 0.3);
}

.pillar-hero--preview-empty::after {
	content: "Upload a background video in block settings →";
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.875rem;
	opacity: 0.5;
	z-index: 2;
}

/* Full-width in block editor */
.wp-block-acf-hero-video {
	margin: 0;
	max-width: none;
}

.editor-styles-wrapper .pillar-hero {
	min-height: 60vh;
}
