/* About page.
 *
 * Loads after page.css (see inc/enqueue.php), so rules here win.
 * Everything is scoped under an .about-* class so nothing leaks to other pages.
 *
 * Direction: the page is built from the product's own vocabulary — the pleat of
 * a hanging curtain, the rail it slides on, and the datasheet a fleet engineer
 * reads. Boldness is spent in exactly one place, the hero curtain; every band
 * below it stays deliberately quiet. */

/* ---------------------------------------------------------------------------
 * Local tokens
 * ------------------------------------------------------------------------- */

.about-page {
	/* Display and utility faces, local to this page. The global body face is
	 * unchanged, so no other template is affected. */
	--myco-about-display: "Oswald", var(--myco-font-sans);
	--myco-about-body: "IBM Plex Sans", var(--myco-font-sans);
	--myco-about-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	/* Curtain geometry. One pleat is a light face and a shadow face; the width
	 * drives both the stage and the fan-open animation. */
	--myco-pleat-width: 2.75rem;
	--myco-pleat-light: #1f3452;
	--myco-pleat-dark: #0c1728;
	/* Brushed-aluminium rail and brackets: the mounting hardware, not brand
	 * colour, which is why these are their own tokens rather than palette ones. */
	--myco-rail-light: #9fb0c6;
	--myco-rail-dark: #5d7086;
	--myco-bracket-light: #b9c6d6;
	--myco-bracket-dark: #6b7d94;

	font-family: var(--myco-about-body);
}

.about-page h1,
.about-page h2,
.about-page h3 {
	font-family: var(--myco-about-display);
	font-weight: 500;
	letter-spacing: 0.01em;
}

/* Shared eyebrow. Mono + tracking so it reads as a filed label, not a tagline. */
.about-section-eyebrow {
	margin-bottom: var(--myco-space-sm);
	color: var(--myco-color-accent-ink);
	font-family: var(--myco-about-mono);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.about-section-eyebrow--onDark {
	/* On the navy ground the bright orange is 7.36:1 and is the correct pick;
	 * the ink shade would go muddy there. See the accent contrast rule. */
	color: var(--myco-color-accent-soft);
}

/* ---------------------------------------------------------------------------
 * Hero — the signature element
 * ------------------------------------------------------------------------- */

.about-hero {
	position: relative;
	overflow: hidden;
	padding: var(--myco-space-3xl) 0 0;
	background:
		radial-gradient(120% 140% at 85% 0%, rgba(242, 107, 15, 0.22) 0%, transparent 55%),
		linear-gradient(160deg, var(--myco-color-primary) 0%, var(--myco-color-primary-deep) 100%);
	color: var(--myco-color-white);
}

.about-hero__grid {
	display: grid;
	gap: var(--myco-space-2xl);
}

.about-hero__copy {
	position: relative;
	z-index: 1;
	padding-bottom: var(--myco-space-xl);
}

/* Breadcrumbs ship dark-on-light; on the navy hero they need the reverse. */
.about-hero .breadcrumbs {
	color: rgba(255, 255, 255, 0.62);
}

.about-hero .breadcrumbs a {
	color: rgba(255, 255, 255, 0.86);
}

.about-hero .breadcrumbs a:hover {
	color: var(--myco-color-accent-soft);
}

.about-hero__eyebrow {
	margin-bottom: var(--myco-space-md);
	color: var(--myco-color-accent-soft);
	font-family: var(--myco-about-mono);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.about-hero__title {
	margin-bottom: var(--myco-space-lg);
	color: var(--myco-color-white);
	font-size: clamp(2.75rem, 9vw, 5.5rem);
	line-height: 0.94;
	letter-spacing: -0.005em;
	text-transform: uppercase;
}

/* The second line drops to an outline, so the headline reads as two weights of
 * the same statement — the thing itself, then the emphasis. */
.about-hero__title-accent {
	display: block;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--myco-color-accent-soft);
}

/* text-stroke is unsupported in a few engines and would render invisible text.
 * Restore a solid fill wherever it is missing. */
@supports not ((-webkit-text-stroke: 1px red) or (text-stroke: 1px red)) {
	.about-hero__title-accent {
		color: var(--myco-color-accent-soft);
	}
}

.about-hero__lede {
	max-width: 34rem;
	margin-bottom: var(--myco-space-xl);
	color: rgba(255, 255, 255, 0.8);
	font-size: var(--myco-font-size-lg);
}

.about-hero__since {
	display: flex;
	gap: var(--myco-space-md);
	align-items: baseline;
	margin: 0;
	padding-top: var(--myco-space-lg);
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.about-hero__since-figure {
	color: var(--myco-color-accent-soft);
	font-family: var(--myco-about-display);
	font-size: 3rem;
	font-weight: 600;
	line-height: 1;
}

.about-hero__since-label {
	max-width: 12rem;
	color: rgba(255, 255, 255, 0.72);
	font-size: var(--myco-font-size-sm);
}

/* --- The curtain ---------------------------------------------------------- */

.about-hero__stage {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 18rem;
	align-self: end;
}

/* The rail the fabric hangs from, with two visible mounting brackets. The
 * hardware is the point: this is a part that gets fitted, not a backdrop. */
.about-hero__rail {
	position: relative;
	z-index: 2;
	height: 0.5rem;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--myco-rail-light) 0%, var(--myco-rail-dark) 100%);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.about-hero__bracket {
	position: absolute;
	top: -0.4rem;
	width: 0.85rem;
	height: 1.3rem;
	border-radius: 0.2rem;
	background: linear-gradient(180deg, var(--myco-bracket-light) 0%, var(--myco-bracket-dark) 100%);
}

.about-hero__bracket:first-child {
	left: 8%;
}

.about-hero__bracket:last-child {
	right: 8%;
}

.about-hero__curtain {
	position: relative;
	display: flex;
	flex: 1;
	min-height: 16rem;
	/* The fabric hangs from the rail — transforms scale down from the top edge. */
	transform-origin: top center;
}

/* Raking light across the run, so the fabric is lit from one side rather than
 * reading as a flat repeat. Sits above the pleats and ignores pointer events. */
.about-hero__curtain::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		105deg,
		rgba(255, 255, 255, 0.09) 0%,
		rgba(255, 255, 255, 0.02) 32%,
		rgba(8, 16, 28, 0.32) 72%,
		rgba(8, 16, 28, 0.55) 100%
	);
}

