/* ==========================================================================
   Services — Chapter 01: Business formation & corporate
   Scoped to .el-c1. An open spread: copy page on the left, artwork page on
   the right (to the screen edge), a fold line between them and an outlined
   "01" across the fold. The artwork keeps its 4:3 shape (never stretched,
   never cropped) and fades into the white page on its left, top and
   bottom edges. Behaviour: assets/js/sections/services-formation.js
   ========================================================================== */

.el-c1 {
	--el-c1-num: clamp(11.5rem, 21vw, 18.75rem);
	--el-c1-page: 30rem;
	position: relative;
	padding-top: clamp(5rem, 9vw, 7.5rem);
	color: var(--el-ink, #070816);
	overflow-x: clip;
}

.el-c1 p,
.el-c1 h2,
.el-c1 h3,
.el-c1 ul,
.el-c1 figure {
	margin: 0;
}

/* ---------- Spread ---------- */

.el-c1__spread {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, var(--el-c1-page)) minmax(0, 1fr);
	align-items: start;
	margin-left: max(var(--el-gutter, 1.25rem), calc((100% - var(--el-wide, 1240px)) / 2));
}

.el-c1__page {
	position: relative;
	z-index: 2;
	/* Bottom padding matches the strip's pull-up, so text never meets it */
	padding: 0.75rem 4rem 3rem 0;
}

.el-c1__label {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	color: var(--el-muted, #555a6b);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.el-c1__label span {
	width: 28px;
	height: 2px;
	background-color: var(--el-ink, #070816);
}

/* The heading starts below the numeral that sits across the fold */
.el-c1__title {
	margin-top: calc(var(--el-c1-num) * 0.74 + 0.5rem) !important;
	font-size: clamp(2.75rem, 4.2vw, 3.75rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
}

.el-c1__intro {
	max-width: 26rem;
	margin-top: 1.625rem !important;
	font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
	font-weight: 500;
	line-height: 1.5;
}

/* Artwork page: 4:3, edges fade into the white page */
.el-c1__art {
	position: relative;
	aspect-ratio: 1448 / 1086;
	background-color: #fff;
}

.el-c1__art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.el-c1__art::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.6) 9%, rgba(255, 255, 255, 0) 22%),
		linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 16%),
		linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0.7) 9%, rgba(255, 255, 255, 0) 24%);
}

/* The fold between the two pages */
.el-c1__fold {
	position: absolute;
	left: calc(var(--el-c1-page) - 1px);
	top: -2.5rem;
	bottom: -2.5rem;
	z-index: 1;
	border-left: 1.5px dashed #c5c9d2;
	transform-origin: top;
}

