/*
 * Janda Events — Wedding Experience page.
 *
 * Figma "Experience Page" (desktop 1440×5725, mobile 428×7019). The hero and
 * the dark intro band are the Wedding Entertainment ones and are styled in
 * wedding-pages.css; only the three middle sections live here.
 */

/* ==========================================================================
   A natural rhythm from start to finish

   Figma: photo 672×540 on the container's left edge, copy column from 776.
   Every stage is in the markup; app.js shows one at a time and the arrows
   only appear on hover, so at rest the section is exactly the frame.
   ========================================================================== */

/*
 * Narrow: the nav row is 46 of buttons on a 24 margin, and the 428 frame draws
 * no arrows at all — it runs the step copy straight into the band below on 149.
 * Left at 64/64 the build spent 215 there, so the control read as a hole rather
 * than the end of the section. The bottom padding gives that 70 back; the
 * 64em block below resets padding-block outright, so desktop is untouched.
 */
.exp-rhythm {
	padding-block: var(--space-64) var(--space-24);
	padding-inline: var(--gutter);
	background-color: #fafafa;
}

.exp-rhythm__inner {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
}

.exp-rhythm__title {
	margin: 0 0 var(--space-48);
	color: var(--c-primary-500);
	text-align: center;
}

.exp-rhythm__stage {
	position: relative;
}

.exp-rhythm__steps {
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * Before JS runs every stage is in flow, so the copy is all readable. Once
 * initSteps adds is-stepped they are stacked and only the current one shows.
 */
.exp-rhythm__step + .exp-rhythm__step {
	margin-top: var(--space-48);
}

.exp-rhythm__media {
	margin: 0 0 var(--space-24);
}

.exp-rhythm__media img {
	width: 100%;
	height: 100%;
	aspect-ratio: 672 / 540;
	object-fit: cover;
	/*
	 * The subject of every step is the people. Four of the seven photos are
	 * landscape and cover this box with no vertical overflow at all, so this
	 * anchor only moves the three portrait ones — where the centre lands on a
	 * torso. Measured against each: 10 keeps every face in, 15 starts cutting
	 * the top of the head on step 07 and 25 loses it completely.
	 */
	object-position: 50% 10%;
}

.exp-rhythm__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-12);
}

.exp-rhythm__count {
	margin: 0;
	color: var(--c-primary-500);
	font-size: var(--fs-body-sm);
	letter-spacing: 0.08em;
}

.exp-rhythm__step-title {
	margin: 0;
	color: var(--c-body);
}

.exp-rhythm__text {
	margin: 0;
	color: var(--c-body);
	line-height: var(--lh-body);
}

/* The arrows are decoration until there is something to step through. */
.exp-rhythm__nav {
	display: none;
}

@media (min-width: 64em) {
	.exp-rhythm {
		padding-block: var(--space-96);
	}

	.exp-rhythm__step {
		display: grid;
		grid-template-columns: 46.7% minmax(0, 1fr); /* 672 / 1440 */
		align-items: center;
		gap: 0 var(--space-56, 3.5rem);
	}

	.exp-rhythm__media {
		margin: 0;
	}

	.exp-rhythm__copy {
		gap: var(--space-16);
		max-width: 520px;
	}
}

/*
 * Stepped mode. The stage is sized by the current panel; the rest are taken
 * out of flow on top of it so the section never jumps height between stages
 * that have different amounts of copy.
 */
.exp-rhythm__stage.is-stepped .exp-rhythm__steps {
	display: grid;
}

.exp-rhythm__stage.is-stepped .exp-rhythm__step {
	grid-area: 1 / 1;
	margin-top: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.exp-rhythm__stage.is-stepped .exp-rhythm__step[data-step-current] {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
	.exp-rhythm__stage.is-stepped .exp-rhythm__step {
		transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur);
	}

	.exp-rhythm__stage.is-stepped .exp-rhythm__step[data-step-current] {
		transition: opacity var(--dur) var(--ease), visibility 0s;
	}
}

@media (prefers-reduced-motion: reduce) {
	.exp-rhythm__stage.is-stepped .exp-rhythm__step {
		transition: none;
	}
}

