/**
 * MEMOT theme styles — about.
 *
 * About page: mission, vision, leadership slider, and their proof-strip
 * lead-in.
 * Split out of theme.css so it loads only on the template(s) that need it —
 * see memot_enqueue_assets() in functions.php. Reuses the same
 * theme.json custom properties and memot-* class hooks as theme.css.
 */

.memot-about-hero .memot-lead {
	max-width: 58ch;
}

/* -------------------------------------------------------------------------- *
 * History — the shared .memot-timeline set as a ledger: year numerals in their
 * own column, the rail beside them. The rail is the record: solid while the
 * plantation ran, dashed through the halted years (--halted), and the space
 * after each entry grows with the years to the next one (memot-motion.js sets
 * --memot-years; without JS every entry gets the same gap).
 * -------------------------------------------------------------------------- */

.memot-history .memot-timeline {
	--memot-year-size: var(--wp--preset--font-size--xx-large);
	--memot-year-col: 8.5rem;
	--memot-rail-gap: 4rem;
	--memot-rail-x: calc(var(--memot-year-col) + var(--memot-rail-gap) / 2);
	--memot-pad: 0px; /* stylelint-disable-line length-zero-no-unit -- used in calc(). */
	--memot-dot-y: calc(var(--memot-year-size) * 0.52);
	--memot-year-step: 0.2rem;
	padding-left: var(--memot-pad);
}

.memot-history .memot-timeline-track {
	top: var(--memot-dot-y);
	bottom: 0;
	left: calc(var(--memot-rail-x) - 1px);
}

.memot-history .memot-timeline > .memot-timeline-item {
	display: grid;
	grid-template-columns: var(--memot-year-col) minmax(0, 1fr);
	column-gap: var(--memot-rail-gap);
	align-items: baseline;
	max-width: none;
	margin: 0;
	padding-bottom: calc(var(--wp--preset--spacing--60) + var(--memot-years, 6) * var(--memot-year-step));
}

.memot-history .memot-timeline > .memot-timeline-item:last-child {
	padding-bottom: 0;
}

.memot-history .memot-timeline-item > * {
	margin: 0;
}

.memot-history .memot-timeline-item::before {
	top: calc(var(--memot-dot-y) - 6px);
	left: calc(var(--memot-rail-x) - var(--memot-pad) - 6px);
}

.memot-history .memot-timeline-year {
	position: relative;
	grid-row: 1;
	text-align: right;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--memot-year-size);
	font-weight: 400;
	font-variant-numeric: lining-nums tabular-nums;
	line-height: 1;
	letter-spacing: -0.02em;
	text-transform: none;
	color: var(--wp--preset--color--brand);
}

/* A range's closing year hangs under the opening one, out of the grid flow so
   the title still lines up with the big numeral. */
.memot-history .memot-timeline-year__end {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 0.35rem;
	font-size: 0.42em;
	letter-spacing: 0;
	white-space: nowrap;
	color: var(--wp--preset--color--slate);
}

.memot-history .memot-timeline-title {
	grid-row: 1;
	grid-column: 2;
}

.memot-history .memot-timeline-label {
	grid-column: 2;
	margin-top: 0.5rem;
	max-width: 56ch;
}

/* Halted years: hollow dot, muted year, and the rail below broken into dashes.
   The mask is paper-coloured stripes over the track, so the scroll fill still
   draws through — just as dashes. */
.memot-history .memot-timeline-item--halted .memot-timeline-year {
	color: var(--wp--preset--color--slate);
}

.memot-history .memot-timeline-item--halted::before {
	background: var(--wp--preset--color--paper);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--slate), 0 0 0 4px var(--wp--preset--color--paper);
}

.memot-history .memot-timeline-item--halted.is-active::before {
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--slate), 0 0 0 4px var(--wp--preset--color--paper), 0 0 0 8px rgba(85, 85, 77, 0.14);
}

.memot-history .memot-timeline-item--halted::after,
.memot-history .memot-timeline-item:last-child::after {
	content: "";
	position: absolute;
	left: calc(var(--memot-rail-x) - var(--memot-pad) - 2px);
	width: 4px;
	pointer-events: none;
}

.memot-history .memot-timeline-item--halted::after {
	top: calc(var(--memot-dot-y) + 6px);
	bottom: calc(6px - var(--memot-dot-y));
	background: repeating-linear-gradient(180deg, transparent 0 5px, var(--wp--preset--color--paper) 5px 11px);
}

/* The rail ends at today's dot rather than running on under its text. */
.memot-history .memot-timeline-item:last-child::after {
	top: calc(var(--memot-dot-y) + 12px); /* Clear of the dot's amber ring. */
	bottom: 0;
	background: var(--wp--preset--color--paper);
}

