/* =====================================================================
   HRI Gallery — "TRUELY BLISS." + two moving photo columns.   v1.0

   Figma frame 2359 × 1066 (file "6"); sizes = Figma px ÷ 2359 (vw):
     heading    Cormorant Garamond Light 128 → 5.426vw, centred,
                baseline on the screen's middle line (line-height 1 puts
                the baseline 0.8185em below the top of the line box)
     cards      413 → 17.507vw square, radius 20 (0.848vw), gap 20
                (0.848vw); shadow 30/24/32/−12 black 50% (in vw)
     left col   x 400 (16.956vw), first card top 28.05% of the screen
     right col  x 1516 (64.265vw), a card top at 24.3% (one above it)
   Photos sit above the heading, as in Figma.

   The section is 100svh + the pinned length tall; the stage sticks to
   the top while gallery.js moves the columns.
   ===================================================================== */

.hri-gl {
	--hri-gl-bg: #fff6ea;
	--hri-gl-ink: #000000;
	--hri-gl-fs: 5.426vw;
	--hri-gl-card: 17.507vw;
	--hri-gl-gap: 0.848vw;
	--hri-gl-radius: 0.848vw;
	--hri-gl-x1: 16.956vw;
	--hri-gl-x2: 64.265vw;
	--hri-gl-y1: 28.05%;
	--hri-gl-y2: 24.3%;
	--hri-gl-shadow: 1.272vw 1.017vw 1.357vw -0.509vw rgba(0, 0, 0, 0.5);

	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: calc(100vh + var(--hri-gl-pin, 0) * 1vh);
	height: calc(100svh + var(--hri-gl-pin, 0) * 1svh);
	margin: 0;
	padding: 0;
	background: var(--hri-gl-bg);
	box-sizing: border-box;
}

.hri-gl *,
.hri-gl *::before,
.hri-gl *::after {
	box-sizing: border-box;
}

.hri-gl__stage {
	position: sticky;
	top: 0;
	width: 100%;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
	background: var(--hri-gl-bg);
}

.admin-bar .hri-gl__stage {
	top: 32px;
	height: calc(100svh - 32px);
}

/* ---------------------------------------------------------------------
   Heading
   --------------------------------------------------------------------- */
.hri-gl__slot {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	z-index: 1;
	margin-top: -0.8185em; /* baseline on the middle line */
	font-size: var(--hri-gl-fs);
	line-height: 1;
	text-align: center;
	pointer-events: none;
}

.hri-gl .hri-gl__title {
	display: block;
	margin: 0;
	padding: 0;
	font-family: "HRI Cormorant", "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
	font-size: 1em;
	font-weight: 300;
	font-style: normal;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	color: var(--hri-gl-ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transform-origin: 50% 0;
}

/* ---------------------------------------------------------------------
   Columns
   --------------------------------------------------------------------- */
.hri-gl__col {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 2;
	width: var(--hri-gl-card);
}

.hri-gl__col--1 {
	left: var(--hri-gl-x1);
}

.hri-gl__col--2 {
	left: var(--hri-gl-x2);
}

.hri-gl__track {
	position: absolute;
	left: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	gap: var(--hri-gl-gap);
	will-change: transform;
}

/* Without JS: Figma positions. gallery.js takes over (.is-live). */
.hri-gl__col--1 .hri-gl__track {
	top: var(--hri-gl-y1);
}

.hri-gl__col--2 .hri-gl__track {
	top: calc(var(--hri-gl-y2) - var(--hri-gl-card) - var(--hri-gl-gap));
}

.hri-gl.is-live .hri-gl__track {
	top: 0;
}

.hri-gl__set {
	display: flex;
	flex-direction: column;
	flex: none;
	gap: var(--hri-gl-gap);
}

.hri-gl .hri-gl__card {
	position: relative;
	display: block;
	flex: none;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border-radius: var(--hri-gl-radius);
	background: #e9dfd0;
	box-shadow: var(--hri-gl-shadow);
}

.hri-gl .hri-gl__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: 50% 50%;
	border: 0;
	border-radius: 0;
}

/* ---------------------------------------------------------------------
   Phones: smaller cards set further out so the heading still reads
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
	.hri-gl {
		--hri-gl-fs: 11.5vw;
		--hri-gl-card: 30vw;
		--hri-gl-gap: 2.6vw;
		--hri-gl-radius: 3vw;
		--hri-gl-x1: -6vw;
		--hri-gl-x2: 76vw;
		--hri-gl-shadow: 2vw 1.8vw 3vw -1vw rgba(0, 0, 0, 0.45);
	}
}

/* Editor / reduced motion: no pinning, everything in place. */
.elementor-editor-active .hri-gl {
	height: 100vh;
	height: 100svh;
}

.elementor-editor-active .hri-gl .hri-gl__mover {
	transform: none !important;
	opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
	.hri-gl {
		height: 100vh;
		height: 100svh;
	}

	.hri-gl .hri-gl__mover {
		transform: none !important;
		opacity: 1 !important;
	}
}

/* Full-bleed, whatever the Elementor container settings are. */
.e-con:has(> .elementor-widget-hri-gallery),
.e-con:has(> .e-con-inner > .elementor-widget-hri-gallery) {
	--content-width: 100% !important;
	width: 100% !important;
	max-width: none !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
	border: 0 !important;
	overflow: visible !important;
}

.e-con:has(> .e-con-inner > .elementor-widget-hri-gallery) > .e-con-inner {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
}

.elementor-widget-hri-gallery,
.elementor-widget-hri-gallery > .elementor-widget-container {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}