/*
Theme Name: Synthograph Editorial
Author: Synthograph
Description: An independent editorial WordPress theme for Synthograph.
Version: 1.0.4
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: synthograph-editorial
*/

@font-face {
	font-family: "Instrument Sans";
	src: url("assets/fonts/instrument-sans.woff2") format("woff2");
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
}

@font-face {
	font-family: "Space Grotesk";
	src: url("assets/fonts/space-grotesk.woff2") format("woff2");
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
}

:root {
	--sg-paper: #f5f3ed;
	--sg-ink: #19181b;
	--sg-muted: #555157;
	--sg-line: #d0cbc3;
	--sg-accent: #d9f85a;
	--sg-violet: #6021a6;
	--sg-display: "Space Grotesk", Arial, sans-serif;
	--sg-body: "Instrument Sans", Arial, sans-serif;
	--sg-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
	--sg-gutter: clamp(18px, 4vw, 64px);
	--sg-surface-radius: 7px;
	--sg-control-radius: 5px;
	--sg-corner-control-size: 44px;
	--sg-corner-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
.sg-site { margin: 0; color: var(--sg-ink); background: var(--sg-paper); font: 400 1rem/1.55 var(--sg-body); }
.sg-site :where(h1, h2, h3, h4, p, figure) { margin: 0; }
.sg-site :where(h1, h2, h3, h4) { font-family: var(--sg-display); font-weight: 700; line-height: 1.06; }
.sg-site :where(img) { display: block; max-width: 100%; height: auto; }
.sg-site :where(a) { color: inherit; }
.sg-site :where(a, button, input):focus-visible { outline: 2px solid var(--sg-violet); outline-offset: 4px; }
.sg-wrap { width: min(91.5%, 1336px); margin-inline: auto; }
.sg-skip, .sg-site .screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sg-skip:focus, .sg-site .screen-reader-text:focus { z-index: 10000; top: 8px; left: 8px; width: auto; height: auto; margin: 0; padding: 12px 16px; border-radius: var(--sg-control-radius); color: var(--sg-ink); background: var(--sg-accent); clip-path: none; }

.sg-header { border-bottom: 1px solid var(--sg-line); scroll-margin-top: 48px; }
.sg-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 78px; gap: 26px; align-items: center; }
.sg-brand { display: inline-flex; width: fit-content; align-items: center; text-decoration: none; }
.sg-wordmark { width: clamp(168px, 18vw, 234px); height: auto; }
.sg-brand--footer .sg-wordmark { width: clamp(150px, 15vw, 200px); }
.sg-nav { display: flex; flex-wrap: wrap; gap: clamp(14px, 2.8vw, 39px); align-self: stretch; }
.sg-nav a { display: flex; align-items: center; align-self: stretch; min-height: 44px; padding: 2px 1px 0; border-bottom: 3px solid transparent; font-size: .92rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.sg-nav a:hover, .sg-nav [aria-current="page"] { color: var(--sg-violet); border-color: currentColor; }
.sg-header__description { justify-self: end; color: var(--sg-muted); font: 500 .68rem/1.35 var(--sg-mono); text-align: right; }

.sg-label { display: flex; flex-wrap: wrap; align-items: center; gap: .5em .85em; font: 600 .71rem/1.4 var(--sg-mono); letter-spacing: .055em; text-transform: uppercase; }
.sg-dot { display: inline-block; width: .64em; height: .64em; border-radius: 1px; background: currentColor; vertical-align: .12em; flex: 0 0 auto; }
.sg-primary { display: inline-flex; align-items: center; gap: 20px; width: fit-content; min-height: 48px; padding: 10px 14px 10px 17px; border-radius: var(--sg-control-radius); color: var(--sg-accent); background: var(--sg-ink); font-size: .92rem; font-weight: 650; text-decoration: none; }
.sg-primary:hover { color: white; background: var(--sg-violet); }
.sg-primary span, .sg-text-link span { font-size: 1.15em; }
.sg-text-link { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; font-size: .9rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.sg-text-link:hover { color: var(--sg-violet); text-decoration: underline; text-underline-offset: .18em; }

.sg-home { padding-top: clamp(21px, 3.3vw, 48px); }
.sg-hero { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); align-items: stretch; min-height: clamp(365px, 37vw, 528px); overflow: hidden; border-radius: var(--sg-surface-radius); }
.sg-hero__copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(24px, 3.9vw, 60px); padding-right: clamp(16px, 2vw, 32px); background: var(--sg-accent); }
.sg-hero h1 { margin-block: clamp(20px, 2.5vw, 37px) 17px; font-size: clamp(2.7rem, 5.9vw, 6.18rem); line-height: .91; letter-spacing: -.082em; }
.sg-hero h1 em { color: #421780; font-style: normal; }
.sg-hero__intro { max-width: 30ch; margin-bottom: clamp(18px, 2.5vw, 36px); font-size: clamp(.98rem, 1.56vw, 1.26rem); line-height: 1.38; }
.sg-hero__art { position: relative; overflow: hidden; background: #1a1529; }
.sg-hero__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 48%; }

.sg-desk { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(247px, .92fr); gap: clamp(24px, 3vw, 47px); align-items: start; margin-top: clamp(43px, 6vw, 90px); }
.sg-section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 0 15px; border-bottom: 1px solid var(--sg-ink); margin-bottom: 21px; }
.sg-section-head h2 { font-size: clamp(1.75rem, 3.7vw, 3.6rem); letter-spacing: -.075em; }
.sg-features__grid, .sg-grid { display: grid; gap: clamp(17px, 2.5vw, 36px); }
.sg-features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sg-card--lead { grid-column: 1 / -1; }
.sg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sg-card { min-width: 0; }
.sg-card__link { display: block; height: 100%; text-decoration: none; }
.sg-card__image { overflow: hidden; border-radius: var(--sg-surface-radius); background: #26202f; aspect-ratio: 3 / 2; }
.sg-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 230ms ease-out; }
.sg-card a:hover img, .sg-card a:focus-visible img { transform: scale(1.035); }
.sg-card__body { position: relative; padding: 14px 32px 16px 0; }
.sg-card--no-image .sg-card__body { border-top: 1px solid var(--sg-line); }
.sg-card__body .sg-label { gap: .5em .75em; color: var(--sg-violet); }
.sg-card__sample, .sg-card__body time { color: var(--sg-muted); }
.sg-card__sample::before, .sg-card__body time::before { content: " / "; color: var(--sg-muted); }
.sg-card :is(h2, h3) { margin-top: 7px; font-size: clamp(1.33rem, 2.46vw, 2.45rem); letter-spacing: -.058em; overflow-wrap: anywhere; }
.sg-card--lead h3 { max-width: 26ch; font-size: clamp(1.78rem, 3.9vw, 3.65rem); }
.sg-card a:hover :is(h2, h3) { color: var(--sg-violet); }
.sg-card__excerpt { max-width: 54ch; margin-top: 9px; color: var(--sg-muted); }
.sg-card__arrow { position: absolute; right: 3px; top: 24px; font-size: 1.35rem; line-height: 1; }
.sg-card--lead .sg-card__image { aspect-ratio: 1.75; }
.sg-home-blog { margin-top: clamp(41px, 6vw, 82px); }
.sg-grid--blog .sg-card__image { aspect-ratio: 1.67; }
.sg-grid--blog .sg-card__link { border-bottom: 1px solid var(--sg-line); }

