/*
Theme Name: Hear Jesus Now
Description: A fast, reading-first theme for Hear Jesus Now: a topic-led homepage, a book / chapter / verse Bible browser, and clean article and verse pages. No page builder, no web fonts, no JavaScript libraries.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Author: Hear Jesus Now
License: GPL-2.0-or-later
Text Domain: hjn
*/

:root {
	--bg: #fbf8f2;
	--surface: #ffffff;
	--tint: #f5eee2;
	--ink: #231f1c;
	--muted: #675e56;
	--line: #e6ddd0;
	--brand: #7c1818;
	--brand-dark: #5a0f0f;
	--gold: #e8962e;
	--olive: #62651f;
	--footer: #2b1512;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 10px;
	--wrap: 1120px;
	--narrow: 720px;
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
}

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

a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 {
	font-family: var(--serif);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap--narrow { max-width: var(--narrow); }

.label {
	font-family: var(--sans);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 12px;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.more { font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.more::after { content: " \2192"; }
.more:hover { text-decoration: underline; }

.button {
	display: inline-block; background: var(--brand); color: #fff; font-weight: 600;
	padding: 12px 20px; border-radius: 8px; border: 1px solid var(--brand); text-decoration: none; margin: 0 8px 8px 0;
}
.button:hover { background: var(--brand-dark); color: #fff; }
.button--ghost { background: transparent; color: var(--brand); }
.button--ghost:hover { background: var(--tint); color: var(--brand-dark); }

/* Header ----------------------------------------------------------------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { display: block; height: 40px; width: auto; }
.brand__name { font-family: var(--sans); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--brand); }
.brand--dark .brand__name { color: #f6b6ae; }

.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav__list { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav__list a { color: var(--ink); font-weight: 600; font-size: 0.95rem; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav__list a:hover, .nav__list .current-menu-item > a { color: var(--brand); border-bottom-color: var(--gold); }

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

/* Search ----------------------------------------------------------------- */

.search { display: flex; }
.search input {
	flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--surface);
	border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; padding: 10px 14px;
}
.search input::placeholder { color: #8b8178; }
.search button {
	font: inherit; font-weight: 600; color: #fff; background: var(--brand); border: 1px solid var(--brand);
	border-radius: 0 8px 8px 0; padding: 10px 18px; cursor: pointer;
}
.search button:hover { background: var(--brand-dark); }
.search--header input { width: 190px; padding: 7px 12px; font-size: 0.92rem; }
.search--header button { padding: 7px 12px; font-size: 0.92rem; }
.search--hero { max-width: 600px; margin: 28px auto 0; box-shadow: 0 6px 24px rgba(60, 30, 10, 0.08); border-radius: 10px; }
.search--hero input { padding: 16px 18px; font-size: 1.05rem; border-radius: 10px 0 0 10px; }
.search--hero button { padding: 16px 26px; border-radius: 0 10px 10px 0; }
.search--page { max-width: 560px; margin-top: 18px; }

/* Homepage --------------------------------------------------------------- */

.hero { background: radial-gradient(1200px 400px at 50% -10%, #fbe6c8 0%, var(--tint) 55%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero__inner { text-align: center; padding-block: 72px 76px; }
.hero h1 { max-width: 17ch; margin-inline: auto; font-size: clamp(2.1rem, 5.4vw, 3.4rem); }
.hero__lede { font-size: 1.2rem; color: var(--muted); max-width: 56ch; margin: 14px auto 0; }

.section { padding-block: 56px; }
.section--tint { background: var(--tint); border-block: 1px solid var(--line); }
.section--flush { padding-block: 0 40px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section__head h2 { margin: 0; }
.section__intro { color: var(--muted); max-width: 66ch; margin-top: -10px; margin-bottom: 28px; }

.grid { display: grid; gap: 20px; list-style: none; margin: 0; padding: 0; }
.grid--topics { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid--two { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--books { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }

.topic, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.topic { display: flex; flex-direction: column; }
.topic h3 { margin-bottom: 6px; }
.topic h3 a, .card__title a { color: var(--ink); text-decoration: none; }
.topic h3 a:hover, .card__title a:hover { color: var(--brand); text-decoration: underline; }
.topic__blurb { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.topic ul { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.topic li { border-bottom: 1px solid var(--line); }
.topic li a { display: block; padding: 9px 0; font-size: 0.95rem; color: var(--ink); text-decoration: none; }
.topic li a:hover { color: var(--brand); }
.topic .more { margin-top: auto; }

.card__topic { display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive); text-decoration: none; margin-bottom: 10px; }
.card__topic:hover { text-decoration: underline; }
.card__title { font-size: 1.25rem; margin-bottom: 8px; }
.card__excerpt { color: var(--muted); font-size: 0.95rem; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 32px; padding: 0; }
.chips a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; font-size: 0.95rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.chips a:hover { border-color: var(--brand); color: var(--brand); }
.chips--small { margin-bottom: 0; }
.chips--small a { font-size: 0.86rem; padding: 5px 12px; font-weight: 500; }

.testaments { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; }
.booklist { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 24px; }
.testaments > div:last-child .booklist { columns: 2; }
.booklist li { break-inside: avoid; }
.booklist a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; font-size: 0.97rem; }
.booklist a:hover { color: var(--brand); text-decoration: underline; }

.signup { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-block: 8px 64px; }
.signup__text { flex: 1 1 280px; }
.signup__text h2 { margin-bottom: 6px; }
.signup__text p { color: var(--muted); margin: 0; }
.signup__form { flex: 1 1 320px; }

/* Newsletter plugin forms ------------------------------------------------ */

.tnp form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }
.tnp .tnp-field { flex: 1 1 150px; margin: 0; }
.tnp .tnp-field-button { flex: 0 0 auto; }
.tnp label { display: block; font-family: var(--sans); font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.tnp input[type="text"], .tnp input[type="email"] { width: 100%; font: inherit; font-family: var(--sans); font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
body .tnp input.tnp-submit { font: inherit; font-family: var(--sans); font-size: 1rem; font-weight: 600; color: #fff; background: var(--brand); border: 1px solid var(--brand); border-radius: 8px; padding: 10px 18px; cursor: pointer; }
body .tnp input.tnp-submit:hover { background: var(--brand-dark); }
.tnp-subscription-posts { font-family: var(--sans); background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 2.5em; }
.tnp-subscription-posts h3 { font-size: 1.25rem; margin-bottom: 4px; }
.tnp-subscription-posts p { font-size: 0.95rem; color: var(--muted); margin-bottom: 14px; }

/* Page heads, breadcrumbs ------------------------------------------------ */

.crumbs { max-width: var(--wrap); margin: 22px auto 0; padding-inline: 20px; font-size: 0.88rem; color: var(--muted); }
.hjn-verse .crumbs, .hjn-article .crumbs, .hjn-chapter .crumbs { max-width: var(--narrow); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "\203A"; margin-right: 8px; color: #b3a89c; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

.page-head { margin-block: 36px 28px; }
.crumbs + .wrap .page-head, .crumbs + article .page-head { margin-top: 18px; }
.page-head h1 { margin-bottom: 12px; }
.page-head__meta, .byline { color: var(--muted); font-size: 0.95rem; margin: 0; }
.callout { background: var(--tint); border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0; padding: 14px 18px; max-width: 70ch; }

/* Bible browser ---------------------------------------------------------- */

.book { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; text-decoration: none; }
.book:hover { border-color: var(--brand); }
.book__name { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.book__meta { display: block; font-size: 0.82rem; color: var(--muted); }

.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; }
.chapters a { display: block; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 0; font-weight: 600; color: var(--ink); text-decoration: none; }
.chapters a:hover { border-color: var(--brand); color: var(--brand); background: var(--tint); }

.verses { list-style: none; margin: 0; padding: 0; }
.verses a { display: flex; gap: 14px; padding: 11px 12px; margin-inline: -12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.verses a:hover { background: var(--tint); }
.verses__n { flex: 0 0 2.2ch; text-align: right; font-size: 0.85rem; font-weight: 700; color: var(--brand); padding-top: 0.38em; }
.verses__text { font-family: var(--serif); font-size: 1.16rem; line-height: 1.65; }

.scripture { margin: 22px 0 0; background: var(--tint); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 26px; }
.scripture p { font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.5rem); line-height: 1.5; margin: 0 0 10px; }
.scripture cite { font-style: normal; font-size: 0.9rem; font-weight: 600; color: var(--muted); }

.toc { margin-block: 26px 8px; }

/* Reading ---------------------------------------------------------------- */

.prose { font-family: var(--serif); font-size: 1.16rem; line-height: 1.75; overflow-wrap: break-word; }
.prose > :first-child, .prose > div:first-child > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.55rem; margin: 2.1em 0 0.6em; scroll-margin-top: 20px; }
.prose h3 { font-size: 1.25rem; margin: 1.8em 0 0.5em; }
.prose p { margin: 0 0 1.15em; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); color: #3a332d; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure { margin: 1.8em 0; }
.prose img { border-radius: 8px; display: block; margin-inline: auto; }
.prose .wp-block-image img { max-width: min(100%, 560px); }
.prose .hjn-reflection-note { font-family: var(--sans); font-size: 0.88rem; color: var(--muted); background: var(--tint); border-radius: 6px; padding: 8px 12px; }
.prose .jesus-message-section, .prose .prayer-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 24px 6px; margin: 2em 0; }
.prose .jesus-message-section h2, .prose .prayer-section h2 { margin-top: 1em; }
.prose .prayer-section p { font-style: italic; }

.related { margin-top: 52px; padding-top: 30px; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.4rem; margin-bottom: 18px; }

.linklist { list-style: none; margin: 0; padding: 0; columns: 2 320px; column-gap: 40px; }
.linklist--single { columns: auto; }
.linklist li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.linklist a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; }
.linklist a:hover { color: var(--brand); text-decoration: underline; }

.jump { margin-bottom: 8px; }
.jump .chips { margin-bottom: 16px; }
.topic-block { padding-block: 34px 10px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.topic-block h2 { margin-bottom: 4px; }
.topic-block__blurb { color: var(--muted); margin-bottom: 14px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 44px 64px; }
.pager--three { grid-template-columns: 1fr 1fr 1fr; }
.pager a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; font-weight: 600; color: var(--ink); text-decoration: none; }
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager span { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.pager__prev { grid-column: 1; }
.pager__up { grid-column: 2; text-align: center; }
.pager__next { grid-column: -2; text-align: right; }

/* Lists ------------------------------------------------------------------ */

.rows { border-top: 1px solid var(--line); }
.row { padding-block: 20px; border-bottom: 1px solid var(--line); }
.row__kind { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive); margin: 0 0 4px; }
.row__title { font-size: 1.3rem; margin: 0 0 6px; }
.row__title a { color: var(--ink); text-decoration: none; }
.row__title a:hover { color: var(--brand); text-decoration: underline; }
.row__excerpt { color: var(--muted); margin: 0; }

.pagination { margin-block: 32px 64px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: block; min-width: 42px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-weight: 600; color: var(--ink); text-decoration: none; }
.pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--brand); color: var(--brand); }

.page .prose, .article .prose, .verse .prose { margin-bottom: 8px; }
.page { padding-bottom: 64px; }
.site-main > .wrap:last-child { padding-bottom: 8px; }

/* Footer ----------------------------------------------------------------- */

.site-footer { background: var(--footer); color: #e7dbd1; margin-top: 48px; padding-block: 52px 26px; font-size: 0.95rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer__about p { max-width: 40ch; color: #cdbdb0; margin-top: 14px; }
.site-footer h2 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; color: #bfae9f; margin-bottom: 12px; }
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list a { display: inline-block; padding: 4px 0; color: #f4ebe3; text-decoration: none; }
.footer__list a:hover { text-decoration: underline; color: #fff; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.14); color: #b9a899; font-size: 0.85rem; }
.footer__bottom p { margin: 0; }

/* Small screens ---------------------------------------------------------- */

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(40, 20, 10, 0.08); padding: 8px 20px 20px; margin: 0; flex-direction: column; align-items: stretch; gap: 14px; }
	.site-nav.is-open { display: flex; }
	.nav__list { flex-direction: column; gap: 0; }
	.nav__list a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
	.search--header input { width: auto; padding: 10px 12px; font-size: 1rem; }
	.search--header button { padding: 10px 16px; font-size: 1rem; }
	.testaments { grid-template-columns: 1fr; gap: 28px; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.footer__about { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
	body { font-size: 16px; }
	.hero__inner { padding-block: 48px 52px; }
	.hero__lede { font-size: 1.08rem; }
	.search--hero button { padding-inline: 18px; }
	.section { padding-block: 40px; }
	.section__head { flex-wrap: wrap; }
	.grid--books { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
	.booklist, .testaments > div:last-child .booklist { columns: 2; }
	.prose { font-size: 1.1rem; line-height: 1.7; }
	.scripture { padding: 18px 20px; }
	.signup { padding: 22px; }
	.pager--three { grid-template-columns: 1fr 1fr; }
	.pager--three .pager__up { grid-column: 1 / -1; grid-row: 2; }
	.pager--three .pager__next { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
