:root {
	--sgm-burgundy: #6b1f2a;
	--sgm-burgundy-dark: #4a151d;
	--sgm-ink: #171717;
	--sgm-line: #d8d0c2;
	--sgm-sand: #e8e1d5;
	--sgm-ivory: #f3efe6;
	--sgm-paper: #fffdf8;
	--sgm-editorial-green: #14231e;
	--sgm-editorial-blue: #12222d;
	--sgm-editorial-gold: #d3a85f;
	--sgm-reading-width: 720px;
	--sgm-wide-width: 1180px;
	--sgm-radius: 0.35rem;
	--sgm-space-section: clamp(3.5rem, 7vw, 7rem);
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--sgm-paper);
	color: var(--sgm-ink);
}

:where(.entry-content, .editor-styles-wrapper) a:not(.wp-block-button__link) {
	color: var(--sgm-burgundy);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.16em;
}

:where(.entry-content, .editor-styles-wrapper) a:not(.wp-block-button__link):hover {
	color: var(--sgm-burgundy-dark);
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--sgm-editorial-gold);
	outline-offset: 3px;
}

.ct-header-trigger {
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
}

:where(.entry-content) :where(
	.wp-element-button,
	.wp-block-button__link,
	.wp-block-post-excerpt__more-link,
	a.button,
	button,
	input[type="submit"]
) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
}

.comment-form input[type="submit"],
.ct-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
}

.entry-content :where(p, li) {
	text-wrap: pretty;
}

.sgm-editorial-shell {
	width: min(100% - 2rem, var(--sgm-wide-width));
	margin-inline: auto;
}

.sgm-reading-width {
	width: min(100%, var(--sgm-reading-width));
	margin-inline: auto;
}

.sgm-editorial-section {
	padding-block: var(--sgm-space-section);
}

.sgm-editorial-eyebrow {
	margin-bottom: 0.85rem;
	color: var(--sgm-burgundy);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.sgm-editorial-hero {
	padding-block: clamp(3.5rem, 8vw, 7.5rem);
	background: var(--sgm-editorial-green);
	color: var(--sgm-paper);
}

.sgm-editorial-hero :where(h1, h2, p, a) {
	color: inherit;
}

.sgm-editorial-hero h1 {
	max-width: 15ch;
	font-size: clamp(2.7rem, 7vw, 5.7rem);
	line-height: 0.98;
}

.sgm-editorial-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
}

.sgm-editorial-card {
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 1px solid var(--sgm-line);
	background: var(--sgm-paper);
}

.sgm-editorial-callout {
	padding: clamp(1.5rem, 4vw, 3rem);
	border-inline-start: 0.3rem solid var(--sgm-editorial-gold);
	background: var(--sgm-ivory);
}

.sgm-editorial-dark {
	background: var(--sgm-editorial-blue);
	color: var(--sgm-paper);
}

.sgm-editorial-dark :where(h2, h3, p, li, a) {
	color: inherit;
}

.sgm-editorial-book img {
	width: 100%;
	max-height: 22rem;
	object-fit: contain;
}

.sgm-editorial-newsletter {
	padding: clamp(2rem, 5vw, 4rem);
	background: var(--sgm-ivory);
}

.sgm-editorial-newsletter :where(input:not([type="submit"]), textarea, select) {
	min-height: 44px;
	border: 1px solid var(--sgm-line);
	background: var(--sgm-paper);
}

.sgm-editorial-newsletter :where(button, input[type="submit"]) {
	min-height: 44px;
}

.sgm-404-main {
	background:
		linear-gradient(180deg, rgba(232, 225, 213, 0.42), rgba(255, 253, 248, 0) 24rem),
		var(--sgm-paper);
}

.sgm-404 {
	width: min(100% - 2rem, var(--sgm-wide-width));
	margin-inline: auto;
	padding-block: clamp(4rem, 9vw, 8rem);
}

.sgm-404__intro {
	width: min(100%, var(--sgm-reading-width));
	margin-inline: auto;
}

.sgm-404 h1 {
	max-width: 14ch;
	margin-bottom: 1.5rem;
	font-size: clamp(2.7rem, 7vw, 5.6rem);
	line-height: 0.98;
	text-wrap: balance;
}

.sgm-404__lead {
	max-width: 64ch;
	font-size: clamp(1.05rem, 2vw, 1.22rem);
	line-height: 1.75;
}

.sgm-404__actions {
	display: grid;
	grid-template-columns: max-content minmax(17rem, 1fr);
	align-items: end;
	gap: clamp(1.5rem, 4vw, 3rem);
	margin-top: clamp(2rem, 5vw, 3.5rem);
}

.sgm-404__primary,
.sgm-404__search button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	border: 1px solid var(--sgm-burgundy);
	background: var(--sgm-burgundy);
	color: var(--sgm-paper) !important;
	font-weight: 700;
	text-decoration: none;
}

.sgm-404__primary {
	padding-inline: 1.25rem;
}

.sgm-404__primary:hover,
.sgm-404__search button:hover {
	border-color: var(--sgm-burgundy-dark);
	background: var(--sgm-burgundy-dark);
}

.sgm-404__search label {
	display: block;
	margin-bottom: 0.45rem;
	font-size: 0.9rem;
	font-weight: 700;
}

.sgm-404__search-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) max-content;
}

.sgm-404__search input {
	min-width: 0;
	min-height: 44px;
	border: 1px solid var(--sgm-line);
	background: var(--sgm-paper);
}

.sgm-404__search button {
	padding-inline: 1rem;
}

.sgm-404__continuation {
	margin-top: clamp(4rem, 9vw, 7rem);
}

.sgm-404__continuation > h2 {
	margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
	font-size: clamp(1.8rem, 4vw, 3rem);
}

.sgm-404__routes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
}

.sgm-404__routes .sgm-editorial-card {
	display: flex;
	flex-direction: column;
}

.sgm-404__routes .sgm-editorial-card p {
	flex-grow: 1;
}

.sgm-404__routes .sgm-editorial-card a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.sgm-site-footer {
	padding-block: clamp(3rem, 6vw, 5.5rem);
	background: var(--sgm-editorial-blue);
	color: rgba(255, 253, 248, 0.82);
}

.sgm-site-footer__inner {
	display: grid;
	grid-template-columns: minmax(16rem, 1.7fr) repeat(3, minmax(9rem, 1fr));
	gap: clamp(2rem, 4vw, 4rem);
	width: min(100% - 2rem, var(--sgm-wide-width));
	margin-inline: auto;
}

.sgm-site-footer :where(h2, h3, p, a) {
	color: inherit;
}

.sgm-site-footer h2 {
	margin-bottom: 1rem;
	color: var(--sgm-paper);
	font-size: clamp(1.55rem, 2.5vw, 2.15rem);
}

.sgm-site-footer h3 {
	margin-bottom: 1rem;
	color: var(--sgm-paper);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sgm-site-footer p {
	max-width: 34rem;
	font-size: 0.98rem;
	line-height: 1.7;
}

.sgm-site-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sgm-site-footer li + li {
	margin-top: 0.15rem;
}

.sgm-site-footer a {
	text-decoration-color: transparent;
	text-underline-offset: 0.2em;
}

.sgm-site-footer__nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.sgm-site-footer a:hover {
	color: var(--sgm-paper);
	text-decoration-color: currentColor;
}

.sgm-site-footer__primary-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-top: 0.7rem;
	padding-inline: 1.1rem;
	border: 1px solid rgba(255, 253, 248, 0.45);
	color: var(--sgm-paper) !important;
	font-weight: 700;
}

.sgm-site-footer + .ct-footer [data-row="bottom"] {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 767px) {
	.sgm-editorial-grid {
		grid-template-columns: 1fr;
	}

	.sgm-editorial-shell {
		width: min(100% - 1.25rem, var(--sgm-wide-width));
	}

	.sgm-site-footer__inner {
		grid-template-columns: 1fr 1fr;
		width: min(100% - 1.5rem, var(--sgm-wide-width));
	}

	.sgm-site-footer__about {
		grid-column: 1 / -1;
	}

	.sgm-404 {
		width: min(100% - 1.5rem, var(--sgm-wide-width));
	}

	.sgm-404__actions,
	.sgm-404__routes {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 479px) {
	.sgm-site-footer__inner {
		grid-template-columns: 1fr;
	}

	.sgm-site-footer__about {
		grid-column: auto;
	}

	.sgm-404__primary {
		width: 100%;
	}

	.sgm-404__search-row {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}

	.sgm-404__search button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
