/*
Theme Name: Cozy Plant Home
Theme URI: https://cozyplanthome.com/
Author: Cozy Plant Home Team
Description: Lightweight blog theme for Cozy Plant Home: centered logo, posts + sidebar, quick-answer box, care card, TOC, FAQ schema, Pinterest-ready pin images and ad-ready slots.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: cozyplanthome
*/

/* ---------- Tokens ---------- */
:root {
	--forest: #1E4634;
	--ink: #26352A;
	--cream: #FAF6EF;
	--white: #FFFFFF;
	--sage: #EAF2E6;
	--terracotta: #A34A18;
	--terracotta-dark: #86390F;
	--leaf: #256D46;
	--line: rgba(30, 70, 52, .15);
	--muted: #55645A;
	--radius: 12px;
	--shadow: 0 1px 3px rgba(30, 70, 52, .08), 0 4px 14px rgba(30, 70, 52, .06);
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--wrap: 1180px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 18px;
	line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf); text-underline-offset: 2px; }
a:hover { color: var(--forest); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--forest); line-height: 1.2; font-weight: 600; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 2.75rem); font-weight: 700; margin-top: .2em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.3rem; }
p, ul, ol, table, figure { margin: 0 0 1.1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--white); padding: 8px 14px; }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

.btn {
	display: inline-block;
	background: var(--terracotta);
	color: var(--white);
	font-weight: 700;
	font-size: .95rem;
	padding: .7em 1.4em;
	border-radius: 8px;
	border: 0;
	text-decoration: none;
	cursor: pointer;
}
.btn:hover, .btn:focus { background: var(--terracotta-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--terracotta); border: 2px solid var(--terracotta); }
.btn-outline:hover { background: var(--terracotta); color: var(--white); }
.label {
	display: inline-block;
	background: var(--leaf);
	color: var(--white);
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: .25em .6em;
	border-radius: 4px;
	text-decoration: none;
}
.label:hover { background: var(--forest); color: var(--white); }
.meta { color: var(--muted); font-size: .85rem; }
.more-link { color: var(--terracotta); font-weight: 700; text-decoration: none; font-size: .95rem; }

/* ---------- Header ---------- */
.topbar { display: flex; justify-content: flex-end; gap: 12px; padding: 6px 16px 0; }
.topbar a { color: var(--forest); }
.topbar svg { width: 20px; height: 20px; }
.brand { text-align: center; padding: 18px 16px 14px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.1; }
.logo svg { width: .8em; height: .8em; flex: none; }
.logo:hover { color: var(--forest); }
.tagline { margin: 6px 0 0; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.navbar { background: var(--forest); position: sticky; top: 0; z-index: 20; }
.navbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.nav-toggle, .search-toggle { background: none; border: 0; color: var(--cream); padding: 10px; cursor: pointer; display: inline-flex; }
.nav-toggle svg, .search-toggle svg { width: 22px; height: 22px; }
.primary-menu { list-style: none; margin: 0; padding: 0; display: none; }
.primary-menu a { color: var(--cream); text-decoration: none; font-size: .95rem; display: block; padding: 12px 14px; }
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current-category-ancestor > a { color: var(--white); text-decoration: underline; text-underline-offset: 6px; }
.nav-open .primary-menu { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--forest); padding: 6px 0 12px; }
.header-search { display: none; background: var(--forest); padding: 0 16px 14px; }
.search-open .header-search { display: block; }

