/*
 * Homepage hero styles.
 *
 * Ported from the compiled live CSS (index-CTd4ANgl.css, the ._*_1rcms_*
 * home module classes) into plain class names that match front-page.php.
 * Kept in a separate file and enqueued only on the front page, so the hero
 * chrome and blob rules do not load on inner pages. The clientele carousel
 * and featured section rules are added here in later Chat 4 steps.
 *
 * All lengths use rem, so the base font-size steps (21px at 1550px+, 16px at
 * 1240px and below, from main.css) scale the chrome and top bar as on live.
 *
 * DISCREPANCY (reported, not silently resolved): the compiled CSS serves
 * .homeVideo as `height: auto !important; max-height: 100vh` with no
 * `overflow` property. The height auto part collapses a wrap whose only in-flow
 * child is the zero-sized intro layer, which would leave the pinned hero with
 * no height and starve useCoverDimensions of a container to measure, so this
 * file keeps the fullscreen `height: 100vh` from the module source and the
 * build spec. The overflow, however, is now matched to compiled live: no
 * overflow property (effectively visible), so the growing blob is not clipped
 * to the wrap, exactly as served. See the report for the raw compiled rule.
 */

.siteLogo {
	position: fixed;
	left: 6vw;
	top: 0.75rem;
	z-index: 5;
	width: 6rem;
	height: auto;
	z-index: 99;
}

.siteText {
	position: fixed;
	right: 6vw;
	top: 0.9rem;
	z-index: 5;
	z-index: 99;
}

.siteText h5 {
	font-size: 0.95rem;
}

.siteLogo_bg {
	z-index: 90;
	background: var(--secondaryColor);
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	height: 3.1rem;
	transform: translateY(-100%);
}

.homeVideo {
	background-color: white;
	background-size: cover;
	background-position: center center;
	max-width: 100vw !important;
	width: 100% !important;
	height: 100vh;
}

/*
 * Hero cover-fit clip box. The background iframe is sized to cover the viewport,
 * so one axis overflows; this wrapper clips that overflow the way live's
 * .videowrapper does, without clipping .homeVideo itself (the pinned element) or
 * the blob. It fills .homeVideo (which is position:relative via the base rule and
 * 100vh tall), holds only the iframe, and sits behind the intro and blob.
 */
.videowrapper {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

/*
 * Image-mode hero media. Cover-fits the chosen image into the clip box exactly
 * like the video, so it fills the viewport and one axis overflows (clipped by
 * .videowrapper). home.js scales it to 1.5 on the pin (from the centre), matching
 * the video hero animation.
 */
.heroImage {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform-origin: center center;
}

.introWrap {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0;
	height: 0;
}

.introWrap > svg {
	position: absolute;
	left: 0;
	top: 0;
	transform: translate(-50%, -50%) scale(0);
	width: 250vw;
	aspect-ratio: 1;
}

.introWrap > svg path {
	fill: var(--secondaryColor);
	stroke: none;
}

.introText {
	color: white;
	font-family: "Kanit", sans-serif;
	position: absolute;
	left: 0;
	top: 0;
	transform: translate(-50%, -50%);
	width: 720px;
	font-size: 2rem;
	line-height: 1.2;
	font-weight: 600;
}

.introText span {
	display: inline-block;
	opacity: 0;
}

@media ( min-width: 1550px ) {
	/*
	 * Compiled live CSS aligns only the logo to the 1550px content edge at
	 * this breakpoint. The module source also shifted .siteText with a
	 * matching right:calc, but the served CSS does not, so the tagline stays
	 * at right:6vw. Compiled wins over the code.zip source. See the report.
	 */
	.siteLogo {
		left: calc( ( 100vw - 1550px ) / 2 );
	}
	.introText {
		width: 850px;
	}
}

@media ( max-width: 1200px ) {
	.siteText {
		right: auto;
		left: 6vw;
		top: 2.9rem;
	}
	.siteLogo_bg {
		height: 5.4rem;
	}
}

@media ( max-width: 767px ) {
	.introText {
		width: 100vw;
		padding-inline: 6vw !important;
	}
	.introText span {
		display: inline;
	}
}

@media ( max-width: 700px ) {
	.introText {
		font-size: 1.5rem;
		line-height: 1.2;
	}
}

/* Clientele carousel. Ported from the compiled CSS (_clientele_wrap): a full
   width dark strip, logos capped at 3.5rem tall and contained. The w-100 and
   py-4 Bootstrap classes on the wrap supply the width and vertical padding. */
.clientele_wrap {
	padding-inline: 0;
	background: #474748;
}

.clientele_wrap img {
	height: 3.5rem;
	object-fit: contain;
	object-position: center center;
}

/* Featured section. Ported from the compiled CSS (_featuredSection and
   _featuredWrap). The heading is absolutely positioned inside the wrap: the
   base rule (* { position: relative; z-index: 1 }) in main.css makes the wrap
   its positioning context, so no explicit position on the wrap is needed. The
   video is a plain full width 16/9 embed, not cover fit. */
.featuredSection {
	padding: 0px 6vw 6rem;
	background: #fff;
}

.featuredWrap {
	padding: 9rem 6vw 5rem;
	background: var(--secondaryColor);
	max-width: 1550px;
	margin: 0 auto;
}

.featuredWrap iframe {
	width: 100%;
	aspect-ratio: 16/9;
}

.featuredWrap h3 {
	font-size: 4rem;
	z-index: 3;
	position: absolute;
	top: 4.2rem;
	left: 50%;
	transform: translate(-50%);
	line-height: 1.1;
	font-weight: 600;
}

.featuredWrap p {
	font-size: 0.9rem;
	padding-inline: 15%;
}

.featuredWrap p a {
	display: inline-block;
}

.featuredWrap p a::after {
	bottom: -4px;
	left: 0;
	right: 0;
	position: absolute;
	content: '';
	border-bottom: 1px solid white;
}

@media ( max-width: 700px ) {
	.featuredWrap {
		padding: 4rem 1rem;
	}
	.featuredWrap h3 {
		font-size: 2.35rem;
		position: static;
		transform: none;
		padding-bottom: 2rem;
	}
	.featuredWrap p {
		padding-inline: 0;
	}
}
