/*
Theme Name: 366 Days with God
Theme URI: https://366days.net
Author: Mirza Asad Baig
Author URI: https://ace360solutions.com
Description: A calm, modern devotional theme for "366 Days with God" by Streeter Wiatt, Jr. The homepage automatically shows the devotion for today's date (February 29 appears only in leap years), with Purpose, About, The Book and Recommended Resources sections, an Articles blog and a Contact / E-book page with a built-in form.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 366days
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready, blog
*/

/* ------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------ */
:root {
	--navy: #163c4d;
	--navy-deep: #0e2a38;
	--navy-ink: #0a1f2a;
	--slate: #5e8a9c;
	--mist: #dce7ec;
	--mist-light: #eef3f5;
	--gold: #e3a94b;
	--gold-deep: #c8812f;
	--gold-soft: #f3c772;
	--cream: #fbf6ec;
	--sand: #f3ead8;
	--ink: #22303a;
	--muted: #5f6e78;
	--line: rgba(22, 60, 77, 0.12);
	--white: #ffffff;

	--font-display: "Roboto", "Helvetica Neue", Arial, sans-serif;
	--font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;

	--radius: 18px;
	--radius-sm: 10px;
	--shadow: 0 24px 60px -24px rgba(14, 42, 56, 0.45);
	--shadow-sm: 0 10px 30px -14px rgba(14, 42, 56, 0.35);
	--container: 1180px;
	--narrow: 760px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--ink);
	background: var(--cream);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--gold-deep); }
h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.15;
	color: var(--navy);
	margin: 0 0 .5em;
	letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.2em; }
em { font-style: italic; }
blockquote { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold-soft); color: var(--navy-ink); }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.container.narrow { max-width: var(--narrow); }
.center { text-align: center; }
.muted { color: var(--muted); }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); margin: -1px; word-wrap: normal !important;
}
.skip-link {
	position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 1000; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* Eyebrows, headings */
.eyebrow {
	display: inline-block;
	font-family: var(--font-body);
	font-size: .78rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--gold-deep);
	font-weight: 600;
	margin-bottom: .9rem;
}
.eyebrow--light { color: var(--gold-soft); }
.section-head { margin-bottom: 1.6rem; }
.section-head--center { text-align: center; margin-bottom: 2.4rem; }
.section-title { margin-bottom: .2em; }
.section-title--light { color: var(--cream); }
.section-title::after {
	content: ""; display: block; width: 56px; height: 3px; margin-top: .55em; border-radius: 3px;
	background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}
.section-head--center .section-title::after { margin-inline: auto; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	padding: .85rem 1.6rem;
	border-radius: 999px;
	font-family: var(--font-body);
	font-size: .95rem;
	font-weight: 600;
	letter-spacing: .02em;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
	background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
	color: var(--navy-ink);
	box-shadow: 0 12px 28px -12px rgba(200, 129, 47, .7);
}
.btn--primary:hover { color: var(--navy-ink); box-shadow: 0 16px 32px -12px rgba(200, 129, 47, .85); }
.btn--ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.45); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--sm { padding: .55rem 1.1rem; font-size: .85rem; }
.link-arrow {
	display: inline-flex; align-items: center; gap: .4rem;
	font-weight: 600; font-size: .95rem; color: var(--navy);
}
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ------------------------------------------------------------------
   3. Header
   ------------------------------------------------------------------ */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(251, 246, 236, .86);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
	transition: box-shadow .3s, padding .3s;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -20px rgba(14,42,56,.5); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .9rem 0; }
.brand { display: inline-flex; align-items: center; }
.brand__svg { width: 190px; height: auto; display: block; }
.brand img, .custom-logo { max-height: 56px; width: auto; }
.primary-nav { display: flex; align-items: center; gap: 1.6rem; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; align-items: center; }
.primary-nav .menu li { position: relative; }
.primary-nav .menu a {
	font-size: .95rem; font-weight: 500; color: var(--navy); padding: .3rem 0; position: relative;
}
.primary-nav .menu a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
	background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.primary-nav .menu a:hover::after,