.sg-updates--home { padding: clamp(15px, 1.8vw, 25px); border-radius: var(--sg-surface-radius); color: var(--sg-paper); background: #211d25; }
.sg-updates__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid #7f7289; }
.sg-updates__head h2 { font-size: clamp(1.43rem, 2.3vw, 2.28rem); letter-spacing: -.065em; }
.sg-updates__head h2 .sg-dot { width: .36em; height: .36em; color: var(--sg-accent); vertical-align: .21em; }
.sg-updates .agent-cr-news-list { display: block; max-width: none; margin: 0; }
.sg-updates .agent-cr-news-item { min-height: auto; margin: 0; padding: 17px 0; border: 0; border-bottom: 1px solid var(--sg-line); border-radius: 0; background: transparent; box-shadow: none; }
.sg-updates .agent-cr-news-title { margin: 0 0 7px; color: inherit; font: 700 clamp(1.12rem, 1.5vw, 1.36rem)/1.13 var(--sg-display); letter-spacing: -.03em; }
.sg-updates .agent-cr-news-title a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sg-updates .agent-cr-news-meta { color: var(--sg-muted); font: 500 .71rem/1.5 var(--sg-mono); }
.sg-updates .agent-cr-news-excerpt { margin-top: 9px; color: inherit; font: 400 .92rem/1.5 var(--sg-body); }
.sg-updates .agent-cr-news-list .agent-cr-news-link { display: inline-flex; align-items: center; margin: 9px 0 0; padding: 0; border: 0; border-radius: 0; color: var(--sg-violet); background: transparent; font-size: .84rem; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.sg-updates--home .agent-cr-news-item { border-color: #504757; }
.sg-updates--home .agent-cr-news-meta { color: #d4cadc; }
.sg-updates--home .agent-cr-news-list .agent-cr-news-link, .sg-updates--home .sg-text-link { color: var(--sg-accent); }
.sg-updates--home .agent-cr-news-item .agent-cr-news-excerpt { display: none; }
.sg-updates--home .sg-text-link { margin-top: 6px; }
.sg-site .agent-cr-rss-link { color: inherit; font: 600 .82rem/1.5 var(--sg-body); white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.sg-updates--home .agent-cr-rss-link { color: var(--sg-accent); }
.sg-updates--home a:focus-visible, .sg-footer a:focus-visible { outline-color: var(--sg-accent); }

.sg-archive, .sg-updates-page { min-height: 52vh; }
.sg-archive-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin: clamp(35px, 7vw, 98px) 0 clamp(22px, 4vw, 52px); padding-bottom: clamp(22px, 4vw, 44px); border-bottom: 1px solid var(--sg-ink); }
.sg-archive-head h1, .sg-article--page h1 { font-size: clamp(3rem, 10vw, 9rem); letter-spacing: -.089em; line-height: .88; overflow-wrap: anywhere; }
.sg-archive-head h1 span { color: var(--sg-violet); }
.sg-archive-head p:not(.sg-label), .sg-archive-head__description { max-width: 56ch; margin-top: clamp(13px, 2vw, 24px); color: var(--sg-muted); font-size: clamp(1rem, 1.65vw, 1.3rem); }
.sg-archive-head .sg-label { margin-bottom: 16px; color: var(--sg-violet); }
.sg-archive-head__action { padding: 9px 0; }
.sg-updates--archive .agent-cr-news-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(165px, .33fr); gap: 7px 23px; align-items: baseline; padding: clamp(18px, 3.3vw, 44px) 0; }
.sg-updates--archive .agent-cr-news-title { font-size: clamp(1.3rem, 2.7vw, 2.6rem); }
.sg-updates--archive .agent-cr-news-meta { justify-self: end; }
.sg-updates--archive .agent-cr-news-excerpt { grid-column: 1; max-width: 72ch; margin: 0; }
.sg-updates--archive .agent-cr-news-list .agent-cr-news-link { grid-column: 1 / -1; justify-self: start; }
.sg-grid--journal { grid-template-columns: 1fr; gap: 0; }
.sg-card--journal .sg-card__link { display: grid; grid-template-columns: minmax(150px, 26%) 1fr; align-items: center; gap: clamp(18px, 4vw, 52px); padding-block: 20px; border-bottom: 1px solid var(--sg-line); }
.sg-card--journal:first-child .sg-card__link { padding-top: 0; }
.sg-card--journal.sg-card--no-image .sg-card__link { display: block; }
.sg-card--journal.sg-card--no-image .sg-card__body { border: 0; }
.sg-card--journal h2 { font-size: clamp(1.4rem, 3.8vw, 3.1rem); }
.sg-empty { color: var(--sg-muted); padding-block: 8px 20px; }
.sg-site .pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 35px; }
.sg-site .pagination .page-numbers { padding: 7px 12px; border: 1px solid var(--sg-line); border-radius: var(--sg-control-radius); }
.sg-site .pagination .page-numbers.current { border-color: var(--sg-ink); background: var(--sg-accent); }

.sg-article { padding-top: clamp(39px, 6.7vw, 93px); }
.sg-article__head { max-width: 978px; margin: 0 auto; }
.sg-article__trail { color: var(--sg-violet); margin-bottom: 20px; }
.sg-article__trail a { text-underline-offset: 3px; }
.sg-article__trail a + a::before { content: " / "; display: inline-block; margin-right: .65em; text-decoration: none; }
.sg-article h1 { font-size: clamp(2.4rem, 6.6vw, 6.3rem); letter-spacing: -.078em; line-height: .96; overflow-wrap: anywhere; }
.sg-article__intro { max-width: 54ch; margin-top: 17px; color: var(--sg-muted); font-size: clamp(1.12rem, 1.85vw, 1.5rem); }
.sg-article__date { margin-top: 23px; color: var(--sg-muted); }
.sg-article__cover { margin: clamp(21px, 4vw, 51px) auto 0; max-width: 1106px; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--sg-surface-radius); }
.sg-article__cover img { width: 100%; height: 100%; object-fit: cover; }
.sg-prose { max-width: min(68ch, 100%); margin: clamp(22px, 5vw, 65px) auto 0; font-size: clamp(1.04rem, 1.35vw, 1.17rem); line-height: 1.72; overflow-wrap: anywhere; }
.sg-prose :where(p, ul, ol, figure, blockquote, h2, h3, h4) { margin-block: 0 1.12em; }
.sg-prose :where(h2,h3,h4) { margin-top: 1.6em; margin-bottom: .5em; letter-spacing: -.045em; }
.sg-prose h2 { font-size: clamp(1.55rem, 3.1vw, 2.45rem); }
.sg-prose h3 { font-size: clamp(1.28rem, 2vw, 1.65rem); }
.sg-prose a { color: var(--sg-violet); text-underline-offset: .16em; }
.sg-prose pre { overflow: auto; }
.sg-prose iframe { max-width: 100%; }
.sg-prose blockquote { padding-left: 1em; border-left: 3px solid var(--sg-violet); }
.sg-prose :where(.wp-caption, .wp-block-image img) { max-width: 100%; }
.sg-prose :where(img, video, iframe, pre, .has-background) { border-radius: var(--sg-surface-radius); }
.sg-prose .wp-block-button__link { border-radius: var(--sg-control-radius); }
.sg-article__sample { color: var(--sg-violet); }
.sg-article__tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 19px; border-top: 1px solid var(--sg-line); font: 500 .75rem/1.4 var(--sg-mono); }
.sg-article__tags a { padding: 5px 8px; border: 1px solid var(--sg-line); border-radius: var(--sg-control-radius); text-decoration: none; }
.sg-article__tags a:hover { border-color: var(--sg-violet); }

