/*
 * What We Do + Milestones — front page sections.
 *
 * The std- prefix keeps these independent of the hero/header/footer styles.
 * Every color resolves through the section's own tokens, mapped onto the
 * theme brand palette (--sfm-green / --sfm-navy / --sfm-muted / --sfm-line).
 * Motion is one-shot (transform/opacity) and disabled for reduced motion.
 */

/* Sections opt out of the .home-content padding so they set their own rhythm. */
.home-content {
	padding: 0;
}

.std-section {
	--std-green: var(--sfm-green);
	--std-navy: var(--sfm-navy);
	--std-text: var(--sfm-muted);
	--std-line: var(--sfm-line);
	--std-ease: cubic-bezier(.22, .61, .36, 1);
	--std-fast: .28s;

	padding: 56px 20px 0;
	text-align: center;
	font-family: var(--sfm-font-sans);
	color: var(--std-text);
}

.std-title {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 24px;
	font-family: var(--sfm-font-sans);
	font-size: 34px;
	font-weight: var(--sfm-weight-bold);
	letter-spacing: 0.3px;
	color: var(--std-navy);
	line-height: 1.2;
}

.std-title::before,
.std-title::after {
	content: "";
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--std-green);
	flex: none;
}

.std-text {
	margin: 0 auto 24px;
	font-size: 22px;
	font-weight: var(--sfm-weight-medium);
	line-height: 1.75;
	color: #6f6f6f;
}

.std-text--wide {
	margin-bottom: 64px;
}

@media (max-width: 640px) {
	.std-text {
		font-size: var(--sfm-text-base);
	}
}

/* Section titles share the services/projects sizing on every screen. */
@media (max-width: 820px) {
	.std-title {
		font-size: 22px;
		gap: 10px;
		margin-bottom: 16px;
	}

	.std-title::before,
	.std-title::after {
		width: 9px;
		height: 9px;
	}
}

/* ---------- Button ---------- */

.std-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-width: 353px;
	height: 60px;
	padding: 0 32px;

	background: #06185f;
	color: #fff;

	border: 0;
	border-radius: 999px;

	font-family: var(--sfm-font-sans);
	font-size: var(--sfm-text-lg);
	font-weight: var(--sfm-weight-medium);
	text-decoration: none;

	position: relative;
	margin-top: 8px;
	transition: all 0.25s ease;
}

/* Outer ring — appears on hover/focus */
.std-btn::after {
	content: "";
	position: absolute;
	inset: -9px;
	border: 1px solid #b9c5dc;
	border-radius: 999px;
	opacity: 0;
	transform: scale(0.97);
	transition:
		opacity 0.25s ease,
		transform 0.25s ease;
	pointer-events: none;
}

.std-btn:hover::after,
.std-btn:focus-visible::after {
	opacity: 1;
	transform: scale(1);
}

.std-btn:hover,
.std-btn:focus-visible {
	color: #fff;
	outline: none;
}

@media (max-width: 640px) {
	.std-btn {
		min-width: 0;
		width: 100%;
		max-width: 100%;
	}
}

.std-divider {
	margin: 56px auto 0;
	border: 0;
	border-top: 1px solid var(--std-line);
}

/* ---------- Scroll reveal (one-shot, transform/opacity only) ---------- */

.std-js .std-reveal {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .7s var(--std-ease), transform .7s var(--std-ease);
	transition-delay: var(--d, 0ms);
}

.std-js .std-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* ---------- Milestones grid ---------- */

.std-milestones {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 24px;
	margin: 0;
	padding: 20px 0 50px;
	list-style: none;
}

.std-card {
	--r: 24px;
	--cw: 84px;
	--cd: 42px;
	--f: 14px;
	--icon: 72px;

	position: relative;
	padding: 70px 14px 28px;
	text-align: center;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;

	border: 1.5px solid var(--std-green);
	border-radius: var(--r);

	transition: transform var(--std-fast) var(--std-ease);
}

.std-card.has-shape {
	border: 0;
	border-radius: 0;
}

.std-card.is-on {
	transform: translateY(-4px);
}

/* Card entrance: one animation that plays once and stops. */
.std-js .std-card:not(.is-in) {
	opacity: 0;
}

@keyframes sfmStdRise {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
}

.std-card.is-in {
	animation: sfmStdRise .7s var(--std-ease) backwards;
	animation-delay: calc(var(--i, 0) * 90ms);
}

/* ---------- Card shape (SVG path: rounded edges + half-circle pocket) ---------- */

.std-shape,
.std-fill svg {
	position: absolute;
	left: 0;
	top: 0;
	overflow: visible;
	pointer-events: none;
}

