/* ============================================================
   TERRENE 1.2.6 — PROCEDURAL CONTOUR PORTAL
   The active canvas renders the ridged surface itself, not an image layer.
   ============================================================ */
.terrain-entry--grocery {
	position: relative;
	isolation: isolate;
	background: #dfe0df;
	color: #fff;
}

.terrain-entry--grocery .terrain-stage {
	position: relative;
	width: 100%;
	height: 100svh;
	min-height: 620px;
	overflow: hidden;
	background: #dfe0df;
}

.terrain-entry--grocery .terrain-camera {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background: #dfe0df;
}

.terrain-entry--grocery .terrain-cover {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 58% 48%;
	transform-origin: 58.2% 48.5%;
}

.terrain-entry--grocery .terrain-camera.has-procedural-portal .terrain-cover {
	opacity: 0 !important;
	visibility: hidden !important;
}

.terrain-entry--grocery .terrain-procedural-portal {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	pointer-events: none;
	transform-origin: 58.2% 48.5%;
	will-change: opacity;
}

.terrain-entry--grocery.is-enhanced .terrain-invitation {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: block;
	padding: 0;
	margin: 0;
	opacity: 1;
	visibility: visible;
	pointer-events: none;
	text-align: left;
}

.terrain-entry--grocery.is-enhanced .terrain-invitation h1 {
	position: absolute;
	left: clamp(1.35rem, 1.9vw, 2.4rem);
	bottom: clamp(4.4rem, 7.4vh, 6.4rem);
	max-width: 8.5ch;
	margin: 0;
	color: #fff;
	font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
	font-size: clamp(4.5rem, 8.15vw, 9.4rem);
	font-weight: 500;
	letter-spacing: -.052em;
	line-height: .86;
	text-align: left;
	text-wrap: balance;
	text-shadow: 0 2px 18px rgba(45, 43, 42, .18);
}

.terrain-entry--grocery.is-enhanced .terrain-enter-link {
	position: absolute;
	right: clamp(1.35rem, 2.3vw, 2.8rem);
	bottom: clamp(1.25rem, 2.2vh, 2rem);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .65rem;
	min-width: 104px;
	padding: .82rem 1.05rem;
	border: 1px solid rgba(255,255,255,.22);
	border-radius: 8px;
	background: rgba(27, 27, 27, .58);
	color: #fff;
	font-family: var(--font-body, "DM Sans", sans-serif);
	font-size: .62rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-decoration: none;
	text-transform: uppercase;
	pointer-events: auto;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: background .25s ease, transform .25s ease;
}

.terrain-entry--grocery.is-enhanced .terrain-enter-link:hover {
	background: rgba(18, 18, 18, .82);
	transform: translateY(-2px);
}

.terrain-entry--grocery.is-enhanced .terrain-chapter {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	color: #fff;
	font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
	font-size: clamp(2.8rem, 5.7vw, 6.3rem);
	font-weight: 500;
	letter-spacing: -.025em;
	line-height: .98;
	text-align: center;
	text-shadow: 0 2px 20px rgba(25, 25, 25, .18);
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
}

.terrain-entry--grocery.is-enhanced .terrain-chapter span {
	max-width: 15ch;
}

.terrain-entry--grocery.is-enhanced .terrain-progress {
	position: absolute;
	z-index: 6;
	inset: auto 0 0;
	height: 2px;
	background: rgba(255,255,255,.2);
}

.terrain-entry--grocery .terrain-progress span {
	display: block;
	width: 100%;
	height: 100%;
	background: rgba(255,255,255,.84);
	transform: scaleX(0);
	transform-origin: left center;
}

