/* ==========================================================================
   OCEES - Hero banner
   --------------------------------------------------------------------------
   Reference: otecorporation-ocees/app/globals.css
              .hero .hero-image .hero-video .hero-overlay .hero-content
              .hero-lower .round-link .depth-scale
              and app/page.tsx  <section className="hero">

   Elementor: Home page, first container - "Hero"

   Structure:
     section.ocees-hero.e-con                      <- video + poster, overlay
       |- (Elementor background video container)   <- z-index 0
       |- ::after                                  <- z-index 1, gradients
       |- div.ocees-hero__content.e-con            <- z-index 2
       |    |- .ocees-hero__kicker    Heading (p)
       |    |- .ocees-hero__title     Heading (h1)
       |    `- .ocees-hero__lower.e-con
       |         |- .ocees-hero__lead   Text Editor
       |         `- .ocees-hero__scroll Icon (arrow-down.svg, links #platform)
       `- .ocees-hero__depth                       <- z-index 3, depth ruler

   The z-index ladder is the React build's, kept explicit here because
   Elementor's background video is an absolutely positioned sibling of the
   content and would otherwise paint over it.
   ========================================================================== */

:root {
	--ocees-hero-pad-inline: clamp(22px, 5.5vw, 92px);
	--ocees-hero-pad-top: 156px;
	--ocees-hero-pad-top-sm: 120px;
	--ocees-hero-pad-bottom: 62px;
	--ocees-hero-lead-width: 540px;
	--ocees-hero-scroll-size: 68px;
	--ocees-hero-scroll-size-sm: 58px;
}

/* --------------------------------------------------------------------------
   1. The stage
   The still frame behind the video is Elementor's "Background Fallback"
   control, which writes `background: url(...) 50% 50%; background-size: cover`
   - so the poster's own position and sizing are Elementor's to own, and are
   deliberately not repeated here. The React build's #052d43 base colour is
   omitted for the same reason: that shorthand would win, and the cover
   poster means the colour is never visible in any case.
   -------------------------------------------------------------------------- */

.ocees-hero.e-con {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: none;
	min-height: 100svh;
	padding: 0;
	overflow: hidden;
	color: #fff;
}

.ocees-hero > .elementor-background-video-container {
	z-index: 0;
}

/* Elementor sizes the background video from JavaScript, writing width and
   height as inline styles - logic meant for iframe embeds, which have no
   `object-fit`. For a self-hosted video it only ever approximates cover, and
   on a portrait phone viewport it can leave most of the frame uncovered. CSS
   does this correctly and unconditionally, which is also exactly what the
   React build does (`.hero-video { inset: 0; width: 100%; height: 100% }`).
   The !important is aimed at those inline styles - it is the only way to win
   against them, and there is no Elementor control that sets these. */
.ocees-hero .elementor-background-video-hosted {
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	transform: none;
	object-fit: cover;
	object-position: center;
}

/* --------------------------------------------------------------------------
   2. Overlay
   Two stacked gradients, straight from `.hero-overlay`: a horizontal one that
   darkens the left where the headline sits, and a vertical one that grounds
   the bottom edge. Elementor's own Background Overlay control only supports a
   single two-stop gradient, so this is drawn on the container's ::after -
   ::before is reserved by Elementor for that overlay control.
   -------------------------------------------------------------------------- */

.ocees-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(2, 17, 30, 0.82), rgba(2, 23, 38, 0.35) 55%, rgba(2, 25, 41, 0.56)),
		linear-gradient(0deg, rgba(0, 15, 26, 0.48), transparent 58%);
}

/* --------------------------------------------------------------------------
   3. Content
   `min-height: 100svh` on the inner block plus `justify-content: flex-end`
   is what pins the headline to the bottom of the viewport. The 156px top
   padding is what clears the overlaying site header.
   -------------------------------------------------------------------------- */

.ocees-hero__content.e-con {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 0;
	width: 100%;
	max-width: none;
	min-height: 100svh;
	padding: var(--ocees-hero-pad-top) var(--ocees-hero-pad-inline) var(--ocees-hero-pad-bottom);
}

/* The design spaces these blocks with the headline's own margins, so
   Elementor's global widget spacing is switched off inside the hero. */
.ocees-hero__content > .elementor-widget:not(:last-child) {
	margin-block-end: 0;
}

/* The kicker's own styling is the shared `.ocees-label` utility in
   ocees-base.css; it inherits its white from the hero container. */

.ocees-hero__title .elementor-heading-title {
	margin: 20px 0 45px;
	max-width: 1050px;
	color: #fff;
	font-family: var(--ocees-font-sans);
	font-size: clamp(4rem, 10.1vw, 10.2rem);
	font-weight: 500;
	line-height: 0.84;
	letter-spacing: -0.075em;
}

/* --------------------------------------------------------------------------
   4. Lower row
   React: `grid-template-columns: minmax(0, 540px) 68px` with
   `justify-content: space-between` - the lead paragraph capped at 540px on
   the left, the scroll button hard against the right edge.
   -------------------------------------------------------------------------- */

.ocees-hero__lower.e-con {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 36px;
	width: 100%;
	max-width: none;
	padding: 0;
}

