/*
Theme Name: Pulpit Template
Theme URI: https://internetoutreachexperts.com/templates/pulpit/
Author: Internet Outreach Experts
Description: IOE Pulpit template — Reformed / confessional Presbyterian. Deep navy + cream + brass. All-serif typography (Cardo + Source Serif 4). Sermon-library-as-hero. Built for PCA, OPC, Reformed Baptist, and theology-prioritizing congregations.
Version: 1.0.0
Text Domain: pulpit-template
*/

/*
 * THE PULPIT — Reformed / confessional church template
 * Aesthetic: Scholarly, sermon-first. Deep navy + cream + library serif. All serif, no sans.
 */

:root {
	--navy: #10243d;
	--navy-deep: #081528;
	--navy-soft: #1d3753;
	--ink: #13253a;
	--cream: #fbf7eb;
	--cream-light: #fefbf1;
	--cream-deep: #f0e9d3;
	--brass: #a78b4a;
	--brass-deep: #7e6730;
	--ink-text: #1e2e44;
	--ink-soft: #4a5568;
	--ink-muted: #7b8492;
	--rule: #d9cfb1;

	--font-display: 'Cardo', 'Adobe Garamond', 'Garamond', serif;
	--font-body:    'Source Serif 4', 'Source Serif Pro', 'Georgia', serif;

	--page-max: 1200px;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.7;
	color: var(--ink-text);
	background: var(--cream);
	background-image:
		radial-gradient(ellipse 1200px 800px at 0% 0%, rgba(16, 36, 61, 0.04), transparent 60%),
		radial-gradient(ellipse 800px 600px at 100% 100%, rgba(167, 139, 74, 0.05), transparent 60%);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; }
a:hover { color: var(--brass-deep); text-decoration-color: var(--brass-deep); }
::selection { background: var(--navy); color: var(--cream); }

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 400;
	line-height: 1.15;
	color: var(--navy);
	margin: 0 0 .5em;
}
h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 4.25rem); font-weight: 400; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); font-weight: 400; }
h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; letter-spacing: 0; }

h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; color: var(--brass-deep); }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .75em;
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1rem;
	letter-spacing: 0.02em;
	color: var(--brass-deep);
}
.eyebrow::before {
	content: '❧';
	color: var(--brass);
	font-size: 1.25em;
}

p { margin: 0 0 1em; max-width: 62ch; }
p.lead { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem); line-height: 1.55; color: var(--ink-soft); font-family: var(--font-display); font-style: italic; max-width: 38ch; font-weight: 400; }

.pull-scripture {
	font-family: var(--font-display);
	font-style: italic;
	font-size: clamp(1.2rem, 1rem + 0.8vw, 1.7rem);
	line-height: 1.4;
	color: var(--navy);
	padding: 1rem 0 1rem 2rem;
	border-left: 3px solid var(--brass);
	max-width: 36em;
}
.pull-scripture cite {
	display: block;
	margin-top: 1em;
	font-style: normal;
	font-size: 0.9rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--brass-deep);
	font-family: var(--font-body);
	font-weight: 600;
}

/* ========== LAYOUT ========== */
.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(3.5rem, 2.5rem + 4vw, 6rem) 0; }
.section-tight { padding: clamp(2.5rem, 2rem + 2vw, 4rem) 0; }

.divider {
	display: flex; justify-content: center; align-items: center;
	gap: 1rem; margin: 2.5rem auto;
	color: var(--brass);
}
.divider::before, .divider::after {
	content: '';
	flex: 0 0 clamp(3rem, 16vw, 6rem);
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--brass), transparent);
	opacity: 0.7;
}

/* ========== BUTTONS ========== */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	padding: .85em 1.6em;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1rem;
	background: var(--navy);
	color: var(--cream);
	border: 1.5px solid var(--navy);
	border-radius: 2px;
	text-decoration: none;
	transition: background .2s var(--ease), transform .15s var(--ease);
	cursor: pointer;
}
.btn:hover { background: var(--navy-deep); color: var(--cream); text-decoration: none; transform: translateY(-1px); }
.btn .caret { display: inline-block; transition: transform .2s var(--ease); }
.btn:hover .caret { transform: translateX(3px); }

.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--cream); }

.btn-brass { background: var(--brass); border-color: var(--brass); }
.btn-brass:hover { background: var(--brass-deep); border-color: var(--brass-deep); color: var(--cream); }