@media (max-width: 767px) {
	.terrain-entry--grocery .terrain-stage {
		min-height: 560px;
		height: 100svh;
	}
	.terrain-entry--grocery.is-enhanced .terrain-invitation h1 {
		left: 1.15rem;
		bottom: 6.2rem;
		max-width: 8.5ch;
		font-size: clamp(3.1rem, 13.2vw, 5.2rem);
		line-height: .9;
	}
	.terrain-entry--grocery.is-enhanced .terrain-enter-link {
		right: 1.1rem;
		bottom: 1.1rem;
		min-width: 92px;
		padding: .72rem .9rem;
		font-size: .58rem;
	}
	.terrain-entry--grocery.is-enhanced .terrain-chapter {
		font-size: clamp(2.2rem, 8vw, 3.8rem);
		padding-inline: 1.2rem;
	}
}

@media (max-height: 650px) and (min-width: 768px) {
	.terrain-entry--grocery.is-enhanced .terrain-invitation h1 {
		bottom: 4.1rem;
		font-size: clamp(3.8rem, 7.8vw, 7rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.terrain-entry--grocery .terrain-procedural-portal {
		display: none !important;
	}
	.terrain-entry--grocery .terrain-camera.has-procedural-portal .terrain-cover {
		display: block !important;
		opacity: 1 !important;
		visibility: visible !important;
	}
}


/* 1.2.7 — continuous luminous inner contour tunnel; avoid black flash. */
.terrain-entry--grocery .terrain-camera.has-procedural-portal {
	background: #d7d9d9 !important;
}
.terrain-entry--grocery .terrain-procedural-portal {
	background: #d7d9d9;
}
.terrain-entry--grocery .terrain-camera.has-procedural-portal::after {
	content: none !important;
}


/* ============================================================
   1.2.8 — BENEFITS SECTION VISIBLE THROUGH THE PORTAL
   ============================================================ */
.terrain-entry--grocery .terrain-camera.has-procedural-portal {
	background: transparent !important;
	isolation: isolate;
}

.terrain-entry--grocery .terrain-benefit-underlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #f7f6f2;
	pointer-events: none;
}

.terrain-entry--grocery .terrain-benefit-underlay__section {
	position: relative;
	display: block;
	width: 100%;
	min-height: 100%;
	height: auto;
	margin: 0;
	overflow: hidden;
}

.terrain-entry--grocery .terrain-benefit-underlay__section .container {
	width: min(1480px, calc(100% - clamp(2rem, 7.5vw, 9rem)));
	margin-inline: auto;
}

.terrain-entry--grocery .terrain-benefit-underlay__section .benefit-panel {
	pointer-events: none;
}

.terrain-entry--grocery .terrain-procedural-portal {
	z-index: 3;
	background: transparent !important;
}

.terrain-entry--grocery .terrain-camera.has-procedural-portal .terrain-cover {
	opacity: 0 !important;
	visibility: hidden !important;
}

@media (max-width: 767px) {
	.terrain-entry--grocery .terrain-benefit-underlay__section .container {
		width: calc(100% - 2rem);
	}
}

.terrain-entry--grocery .terrain-procedural-portal { background-color: transparent !important; }




/* 1.3.0 — one clean portal-to-benefits handoff. */
.terrain-entry--grocery .terrain-camera {
	contain: paint;
}

.terrain-entry--grocery .terrain-benefit-underlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	max-height: 100%;
	overflow: hidden;
	opacity: 1;
	visibility: visible;
	pointer-events: none;
	contain: paint;
}

.terrain-entry--grocery .terrain-benefit-underlay__section {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	max-height: 100%;
	margin: 0;
	overflow: hidden;
}

.terrain-entry--grocery .terrain-benefit-underlay__section .benefit-panels {
	margin-bottom: 0;
}

.terrain-entry--grocery .terrain-procedural-portal {
	z-index: 3;
}

/* The clone is only a visual backing plate inside the pinned hero.
   The normal-flow #brand-story section is the only content after the hero. */


/* 1.3.1 — the first benefits copy is a temporary portal backing only. */
.terrain-entry--grocery .terrain-benefit-underlay {
	position: absolute !important;
	inset: 0 !important;
	z-index: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-height: 100% !important;
	overflow: hidden !important;
	contain: paint;
	pointer-events: none !important;
}

