/* ============================================================
 * Sourcing block (mc/sourcing)
 *
 * Dark photographic section with eyebrow, headline (with serif
 * italic em), body, and three numbered points.
 *
 * Color variables (--accent) come from the parent theme.
 * ============================================================ */

.wp-block-mc-sourcing.grocery {
	position: relative;
	z-index: 2;
	background: #14130F;
	color: #F3EEE6;
	padding: 104px 40px 108px;
	overflow: hidden;

	/* Brand accent — reads the theme.json palette token (the documented
	   convention) with a warm fallback for use outside the theme. The earlier
	   bare var(--accent) had no fallback and didn't resolve, so accent text
	   silently inherited the cream body color. */
	--groc-accent: var(--wp--preset--color--accent, #C2703D);

	/* Overlay tuning — locked values from the design comp. */
	--groc-rgb: 20, 18, 15;
	--groc-a: 0.690;
	--groc-line: rgba(243, 238, 230, .14);
}

/* Box-sizing reset, scoped to this block. bmuller-blocks ships this globally
   in base.css for all bm-* classes; mc-blocks has no global reset, so the
   block supplies its own. Required for alignfull: width:100vw + horizontal
   padding folds INSIDE the viewport instead of adding to it (which would
   otherwise cause a horizontal scrollbar). */
.wp-block-mc-sourcing,
.wp-block-mc-sourcing *,
.wp-block-mc-sourcing::before,
.wp-block-mc-sourcing::after {
	box-sizing: border-box;
}

/* Alignment — driven by the block toolbar (None / Wide / Full).
   Mirrors the bmuller-blocks pattern: full bleeds edge-to-edge via the
   50% - 50vw margin trick; wide constrains to 1240px. With neither class the
   block sits at the theme's default content width. */
body .wp-block-mc-sourcing.alignfull {
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	width: 100vw !important;
	max-width: 100vw !important;
}

body .wp-block-mc-sourcing.alignwide {
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 1240px !important;
}

/* Photographic background — sits beneath the overlay. */
.wp-block-mc-sourcing .grocery-bg-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Legibility overlay — between photo and text.
   The block always emits data-style="left" so the overlay fades
   from a darker left edge to a lighter right edge, letting the
   photo show through behind the body copy. */
.wp-block-mc-sourcing .grocery-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.wp-block-mc-sourcing[data-style="left"] .grocery-overlay {
	background: linear-gradient(to right,
		rgba(var(--groc-rgb), calc(var(--groc-a) + 0.22)) 0%,
		rgba(var(--groc-rgb), var(--groc-a)) 46%,
		rgba(var(--groc-rgb), calc(var(--groc-a) * 0.45)) 100%);
}

.wp-block-mc-sourcing .grocery-inner {
	position: relative;
	z-index: 1;
	max-width: 1240px;
	margin: 0 auto;
}

/* Eyebrow — uppercase monospace, flush-left with the headline, accent color. */
.wp-block-mc-sourcing .grocery-eyebrow {
	font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	text-align: left;
	color: var(--groc-accent);
	display: inline-block;
}

/* Headline + body in a two-column grid, separated by a hairline rule. */
.wp-block-mc-sourcing .grocery-head {
	display: grid;
	grid-template-columns: 1.12fr 0.88fr;
	gap: 56px 72px;
	align-items: end;
	padding-bottom: 56px;
	margin-top: 26px;
	border-bottom: 1px solid var(--groc-line);
}

.wp-block-mc-sourcing .grocery-title {
	font-family: 'Inter Tight', 'SF Pro Display', -apple-system, sans-serif;
	font-weight: 600;
	font-size: clamp(36px, 4.4vw, 60px);
	letter-spacing: -0.036em;
	line-height: 1.0;
	color: #F8F4ED;
	text-wrap: balance;
	margin: 0;
}

.wp-block-mc-sourcing .grocery-title em {
	font-family: 'Instrument Serif', 'Cormorant Garamond', serif;
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: #F8F4ED;
}

.wp-block-mc-sourcing .grocery-body {
	font-size: 16px;
	line-height: 1.62;
	color: rgba(243, 238, 230, .92);
	max-width: 43ch;
	text-wrap: balance;
	margin: 0;
}

/* Three-up numbered points row. */
.wp-block-mc-sourcing .grocery-points {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin-top: 52px;
}

.wp-block-mc-sourcing .grocery-point {
	padding: 4px 44px 0;
	border-left: 1px solid var(--groc-line);
}

.wp-block-mc-sourcing .grocery-point:first-child {
	padding-left: 0;
	border-left: 0;
}

.wp-block-mc-sourcing .grocery-point:last-child {
	padding-right: 0;
}

.wp-block-mc-sourcing .grocery-point .pnum {
	font-family: 'Instrument Serif', 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 26px;
	line-height: 1;
	color: var(--groc-accent);
	display: block;
	margin-bottom: 14px;
}

.wp-block-mc-sourcing .grocery-point .ptitle {
	font-family: 'Inter Tight', 'SF Pro Display', -apple-system, sans-serif;
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -0.016em;
	line-height: 1.28;
	color: #F3EEE6;
	text-wrap: balance;
	margin: 0;
}

@media (max-width: 860px) {
	.wp-block-mc-sourcing.grocery {
		padding: 76px 28px 80px;
	}

	.wp-block-mc-sourcing .grocery-head {
		grid-template-columns: 1fr;
		gap: 28px;
		align-items: start;
		padding-bottom: 40px;
	}

	.wp-block-mc-sourcing .grocery-points {
		grid-template-columns: 1fr;
		margin-top: 8px;
	}

	.wp-block-mc-sourcing .grocery-point {
		padding: 28px 0;
		border-left: 0;
		border-top: 1px solid var(--groc-line);
	}

	.wp-block-mc-sourcing .grocery-point:first-child {
		border-top: 0;
	}

	.wp-block-mc-sourcing .grocery-point .pnum {
		margin-bottom: 12px;
	}
}