/* One pleat. The gradient across it is the fold: light on the near face,
 * shadow in the valley. Repeating them builds a continuous run of fabric. */
.about-hero__pleat {
	flex: 1;
	min-width: 0;
	background: linear-gradient(
		90deg,
		var(--myco-pleat-dark) 0%,
		var(--myco-pleat-light) 38%,
		var(--myco-pleat-light) 52%,
		var(--myco-pleat-dark) 100%
	);
	/* The hem: fabric hangs heavier at the leading edge, so the bottom is not
	 * a ruler-straight line. */
	border-bottom-left-radius: 0.35rem;
	border-bottom-right-radius: 0.35rem;
	box-shadow: inset 0 -2rem 2.5rem rgba(8, 16, 28, 0.55);
}

/* Fabric does not fold to identical widths. Nudging every third and every
 * fourth pleat breaks the mechanical repeat without looking random. */
.about-hero__pleat:nth-child(3n) {
	flex: 1.18;
}

.about-hero__pleat:nth-child(4n) {
	flex: 0.86;
}

/* Fan open once on load, pleat by pleat, the way a curtain is actually drawn.
 * This is the page's only orchestrated motion. */
.js .about-hero__pleat {
	transform: scaleX(0.05);
	transform-origin: left center;
	opacity: 0;
	animation: myco-pleat-open 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
	/* Left to right, 45ms apart — slow enough to read as a sweep. */
	animation-delay: calc(var(--myco-pleat-index, 0) * 45ms + 120ms);
}

@keyframes myco-pleat-open {
	from {
		transform: scaleX(0.05);
		opacity: 0;
	}

	to {
		transform: scaleX(1);
		opacity: 1;
	}
}

/* utilities.css zeroes animation duration under reduced motion, which would
 * leave the pleats mid-collapse. Reset them to their open state explicitly. */
@media (prefers-reduced-motion: reduce) {
	.js .about-hero__pleat {
		transform: none;
		opacity: 1;
		animation: none;
	}
}

/* ---------------------------------------------------------------------------
 * Story band
 * ------------------------------------------------------------------------- */

.about-story__grid {
	display: grid;
	gap: var(--myco-space-2xl);
}

.about-story__prose .entry-content > p:first-of-type {
	/* The opening paragraph carries the whole claim, so it is set larger. */
	color: var(--myco-color-text);
	font-size: clamp(1.2rem, 2.4vw, 1.45rem);
	line-height: 1.45;
}

.about-story__prose .entry-content {
	color: var(--myco-color-muted);
}