.btn-on-dark { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.btn-on-dark:hover { background: var(--cream-light); color: var(--navy); }

.btn-lg { padding: 1em 1.9em; font-size: 1.05rem; }

/* ========== HEADER ========== */
.masthead {
	background: var(--navy);
	color: var(--cream);
}
.masthead-inner {
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 1.5rem var(--gutter) 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}
.brand { display: inline-flex; align-items: center; gap: 1rem; color: var(--cream); text-decoration: none; }
.brand:hover { color: var(--cream); text-decoration: none; }
.brand-mark { width: 42px; height: 42px; flex-shrink: 0; color: var(--brass); }
.brand-text { line-height: 1; }
.brand-name {
	display: block;
	font-family: var(--font-display);
	font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem);
	color: var(--cream);
	letter-spacing: -0.01em;
}
.brand-name em { font-style: italic; color: var(--brass); font-weight: 400; }
.brand-tagline {
	display: block;
	margin-top: 4px;
	font-family: var(--font-display);
	font-style: italic;
	font-size: 0.82rem;
	color: rgba(251, 247, 235, 0.65);
	letter-spacing: 0.05em;
}

.primary-menu { display: flex; gap: 0; align-items: center; }
.primary-menu a {
	display: inline-block;
	padding: 0.5rem 0.95rem;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 1rem;
	color: rgba(251, 247, 235, 0.82);
	text-decoration: none;
	border-bottom: 1.5px solid transparent;
}
.primary-menu a:hover { color: var(--cream); border-bottom-color: var(--brass); }
.primary-menu a.current { color: var(--cream); border-bottom-color: var(--cream); }

.menu-toggle { display: none; color: var(--cream); border: 1px solid rgba(251, 247, 235, 0.3); padding: .5rem .9rem; }

@media (max-width: 880px) {
	.masthead-inner { flex-wrap: wrap; }
	.menu-toggle { display: inline-flex; }
	.primary-menu {
		order: 3; width: 100%;
		flex-direction: column;
		align-items: stretch;
		padding-top: 1rem;
		margin-top: 1rem;
		border-top: 1px solid rgba(251, 247, 235, 0.15);
		display: none;
	}
	.primary-menu.is-open { display: flex; }
	.primary-menu a { padding: .75rem 0; border-bottom: 1px solid rgba(251, 247, 235, 0.1); text-align: center; }
}

/* ========== HERO — SERMON LIBRARY AS HERO ========== */
.hero {
	padding: clamp(2.5rem, 2rem + 3vw, 4rem) 0 clamp(3rem, 2rem + 3vw, 5rem);
	background: var(--cream);
	border-bottom: 1px solid var(--rule);
}
.hero-inner { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

.hero-header {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-bottom: 2.5rem;
	align-items: end;
}
@media (min-width: 900px) { .hero-header { grid-template-columns: 1.3fr 1fr; gap: 3rem; } }
.hero-header h1 { margin: .5rem 0 0; }

.hero-search {
	display: flex;
	gap: 0;
	align-items: center;
	background: var(--cream-light);
	border: 1.5px solid var(--rule);
	border-radius: 2px;
	padding: .35rem;
	font-family: var(--font-body);
	max-width: 100%;
}
.hero-search input {
	flex: 1;
	padding: .75em 1em;
	background: transparent;
	border: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	color: var(--ink);
	outline: none;
	min-width: 0;
}
.hero-search input::placeholder { color: var(--ink-muted); font-style: italic; }
.hero-search button {
	padding: .75em 1.25em;
	background: var(--navy);
	color: var(--cream);
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 0.95rem;
	border-radius: 1px;
}
.hero-search button:hover { background: var(--navy-deep); }

.hero-filters {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin-bottom: 2.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--rule);
}
.filter-chip {
	display: inline-flex;
	align-items: center;
	padding: .4rem .9rem;
	font-family: var(--font-display);
	font-size: 0.9rem;
	color: var(--ink-soft);
	background: transparent;
	border: 1px solid var(--rule);
	border-radius: 100px;
	text-decoration: none;
	transition: all .15s var(--ease);
}
.filter-chip:hover { background: var(--cream-deep); border-color: var(--brass); color: var(--navy); text-decoration: none; }
.filter-chip.active { background: var(--navy); color: var(--cream); border-color: var(--navy); }

