/*
Theme Name: Sharing His Goodness
Theme URI: https://forsharinghisgoodness.com
Description: A quiet, warm reading theme for Ebin's reflections at Sharing His Goodness. Built as a child of Blocksy.
Author: Donny Kurien
Template: blocksy
Version: 1.0.9
Text Domain: shg
*/

/* Bump `Version:` above whenever this file changes — assets are enqueued with it, which busts caches. */

/* ===== Design tokens (palette taken from the logo — swap here to rebrand) ===== */
:root {
	--shg-bg:        #fefdfa;   /* matches the logo's own background so the artwork blends */
	--shg-cream:     #f8f3e6;
	--shg-paper:     #ffffff;
	--shg-green:     #2f4a2c;   /* "SHARING HIS" */
	--shg-green-deep:#223822;
	--shg-leaf:      #5b7a45;
	--shg-gold:      #b87a1d;   /* "GOODNESS" — decorative / large text only */
	--shg-gold-ink:  #8a5a12;   /* gold that passes contrast for small text */
	--shg-gold-soft: #ead3a0;
	--shg-ink:       #232a1f;
	--shg-body:      #444a3d;
	--shg-muted:     #6c7163;
	--shg-line:      #e8e0cd;
	--shg-maxw:      1140px;
	--shg-read:      44rem;
	--shg-radius:    14px;
	--shg-brand:     "Cinzel", "Trajan Pro", Georgia, serif;   /* site name only — echoes the logo */
	--shg-display:   "Source Serif 4", Georgia, "Times New Roman", serif;
	--shg-head:      "Source Serif 4", Georgia, "Times New Roman", serif;
	--shg-text:      "Source Serif 4", Georgia, "Times New Roman", serif;

	/* Nudge Blocksy's own palette so its header/footer/links agree with ours. */
	--theme-palette-color-1: #b87a1d;
	--theme-palette-color-2: #2f4a2c;
	--theme-link-initial-color: #8a5a12;
	--theme-link-hover-color:   #2f4a2c;
}

