/* ==========================================================================
   ecoven — reset, typography, layout primitives
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--ec-header-nav-h) + var(--ec-adminbar) + 24px);
}

body {
	margin: 0;
	background: var(--ec-white);
	color: var(--ec-black);
	font-family: var(--ec-font);
	font-size: var(--ec-fs-body);
	line-height: var(--ec-lh-body);
	font-synthesis-weight: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

body.ec-locked {
	overflow: hidden;
}

img,
svg,
video,
canvas,
iframe {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	color: var(--ec-heading);
	font-weight: 700;
	line-height: var(--ec-lh-head);
	text-wrap: balance;
}

h1 { font-size: var(--ec-fs-h1); }
h2 { font-size: var(--ec-fs-h2); }
h3 { font-size: var(--ec-fs-h3); }
h4 { font-size: var(--ec-fs-h4); }

p, ul, ol, figure, blockquote, table, pre {
	margin: 0 0 1.15em;
}

p:last-child,
ul:last-child,
ol:last-child {
	margin-bottom: 0;
}

a {
	color: inherit;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
	text-underline-offset: 0.18em;
	transition: color var(--ec-dur-sm) var(--ec-ease), text-decoration-color var(--ec-dur-sm) var(--ec-ease);
}

a:hover {
	text-decoration-color: currentColor;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--ec-focus);
	outline-offset: 3px;
	border-radius: 2px;
}

::selection {
	background: var(--ec-blue);
	color: var(--ec-ice);
}

hr {
	border: 0;
	height: 1px;
	background: var(--ec-border);
	margin: var(--ec-section-y-tight) 0;
}

blockquote {
	margin-inline: 0;
	padding-left: 1.25rem;
	border-left: 3px solid var(--ec-blue);
	color: var(--ec-ink);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th, td {
	text-align: left;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--ec-border);
}

/* --------------------------------------------------------------- Utilities */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 1001;
	padding: 0.9rem 1.4rem;
	background: var(--ec-blue);
	color: #fff;
	font-weight: 700;
	transition: top var(--ec-dur-sm) var(--ec-ease);
}

.skip-link:focus {
	top: calc(1rem + var(--ec-adminbar));
}

/* ---------------------------------------------------------------- Layout */

.ec-wrap {
	width: min(100% - (var(--ec-gutter) * 2), var(--ec-container));
	margin-inline: auto;
}

.ec-wrap--narrow {
	width: min(100% - (var(--ec-gutter) * 2), var(--ec-container-narrow));
	margin-inline: auto;
}

.ec-wrap--full {
	width: 100%;
}

.ec-s {
	position: relative;
	background: var(--ec-bg);
	color: var(--ec-fg);
	padding-block: var(--ec-section-y);
	isolation: isolate;
}

.ec-s--space-tight { padding-block: var(--ec-section-y-tight); }
.ec-s--space-flush { padding-block: 0; }

.ec-grid {
	display: grid;
	gap: var(--ec-col-gap);
}

.ec-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ec-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ec-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1080px) {
	.ec-grid--3,
	.ec-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
	.ec-grid--2,
	.ec-grid--3,
	.ec-grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------- Section header */

.ec-head {
	display: grid;
	gap: 0.75rem;
	margin-bottom: clamp(2rem, 1.2rem + 2.6vw, 3.75rem);
}

.ec-head--center {
	justify-items: center;
	text-align: center;
}

.ec-head--center .ec-head__intro {
	max-width: 62ch;
}

.ec-head__eyebrow {
	margin: 0;
	color: var(--ec-heading);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: var(--ec-track-eyebrow);
	text-transform: uppercase;
}

.ec-head__title {
	margin: 0;
	font-size: var(--ec-fs-h2);
	line-height: 1.14;
	text-transform: uppercase;
}

.ec-head__intro {
	margin: 0;
	color: var(--ec-fg);
	font-size: var(--ec-fs-body);
	max-width: 78ch;
}

.ec-s--tone-blue .ec-head__intro,
.ec-s--tone-dark .ec-head__intro {
	color: var(--ec-muted);
}

/* ------------------------------------------------------------- Rich text */

.ec-rte > :first-child { margin-top: 0; }
.ec-rte > :last-child { margin-bottom: 0; }

.ec-rte h2,
.ec-rte h3,
.ec-rte h4 {
	margin: 2em 0 0.6em;
}

.ec-rte ul,
.ec-rte ol {
	padding-left: 1.35rem;
}

.ec-rte li + li {
	margin-top: 0.4em;
}

.ec-rte a {
	color: var(--ec-blue);
	text-decoration: underline;
}

.ec-rte strong {
	color: var(--ec-heading);
}

.ec-rte img {
	margin-block: 1.6em;
}

.ec-rte figcaption {
	margin-top: 0.6em;
	color: var(--ec-muted);
	font-size: var(--ec-fs-sm);
}

/* ------------------------------------------------------- Image primitives */

.ec-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ec-img--placeholder {
	display: grid;
	place-items: center;
	min-height: 180px;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--ec-blue) 8%, transparent), transparent 60%),
		repeating-linear-gradient(45deg, var(--ec-ice) 0 12px, #e8f5fd 12px 24px);
	color: color-mix(in srgb, var(--ec-blue) 55%, transparent);
	font-size: var(--ec-fs-2xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	padding: 1rem;
}

.ec-media {
	position: relative;
	overflow: hidden;
	background: var(--ec-ice);
}

.ec-media > img,
.ec-media > .ec-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ec-media--16x9 { aspect-ratio: 16 / 9; }
.ec-media--4x3 { aspect-ratio: 4 / 3; }
.ec-media--3x2 { aspect-ratio: 3 / 2; }
.ec-media--card { aspect-ratio: 464 / 280; }
.ec-media--tile { aspect-ratio: 464 / 320; }
.ec-media--square { aspect-ratio: 1; }

/* Dark scrim used on hero and banner photography. */
.ec-scrim::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgb(26 26 26 / 0.42) 0%, rgb(26 26 26 / 0.28) 45%, rgb(10 25 48 / 0.55) 100%);
	pointer-events: none;
}
