/* Hughes — a quiet, book-like theme. Loaded on the front end and in the block editor.
   Design B (Charles's choice, 2026-09-29), after joshuamehigan.info in sage: the name as a centred masthead,
   spaced capitals for the menu, one narrow column, links in a single accent colour, a one-line footer. */

:root {
	--paper: #eef2e7;          /* light sage page */
	--ink: #1f2620;
	--muted: #56614f;
	--evening: #46663f;        /* deep sage: links, current menu item (5:1 on the page) */
	--evening-dark: #36512f;
	--rule: #c9d5bb;
	--sage: #aebd98;           /* photo frame, announcement rule */
	--sage-light: #dce5d0;     /* announcement panel */
	--measure: 36rem;
	--wide: 66rem;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
	line-height: 1.6;
	font-kerning: normal;
	font-variant-ligatures: common-ligatures;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

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

/* Links are the accent colour with no underline, as on the reference site. */
a { color: var(--evening); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--evening); outline-offset: 3px; }

.skip-link {
	position: absolute;
	left: -999px;
	top: 0.5rem;
	background: var(--ink);
	color: var(--paper);
	padding: 0.5rem 1rem;
	z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Header: centred name, spaced capitals ---------- */

.site-header__inner {
	max-width: var(--wide);
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 1.6rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
}

.site-title {
	font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3rem);
	letter-spacing: 0.01em;
	line-height: 1.1;
	color: var(--ink);
	text-decoration: none;
	text-align: center;
}
.site-title:hover { text-decoration: none; }

.site-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem 1.6rem;
}

.site-nav a {
	font-family: var(--sans);
	text-transform: uppercase;
	font-size: 0.82rem;
	letter-spacing: 0.16em;
	color: var(--ink);
	text-decoration: none;
	padding-block: 0.25rem;
}
.site-nav a:hover,
.site-nav .current-menu-item > a { color: var(--evening-dark); text-decoration: none; box-shadow: inset 0 -2px 0 var(--evening-dark); }

.nav-toggle { display: none; }

@media (max-width: 44rem) {
	.js .nav-toggle {
		display: inline-block;
		font-family: var(--sans);
		text-transform: uppercase;
		font-size: 0.8rem;
		letter-spacing: 0.16em;
		background: none;
		border: 1px solid var(--evening-dark);
		color: var(--ink);
		padding: 0.35rem 0.9rem;
		cursor: pointer;
	}
	.js .site-nav { display: none; }
	.js .nav-open .site-nav { display: block; }
	.site-nav__list { flex-direction: column; align-items: center; gap: 0.6rem; padding-block: 0.25rem; }
}

/* ---------- Page body ---------- */

.site-main { padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(3rem, 8vw, 6rem); }

.entry-header {
	max-width: var(--measure);
	margin: 0 auto 2.5rem;
	text-align: center;
}

.entry-title,
.entry-content h1 {
	font-weight: 400;
	font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
	line-height: 1.15;
	margin: 0;
}

/* Content column: everything sits on the reading measure unless marked wide or full. */
.entry-content > *,
.editor-styles-wrapper .is-root-container > * {
	max-width: var(--measure);
	margin-left: auto;
	margin-right: auto;
}
.entry-content > .alignwide,
.editor-styles-wrapper .is-root-container > .alignwide { max-width: var(--wide); }
.entry-content > .alignfull { max-width: none; }

.entry-content > * + * { margin-top: 1.25em; }
.entry-content p { margin-block: 0; }
.entry-content p + p { margin-top: 1em; }

.entry-content h2 {
	font-weight: 400;
	font-size: clamp(1.6rem, 1.35rem + 1vw, 2rem);
	line-height: 1.2;
	margin: 3rem auto 1rem;
}
.entry-content h3 {
	font-weight: 500;
	font-size: 1.25rem;
	line-height: 1.35;
	margin: 2.75rem auto 0.9rem;
	color: var(--evening-dark);
}
.entry-content > h3:first-child { margin-top: 0; }

/* Small-caps label above a heading (block style "Small caps label"). */
.entry-content .is-style-eyebrow,
.editor-styles-wrapper .is-style-eyebrow {
	font-size: 1rem;
	font-style: normal;
	font-weight: 500;
	font-variant-caps: all-small-caps;
	letter-spacing: 0.14em;
	color: var(--muted);
	margin-bottom: 0.25rem;
}
.entry-content .is-style-eyebrow + * { margin-top: 0; }