.search-form { display: flex; gap: 6px; }
.search-form input[type="search"] { flex: 1; min-width: 0; font: inherit; font-size: .95rem; padding: .6em .8em; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
.search-form button { background: var(--terracotta); color: var(--white); border: 0; border-radius: 8px; padding: 0 14px; cursor: pointer; display: inline-flex; align-items: center; }
.search-form button svg { width: 18px; height: 18px; }

@media (min-width: 960px) {
	.nav-toggle { display: none; }
	.navbar .wrap { justify-content: center; position: relative; }
	.primary-menu { display: flex; flex-wrap: wrap; justify-content: center; }
	.search-toggle { position: absolute; right: 16px; }
	.header-search .search-form { max-width: 520px; margin: 0 auto; }
}

/* ---------- Layout ---------- */
.site-main { padding: 22px 0 40px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.layout > * { min-width: 0; }
.entry-content, .archive-desc, .widget { overflow-wrap: anywhere; }
@media (min-width: 960px) {
	.layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
}
.card {
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

/* ---------- Featured ---------- */
.featured { display: grid; overflow: hidden; margin-bottom: 30px; }
.featured-img { display: block; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.featured-body { padding: 20px 22px 24px; }
.featured-body h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: .4em 0 .4em; }
.featured-body h2 a { color: var(--forest); text-decoration: none; }
.featured-body p { color: var(--muted); }
@media (min-width: 760px) {
	.featured { grid-template-columns: 1.5fr 1fr; }
	.featured-body { padding: 30px; align-self: center; }
}

/* ---------- Post lists ---------- */
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0 0 .6em; }
.post-list { display: grid; gap: 18px; }
.post-row { display: grid; overflow: hidden; }
.post-row-img { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.post-row-img img, .post-row-img .no-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-row-body { padding: 16px 18px 18px; }
.post-row-body h2, .post-row-body h3 { font-size: 1.35rem; margin: .45em 0 .2em; }
.post-row-body h2 a, .post-row-body h3 a { color: var(--forest); text-decoration: none; }
.post-row-body h2 a:hover, .post-row-body h3 a:hover { text-decoration: underline; }
.post-row-body p { margin: .5em 0 .6em; font-size: .97rem; }
@media (min-width: 600px) {
	.post-row { grid-template-columns: 240px 1fr; }
	.post-row-img { aspect-ratio: auto; min-height: 170px; }
}
.post-grid { display: grid; gap: 18px; }
@media (min-width: 600px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
.grid-card { overflow: hidden; display: flex; flex-direction: column; }
.grid-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.grid-card-body { padding: 14px 16px 18px; }
.grid-card-body h3 { font-size: 1.15rem; margin: .4em 0 .2em; }
.grid-card-body h3 a { color: var(--forest); text-decoration: none; }
.no-thumb { background: var(--sage); aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; color: var(--leaf); }
.no-thumb svg { width: 48px; height: 48px; }

.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { min-width: 42px; text-align: center; padding: 8px 12px; border-radius: 8px; background: var(--white); box-shadow: var(--shadow); text-decoration: none; color: var(--forest); }
.pagination .page-numbers.current { background: var(--terracotta); color: var(--white); }

/* ---------- Sidebar ---------- */
.sidebar { display: grid; gap: 22px; align-content: start; }
.widget { padding: 20px; }
.widget-title { font-size: 1.3rem; margin: 0 0 .6em; }
.widget-welcome { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.widget-welcome .widget-title { grid-column: 1 / -1; margin-bottom: 0; }
.widget-welcome img, .widget-welcome .welcome-badge { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.welcome-badge { background: var(--sage); display: flex; align-items: center; justify-content: center; color: var(--forest); }
.welcome-badge svg { width: 46px; height: 46px; }
.widget-welcome p { font-size: .9rem; margin: 0 0 .4em; }
.widget-freebie { background: var(--sage); }
.widget-freebie p { font-size: .92rem; }
.widget-freebie .nl-row .btn { flex: 1 1 100%; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mini-list li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.mini-list img, .mini-list .no-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; aspect-ratio: 1; }
.mini-list .no-thumb svg { width: 24px; height: 24px; }
.mini-list a { color: var(--ink); text-decoration: none; font-size: .92rem; line-height: 1.35; }
.mini-list a:hover { color: var(--leaf); text-decoration: underline; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { color: var(--ink); text-decoration: none; }
.cat-list a:hover { color: var(--leaf); }
.pin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.pin-grid img { aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; width: 100%; }
@media (min-width: 960px) {
	.sidebar-sticky { position: sticky; top: 70px; }
}

/* ---------- Bands ---------- */
.freebie-band { background: var(--sage); padding: 34px 0; margin-top: 10px; }
.freebie-band .wrap { display: grid; gap: 18px; align-items: center; }
.freebie-band h2 { margin: 0 0 .2em; font-size: clamp(1.5rem, 3vw, 2rem); }
.freebie-band p { margin: 0; }
@media (min-width: 760px) {
	.freebie-band .wrap { grid-template-columns: 1fr minmax(320px, 460px); }
}

/* ---------- Newsletter ---------- */
.nl-form { display: grid; gap: 8px; }
.nl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-row input { flex: 1 1 200px; min-width: 0; font: inherit; font-size: 1rem; padding: .65em .85em; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
.nl-row .btn { flex: 0 0 auto; }
.nl-form .hp { position: absolute; left: -9999px; }
.nl-note { margin: 0; font-size: .82rem; opacity: .85; }
.nl-note a { color: inherit; }
.nl-msg { margin: 0; padding: 8px 12px; border-radius: 8px; font-size: .9rem; font-weight: 600; background: var(--white); color: var(--forest); }
.nl-msg-error, .nl-msg-limit { color: var(--terracotta-dark); }
.nl-landing { max-width: 640px; text-align: center; }
.nl-landing form { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: var(--cream); text-align: center; padding: 34px 16px 26px; }
.site-footer .logo { color: var(--cream); font-size: 1.7rem; }
.footer-menu { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer-menu a { color: var(--cream); text-decoration: none; font-size: .9rem; }
.footer-menu a:hover { text-decoration: underline; }
.footer-note { font-size: .8rem; opacity: .85; margin: 0; }

/* ---------- Single ---------- */
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumbs a { color: var(--leaf); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.entry { padding: 22px 18px 28px; }
@media (min-width: 760px) { .entry { padding: 34px 40px 40px; } }
.entry-header h1 { margin-bottom: .3em; }
.byline { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.byline a { color: var(--leaf); }
.entry-hero { margin: 0 0 22px; }
.entry-hero img { border-radius: var(--radius); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .35em; }
.entry-content img { border-radius: 10px; }
.entry-content blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--leaf); font-style: italic; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.entry-content th { background: var(--sage); color: var(--forest); }

.quick-answer { background: var(--sage); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 1.4em; border-left: 5px solid var(--leaf); }
.quick-answer-title { font-family: var(--serif); font-weight: 700; color: var(--forest); font-size: 1.15rem; margin: 0 0 .3em; display: flex; align-items: center; gap: 8px; }
.quick-answer-title svg { width: 20px; height: 20px; }
.quick-answer p:last-child { margin-bottom: 0; }

.care-card { border: 2px solid var(--sage); background: var(--white); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 1.6em; }
.care-card-title { font-family: var(--serif); font-weight: 700; color: var(--forest); font-size: 1.15rem; margin: 0 0 .5em; }
.care-card dl { display: grid; grid-template-columns: 1fr; gap: 6px 18px; margin: 0; }
@media (min-width: 600px) { .care-card dl { grid-template-columns: 1fr 1fr; } }
.care-card dl div { display: flex; gap: 8px; font-size: .95rem; }
.care-card dt { font-weight: 700; color: var(--forest); white-space: nowrap; }
.care-card dd { margin: 0; }

.toc { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin: 0 0 1.6em; }
.toc summary { cursor: pointer; font-family: var(--serif); font-weight: 700; color: var(--forest); font-size: 1.1rem; }
.toc ol { margin: .6em 0 .2em; padding-left: 1.3em; font-size: .95rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.pin-figure { margin: 1.8em auto; max-width: 420px; text-align: center; }
.pin-figure img { border-radius: 10px; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: var(--shadow); }
.pin-save { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; }
.pin-save svg { width: 18px; height: 18px; }

.faq { margin: 1.8em 0; }
.faq-item { border-bottom: 1px solid var(--line); padding: 4px 0 10px; }
.faq-item h3 { font-size: 1.12rem; margin: .8em 0 .3em; }
.faq-item p:last-child { margin-bottom: 0; }

.sources { font-size: .9rem; }

.author-box { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; background: var(--sage); border-radius: var(--radius); padding: 18px; margin-top: 30px; }
.author-box .welcome-badge { width: 72px; height: 72px; border-radius: 50%; }
.author-box .welcome-badge svg { width: 36px; height: 36px; }
.author-box h2 { font-size: 1.15rem; margin: 0 0 .2em; }
.author-box p { margin: 0; font-size: .92rem; }

.inline-freebie { margin: 2em 0; padding: 20px; border-radius: var(--radius); background: var(--forest); color: var(--cream); display: grid; gap: 12px; }
.inline-freebie h2 { color: var(--white); margin: 0; font-size: 1.35rem; }
.inline-freebie p { margin: 0; }
.inline-freebie .nl-row input { border-color: transparent; }

.related { margin-top: 34px; }
.related .section-title { font-size: 1.6rem; }
@media (min-width: 760px) { .related .post-grid { grid-template-columns: repeat(3, 1fr); } }

.cph-ad { margin: 1.6em 0; min-height: 280px; display: flex; align-items: center; justify-content: center; }

/* ---------- Archive ---------- */
.archive-header { padding: 4px 0 18px; }
.archive-header h1 { margin-bottom: .2em; }
.archive-desc { color: var(--ink); max-width: 760px; }
.archive-desc p { margin-bottom: .6em; }

/* ---------- Pages ---------- */
.page-entry { max-width: 820px; margin: 0 auto; }

/* ---------- Contact ---------- */
.contact-form { display: grid; gap: 12px; max-width: 560px; }
.contact-form label { font-weight: 600; font-size: .95rem; display: grid; gap: 4px; }
.contact-form input, .contact-form textarea { font: inherit; font-size: 1rem; padding: .6em .8em; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
.contact-form .hp { position: absolute; left: -9999px; }
.notice { padding: 12px 16px; border-radius: 8px; background: var(--sage); margin-bottom: 1em; }

/* ---------- 404 / search ---------- */
.empty-state { text-align: center; padding: 30px 18px; }
.empty-state .search-form { max-width: 480px; margin: 18px auto 0; }

/* ---------- WordPress ---------- */
.alignwide, .alignfull { max-width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 6px; }
.sticky, .bypostauthor, .gallery-caption { }