.primary-nav .menu .current-menu-item > a::after { transform: scaleX(1); }
.primary-nav .sub-menu {
	list-style: none; margin: 0; padding: .5rem 0; position: absolute; top: 100%; left: 0; min-width: 200px;
	background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: all .2s var(--ease);
}
.primary-nav .menu li:hover > .sub-menu, .primary-nav .menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { display: block; padding: .5rem 1rem; }
.primary-nav .sub-menu a::after { display: none; }
.nav-toggle {
	display: none; background: none; border: 0; padding: .5rem; cursor: pointer; flex-direction: column; gap: 5px;
}
.nav-toggle__bar { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------------
   4. Hero + today's devotion
   ------------------------------------------------------------------ */
.hero {
	position: relative;
	color: var(--cream);
	isolation: isolate;
	padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 7rem);
	overflow: hidden;
}
.hero__media {
	position: absolute; inset: 0; z-index: -2;
	background: var(--hero-bg) center 28% / cover no-repeat, var(--navy-deep);
}
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(180deg, rgba(10, 31, 42, .55) 0%, rgba(10, 31, 42, .35) 40%, rgba(10, 31, 42, .82) 100%),
		radial-gradient(60% 50% at 20% 30%, rgba(227, 169, 75, .22), transparent 70%);
}
.hero__inner {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero__title {
	color: #fff; font-size: clamp(2.6rem, 5.5vw, 4.4rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: .4em;
	text-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.hero__title em { font-style: italic; font-weight: 300; color: var(--gold-soft); }
.hero__verse { font-size: 1.05rem; font-style: italic; color: rgba(251,246,236,.92); max-width: 36ch; margin-bottom: 1.8rem; }
.hero__verse-ref { display: block; font-style: normal; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); margin-top: .5rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.devotion-card {
	background: rgba(251, 246, 236, .97);
	color: var(--ink);
	border-radius: var(--radius);
	padding: clamp(1.6rem, 3vw, 2.6rem);
	box-shadow: var(--shadow);
	position: relative;
	border-top: 4px solid var(--gold);
	scroll-margin-top: 100px;
}
.devotion-card--inline { box-shadow: var(--shadow-sm); margin: 2rem 0; }
.devotion-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.devotion-card__eyebrow { font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--gold-deep); }
.devotion-card__date { font-size: .9rem; color: var(--muted); font-style: italic; }
.devotion-card__title { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: .6rem; }
.scripture {
	position: relative;
	padding: 1rem 1.2rem 1rem 1.5rem;
	margin: 0 0 1.2rem;
	background: var(--sand);
	border-left: 3px solid var(--gold);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	font-size: .98rem;
	line-height: 1.65;
}
.scripture p { margin: 0; }
.scripture em { color: var(--navy); }
.scripture--large { font-size: 1.1rem; padding: 1.4rem 1.6rem 1.4rem 1.9rem; margin-bottom: 2rem; }
.devotion-card__body { font-size: .98rem; }
.devotion-card__body p:last-child { margin-bottom: 0; }
.devotion-card__foot { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------
   5. Sections
   ------------------------------------------------------------------ */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.grid { display: grid; gap: clamp(2rem, 5vw, 5rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--center { align-items: center; }
.prose { font-size: 1rem; }
.prose p { margin-bottom: 1.1em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { border-left: 3px solid var(--gold); padding-left: 1.2rem; font-style: italic; color: var(--navy); margin: 1.5rem 0; }
.prose img { border-radius: var(--radius-sm); }
.entry-content > *:first-child { margin-top: 0; }

/* Purpose */
.section--purpose { background: var(--cream); }
.purpose__figure { position: relative; margin: 0; }
.purpose__figure img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow); }
.quote-card {
	position: absolute; left: -1.5rem; bottom: 2rem; max-width: 300px;
	background: var(--navy); color: var(--cream);
	padding: 1.2rem 1.4rem; border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	font-family: var(--font-display); font-size: 1.05rem; line-height: 1.5; font-style: italic; font-weight: 300;
}
.quote-card p { margin: 0; }

/* About */
.section--about { background: var(--white); position: relative; }
.section--about::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(50% 60% at 100% 0%, rgba(220, 231, 236, .7), transparent 70%);
}
.grid--reverse > :first-child { order: 0; }
.about__figure { margin: 0; position: relative; }
.about__figure img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow); }
.about__figure::after {
	content: ""; position: absolute; inset: 1.2rem -1.2rem -1.2rem 1.2rem; z-index: -1;
	border: 2px solid var(--gold); border-radius: var(--radius); opacity: .6;
}
.pull-quote {
	font-family: var(--font-display); font-size: 1.2rem; font-style: italic; line-height: 1.5; font-weight: 300;
	color: var(--navy); border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1.6rem;
}

