/**
 * B&M Front Page Styles
 *
 * @package BM_Child
 * @since   1.1.0
 */

/* ==========================================================================
   Reset Astra layout for front page — full-width edge-to-edge
   ========================================================================== */

/* Force Astra out of boxed/content-boxed mode on front page */
.page-template-front-page .site-content,
.page-template-front-page #content,
.page-template-front-page .ast-container,
.page-template-front-page .site-content > .ast-container,
.page-template-front-page .ast-separate-container .ast-article-single,
.page-template-front-page .ast-separate-container .ast-article-post,
.page-template-front-page #primary,
.page-template-front-page .content-area,
.bm-front .ast-container,
.bm-front .site-content > .ast-container,
.bm-front,
.bm-front .entry-content {
	max-width: 100% !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Remove Astra's content background/box styling on front page */
.page-template-front-page .ast-separate-container .ast-article-single,
.page-template-front-page .ast-separate-container .ast-article-post {
	background: transparent !important;
	padding: 0 !important;
}

/* Remove any sidebar on front page */
.page-template-front-page #secondary {
	display: none;
}

.bm-front {
	overflow-x: hidden;
}

/* ==========================================================================
   Shared Section Styles
   ========================================================================== */

.bm-section-tag {
	display: inline-block;
	font-family: var(--bm-font-accent);
	font-size: var(--bm-text-sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--bm-primary);
	margin-bottom: var(--bm-space-sm);
}

.bm-section-tag--light {
	color: var(--bm-accent);
}

.bm-section-title {
	font-family: var(--bm-font-heading);
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 700;
	color: var(--bm-black);
	margin: 0 0 var(--bm-space-md);
	line-height: 1.15;
}

.bm-section-title--light {
	color: var(--bm-white);
}

.bm-section-subtitle {
	font-size: var(--bm-text-lg);
	color: var(--bm-grey);
	max-width: 600px;
	margin: 0 auto;
	line-height: 1.6;
}

/* ==========================================================================
   Reveal Animations
   ========================================================================== */

.bm-reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.bm-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Staggered children */
.bm-reveal:nth-child(2) { transition-delay: 0.1s; }
.bm-reveal:nth-child(3) { transition-delay: 0.2s; }
.bm-reveal:nth-child(4) { transition-delay: 0.3s; }

/* ==========================================================================
   HERO
   ========================================================================== */

.bm-hero {
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
}

.bm-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.bm-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
	will-change: transform;
	transition: transform 0.1s linear;
}

.bm-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		180deg,
		rgba(30, 29, 31, 0.55) 0%,
		rgba(30, 29, 31, 0.3) 50%,
		rgba(30, 29, 31, 0.7) 100%
	);
}

.bm-hero__content {
	position: relative;
	z-index: 2;
	max-width: 800px;
	padding: var(--bm-space-xl);
}

.bm-hero__tagline {
	display: inline-block;
	font-family: var(--bm-font-accent);
	font-size: var(--bm-text-sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--bm-accent);
	margin-bottom: var(--bm-space-md);
	opacity: 0;
	animation: bm-fadeUp 0.8s ease 0.3s forwards;
}

.bm-hero__title {
	font-family: var(--bm-font-heading);
	font-size: clamp(2.75rem, 8vw, 5.5rem);
	font-weight: 700;
	color: var(--bm-white);
	line-height: 1.05;
	margin: 0 0 var(--bm-space-lg);
	opacity: 0;
	animation: bm-fadeUp 0.8s ease 0.5s forwards;
}

.bm-hero__title em {
	font-style: italic;
	color: var(--bm-accent);
}

.bm-hero__subtitle {
	font-size: clamp(1rem, 2.5vw, 1.25rem);
	color: rgba(254, 254, 250, 0.85);
	margin: 0 0 var(--bm-space-xl);
	opacity: 0;
	animation: bm-fadeUp 0.8s ease 0.7s forwards;
}

.bm-hero__cta-group {
	display: flex;
	gap: var(--bm-space-md);
	justify-content: center;
	flex-wrap: wrap;
	opacity: 0;
	animation: bm-fadeUp 0.8s ease 0.9s forwards;
}

