/*
 * Yuen Zeon: fonts, tokens, base typography and page content (block editor) styles.
 * Components (header, footer, product pages, sections) are styled by the Yuen Zeon Core plugin.
 */

@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations"), url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Fraunces";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/fraunces-latin-opsz-italic.woff2") format("woff2-variations"), url("../fonts/fraunces-latin-opsz-italic.woff2") format("woff2");
}
@font-face {
	font-family: "Instrument Sans";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
	--yz-surface: #f3f4ef;
	--yz-raised: #ffffff;
	--yz-deep: #12241c;
	--yz-line: #d9ddd4;
	--yz-line-strong: #c3c9bf;
	--yz-ink: #16201b;
	--yz-muted: #56625b;
	--yz-on-deep: #eef0ea;
	--yz-on-deep-muted: #a3ada6;
	--yz-evergreen: #1f3a2e;
	--yz-on-evergreen: #f3f4ef;
	--yz-sage: #8db39b;
	--yz-brass: #b08d57;
	--yz-brass-light: #c9a86e;
	--yz-brass-ink: #7f622e;
	--yz-berry: #7a1f2b;
	--yz-focus: #2f6b4f;
	--yz-frost: #e3e7de;
	--yz-frost-2: #dfe4d9;
	--yz-display: "Fraunces", "Iowan Old Style", Georgia, serif;
	--yz-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
	--yz-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
	--yz-radius: 2px;
	--yz-radius-m: 6px;
	--yz-wrap: 1360px;
	--yz-gutter: 40px;
	--yz-section: 128px;
}
@media (max-width: 720px) {
	:root {
		--yz-gutter: 20px;
		--yz-section: 80px;
	}
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 24px;
}
body {
	margin: 0;
	background: var(--yz-surface);
	color: var(--yz-ink);
	font-family: var(--yz-sans);
	font-size: 16px;
	line-height: 26px;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
*,
*::before,
*::after {
	box-sizing: border-box;
}
img,
svg,
video {
	max-width: 100%;
	height: auto;
}
h1,
h2,
h3,
h4 {
	font-family: var(--yz-display);
	font-weight: 380;
	color: inherit;
	text-wrap: balance;
}
h1 em,
h2 em,
h3 em {
	font-style: italic;
	font-weight: 300;
}
p,
li {
	text-wrap: pretty;
}
a {
	color: var(--yz-evergreen);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
a:hover {
	color: var(--yz-ink);
}
::selection {
	background: var(--yz-evergreen);
	color: var(--yz-on-evergreen);
}
:focus-visible {
	outline: 2px solid var(--yz-focus);
	outline-offset: 2px;
}
.yz-skip {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 1000;
	padding: 12px 18px;
	background: var(--yz-ink);
	color: var(--yz-surface);
	font-weight: 600;
	text-decoration: none;
}
.yz-skip:focus {
	top: 16px;
	color: var(--yz-surface);
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------------------------------------------------------------------------
 * Page content written in the block editor.
 * Wrapped in .yz-prose by the page template. Element rules use :where() so
 * the components placed in a page (cards, forms, tables) keep their own type.
 * ------------------------------------------------------------------------ */

.yz-prose {
	max-width: var(--yz-wrap);
	margin: 0 auto;
	padding: 0 var(--yz-gutter) var(--yz-section);
}
.yz-prose > * {
	max-width: 46rem;
	margin-top: 0;
	margin-bottom: 24px;
}
.yz-prose > :last-child {
	margin-bottom: 0;
}
.yz-prose > .alignwide,
.yz-prose > .alignfull,
.yz-prose > .yz-sec,
.yz-prose > .wp-block-columns,
.yz-prose > .wp-block-table,
.yz-prose > .wp-block-shortcode,
.yz-prose > .yz-wide {
	max-width: none;
}
:where(.yz-prose) h2 {
	margin: 0 0 24px;
	font-size: clamp(32px, 3.4vw, 48px);
	line-height: 1.06;
	font-weight: 360;
	letter-spacing: -0.02em;
}
:where(.yz-prose) h3 {
	margin: 32px 0 12px;
	font-size: 24px;
	line-height: 30px;
	font-weight: 400;
}
:where(.yz-prose) p {
	font-size: 17px;
	line-height: 28px;
}
.yz-prose .is-style-lead,
.yz-prose .yz-lead {
	font-size: 20px;
	line-height: 31px;
	color: var(--yz-muted);
}
:where(.yz-prose) ul,
:where(.yz-prose) ol {
	padding-left: 1.2em;
}
:where(.yz-prose) li {
	margin-bottom: 8px;
	font-size: 17px;
	line-height: 28px;
}
:where(.yz-prose) li::marker {
	color: var(--yz-brass);
}
:where(.yz-prose) strong {
	font-weight: 600;
}
:where(.yz-prose) hr,
.yz-prose .wp-block-separator {
	max-width: none;
	margin: 48px 0;
	border: 0;
	border-top: 1px solid var(--yz-ink);
}

/* Editorial section: heading on the left, content on the right. */
.yz-prose .yz-sec {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	column-gap: 56px;
	margin: 0;
	padding: 56px 0;
	border-top: 1px solid var(--yz-ink);
}
.yz-prose .yz-sec + .yz-sec {
	border-top-color: var(--yz-line);
}
/* The page header already ends with a rule. */
.yz-prose > .yz-sec:first-child {
	padding-top: 16px;
	border-top: 0;
}
.yz-prose .yz-sec > h2 {
	grid-column: 1;
	grid-row: 1 / span 30;
	align-self: start;
	position: sticky;
	top: 24px;
	font-size: clamp(30px, 2.8vw, 40px);
	line-height: 1.08;
}
.yz-prose .yz-sec > *:not(h2) {
	grid-column: 2;
	max-width: 46rem;
	margin-top: 0;
	margin-bottom: 20px;
}
.yz-prose .yz-sec > .wp-block-table,
.yz-prose .yz-sec > .wp-block-shortcode,
.yz-prose .yz-sec > .yz-wide {
	max-width: none;
}
.yz-prose .yz-sec > :last-child {
	margin-bottom: 0;
}
@media (max-width: 900px) {
	.yz-prose .yz-sec {
		grid-template-columns: minmax(0, 1fr);
		padding: 40px 0;
	}
	.yz-prose .yz-sec > h2 {
		position: static;
		grid-row: auto;
		margin-bottom: 20px;
	}
	.yz-prose .yz-sec > *:not(h2) {
		grid-column: 1;
	}
}

/* Numbered steps (ordered list with a bold lead-in). */
.yz-prose ol.yz-steps,
.yz-prose .yz-sec > ol.yz-steps {
	max-width: none;
	list-style: none;
	padding: 0;
	counter-reset: yz-step;
	border-top: 1px solid var(--yz-line);
}
.yz-prose ol.yz-steps > li {
	position: relative;
	margin: 0;
	padding: 16px 0 16px 48px;
	border-bottom: 1px solid var(--yz-line);
	counter-increment: yz-step;
}
.yz-prose ol.yz-steps > li::before {
	content: counter(yz-step);
	position: absolute;
	left: 0;
	top: 17px;
	width: 26px;
	height: 26px;
	border: 1px solid var(--yz-brass);
	border-radius: 999px;
	color: var(--yz-brass-ink);
	font: 500 12px/24px var(--yz-mono);
	text-align: center;
}
.yz-prose ol.yz-steps > li strong {
	color: var(--yz-ink);
}

/* Tables: spec-sheet style. */
.yz-prose .wp-block-table {
	margin: 0 0 24px;
	overflow-x: auto;
}
.yz-prose .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 22px;
}
.yz-prose .wp-block-table th,
.yz-prose .wp-block-table td {
	padding: 12px 16px 12px 0;
	border: 0;
	border-bottom: 1px solid var(--yz-line);
	text-align: left;
	vertical-align: top;
}
.yz-prose .wp-block-table thead th {
	border-bottom: 1px solid var(--yz-ink);
	color: var(--yz-muted);
	font: 500 12px/16px var(--yz-mono);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.yz-prose .wp-block-table tbody tr:first-child td {
	border-top: 1px solid var(--yz-ink);
}
.yz-prose .wp-block-table thead + tbody tr:first-child td {
	border-top: 0;
}
.yz-prose .wp-block-table td:first-child {
	color: var(--yz-muted);
}
.yz-prose .wp-block-table td + td {
	font-family: var(--yz-mono);
	font-size: 14px;
}
.yz-prose .wp-block-table.yz-text-table td + td {
	font-family: inherit;
	font-size: inherit;
}
.yz-prose .wp-block-table figcaption {
	margin-top: 8px;
	color: var(--yz-muted);
	font-size: 14px;
}

/* FAQ: details blocks. */
.yz-prose .wp-block-details,
.yz-prose .yz-sec > .wp-block-details {
	max-width: none;
	margin-top: 0;
	margin-bottom: 0;
	padding: 20px 0;
	border-bottom: 1px solid var(--yz-line);
}
.yz-prose .wp-block-details:first-of-type,
.yz-prose h2 + .wp-block-details,
.yz-prose .yz-sec > .wp-block-details:first-of-type {
	border-top: 1px solid var(--yz-ink);
}
.yz-prose .wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-family: var(--yz-display);
	font-size: 22px;
	line-height: 30px;
	font-weight: 380;
}
.yz-prose .wp-block-details summary::-webkit-details-marker {
	display: none;
}
.yz-prose .wp-block-details summary::after {
	content: "+";
	flex: none;
	color: var(--yz-brass-ink);
	font: 400 20px/30px var(--yz-mono);
}
.yz-prose .wp-block-details[open] summary::after {
	content: "–";
}
.yz-prose .wp-block-details > :not(summary) {
	margin: 12px 0 0;
	color: var(--yz-muted);
}

/* Images. */
.yz-prose .wp-block-image {
	margin: 0 0 24px;
}
.yz-prose .wp-block-image img {
	display: block;
	border-radius: var(--yz-radius);
	background: var(--yz-frost);
}
.yz-prose .wp-block-image figcaption,
.yz-prose .wp-element-caption {
	margin-top: 10px;
	color: var(--yz-muted);
	font: 400 12px/16px var(--yz-mono);
}

/* Buttons. Block buttons get the doubled class so they win over the
   pill-shaped defaults WordPress loads after this file. */
.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.wp-block-button .wp-block-button__link.wp-block-button__link,
.yz-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 26px;
	border: 1px solid var(--yz-evergreen);
	border-radius: var(--yz-radius);
	background: var(--yz-evergreen);
	color: var(--yz-on-evergreen);
	font: 600 16px/1.2 var(--yz-sans);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.wp-block-button .wp-block-button__link.wp-block-button__link:hover,
.yz-btn:hover {
	background: #2b4c3d;
	color: var(--yz-on-evergreen);
}
.wp-block-button.is-style-outline .wp-block-button__link.wp-block-button__link,
.yz-btn--ghost {
	padding: 0 26px;
	border: 1px solid var(--yz-ink);
	background: transparent;
	color: var(--yz-ink);
}
.wp-block-button.is-style-outline .wp-block-button__link.wp-block-button__link:hover,
.yz-btn--ghost:hover {
	background: var(--yz-ink);
	color: var(--yz-surface);
}

/* Columns. */
.yz-prose .wp-block-columns {
	gap: 56px;
	margin-bottom: 0;
}
@media (max-width: 781px) {
	.yz-prose .wp-block-columns {
		gap: 40px;
	}
}

/* Quote and pullquote. */
.yz-prose blockquote {
	margin: 32px 0;
	padding: 0 0 0 24px;
	border-left: 2px solid var(--yz-brass);
	font-family: var(--yz-display);
	font-size: 24px;
	line-height: 34px;
}

/* Small mono label used above headings. */
.yz-label {
	margin: 0 0 16px;
	color: var(--yz-brass-ink);
	font: 400 13px/18px var(--yz-mono);
}
