/**
 * Pure Haven IT — Hero split layout (two-column + cinematic hero video).
 */

/* ==========================================================================
   Cinematic hero shell
   ========================================================================== */
.ph-hero--cinematic {
	position: relative;
	min-height: min(78vh, 820px);
	display: flex;
	align-items: center;
	padding: clamp(1.5rem, 3vw, 2.25rem) 0;
	background:
		radial-gradient(circle at 12% 25%, rgba(0, 102, 255, 0.22) 0%, transparent 48%),
		radial-gradient(circle at 88% 75%, rgba(0, 180, 166, 0.1) 0%, transparent 42%),
		linear-gradient(155deg, #061020 0%, #0D1B3E 42%, #1A2F5C 100%);
	overflow: hidden;
}

/* Override generic band padding on homepage hero */
.ph-hero.ph-band.ph-hero--cinematic {
	padding-block: clamp(1.5rem, 3vw, 2.25rem);
}

.ph-hero__ambient {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(rgba(0, 102, 255, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 102, 255, 0.04) 1px, transparent 1px);
	background-size: 64px 64px;
	opacity: 0.4;
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 85%);
}

/* Original split alignment — text left, media right */
.ph-hero__grid,
.ph-hero--has-video .ph-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
	gap: clamp(1.75rem, 3.5vw, 2.5rem);
	align-items: center;
	width: 100%;
	position: relative;
	z-index: 2;
}

.ph-hero--has-video .ph-hero__grid {
	align-items: stretch;
	min-height: clamp(420px, 58vh, 640px);
}

.ph-hero--has-video .ph-hero__content {
	align-self: center;
}

/* Left column */
.ph-hero__content {
	max-width: 620px;
}

.ph-hero--cinematic .ph-eyebrow:not(.ph-section-label) {
	color: #66a3ff !important;
	font-size: 11px !important;
	letter-spacing: 0.14em !important;
	margin-bottom: var(--ph-space-sm) !important;
}

.ph-hero--cinematic .ph-hero__title {
	font-family: 'Montserrat', var(--ph-font-heading), sans-serif;
	font-size: clamp(2.125rem, 4.6vw, 3.25rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1.06;
	color: #FFFFFF;
	margin: 0 0 var(--ph-space-md);
}

.ph-hero--cinematic .ph-hero__subtitle {
	font-family: 'Inter', var(--ph-font-body), sans-serif;
	font-size: clamp(1rem, 1.55vw, 1.125rem);
	line-height: 1.72;
	color: rgba(255, 255, 255, 0.9);
	margin: 0 0 var(--ph-space-md);
	max-width: 560px;
}

/* Trust badges — high contrast, premium */
.ph-hero__trust-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
	margin-bottom: var(--ph-space-lg);
}

/* Trust badges — white text, premium blue chips */
body.ph-body .ph-hero--cinematic .ph-hero__trust-item {
	display: inline-flex;
	align-items: center;
	padding: 8px 15px;
	border-radius: var(--ph-radius-pill);
	font-family: var(--ph-font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #FFFFFF !important;
	-webkit-text-fill-color: #FFFFFF;
	background: linear-gradient(135deg, #0066FF 0%, #0D1B3E 100%);
	border: 1px solid rgba(102, 163, 255, 0.55);
	box-shadow:
		0 4px 18px rgba(0, 102, 255, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.24);
	backdrop-filter: blur(8px);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.ph-body .ph-hero--cinematic .ph-hero__trust-item:hover {
	color: #FFFFFF !important;
	-webkit-text-fill-color: #FFFFFF;
	transform: translateY(-2px);
	border-color: rgba(140, 190, 255, 0.75);
	box-shadow:
		0 8px 24px rgba(0, 102, 255, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.ph-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ph-space-md);
	margin-bottom: var(--ph-space-sm);
}

.ph-hero--cinematic .ph-btn--hero-primary {
	box-shadow: 0 8px 28px -4px rgba(0, 102, 255, 0.55);
}

.ph-hero--cinematic .ph-btn--hero-secondary {
	border-color: rgba(255, 255, 255, 0.5);
	color: #FFFFFF;
}

.ph-hero--cinematic .ph-btn--hero-secondary:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.75);
	color: #FFFFFF;
}

.ph-hero__micro {
	font-family: var(--ph-font-body);
	font-size: 0.875rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.7);
	margin: 0;
	max-width: 520px;
}

.ph-hero--cinematic .ph-hero__micro {
	margin: 0;
}