.terrain-entry--grocery .terrain-benefit-underlay__section {
	position: relative !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	max-height: 100% !important;
	margin: 0 !important;
	overflow: hidden !important;
}


/* 1.3.2 — fade the temporary mirror with the portal; retain only the real section. */
.terrain-entry--grocery .terrain-benefit-underlay {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-height: 100% !important;
	overflow: hidden !important;
	pointer-events: none !important;
	contain: paint;
}


/* 1.3.3 — direct Hero → native Brand Story handoff. */
body.home .terrain-entry--grocery + #brand-story,
body.front-page .terrain-entry--grocery + #brand-story {
	margin-top: 0 !important;
}


/* 1.3.9 — preview-only Brand Story copy must never create a second page section. */
.terrain-entry--grocery .terrain-camera {
	position: relative;
	overflow: hidden;
}

.terrain-entry--grocery .terrain-benefit-underlay {
	position: absolute !important;
	inset: 0 !important;
	z-index: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-height: 100% !important;
	overflow: hidden !important;
	pointer-events: none !important;
	contain: paint;
}

.terrain-entry--grocery .terrain-benefit-underlay__section {
	position: relative !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	max-height: 100% !important;
	margin: 0 !important;
	overflow: hidden !important;
}


/* ============================================================
   1.4.0 — ONE REAL BRAND STORY, MOVED THROUGH THE PORTAL
   The real #brand-story node is moved into the camera during the pinned
   journey, then restored to its original slot when the pin completes.
   ============================================================ */
.terrain-entry--grocery .terrain-camera > #brand-story.terrain-benefit-underlay {
	position: absolute !important;
	inset: 0 !important;
	z-index: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: 100% !important;
	margin: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
	contain: paint;
}

.terrain-entry--grocery .terrain-camera > #brand-story.terrain-benefit-underlay a,
.terrain-entry--grocery .terrain-camera > #brand-story.terrain-benefit-underlay summary,
.terrain-entry--grocery .terrain-camera > #brand-story.terrain-benefit-underlay button {
	pointer-events: none !important;
}

.terrain-story-placeholder {
	display: block;
	width: 100%;
	box-sizing: border-box;
	visibility: hidden;
	pointer-events: none;
}

.terrain-scroll-runway {
	display: block;
	width: 100%;
	height: 0;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden;
	visibility: hidden;
	pointer-events: none;
}


/* ============================================================
   1.4.2 — GSAP-PINNED PORTAL / SINGLE REAL BRAND STORY
   The stage remains a normal 100svh element in document flow. GSAP pins
   the stage during the deep-hole journey; the outer hero wrapper carries
   the calculated scroll distance. No CSS sticky fallback is used.
   ============================================================ */
.terrain-entry--grocery.is-enhanced {
	position: relative !important;
	z-index: 1 !important;
	min-height: 0 !important;
	overflow: visible !important;
}

.terrain-entry--grocery.is-enhanced .terrain-stage {
	/* Do not set position/top here: ScrollTrigger sets position:fixed while pinned. */
	width: 100% !important;
	height: 100vh !important;
	height: 100svh !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

.terrain-entry--grocery .terrain-camera > #brand-story.terrain-benefit-underlay {
	position: absolute !important;
	inset: 0 !important;
	z-index: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: 100% !important;
	margin: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
	contain: paint;
}

.terrain-entry--grocery .terrain-camera > #brand-story.terrain-benefit-underlay a,
.terrain-entry--grocery .terrain-camera > #brand-story.terrain-benefit-underlay summary,
.terrain-entry--grocery .terrain-camera > #brand-story.terrain-benefit-underlay button {
	pointer-events: none !important;
}

#brand-story.terrain-story-after-portal {
	position: relative !important;
	z-index: 20 !important;
}


/* 1.4.3 — Canvas 2D portal fallback uses the same aperture stacking as WebGL. */
.terrain-entry--grocery .terrain-procedural-portal--2d {
	position: absolute !important;
	inset: 0 !important;
	z-index: 3 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	pointer-events: none !important;
	background: transparent !important;
}
