/* ==========================================================================
   OXO Consultants — Article (single post) typography & blog listing cards.
   Styles the raw HTML emitted by the_content()/the_excerpt(), which carries no
   utility classes. Everything is built on the theme's design tokens defined in
   app.css :root (colors in oklch, Fraunces display serif, Inter body).
   Loaded only on singular posts, archives and the blog index (see functions.php).
   ========================================================================== */

/* --- Article body -------------------------------------------------------- */
.oxo-prose {
	color: var(--foreground);
	font-size: 1.075rem;
	line-height: 1.8;
	font-weight: 400;
	overflow-wrap: break-word;
}

.oxo-prose > * + * {
	margin-top: 1.5em;
}

.oxo-prose p {
	color: color-mix(in oklch, var(--foreground) 88%, transparent);
}

/* Headings — Fraunces, light, tight, matching the page heroes */
.oxo-prose h2,
.oxo-prose h3,
.oxo-prose h4 {
	font-family: var(--font-display, "Fraunces", Georgia, serif);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--foreground);
	text-wrap: balance;
}

.oxo-prose h2 {
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
	margin-top: 2.5em;
	padding-top: 0.2em;
}

.oxo-prose h3 {
	font-size: clamp(1.375rem, 1.05rem + 1.2vw, 1.75rem);
	margin-top: 2em;
}

.oxo-prose h4 {
	font-size: 1.25rem;
	margin-top: 1.75em;
	font-weight: 500;
}

/* Accent tick before the two top heading levels — echoes the hero eyebrow rule */
.oxo-prose h2::before,
.oxo-prose h3::before {
	content: "";
	display: block;
	width: 2.25rem;
	height: 2px;
	margin-bottom: 0.9rem;
	background: var(--accent);
	border-radius: 2px;
}

/* Links */
.oxo-prose a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in oklch, var(--accent) 45%, transparent);
	transition: text-decoration-color 0.2s ease;
}
.oxo-prose a:hover {
	text-decoration-color: var(--accent);
}

/* Emphasis */
.oxo-prose strong {
	color: var(--foreground);
	font-weight: 600;
}
.oxo-prose em {
	font-style: italic;
}

/* Lists */
.oxo-prose ul,
.oxo-prose ol {
	padding-left: 1.5rem;
	color: color-mix(in oklch, var(--foreground) 88%, transparent);
}
.oxo-prose li + li {
	margin-top: 0.5em;
}
.oxo-prose ul > li {
	list-style: none;
	position: relative;
	padding-left: 0.4rem;
}
.oxo-prose ul > li::before {
	content: "";
	position: absolute;
	left: -1rem;
	top: 0.72em;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 9999px;
	background: var(--accent);
}
.oxo-prose ol {
	list-style: decimal;
}
.oxo-prose ol > li::marker {
	color: var(--accent);
	font-family: var(--font-display, serif);
}

/* Blockquote — pull quote with accent rule, matches the editorial tone */
.oxo-prose blockquote {
	margin: 2em 0;
	padding: 0.25rem 0 0.25rem 1.5rem;
	border-left: 3px solid var(--accent);
	font-family: var(--font-display, "Fraunces", Georgia, serif);
	font-size: 1.35rem;
	line-height: 1.5;
	font-weight: 300;
	font-style: italic;
	color: var(--foreground);
}
.oxo-prose blockquote p {
	color: inherit;
}

/* Media */
.oxo-prose img,
.oxo-prose video {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius, 0.5rem);
	display: block;
}
.oxo-prose figure {
	margin: 2em 0;
}
.oxo-prose figcaption {
	margin-top: 0.75rem;
	font-size: 0.85rem;
	color: var(--muted-foreground);
	text-align: center;
}
.wp-caption { max-width: 100%; }

/* Inline code & blocks */
.oxo-prose code {
	font-family: var(--font-mono, monospace);
	font-size: 0.9em;
	background: var(--surface-elevated);
	border: 1px solid var(--border);
	border-radius: 0.35rem;
	padding: 0.12em 0.4em;
}
.oxo-prose pre {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius, 0.5rem);
	padding: 1.25rem 1.5rem;
	overflow-x: auto;
	font-size: 0.9rem;
	line-height: 1.6;
}
.oxo-prose pre code {
	background: none;
	border: 0;
	padding: 0;
}

/* Divider */
.oxo-prose hr {
	border: 0;
	height: 1px;
	margin: 3em 0;
	background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* Tables */
.oxo-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
	margin: 2em 0;
}
.oxo-prose th,
.oxo-prose td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--border);
	text-align: left;
}
.oxo-prose thead th {
	font-family: var(--font-display, serif);
	font-weight: 500;
	color: var(--foreground);
}
.oxo-prose tbody td {
	color: color-mix(in oklch, var(--foreground) 85%, transparent);
}

/* Drop cap on the opening paragraph */
.oxo-prose > p:first-of-type::first-letter {
	font-family: var(--font-display, "Fraunces", Georgia, serif);
	font-size: 3.4rem;
	line-height: 0.8;
	font-weight: 400;
	float: left;
	margin: 0.15rem 0.6rem 0 0;
	color: var(--accent);
}

/* --- Blog listing cards (archive / index / search) ----------------------- */
.oxo-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius, 0.5rem);
	overflow: hidden;
	transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.oxo-card:hover {
	border-color: color-mix(in oklch, var(--accent) 55%, var(--border));
	transform: translateY(-4px);
	box-shadow: 0 20px 40px -24px oklch(0% 0 0 / 0.6);
}
.oxo-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--surface-elevated);
}
.oxo-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.oxo-card:hover .oxo-card__media img {
	transform: scale(1.05);
}
.oxo-card__media--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: color-mix(in oklch, var(--accent) 60%, transparent);
}
.oxo-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.5rem;
}
.oxo-card__title {
	font-family: var(--font-display, "Fraunces", Georgia, serif);
	font-size: 1.35rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--foreground);
	transition: color 0.2s ease;
}
.oxo-card:hover .oxo-card__title {
	color: var(--accent);
}
.oxo-card__excerpt {
	margin-top: 0.75rem;
	color: var(--muted-foreground);
	font-size: 0.95rem;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.oxo-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Small meta row (date · author · reading time · category) */
.oxo-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.25rem;
	font-size: 0.8rem;
	color: var(--muted-foreground);
}
.oxo-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}
.oxo-meta__item svg {
	color: var(--accent);
	flex-shrink: 0;
}

/* --- Pagination ---------------------------------------------------------- */
.oxo-pagination {
	margin-top: 3.5rem;
}
.oxo-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}
.oxo-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--border);
	border-radius: 9999px;
	font-size: 0.9rem;
	color: var(--muted-foreground);
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.oxo-pagination a.page-numbers:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.oxo-pagination .page-numbers.current {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-foreground);
}
.oxo-pagination .page-numbers.dots {
	border-color: transparent;
}
