/*
 * Phase 4 variants — Hero AB (2a–2f), Process AB (1a–1d), Cards AB (1a–1c).
 * Values from the design files; photo stacks use individual library photos (D-030).
 */

/* ======================================================================
 * Photo stacks (shared)
 * ==================================================================== */

.lp-stack { position: relative; }

.lp-stack__photo {
	margin: 0;
	overflow: hidden;
	border-radius: var(--lp-radius-md);
	background: var(--lp-paper-2);
	box-shadow: var(--lp-shadow-3);
}

/* Fan: three photos in a row, outer two rotated and tucked behind the middle (2a, 2f). */
.lp-stack--fan {
	display: flex;
	align-items: center;
	justify-content: center;
	height: clamp(170px, 22vw, 230px);
	margin-block: var(--lp-s-2) var(--lp-s-6);
}

.lp-stack--fan .lp-stack__photo--1,
.lp-stack--fan .lp-stack__photo--3 {
	z-index: 1;
	width: clamp(110px, 15vw, 170px);
	height: clamp(130px, 17vw, 195px);
}

.lp-stack--fan .lp-stack__photo--1 { transform: rotate(-7deg) translate(22px, 12px); }
.lp-stack--fan .lp-stack__photo--3 { transform: rotate(7deg) translate(-22px, 12px); }

.lp-stack--fan .lp-stack__photo--2 {
	z-index: 2;
	width: clamp(150px, 20vw, 220px);
	height: clamp(150px, 19vw, 215px);
	margin: 0 calc(-1 * var(--lp-s-3));
	border-radius: var(--lp-radius-md);
	box-shadow: var(--lp-shadow-3);
}

/* Matted: light backgrounds get a paper border instead of a heavy shadow (2f). */
.lp-stack--matted .lp-stack__photo { box-shadow: 0 0 0 4px var(--lp-paper-2), var(--lp-shadow-3); }
.lp-stack--matted .lp-stack__photo--2 { box-shadow: 0 0 0 4px var(--lp-paper-2), var(--lp-shadow-3); }

/* Pair: two overlapping rotated photos filling their column (2b, process 1c). */
.lp-stack--pair { min-height: 420px; }

.lp-stack--pair .lp-stack__photo {
	position: absolute;
	aspect-ratio: 4 / 5;
	border-radius: var(--lp-radius-md);
}

.lp-stack--pair .lp-stack__photo--1 { top: 10%; left: 6%; width: 52%; transform: rotate(-4deg); }
.lp-stack--pair .lp-stack__photo--2 { right: 4%; bottom: 6%; width: 48%; transform: rotate(3deg); }

.lp-stack--glow .lp-stack__photo { box-shadow: 0 0 0 1px color-mix(in srgb, var(--lp-accent) 35%, transparent), var(--lp-shadow-3); }

/* Process 1c pair: sized by aspect ratio so it never spills into the list below. */
.lp-stack--soft {
	justify-self: end;
	width: 100%;
	max-width: 460px;
	min-height: 0;
	aspect-ratio: 5 / 4;
}

.lp-stack--soft .lp-stack__photo--1 { top: 2%; width: 50%; }
.lp-stack--soft .lp-stack__photo--2 { bottom: 2%; width: 50%; }

.lp-process__intro {
	max-width: 560px;
	margin: 0;
	color: var(--lp-ink-soft);
	font-size: var(--lp-fs-2);
	line-height: var(--lp-lh-body);
}
.lp-stack--soft .lp-stack__photo { box-shadow: 0 0 0 1px var(--lp-border), var(--lp-shadow-2); }

/* Framed: two upright photos side by side with a mint ring, second dropped (2c). */
.lp-stack--framed {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--lp-s-4);
	margin-bottom: var(--lp-s-5);
}

.lp-stack--framed .lp-stack__photo {
	width: clamp(150px, 22vw, 220px);
	aspect-ratio: 11 / 10;
	box-shadow: 0 0 0 2px var(--lp-accent), var(--lp-shadow-3);
}

