/* ==========================================================================
   hero.css – Homepage hero and statistics bar
   Part of the Devraj Pathak theme. Breakpoints are in responsive.css.
   ========================================================================== */

.dp-hero {
	position: relative;
	/* Space above the hero: top bar (42px) + header + a small gap below the portrait. */
	--dp-hero-offset: calc(42px + var(--dp-header-h) + 40px);
	--dp-hero-pad: clamp(28px, 4.5vh, 64px);
	padding: var(--dp-hero-pad) 0 0;
	color: var(--dp-white);
	background: var(--dp-primary) var(--dp-hero-bg) center / cover no-repeat;
	isolation: isolate;
}
.dp-hero__overlay {
	position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(100deg, rgba(21, 23, 54, .94) 0%, rgba(21, 23, 54, .82) 45%, rgba(21, 23, 54, .45) 100%),
		linear-gradient(0deg, rgba(21, 23, 54, .6), transparent 40%);
}
.dp-hero__inner {
	display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
	padding-bottom: clamp(80px, 11vh, 120px);
}
.dp-hero__title {
	font-size: clamp(48px, min(7.5vw, 11vh), 96px);
	line-height: .98; color: var(--dp-white);
	letter-spacing: -.02em; margin-bottom: 22px;
}
.dp-hero__lead { font-size: 19px; line-height: 1.7; color: rgba(255, 255, 255, .82); max-width: 600px; margin-bottom: 34px; }
.dp-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.dp-hero__companies { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.dp-hero__companies a {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 6px 16px 6px 6px; border-radius: 999px;
	background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
	color: var(--dp-white); font-size: 13.5px; font-weight: 600;
	transition: background .2s;
}
.dp-hero__companies a:hover { background: rgba(255, 255, 255, .18); color: var(--dp-white); }
.dp-hero__companies img { width: 32px; height: 32px; border-radius: 50%; object-fit: contain; background: var(--dp-surface); padding: 2px; }

/* The portrait scales with the screen height so the whole hero fits on one screen. */
.dp-hero__portrait {
	position: relative; margin: 0; justify-self: end; width: 100%;
	max-width: clamp(280px, calc((100vh - var(--dp-hero-offset) - var(--dp-hero-pad)) * .75), 440px);
}
.admin-bar .dp-hero { --dp-hero-offset: calc(74px + var(--dp-header-h) + 40px); }
.dp-hero__portrait::before {
	content: ""; position: absolute; inset: -16px 16px 16px -16px;
	border: 1.5px solid var(--dp-accent); border-radius: 220px 220px var(--dp-radius) var(--dp-radius);
}
.dp-hero__portrait img {
	position: relative;
	width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%;
	border-radius: 220px 220px var(--dp-radius) var(--dp-radius);
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
}
.dp-hero__badge {
	position: absolute; left: -34px; bottom: 40px;
	display: flex; align-items: center; gap: 12px;
	padding: 14px 18px; border-radius: 14px;
	background: var(--dp-surface); color: var(--dp-text);
	font-size: 13.5px; line-height: 1.35; max-width: 230px;
	box-shadow: var(--dp-shadow);
}
.dp-hero__badge .dp-icon { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--dp-sand); color: var(--dp-accent); }
.dp-hero__badge strong { display: block; font-size: 17px; color: var(--dp-ink); }

.dp-stats {
	display: grid; grid-template-columns: repeat(4, 1fr);
	margin: 0; transform: translateY(50%);
	background: var(--dp-surface); color: var(--dp-text);
	border-radius: var(--dp-radius); box-shadow: var(--dp-shadow);
	position: relative; z-index: 2;
}
.dp-stats > div { padding: 30px 24px; text-align: center; border-left: 1px solid var(--dp-line); }
.dp-stats > div:first-child { border-left: 0; }
.dp-stats dt { font-family: var(--dp-font-head); font-size: 44px; font-weight: 700; line-height: 1; color: var(--dp-primary); }
.dp-stats dd { margin: 8px 0 0; font-size: 14px; color: var(--dp-muted); }