/* Today — an amber ring: the "you are here" amber of the current nav item. */
.memot-history .memot-timeline-item:last-child::before,
.memot-history .memot-timeline-item:last-child.is-active::before {
	box-shadow: 0 0 0 4px var(--wp--preset--color--paper), 0 0 0 6px var(--wp--preset--color--harvest);
}

.memot-history .memot-timeline-item:last-child .memot-timeline-year {
	color: var(--wp--preset--color--brand-bright);
}

@media (max-width: 781px) {

	/* Rail on the left edge; the year sits above its title. */
	.memot-history .memot-timeline {
		--memot-year-size: var(--wp--preset--font-size--x-large);
		--memot-rail-x: 6px;
		--memot-pad: 2.25rem;
		--memot-year-step: 0.12rem;
	}

	.memot-history .memot-timeline > .memot-timeline-item {
		grid-template-columns: minmax(0, 1fr);
		column-gap: 0;
	}

	.memot-history .memot-timeline-year {
		text-align: left;
	}

	.memot-history .memot-timeline-year__end {
		position: static;
		margin: 0 0 0 0.1em;
		font-size: 0.6em;
	}

	.memot-history .memot-timeline-title {
		grid-row: auto;
		grid-column: 1;
		margin-top: 0.4rem;
	}

	.memot-history .memot-timeline-label {
		grid-column: 1;
	}
}

/* -------------------------------------------------------------------------- *
 * Mission — immersive dark statement panel
 * -------------------------------------------------------------------------- */

.memot-mission__panel {
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
	padding: clamp(2rem, 5vw, var(--wp--preset--spacing--80));
	border-radius: var(--memot-radius-lg);
	background: linear-gradient(150deg, #0f3a23 0%, #1b5e3a 55%, #123f27 100%);
	color: rgba(255, 255, 255, 0.94);
	box-shadow: var(--memot-shadow-lg);
}

/* Soft brand glow so the flat gradient reads with more depth. */
.memot-mission__panel::before {
	content: "";
	position: absolute;
	top: -30%;
	right: -10%;
	width: 55%;
	height: 130%;
	background: radial-gradient(closest-side, rgba(78, 199, 128, 0.35), transparent 70%);
	pointer-events: none;
}

.memot-mission__main {
	position: relative;
}

.memot-mission__eyebrow {
	color: #8fe0ab;
}

.memot-mission__title {
	margin: 0.4rem 0 0;
	color: #fff;
}

.memot-mission__lead {
	margin: var(--wp--preset--spacing--40) 0 0;
	max-width: 46ch;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
}

.memot-mission__aside {
	position: relative;
	padding-left: clamp(1.25rem, 2.5vw, 2rem);
	border-left: 2px solid rgba(255, 255, 255, 0.22);
}

.memot-mission__index {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: clamp(3rem, 6vw, 4.5rem);
	line-height: 1;
	color: rgba(143, 224, 171, 0.45);
}

.memot-mission__quote {
	margin: var(--wp--preset--spacing--30) 0 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.4;
	letter-spacing: -0.01em;
	color: #fff;
}

@media (max-width: 781px) {

	.memot-mission__panel {
		grid-template-columns: 1fr;
	}

	.memot-mission__aside {
		padding-left: 0;
		padding-top: var(--wp--preset--spacing--40);
		border-left: 0;
		border-top: 2px solid rgba(255, 255, 255, 0.22);
	}
}

/* -------------------------------------------------------------------------- *
 * Vision — numbered roadmap goals + amber pledge banner
 * -------------------------------------------------------------------------- */

.memot-vision__goals {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--70);
}

.memot-vision__goal {
	position: relative;
	padding: var(--wp--preset--spacing--60);
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--memot-radius);
	box-shadow: var(--memot-shadow-sm);
	overflow: hidden;
	transition: transform 0.2s var(--memot-ease-out), box-shadow 0.2s var(--memot-ease-out);
}

.memot-vision__goal::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: linear-gradient(180deg, #c9a15a, #8a6d34);
}

.memot-vision__goal:hover {
	transform: translateY(-4px);
	box-shadow: var(--memot-shadow-md);
}

.memot-vision__num {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: 2.25rem;
	line-height: 1;
	color: var(--wp--preset--color--harvest);
	opacity: 0.7;
}

.memot-vision__goal-title {
	margin: var(--wp--preset--spacing--30) 0 0.4rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
}