.lp-stack--framed .lp-stack__photo--2 { margin-top: var(--lp-s-5); }

/* Scatter: three rotated photos spread across their column (2e). */
.lp-stack--scatter { min-height: 440px; }

.lp-stack--scatter .lp-stack__photo {
	position: absolute;
	aspect-ratio: 4 / 5;
	box-shadow: var(--lp-shadow-3);
}

.lp-stack--scatter .lp-stack__photo--1 { z-index: 1; top: 6%; left: 2%; width: 44%; transform: rotate(-10deg); }
.lp-stack--scatter .lp-stack__photo--2 { z-index: 2; top: 20%; left: 28%; width: 48%; border-radius: var(--lp-radius-md); transform: rotate(3deg); box-shadow: var(--lp-shadow-3); }
.lp-stack--scatter .lp-stack__photo--3 { z-index: 1; right: 4%; bottom: 4%; width: 40%; transform: rotate(11deg); }

/* ======================================================================
 * Hero options 2a–2f
 * ==================================================================== */

.lp-hero2 {
	position: relative;
	overflow: hidden;
	border-radius: 0 0 var(--lp-radius-xl) var(--lp-radius-xl);
}

.lp-hero2__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--lp-max);
	margin: 0 auto;
	padding: clamp(var(--lp-s-7), 6vw, var(--lp-s-8)) var(--lp-gutter) clamp(var(--lp-s-7), 6vw, var(--lp-s-8));
}

.lp-hero2__title {
	margin-bottom: var(--lp-s-5);
	font-size: var(--lp-fs-6);
	line-height: var(--lp-lh-display);
}

.lp-hero2__text {
	max-width: 420px;
	margin: 0 0 var(--lp-s-5);
	font-size: var(--lp-fs-2);
	line-height: var(--lp-lh-body);
}

.lp-hero2__tagline {
	margin: 0 0 var(--lp-s-5);
	font-size: var(--lp-fs-2);
}

/* Dark / light palettes */
.lp-hero2--dark { background: var(--lp-surface-dark); color: var(--lp-on-dark); }
.lp-hero2--2a { background: var(--lp-surface-dark); }
.lp-hero2--dark .lp-hero2__title { color: var(--lp-on-dark); }
.lp-hero2--dark .lp-serif { color: var(--lp-accent); }
.lp-hero2--dark .lp-eyebrow { color: var(--lp-green-on-dark); }
.lp-hero2--dark .lp-hero2__text,
.lp-hero2--dark .lp-hero2__tagline { color: var(--lp-text-on-dark); }

.lp-hero2--light { background: var(--lp-paper-2); }
.lp-hero2--light .lp-serif { color: var(--lp-green-display); }
.lp-hero2--light .lp-hero2__tagline { color: var(--lp-muted); }

/* Centred layouts (2a, 2c, 2f) */
.lp-hero2--centred .lp-hero2__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.lp-hero2--centred .lp-hero2__title { max-width: 780px; }

/* Split layouts (2b, 2e): copy left, stack right */
.lp-hero2--split .lp-hero2__inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: var(--lp-gap);
	min-height: clamp(460px, 64vh, 560px);
	padding-block: clamp(var(--lp-s-5), 4vw, var(--lp-s-7));
}

.lp-hero2--split .lp-hero2__title { font-size: var(--lp-fs-6); }

/* Outline secondary button on dark (2a) */
.lp-btn--outline-light {
	margin-bottom: var(--lp-s-6);
	padding: var(--lp-s-2) var(--lp-s-5);
	border: 1px solid color-mix(in srgb, var(--lp-accent) 50%, transparent);
	background: transparent;
	color: var(--lp-on-dark);
	font-size: var(--lp-fs-1);
	letter-spacing: var(--lp-track-label);
	text-transform: uppercase;
}

.lp-btn--outline-light:hover {
	border-color: var(--lp-accent);
	color: var(--lp-accent);
}

/* 2d: tiled photo wall under a dark gradient, copy bottom-left */
.lp-hero2--2d {
	display: flex;
	align-items: flex-end;
	min-height: clamp(460px, 70vh, 600px);
	background: var(--lp-surface-dark);
}

