/*
Theme Name: Civil War Missouri
Theme URI: https://civilwarmo.net/
Author: Civil War Missouri
Description: A quiet, readable journal of the Civil War in Missouri.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: civilwarmo
*/

:root {
	color-scheme: light;
	--paper: #f5f1e8;
	--paper-deep: #e9e1d2;
	--ink: #292820;
	--muted: #6e6a5d;
	--red: #843f34;
	--line: #cfc6b5;
	--serif: Georgia, "Times New Roman", serif;
	--sans: "Trebuchet MS", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 17px/1.7 var(--serif);
}
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: #54271f; }
a:focus-visible { outline: 3px solid #bd8c42; outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
.site-shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 1rem; z-index: 5; padding: .6rem 1rem; background: white; }
.skip-link:focus { left: 1rem; }

.site-header { border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.4rem 0 1.1rem; }
.site-brand { color: var(--ink); text-decoration: none; }
.site-title { display: block; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.05; letter-spacing: -.045em; }
.site-tagline { display: block; margin-top: .4rem; color: var(--muted); font: .76rem/1.4 var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.custom-logo { width: auto; max-height: 72px; }
.primary-navigation ul { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.primary-navigation a { color: var(--ink); font: 600 .78rem var(--sans); letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.primary-navigation a:hover { color: var(--red); }

.intro { padding: 3.4rem 0 3rem; border-bottom: 1px solid var(--line); }
.eyebrow, .post-meta, .section-label { color: var(--muted); font: 600 .72rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.intro h1 { max-width: 760px; margin: .65rem 0 .8rem; font-size: clamp(2.5rem, 7vw, 5.2rem); font-weight: 400; letter-spacing: -.055em; line-height: .99; }
.intro p { max-width: 650px; margin: 0; color: #514d42; font-size: 1.2rem; }
.content-area { padding: 2.5rem 0 4rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 1.55rem; font-weight: 400; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem 1.5rem; }
.story-card { min-width: 0; }
.story-image { aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 1rem; background: var(--paper-deep); }
.story-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.story-card a:hover .story-image img { transform: scale(1.025); }
.story-card h2 { margin: .35rem 0 .55rem; font-size: 1.55rem; font-weight: 400; line-height: 1.2; }
.story-card h2 a { color: var(--ink); text-decoration: none; }
.story-card h2 a:hover { color: var(--red); }
.story-card p { margin: 0; color: #514d42; font-size: .98rem; }
.text-link { display: inline-block; margin-top: .7rem; font: 600 .76rem var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.pagination a { font: 600 .8rem var(--sans); }

.single-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(180px, 1fr); gap: 4rem; }
.entry-header { margin-bottom: 2rem; }
.entry-title { margin: .45rem 0 .8rem; font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 400; letter-spacing: -.05em; line-height: 1.03; }
.entry-summary { color: var(--muted); font-size: 1.25rem; }
.entry-image { margin: 1.5rem 0 2rem; }
.entry-image img { width: 100%; }
.entry-content { font-size: 1.12rem; }
.entry-content > * { max-width: 68ch; }
.entry-content h2, .entry-content h3 { margin-top: 2em; line-height: 1.2; }
.entry-content blockquote { margin-inline: 0; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--red); color: #514d42; font-style: italic; }
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption { color: var(--muted); font: .78rem/1.5 var(--sans); }
.entry-sidebar { padding-top: .5rem; color: var(--muted); font-size: .92rem; }
.entry-sidebar h2 { color: var(--ink); font: 600 .75rem var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.entry-sidebar ul { margin: 0; padding: 0; list-style: none; }
.entry-sidebar li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.page-header { margin-bottom: 2rem; }
.site-footer { padding: 1.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font: .76rem var(--sans); }
.site-footer .site-shell { display: flex; justify-content: space-between; gap: 1rem; }
.empty-state { padding: 2rem; background: var(--paper-deep); }

@media (max-width: 760px) {
	.masthead { align-items: flex-start; flex-direction: column; gap: 1.2rem; }
	.primary-navigation ul { gap: .5rem 1rem; }
	.story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 1rem; }
	.single-layout { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
	.site-shell { width: min(100% - 28px, 1120px); }
	.story-grid { grid-template-columns: 1fr; }
	.story-card h2 { font-size: 1.45rem; }
	.intro { padding: 2.4rem 0; }
	.site-footer .site-shell { flex-direction: column; gap: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; }
}