/* ===== Base ===== */
body.shg { background: var(--shg-bg); color: var(--shg-body); font-family: var(--shg-text); }
body.shg h1, body.shg h2, body.shg h3, body.shg h4 { font-family: var(--shg-head); color: var(--shg-ink); font-weight: 600; letter-spacing: -.005em; }
.shg-wrap { max-width: var(--shg-maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.shg a:focus-visible, .shg button:focus-visible { outline: 3px solid var(--shg-gold); outline-offset: 3px; border-radius: 4px; }

/* ===== Header (Blocksy) — warm, quiet, the wordmark set in the logo's capitals ===== */
body.shg .ct-header [data-row] { background-color: var(--shg-bg); --background-color: var(--shg-bg); border-bottom: 1px solid var(--shg-line); }
body.shg .site-title, body.shg .site-title a { font-family: var(--shg-brand); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--shg-green); }
body.shg .site-description { font-family: var(--shg-head); color: var(--shg-muted); }
body.shg .ct-header .menu > li > a { font-family: var(--shg-display); font-size: .84rem; letter-spacing: .06em; text-transform: uppercase; color: var(--shg-green); }
body.shg .ct-header .menu > li > a:hover { color: var(--shg-gold-ink); }

/* ===== Footer ===== */
body.shg .ct-footer [data-row] { background-color: var(--shg-cream); --background-color: var(--shg-cream); border-top: 1px solid var(--shg-line); }
body.shg .ct-footer-copyright { font-family: var(--shg-text); font-size: .92rem; color: var(--shg-muted); text-align: center; }
body.shg .ct-footer-copyright a { color: var(--shg-gold-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.shg .ct-footer-copyright a:hover { color: var(--shg-green); }

/* ===== Header logo — horizontal lockup replaces the text title (text stays for screen readers/SEO) ===== */
body.shg .site-branding .site-title a { display: block; width: 293px; height: 76px; background: url("assets/img/logo-horizontal-header.jpg") left center / contain no-repeat; font-size: 0; line-height: 0; color: transparent; overflow: hidden; text-indent: -9999px; letter-spacing: 0; }
body.shg .site-branding .site-title { margin: 0; line-height: 0; }
@media (max-width: 689px) { body.shg .site-branding .site-title a { width: 178px; height: 46px; } }

/* Desktop masthead: logo centred above, menu beneath.
   The logo column is taken out of the flow (zero measured width) so Blocksy's own overflow
   script gives the menu the full row instead of collapsing links into "More". */
@media (min-width: 1000px) {
	body.shg [data-device="desktop"] [data-row="middle"] > .ct-container { position: relative !important; display: flex !important; flex-wrap: nowrap !important; justify-content: center !important; align-items: center !important; padding-top: 96px !important; padding-bottom: .45rem !important; min-height: 0 !important; }
	body.shg [data-device="desktop"] [data-row="middle"] [data-column="start"] { position: absolute !important; top: .7rem !important; left: 50% !important; width: 0 !important; flex: 0 0 0 !important; min-width: 0 !important; overflow: visible !important; display: block !important; }
	body.shg [data-device="desktop"] [data-row="middle"] [data-column="start"] .site-branding { position: absolute; left: 0; top: 0; transform: translateX(-50%); }
	body.shg [data-device="desktop"] [data-row="middle"] [data-column="end"] { flex: 1 1 100% !important; display: flex !important; justify-content: center !important; min-width: 0 !important; }
	body.shg [data-device="desktop"] [data-row="middle"] [data-items] { justify-content: center !important; width: auto !important; max-width: 100% !important; }
	body.shg [data-device="desktop"] #header-menu-1 { max-width: 100%; }
	body.shg [data-device="desktop"] #header-menu-1 > ul.menu { flex-wrap: wrap !important; justify-content: center !important; row-gap: .1rem !important; }
	body.shg [data-device="desktop"] #header-menu-1 .menu > li > a.ct-menu-link { font-size: .8rem !important; font-weight: 600 !important; letter-spacing: .04em !important; padding-inline: .65rem !important; white-space: nowrap; }
}

/* ===== Buttons ===== */
.shg-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.6rem; border-radius: 999px; font-family: var(--shg-display); font-size: .84rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border: 1.5px solid var(--shg-green); color: var(--shg-green); background: transparent; transition: background .18s, color .18s, border-color .18s, transform .18s; min-height: 44px; }
.shg-btn:hover { background: var(--shg-green); color: #fff; transform: translateY(-1px); }
.shg-btn--primary { background: var(--shg-green); color: #fff; }
.shg-btn--primary:hover { background: var(--shg-gold-ink); border-color: var(--shg-gold-ink); }
.shg-btn--ghost-light { border-color: rgba(255,255,255,.7); color: #fff; }
.shg-btn--ghost-light:hover { background: #fff; color: var(--shg-green); }

/* ===== Section scaffolding ===== */
.shg-sec { padding-block: clamp(3rem, 7vw, 5.5rem); position: relative; }
.shg-eyebrow { font-family: var(--shg-display); font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--shg-gold-ink); margin: 0 0 1rem; }
.shg-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.shg-title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.1; margin: 0; }
.shg-sub { font-family: var(--shg-head); font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--shg-muted); margin: .4rem 0 0; }
.shg-link-all { font-family: var(--shg-display); font-size: .82rem; letter-spacing: .09em; text-transform: uppercase; color: var(--shg-gold-ink); text-decoration: none; border-bottom: 1px solid var(--shg-gold-soft); padding-bottom: .15rem; }
.shg-link-all:hover { color: var(--shg-green); border-color: var(--shg-green); }

/* Little olive-sprig divider, echoing the logo */
.shg-sprig { display: block; width: 150px; height: 18px; margin: 0 auto; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 18'%3E%3Cpath d='M0 9h58M92 9h58' stroke='%23b87a1d' stroke-width='1.2' opacity='.7'/%3E%3Cg fill='%235b7a45'%3E%3Cpath d='M75 9c-6-7-14-8-20-6 6 1 12 4 20 6zM75 9c6-7 14-8 20-6-6 1-12 4-20 6zM75 9c-5 6-12 8-18 6 6-.5 11-3 18-6zM75 9c5 6 12 8 18 6-6-.5-11-3-18-6z'/%3E%3C/g%3E%3C/svg%3E"); }

/* ===== Hero ===== */
.shg-hero { padding-block: clamp(2rem, 5vw, 4rem) clamp(2.5rem, 6vw, 4.5rem); background: var(--shg-bg); overflow: hidden; }
.shg-hero__grid { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.shg-hero__title { font-size: clamp(2.3rem, 6vw, 3.9rem); line-height: 1.02; margin: 0 0 1.1rem; color: var(--shg-green); }
.shg-hero__title em { color: var(--shg-gold); font-style: italic; font-weight: 600; }
.shg-hero__sub { font-size: clamp(1.05rem, 1.8vw, 1.2rem); line-height: 1.75; max-width: 34rem; margin: 0 0 1.8rem; }
.shg-hero__btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.shg-hero__art { margin: 0; }
.shg-hero__art img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; } /* white JPEG backdrop vanishes into the page */
@media (min-width: 900px) {
	.shg-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
	.shg-hero__art { margin-right: -2.5rem; }
}

/* ===== Cards ===== */
.shg-card { display: flex; flex-direction: column; background: var(--shg-paper); border: 1px solid var(--shg-line); border-radius: var(--shg-radius); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s, border-color .2s; }
.shg-card:hover { box-shadow: 0 14px 36px rgba(47,74,44,.12); transform: translateY(-3px); border-color: var(--shg-gold-soft); }
.shg-card__media { aspect-ratio: 16 / 10; background: var(--shg-cream); overflow: hidden; }
.shg-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.shg-card:hover .shg-card__media img { transform: scale(1.04); }
.shg-card__media--ph { background:
	url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 130'%3E%3Cg fill='%235b7a45' opacity='.55'%3E%3Cpath d='M40 112C70 86 105 62 160 22' stroke='%235b7a45' stroke-width='2.2' fill='none'/%3E%3Cellipse cx='72' cy='84' rx='20' ry='7' transform='rotate(-38 72 84)'/%3E%3Cellipse cx='96' cy='66' rx='20' ry='7' transform='rotate(-40 96 66)'/%3E%3Cellipse cx='122' cy='48' rx='19' ry='6.5' transform='rotate(-44 122 48)'/%3E%3Cellipse cx='146' cy='32' rx='17' ry='6' transform='rotate(-50 146 32)'/%3E%3Cellipse cx='60' cy='96' rx='18' ry='6.5' transform='rotate(18 60 96)'/%3E%3Cellipse cx='92' cy='80' rx='18' ry='6.5' transform='rotate(14 92 80)'/%3E%3Cellipse cx='120' cy='62' rx='17' ry='6' transform='rotate(10 120 62)'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / 62%,
	linear-gradient(135deg, #f6e7c6 0%, #eef0dc 100%); }
.shg-card__body { padding: 1.2rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.shg-card__cat { font-family: var(--shg-display); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--shg-gold-ink); }
.shg-card__title { font-size: 1.32rem; line-height: 1.18; margin: 0; }
.shg-card__excerpt { margin: 0; font-size: 1rem; line-height: 1.65; color: var(--shg-body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shg-card__meta { margin-top: auto; padding-top: .5rem; font-size: .86rem; color: var(--shg-muted); }
.shg-grid { display: grid; gap: clamp(1rem, 2.6vw, 1.75rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* Featured (newest) reflection: image + text side by side on wide screens */
.shg-feature { margin-bottom: clamp(1rem, 2.6vw, 1.75rem); }
.shg-feature .shg-card__title { font-size: clamp(1.55rem, 3vw, 2.1rem); }
.shg-feature .shg-card__excerpt { -webkit-line-clamp: 5; font-size: 1.05rem; }
@media (min-width: 820px) {
	.shg-feature.shg-card { flex-direction: row; }
	.shg-feature .shg-card__media { flex: 1.15; aspect-ratio: auto; min-height: 320px; }
	.shg-feature .shg-card__body { flex: 1; justify-content: center; padding: 2rem 2.25rem; gap: .8rem; }
}

.shg-empty { text-align: center; padding: 3rem 1rem; font-family: var(--shg-head); font-size: 1.15rem; color: var(--shg-muted); border: 1px dashed var(--shg-gold-soft); border-radius: var(--shg-radius); background: var(--shg-cream); }

/* ===== About band ===== */
.shg-about { background: var(--shg-cream); }
.shg-about__grid { display: grid; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.shg-about__photo { margin: 0 auto; width: min(100%, 360px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 6px solid var(--shg-paper); box-shadow: 0 0 0 1.5px var(--shg-gold-soft), 0 18px 44px rgba(47,74,44,.16); background: var(--shg-bg); }
.shg-about__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shg-about__title { font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.05; margin: 0 0 1rem; color: var(--shg-green); }
.shg-about__text p { font-size: 1.1rem; line-height: 1.8; margin: 0 0 1rem; max-width: 38rem; }
@media (min-width: 820px) { .shg-about__grid { grid-template-columns: 340px minmax(0, 1fr); } .shg-about__photo { margin: 0; } }

/* ===== Topics ===== */
.shg-topics { display: flex; flex-wrap: wrap; gap: .65rem; }
.shg-chip { display: inline-flex; align-items: baseline; gap: .5rem; padding: .6rem 1.1rem; border: 1px solid var(--shg-line); border-radius: 999px; background: var(--shg-paper); color: var(--shg-green); text-decoration: none; font-family: var(--shg-head); font-size: 1.02rem; font-weight: 600; transition: border-color .18s, background .18s, transform .18s; }
.shg-chip:hover { border-color: var(--shg-gold); background: var(--shg-cream); transform: translateY(-1px); }
.shg-chip small { font-family: var(--shg-text); font-size: .76rem; font-weight: 400; color: var(--shg-muted); }

/* ===== Scripture band ===== */
.shg-verse { background: var(--shg-green); color: #f5f1e4; text-align: center; overflow: hidden; }
.shg-verse::before { content: ""; position: absolute; inset: 0; opacity: .1; background: url("assets/img/hero-art.jpg") center / cover; mix-blend-mode: luminosity; }
.shg-verse .shg-wrap { position: relative; }
.shg-verse blockquote { margin: 0 auto; max-width: 46rem; border: 0; padding: 0; }
.shg-verse p { font-family: var(--shg-head); font-weight: 600; font-size: clamp(1.45rem, 3.2vw, 2.1rem); line-height: 1.3; color: #fff; margin: 0 0 1.2rem; }
.shg-verse cite { font-style: normal; font-family: var(--shg-display); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--shg-gold-soft); }

/* ===== Subscribe ===== */
.shg-subscribe__card { max-width: 46rem; margin-inline: auto; text-align: center; background: var(--shg-paper); border: 1px solid var(--shg-line); border-radius: 22px; padding: clamp(1.75rem, 5vw, 3.25rem); box-shadow: 0 18px 50px rgba(47,74,44,.08); }
.shg-subscribe__card h2 { font-size: clamp(1.55rem, 3.2vw, 2.1rem); margin: 0 0 .6rem; }
.shg-subscribe__card p { margin: 0 auto 1.4rem; max-width: 32rem; font-size: 1.05rem; line-height: 1.7; }
.shg-note { font-size: .9rem; color: var(--shg-muted); border: 1px dashed var(--shg-gold-soft); border-radius: 10px; padding: .75rem 1rem; }

/* Blocksy reads body text from this variable — point its meta/labels at our serif too. */
body.shg { --theme-font-family: "Source Serif 4", Georgia, "Times New Roman", serif; }

/* ===== Single post header (Blocksy "hero" block) ===== */
body.single-post .hero-section .page-title { font-family: var(--shg-head); font-weight: 600; font-size: clamp(1.9rem, 4.4vw, 2.7rem); line-height: 1.15; letter-spacing: -.01em; color: var(--shg-green); }
body.single-post .ct-featured-image { display: none; } /* thumbnails already carry the title; used on cards/social only */
body.single-post .hero-section .page-description { display: none; } /* it only repeats the opening line of the reflection */
body.single-post .hero-section .entry-meta { font-size: .86rem; color: var(--shg-muted); }
body.single-post .hero-section .entry-meta a { color: var(--shg-muted); }
body.single-post .hero-section .entry-meta .ct-term-5, body.single-post .hero-section .meta-categories a { color: var(--shg-gold-ink); }

/* ===== Single post — comfortable reading ===== */
body.single-post .entry-title, body.page .entry-title { font-family: var(--shg-head); font-weight: 600; color: var(--shg-green); letter-spacing: -.01em; }
body.single-post .entry-content, body.page .entry-content { font-family: var(--shg-text); font-size: 1.19rem; line-height: 1.8; color: var(--shg-body); }
body.single-post .entry-content > * + *, body.page .entry-content > * + * { margin-top: 1.35em; }
body.single-post .entry-content h2, body.single-post .entry-content h3 { font-family: var(--shg-head); color: var(--shg-green); margin-top: 2em; }
body.single-post .entry-content h2 { font-size: 1.7rem; }
body.single-post .entry-content blockquote, body.page .entry-content blockquote { margin-inline: 0; padding: .4rem 0 .4rem 1.5rem; border-left: 3px solid var(--shg-gold); font-family: var(--shg-head); font-style: normal; font-weight: 600; font-size: 1.2rem; line-height: 1.6; color: var(--shg-green-deep); background: none; }
body.single-post .entry-content blockquote cite { display: block; margin-top: .6rem; font-family: var(--shg-display); font-style: normal; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--shg-gold-ink); }
body.single-post .entry-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.single-post .entry-content img { border-radius: 10px; }

.shg-signoff { margin-top: 3.5rem; padding: 2rem 1.5rem; text-align: center; background: var(--shg-cream); border-radius: var(--shg-radius); border-top: 3px solid var(--shg-gold); }
.shg-signoff__verse { font-family: var(--shg-head); font-weight: 600; font-size: 1.3rem; line-height: 1.4; color: var(--shg-green-deep); margin: 0 0 .35rem; }
.shg-signoff__ref { font-family: var(--shg-display); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--shg-gold-ink); margin: 0 0 1.2rem; }
.shg-signoff__by { font-family: var(--shg-head); font-size: 1.15rem; color: var(--shg-body); margin: 0 0 1.1rem; }

/* ===== Motion: gentle reveal (only when JS has confirmed it can run) ===== */
.shg-js .shg-reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.shg-js .shg-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.shg-js .shg-reveal { opacity: 1; transform: none; transition: none; }
	.shg-card, .shg-card__media img, .shg-btn, .shg-chip { transition: none; }
}