.lp-hero2__wall {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: var(--lp-s-1);
}

.lp-hero2__wall img { min-height: 0; }

.lp-hero2--2d::after {
	content: "";
	position: absolute;
	inset: 0;
	/* Darker through the lower half than the design: the tile wall is busier than its single photo. */
	background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.28) 75%, rgba(0, 0, 0, 0.4) 100%);
	pointer-events: none;
}

.lp-hero2--2d .lp-hero2__title { max-width: 620px; }
.lp-hero2--2d .lp-eyebrow { color: var(--lp-accent); }

.lp-hero2__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--lp-s-5);
}

.lp-hero2__tagline--inline { margin: 0; font-size: var(--lp-fs-1); }

@media (max-width: 1023px) {
	.lp-hero2--split .lp-hero2__inner { grid-template-columns: 1fr; min-height: 0; }
	.lp-stack--pair,
	.lp-stack--scatter { min-height: clamp(320px, 90vw, 420px); }
	.lp-hero2__wall { grid-template-columns: repeat(3, 1fr); }
	.lp-hero2__wall img:nth-child(n + 7) { display: none; }
}

/* ======================================================================
 * Process options (How We Work)
 * ==================================================================== */

.lp-process__head .lp-label { margin-bottom: var(--lp-s-5); }

/* 1a: photo beside the label */
.lp-process--photo .lp-process__head {
	display: grid;
	grid-template-columns: 1fr minmax(240px, 440px);
	align-items: center;
	gap: var(--lp-s-6);
	margin-bottom: var(--lp-s-5);
}

.lp-process--photo .lp-process__head .lp-label { margin-bottom: var(--lp-s-3); }
.lp-process--list .lp-process__head .lp-label { margin-bottom: var(--lp-s-3); }

.lp-process__photo {
	aspect-ratio: 4 / 3;
	margin: 0;
	overflow: hidden;
	border-radius: var(--lp-radius-lg);
}

/* 1c: rotated photo pair + numbered list */
.lp-process--list .lp-process__head {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	align-items: center;
	gap: var(--lp-s-6);
	margin-bottom: var(--lp-s-6);
}

.lp-numbered {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
	gap: 0 var(--lp-s-6);
	margin: 0;
	padding: 0;
	list-style: none;
}

.lp-numbered__item {
	display: flex;
	align-items: center;
	gap: var(--lp-s-4);
	padding: var(--lp-s-3) var(--lp-s-1);
	border-top: 1px solid color-mix(in srgb, var(--lp-ink) 10%, transparent);
	color: var(--lp-ink-soft);
	font-size: var(--lp-fs-2);
}

.lp-numbered__num {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--lp-accent);
	color: var(--lp-on-accent);
	font-size: var(--lp-fs-1);
	font-weight: var(--lp-weight-bold);
}

/* 1d: dark band, numbered cards */
.lp-band--tight { margin-top: var(--lp-section-y); }

.lp-numcards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--lp-s-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.lp-numcards__item {
	padding: var(--lp-s-4) var(--lp-s-4);
	border-top: 2px solid var(--lp-accent);
	border-radius: var(--lp-radius-md);
	background: color-mix(in srgb, var(--lp-offwhite) 6%, transparent);
}

.lp-numcards__num {
	display: block;
	margin-bottom: var(--lp-s-3);
	color: var(--lp-accent);
	font-size: var(--lp-fs-4);
	font-weight: var(--lp-weight-bold);
}

.lp-numcards__text {
	margin: 0;
	color: color-mix(in srgb, var(--lp-offwhite) 85%, transparent);
	font-size: var(--lp-fs-1);
	line-height: var(--lp-lh-body);
}

/* ======================================================================
 * Card options (Home)
 * ==================================================================== */

/* 1a: tilted photo row replaces the mosaic */
.lp-mosaic--tilted {
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: auto;
	gap: var(--lp-s-5);
	padding-top: var(--lp-s-3);
}