/* Book */
.section--book {
	background:
		radial-gradient(60% 80% at 90% 10%, rgba(94, 138, 156, .35), transparent 60%),
		linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 60%, var(--navy-ink) 100%);
	color: var(--cream);
}
.book { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.book__cover img {
	max-width: 380px; margin-inline: auto; border-radius: 6px;
	box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08);
	transform: rotate(-2deg);
	transition: transform .5s var(--ease);
}
.book__cover:hover img { transform: rotate(0) translateY(-6px); }
.book__subtitle { font-family: var(--font-display); font-size: 1.15rem; font-style: italic; font-weight: 300; color: var(--gold-soft); margin-bottom: 1rem; }
.book__desc { color: rgba(251,246,236,.88); max-width: 56ch; }
.book__facts { list-style: none; padding: 0; margin: 1.6rem 0 2rem; display: flex; gap: 2rem; flex-wrap: wrap; }
.book__facts li { color: rgba(251,246,236,.8); font-size: .9rem; letter-spacing: .04em; }
.book__facts strong { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--gold-soft); line-height: 1; margin-bottom: .2rem; }
.section--book .section-title::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }

/* Resources */
.section--resources { background: var(--mist-light); }
.resources { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.resource {
	background: #fff; border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line);
	box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
	display: flex; flex-direction: column; gap: .5rem;
}
.resource:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.resource__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.resource p { margin: 0; color: var(--muted); font-size: .98rem; flex: 1; }
.resource__host { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }

/* Articles */
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; }
.card { flex: 1 1 300px; max-width: 370px; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--mist); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__media--plain { display: grid; place-items: center; background: linear-gradient(135deg, var(--navy) 0%, var(--slate) 100%); }
.card__media--plain span { font-family: var(--font-display); font-size: 3.5rem; font-weight: 300; color: var(--gold-soft); font-style: italic; }
.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__date { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }
.card__title { font-size: 1.25rem; margin: 0; }
.card__excerpt { color: var(--muted); font-size: .98rem; margin: 0 0 .4rem; flex: 1; }
.articles-note { margin-top: 1.8rem; font-style: italic; }
.section--articles .center .btn { margin-top: .5rem; }