/* Sermon list */
.sermon-list {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--rule);
}
.sermon-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--rule);
	align-items: baseline;
	transition: background .2s var(--ease);
}
@media (min-width: 720px) {
	.sermon-row { grid-template-columns: 140px 1fr auto; gap: 2rem; align-items: baseline; padding: 1.75rem .5rem; }
	.sermon-row:hover { background: var(--cream-light); margin: 0 -.5rem; }
}
.sermon-date {
	font-family: var(--font-display);
	font-style: italic;
	color: var(--brass-deep);
	font-size: 0.95rem;
	letter-spacing: 0.02em;
}
.sermon-body h3 {
	font-size: 1.35rem;
	margin: 0 0 .35rem;
	font-weight: 500;
	font-family: var(--font-display);
	color: var(--navy);
}
.sermon-body h3 a { color: inherit; text-decoration: none; }
.sermon-body h3 a:hover { color: var(--brass-deep); text-decoration: underline; text-decoration-color: var(--brass); }
.sermon-body .scripture {
	font-family: var(--font-display);
	font-style: italic;
	font-size: 0.95rem;
	color: var(--ink-muted);
	margin-bottom: .3rem;
}
.sermon-body .preacher {
	font-family: var(--font-body);
	font-size: 0.82rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-muted);
	font-weight: 600;
}
.sermon-play {
	padding: .5rem 1rem;
	border: 1px solid var(--rule);
	color: var(--navy);
	background: var(--cream);
	font-family: var(--font-display);
	font-size: 0.92rem;
	text-decoration: none;
	border-radius: 2px;
	display: inline-flex;
	align-items: center;
	gap: .4rem;
}
.sermon-play:hover { background: var(--navy); color: var(--cream); border-color: var(--navy); text-decoration: none; }

/* ========== PAGE BANNER (inner pages) ========== */
.page-banner {
	padding: clamp(3rem, 2rem + 3vw, 5rem) 0 clamp(2rem, 1.5rem + 2vw, 3rem);
	background: var(--cream);
	border-bottom: 1px solid var(--rule);
	text-align: center;
}
.page-banner .eyebrow { margin-bottom: .5rem; }
.page-banner h1 { margin-bottom: 1rem; }
.page-banner h1 em { color: var(--brass-deep); font-style: italic; }
.page-banner .lead { margin: 0 auto; text-align: center; }

/* ========== CARDS ========== */
.card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}
@media (min-width: 720px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
	background: var(--cream-light);
	border: 1px solid var(--rule);
	border-radius: 3px;
	padding: 2rem 1.75rem;
	display: flex;
	flex-direction: column;
	gap: .75rem;
	position: relative;
	transition: border-color .3s var(--ease);
}
.card:hover { border-color: var(--brass); }
.card-chapter {
	font-family: var(--font-display);
	font-style: italic;
	color: var(--brass-deep);
	font-size: 0.9rem;
}
.card h3 { font-size: 1.3rem; margin: 0; }
.card h3 em { color: var(--brass-deep); font-style: italic; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; }
.card-link {
	margin-top: auto;
	font-family: var(--font-display);
	font-size: 0.9rem;
	color: var(--brass-deep);
	padding-top: .5rem;
	text-decoration: none;
}
.card-link::after { content: ' →'; }
.card-link:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--brass); }

/* ========== CONFESSION EDITORIAL ========== */
.confession-section {
	background: var(--navy);
	color: var(--cream);
	padding: clamp(3.5rem, 2.5rem + 4vw, 6rem) 0;
	position: relative;
	overflow: hidden;
}
.confession-section::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(800px 500px at 100% 0%, rgba(167, 139, 74, 0.12), transparent 60%),
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.98  0 0 0 0 0.96  0 0 0 0 0.91  0 0 0 0.04 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}
.confession-section > * { position: relative; z-index: 1; }
.confession-section h2 { color: var(--cream); }
.confession-section h2 em { color: var(--brass); }
.confession-section .eyebrow { color: var(--brass); }
.confession-section .eyebrow::before { color: var(--brass); }

.confession-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
}
@media (min-width: 820px) { .confession-grid { grid-template-columns: 4fr 5fr; gap: 4rem; } }
.confession-quote {
	font-family: var(--font-display);
	font-style: italic;
	font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.8rem);
	line-height: 1.5;
	color: var(--cream);
	max-width: 24em;
	font-weight: 400;
}
.confession-quote cite {
	display: block;
	font-style: normal;
	margin-top: 1.5rem;
	font-size: 0.85rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--brass);
	font-family: var(--font-body);
	font-weight: 600;
}
.confession-body p {
	color: rgba(251, 247, 235, 0.85);
	font-size: 1.05rem;
	line-height: 1.75;
}
.confession-body p + p { margin-top: 1em; }

