/**
 * Symbiotic Peptides home hero.
 *
 * Header + hero together fill the viewport: the hero's min-height is the
 * viewport minus --sp-header-height (declared on :root in header.css).
 */

.sp-hero {
	--sp-hero-grid: 110px;
	--sp-hero-line: rgba( 232, 98, 10, 0.2 );
	--sp-hero-bg: var( --global-palette9, #ffffff );

	position: relative;
	display: flex;
	align-items: center;
	min-height: calc( 100vh - var( --sp-header-height, 78px ) );
	min-height: calc( 100dvh - var( --sp-header-height, 78px ) );
	height: calc( 100vh - var( --sp-header-height, 78px ) );
	height: calc( 100dvh - var( --sp-header-height, 78px ) );
	overflow: hidden;
	background-color: var( --sp-hero-bg );
}

/* Account for WP Admin bar height when logged in */
.admin-bar .sp-hero {
	min-height: calc( 100vh - var( --sp-header-height, 78px ) - 32px );
	min-height: calc( 100dvh - var( --sp-header-height, 78px ) - 32px );
	height: calc( 100vh - var( --sp-header-height, 78px ) - 32px );
	height: calc( 100dvh - var( --sp-header-height, 78px ) - 32px );
}

/* Blueprint grid pattern matching the reference design 100%,
   with central radial white vignette and smooth edge fade out. */
.sp-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image:
		radial-gradient( ellipse 70% 60% at 50% 50%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.6) 45%, transparent 80% ),
		linear-gradient( to right, #ffffff 0%, transparent 12%, transparent 88%, #ffffff 100% ),
		linear-gradient( to bottom, #ffffff 0%, transparent 12%, transparent 88%, #ffffff 100% ),
		linear-gradient( to right, var( --sp-hero-line ) 1px, transparent 1px ),
		linear-gradient( to bottom, var( --sp-hero-line ) 1px, transparent 1px );
	background-size: 100% 100%, 100% 100%, 100% 100%, var( --sp-hero-grid ) var( --sp-hero-grid ), var( --sp-hero-grid ) var( --sp-hero-grid );
	background-position: center center;
	pointer-events: none;
}

.sp-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax( 0, 1.02fr ) minmax( 0, 1fr );
	align-items: center;
	gap: clamp( 1.5rem, 4vw, 4rem );
	width: 100%;
	max-width: var( --global-content-width, 1290px );
	margin-inline: auto;
	padding: clamp( 2.5rem, 5vw, 4.5rem ) var( --global-content-edge-padding, 1.5rem );
}

/* --------------------------------------------------------------------------
   Copy
   -------------------------------------------------------------------------- */

.sp-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	margin: 0 0 clamp( 1.25rem, 2.5vw, 1.875rem );
	padding: 0.5rem 1.125rem;
	border: 1px solid rgba( 232, 98, 10, 0.35 );
	border-radius: 999px;
	color: var( --global-palette1, #e8620a );
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	line-height: 1;
	text-transform: uppercase;
}

.sp-hero__dot {
	display: block;
	width: 6px;
	height: 6px;
	flex: 0 0 auto;
	background: var( --global-palette1, #e8620a );
	border-radius: 50%;
}

.sp-hero__typing-cursor {
	display: inline-block;
	margin-left: 2px;
	color: var( --global-palette1, #e8620a );
	font-weight: 700;
	animation: spBlink 0.8s infinite;
	transition: opacity 0.3s ease;
}

@keyframes spBlink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

.sp-hero .sp-hero__title {
	margin: 0 0 clamp( 1.25rem, 2.5vw, 1.75rem );
	max-width: 13em;
	color: var( --global-palette3, #000000 );
	font-size: clamp( 2.5rem, 5.4vw, 5rem );
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 0.98;
	text-transform: uppercase;
}

.sp-hero__accent {
	color: var( --global-palette1, #e8620a );
}

.sp-hero__text {
	margin: 0 0 clamp( 1.75rem, 3.5vw, 2.5rem );
	max-width: 34em;
	color: var( --global-palette6, #6b6b6b );
	font-size: clamp( 1rem, 1.1vw, 1.0625rem );
	line-height: 1.75;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.sp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.875rem;
}

/* Scoped past Kadence's element-level button styles. */
.sp-hero .sp-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	min-height: 56px;
	padding: 0.875rem 1.875rem;
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sp-hero .sp-hero__btn--primary {
	background: var( --global-palette1, #e8620a );
	border: 1px solid var( --global-palette1, #e8620a );
	color: #ffffff;
}

.sp-hero .sp-hero__btn--primary:hover,
.sp-hero .sp-hero__btn--primary:focus-visible {
	background: var( --global-palette2, #be5008 );
	border-color: var( --global-palette2, #be5008 );
	color: #ffffff;
}

.sp-hero .sp-hero__btn--secondary {
	background: var( --global-palette9, #ffffff );
	border: 1px solid var( --global-palette7, #e2e2e2 );
	color: var( --global-palette3, #000000 );
}

.sp-hero .sp-hero__btn--secondary:hover,
.sp-hero .sp-hero__btn--secondary:focus-visible {
	border-color: var( --global-palette1, #e8620a );
	color: var( --global-palette1, #e8620a );
}

.sp-hero .sp-hero__btn:active {
	transform: translateY( 1px );
}

.sp-hero__arrow {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Media
   -------------------------------------------------------------------------- */

.sp-hero__media {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.sp-hero__image {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc( 100vh - var( --sp-header-height, 78px ) - 4rem );
	object-fit: contain;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media ( max-width: 1024px ) {
	.sp-hero__inner {
		grid-template-columns: 1fr;
		gap: 2rem;
		text-align: left;
	}

	.sp-hero {
		--sp-hero-grid: 75px;

		min-height: 0;
		height: auto;
	}

	.sp-hero .sp-hero__title {
		max-width: none;
		font-size: clamp( 2.25rem, 7vw, 3.5rem );
	}

	.sp-hero__image {
		max-height: 46vh;
	}
}

@media ( max-width: 600px ) {
	.sp-hero__actions {
		gap: 0.75rem;
	}

	.sp-hero .sp-hero__btn {
		flex: 1 1 auto;
		min-height: 52px;
		padding: 0.8125rem 1.25rem;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.sp-hero .sp-hero__btn {
		transition-duration: 0.01ms;
	}
}