.lp-mosaic--tilted .lp-mosaic__tile {
	aspect-ratio: 4 / 5;
	box-shadow: var(--lp-shadow-3);
}

.lp-mosaic--tilted .lp-mosaic__tile:nth-child(1) { transform: rotate(-5deg); }
.lp-mosaic--tilted .lp-mosaic__tile:nth-child(2) { z-index: 1; transform: rotate(3deg) translateY(-10px); box-shadow: var(--lp-shadow-3); }
.lp-mosaic--tilted .lp-mosaic__tile:nth-child(3) { transform: rotate(-3deg); }
.lp-mosaic--tilted .lp-mosaic__tile:hover img { transform: none; }

/* 1b: compact "How we can help" cards with a rotated icon badge */
.lp-card--badge {
	gap: var(--lp-s-4);
	padding: var(--lp-s-5) var(--lp-s-4);
}

.lp-card__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: var(--lp-radius-md);
	background: var(--lp-accent);
	box-shadow: var(--lp-shadow-2);
	transform: rotate(-6deg);
}

.lp-card--badge:nth-child(2) .lp-card__badge { transform: rotate(5deg); }
.lp-card--badge:nth-child(3) .lp-card__badge { transform: rotate(-4deg); }
.lp-card__badge .lp-i-fill { fill: var(--lp-offwhite); }

/* 1c: dark "What we do" cards with rotated photos + callout card */
.lp-darkcards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--lp-s-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.lp-darkcards__item {
	display: flex;
	flex-direction: column;
	gap: var(--lp-s-4);
	padding: var(--lp-s-4);
	border-radius: var(--lp-radius-md);
	background: color-mix(in srgb, var(--lp-offwhite) 6%, transparent);
}

.lp-darkcards__photo {
	aspect-ratio: 1 / 1;
	margin: 0;
	overflow: hidden;
	border-radius: var(--lp-radius-sm);
	box-shadow: var(--lp-shadow-2);
	transform: rotate(-4deg);
}

.lp-darkcards__photo--2 { transform: rotate(4deg); }

.lp-darkcards__caption {
	margin: 0;
	color: var(--lp-on-dark-82);
	font-size: var(--lp-fs-2);
}

.lp-darkcards__item--callout {
	justify-content: flex-end;
	background: var(--lp-accent);
}

.lp-darkcards__item--callout p {
	margin: 0;
	color: var(--lp-ink);
	font-size: var(--lp-fs-2);
	font-weight: var(--lp-weight-bold);
	line-height: var(--lp-lh-snug);
}

/* ======================================================================
 * Process: vertical timeline with scroll progress (default, D-032)
 * ==================================================================== */

.lp-timeline-wrap { padding-top: var(--lp-section-y); }

.lp-timeline-wrap__head {
	max-width: 640px;
	margin: 0 auto clamp(var(--lp-s-6), 5vw, var(--lp-s-7));
	text-align: center;
}

.lp-timeline-wrap__head .lp-label { margin-bottom: var(--lp-s-3); }
.lp-timeline-wrap__head .lp-process__intro { margin-inline: auto; }

.lp-timeline {
	--lp-progress: 1; /* JS animates 0 → 1; without JS the line shows complete. */
	position: relative;
	max-width: 1080px;
	margin: 0 auto;
}

.lp-timeline { overflow-x: clip; } /* the reveal animation starts cards off to the side */

.lp-timeline__track {
	position: absolute;
	top: 22px;
	bottom: 22px;
	left: 50%;
	width: 2px;
	border-radius: var(--lp-radius-sm);
	background: var(--lp-border);
	transform: translateX(-50%);
}

.lp-timeline__fill {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: calc(var(--lp-progress) * 100%);
	border-radius: var(--lp-radius-sm);
	background: var(--lp-green);
}