/* ---------- Video hero: background video, mist, floating light, entrance ---------- */
.dp-hero--video { background: var(--dp-primary) var(--dp-hero-bg) center / cover no-repeat; overflow: hidden; }
.dp-hero__videos { position: absolute; inset: 0; z-index: -3; overflow: hidden; pointer-events: none; }
.dp-hero__video {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: cover; object-position: 50% 40%;
	opacity: 0; transform: scale(1.06); transition: opacity .9s ease, transform 2.8s ease;
}
.dp-hero__video.is-active { opacity: 1; transform: scale(1); }
.dp-hero--video .dp-hero__overlay {
	z-index: -2;
	background:
		linear-gradient(100deg, rgba(21, 23, 54, .92) 0%, rgba(21, 23, 54, .74) 42%, rgba(21, 23, 54, .28) 100%),
		linear-gradient(0deg, rgba(21, 23, 54, .75), transparent 45%);
}

/* Two soft mist bands drifting across the mountains */
.dp-hero__mist { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.dp-hero__mist span {
	position: absolute; left: -50%; width: 200%; height: 38%; opacity: .5;
	background:
		radial-gradient(ellipse 18% 55% at 10% 50%, rgba(255, 255, 255, .20), transparent 70%),
		radial-gradient(ellipse 22% 60% at 35% 55%, rgba(255, 255, 255, .16), transparent 70%),
		radial-gradient(ellipse 16% 50% at 60% 45%, rgba(255, 255, 255, .18), transparent 70%),
		radial-gradient(ellipse 20% 55% at 85% 55%, rgba(255, 255, 255, .15), transparent 70%);
	filter: blur(8px);
	animation: dp-mist 60s linear infinite;
}
.dp-hero__mist span:first-child { bottom: 14%; }
.dp-hero__mist span:last-child { bottom: 34%; height: 26%; opacity: .32; animation-duration: 90s; animation-direction: reverse; }
@keyframes dp-mist { from { transform: translateX(0); } to { transform: translateX(25%); } }

/* Floating specks of light (like dust in the morning sun) */
.dp-hero__light { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dp-hero__light i {
	position: absolute; bottom: -10px; width: 5px; height: 5px; border-radius: 50%;
	background: rgba(255, 223, 170, .85); box-shadow: 0 0 10px 2px rgba(242, 184, 97, .55);
	opacity: 0; animation: dp-float-up 14s linear infinite;
}
.dp-hero__light i:nth-child(1) { left: 6%; animation-delay: 0s; }
.dp-hero__light i:nth-child(2) { left: 14%; animation-delay: 5s; width: 3px; height: 3px; }
.dp-hero__light i:nth-child(3) { left: 22%; animation-delay: 9s; }
.dp-hero__light i:nth-child(4) { left: 31%; animation-delay: 2s; width: 4px; height: 4px; }
.dp-hero__light i:nth-child(5) { left: 39%; animation-delay: 11s; width: 3px; height: 3px; }
.dp-hero__light i:nth-child(6) { left: 47%; animation-delay: 7s; }
.dp-hero__light i:nth-child(7) { left: 55%; animation-delay: 3s; width: 3px; height: 3px; }
.dp-hero__light i:nth-child(8) { left: 62%; animation-delay: 12s; width: 4px; height: 4px; }
.dp-hero__light i:nth-child(9) { left: 70%; animation-delay: 6s; }
.dp-hero__light i:nth-child(10) { left: 77%; animation-delay: 1s; width: 3px; height: 3px; }
.dp-hero__light i:nth-child(11) { left: 84%; animation-delay: 10s; }
.dp-hero__light i:nth-child(12) { left: 90%; animation-delay: 4s; width: 4px; height: 4px; }
.dp-hero__light i:nth-child(13) { left: 95%; animation-delay: 8s; width: 3px; height: 3px; }
.dp-hero__light i:nth-child(14) { left: 51%; animation-delay: 13s; width: 3px; height: 3px; }
@keyframes dp-float-up {
	0% { transform: translate(0, 0); opacity: 0; }
	10% { opacity: .9; }
	50% { transform: translate(18px, -45vh); }
	90% { opacity: .6; }
	100% { transform: translate(-10px, -90vh); opacity: 0; }
}

/* Pause / play button (bottom right) */
.dp-hero__toggle {
	position: absolute; left: 22px; bottom: 22px; z-index: 3;
	display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .35); background: rgba(21, 23, 54, .45); color: #fff; cursor: pointer;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .25s;
}
.dp-hero__toggle:hover { background: rgba(21, 23, 54, .75); }
.dp-hero__toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dp-hero__toggle::before { /* pause icon */
	content: ""; width: 12px; height: 14px; border-left: 4px solid #fff; border-right: 4px solid #fff; box-sizing: border-box;
}
.dp-hero__toggle.is-paused::before { /* play icon */
	width: 0; height: 0; border: 0; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px;
}
.dp-hero__toggle .dp-hero__toggle-play { display: none; }
.dp-hero__toggle.is-paused .dp-hero__toggle-play { display: block; }
.dp-hero__toggle.is-paused .dp-hero__toggle-pause { display: none; }

/* Entrance: text lines rise in one after another; portrait floats gently */
.dp-hero--video .dp-hero__content > * { animation: dp-hero-rise .9s var(--dp-ease) both; }
.dp-hero--video .dp-hero__content > :nth-child(1) { animation-delay: .15s; }
.dp-hero--video .dp-hero__content > :nth-child(2) { animation-delay: .3s; }
.dp-hero--video .dp-hero__content > :nth-child(3) { animation-delay: .45s; }
.dp-hero--video .dp-hero__content > :nth-child(4) { animation-delay: .6s; }
.dp-hero--video .dp-hero__content > :nth-child(5) { animation-delay: .75s; }
@keyframes dp-hero-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.dp-hero--video .dp-hero__portrait img { animation: dp-portrait-float 7s ease-in-out infinite; }
.dp-hero--video .dp-hero__portrait::before { animation: dp-arch-glow 5s ease-in-out infinite; }
@keyframes dp-portrait-float { 50% { transform: translateY(-10px); } }
@keyframes dp-arch-glow { 50% { box-shadow: 0 0 34px -4px rgba(242, 184, 97, .55); border-color: var(--dp-accent-2); } }
.dp-hero--video .dp-hero__badge { animation: dp-hero-rise .9s .9s var(--dp-ease) both; }
.dp-hero--video .dp-hero__companies a { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

@media (max-width: 860px) {
	.dp-hero__video { object-position: 40% 30%; }
	.dp-hero--video .dp-hero__overlay { background: linear-gradient(180deg, rgba(21, 23, 54, .55), rgba(21, 23, 54, .9) 55%); }
	.dp-hero__toggle { left: auto; right: 14px; bottom: auto; top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.dp-hero__mist span,
	.dp-hero__light i,
	.dp-hero--video .dp-hero__content > *,
	.dp-hero--video .dp-hero__portrait img,
	.dp-hero--video .dp-hero__portrait::before,
	.dp-hero--video .dp-hero__badge { animation: none; }
	.dp-hero__light { display: none; }
}

/* Short laptop screens: tighter spacing so text and buttons fit beside the portrait. */
@media (min-width: 861px) and (max-height: 820px) {
	.dp-hero__title { margin-bottom: 16px; }
	.dp-hero__lead { font-size: 17px; line-height: 1.65; margin-bottom: 26px; }
	.dp-hero__actions { margin-bottom: 28px; }
	.dp-hero .dp-eyebrow { margin-bottom: 10px; }
}