/* Outlined chapter number across the fold, over the artwork's quiet corner */
.el-c1__num {
	position: absolute;
	left: calc(var(--el-c1-num) * -0.4);
	top: 1.75rem;
	z-index: 3;
	color: transparent;
	font-size: var(--el-c1-num);
	font-weight: 800;
	line-height: 0.74;
	letter-spacing: -0.07em;
	-webkit-text-stroke: 2px var(--el-ink, #070816);
	pointer-events: none;
	user-select: none;
}

/* ---------- Services strip ---------- */

.el-c1__body {
	position: relative;
	z-index: 2;
	max-width: var(--el-wide, 1240px);
	margin: -2.25rem auto 0;
	padding: 0 var(--el-gutter, 1.25rem) clamp(4rem, 8vw, 6.5rem);
	box-sizing: content-box;
}

.el-c1__kicker {
	margin-bottom: 1.125rem !important;
	color: var(--el-muted, #555a6b);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.el-c1__groups {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding: 0;
	list-style: none;
	border-top: 2px solid var(--el-ink, #070816);
}

.el-c1__group {
	padding: 1.375rem 1.75rem 0 0;
	margin-right: 1.75rem;
	border-right: 1px solid var(--el-line, #e6e8ed);
}

.el-c1__group:last-child {
	margin-right: 0;
	border-right: 0;
}

.el-c1__gnum {
	display: block;
	color: #6b7080;
	font-size: 0.75rem;
	font-weight: 600;
}

.el-c1__gtitle {
	margin-top: 0.625rem !important;
	font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.el-c1__gtext {
	margin-top: 0.625rem !important;
	color: #3d4150;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.el-c1__close {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	margin-top: 2.75rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--el-line, #e6e8ed);
}

.el-c1__note {
	max-width: 34rem;
	color: var(--el-muted, #555a6b);
	font-size: 0.9375rem;
	font-style: italic;
	font-weight: 700;
	line-height: 1.5;
}

/* Ink CTA; magnetic movement comes from the site-wide script */
.el-c1__actions .wp-block-button__link,
.el-c1__actions .wp-block-button__link:hover {
	background-color: var(--el-ink, #070816);
	color: #fff;
}

.el-c1__actions .wp-block-button__link:focus-visible {
	outline: 2px solid var(--el-blue, #003dfa);
	outline-offset: 3px;
}

/* ---------- Entrance (added by the script only; never hides text) ---------- */

.el-c1.is-pending .el-c1__fold {
	transform: scaleY(0);
}

.el-c1.is-pending .el-c1__art {
	opacity: 0;
	transform: translateY(8px);
}

.el-c1.is-in .el-c1__fold {
	transform: none;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.el-c1.is-in .el-c1__art {
	opacity: 1;
	transform: none;
	transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Below 1024px: copy, artwork, services ---------- */

@media (max-width: 1023px) {
	.el-c1 {
		--el-c1-num: clamp(7.5rem, 30vw, 10rem);
	}

	.el-c1__spread {
		display: block;
		margin-left: 0;
	}

	.el-c1__page {
		padding: 0 var(--el-gutter, 1.25rem);
	}

	.el-c1__art {
		margin-bottom: 0;
	}

	.el-c1__title {
		margin-top: 1rem !important;
		font-size: clamp(2.25rem, 9.5vw, 3rem);
		line-height: 1.02;
	}

	.el-c1__intro {
		margin-top: 1rem !important;
		max-width: 34rem;
	}

	.el-c1__art {
		margin-top: 1.75rem;
	}

	.el-c1__fold {
		display: none;
	}

	/* The numeral moves onto the artwork's quiet top-left corner */
	.el-c1__num {
		top: 1rem;
		left: calc(var(--el-gutter, 1.25rem) - 0.375rem);
		-webkit-text-stroke-width: 1.5px;
	}

	.el-c1__body {
		margin-top: 0.5rem;
	}

	.el-c1__groups {
		grid-template-columns: minmax(0, 1fr);
	}

	.el-c1__group {
		display: grid;
		grid-template-columns: 2.125rem minmax(0, 1fr);
		padding: 1rem 0;
		margin-right: 0;
		border-right: 0;
		border-bottom: 1px solid var(--el-line, #e6e8ed);
	}

	.el-c1__gnum {
		grid-row: span 2;
		padding-top: 0.25rem;
	}

	.el-c1__gtitle {
		margin-top: 0 !important;
		font-size: 1.125rem;
	}

	.el-c1__gtext {
		margin-top: 0.375rem !important;
	}

	.el-c1__close {
		display: block;
		margin-top: 1.25rem;
		padding-top: 0;
		border-top: 0;
	}

	.el-c1__actions {
		margin-top: 1.375rem;
	}

	.el-c1__actions .wp-block-button,
	.el-c1__actions .wp-block-button__link {
		width: 100%;
		box-sizing: border-box;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.el-c1.is-pending .el-c1__fold,
	.el-c1.is-pending .el-c1__art {
		opacity: 1;
		transform: none;
	}

	.el-c1.is-in .el-c1__fold,
	.el-c1.is-in .el-c1__art {
		transition: none;
	}
}