.ph-hero--cinematic .ph-heading-anim::after {
	width: 88px;
	height: 4px;
	margin-top: 12px;
	background: linear-gradient(90deg, #0066FF 0%, #0066FF 60%, #00B4A6 100%);
}

/* Hero load animation */
@keyframes ph-hero-fade-up {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ph-hero__content--animate {
	animation: ph-hero-fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ph-hero__actions--animate {
	animation: ph-hero-fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* ==========================================================================
   Right column — large cinematic hero video
   ========================================================================== */
.ph-hero__video-panel {
	position: relative;
	width: 100%;
	max-width: none;
	margin: 0;
	align-self: stretch;
	justify-self: stretch;
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	min-height: clamp(400px, 58vh, 620px);
}

.ph-hero__video-glow {
	position: absolute;
	inset: -5% -4%;
	background:
		radial-gradient(circle at 45% 50%, rgba(0, 102, 255, 0.5) 0%, transparent 60%),
		radial-gradient(circle at 75% 25%, rgba(0, 180, 166, 0.25) 0%, transparent 46%);
	filter: blur(24px);
	z-index: 0;
	animation: ph-hero-glow-pulse 8s ease-in-out infinite alternate;
}

@keyframes ph-hero-glow-pulse {
	from { opacity: 0.7; transform: scale(1); }
	to { opacity: 1; transform: scale(1.04); }
}

.ph-hero__video-frame {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: clamp(400px, 58vh, 620px);
	aspect-ratio: auto;
	padding: 1px;
	border-radius: calc(var(--ph-radius-xl) + 1px);
	background: linear-gradient(135deg, #0066FF 0%, rgba(0, 180, 166, 0.55) 50%, rgba(255, 255, 255, 0.35) 100%);
	box-shadow:
		0 32px 80px -20px rgba(0, 102, 255, 0.55),
		0 16px 40px -14px rgba(0, 0, 0, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(4px);
	overflow: hidden;
	transform: perspective(1200px) rotateY(-1.5deg);
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s ease;
}

.ph-hero__video-panel:hover .ph-hero__video-frame {
	transform: perspective(1200px) rotateY(0deg);
	box-shadow:
		0 40px 96px -24px rgba(0, 102, 255, 0.6),
		0 20px 48px -16px rgba(0, 0, 0, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.ph-hero__video,
.ph-hero__video-fallback {
	display: block;
	width: 100%;
	height: 100%;
	min-height: clamp(400px, 58vh, 620px);
	aspect-ratio: auto;
	object-fit: cover;
	object-position: center center;
	border-radius: var(--ph-radius-xl);
	background: #061020;
}

/* Image fallback panel (when no video file) */
.ph-hero__image-panel {
	position: relative;
	width: 100%;
	max-width: none;
	align-self: stretch;
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	min-height: clamp(400px, 58vh, 620px);
}

.ph-hero__image-glow {
	position: absolute;
	inset: -8%;
	background:
		radial-gradient(circle at 50% 50%, rgba(0, 102, 255, 0.5) 0%, transparent 58%),
		radial-gradient(circle at 70% 30%, rgba(0, 180, 166, 0.2) 0%, transparent 50%);
	filter: blur(28px);
	z-index: 0;
}

.ph-hero__image-frame {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: clamp(400px, 58vh, 620px);
	aspect-ratio: auto;
	padding: 2px;
	border-radius: calc(var(--ph-radius-xl) + 2px);
	background: linear-gradient(135deg, #0066FF 0%, rgba(0, 180, 166, 0.55) 50%, rgba(255, 255, 255, 0.35) 100%);
	box-shadow: 0 32px 80px -20px rgba(0, 102, 255, 0.55);
	overflow: hidden;
}

.ph-hero__image-frame .site-image,
.ph-hero__image {
	border-radius: var(--ph-radius-xl);
	box-shadow: none;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Desktop — bleed video to right edge, align text with site container */
@media (min-width: 1025px) {
	.ph-hero--has-video .ph-container.ph-hero__grid {
		--hero-edge-pad: clamp(0.75rem, 1.25vw, 1.25rem);
		max-width: none;
		width: 100%;
		margin-inline: 0;
		padding-left: max(
			var(--ph-container-padding, clamp(1rem, 4vw, 2rem)),
			calc((100vw - var(--ph-container-max, 1280px)) / 2 + var(--ph-container-padding, clamp(1rem, 4vw, 2rem)))
		);
		padding-right: var(--hero-edge-pad);
		grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
		gap: clamp(1.25rem, 2.2vw, 2rem);
	}

	.ph-hero--has-video .ph-hero__content {
		max-width: 540px;
	}

	.ph-hero--has-video .ph-hero__video-panel,
	.ph-hero--has-video .ph-hero__image-panel {
		min-height: clamp(460px, 64vh, 680px);
	}

	.ph-hero--has-video .ph-hero__video-frame,
	.ph-hero--has-video .ph-hero__image-frame {
		min-height: clamp(460px, 64vh, 680px);
		transform: none;
	}

	.ph-hero--has-video .ph-hero__video-panel:hover .ph-hero__video-frame {
		transform: none;
	}

	.ph-hero--has-video .ph-hero__video,
	.ph-hero--has-video .ph-hero__video-fallback {
		min-height: clamp(460px, 64vh, 680px);
	}
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
	.ph-hero__grid,
	.ph-hero--has-video .ph-hero__grid {
		grid-template-columns: 1fr;
		gap: var(--ph-space-2xl);
	}

	.ph-hero__content {
		max-width: 100%;
	}

	.ph-hero__video-panel,
	.ph-hero__image-panel {
		max-width: 100%;
		min-height: auto;
	}

	.ph-hero__video-frame,
	.ph-hero__image-frame {
		transform: none;
		min-height: clamp(280px, 52vw, 420px);
	}

	.ph-hero__video,
	.ph-hero__video-fallback {
		min-height: clamp(280px, 52vw, 420px);
	}
}

@media (max-width: 768px) {
	.ph-hero--cinematic {
		min-height: auto;
		padding: var(--ph-space-xl) 0;
	}

	.ph-hero.ph-band.ph-hero--cinematic {
		padding-block: var(--ph-space-xl);
	}

	.ph-hero__actions {
		flex-direction: column;
	}

	.ph-hero__actions .ph-btn {
		width: 100%;
		justify-content: center;
	}

	.ph-hero__trust-item {
		font-size: 11px;
		padding: 8px 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ph-hero__video-glow,
	.ph-hero__image-glow {
		animation: none;
	}

	.ph-hero__content--animate,
	.ph-hero__actions--animate {
		animation: none;
	}

	.ph-hero__video-frame,
	.ph-hero__image-frame {
		transform: none;
	}
}