/* The datasheet panel. Deliberately plain — a ruled list of facts. */
.about-story__panel {
	align-self: start;
	padding: var(--myco-space-xl);
	border: 1px solid var(--myco-color-border);
	border-top: 3px solid var(--myco-color-accent);
	border-radius: var(--myco-radius-lg);
	background: var(--myco-color-surface);
}

.about-story__panel-title {
	margin-bottom: var(--myco-space-lg);
	color: var(--myco-color-primary);
	font-family: var(--myco-about-mono);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.about-spec {
	margin: 0;
}

.about-spec__row {
	display: grid;
	gap: var(--myco-space-2xs);
	padding: var(--myco-space-md) 0;
	border-top: 1px solid var(--myco-color-border);
}

.about-spec__row:first-child {
	border-top: 0;
	padding-top: 0;
}

.about-spec__row:last-child {
	padding-bottom: 0;
}

.about-spec__label {
	color: var(--myco-color-muted);
	font-family: var(--myco-about-mono);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.about-spec__value {
	margin: 0;
	color: var(--myco-color-primary);
	font-weight: 600;
}

/* ---------------------------------------------------------------------------
 * Production route — the one place numbering is used
 * ------------------------------------------------------------------------- */

.about-route {
	background:
		radial-gradient(100% 120% at 0% 0%, rgba(242, 107, 15, 0.16) 0%, transparent 55%),
		linear-gradient(160deg, var(--myco-color-primary) 0%, var(--myco-color-primary-deep) 100%);
	color: var(--myco-color-white);
}

.about-route__head {
	max-width: 40rem;
	margin-bottom: var(--myco-space-2xl);
}

.about-route__title {
	margin: 0;
	color: var(--myco-color-white);
	font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.about-route__list {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.about-route__step {
	position: relative;
	padding: var(--myco-space-lg) 0 var(--myco-space-lg) var(--myco-space-2xl);
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.about-route__step:last-child {
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.about-route__step-number {
	position: absolute;
	top: var(--myco-space-lg);
	left: 0;
	color: var(--myco-color-accent-soft);
	font-family: var(--myco-about-mono);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
}

.about-route__step-title {
	margin-bottom: var(--myco-space-2xs);
	color: var(--myco-color-white);
	font-size: 1.35rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.about-route__step-text {
	max-width: 46rem;
	margin: 0;
	color: rgba(255, 255, 255, 0.74);
}

/* ---------------------------------------------------------------------------
 * Production lines
 * ------------------------------------------------------------------------- */

.about-lines__head {
	max-width: 40rem;
	margin-bottom: var(--myco-space-xl);
}

.about-lines__title {
	margin: 0;
	font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.about-lines__list {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--myco-color-border);
	list-style: none;
}

.about-line {
	border-bottom: 1px solid var(--myco-color-border);
}

.about-line__link {
	display: flex;
	gap: var(--myco-space-md);
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	padding: var(--myco-space-lg) var(--myco-space-sm);
	text-decoration: none;
	transition: background var(--myco-transition), padding-left var(--myco-transition);
}

.about-line__link:hover,
.about-line__link:focus-visible {
	background: var(--myco-color-surface);
	padding-left: var(--myco-space-lg);
	color: inherit;
}

.about-line__name {
	color: var(--myco-color-primary);
	font-family: var(--myco-about-display);
	font-size: clamp(1.35rem, 3vw, 2rem);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.about-line__link:hover .about-line__name {
	color: var(--myco-color-accent-ink);
}

.about-line__count {
	color: var(--myco-color-muted);
	font-family: var(--myco-about-mono);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
 * Desktop
 * ------------------------------------------------------------------------- */

@media (min-width: 900px) {
	.about-hero {
		padding-top: var(--myco-space-4xl);
	}

	.about-hero__grid {
		gap: var(--myco-space-3xl);
		align-items: end;
		grid-template-columns: 1.05fr 0.95fr;
	}

	.about-hero__copy {
		padding-bottom: var(--myco-space-4xl);
	}

	.about-hero__stage {
		min-height: 30rem;
	}

	.about-hero__curtain {
		min-height: 28rem;
	}

	.about-story__grid {
		gap: var(--myco-space-3xl);
		align-items: start;
		grid-template-columns: 1.5fr 1fr;
	}

	.about-route__step {
		display: grid;
		gap: var(--myco-space-xl);
		grid-template-columns: 3rem 12rem 1fr;
		align-items: baseline;
		padding-left: 0;
	}

	.about-route__step-number {
		position: static;
	}

	.about-route__step-title {
		margin-bottom: 0;
	}
}