.ocees-hero__lower > .ocees-hero__lead {
	flex: 0 1 var(--ocees-hero-lead-width);
	min-width: 0;
}

.ocees-hero__lower > .ocees-hero__scroll {
	flex: 0 0 auto;
	width: auto;
}

.ocees-hero__lead,
.ocees-hero__lead p {
	margin: 0;
	color: #fff;
	font-family: var(--ocees-font-sans);
	font-size: clamp(1.05rem, 1.45vw, 1.35rem);
	line-height: 1.55;
}

/* --------------------------------------------------------------------------
   5. Scroll button
   A 68px ring holding the 23px Lucide ArrowDown, inverting to white on
   hover - `.round-link` in the React build.
   -------------------------------------------------------------------------- */

.ocees-hero__scroll .elementor-icon-wrapper {
	line-height: 0;
}

/* Elementor paints every Icon widget with the kit's global primary colour at
   `.elementor-widget-icon.elementor-view-default .elementor-icon` - three
   classes. On this dark banner that would make both the ring and the arrow
   navy-on-navy, so these two rules match that weight by qualifying the widget
   wrapper with its own Elementor class. */
.ocees-hero .elementor-widget-icon.ocees-hero__scroll .elementor-icon {
	display: grid;
	place-items: center;
	width: var(--ocees-hero-scroll-size);
	height: var(--ocees-hero-scroll-size);
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	transition: background-color 0.2s, color 0.2s;
}

.ocees-hero .elementor-widget-icon.ocees-hero__scroll .elementor-icon:hover,
.ocees-hero .elementor-widget-icon.ocees-hero__scroll .elementor-icon:focus {
	background-color: #fff;
	color: var(--ocees-primary);
	border-color: #fff;
}

.ocees-hero .elementor-widget-icon.ocees-hero__scroll .elementor-icon svg {
	width: 23px;
	height: 23px;
	fill: none;
	stroke: currentColor;
}

.ocees-hero__scroll .elementor-icon:focus-visible {
	outline: 2px solid var(--ocees-accent);
	outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   6. Depth ruler
   Decorative: a hairline from "Surface" to "Deep ocean" with a pulsing cyan
   marker. It is purely ornamental and carries `aria-hidden`, which is why it
   is an HTML widget holding the React build's own markup rather than a stack
   of text widgets - vertical writing mode and a pulsing pseudo-element are
   not things Elementor's controls express.
   -------------------------------------------------------------------------- */

.ocees-hero__depth {
	position: absolute;
	z-index: 3;
	top: 160px;
	bottom: 158px;
	right: clamp(20px, 2.8vw, 45px);
	width: auto;
}

.ocees-depth-scale {
	display: grid;
	grid-template-rows: auto 1fr auto;
	justify-items: center;
	gap: 12px;
	height: 100%;
	color: rgba(255, 255, 255, 0.72);
	font: 700 0.62rem / 1 var(--ocees-font-mono);
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.ocees-depth-scale span {
	writing-mode: vertical-rl;
}

.ocees-depth-scale i {
	position: relative;
	width: 1px;
	height: 100%;
	background: linear-gradient(#fff, rgba(255, 255, 255, 0.08));
}

.ocees-depth-scale i::before {
	content: "";
	position: absolute;
	top: 18%;
	left: -3px;
	width: 7px;
	height: 7px;
	border: 1px solid #fff;
	border-radius: 50%;
	background: var(--ocees-accent);
	box-shadow: 0 0 0 8px rgba(12, 186, 197, 0.18);
	animation: ocees-depth-pulse 3s ease-in-out infinite;
}

@keyframes ocees-depth-pulse {
	50% {
		box-shadow: 0 0 0 15px rgba(12, 186, 197, 0);
	}
}

/* --------------------------------------------------------------------------
   7. Responsive
   -------------------------------------------------------------------------- */

/* Tablet and below - matches the React `@media (max-width: 980px)` block. */
@media (max-width: 980px) {
	.ocees-hero__depth {
		display: none;
	}
}

/* Phones - matches the React `@media (max-width: 620px)` block. */
@media (max-width: 620px) {
	.ocees-hero .elementor-background-video-hosted {
		object-position: right center;
	}

	.ocees-hero__content.e-con {
		padding-top: var(--ocees-hero-pad-top-sm);
	}

	.ocees-hero__title .elementor-heading-title {
		margin-top: 16px;
		font-size: clamp(3.65rem, 18vw, 5.5rem);
	}

	.ocees-hero__lower.e-con {
		flex-direction: column;
		align-items: flex-start;
	}

	.ocees-hero__lower > .ocees-hero__lead {
		flex: 0 0 auto;
		width: 100%;
	}

	/* Same selector weight as the desktop rule above - a media query adds no
	   specificity of its own, so a shorter selector here would simply lose. */
	.ocees-hero .elementor-widget-icon.ocees-hero__scroll .elementor-icon {
		width: var(--ocees-hero-scroll-size-sm);
		height: var(--ocees-hero-scroll-size-sm);
	}
}

/* The React build drops the video entirely for reduced-motion users and
   falls back to the still poster. */
@media (prefers-reduced-motion: reduce) {
	.ocees-hero > .elementor-background-video-container {
		display: none;
	}

	.ocees-depth-scale i::before {
		animation: none;
	}
}