.std-shape path {
	fill: none;
	stroke: var(--std-green);
	stroke-width: 1.5;
	stroke-linejoin: round;
}

.std-fill {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--std-fast) ease;
	pointer-events: none;
}

.std-card.is-on .std-fill {
	opacity: 1;
}

.std-fill .bg {
	fill: var(--std-green);
	stroke: var(--std-green);
	stroke-width: 1.5;
	stroke-linejoin: round;
}

/* ---------- Icon ---------- */

.std-icon {
	position: absolute;
	z-index: 3;
	top: calc(var(--icon) * -.55);
	left: 50%;
	width: var(--icon);
	height: var(--icon);
	margin-left: calc(var(--icon) / -2);
	transform-origin: 50% 100%;
	transition: transform var(--std-fast) var(--std-ease);
	pointer-events: none;
}

.std-card.is-on .std-icon {
	transform: translateY(-8px) scale(1.2);
}

.std-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.std-icon svg * {
	fill: none;
	stroke: var(--std-green);
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.std-icon svg g {
	stroke: none;
}

.std-icon .i-fill,
.std-icon .i-node,
.std-icon .i-side {
	fill: #fff;
}

.std-icon .i-core {
	fill: var(--std-green);
	stroke: none;
}

.std-icon :is(.i-fill, .i-detail, .i-box, .i-core) {
	transition: fill var(--std-fast) ease, stroke var(--std-fast) ease;
}

/* On: the icon fills in and details stay white. */
.std-card.is-on .std-icon .i-fill   { fill: var(--std-green); }
.std-card.is-on .std-icon .i-detail { stroke: #fff; }
.std-card.is-on .std-icon .i-box    { stroke: #fff; fill: rgba(255, 255, 255, .22); }
.std-card.is-on .std-icon .i-core   { fill: #fff; }

/* Small one-shot flourish that settles (single transition, not a loop). */
.std-icon .i-sidegrp {
	transform-box: fill-box;
	transform-origin: 50% 100%;
	transition: transform var(--std-fast) var(--std-ease);
}

.std-card.is-on .std-icon .i-sidegrp.l { transform: translateX(-3px) rotate(-5deg); }
.std-card.is-on .std-icon .i-sidegrp.r { transform: translateX(3px) rotate(5deg); }

.std-icon .i-orbit {
	transform-box: view-box;
	transform-origin: 50% 50%;
	transition: transform .5s var(--std-ease);
}

.std-card.is-on .std-icon .i-orbit {
	transform: rotate(60deg);
}

/* ---------- Card text ---------- */

.std-num,
.std-label,
.std-desc {
	display: block;
	transition: transform var(--std-fast) var(--std-ease), color var(--std-fast) ease;
}

.std-num {
	margin-bottom: 8px;
	font-size: var(--sfm-text-xl);
	font-weight: var(--sfm-weight-bold);
	color: var(--std-navy);
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.std-label {
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: var(--sfm-weight-bold);
	color: var(--std-navy);
}

.std-desc {
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--std-text);
}

.std-card.is-on .std-num   { transform: translateY(-14px); color: #fff; }
.std-card.is-on .std-label { transform: translateY(-10px); color: #fff; }
.std-card.is-on .std-desc  { transform: translateY(-10px); color: rgba(255, 255, 255, .92); }

/* No-JS fallback: plain hover fill. */
html:not(.std-js) .std-card:hover {
	background: var(--std-green);
}

html:not(.std-js) .std-card:hover :is(.std-num, .std-label, .std-desc) {
	color: #fff;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
	.std-milestones {
		grid-template-columns: repeat(3, 1fr);
		row-gap: 80px;
	}
}

@media (max-width: 640px) {
	.std-card {
		--cw: 70px;
		--cd: 36px;
		--f: 12px;
		--icon: 64px;
	}

	.std-milestones {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
		row-gap: 76px;
	}

	/* Fifth / odd card: keep one-column width but sit centered in its row. */
	.std-milestones .std-card:last-child {
		grid-column: 1 / -1;
		justify-self: center;
		width: calc(50% - 10px);
	}
}

/* Web: milestone figures a bit larger. */
@media (min-width: 641px) {
	.std-num {
		font-size: var(--sfm-text-2xl);
	}

	.std-label {
		font-size: var(--sfm-text-md);
	}

	.std-desc {
		font-size: var(--sfm-text-sm);
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.std-js .std-reveal,
	.std-js .std-card:not(.is-in) {
		opacity: 1;
		transform: none;
	}

	.std-card.is-in {
		animation: none;
	}

	.std-section *,
	.std-section *::before,
	.std-section *::after {
		transition-duration: .01ms !important;
		transition-delay: 0s !important;
	}
}