.lp-timeline__list {
	display: grid;
	gap: clamp(var(--lp-s-4), 3vw, var(--lp-s-5));
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Wide screens: card | node | card, alternating sides. */
.lp-timeline__step {
	display: grid;
	grid-template-columns: 1fr 72px 1fr;
	align-items: center;
}

.lp-timeline__node {
	z-index: 1;
	display: flex;
	grid-row: 1;
	grid-column: 2;
	align-items: center;
	justify-content: center;
	justify-self: center;
	width: 44px;
	height: 44px;
	border: 2px solid var(--lp-border-strong);
	border-radius: 50%;
	background: var(--lp-paper);
	color: var(--lp-muted);
	font-size: var(--lp-fs-1);
	font-weight: var(--lp-weight-bold);
	transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.lp-timeline__card {
	position: relative;
	display: flex;
	grid-row: 1;
	grid-column: 1;
	align-items: center;
	gap: var(--lp-s-4);
	padding: var(--lp-s-4) var(--lp-s-5);
	border: 1px solid var(--lp-border);
	border-radius: var(--lp-radius-lg);
	background: var(--lp-card);
	box-shadow: var(--lp-shadow-1);
	transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.lp-timeline__step:nth-child(even) .lp-timeline__card { grid-column: 3; }

/* Short connector from card to the centre line */
.lp-timeline__card::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -14px;
	width: 14px;
	height: 2px;
	background: var(--lp-border);
}

.lp-timeline__step:nth-child(even) .lp-timeline__card::after { right: auto; left: -14px; }

.lp-timeline__icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--lp-green-tint);
}

.lp-timeline__kicker {
	display: block;
	margin-bottom: var(--lp-s-1);
	color: var(--lp-green-text);
	font-size: var(--lp-fs-1);
	font-weight: var(--lp-weight-bold);
	letter-spacing: var(--lp-track-label);
	text-transform: uppercase;
}

.lp-timeline__text {
	margin: 0;
	color: var(--lp-ink-soft);
	font-size: var(--lp-fs-2);
	line-height: var(--lp-lh-body);
}

/* Reached: node lights up in the accent */
.lp-timeline__step.is-reached .lp-timeline__node {
	border-color: var(--lp-green);
	background: var(--lp-accent);
	box-shadow: 0 0 0 6px color-mix(in srgb, var(--lp-accent) 30%, transparent);
	color: var(--lp-ink);
}

.lp-timeline__step.is-reached .lp-timeline__card { box-shadow: var(--lp-shadow-3); }

/* Reveal on scroll (only when JS is running) */
.lp-js .lp-timeline__step:not(.is-visible) .lp-timeline__card {
	opacity: 0;
	transform: translateX(-28px);
}

.lp-js .lp-timeline__step:nth-child(even):not(.is-visible) .lp-timeline__card { transform: translateX(28px); }

/* Phones: line on the left, all cards to its right */
@media (max-width: 1023px) {
	.lp-timeline__track { left: 21px; transform: none; }

	.lp-timeline__step,
	.lp-timeline__step:nth-child(even) { grid-template-columns: 44px 1fr; column-gap: var(--lp-s-4); }

	.lp-timeline__node { grid-column: 1; }

	.lp-timeline__card,
	.lp-timeline__step:nth-child(even) .lp-timeline__card {
		grid-column: 2;
		align-items: flex-start;
		gap: var(--lp-s-3);
		padding: var(--lp-s-4);
	}

	.lp-timeline__card::after,
	.lp-timeline__step:nth-child(even) .lp-timeline__card::after { right: auto; left: -16px; width: 16px; }

	.lp-timeline__icon { width: 44px; height: 44px; }
	.lp-timeline__icon .lp-icon { width: 24px; height: 24px; }

	.lp-js .lp-timeline__step:not(.is-visible) .lp-timeline__card,
	.lp-js .lp-timeline__step:nth-child(even):not(.is-visible) .lp-timeline__card { transform: translateY(20px); }
}

@media (prefers-reduced-motion: reduce) {
	.lp-timeline__card,
	.lp-timeline__node { transition: none; }

	.lp-js .lp-timeline__step:not(.is-visible) .lp-timeline__card,
	.lp-js .lp-timeline__step:nth-child(even):not(.is-visible) .lp-timeline__card {
		opacity: 1;
		transform: none;
	}
}
