/* =============================================================================
   ECR — CONTACT
   Phase 5 · visual implementation

   Eight functional boxes (meeting document §8), in the ECR visual language
   already established by the site: the same tokens, the same 24px group
   radius, the same restrained shadow, the same pill buttons and the same
   hover lift as the Staff directory.

   Every colour resolves to an --ecr-* custom property. Nothing here is a new
   palette, and no font-family is declared — the site's proxima-nova is
   inherited, exactly as on the other two pages of this section.
   ========================================================================== */

.ecr-ct {
	--ct-primary: var(--ecr-primary, #1866A5);
	--ct-primary-dark: var(--ecr-primary-dark, #114C7D);
	--ct-accent: var(--ecr-accent, #7BADDE);
	--ct-text: var(--ecr-text, #1E293B);
	--ct-border: var(--ecr-border, #E2E8F0);
	--ct-bg: var(--ecr-bg, #F8FAFC);
	--ct-white: var(--ecr-white, #FFFFFF);
	--ct-radius: var(--ecr-radius, 24px);
	--ct-shadow: 0 12px 40px rgba(0, 0, 0, .06);
	--ct-shadow-hover: var(--ecr-shadow-hover, 0 20px 60px rgba(15, 23, 42, .12));
	--ct-muted: #667085;
	--ct-tint: #EFF6FF;

	max-width: 1200px;
	margin: 0 auto;
	padding: 80px 25px;
	color: var(--ct-text);
}

/* -----------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */

.ecr-ct__header {
	text-align: center;
	margin-bottom: 46px;
}

.ecr-ct__eyebrow {
	display: inline-block;
	font-size: .75rem;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--ct-primary);
	font-weight: 700;
	margin-bottom: 12px;
}

.ecr-ct .ecr-ct__title {
	font-size: clamp(2.4rem, 4vw, 4rem);
	line-height: 1.1;
	margin: 0 0 15px;
	color: var(--ct-text);
	/* weight inherited: 900 */
}

.ecr-ct__lede {
	max-width: 700px;
	margin: 0 auto;
	color: var(--ct-muted);
}

/* -----------------------------------------------------------------------------
   BOX GRID
   Four across from 1280 px, two below, one on the phone (10 November 2026):
   auto-fill made 3 + 3 + 2 at 1280. grid-auto-rows: 1fr makes every box as
   tall as the tallest, so both rows match and the buttons, pinned to the
   bottom, line up across the whole grid.
   -------------------------------------------------------------------------- */

.ecr-ct__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	gap: 20px;
	align-items: stretch;
}

.ecr-ct-box {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 30px 28px;
	background: var(--ct-white);
	border: 1px solid var(--ct-border);
	border-radius: var(--ct-radius);
	box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
	min-width: 0;
}

.ecr-ct-box:hover,
.ecr-ct-box:focus-within {
	transform: translateY(-2px);
	box-shadow: var(--ct-shadow-hover);
	border-color: transparent;
}

.ecr-ct-box__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: var(--ct-tint);
	color: var(--ct-primary);
	margin-bottom: 6px;
}

.ecr-ct-box__icon svg {
	display: block;
}

.ecr-ct .ecr-ct-box__title {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.25;
	color: var(--ct-text);
	/* weight inherited: 900 */
}

.ecr-ct-box__desc {
	margin: 0;
	color: var(--ct-muted);
	font-size: .875rem;
	line-height: 1.55;
}

/* margin-top:auto pins the buttons to the bottom, so a row of boxes with
   descriptions of different lengths still has its CTAs on one line. */
.ecr-ct-box__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
	padding-top: 14px;
}

.ecr-ct-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 10px 18px;
	/* Explicit, so an inherited line-height cannot inflate the pill. */
	line-height: 1.3;
	border-radius: 999px;
	background: var(--ct-bg);
	border: 1px solid var(--ct-border);
	color: var(--ct-primary);
	font-size: .8125rem;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.3;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.ecr-ct-btn:hover,
.ecr-ct-btn:focus-visible {
	background: var(--ct-primary);
	border-color: var(--ct-primary);
	color: var(--ct-white);
}

.ecr-ct-btn--primary {
	background: var(--ct-primary);
	border-color: var(--ct-primary);
	color: var(--ct-white);
}

.ecr-ct-btn--primary:hover,
.ecr-ct-btn--primary:focus-visible {
	background: var(--ct-primary-dark);
	border-color: var(--ct-primary-dark);
	color: var(--ct-white);
}

/* -----------------------------------------------------------------------------
   RESPONSIVE — Salient's own breakpoints
   -------------------------------------------------------------------------- */

@media only screen and (max-width: 1300px) {
	.ecr-ct {
		padding: 64px 25px;
	}

	/* A box is 248 px wide at 1280: 24 px sides leave the 189 px that Press
	   needs for its two buttons on one line. */
	.ecr-ct-box {
		padding-left: 24px;
		padding-right: 24px;
	}
}

@media only screen and (max-width: 1279px) {
	.ecr-ct__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media only screen and (max-width: 1000px) {
	.ecr-ct {
		padding: 56px 22px;
	}

	.ecr-ct__header {
		margin-bottom: 36px;
	}

	.ecr-ct__grid {
		gap: 16px;
	}

	.ecr-ct-box {
		padding: 26px 22px;
	}
}

@media only screen and (max-width: 690px) {
	.ecr-ct {
		padding: 40px 18px;
	}

	/* Single column. minmax(0,1fr) rather than 1fr so a long unbroken string
	   cannot force horizontal overflow. Each box its own height here: in one
	   column equal heights would only add empty space. */
	.ecr-ct__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-auto-rows: auto;
	}

	/* Full-width tap targets on the phone. */
	.ecr-ct-btn {
		flex: 1 1 auto;
		padding: 12px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ecr-ct-box,
	.ecr-ct-btn {
		transition: none;
	}

	.ecr-ct-box:hover,
	.ecr-ct-box:focus-within {
		transform: none;
	}
}