.exp-rhythm__stage.is-stepped .exp-rhythm__nav {
	display: flex;
	justify-content: flex-end;
	gap: var(--space-8);
	margin-top: var(--space-24);
}

.exp-rhythm__nav .rail-btn--prev .icon {
	rotate: 180deg;
}

/*
 * On a wide screen they sit over the copy column and fade in on hover, the way
 * the front page's package rail does.
 *
 * The hidden state is deliberately NOT gated on (hover: hover) — if that query
 * fails to match for any reason the arrows would be stuck visible, which is the
 * wrong way round to fail. Instead they hide by default and (hover: none) puts
 * them back in flow for touch, where there is no hover to reveal them.
 */
@media (min-width: 64em) {
	.exp-rhythm__stage.is-stepped .exp-rhythm__nav {
		position: absolute;
		inset: auto 0 0 auto;
		margin-top: 0;
		opacity: 0;
		transition: opacity var(--dur) var(--ease);
	}

	.exp-rhythm__stage.is-stepped:hover .exp-rhythm__nav,
	.exp-rhythm__stage.is-stepped:focus-within .exp-rhythm__nav {
		opacity: 1;
	}
}

@media (hover: none) {
	.exp-rhythm__stage.is-stepped .exp-rhythm__nav {
		position: static;
		margin-top: var(--space-24);
		opacity: 1;
	}
}

/* ==========================================================================
   Everything that keeps your day flowing effortlessly

   Figma: copy in the left column, photo from 744 running off the right edge.
   ========================================================================== */

.exp-flow {
	padding-block: var(--space-40) var(--space-64);
	overflow: hidden;
	background-color: #fafafa;
}

.exp-flow__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-40);
	width: 100%;
	max-width: calc(var(--container) + (var(--gutter) * 2));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/*
 * The copy stack, at every width. This lived only in the 64em block, so on
 * mobile the heading, the paragraph and the lead — each margin:0 — ran
 * straight into one another with nothing between them.
 */
.exp-flow__copy {
	display: flex;
	flex-direction: column;
	gap: var(--space-24);
}

/*
 * The frame opens more air under the heading than between the blocks below it:
 * measured on the 428 export (Frame 1984078271, 2x), the copy sits 41 below the
 * heading's last line against 37 between the paragraph, the lead and the list.
 * The 24 stack gap plus this 8 is that 32.
 */
.exp-flow__title {
	margin: 0 0 var(--space-8);
	color: var(--c-primary-500);
}

/*
 * 18/27, as the list beside it already is. Both carried no size and fell back
 * to the 16px base, so the paragraph and the lead measured 16/24 against the
 * frame's 18/27 — the export sets the copy and the bullets at one size (ink
 * height 18 in both), and the build had them 2px apart.
 */
.exp-flow__text {
	color: var(--c-body);
	font-size: var(--fs-body-lg);
	line-height: var(--lh-body);
}

.exp-flow__text p {
	margin: 0;
}

.exp-flow__text p + p {
	margin-top: 1em;
}

.exp-flow__lead {
	margin: 0;
	color: var(--c-body);
	font-size: var(--fs-body-lg);
	line-height: var(--lh-body);
}

/*
 * 18/27 semibold, gap 12. The 600 used to sit on ::marker alone, so the bullets
 * carried the design's weight and the text did not (JE-35). Settled by setting
 * the eight items in Chrome at each candidate weight and comparing rendered
 * line widths against the 1440 export: at 18px/600 the first seven predict
 * 379/317/482/371/512/405/423 against a measured 379/317/481/371/513/405/423,
 * where 16px/400 is 40-50px short of every one and 500 and 700 miss by 4-6px
 * each. The frame's row pitch is 39 = a 27 line box plus a 12 gap, and the two
 * lines of the item that wraps sit exactly 27 apart. 428 agrees: 27 within an
 * item, 39 between them.
 */
.exp-flow__list {
	display: flex;
	flex-direction: column;
	gap: var(--space-12);
	margin: 0;
	padding-left: 1.25em;
	color: var(--c-body);
	font-size: var(--fs-body-lg);
	font-weight: var(--fw-semibold);
	line-height: var(--lh-body);
	list-style: disc outside;
}

