/**
 * 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.
   Astra's .ast-container uses display:flex for content+sidebar layout;
   override to block so .bm-front isn't height-constrained by flex. */
.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,
.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;
}

.page-template-front-page .ast-container {
	display: block !important;
	height: auto !important;
	overflow: visible !important;
}

.page-template-front-page .ast-primary-header-bar .site-primary-header-wrap.ast-container {
	box-sizing: border-box;
	padding-left: clamp(1rem, 2vw, 2rem) !important;
	padding-right: clamp(1rem, 2vw, 2rem) !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: 37.5rem;
	margin: 0 auto;
	line-height: 1.6;
}

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

/*
 * Reveal is opt-in: elements start visible by default and only become
 * hidden once JS confirms the IntersectionObserver is available.
 * This prevents blank-page flash when the observer fails to fire.
 */
.bm-reveal {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

/* JS adds this class to the <html> element when the observer is ready */
.bm-reveal-ready .bm-reveal {
	opacity: 0;
	transform: translateY(1.875rem);
}

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

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

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

.bm-hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	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%;
	transform: scale(1.03);
}

/* Reduced-motion: show hero text immediately instead of animating */
@media (prefers-reduced-motion: reduce) {
	.bm-hero__tagline,
	.bm-hero__title,
	.bm-hero__subtitle,
	.bm-hero__cta-group {
		opacity: 1 !important;
		animation: none !important;
		transform: none !important;
	}
}

.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: 50rem;
	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: 1.5rem;
	height: 2.5rem;
	border: 2px solid rgba(254, 254, 250, 0.4);
	border-radius: 0.75rem;
	position: relative;
}

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

@keyframes bm-scrollDot {
	0%   { opacity: 1; top: 0.375rem; }
	100% { opacity: 0; top: 1.375rem; }
}

@keyframes bm-fadeUp {
	from { opacity: 0; transform: translateY(1.5rem); }
	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: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
	gap: var(--bm-space-xl);
	max-width: 75rem;
	margin: 0 auto;
	align-items: stretch;
}

/* Divider between cards */
.bm-choose__divider {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0.85rem;
	pointer-events: none;
}

.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: 3.75rem;
	background: var(--bm-toasted-tan);
}

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

/* 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;
}

.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);
}

.bm-path-card--catering .bm-path-card__cta {
	color: var(--bm-accent-dark);
}

/* ==========================================================================
   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: 75rem;
	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;
}

.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: 62.5rem;
	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: 3.5rem;
	height: 3.5rem;
	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: 75rem;
	margin: 0 auto;
	align-items: center;
}

.bm-story__images {
	position: relative;
	min-height: 28.125rem;
}

.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: -1.25rem;
	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: 28.125rem;
	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: 31.25rem;
	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 (min-width: 90em) {
	.bm-hero__content {
		max-width: 60rem;
	}

	.bm-choose__grid,
	.bm-featured__track,
	.bm-story__grid {
		max-width: 85rem;
	}

	.bm-process__content {
		max-width: 75rem;
	}
}

@media (min-width: 160em) {
	.bm-hero__content {
		max-width: 70rem;
	}

	.bm-choose__grid,
	.bm-featured__track,
	.bm-story__grid {
		max-width: 100rem;
	}

	.bm-process__content {
		max-width: 85rem;
	}

	.bm-featured__track {
		grid-template-columns: repeat(4, 1fr);
		gap: var(--bm-space-xl);
	}
}

@media (max-width: 64em) {
	.bm-choose__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.bm-choose__divider {
		display: none;
	}

	.bm-featured__track {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 48em) {

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

	.bm-choose__divider {
		display: none;
	}

	.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: 21.875rem;
	}

	.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: 30em) {
	.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;
	}
}