.entry-content hr,
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--rule);
	margin-block: 4rem;
}

.has-small-font-size { font-size: 0.95rem; }
.has-large-font-size { font-size: 1.5rem; line-height: 1.45; }
.has-muted-color { color: var(--muted); }

/* ---------- Buttons ---------- */

.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.wp-block-button__link,
.wpcf7-submit {
	display: inline-block;
	font-family: var(--sans);
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	background: var(--evening);
	color: #fff;
	border: 1px solid var(--evening);
	border-radius: 0;
	padding: 0.75rem 1.6rem;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
.wp-block-button__link:hover,
.wpcf7-submit:hover { background: var(--evening-dark); border-color: var(--evening-dark); color: #fff; text-decoration: none; }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--evening); }
.is-style-outline .wp-block-button__link:hover { background: var(--evening); color: #fff; }

/* ---------- Columns & images ---------- */

.wp-block-columns {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: flex-start;
}
.wp-block-columns.are-vertically-aligned-center { align-items: center; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
.wp-block-column > * + * { margin-top: 1rem; }
.wp-block-column > :first-child { margin-top: 0; }
@media (max-width: 44rem) {
	.wp-block-columns { flex-direction: column; }
	.wp-block-column { flex-basis: auto !important; width: 100%; }
}

.wp-block-image { margin: 0; }
.wp-block-image img { display: block; }
.wp-block-image figcaption {
	font-size: 0.95rem;
	color: var(--muted);
	margin-top: 0.6rem;
	font-style: italic;
}

/* Book covers (block style "Book cover"): printed-object shadow. */
.is-style-cover img {
	box-shadow:
		0 1px 2px rgb(31 38 32 / 0.12),
		0 10px 30px -8px rgb(31 38 32 / 0.35);
	border-radius: 1px;
}

/* Author photo, in a sage frame. */
.author-photo img { padding: 0.45rem; background: var(--sage); }
.entry-content > .author-photo { margin: 0 auto 2rem; }
.entry-content > .author-photo img { max-width: 20rem; }

/* ---------- Home page ---------- */

/* "Coming soon" announcement (The Faith of Children, 2027; no cover yet), on a sage panel. */
.entry-content > .coming-soon {
	max-width: 34rem;
	text-align: center;
	padding: 2.25rem 1.5rem 2.4rem;
	margin-bottom: 3rem;
	background: var(--sage-light);
	border-top: 3px solid var(--sage);
}
.coming-soon .is-style-eyebrow { color: var(--evening-dark) !important; }
.entry-content .coming-soon__title {
	font-style: italic;
	font-size: clamp(2.4rem, 1.7rem + 3vw, 3.8rem);
	line-height: 1.1;
	margin: 0.35rem auto 0.4rem;
	color: var(--evening-dark);
}
.coming-soon__sub { font-size: 1.3rem; color: var(--muted); }
.entry-content .coming-soon__meta { margin-top: 1rem; }

/* Bio with the photo set into it. */
.entry-content > .home-b { max-width: 34rem; }
.home-b::after { content: ""; display: block; clear: both; }
.home-b p + p { margin-top: 1.4em; }
.home-b .alignleft {
	float: left;
	width: 13rem;
	margin: 0.35rem 1.75rem 0.75rem 0;
}
@media (max-width: 34rem) {
	.home-b .alignleft { float: none; width: 100%; max-width: 20rem; margin: 0 0 1.75rem; }
}

/* A quiet shelf under the bio: each cover links to the book on the Books page. */
.home-books {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	align-items: start;   /* covers are all 2:3, so tops and bottoms line up; a caption that wraps grows downward */
}
.entry-content > .home-books { max-width: 34rem; margin-top: 4rem !important; }
.home-books > .wp-block-group,
.home-books > figure { margin: 0 !important; }
.home-books .wp-block-image { margin-bottom: 0.9rem; }
/* Same size for every cover, whatever the source scan. */
.home-books .wp-block-image img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform 0.2s; }
.home-books a:hover img { transform: translateY(-3px); }
.home-books p { text-align: center; font-size: 0.95rem; line-height: 1.35; margin: 0; }
.home-books .book-meta { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 30rem) { .home-books { gap: 0.9rem; } .home-books p { font-size: 0.9rem; } }

/* Design previews: links look like links but do nothing. */
.is-design-preview a:not([href]) { cursor: default; }

/* ---------- Lists: "Table of contents" style for poems, reviews, essay, interviews ----------
   One entry per line, "Title, Source", as on joshuamehigan.info. */

.is-style-contents {
	list-style: none;
	padding: 0;
}
.is-style-contents li { line-height: 1.45; }
.is-style-contents li + li { margin-top: 0.7rem; }
.is-style-contents .source { color: var(--muted); font-style: italic; }
.is-style-contents .source::before { content: ", "; font-style: normal; }

/* ---------- Praise ---------- */

.wp-block-quote {
	margin: 0;
	padding: 0;
	border: 0;
}
.is-style-praise {
	padding-left: 1.5rem;
	border-left: 2px solid var(--sage);
}
.is-style-praise + .is-style-praise { margin-top: 2rem; }
.is-style-praise p { font-size: 1.05em; }
.wp-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-style: normal;
	font-size: 0.95rem;
	color: var(--muted);
	line-height: 1.45;
}
.wp-block-quote cite::before { content: "— "; }

/* ---------- Books page: cover on the left, where to buy it on the right ---------- */

.entry-content > .book { max-width: 44rem; }
.book + .book { margin-top: clamp(3.5rem, 8vw, 5.5rem) !important; }
.book .wp-block-column:first-child { flex: 0 0 19rem; }
.book .is-style-cover img { width: 100%; }
.book .available-from {
	font-family: var(--sans);
	text-transform: uppercase;
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	color: var(--muted);
}
.book-links { list-style: none; padding: 0; margin: 0.6rem 0 0; font-size: 1.3rem; }
.book-links li + li { margin-top: 0.35rem; }
.book-links a::after { content: " \2192"; font-size: 0.85em; }
@media (max-width: 44rem) {
	/* Phones: the cover takes the width, the links sit under it. */
	.book .wp-block-column:first-child { flex-basis: auto; }
	.book .is-style-cover { max-width: 24rem; margin-inline: auto; }
	.book .wp-block-column:last-child { text-align: center; }
	.book.wp-block-columns { gap: 1.5rem; }
}

/* ---------- Contact Form 7 ---------- */

.wpcf7 { max-width: var(--measure); margin-inline: auto; }
.wpcf7 p { margin: 0 0 1.25rem; }
.wpcf7 label {
	display: block;
	font-family: var(--sans);
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	color: var(--muted);
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
	display: block;
	width: 100%;
	margin-top: 0.4rem;
	font: inherit;
	font-family: var(--serif);
	font-size: 1.1rem;
	text-transform: none;
	letter-spacing: normal;
	color: var(--ink);
	background: #fbfcf8;
	border: 1px solid var(--rule);
	border-radius: 0;
	padding: 0.55rem 0.75rem;
}
.wpcf7 textarea { min-height: 10rem; resize: vertical; }
.wpcf7 input:focus,
.wpcf7 textarea:focus { outline: none; border-color: var(--evening); box-shadow: 0 0 0 1px var(--evening); }
.wpcf7-not-valid-tip { font-family: var(--serif); text-transform: none; letter-spacing: normal; font-size: 0.95rem; color: #9b2c2c; }
.wpcf7-response-output { margin: 1rem 0 0 !important; padding: 0.75rem 1rem !important; font-size: 1rem; }
/* Spam trap (functions.php): a field people never see, so only robots fill it in. */
.wpcf7 .hughes-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer: one line, the copyright, centred ---------- */

.site-footer__inner {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 1.5rem var(--gutter);
}
.site-footer__copy {
	margin: 0;
	text-align: center;
	font-family: var(--sans);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	color: var(--ink);
}

/* ---------- Editor tweaks ---------- */

.editor-styles-wrapper {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.2rem;
	line-height: 1.6;
}

/* ---------- Layout refinements ---------- */

/* Footer sits at the bottom of short pages (Contact). */
body { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }
