/**
 * Hero Section Styles for StudioM
 * Scoped to .sm-hero to avoid global conflicts
 * Matches studiom.ai hero design - Squarespace collage-style layout with card overlap
 *
 * Layout:
 * - Collage structure with overlapping content card and image
 * - Content card: white background with shadow, overlaps image area
 * - Content: H1 + paragraph + signature + CTAs (left-aligned)
 * - Media: Image with rounded corners
 *
 * Controls:
 * - Hero H1 typography (Lexend Mega font, large scale)
 * - Paragraph typography (Chivo font, readable)
 * - Signature line styling (uppercase, strong letter-spacing)
 * - Button styles (squarer edges, consistent height, subtle hover)
 * - Collage overlap layout
 * - Neutralizes WordPress global padding artifacts
 */

.sm-hero {
	min-height: calc(100vh - 111px);
	padding: 0;
	background: #fafafa;
	font-family: var(--font-chivo, 'Chivo', sans-serif);
	margin: 0;
	display: flex;
	align-items: center;
}

/* CRITICAL: Neutralize ALL WordPress padding utilities within hero */
.sm-hero.has-global-padding,
.sm-hero .has-global-padding,
.sm-hero .wp-block-group.has-global-padding {
	padding-left: 0 !important;
	padding-right: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* Neutralize is-layout-constrained padding */
.sm-hero.is-layout-constrained,
.sm-hero .is-layout-constrained,
.sm-hero .wp-block-group.is-layout-constrained {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Container controls all horizontal spacing - matches header inset */
.sm-hero .sm-container {
	max-width: 1200px;
	margin: 0 auto;
	padding-inline: 24px;
	width: 100%;
}

/* Two-column collage grid with overlap positioning */
.sm-hero__grid {
	display: flex;
	gap: 0;
	align-items: center;
	margin: 0;
	position: relative;
}

.sm-hero__grid.wp-block-columns {
	margin-bottom: 0;
}

/* Content column - white card with overlap */
.sm-hero__content {
	flex: 0 0 52%;
	max-width: 580px;
	text-align: left;
	background: #ffffff;
	border-radius: 18px;
	padding: 44px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
	position: relative;
	z-index: 2;
	margin-right: -60px;
}

.sm-hero__content.wp-block-column {
	margin-bottom: 0;
}

/* Media column - right side (collage panel) */
.sm-hero__media {
	flex: 0 0 48%;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 520px;
	background: #f3f3f3;
	border-radius: 22px;
	overflow: hidden;
	position: relative;
	z-index: 1;
}

.sm-hero__media.wp-block-column {
	margin-bottom: 0;
}

/* Image fills the collage panel */
.sm-hero__media .wp-block-image {
	width: 100%;
	height: 100%;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sm-hero__media .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Hero heading - Lexend Mega for bold impact */
.sm-hero h1,
.sm-hero .wp-block-heading {
	font-family: var(--font-lexend-mega, 'Lexend Mega', sans-serif);
	font-size: clamp(44px, 4.8vw, 68px);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: #111111;
	margin: 0 0 20px;
	white-space: pre-line;
	text-align: left;
}

/* Hero paragraph - Chivo for readability */
.sm-hero p {
	font-family: var(--font-chivo, 'Chivo', sans-serif);
	font-size: 17px;
	font-weight: 300;
	line-height: 1.65;
	color: #555555;
	margin: 0 0 18px;
	max-width: 100%;
	text-align: left;
}

/* Signature line - uppercase with strong letter spacing */
.sm-hero__signature {
	font-family: var(--font-chivo, 'Chivo', sans-serif);
	font-size: 11px;
	font-weight: 300;
	letter-spacing: 0.30em;
	text-transform: uppercase;
	color: #666666;
	opacity: 0.85;
	margin: 12px 0 32px;
	text-align: left;
}

/* CTA buttons container - left aligned */
.sm-hero__cta {
	display: flex;
	gap: 1rem;
	justify-content: flex-start;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 2rem;
}

.sm-hero__cta.wp-block-buttons {
	justify-content: flex-start;
	margin-bottom: 0;
}

/* Base button styling - squarer edges, consistent height, subtle hover */
.sm-hero__cta .wp-element-button,
.sm-hero__cta .wp-block-button__link {
	font-family: var(--font-poppins, 'Poppins', sans-serif);
	font-size: 15px;
	font-weight: 400;
	padding: 14px 26px;
	border-radius: 10px;
	min-height: 50px;
	height: 50px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.18s ease;
	border-width: 1px;
	border-style: solid;
	letter-spacing: 0.02em;
	cursor: pointer;
}

/* Primary button - solid fill */
.sm-hero__cta .wp-block-button.is-style-fill .wp-block-button__link,
.sm-hero__cta .wp-block-button.is-style-fill .wp-element-button,
.sm-hero__cta-primary {
	background: #111111;
	color: #ffffff;
	border-color: #111111;
}

.sm-hero__cta .wp-block-button.is-style-fill .wp-block-button__link:hover,
.sm-hero__cta .wp-block-button.is-style-fill .wp-element-button:hover,
.sm-hero__cta-primary:hover {
	background: #2a2a2a;
	border-color: #2a2a2a;
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* Secondary button - outline style */
.sm-hero__cta .wp-block-button.is-style-outline .wp-block-button__link,
.sm-hero__cta .wp-block-button.is-style-outline .wp-element-button,
.sm-hero__cta-secondary {
	background: transparent;
	color: #111111;
	border-color: #111111;
}

.sm-hero__cta .wp-block-button.is-style-outline .wp-block-button__link:hover,
.sm-hero__cta .wp-block-button.is-style-outline .wp-element-button:hover,
.sm-hero__cta-secondary:hover {
	background: rgba(17, 17, 17, 0.05);
	border-color: #111111;
	transform: translateY(-1px);
}

/* Tertiary button - text link style */
.sm-hero__cta-tertiary {
	font-family: var(--font-poppins, 'Poppins', sans-serif);
	color: #111827;
	font-size: 15px;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 4px;
	padding: 14px 20px;
	transition: opacity 0.2s ease;
	min-height: auto;
	border: none;
	background: transparent;
}

.sm-hero__cta-tertiary:hover {
	opacity: 0.7;
	transform: none;
}

/* Remove default button wrapper margins */
.sm-hero .wp-block-button {
	margin: 0;
}

.sm-hero .wp-block-buttons {
	gap: 1rem;
}

/* Responsive adjustments - tablet */
@media (max-width: 1024px) {
	.sm-hero {
		min-height: auto;
		padding: 60px 0;
	}

	.sm-hero__grid {
		gap: 32px;
		flex-direction: column;
	}

	.sm-hero__content {
		max-width: 100%;
		margin-right: 0;
		padding: 38px;
	}

	.sm-hero h1,
	.sm-hero .wp-block-heading {
		font-size: clamp(40px, 5.5vw, 56px);
		margin-bottom: 18px;
	}

	.sm-hero p {
		font-size: 17px;
	}

	.sm-hero__media {
		min-height: 380px;
		width: 100%;
	}
}

/* Responsive adjustments - mobile */
@media (max-width: 768px) {
	.sm-hero {
		min-height: auto;
		padding: 48px 0;
	}

	.sm-hero .sm-container {
		padding-inline: 16px;
	}

	.sm-hero__grid {
		flex-direction: column;
		gap: 28px;
	}

	.sm-hero__content {
		max-width: 100%;
		text-align: left;
		padding: 32px 28px;
		margin-right: 0;
	}

	.sm-hero h1,
	.sm-hero .wp-block-heading {
		font-size: clamp(36px, 7vw, 44px);
		margin-bottom: 16px;
		line-height: 1.12;
	}

	.sm-hero p {
		font-size: 16px;
		line-height: 1.6;
		margin-bottom: 16px;
	}

	.sm-hero__signature {
		font-size: 10px;
		margin: 8px 0 26px;
	}

	.sm-hero__media {
		min-height: 280px;
		width: 100%;
		border-radius: 18px;
	}

	.sm-hero__cta {
		flex-direction: column;
		gap: 12px;
		margin-top: 1.75rem;
		align-items: stretch;
	}

	.sm-hero__cta .wp-element-button,
	.sm-hero__cta .wp-block-button__link,
	.sm-hero__cta-primary,
	.sm-hero__cta-secondary {
		width: 100%;
		max-width: 100%;
	}
}

/* Override parent theme padding on homepage - ensures hero sits at top */
.home .wp-site-blocks {
	padding-top: 0 !important;
}