/* Scroll hint */
.bm-hero__scroll-hint {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
}

.bm-hero__scroll-hint span {
	display: block;
	width: 24px;
	height: 40px;
	border: 2px solid rgba(254, 254, 250, 0.4);
	border-radius: 12px;
	position: relative;
}

.bm-hero__scroll-hint span::before {
	content: '';
	position: absolute;
	top: 6px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 8px;
	background: var(--bm-accent);
	border-radius: 2px;
	animation: bm-scrollDot 1.8s ease infinite;
}

@keyframes bm-scrollDot {
	0%   { opacity: 1; top: 6px; }
	100% { opacity: 0; top: 22px; }
}

@keyframes bm-fadeUp {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.bm-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--bm-space-sm);
	font-family: var(--bm-font-accent);
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--bm-radius-md);
	transition: all var(--bm-transition);
	cursor: pointer;
	border: 2px solid transparent;
	line-height: 1;
}

.bm-btn--primary {
	background: var(--bm-primary);
	color: var(--bm-white);
	border-color: var(--bm-primary);
}

.bm-btn--primary:hover {
	background: var(--bm-primary-dark);
	border-color: var(--bm-primary-dark);
	color: var(--bm-white);
	box-shadow: var(--bm-shadow-lg);
	transform: translateY(-2px);
}

.bm-btn--accent {
	background: var(--bm-accent);
	color: var(--bm-black);
	border-color: var(--bm-accent);
}

.bm-btn--accent:hover {
	background: var(--bm-accent-dark);
	border-color: var(--bm-accent-dark);
	color: var(--bm-black);
	box-shadow: var(--bm-shadow-lg);
	transform: translateY(-2px);
}

.bm-btn--ghost {
	background: transparent;
	color: var(--bm-white);
	border-color: rgba(254, 254, 250, 0.5);
}

.bm-btn--ghost:hover {
	background: rgba(254, 254, 250, 0.1);
	border-color: var(--bm-white);
	color: var(--bm-white);
}

.bm-btn--lg {
	font-size: 1rem;
	padding: 0.85rem 2rem;
}

.bm-btn--xl {
	font-size: 1.1rem;
	padding: 1rem 2.5rem;
}

/* ==========================================================================
   CHOOSE YOUR PATH
   ========================================================================== */

.bm-choose {
	padding: var(--bm-space-3xl) var(--bm-space-xl);
	background: var(--bm-white);
	text-align: center;
}

.bm-choose__header {
	margin-bottom: var(--bm-space-2xl);
}

.bm-choose__grid {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: var(--bm-space-xl);
	max-width: 1200px;
	margin: 0 auto;
	align-items: stretch;
}

/* Divider between cards */
.bm-choose__divider {
	display: flex;
	align-items: center;
	justify-content: center;
}

.bm-choose__or {
	font-family: var(--bm-font-heading);
	font-style: italic;
	font-size: var(--bm-text-xl);
	color: var(--bm-silver);
	position: relative;
}

.bm-choose__or::before,
.bm-choose__or::after {
	content: '';
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: 1px;
	height: 60px;
	background: var(--bm-toasted-tan);
}

.bm-choose__or::before { bottom: calc(100% + 12px); }
.bm-choose__or::after  { top: calc(100% + 12px); }

/* Path Cards */
.bm-path-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	border-radius: var(--bm-radius-lg);
	overflow: hidden;
	background: var(--bm-white);
	border: 1px solid var(--bm-border-light);
	transition: box-shadow var(--bm-transition-slow), transform var(--bm-transition);
}

.bm-path-card:hover {
	box-shadow: var(--bm-shadow-lg);
	transform: translateY(-4px);
	color: inherit;
}

.bm-path-card__img-wrap {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.bm-path-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.bm-path-card:hover .bm-path-card__img {
	transform: scale(1.06);
}

.bm-path-card__img-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgba(30, 29, 31, 0.25) 100%);
	transition: opacity var(--bm-transition);
}