.exp-flow__list li {
	padding-left: 0.25em;
}

/*
 * ::marker only honours a handful of properties, and font-family is one of
 * them — the disc is drawn from the font, so the body face has to be named
 * here or the bullet comes from the serif. Its weight now comes from the list.
 */
.exp-flow__list li::marker {
	font-family: var(--font-body);
}

.exp-flow__media {
	margin: 0;
}

.exp-flow__media img {
	width: 100%;
	height: 100%;
	aspect-ratio: 696 / 420;
	object-fit: cover;
}

@media (min-width: 64em) {
	/* The frame runs the photo nearly to the section edges, so this band is
	   tighter than the one above it. */
	.exp-flow {
		padding-block: var(--space-64);
	}

	.exp-flow__inner {
		flex-direction: row;
		align-items: center;
		gap: var(--space-48);
	}

	.exp-flow__copy {
		flex: 0 0 46.7%; /* 628 / 1344 — holds the heading to the design's two lines */
		min-width: 0;
	}

	/*
	 * Runs off the right of the screen as the frame does. min() keeps the
	 * plain behaviour below the container width — same construction as the
	 * Add To The Experience rail.
	 */
	.exp-flow__media {
		flex: 1 1 0;
		min-width: 0;
		margin-right: min(
			calc(var(--gutter) * -1),
			calc((var(--container) + (var(--gutter) * 2) - 100vw) / 2 - var(--gutter))
		);
	}

	.exp-flow__media img {
		aspect-ratio: auto;
		height: 700px; /* Figma 696x700 */
	}
}

/* ==========================================================================
   A wedding that feels like you; not a production
   ========================================================================== */

.exp-promise {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 560px;
	padding-block: var(--space-64);
	padding-inline: var(--gutter);
	overflow: hidden;
	color: var(--c-white);
	isolation: isolate;
	background-color: #14332f;
}

.exp-promise__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.exp-promise__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * A straight vertical ramp — clear at the top of the band, black at the bottom,
 * with no horizontal component at any width.
 *
 * Recovered by dividing the supplied frames by the source photo
 * (uploads/2026/08/seo-block.webp, re-covered to the band box). The 1440 frame
 * (Frame 1984078317, supplied at 2x) fits alpha = 0.008 + 0.997 * (y/H), and
 * the spread across x is under 0.01 at every row the division is clean on. The
 * 428 frame reads the same ramp: 0.007 / 0.139 / 0.307 / 0.506 / 0.703 / 0.904
 * / 0.971 at 1 / 14 / 31 / 51 / 71 / 91 / 97 percent down the band.
 *
 * This replaces a desktop-only left-to-right ramp (0.78 -> 0.06 across a 620px
 * copy column). Mobile already drew the vertical ramp as an override — JE-37,
 * where the copy's last two paragraphs sat over that ramp's 0.18 -> 0.06 tail —
 * so both widths now agree and the override goes with it.
 */
.exp-promise::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 1) 100%
	);
}

.exp-promise__inner {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
}

.exp-promise__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-24);
	max-width: 620px;
}

/* The frame runs the heading wider than the paragraphs beneath it, which is
   what keeps it to the designed two lines. */
.exp-promise__title {
	margin: 0;
	max-width: 900px;
	color: var(--c-white);
}

@media (min-width: 64em) {
	.exp-promise__title {
		width: 900px;
		max-width: none;
	}
}

.exp-promise__text {
	color: var(--c-white);
	opacity: 0.7;
	line-height: var(--lh-body);
}

/*
 * The paragraphs were already at 70% before they met the weakest part of the
 * wash, which compounded JE-37. The 428 frame's glyph cores read 204-208 over a
 * local ground of ~42, which solves to about 0.77 — the heading beside them
 * cores at a flat 255, so the frame really does hold the two apart.
 */
@media (max-width: 63.999em) {
	.exp-promise__text {
		opacity: 0.8;
	}
}

.exp-promise__text p {
	margin: 0;
}

.exp-promise__text p + p {
	margin-top: 1em;
}

@media (min-width: 64em) {
	.exp-promise {
		min-height: 722px; /* Figma 3042 -> 3764 */
		padding-block: var(--space-96);
	}
}