/* ========== WORSHIP TIMES ========== */
.worship-times {
	background: var(--cream-deep);
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
	padding: clamp(2.5rem, 2rem + 3vw, 4rem) 0;
}
.times-list {
	max-width: 760px;
	margin: 0 auto;
	border-top: 1px solid var(--rule);
}
.times-list li {
	display: grid;
	grid-template-columns: 1fr 2fr 1fr;
	gap: 1.5rem;
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--rule);
	align-items: baseline;
}
.times-list .t {
	font-family: var(--font-display);
	font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem);
	color: var(--navy);
	font-weight: 500;
}
.times-list .srv { font-family: var(--font-display); font-style: italic; color: var(--ink-soft); }
.times-list .note { text-align: right; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; }

/* ========== FOOTER ========== */
.site-footer {
	background: var(--navy-deep);
	color: rgba(251, 247, 235, 0.78);
	padding: clamp(3rem, 2rem + 3vw, 4.5rem) 0 1.5rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer-brand .brand { color: var(--cream); }
.footer-brand .brand-name { color: var(--cream); }
.footer-brand .brand-name em { color: var(--brass); }
.footer-brand .brand-tagline { color: rgba(251, 247, 235, 0.55); }
.footer-brand p { color: rgba(251, 247, 235, 0.7); max-width: 28em; font-size: 0.95rem; margin-top: 1rem; font-style: italic; }

.footer-col h5 {
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--brass);
	margin: 0 0 1rem;
	font-size: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .45rem; }
.footer-col a { color: rgba(251, 247, 235, 0.75); font-size: 0.98rem; text-decoration: none; }
.footer-col a:hover { color: var(--cream); text-decoration: underline; text-decoration-color: var(--brass); }
.footer-col p { margin: 0 0 .35em; color: rgba(251, 247, 235, 0.7); font-size: 0.95rem; }

.footer-bottom {
	margin-top: 3rem;
	padding: 1.5rem var(--gutter) 0;
	max-width: var(--page-max);
	margin-left: auto; margin-right: auto;
	border-top: 1px solid rgba(251, 247, 235, 0.15);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	font-family: var(--font-display);
	font-style: italic;
	font-size: 0.88rem;
	color: rgba(251, 247, 235, 0.55);
}

/* ========== PROSE ========== */
.prose { max-width: 680px; margin: 0 auto; padding: clamp(2.5rem, 1.5rem + 3vw, 4rem) var(--gutter); font-size: 1.05rem; line-height: 1.8; color: var(--ink-text); }
.prose p { margin: 0 0 1.3em; max-width: 100%; }
.prose h2 { margin: 2.25em 0 .5em; }
.prose h3 { margin: 1.75em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 1em 0 1.5em; }
.prose ul li::marker { color: var(--brass-deep); }
.prose ul li { margin-bottom: .4em; }

/* ========== PHOTO COMPONENTS ========== */

/* Full-width photo band — capped height with centered crop.
   At 1280 viewport: ~410px tall. At 1920 viewport: 540px (caps the 808px native of 21:9).
   Centered subjects + center-crop preserves focal area. */
.photo-band {
	width: 100%;
	display: block;
	margin: 0;
	background: var(--cream-deep);
	overflow: hidden;
}
.photo-band img {
	width: 100%;
	height: auto;
	display: block;
	max-height: clamp(280px, 32vw, 540px);
	object-fit: cover;
	object-position: center;
}

/* Inset photo inside body content — thin brass border to match Pulpit aesthetic */
.photo-inset {
	margin: 2.5rem auto;
	border: 1px solid var(--brass);
	overflow: hidden;
	max-width: 880px;
}
.photo-inset img {
	width: 100%;
	height: auto;
	display: block;
}

/* Pulpit photo above the catechism quote in the confession-grid */
.confession-photo {
	margin: 0 0 2rem;
	border: 1px solid var(--brass);
	overflow: hidden;
	max-width: 100%;
}
.confession-photo img {
	width: 100%;
	height: auto;
	display: block;
}

/* Pastor portrait — circle with photo */
.pastor-photo {
	width: 200px;
	height: 200px;
	border-radius: 50%;
	overflow: hidden;
	border: 1px solid var(--brass);
	margin: 0 auto;
}
.pastor-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 28%;
	display: block;
}
