/* ==========================================================================
   Graymont 2.0 — narrative editorial styles for Nehemiah Blueprint 205
   Expressive serif (Instrument Serif), generous space, subject colors as
   quiet accents, gentle motion. Colors come from theme.json presets.
   ========================================================================== */

:root {
	--gm-ink: var(--wp--preset--color--ink, #191816);
	--gm-paper: var(--wp--preset--color--paper, #fbfaf7);
	--gm-white: var(--wp--preset--color--white, #fff);
	--gm-stone: var(--wp--preset--color--stone, #f1efe9);
	--gm-muted: var(--wp--preset--color--muted, #6f6a62);
	--gm-civic: var(--wp--preset--color--civic, #b5452a);
	--gm-humans: var(--wp--preset--color--humans, #b07d0e);
	--gm-growing: var(--wp--preset--color--growing, #3f7a55);
	--gm-whatif: var(--wp--preset--color--whatif, #5a4fc4);
	--gm-dyk: var(--wp--preset--color--dyk, #2f7a80);
	--gm-line: #e6e2da;
	--gm-radius: 14px;
	--gm-serif: var(--wp--preset--font-family--display);
	--gm-sans: var(--wp--preset--font-family--body);
	--cat: var(--gm-ink);
	--tint: var(--gm-stone);
}

/* ---- Subject color mapping: --cat is the accent, --tint the soft background ---- */
.category-civic-stewardship, .gm-cat-civic-stewardship { --cat: var(--gm-civic); --tint: #f7e9e3; }
.category-good-humans, .gm-cat-good-humans { --cat: var(--gm-humans); --tint: #f8efd9; }
.category-always-growing, .gm-cat-always-growing { --cat: var(--gm-growing); --tint: #eaf2ec; }
.category-what-if, .gm-cat-what-if { --cat: var(--gm-whatif); --tint: #ecebfa; }
.category-did-you-know, .gm-cat-did-you-know { --cat: var(--gm-dyk); --tint: #e6f1f1; }

/* ---- Base ---- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.wp-site-blocks > * { margin-block-start: 0; }
:where(a, button, input, textarea, summary):focus-visible { outline: 2px solid var(--gm-civic); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { text-wrap: balance; }
h1 em, h2 em, h3 em { font-style: italic; }
img { height: auto; }

.gm-kicker {
	font-family: var(--gm-sans);
	font-weight: 500;
	font-size: 0.82rem;
	color: var(--gm-muted);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.gm-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cat); flex: none; }

/* Gentle entrance for big headlines. The text is readable from the first frame. */
@keyframes gm-rise { from { transform: translateY(0.18em); opacity: 0.35; } to { transform: none; opacity: 1; } }
.gm-hero-title, .gm-post-title, .gm-band-title { animation: gm-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@media (prefers-reduced-motion: reduce) {
	.gm-hero-title, .gm-post-title, .gm-band-title { animation: none; }
	.gm-card, .gm-pillar { transition: none !important; }
}

/* ---- Header ---- */
.gm-header {
	background: var(--gm-paper);
	border-bottom: 1px solid var(--gm-line);
	padding: 1.1rem var(--wp--preset--spacing--40);
	row-gap: 0.75rem;
}
.gm-logo { margin: 0; font-family: var(--gm-serif); font-size: clamp(1.35rem, 2.4vw, 1.7rem); line-height: 1; }
.gm-logo a { text-decoration: none; }
.gm-logo em { color: var(--gm-civic); }
.gm-header-right { gap: 1.5rem; }
.gm-nav .wp-block-navigation-item__content { padding: 0.3rem 0; color: var(--gm-muted); display: inline-flex; align-items: center; gap: 0.45rem; }
.gm-nav .wp-block-navigation-item__content:hover { color: var(--gm-ink); }
.gm-nav :is(.gm-nav-civic, .gm-nav-humans, .gm-nav-growing, .gm-nav-whatif) .wp-block-navigation-item__content::before {
	content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gm-ink); flex: none;
}
.gm-nav .gm-nav-civic .wp-block-navigation-item__content::before { background: var(--gm-civic); }
.gm-nav .gm-nav-humans .wp-block-navigation-item__content::before { background: var(--gm-humans); }
.gm-nav .gm-nav-growing .wp-block-navigation-item__content::before { background: var(--gm-growing); }
.gm-nav .gm-nav-whatif .wp-block-navigation-item__content::before { background: var(--gm-whatif); }
.gm-header-cta .wp-block-button__link { padding: 0.5em 1.1em; font-size: 0.88rem; }

/* ---- Buttons ---- */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--gm-ink); border: 1px solid var(--gm-ink); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--gm-ink); color: var(--gm-white); }
.wp-block-button.gm-on-dark > .wp-block-button__link { color: var(--gm-ink); border-color: var(--gm-ink); }

/* ---- Title bands (archives, post header, page title) ---- */
.gm-archive-band, .gm-post-hero, .gm-page-band {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--40);
}
.gm-archive-band { border-bottom: 1px solid var(--gm-line); }
.gm-band-title { font-size: var(--wp--preset--font-size--xx-large); margin-top: 0.6rem; }
.category-civic-stewardship .gm-band-title, .category-good-humans .gm-band-title,
.category-always-growing .gm-band-title, .category-what-if .gm-band-title,
.category-did-you-know .gm-band-title { color: var(--cat); }
.gm-band-desc { max-width: 42rem; font-size: 1.15rem; color: #3d3a35; }
.gm-post-hero > * { max-width: 980px; }
.gm-post-title { font-size: var(--wp--preset--font-size--huge); line-height: 0.95; letter-spacing: -0.025em; margin-top: 1rem; }
.gm-byline { gap: 0.3rem 1rem; font-size: 0.9rem; color: var(--gm-muted); }
.gm-byline .wp-block-post-date, .gm-byline .wp-block-post-author-name { color: inherit; font-size: inherit; }
.gm-byline a { color: inherit; text-decoration: none; }
.gm-byline > * { margin: 0; }
.gm-byline > * + *::before { content: "·"; margin-right: 1rem; margin-left: -0.5rem; }

/* ---- Subject labels (dot + name) ---- */
.gm-pills { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0 !important; }
.gm-pills .wp-block-post-terms__separator { display: none; }
.gm-pills a {
	--dot: var(--gm-ink);
	display: inline-flex; align-items: center; gap: 0.45rem;
	font-family: var(--gm-sans); font-size: 0.8rem; font-weight: 500;
	color: var(--gm-muted); text-decoration: none;
}
.gm-pills a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); flex: none; }
.gm-pills a:hover { color: var(--gm-ink); }
.gm-pills a[href*="civic-stewardship"] { --dot: var(--gm-civic); }
.gm-pills a[href*="good-humans"] { --dot: var(--gm-humans); }
.gm-pills a[href*="always-growing"] { --dot: var(--gm-growing); }
.gm-pills a[href*="what-if"] { --dot: var(--gm-whatif); }
.gm-pills a[href*="did-you-know"] { --dot: var(--gm-dyk); }
.gm-pills-lg a { font-size: 0.9rem; }

/* ---- Cards ---- */
.gm-grid { gap: 2.25rem 2rem !important; }
.gm-grid > .wp-block-post { display: flex; }
.gm-card { border-top: 1px solid var(--gm-line); padding-top: 1.1rem; gap: 0.55rem !important; width: 100%; }
.gm-card > * { margin: 0 !important; }
.gm-card .gm-card-img { order: -1; margin-bottom: 0.35rem !important; }
.gm-card .gm-card-img img { border-radius: var(--gm-radius); transition: transform 0.4s ease; }
.gm-card:hover .gm-card-img img { transform: scale(1.015); }
.gm-card-title { font-size: 1.7rem; line-height: 1.05; order: 1; }
.gm-card-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--cat); }
.gm-card-excerpt { color: #4a463f; font-size: 0.97rem; order: 2; }
.gm-card-excerpt p { margin: 0; }
.gm-card .gm-pills { order: 3; }
.gm-card-date { order: 4; margin-top: auto !important; font-size: 0.8rem; color: var(--gm-muted); }
.gm-feature { border-top: 0; padding-top: 0; }
.gm-feature .gm-card-title { font-size: clamp(2rem, 3.2vw, 2.75rem); }
.gm-feature-label { order: 0; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gm-muted); }

@media (max-width: 1000px) {
	.gm-grid.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px) {
	.gm-grid.is-layout-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* ---- Front page ---- */
.gm-hero { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--60); }
.gm-hero-cols { gap: var(--wp--preset--spacing--60) !important; }
.gm-hero-title { font-size: var(--wp--preset--font-size--huge); line-height: 0.92; letter-spacing: -0.03em; margin: 1rem 0 1.5rem; }
.gm-hero-title em, .gm-mark { color: var(--gm-civic); }
.gm-hero-lede { font-size: 1.2rem; max-width: 34rem; color: #3d3a35; }

.gm-season { padding-top: var(--wp--preset--spacing--40); padding-bottom: var(--wp--preset--spacing--40); }
.gm-season > .wp-block-columns { border-top: 1px solid var(--gm-line); border-bottom: 1px solid var(--gm-line); padding-block: var(--wp--preset--spacing--40); }
.gm-season .gm-kicker::before { background: var(--gm-civic); }
.gm-season-title { font-style: italic; font-size: var(--wp--preset--font-size--x-large); margin: 0.4rem 0 0.75rem; }
.gm-season p { max-width: 44rem; color: #3d3a35; }

.gm-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--30); }
.gm-section-head { margin-bottom: 1.75rem; }
.gm-section-title { font-size: var(--wp--preset--font-size--xx-large); margin: 0; }
.gm-section-link a { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

.gm-pillars { gap: 1.25rem !important; margin-top: 1.75rem; }
.gm-pillar {
	background: var(--tint);
	border-radius: 18px;
	padding: 1.6rem 1.5rem;
	min-height: 15rem;
	gap: 0.7rem !important;
	transition: transform 0.25s ease;
}
.gm-pillar:hover { transform: translateY(-3px); }
.gm-pillar > * { margin: 0 !important; }
.gm-pillar a { text-decoration: none; }
.gm-pillar-title { font-size: clamp(1.9rem, 2.6vw, 2.4rem); line-height: 1; }
.gm-pillar-title a { color: var(--cat); }
.gm-pillar-blurb { font-size: 1rem; color: #3d3a35; }
.gm-pillar-more { margin-top: auto !important; font-weight: 600; font-size: 0.92rem; }
.gm-pillar-more a { color: var(--gm-ink); border-bottom: 1px solid currentColor; padding-bottom: 2px; }

.gm-dyk-strip { background: #e6f1f1; padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); margin-top: var(--wp--preset--spacing--60); }
.gm-dyk-strip:not(:has(.wp-block-post)) { display: none; }
.gm-dyk-strip a { color: inherit; }
.gm-dyk-label { font-family: var(--gm-serif); font-style: italic; font-size: clamp(2.2rem, 4vw, 3.25rem); line-height: 0.95; color: var(--gm-dyk); margin: 0; }
.gm-dyk-title { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 0.5rem; }
.gm-dyk-title a { text-decoration: none; }

.gm-cta { background: var(--gm-stone); border-radius: 22px; padding: var(--wp--preset--spacing--50); margin-bottom: var(--wp--preset--spacing--50); }
.gm-cta-title { font-size: var(--wp--preset--font-size--xx-large); margin-top: 0; }
.gm-cta p { font-size: 1.15rem; color: #3d3a35; }

.gm-chips { gap: 0.6rem; margin-bottom: 2rem; }
.gm-chip { margin: 0; }
.gm-chip a { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--tint); color: var(--gm-ink); text-decoration: none; font-weight: 500; font-size: 0.92rem; padding: 0.5rem 1rem; border-radius: 999px; }
.gm-chip a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cat); }
.gm-chip a:hover { background: var(--cat); color: var(--gm-white); }
.gm-chip a:hover::before { background: var(--gm-white); }

/* ---- Single post ---- */
.gm-post-image img { border-radius: var(--gm-radius); }
.gm-post-content { font-size: 1.14rem; line-height: 1.75; }
.gm-post-content > p:first-of-type { font-family: var(--gm-serif); font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -0.01em; }
.gm-post-content h2 { margin-top: 2.75rem; }
.gm-post-content h3 { margin-top: 2rem; }
.gm-post-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--gm-civic); }
.gm-post-content table, .gm-page-content table { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.gm-post-content th, .gm-page-content th { text-align: left; }
.gm-post-tags { margin-top: 2.5rem; font-size: 0.9rem; color: var(--gm-muted); }

.gm-author { border-top: 1px solid var(--gm-line); border-bottom: 1px solid var(--gm-line); padding: 1.5rem 0; margin-top: 2.5rem; gap: 1.25rem; }
.gm-author .wp-block-avatar img { border-radius: 50%; }
.gm-author-name { font-family: var(--gm-serif); font-size: 1.5rem; line-height: 1; margin: 0; }
.gm-author-bio { margin: 0.35rem 0 0; color: #4a463f; font-size: 0.97rem; }

.gm-pushback { background: #f8efd9; border-radius: var(--gm-radius); padding: 1.5rem 1.75rem; margin-top: 2rem; }
.gm-pushback-title { font-family: var(--gm-serif); font-style: italic; font-size: 2rem; line-height: 1; margin: 0 0 0.5rem; }

.gm-comments { margin-top: 3rem; }
.gm-comment { border-left: 2px solid var(--gm-line); padding-left: 1rem; margin-bottom: 1.5rem; }
.gm-comments .wp-block-post-comments-form input:not([type="submit"]),
.gm-comments .wp-block-post-comments-form textarea { border: 1px solid #cfcac0; border-radius: 10px; background: var(--gm-white); padding: 0.7rem; }

.gm-post-nav { margin-top: 3rem; margin-bottom: 3rem; border-top: 1px solid var(--gm-line); padding-top: 1.25rem; font-family: var(--gm-serif); font-size: 1.3rem; }
.gm-post-nav a { text-decoration: none; }

.gm-page-content { padding-bottom: var(--wp--preset--spacing--60); }

/* ---- Search & pagination ---- */
.gm-search .wp-block-search__input { border: 1px solid #cfcac0; border-radius: 999px; padding: 0.7rem 1.1rem; background: var(--gm-white); }
.gm-search .wp-block-search__button { margin-left: 0.5rem; }
.gm-archive-band .gm-search { max-width: 36rem; margin-top: 1.5rem; }
.gm-pagination { margin-top: 3rem; margin-bottom: 3rem; font-weight: 600; }
.gm-pagination a { text-decoration: none; }
.gm-pagination .current { background: var(--gm-ink); color: var(--gm-white); padding: 0.15rem 0.6rem; border-radius: 999px; }

/* ---- Callout block styles (also produced by the [fact], [opinion], [cdlens], [dyk] shortcodes) ---- */
.is-style-gm-fact, .is-style-gm-opinion, .is-style-gm-cd-lens, .is-style-gm-dyk {
	padding: 1.1rem 1.35rem;
	border-radius: var(--gm-radius);
	margin-top: 2rem;
	margin-bottom: 2rem;
	font-size: 1.02rem;
}
.is-style-gm-fact::before, .is-style-gm-opinion::before, .is-style-gm-cd-lens::before, .is-style-gm-dyk::before {
	display: block;
	font-family: var(--gm-sans);
	font-weight: 600;
	font-size: 0.72rem;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	margin-bottom: 0.45rem;
}
.is-style-gm-fact { background: var(--gm-stone); }
.is-style-gm-fact::before { content: "Fact"; color: var(--gm-ink); }
.is-style-gm-opinion { background: #f7e9e3; }
.is-style-gm-opinion::before { content: "Arthur’s take"; color: var(--gm-civic); }
.is-style-gm-cd-lens { background: #eaf2ec; }
.is-style-gm-cd-lens::before { content: "Community development lens"; color: var(--gm-growing); }
.is-style-gm-dyk { background: #e6f1f1; }
.is-style-gm-dyk::before { content: "Did you know?"; color: var(--gm-dyk); }
.is-style-gm-fact > :first-child, .is-style-gm-opinion > :first-child, .is-style-gm-cd-lens > :first-child, .is-style-gm-dyk > :first-child { margin-top: 0; }
.is-style-gm-fact > :last-child, .is-style-gm-opinion > :last-child, .is-style-gm-cd-lens > :last-child, .is-style-gm-dyk > :last-child { margin-bottom: 0; }
.is-style-gm-poster { background: var(--gm-stone); border-radius: 22px; }

.wp-block-quote.is-style-gm-shout { border: 0; padding: 0; margin: 2.5rem 0; }
.wp-block-quote.is-style-gm-shout p { font-family: var(--gm-serif); font-style: italic; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.08; letter-spacing: -0.015em; }

.wp-block-separator.is-style-gm-stripe {
	border: 0; height: 7px; width: 55px; max-width: none; opacity: 1; margin-inline: auto;
	background:
		radial-gradient(circle, var(--gm-civic) 3.5px, transparent 4px) 0 0 / 14px 7px no-repeat,
		radial-gradient(circle, var(--gm-humans) 3.5px, transparent 4px) 14px 0 / 14px 7px no-repeat,
		radial-gradient(circle, var(--gm-growing) 3.5px, transparent 4px) 28px 0 / 14px 7px no-repeat,
		radial-gradient(circle, var(--gm-whatif) 3.5px, transparent 4px) 42px 0 / 14px 7px no-repeat;
}

/* Editor-only planning notes: visible while drafting, never on the public site. */
.gm-editor-note { display: none; }
.editor-styles-wrapper .gm-editor-note { display: block; background: #fff7d6; border: 2px dashed #d8b24a; border-radius: 10px; padding: 1rem 1.25rem; font-size: 0.95rem; }
.editor-styles-wrapper .gm-editor-note::before { content: "Editor note · hidden on the live site"; display: block; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.4rem; }

/* ---- Footer ---- */
.gm-footer { border-top: 1px solid var(--gm-line); padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--40); margin-top: var(--wp--preset--spacing--50); }
.gm-footer a { text-decoration: none; }
.gm-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gm-footer .gm-logo { font-size: 2.2rem; }
.gm-footer-lede { max-width: 26rem; color: #4a463f; }
.gm-footer-head { font-family: var(--gm-sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gm-muted); }
.gm-footer-list { list-style: none; padding: 0; line-height: 2; }
.gm-footer-fine { border-top: 1px solid var(--gm-line); padding-top: 1.25rem; margin-top: 2rem; font-size: 0.85rem; color: var(--gm-muted); }