.bm-path-card__body {
	padding: var(--bm-space-lg) var(--bm-space-xl) var(--bm-space-xl);
	text-align: left;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.bm-path-card__title {
	font-family: var(--bm-font-heading);
	font-size: var(--bm-text-2xl);
	color: var(--bm-black);
	margin: var(--bm-space-sm) 0 var(--bm-space-sm);
}

.bm-path-card__desc {
	color: var(--bm-grey);
	line-height: 1.65;
	margin: 0 0 auto;
	padding-bottom: var(--bm-space-lg);
}

.bm-path-card__cta {
	display: inline-flex;
	align-items: center;
	gap: var(--bm-space-sm);
	font-family: var(--bm-font-accent);
	font-weight: 600;
	font-size: var(--bm-text-lg);
	color: var(--bm-primary);
	transition: gap var(--bm-transition);
}

.bm-path-card:hover .bm-path-card__cta {
	gap: var(--bm-space-md);
}

.bm-path-card--mealprep .bm-path-card__cta {
	color: var(--bm-secondary);
}

/* ==========================================================================
   FEATURED FOOD CARDS
   ========================================================================== */

.bm-featured {
	padding: var(--bm-space-3xl) var(--bm-space-xl);
	background: var(--bm-cream);
}

.bm-featured__header {
	text-align: center;
	margin-bottom: var(--bm-space-2xl);
}

.bm-featured__track {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--bm-space-lg);
	max-width: 1200px;
	margin: 0 auto;
}

.bm-food-card {
	background: var(--bm-white);
	border-radius: var(--bm-radius-lg);
	overflow: hidden;
	border: 1px solid var(--bm-border-light);
	transition: box-shadow var(--bm-transition), transform var(--bm-transition);
}

.bm-food-card:hover {
	box-shadow: var(--bm-shadow-lg);
	transform: translateY(-3px);
}

.bm-food-card__img-wrap {
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.bm-food-card__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.bm-food-card:hover .bm-food-card__img-wrap img {
	transform: scale(1.08);
}

.bm-food-card__body {
	padding: var(--bm-space-md) var(--bm-space-lg) var(--bm-space-lg);
}

.bm-food-card__body h3 {
	font-family: var(--bm-font-heading);
	font-size: var(--bm-text-lg);
	color: var(--bm-black);
	margin: 0 0 var(--bm-space-xs);
}

.bm-food-card__body p {
	color: var(--bm-grey);
	font-size: var(--bm-text-sm);
	margin: 0;
	line-height: 1.5;
}

/* ==========================================================================
   HOW IT WORKS (Meal Prep Process)
   ========================================================================== */

.bm-process {
	position: relative;
	padding: var(--bm-space-3xl) var(--bm-space-xl);
	overflow: hidden;
}

.bm-process__bg {
	position: absolute;
	inset: 0;
}

.bm-process__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bm-process__overlay {
	position: absolute;
	inset: 0;
	background: rgba(30, 29, 31, 0.82);
	backdrop-filter: blur(2px);
}

.bm-process__content {
	position: relative;
	z-index: 1;
	max-width: 1000px;
	margin: 0 auto;
	text-align: center;
}

.bm-process__header {
	margin-bottom: var(--bm-space-2xl);
}

.bm-process__steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--bm-space-xl);
	margin-bottom: var(--bm-space-2xl);
}

.bm-step {
	text-align: center;
}

.bm-step__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--bm-primary);
	color: var(--bm-white);
	font-family: var(--bm-font-heading);
	font-size: var(--bm-text-xl);
	font-weight: 700;
	margin-bottom: var(--bm-space-md);
}

.bm-step__title {
	font-family: var(--bm-font-heading);
	font-size: var(--bm-text-xl);
	color: var(--bm-white);
	margin: 0 0 var(--bm-space-sm);
}

.bm-step__desc {
	color: rgba(254, 254, 250, 0.75);
	font-size: var(--bm-text-sm);
	line-height: 1.65;
	margin: 0;
}

/* ==========================================================================
   OUR STORY
   ========================================================================== */

.bm-story {
	padding: var(--bm-space-3xl) var(--bm-space-xl);
	background: var(--bm-white);
}