/* Closing band */
.band {
	position: relative; isolation: isolate; color: var(--cream); text-align: center;
	padding: clamp(4rem, 9vw, 7rem) 0;
	background: var(--band-bg) center 35% / cover no-repeat, var(--navy-deep);
}
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,31,42,.72), rgba(10,31,42,.6)); }
.band__inner { max-width: 760px; }
.band__verse { font-family: var(--font-display); font-size: clamp(1.4rem, 2.8vw, 2.1rem); font-style: italic; font-weight: 300; line-height: 1.4; margin-bottom: .6rem; color: #fff; }
.band__ref { display: block; letter-spacing: .18em; text-transform: uppercase; font-size: .8rem; color: var(--gold-soft); margin-bottom: 2rem; }

/* ------------------------------------------------------------------
   6. Inner pages
   ------------------------------------------------------------------ */
.page-hero {
	background:
		radial-gradient(70% 90% at 100% 0%, rgba(94,138,156,.4), transparent 60%),
		linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
	color: var(--cream);
	padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.6rem, 5vw, 4rem);
}
.page-hero__title { color: #fff; margin-bottom: .3em; }
.page-hero__lead { max-width: 60ch; color: rgba(251,246,236,.85); font-size: 1.02rem; margin: 0; }
.page-hero--devotion .page-hero__title { font-size: clamp(2rem, 4.2vw, 3rem); }
.article__thumb { margin-top: -2rem; margin-bottom: 2rem; }
.article__thumb img { border-radius: var(--radius); box-shadow: var(--shadow); }
.devotion-single__body { font-size: 1.05rem; }

.post-nav {
	display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
	margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-weight: 600; font-size: .95rem;
}
.post-nav__all { color: var(--gold-deep); }
.post-nav__next { margin-left: auto; }

/* Devotion archive */
.month-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; position: sticky; top: 84px; z-index: 5; background: var(--cream); padding: .6rem 0; }
.month-nav a {
	padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; background: #fff;
}
.month-nav a:hover, .month-nav a.is-current { background: var(--navy); color: #fff; border-color: var(--navy); }
.month { margin-bottom: 3rem; scroll-margin-top: 150px; }
.month__title { font-size: 1.7rem; }
.month__title::after { content: ""; display: block; width: 40px; height: 3px; background: var(--gold); margin-top: .3em; border-radius: 3px; }
.month__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 2rem; }
.month__list a {
	display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: baseline; gap: .8rem;
	padding: .55rem .6rem; border-radius: var(--radius-sm); color: var(--ink); transition: background .2s;
}
.month__list a:hover { background: #fff; }
.month__list .is-today a { background: var(--sand); box-shadow: inset 0 0 0 1px var(--gold); }
.month__day { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--gold-deep); }
.month__name { font-weight: 500; }
.month__ref { font-size: .8rem; color: var(--muted); font-style: italic; white-space: nowrap; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact__book img { max-width: 300px; border-radius: 6px; box-shadow: var(--shadow); margin-bottom: 1.4rem; }
.contact__book-title { font-size: 1.5rem; margin-bottom: .1em; }
.contact__price { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--gold-deep); margin: .4rem 0 1rem; }
.contact__amazon { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.contact__form-title { font-size: 1.5rem; }
.sdg-form-wrap { scroll-margin-top: 110px; }
.sdg-form { background: #fff; border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.sdg-form__row { margin-bottom: 1.1rem; }
.sdg-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sdg-form label { display: block; font-size: .88rem; font-weight: 600; letter-spacing: .02em; margin-bottom: .35rem; color: var(--navy); }
.sdg-form label span { color: var(--gold-deep); }
.sdg-form input, .sdg-form select, .sdg-form textarea {
	width: 100%; padding: .8rem .95rem; border: 1.5px solid rgba(22,60,77,.2); border-radius: var(--radius-sm); background: var(--cream);
	transition: border-color .2s, box-shadow .2s;
}
.sdg-form input:focus, .sdg-form select:focus, .sdg-form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(227,169,75,.2); background: #fff; }
.sdg-form textarea { resize: vertical; }
.sdg-form .btn { margin-top: .4rem; }
.sdg-hp { position: absolute; left: -9999px; }
.sdg-alert { padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; }
.sdg-alert--ok { background: #e8f3ea; color: #1f5d33; border: 1px solid #bfdcc6; }
.sdg-alert--err { background: #fbe9e7; color: #8a2d22; border: 1px solid #f1c3bd; }
.sdg-alert strong { display: block; }

/* Pagination */
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .9rem; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--navy); color: #fff; }

/* ------------------------------------------------------------------
   7. Footer
   ------------------------------------------------------------------ */
.site-footer { background: var(--navy-ink); color: rgba(251,246,236,.8); padding: 4rem 0 2rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 3rem; align-items: start; }
.site-footer .brand__svg { width: 210px; }
.site-footer__tag { font-style: italic; font-size: .95rem; margin-top: 1rem; max-width: 34ch; }
.site-footer__verse .verse { font-family: var(--font-display); font-size: 1.15rem; font-style: italic; font-weight: 300; line-height: 1.5; color: #fff; margin-bottom: .4rem; }
.site-footer__verse .verse-ref { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.site-footer__nav .menu { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer__nav a { color: rgba(251,246,236,.85); font-size: .95rem; }
.site-footer__nav a:hover { color: var(--gold-soft); }
.site-footer__bottom { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }
.site-footer__bottom p { margin: 0; }
.site-footer__credit a { color: var(--gold-soft); }

/* ------------------------------------------------------------------
   8. Motion
   ------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.btn, .card, .resource { transition: none; }
}

/* ------------------------------------------------------------------
   9. WordPress core bits
   ------------------------------------------------------------------ */
.alignleft { float: left; margin: .5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .5rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.sticky { position: relative; }
.bypostauthor { display: block; }
.gallery-caption { font-size: .85rem; }
.wp-block-quote { border-left: 3px solid var(--gold); padding-left: 1.2rem; }

/* ------------------------------------------------------------------
   10. Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__intro { max-width: 640px; }
	.resources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 840px) {
	.nav-toggle { display: flex; }
	.primary-nav {
		position: fixed; inset: 0; top: 0; z-index: 40; flex-direction: column; justify-content: center; align-items: center; gap: 2rem;
		background: rgba(251,246,236,.98); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .3s var(--ease);
	}
	.primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.primary-nav .menu { flex-direction: column; gap: 1.2rem; text-align: center; }
	.primary-nav .menu a { font-size: 1.2rem; font-family: var(--font-display); font-weight: 500; }
	.primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; }
	.site-header { z-index: 60; }
	.nav-toggle { position: relative; z-index: 70; }
	.grid--2, .book, .contact { grid-template-columns: 1fr; }
	.grid--reverse > :first-child { order: 1; }
	.quote-card { position: static; max-width: none; margin-top: 1rem; }
	.about__figure::after { display: none; }
	.about__figure img, .purpose__figure img { aspect-ratio: 4 / 3; }
	.book__cover img { max-width: 260px; transform: none; }
	.month__list { grid-template-columns: 1fr; }
	.month-nav { top: 70px; }
}
@media (max-width: 600px) {
	body { font-size: 1rem; }
	.brand__svg { width: 150px; }
	.resources { grid-template-columns: 1fr; }
	.card { max-width: none; }
	.site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
	.sdg-form__grid { grid-template-columns: 1fr; }
	.devotion-card { padding: 1.4rem 1.2rem; }
	.hero__actions .btn { width: 100%; }
	.book__facts { gap: 1.4rem; }
	.month__list a { grid-template-columns: 2.2rem 1fr; }
	.month__ref { display: none; }
	.post-nav__next { margin-left: 0; }
}
