/**
 * Hero Homepage widget — layout/look aligned with demo-skin/index.html hero block.
 * Uses theme tokens where available (--cw-accent-*, --cw-text-muted, Barlow/Inter).
 */

.cw-hero-homepage {
	position: relative;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding-left: 0;
	padding-right: 0;
	padding-bottom: 0;
	overflow: hidden;
	box-sizing: border-box;
}

@media (max-width: 1366px) {
	.cw-hero-homepage {
		padding-inline-start: max(var(--cw-gutter-inline), env(safe-area-inset-left, 0px));
		padding-inline-end: max(var(--cw-gutter-inline), env(safe-area-inset-right, 0px));
	}
}

@media (min-width: 1367px) {
	.cw-hero-homepage {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

.cw-hero__inner {
	width: 100%;
	max-width: 1000px;
	position: relative;
}

/* — Eyebrow (H2 + flanking lines) — */
.cw-hero__eyebrow {
	margin: 0 0 1.5rem;
	font-family: var(--cw-font-heading, "Barlow", system-ui, sans-serif);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cw-accent-secondary, #00b7fa);
}

.cw-hero__eyebrow-inner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.cw-hero__eyebrow-line {
	display: block;
	width: 2rem;
	height: 1px;
	transform: scaleX(0);
	/* Draw + headline motion: GSAP cw-hero-motion.js (demo-skin tlHero) */
}

.cw-hero__eyebrow-line--left {
	transform-origin: left center;
}

.cw-hero__eyebrow-line--right {
	transform-origin: right center;
}

/* — Headline — */
.cw-hero__title {
	margin: 0 0 2rem;
}

.cw-hero__title-line {
	margin: 0;
	font-family: var(--cw-font-heading, "Barlow", system-ui, sans-serif);
	font-weight: 700;
	letter-spacing: 0;
	color: #fff;
}

/* Line 1: demo-skin h1 primary = text-4xl · md:text-6xl · lg:text-7xl (Tailwind 768 / 1024) */
.cw-hero__title-line--primary {
	overflow: hidden;
	font-size: 2.25rem;
	line-height: 1.1;
}

@media (min-width: 768px) {
	.cw-hero__title-line--primary {
		font-size: 3.75rem;
	}
}

@media (min-width: 1024px) {
	.cw-hero__title-line--primary {
		font-size: 4.5rem;
	}
}

/* Pill row: center shrink-to-content pill (demo: inline-block .text-pill inside centered column, not full-bleed). */
.cw-hero__title-line--pill {
	display: flex;
	justify-content: center;
	width: 100%;
	margin-top: 1rem;
}

.cw-hero__word {
	display: inline-block;
	margin-right: 0.2em;
}

.cw-hero__word:last-child {
	margin-right: 0;
}

.cw-hero__tm {
	font-size: 0.45em;
	vertical-align: super;
	line-height: 1;
	margin-left: 0.05em;
	opacity: 0.75;
}

/* Pill: demo .text-pill + text-3xl · md:text-5xl · lg:text-6xl */
.cw-hero__pill {
	display: inline-block;
	overflow: hidden;
	box-sizing: border-box;
	width: max-content;
	max-width: 100%;
	padding: 0.25rem 1.5rem;
	background: color-mix(in srgb, var(--cw-accent-secondary, #00b7fa) 15%, transparent);
	border-radius: 999px;
	position: relative;
	z-index: 1;
	font-size: 1.875rem;
	line-height: 1.1;
}

@media (min-width: 768px) {
	.cw-hero__pill {
		font-size: 3rem;
	}
}

@media (min-width: 1024px) {
	.cw-hero__pill {
		font-size: 3.75rem;
	}
}

.cw-hero__pill::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 999px;
	padding: 1px;
	background: linear-gradient(
		135deg,
		color-mix(in srgb, var(--cw-accent-primary, #dc2626) 80%, transparent),
		color-mix(in srgb, var(--cw-accent-secondary, #00b7fa) 80%, transparent)
	);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	z-index: -1;
}

/* Rolling line: see cw-rolling-line.css (shared with Trust strip). */

/* — Capability — */
.cw-hero__capability {
	overflow: hidden;
	margin: 0 auto 3rem;
	max-width: 42rem;
	font-size: 1rem;
	line-height: 1.65;
	color: var(--cw-text-muted, #8090a8);
}

.cw-hero__capability .gsap-hero-p.block {
	display: block;
}

/* — Buttons (.btn-nova / .btn-ghost from demo) — */
.cw-hero__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	gap: 1rem;
	padding: 1rem 0;
}

@media (min-width: 640px) {
	.cw-hero__actions {
		flex-direction: row;
		align-items: center;
	}
}

.cw-hero__action {
	flex: 0 0 auto;
}

.cw-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1rem 2rem;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	border-radius: 999px;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
	box-sizing: border-box;
	cursor: pointer;
	border: none;
	width: 100%;
}

@media (min-width: 640px) {
	.cw-hero__btn {
		width: auto;
	}
}

.cw-hero__btn--nova {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(
		135deg,
		var(--cw-accent-primary, #dc2626) 0%,
		var(--cw-accent-secondary, #00b7fa) 100%
	);
	box-shadow: 0 10px 25px color-mix(in srgb, var(--cw-accent-primary, #dc2626) 30%, transparent);
}

.cw-hero__btn--nova::after {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 50%;
	height: 100%;
	background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
	transform: skewX(-20deg);
	transition: left 0.5s ease;
	pointer-events: none;
}

.cw-hero__btn--nova:hover {
	transform: translateY(-2px);
	box-shadow: 0 15px 30px color-mix(in srgb, var(--cw-accent-secondary, #00b7fa) 40%, transparent);
	color: #fff;
}

.cw-hero__btn--nova:hover::after {
	left: 150%;
}

.cw-hero__btn--ghost {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #fff;
}

.cw-hero__btn--ghost:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
}

/* Solid — flat brand red, no gradient. Pairs with --nova when a section
 * needs two CTAs without the visual weight of two gradients. */
.cw-hero__btn--solid {
	color: #fff;
	background: var(--cw-accent-primary, #dc2626);
	border: 1px solid transparent;
	box-shadow: 0 10px 25px color-mix(in srgb, var(--cw-accent-primary, #dc2626) 25%, transparent);
}

.cw-hero__btn--solid:hover {
	transform: translateY(-2px);
	background: color-mix(in srgb, var(--cw-accent-primary, #dc2626) 92%, #fff 8%);
	box-shadow: 0 15px 32px color-mix(in srgb, var(--cw-accent-primary, #dc2626) 40%, transparent);
	color: #fff;
}

.cw-hero__btn--solid:hover .cw-hero__btn-icon {
	transform: translateX(4px);
}

/* Shape modifiers — default (.cw-hero__btn) is pill (border-radius:999px).
 * --rounded is an explicit alias for the default pill shape; --square drops
 * the radius to a soft 8px rectangle. Stackable with --nova / --ghost. */
.cw-hero__btn--rounded {
	border-radius: 999px;
}

.cw-hero__btn--square {
	border-radius: 8px;
}

.cw-hero__btn-icon {
	display: inline-flex;
	transition: transform 0.3s ease;
}

.cw-hero__btn--ghost:hover .cw-hero__btn-icon {
	transform: translateX(4px);
}

.cw-hero__btn-icon svg {
	width: 1.125rem;
	height: 1.125rem;
	fill: currentColor;
}

/* — Product — */
.cw-hero__product {
	width: 100%;
	max-width: 1100px;
	margin: 4rem auto 0;
	position: relative;
	z-index: 1;
	display: flex;
	flex: 1 1 auto;
	align-items: flex-end;
	justify-content: center;
}

.cw-hero__product-glow {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2.5rem;
	height: 50%;
	background: color-mix(in srgb, var(--cw-accent-secondary, #00b7fa) 30%, transparent);
	filter: blur(100px);
	border-radius: 100%;
	transform: scaleX(0.8) scaleY(0.4);
	z-index: -1;
	pointer-events: none;
}

.cw-hero__product-img {
	width: 100%;
	max-width: 900px;
	height: auto;
	object-fit: contain;
	object-position: bottom;
	filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.9));
	transition: transform 1.5s ease;
}

/* Product row flex/placement: Elementor “Product row layout” (responsive) via selectors on {{WRAPPER}} .cw-hero__product */

/* Primary product: foot (.main-footer) vs under rolling line (.main-under-rolling); prefix cw-hero-pms%s--under_rolling */
.elementor-widget-cw-hero-homepage .cw-hero__product--main-under-rolling {
	display: none !important;
	flex-grow: 0 !important;
	flex-shrink: 1 !important;
	align-items: center !important;
	justify-content: center !important;
	margin-top: 1rem;
}

@media (min-width: 1025px) {
	.elementor-widget-cw-hero-homepage.cw-hero-pms--under_rolling .cw-hero__product--main-under-rolling {
		display: flex !important;
	}

	.elementor-widget-cw-hero-homepage.cw-hero-pms--under_rolling .cw-hero__product--main-footer {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.elementor-widget-cw-hero-homepage.cw-hero-pms-tablet--under_rolling .cw-hero__product--main-under-rolling {
		display: flex !important;
	}

	.elementor-widget-cw-hero-homepage.cw-hero-pms-tablet--under_rolling .cw-hero__product--main-footer {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.elementor-widget-cw-hero-homepage.cw-hero-pms-mobile--under_rolling .cw-hero__product--main-under-rolling {
		display: flex !important;
	}

	.elementor-widget-cw-hero-homepage.cw-hero-pms-mobile--under_rolling .cw-hero__product--main-footer {
		display: none !important;
	}
}

.cw-hero__product:hover .cw-hero__product-img {
	transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
	.cw-hero__eyebrow-line,
	.cw-hero__product-img {
		animation: none;
		transition: none;
	}

	.cw-hero__eyebrow-line {
		transform: scaleX(1);
	}
}
