/*
Theme Name: AF Blog
Theme URI: https://analyticalfactor.com/blog/
Author: Analytical Factor LLC
Author URI: https://analyticalfactor.com/
Description: The custom publishing theme for Analytical Factor Insights.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: af-blog
License: Proprietary
*/

@font-face {
	font-family: "Geist";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/geist-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
	--af-bg: #f7f9fc;
	--af-surface: #ffffff;
	--af-text: #081329;
	--af-muted: #5f6b7c;
	--af-border: #dfe5ee;
	--af-primary: #0066ff;
	--af-primary-dark: #0051cc;
	--af-accent: #f59a18;
	--af-green: #087f5b;
	--af-navy: #071b3a;
	--af-navy-soft: #102b52;
	--af-focus: #0b6fff;
	--af-shadow: 0 12px 30px rgba(8, 19, 41, 0.08);
	--af-width: 1180px;
	--af-article-width: 860px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--af-bg);
	color: var(--af-text);
	font-family: "Geist", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	letter-spacing: 0;
	-webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header {
	top: 32px;
}

img {
	display: block;
	height: auto;
	max-width: 100%;
}

figure {
	margin: 0;
}

a {
	color: var(--af-primary-dark);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--af-primary);
}

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

button,
a {
	-webkit-tap-highlight-color: transparent;
}

:focus-visible {
	outline: 3px solid var(--af-focus);
	outline-offset: 3px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.skip-link {
	background: var(--af-surface);
	border: 2px solid var(--af-primary);
	color: var(--af-text);
	font-weight: 700;
	left: 16px;
	padding: 10px 14px;
	position: fixed;
	top: -100px;
	z-index: 10000;
}

.skip-link:focus {
	top: 16px;
}

.content-width {
	margin: 0 auto;
	max-width: var(--af-width);
	padding-left: 28px;
	padding-right: 28px;
	width: 100%;
}

.article-width {
	margin-left: auto;
	margin-right: auto;
	max-width: var(--af-article-width);
	padding-left: 28px;
	padding-right: 28px;
	width: 100%;
}

.narrow-width {
	margin: 0 auto;
	max-width: 700px;
	padding-left: 28px;
	padding-right: 28px;
	width: 100%;
}

.site-header {
	background: rgba(255, 255, 255, 0.98);
	border-bottom: 1px solid var(--af-border);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.site-header.is-scrolled {
	box-shadow: 0 5px 24px rgba(8, 19, 41, 0.09);
}

.site-header__inner {
	align-items: center;
	display: flex;
	height: 68px;
	justify-content: space-between;
	margin: 0 auto;
	max-width: var(--af-width);
	padding: 0 28px;
}

.site-brand {
	align-items: center;
	display: inline-flex;
	flex: 0 0 auto;
	text-decoration: none;
}

.site-brand img {
	height: 42px;
	object-fit: contain;
	width: 126px;
}

.site-navigation {
	align-items: center;
	display: flex;
	gap: 2px;
}

.site-navigation > a,
.nav-menu > summary {
	align-items: center;
	background: transparent;
	border: 0;
	color: #263247;
	cursor: pointer;
	display: inline-flex;
	font-size: 14px;
	font-weight: 650;
	min-height: 44px;
	padding: 0 13px;
	text-decoration: none;
	white-space: nowrap;
}

.site-navigation > a:hover,
.nav-menu > summary:hover,
.nav-menu[open] > summary {
	color: var(--af-primary);
}

.nav-menu {
	position: relative;
}

.nav-menu > summary {
	list-style: none;
}

.nav-menu > summary::-webkit-details-marker {
	display: none;
}

.nav-menu > summary::after {
	border-bottom: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	content: "";
	height: 6px;
	margin-left: 8px;
	margin-top: -4px;
	transform: rotate(45deg);
	width: 6px;
}

.nav-menu[open] > summary::after {
	margin-top: 4px;
	transform: rotate(225deg);
}

.nav-menu__panel {
	background: var(--af-surface);
	border: 1px solid var(--af-border);
	border-radius: 8px;
	box-shadow: var(--af-shadow);
	left: 0;
	min-width: 230px;
	padding: 8px;
	position: absolute;
	top: calc(100% + 6px);
}

.nav-menu__panel a {
	border-radius: 5px;
	color: #263247;
	display: block;
	font-size: 14px;
	font-weight: 550;
	padding: 10px 12px;
	text-decoration: none;
}

.nav-menu__panel a:hover,
.nav-menu__panel a[aria-current="page"] {
	background: #eef5ff;
	color: var(--af-primary-dark);
}

.nav-toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--af-text);
	cursor: pointer;
	display: none;
	height: 44px;
	justify-content: center;
	padding: 8px;
	width: 44px;
}

