/*
 * Section 1 — Hero.
 *
 * Rebuilt for the October 2026 revision of the design. Three things here are measured rather than
 * chosen, and each would be easy to get wrong:
 *
 * 1. The height is 100vh at every width, and the content is centred in what the padding leaves —
 *    160 above and 72 below at desktop, 140/56 on tablet, 120/48 on the phone. Read at 800, 900 and
 *    1000 tall windows: the content moves with the window and keeps its own size.
 *
 * 2. The photograph is a cover fit under a linear gradient that runs across the page at desktop and
 *    down it below 1200, darkest where the text is. The radial scrim and offset crop of the first
 *    version are gone.
 *
 * 3. The phone headline is a fitted SVG in the design, so its size follows the column: 11.766% of
 *    the column's width (41.2px at 390), and its box is 1.311 times that tall with the line at the
 *    top of it. Read at 360, 390, 500,
 *    600, 700 and 809, which agree to a tenth of a pixel.
 */

.as-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100vh;
	padding: 160px 32px 72px;
	overflow: hidden;
	color: var(--as-white);
}

/* ── The painted layers ──────────────────────────────────────────────────── */

.as-hero__scene {
	position: absolute;
	inset: 0;
}

.as-hero__texture {
	position: absolute;
	inset: 0;
	background-image: var(--as-stripes);
	background-repeat: repeat;
	background-size: var(--as-stripes-size) auto;
}

.as-hero__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.as-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgb(8 20 41 / 0.92) 0%, rgb(8 20 41 / 0.72) 50%, rgb(8 20 41 / 0.45) 100%);
}

/* ── The content row ─────────────────────────────────────────────────────── */

/* The copy column at up to 800, the portrait pushed to the far end, inside the narrow 1110. */
.as-hero__content {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	width: 100%;
	max-width: var(--as-container-narrow);
}

.as-hero__body {
	display: flex;
	flex: 0 1 800px;
	flex-direction: column;
	gap: 40px;
	align-items: flex-start;
	min-width: 0;
}