.memot-vision__goal-text {
	margin: 0;
	color: var(--wp--preset--color--slate);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.memot-vision__banner {
	position: relative;
	overflow: hidden;
	margin-top: var(--wp--preset--spacing--60);
	padding: clamp(1.75rem, 4vw, var(--wp--preset--spacing--70)) clamp(1.75rem, 4vw, var(--wp--preset--spacing--80));
	border-radius: var(--memot-radius-lg);
	background: linear-gradient(150deg, #7a5a24 0%, #c9a15a 60%, #a07d38 100%);
	color: #1c1608;
	box-shadow: var(--memot-shadow-md);
}

.memot-vision__quote {
	margin: 0;
	max-width: 44ch;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.32;
	letter-spacing: -0.01em;
}

@media (max-width: 781px) {

	.memot-vision__goals {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------------------- *
 * Generic one-row card slider (About values + leadership)
 * -------------------------------------------------------------------------- */

.memot-card-slider-scope {
	margin-top: var(--wp--preset--spacing--70);
}

.memot-card-slider__controls {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--40);
}

.memot-card-slider__controls[hidden] {
	display: none;
}

.memot-card-slider__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--memot-shadow-sm);
	cursor: pointer;
	transition:
		transform 0.25s var(--memot-ease-out),
		background-color 0.25s ease,
		border-color 0.25s ease,
		color 0.25s ease,
		opacity 0.25s ease;
}

.memot-card-slider__button svg {
	width: 1.2rem;
	height: 1.2rem;
	fill: none;
	stroke: currentcolor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.memot-card-slider__button:focus-visible {
	transform: translateY(-2px);
	border-color: var(--wp--preset--color--brand);
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--paper);
}

.memot-card-slider__button:disabled {
	cursor: default;
	opacity: 0.4;
}

.memot-card-slider__button:hover:not(:disabled) {
	transform: translateY(-2px);
	border-color: var(--wp--preset--color--brand);
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--paper);
}

.memot-card-slider__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var(--wp--preset--color--brand-bright) transparent;
	padding-bottom: var(--wp--preset--spacing--30);
}

.memot-card-slider.is-ready .memot-card-slider__viewport {
	scrollbar-width: none;
}

.memot-card-slider.is-ready .memot-card-slider__viewport::-webkit-scrollbar {
	display: none;
}

.memot-card-slider__track {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--wp--preset--spacing--50);
	align-items: stretch;
}

.memot-card-slider__item {
	scroll-snap-align: start;
}

.memot-card-slider__progress {
	height: 0.2rem;
	margin-top: var(--wp--preset--spacing--30);
	border-radius: 999px;
	background: color-mix(in srgb, var(--wp--preset--color--leaf) 16%, transparent);
	overflow: hidden;
}

.memot-card-slider:not(.is-ready) .memot-card-slider__progress {
	display: none;
}

.memot-card-slider__progress span {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	background: var(--wp--preset--color--brand-bright);
	transform: scaleX(0.12);
	transform-origin: left center;
	transition: transform 0.3s var(--memot-ease-out);
}

@media (prefers-reduced-motion: reduce) {

	.memot-card-slider__button,
	.memot-card-slider__progress span {
		transition: none;
	}
}

/* Value cards keep their look but flex to an equal, fixed slide width. */
.memot-value-track .memot-value-card {
	flex: 0 0 clamp(15rem, 24vw, 18rem);
	display: flex;
	flex-direction: column;
}

.memot-value-track .memot-value-text {
	margin-top: auto;
}

/* -------------------------------------------------------------------------- *
 * Leadership — portrait slider cards (monogram avatar + role)
 * -------------------------------------------------------------------------- */

.memot-leader-track .memot-leader-card {
	flex: 0 0 clamp(15rem, 24vw, 18rem);
	display: flex;
	flex-direction: column;
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--memot-radius-lg);
	box-shadow: var(--memot-shadow-sm);
	transition: transform 0.2s var(--memot-ease-out), box-shadow 0.2s var(--memot-ease-out);
}

.memot-leader-track .memot-leader-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--memot-shadow-md);
}

.memot-leader-card__avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.75rem;
	height: 3.75rem;
	margin-bottom: var(--wp--preset--spacing--40);
	border-radius: 999px;
	background: var(--memot-leader-grad, linear-gradient(135deg, #3c8c55 0%, #1b5e3a 100%));
	color: #fff;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.25rem;
	letter-spacing: 0.02em;
}

.memot-leader-card__avatar img {
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}

.memot-leader-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.memot-leader-card__name {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
}

.memot-leader-card__role {
	margin: 0.25rem 0 0;
	color: var(--wp--preset--color--leaf);
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.memot-leader-card__bio {
	margin: var(--wp--preset--spacing--30) 0 0;
	color: var(--wp--preset--color--slate);
	font-size: 0.9375rem;
	line-height: 1.6;
}
