/* === hero === */
/* A cover: her photograph in her office, her four professions with their years, the two ways to reach her, then
   the four lead areas as a band. On a phone the photograph opens the page; on wide screens it is the right half. */
.dcv-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	width: min(100% - 2 * var(--gutter), var(--wrap));
	margin-inline: auto;
}

.dcv-hero__title {
	margin-top: var(--sp-3);
	font-weight: 500;
	font-size: clamp(1.375rem, 6.2vw, 1.75rem);
	line-height: 1.15;
	letter-spacing: -0.03em;
}

/* Her four professions, one to a line; from tablet width each carries the year it began. */
.dcv-hero__line {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--sp-4);
	padding-block: var(--sp-2);
	border-bottom: 1px solid var(--c-rule);
	white-space: nowrap;
}

/* The window a line rises through; the padding keeps ș and ț whole. */
.dcv-hero__word {
	display: inline-block;
	margin-block: -0.14em;
	padding-block: 0.14em;
	overflow: hidden;
	vertical-align: bottom;
}

.dcv-hero__word > span {
	display: inline-block;
}

.dcv-hero__since {
	color: var(--c-accent);
	font-weight: 400;
	font-size: var(--fs-small);
	letter-spacing: 0;
}

.dcv-hero__reach {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-3);
	margin-top: var(--sp-4);
}

.dcv-hero__reach > * {
	flex: 1 1 9rem;
}

.dcv-hero__areas {
	position: relative;
	margin-top: var(--sp-6);
}

.dcv-hero__areas::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 2px;
	background: var(--c-camel);
	transform-origin: 0 50%;
}

.dcv-hero__areas a {
	position: relative;
	display: grid;
	gap: var(--sp-1);
	height: 100%;
	padding-block: var(--sp-3);
	border-bottom: 1px solid var(--c-rule);
	text-decoration: none;
}

.dcv-hero__areas a::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 2px;
	background: var(--c-ink);
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform 320ms var(--ease);
}

.dcv-hero__area {
	font-weight: 500;
	font-size: 1.1875rem;
	letter-spacing: -0.015em;
}

.dcv-hero__note {
	color: var(--c-muted);
	font-size: var(--fs-small);
	line-height: 1.4;
	transition: color 200ms var(--ease);
}

@media (hover: hover) {
	.dcv-hero__areas a:hover::before {
		transform: none;
	}

	.dcv-hero__areas a:hover .dcv-hero__note {
		color: var(--c-ink);
	}
}

.dcv-hero__desk {
	position: relative;
	order: -1;
	margin-inline: calc(-1 * var(--gutter));
	background: var(--c-wash);
}

/* The square is cropped to a lower frame so her professions start on the first screen; she stays in the middle. */
.dcv-hero__photo {
	width: 100%;
	aspect-ratio: 6 / 5;
	object-fit: cover;
	object-position: 42% 35%;
}

/* Beside the button the phone number is plain large text with a camel rule that draws under it, not a second box. */
@media (min-width: 30em) {
	.dcv-hero__reach {
		align-items: center;
		gap: var(--sp-5);
	}

	.dcv-hero__reach > * {
		flex: 0 1 auto;
	}

	.dcv-btn.dcv-hero__phone {
		padding: 0;
		border-color: transparent;
		font-size: 1.375rem;
		letter-spacing: -0.01em;
	}

	.dcv-btn.dcv-hero__phone::before {
		inset: auto 0 0.5rem;
		height: 2px;
		background: var(--c-camel);
		transform: scaleX(0);
		transform-origin: 0 50%;
	}

	.dcv-btn.dcv-hero__phone:hover {
		border-color: transparent;
		color: var(--c-ink);
		transform: none;
	}
}

@media (min-width: 36em) {
	.dcv-hero__photo {
		aspect-ratio: 3 / 2;
	}
}