.bm-story__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--bm-space-3xl);
	max-width: 1200px;
	margin: 0 auto;
	align-items: center;
}

.bm-story__images {
	position: relative;
	min-height: 450px;
}

.bm-story__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--bm-radius-lg);
}

.bm-story__img--main {
	width: 80%;
	aspect-ratio: 3 / 4;
	border-radius: var(--bm-radius-lg);
	overflow: hidden;
	box-shadow: var(--bm-shadow-lg);
}

.bm-story__img--accent {
	position: absolute;
	bottom: -20px;
	right: 0;
	width: 55%;
	aspect-ratio: 4 / 3;
	border-radius: var(--bm-radius-lg);
	overflow: hidden;
	border: 4px solid var(--bm-white);
	box-shadow: var(--bm-shadow-lg);
}

.bm-story__text {
	padding-left: var(--bm-space-xl);
}

.bm-story__lead {
	font-size: var(--bm-text-xl);
	font-weight: 500;
	color: var(--bm-dark);
	line-height: 1.55;
	margin-bottom: var(--bm-space-md);
}

.bm-story__text p {
	color: var(--bm-grey);
	line-height: 1.7;
}

.bm-story__values {
	display: flex;
	flex-direction: column;
	gap: var(--bm-space-md);
	margin-top: var(--bm-space-xl);
}

.bm-value {
	display: flex;
	align-items: center;
	gap: var(--bm-space-sm);
	font-family: var(--bm-font-accent);
	font-weight: 600;
	font-size: var(--bm-text-base);
	color: var(--bm-dark);
}

.bm-value svg {
	color: var(--bm-secondary);
	flex-shrink: 0;
}

/* ==========================================================================
   FINAL CTA
   ========================================================================== */

.bm-cta-final {
	position: relative;
	padding: var(--bm-space-3xl) var(--bm-space-xl);
	min-height: 450px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
}

.bm-cta-final__bg {
	position: absolute;
	inset: 0;
}

.bm-cta-final__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bm-cta-final__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba(30, 29, 31, 0.85) 0%,
		rgba(75, 56, 47, 0.8) 100%
	);
}

.bm-cta-final__content {
	position: relative;
	z-index: 1;
}

.bm-cta-final__title {
	font-family: var(--bm-font-heading);
	font-size: clamp(2.5rem, 6vw, 4rem);
	color: var(--bm-white);
	margin: 0 0 var(--bm-space-md);
}

.bm-cta-final__subtitle {
	font-size: var(--bm-text-lg);
	color: rgba(254, 254, 250, 0.8);
	margin: 0 0 var(--bm-space-2xl);
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.bm-cta-final__buttons {
	display: flex;
	gap: var(--bm-space-md);
	justify-content: center;
	flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
	.bm-featured__track {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {

	/* Choose section stacks */
	.bm-choose__grid {
		grid-template-columns: 1fr;
		gap: var(--bm-space-lg);
	}

	.bm-choose__divider {
		padding: var(--bm-space-sm) 0;
	}

	.bm-choose__or::before,
	.bm-choose__or::after {
		display: none;
	}

	/* Process steps stack */
	.bm-process__steps {
		grid-template-columns: 1fr;
		gap: var(--bm-space-2xl);
	}

	/* Story stacks */
	.bm-story__grid {
		grid-template-columns: 1fr;
		gap: var(--bm-space-2xl);
	}

	.bm-story__images {
		min-height: 350px;
	}

	.bm-story__text {
		padding-left: 0;
	}

	/* Food cards 2-up on tablet, 1-up on phone */
	.bm-featured__track {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Buttons stack */
	.bm-cta-final__buttons {
		flex-direction: column;
		align-items: center;
	}
}

@media (max-width: 480px) {
	.bm-featured__track {
		grid-template-columns: 1fr;
	}

	.bm-hero__title {
		font-size: 2.5rem;
	}

	.bm-btn--lg {
		width: 100%;
		justify-content: center;
	}

	.bm-btn--xl {
		width: 100%;
		justify-content: center;
	}
}