.nav-toggle__icon {
	display: grid;
	gap: 4px;
	width: 22px;
}

.nav-toggle__icon span {
	background: currentColor;
	display: block;
	height: 2px;
	transition: transform 160ms ease, opacity 160ms ease;
	width: 22px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

main {
	min-height: 60vh;
}

.eyebrow {
	color: var(--af-primary);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.blog-intro {
	background: var(--af-navy);
	border-bottom: 4px solid var(--af-accent);
	color: #ffffff;
	padding: 72px 0 64px;
}

.blog-intro .eyebrow {
	color: #66a3ff;
}

.blog-intro h1,
.page-heading h1,
.article-header h1,
.not-found h1 {
	font-size: 52px;
	font-weight: 760;
	letter-spacing: 0;
	line-height: 1.08;
	margin: 0;
	max-width: 780px;
}

.blog-intro__summary {
	color: #cad5e5;
	font-size: 19px;
	margin: 20px 0 28px;
	max-width: 720px;
}

.search-form {
	display: flex;
	gap: 10px;
	max-width: 560px;
	width: 100%;
}

.search-form input {
	background: var(--af-surface);
	border: 1px solid var(--af-border);
	border-radius: 6px;
	color: var(--af-text);
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
}

.search-form button {
	background: var(--af-primary);
	border: 1px solid var(--af-primary);
	border-radius: 6px;
	color: #ffffff;
	cursor: pointer;
	font-weight: 750;
	padding: 12px 20px;
}

.search-form button:hover {
	background: var(--af-primary-dark);
}

.article-index {
	background: var(--af-bg);
	padding: 64px 0 80px;
}

.section-heading {
	align-items: flex-end;
	display: flex;
	justify-content: space-between;
	margin-bottom: 28px;
}

.section-heading h2 {
	font-size: 34px;
	line-height: 1.2;
	margin: 0;
}

.text-link {
	color: var(--af-primary-dark);
	font-weight: 750;
}

.post-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
	background: var(--af-surface);
	border: 1px solid var(--af-border);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.post-card:hover {
	border-color: #b7cef1;
	box-shadow: var(--af-shadow);
	transform: translateY(-2px);
}

.post-card__media {
	aspect-ratio: 16 / 9;
	background: #e9eef7;
	display: block;
	overflow: hidden;
}

.post-card__media img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.post-card__fallback {
	align-items: flex-end;
	background: var(--af-navy-soft);
	border-bottom: 5px solid var(--af-accent);
	color: #ffffff;
	display: flex;
	font-size: 17px;
	font-weight: 750;
	height: 100%;
	padding: 22px;
	width: 100%;
}

.post-card__content {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px;
}

.post-card__category {
	color: var(--af-green);
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
	text-transform: uppercase;
}

.post-card h2 {
	font-size: 23px;
	line-height: 1.24;
	margin: 10px 0 12px;
}

.post-card h2 a {
	color: var(--af-text);
	text-decoration: none;
}

.post-card h2 a:hover {
	color: var(--af-primary-dark);
}

.post-card p {
	color: var(--af-muted);
	margin: 0 0 20px;
}

.post-card__meta {
	align-items: center;
	color: var(--af-muted);
	display: flex;
	font-size: 13px;
	gap: 8px;
	margin-top: auto;
	padding-bottom: 13px;
}

.post-card .text-link {
	font-size: 14px;
}

.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 42px;
}

.pagination .page-numbers {
	align-items: center;
	background: var(--af-surface);
	border: 1px solid var(--af-border);
	border-radius: 5px;
	color: var(--af-text);
	display: inline-flex;
	font-weight: 700;
	justify-content: center;
	min-height: 42px;
	min-width: 42px;
	padding: 8px 12px;
	text-decoration: none;
}

.pagination .current,
.pagination a:hover {
	background: var(--af-primary);
	border-color: var(--af-primary);
	color: #ffffff;
}

.page-heading {
	background: #edf3fb;
	border-bottom: 1px solid var(--af-border);
	padding: 58px 0;
}

.page-heading h1 {
	color: var(--af-text);
	font-size: 44px;
}

.page-heading__description {
	color: var(--af-muted);
	font-size: 18px;
	margin-top: 16px;
	max-width: 720px;
}

.page-heading__description p {
	margin: 0;
}

.article-header {
	background: var(--af-navy);
	color: #ffffff;
	padding: 52px 0 62px;
}

.article-header .eyebrow {
	color: #72aeff;
}

.article-header h1 {
	font-size: 48px;
	max-width: none;
}

.article-deck {
	color: #d0dae9;
	font-size: 20px;
	margin: 18px 0 0;
}

.breadcrumbs {
	align-items: center;
	color: #afbdd1;
	display: flex;
	flex-wrap: wrap;
	font-size: 13px;
	gap: 8px;
	margin-bottom: 26px;
}

.breadcrumbs a {
	color: #d8e5f7;
}

.article-meta {
	align-items: center;
	color: #afbdd1;
	display: flex;
	flex-wrap: wrap;
	font-size: 14px;
	gap: 9px;
	margin-top: 24px;
}

.article-featured-image {
	margin-top: -28px;
	position: relative;
}

.article-featured-image img {
	aspect-ratio: 16 / 9;
	border: 6px solid var(--af-surface);
	border-radius: 8px;
	box-shadow: var(--af-shadow);
	object-fit: cover;
	width: 100%;
}

.article-layout {
	align-items: start;
	display: grid;
	gap: 42px;
	grid-template-columns: minmax(0, 1fr) 230px;
	max-width: 1080px;
	padding-bottom: 72px;
	padding-top: 52px;
}

.article-content {
	color: #263247;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 18px;
	min-width: 0;
}

.article-content > *:first-child {
	margin-top: 0;
}

.article-content h2,
.article-content h3,
.article-content h4 {
	color: var(--af-text);
	font-family: "Geist", Arial, sans-serif;
	letter-spacing: 0;
	line-height: 1.25;
	margin: 38px 0 14px;
}

.article-content h2 {
	font-size: 30px;
}

.article-content h3 {
	font-size: 24px;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
	margin-bottom: 22px;
	margin-top: 0;
}

.article-content li + li {
	margin-top: 7px;
}

.article-content a {
	font-weight: 650;
}

.article-content blockquote {
	border-left: 4px solid var(--af-accent);
	color: #344056;
	font-size: 21px;
	margin-left: 0;
	padding: 6px 0 6px 22px;
}

.article-content pre {
	background: #111c31;
	border-radius: 6px;
	color: #f2f6fc;
	overflow-x: auto;
	padding: 18px;
}

.article-content table {
	border-collapse: collapse;
	display: block;
	overflow-x: auto;
	width: 100%;
}

.article-content th,
.article-content td {
	border: 1px solid var(--af-border);
	padding: 10px 12px;
	text-align: left;
}

.article-content th {
	background: #eef3fa;
	font-family: "Geist", Arial, sans-serif;
}

.article-content .alignwide {
	margin-left: -60px;
	margin-right: -60px;
	max-width: calc(100% + 120px);
	width: calc(100% + 120px);
}

.article-content .alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

.wp-caption-text,
.wp-element-caption {
	color: var(--af-muted);
	font-family: "Geist", Arial, sans-serif;
	font-size: 13px;
	margin-top: 8px;
}

.article-aside {
	border-left: 3px solid var(--af-accent);
	padding-left: 20px;
}

.article-aside h2 {
	font-size: 20px;
	margin: 0 0 8px;
}

.article-aside p:last-child {
	color: var(--af-muted);
	font-size: 14px;
	margin-bottom: 0;
}

.article-navigation {
	border-top: 1px solid var(--af-border);
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-bottom: 72px;
	padding-top: 24px;
}

.article-navigation > div:last-child {
	text-align: right;
}

.article-navigation a {
	color: var(--af-text);
	display: inline-flex;
	flex-direction: column;
	font-weight: 750;
	text-decoration: none;
}

.article-navigation a span {
	color: var(--af-muted);
	font-size: 12px;
	font-weight: 650;
	text-transform: uppercase;
}

.static-page .article-content {
	padding-bottom: 72px;
	padding-top: 50px;
}

.not-found {
	align-items: center;
	display: flex;
	min-height: 62vh;
	padding: 72px 0;
	text-align: center;
}

.not-found h1 {
	font-size: 44px;
	max-width: none;
}

.not-found p:not(.eyebrow) {
	color: var(--af-muted);
	font-size: 18px;
}

.not-found .search-form {
	margin: 26px auto 0;
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 24px;
}

.button {
	border-radius: 6px;
	display: inline-flex;
	font-weight: 750;
	justify-content: center;
	padding: 11px 18px;
	text-decoration: none;
}

.button--primary {
	background: var(--af-primary);
	border: 1px solid var(--af-primary);
	color: #ffffff;
}

.button--primary:hover {
	background: var(--af-primary-dark);
	color: #ffffff;
}

.button--secondary {
	background: var(--af-surface);
	border: 1px solid var(--af-border);
	color: var(--af-text);
}

.empty-state {
	background: var(--af-surface);
	border: 1px solid var(--af-border);
	border-radius: 8px;
	padding: 36px;
}

.empty-state h2 {
	font-size: 28px;
	margin: 0 0 8px;
}

.empty-state p {
	color: var(--af-muted);
}

.empty-state .search-form {
	margin-bottom: 20px;
}

.site-footer {
	background: #eef1f6;
	border-top: 1px solid var(--af-border);
}

.site-footer__inner {
	margin: 0 auto;
	max-width: var(--af-width);
	padding: 32px 28px 22px;
}

.site-footer__grid {
	display: grid;
	gap: 36px;
	grid-template-columns: 1.5fr 1fr 1fr;
}

.site-footer__brand img {
	height: 35px;
	object-fit: contain;
	width: 105px;
}

.site-footer__brand p {
	color: var(--af-muted);
	font-size: 14px;
	max-width: 370px;
}

.site-footer h2 {
	font-size: 14px;
	margin: 0 0 10px;
}

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

.site-footer li + li {
	margin-top: 5px;
}

.site-footer a {
	color: var(--af-muted);
	font-size: 14px;
}

.site-footer a:hover {
	color: var(--af-primary);
}

.site-footer__legal {
	align-items: center;
	border-top: 1px solid var(--af-border);
	display: flex;
	font-size: 12px;
	justify-content: space-between;
	margin-top: 26px;
	padding-top: 18px;
}

.site-footer__legal p {
	color: var(--af-muted);
	margin: 0;
}

.site-footer__legal > div {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.site-footer__legal a {
	font-size: 12px;
}

#siteseal {
	display: block;
	min-height: 1px;
}

@media (max-width: 1040px) {
	.nav-toggle {
		display: inline-flex;
	}

	.site-navigation {
		align-items: stretch;
		background: var(--af-surface);
		border-bottom: 1px solid var(--af-border);
		box-shadow: var(--af-shadow);
		display: none;
		left: 0;
		max-height: calc(100vh - 68px);
		overflow-y: auto;
		padding: 14px 24px 24px;
		position: absolute;
		right: 0;
		top: 68px;
	}

	.site-navigation.is-open {
		display: block;
	}

	.site-navigation > a,
	.nav-menu > summary {
		justify-content: space-between;
		min-height: 46px;
		padding: 0 8px;
		width: 100%;
	}

	.nav-menu {
		width: 100%;
	}

	.nav-menu__panel {
		border: 0;
		border-left: 2px solid var(--af-border);
		border-radius: 0;
		box-shadow: none;
		margin: 0 0 6px 8px;
		min-width: 0;
		padding: 2px 8px;
		position: static;
	}

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

	.article-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.article-aside {
		max-width: 520px;
	}
}

@media (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 720px) {
	.content-width,
	.article-width,
	.narrow-width {
		padding-left: 20px;
		padding-right: 20px;
	}

	.site-header__inner {
		padding: 0 20px;
	}

	.blog-intro {
		padding: 54px 0 50px;
	}

	.blog-intro h1,
	.article-header h1 {
		font-size: 38px;
	}

	.page-heading h1,
	.not-found h1 {
		font-size: 36px;
	}

	.blog-intro__summary,
	.article-deck {
		font-size: 17px;
	}

	.article-index {
		padding: 48px 0 60px;
	}

	.section-heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
	}

	.section-heading h2 {
		font-size: 30px;
	}

	.post-grid {
		grid-template-columns: 1fr;
	}

	.search-form {
		flex-direction: column;
	}

	.search-form button {
		width: 100%;
	}

	.page-heading {
		padding: 44px 0;
	}

	.article-header {
		padding: 42px 0 54px;
	}

	.article-featured-image {
		margin-top: -18px;
	}

	.article-layout {
		gap: 32px;
		padding-bottom: 54px;
		padding-top: 38px;
	}

	.article-content {
		font-size: 17px;
	}

	.article-content .alignwide {
		margin-left: 0;
		margin-right: 0;
		max-width: 100%;
		width: 100%;
	}

	.article-navigation {
		grid-template-columns: 1fr;
	}

	.article-navigation > div:last-child {
		text-align: left;
	}

	.site-footer__grid {
		grid-template-columns: 1fr;
	}

	.site-footer__legal {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