.sg-site .search-form { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-site .search-form input { padding: 8px 10px; border: 1px solid var(--sg-line); border-radius: var(--sg-control-radius); font: inherit; }
.sg-site .search-form .search-submit { color: var(--sg-paper); background: var(--sg-ink); cursor: pointer; }
.sg-footer { margin-top: clamp(50px, 7vw, 105px); border-radius: var(--sg-surface-radius) var(--sg-surface-radius) 0 0; color: var(--sg-paper); background: #211d25; }
.sg-footer__inner { display: flex; flex-wrap: wrap; gap: 24px 38px; justify-content: space-between; align-items: flex-start; padding-block: clamp(23px, 4vw, 45px); }
.sg-footer p { margin-top: 11px; color: #ded6e4; font-size: .91rem; }
.sg-footer__links { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; margin-top: 8px; }
.sg-footer__links a { font-weight: 600; font-size: .86rem; text-decoration: none; }
.sg-footer__links a:hover { color: var(--sg-accent); text-decoration: underline; text-underline-offset: 3px; }
.sg-footer .sg-footer__credit {
	margin-top: 0;
	padding-block: 16px calc(var(--sg-corner-control-size) + var(--sg-corner-bottom) + 18px);
	border-top: 1px solid #504757;
}
.sg-footer__credit a { text-underline-offset: .18em; }
.sg-footer__credit a:hover { color: var(--sg-accent); }

.sg-site .cky-btn-revisit-wrapper.cky-revisit-bottom-left { bottom: var(--sg-corner-bottom); }

.sg-back-to-top {
	position: fixed;
	right: max(15px, env(safe-area-inset-right, 0px));
	bottom: var(--sg-corner-bottom);
	z-index: 20;
	width: var(--sg-corner-control-size);
	height: var(--sg-corner-control-size);
	place-items: center;
	border: 1px solid var(--sg-ink);
	border-radius: var(--sg-control-radius);
	color: var(--sg-ink);
	background: var(--sg-accent);
	font: 700 1.4rem/1 var(--sg-body);
	text-decoration: none;
}
.sg-back-to-top:not([hidden]) { display: grid; }
.sg-back-to-top:hover { color: var(--sg-paper); background: var(--sg-violet); }
.sg-back-to-top:focus-visible { outline: 2px solid var(--sg-accent); outline-offset: 2px; box-shadow: 0 0 0 5px var(--sg-ink); }

@media (max-width: 940px) {
	.sg-header__inner { grid-template-columns: 1fr auto; gap: 19px; }
	.sg-header__description { display: none; }
	.sg-grid:not(.sg-grid--journal) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
	.sg-wrap { width: calc(100% - var(--sg-gutter) * 2); }
	.sg-header__inner { grid-template-columns: 1fr; min-height: 0; gap: 0; padding-top: 14px; }
	.sg-nav { justify-content: space-between; column-gap: 8px; margin-top: 5px; }
	.sg-nav a { font-size: .87rem; }
	.sg-hero { grid-template-columns: 1fr; }
	.sg-hero__copy { padding: 26px 20px 22px; }
	.sg-hero h1 { font-size: clamp(2.44rem, 10.2vw, 4.78rem); margin-top: 19px; }
	.sg-hero__art { aspect-ratio: 1.55; }
	.sg-desk { grid-template-columns: 1fr; }
	.sg-card__body { padding-right: 22px; }
	.sg-card__arrow { right: 0; font-size: 1.14rem; }
	.sg-updates--archive .agent-cr-news-item { grid-template-columns: 1fr; }
	.sg-updates--archive .agent-cr-news-meta { justify-self: start; }
	.sg-article__head { max-width: 100%; }
}

@media (max-width: 420px) {
	.sg-grid:not(.sg-grid--journal), .sg-features__grid { grid-template-columns: 1fr; }
	.sg-card--journal .sg-card__link { grid-template-columns: 1fr; gap: 8px; }
	.sg-card--journal .sg-card__image { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.sg-card__image img { transition: none; }
}