@media (min-width: 48em) {
	.dcv-hero__areas {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--sp-6);
	}

	.dcv-hero__title {
		margin-top: var(--sp-6);
		font-size: var(--fs-hero);
		line-height: 1.06;
		letter-spacing: -0.04em;
	}

	.dcv-hero__line {
		display: block;
		padding: 0;
		border: 0;
	}

	.dcv-hero__since {
		display: inline-block;
		margin: 0.5em 0 0 0.5em;
		line-height: 1;
		vertical-align: top;
	}

	.dcv-hero__reach {
		margin-top: var(--sp-5);
	}
}

@media (min-width: 64em) {
	.dcv-hero {
		grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
		grid-template-rows: 1fr auto;
		grid-template-areas:
			"lead desk"
			"areas areas";
		column-gap: var(--sp-6);
		min-height: min(100svh - var(--bar-h), 58rem);
		padding-top: 0;
	}

	.dcv-hero__lead {
		grid-area: lead;
		align-self: center;
		padding-block: var(--sp-7);
	}

	.dcv-hero__title {
		margin-top: 0;
	}

	.dcv-hero__reach {
		margin-top: var(--sp-7);
	}

	.dcv-hero__desk {
		grid-area: desk;
		margin: 0 calc(-1 * var(--gutter)) 0 0;
	}

	/* The photograph fills its half from the bar to the areas' rule and runs on to the edge of the screen. */
	.dcv-hero__photo {
		position: absolute;
		inset: 0 auto 0 0;
		width: calc(100% + max(0px, (100vw - var(--wrap)) / 2 - var(--gutter)));
		max-width: none;
		height: 100%;
		aspect-ratio: auto;
	}

	.dcv-hero__areas {
		grid-area: areas;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		column-gap: var(--sp-7);
		margin-top: 0;
	}

	.dcv-hero__areas a {
		align-content: start;
		padding-block: var(--sp-5) var(--sp-7);
		border-bottom: 0;
	}

	.dcv-hero__area {
		font-size: 1.3125rem;
	}
}

/* The entrance, once per load: the question rises word by word, her photograph is uncovered from the top while it settles to size,
   the camel rule draws and the areas follow it. */
@media (prefers-reduced-motion: no-preference) {
	[data-enter] .dcv-hero__word > span {
		animation: dcv-word 700ms var(--ease) calc(80ms + var(--i) * 90ms) backwards;
	}

	[data-enter] .dcv-hero__since {
		animation: dcv-appear 480ms var(--ease) calc(560ms + var(--i) * 90ms) backwards;
	}

	[data-enter] .dcv-hero__reach {
		animation: dcv-rise 480ms var(--ease) 520ms backwards;
	}

	[data-enter] .dcv-hero__desk {
		animation: dcv-panel 900ms var(--ease) backwards;
	}

	[data-enter] .dcv-hero__photo {
		animation: dcv-close-in 900ms var(--ease) backwards;
	}

	[data-enter] .dcv-hero__areas::before {
		animation: dcv-draw 800ms var(--ease) 300ms backwards;
	}

	/* On a phone an area's note is the largest text of the first screen: it moves into place without being hidden,
	   so the page counts as shown the moment it is drawn. */
	[data-enter] .dcv-hero__areas li {
		animation: dcv-settle 480ms var(--ease) calc(var(--i) * 70ms) backwards;
	}
}

/* On the way out the text lets go first: it lifts and fades while her photograph stays on the rule. */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) and (min-width: 64em) {
		.dcv-hero__lead {
			animation: dcv-leave linear both;
			animation-timeline: view();
			animation-range: exit 10% exit 90%;
		}
	}
}

/* The negative right inset keeps the part of the photograph that runs past the grid inside the clip. */
@keyframes dcv-panel {
	from {
		clip-path: inset(0 -50vw 100% 0);
	}

	to {
		clip-path: inset(0 -50vw 0 0);
	}
}

@keyframes dcv-close-in {
	from {
		transform: scale(1.06);
	}
}