.as-hero__intro {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.as-hero__eyebrow {
	font-size: 13px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.as-hero__headline {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	/* The phone fits the headline to this box, so cqw has to resolve here rather than on the h1. */
	container-type: inline-size;
}

.as-hero__title {
	font-size: 88px;
	font-weight: 600;
	line-height: 1.05; /* 92.4 ÷ 88 */
	letter-spacing: -0.05em;
	white-space: nowrap;
}

.as-hero__title-accent {
	color: var(--as-red);
}

.as-hero__lead {
	max-width: 580px;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: -0.01em;
	color: rgb(255 255 255 / 0.9);
	/* The design's, and it moves the breaks: the phone reads "…stands as one / of the real estate…". */
	text-wrap: pretty;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

/* 48 tall where the header's are 40, and both widths fixed rather than fitted to the label. */
.as-button--hero {
	width: 240px;
	height: 48px;
}

.as-button--glass {
	width: 200px;
	background: var(--as-glass);
}

.as-hero__actions {
	display: flex;
	gap: 12px;
	align-items: center;
}

/* ── Counters ────────────────────────────────────────────────────────────── */

/*
 * The hairline above the counters is drawn over the row's top edge rather than added to it, the way
 * the design's pseudo-element does, so the row stays 114 tall: 32 of padding and an 82 counter.
 */
.as-hero__metrics {
	display: flex;
	gap: 56px;
	align-items: center;
	align-self: stretch;
	padding-top: 32px;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2);
}

.as-metric {
	display: flex;
	flex: 0 0 200px;
	flex-direction: column;
	gap: 3px;
	align-items: flex-start;
	min-width: 0;
}

.as-metric__value {
	width: 100%;
	font-size: 48px;
	font-weight: 600;
	line-height: var(--as-lh-snug);
	/* The one place in the design with no negative tracking, which is why it is stated. */
	letter-spacing: normal;
	/* The number changes width as it counts; without this the label below it would jitter. */
	font-variant-numeric: tabular-nums;
}

.as-metric__label {
	width: 100%;
	font-size: 18px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
	color: rgb(255 255 255 / 0.75);
}

/* ── Portrait ────────────────────────────────────────────────────────────── */

/* Centred on the copy column's height: 267x340 inside the 444 the column stands. */
.as-hero__portrait {
	display: flex;
	flex: 0 0 267px;
	align-items: center;
	align-self: stretch;
}

.as-hero__portrait img {
	display: block;
	width: 267px;
	height: 340px;
	object-fit: cover;
}

/* ── The service list, top right ─────────────────────────────────────────── */

/* 112 down from the top of the page, against the same 32px gutter the header uses. */
.as-hero__services {
	position: absolute;
	top: 112px;
	right: 32px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 228px;
}

/* An 80x2 red bar hanging 12px to the left of the label, level with its x-height. */
.as-hero__services-head {
	position: relative;
}

.as-hero__services-rule {
	position: absolute;
	top: 12px;
	right: calc(100% + 12px);
	width: 80px;
	height: 2px;
	background: var(--as-red);
}

.as-hero__services-label {
	display: block;
	font-size: 18px;
	font-weight: 400;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
	color: var(--as-red);
}

.as-hero__services-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.as-hero__services-link {
	display: block;
	width: max-content;
	height: 22px;
	padding: 1px;
	overflow: hidden;
}

.as-hero__services-roll {
	display: flex;
	flex-direction: column;
	gap: 6px;
	transition: transform var(--as-duration) var(--as-ease);
}

.as-hero__services-line {
	font-size: 16px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
}

.as-hero__services-link:hover .as-hero__services-roll,
.as-hero__services-link:focus-visible .as-hero__services-roll {
	transform: translateY(calc(-1 * (1.2em + 6px)));
}

/* ── Below 1200: no portrait, no service list, the gradient turns downwards ─ */

@media (max-width: 1199px) {
	.as-hero {
		padding: 140px 32px 56px;
	}

	.as-hero__overlay {
		background: linear-gradient(180deg, rgb(8 20 41 / 0.6) 0%, rgb(8 20 41 / 0.85) 60%, rgb(8 20 41 / 0.95) 100%);
	}

	.as-hero__body {
		flex-basis: 100%;
	}

	.as-hero__title {
		font-size: 84px;
	}

	.as-hero__lead {
		font-size: 16px;
	}

	.as-hero__metrics {
		gap: 40px;
	}

	.as-hero__portrait,
	.as-hero__services {
		display: none;
	}
}

/* ── Phone: below 810 ────────────────────────────────────────────────────── */

@media (max-width: 809px) {
	.as-hero {
		padding: 120px 20px 48px;
	}

	.as-hero__overlay {
		background: linear-gradient(180deg, rgb(8 20 41 / 0.55) 0%, rgb(8 20 41 / 0.85) 55%, rgb(8 20 41 / 0.95) 100%);
	}

	.as-hero__body {
		gap: 32px;
	}

	.as-hero__intro,
	.as-hero__headline {
		gap: 16px;
	}

	.as-hero__eyebrow {
		font-size: 12px;
	}

	/* The line is 1.05 as at every width; the SVG's box below it is what makes up the 1.311. */
	.as-hero__title {
		margin-bottom: 0.261em;
		font-size: 11.766cqw;
	}

	/* Stacked and full width, which is the one place the buttons are not a fixed size. */
	.as-hero__actions {
		flex-direction: column;
		align-self: stretch;
	}

	.as-button--hero,
	.as-button--glass {
		width: 100%;
	}

	/* Three equal columns, 106 each at 390, and a label that wraps inside its column. */
	.as-hero__metrics {
		gap: 16px;
		align-items: flex-start;
		padding-top: 24px;
	}

	.as-metric {
		flex: 1 1 0;
	}

	.as-metric__value {
		font-size: 32px;
	}

	.as-metric__label {
		font-size: 13px;
		line-height: 1.3;
		letter-spacing: -0.01em;
	}
}
