/*
Theme Name:   The Unbothered PM
Theme URI:    https://unbotheredpm.com
Description:  Child theme of Twenty Twenty-Five for The Unbothered PM — a fast, SEO-first blog and home base for AI workflows for project managers. Calm, competent, lots of whitespace. McKinsey meets Notion meets a slightly tired PM.
Author:       Carolyn Farnsworth
Author URI:   https://unbotheredpm.com
Template:     twentytwentyfive
Version:      1.0.0
Requires at least: 6.5
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:  unbotheredpm
*/

/*
 * Most of the design is driven by theme.json (palette, type, spacing) and
 * block patterns. This file holds the handful of custom rules that theme.json
 * can't express cleanly: the prompt block, the CTA box, the coral "human mark"
 * annotations, and the faint geometric header strip.
 *
 * Design tokens (kept in sync with theme.json):
 *   Ink        #1C1C1A   body + headlines
 *   Warm Paper #FCFBF8   default background
 *   Slate Green#234E3D   primary accent (structure)
 *   Coral      #C9533B   human mark ONLY (one per section)
 *   Sage       #E8EEE9   tint panels / "after" cards
 *   Mint       #97D1B2   accent on dark
 *   Grey       #707068   subheads, captions, footers
 *   Prompt bg  #F2F1EC   prompt block background
 */

/* ---------------------------------------------------------------------------
   1. Base rhythm
   --------------------------------------------------------------------------- */

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Slightly tighter, more confident headline tracking than the TT5 default. */
h1, h2, h3,
.wp-block-heading {
	letter-spacing: -0.02em;
}

/* Links: green, with a calm underline that thickens on hover. */
.wp-block-post-content a,
.entry-content a,
.is-style-body a {
	color: var(--wp--preset--color--slate-green);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: text-decoration-thickness 0.12s ease;
}
.wp-block-post-content a:hover,
.entry-content a:hover {
	text-decoration-thickness: 2px;
}

/* ---------------------------------------------------------------------------
   2. Prompt block — the copy-paste part. Mono, paper-grey, green left border.
      Usage: a Group block with class .upm-prompt wrapping a Preformatted/Code
      block, or the bundled "Prompt block" pattern.
   --------------------------------------------------------------------------- */

.upm-prompt {
	position: relative;
	background-color: #F2F1EC;
	border-left: 4px solid var(--wp--preset--color--slate-green);
	border-radius: 4px;
	padding: clamp(1.25rem, 4vw, 2rem);
	margin-block: var(--wp--preset--spacing--50, 2rem);
}

.upm-prompt pre,
.upm-prompt code,
.upm-prompt .wp-block-preformatted,
.upm-prompt .wp-block-code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.95rem;
	line-height: 1.65;
	color: var(--wp--preset--color--ink);
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
}

/* Small "PROMPT" eyebrow you can drop above the code (a Paragraph with
   .upm-prompt__label inside the group). */
.upm-prompt__label {
	display: inline-block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate-green);
	margin-bottom: 0.75rem;
}

/* Copy button (progressively enhanced by assets/css/prompt-copy.js). */
.upm-prompt__copy {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted-grey);
	background: transparent;
	border: 1px solid rgba(35, 78, 61, 0.25);
	border-radius: 3px;
	padding: 0.3rem 0.6rem;
	cursor: pointer;
	transition: color 0.12s ease, border-color 0.12s ease;
}
.upm-prompt__copy:hover {
	color: var(--wp--preset--color--slate-green);
	border-color: var(--wp--preset--color--slate-green);
}
.upm-prompt__copy.is-copied {
	color: var(--wp--preset--color--slate-green);
	border-color: var(--wp--preset--color--slate-green);
}

/* ---------------------------------------------------------------------------
   3. Toolkit CTA box — appears near the end of posts and on Home.
      Sage tint card, green rule, one clear button.
   --------------------------------------------------------------------------- */

.upm-cta {
	background-color: var(--wp--preset--color--sage);
	border-radius: 8px;
	padding: clamp(1.5rem, 5vw, 2.75rem);
	margin-block: var(--wp--preset--spacing--60, 3rem);
}

.upm-cta__eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate-green);
	margin-bottom: 0.5rem;
}

.upm-cta h2,
.upm-cta h3 {
	margin-top: 0;
	color: var(--wp--preset--color--ink);
}

/* ---------------------------------------------------------------------------
   4. Coral "human mark" — the one-mark rule. Reserved for hand annotations:
      underlines, margin notes, dry parentheticals. One per section, never more.
   --------------------------------------------------------------------------- */

/* Hand underline under a phrase: wrap text in <span class="upm-mark">. */
.upm-mark {
	background-image: linear-gradient(transparent 60%, rgba(201, 83, 59, 0.28) 60%);
	background-repeat: no-repeat;
}

/* A handwritten coral margin note (use sparingly — it's the human fingerprint). */
.upm-note {
	font-family: var(--wp--preset--font-family--caveat), "Bradley Hand", cursive;
	color: var(--wp--preset--color--coral);
	font-size: 1.15rem;
	line-height: 1.3;
	display: inline-block;
}

/* ---------------------------------------------------------------------------
   5. Geometric header strip — the faint green line pattern from the carousels.
      Add class .upm-geo to a Group/Cover to get the strip along its top.
   --------------------------------------------------------------------------- */

.upm-geo {
	position: relative;
}
.upm-geo::before {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline: 0;
	height: 120px;
	background-image: url("assets/images/geo-strip.svg");
	background-repeat: repeat-x;
	background-position: top center;
	background-size: auto 120px;
	opacity: 0.5;
	pointer-events: none;
}

/* ---------------------------------------------------------------------------
   6. Post list — keep it clean and skimmable (Blog is the engine).
   --------------------------------------------------------------------------- */

.upm-postlist .wp-block-post-title {
	letter-spacing: -0.02em;
}
.upm-postlist .wp-block-post-date,
.upm-postlist .wp-block-post-terms {
	color: var(--wp--preset--color--muted-grey);
	font-size: 0.85rem;
}

/* Category filter list on the Blog header (inline pills). */
.wp-block-categories.is-style-upm-cats,
.wp-block-categories-list.is-style-upm-cats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.is-style-upm-cats li a {
	display: inline-block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate-green);
	border: 1px solid rgba(35, 78, 61, 0.25);
	border-radius: 999px;
	padding: 0.3rem 0.85rem;
	text-decoration: none;
}
.is-style-upm-cats li a:hover {
	background: var(--wp--preset--color--sage);
}

/* Category pills (Workflows, Lessons, Lore). */
.upm-postlist .wp-block-post-terms a {
	display: inline-block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate-green);
	border: 1px solid rgba(35, 78, 61, 0.25);
	border-radius: 999px;
	padding: 0.15rem 0.6rem;
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
   7. Polish layer — header nav, post cards, rhythm, and the small details
      that separate "competent" from "generic template."
   --------------------------------------------------------------------------- */

/* Header navigation: quiet ink links that warm to green. No default underline. */
header .wp-block-navigation a,
header .wp-block-navigation .wp-block-navigation-item__content {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.12s ease;
}
header .wp-block-navigation a:hover,
header .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--slate-green);
}
header .wp-block-site-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

/* On small screens, drop the header CTA button so the bar stays clean. */
@media (max-width: 781px) {
	.upm-header-cta { display: none; }
}

/* Blog/Home post cards — turn the bare grid into intentional cards that lift
   on hover. The single biggest "feels designed" upgrade. */
.upm-postlist .wp-block-post-template {
	gap: var(--wp--preset--spacing--40);
}
.upm-postlist .wp-block-post-template > li {
	background: #fff;
	border: 1px solid #1c1c1a12;
	border-radius: 10px;
	padding: 1.5rem 1.5rem 1.65rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.upm-postlist .wp-block-post-template > li:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 30px -18px rgba(28, 28, 26, 0.35);
	border-color: #1c1c1a22;
}
.upm-postlist .wp-block-post-template > li .wp-block-post-title {
	margin: 0;
	line-height: 1.2;
}
.upm-postlist .wp-block-post-template > li .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.upm-postlist .wp-block-post-template > li .wp-block-post-title a:hover {
	color: var(--wp--preset--color--slate-green);
}
.upm-postlist .wp-block-post-template > li .wp-block-post-excerpt {
	margin: 0;
	flex: 1;
}
.upm-postlist .wp-block-post-template > li .wp-block-post-date {
	margin: 0.25rem 0 0;
}
/* Excerpt "Read" link reads as a quiet action, not a body link. */
.upm-postlist .wp-block-post-excerpt__more-link {
	display: inline-block;
	margin-top: 0.5rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate-green);
	text-decoration: none;
}
.upm-postlist .wp-block-post-excerpt__more-link:hover { text-decoration: underline; }

/* Lead paragraph: the first paragraph of a post/page intro reads larger. */
.upm-lead {
	font-size: 1.3rem;
	line-height: 1.55;
	color: var(--wp--preset--color--ink);
}

/* Pull-quote highlight (the "one belief" block on About, callouts in posts). */
.upm-pull {
	border-left: 3px solid var(--wp--preset--color--mint);
	padding: 0.25rem 0 0.25rem 1.5rem;
	margin-block: var(--wp--preset--spacing--50);
	font-size: 1.3rem;
	line-height: 1.5;
	color: var(--wp--preset--color--ink);
}

/* Give post body headings room to breathe. */
.wp-block-post-content > .wp-block-heading,
.entry-content > .wp-block-heading {
	margin-top: var(--wp--preset--spacing--60);
	margin-bottom: var(--wp--preset--spacing--30);
}

/* Pagination: quiet, monospace, centered. */
.wp-block-query-pagination {
	justify-content: center;
	gap: 0.75rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.85rem;
}
.wp-block-query-pagination a { text-decoration: none; color: var(--wp--preset--color--slate-green); }
.wp-block-query-pagination .current { color: var(--wp--preset--color--ink); font-weight: 700; }

/* Buttons: a touch of lift on hover for tactility. */
.wp-element-button,
.wp-block-button__link {
	transition: background-color 0.14s ease, transform 0.12s ease;
}
.wp-block-button__link:hover { transform: translateY(-1px); }

/* Outline (secondary) button — used for the hero's "Get the toolkit". */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 1.5px solid var(--wp--preset--color--slate-green);
	color: var(--wp--preset--color--slate-green);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--slate-green);
	/* !important needed: WP outputs .has-slate-green-color with !important */
	color: var(--wp--preset--color--warm-paper) !important;
}

/* ---------------------------------------------------------------------------
   8. Home "what you'll find" + shared eyebrow/cardlink helpers.
   --------------------------------------------------------------------------- */

/* Reusable mono eyebrow/kicker. */
.upm-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate-green);
	margin-bottom: 0.5rem;
}

/* Pillar cards on the home page (sit on the sage band). */
.upm-findcard {
	background: #fff;
	border: 1px solid #1c1c1a14;
	border-radius: 10px;
	padding: 1.75rem 1.6rem 1.5rem;
	transition: transform 0.14s ease, box-shadow 0.14s ease;
	/* equal-height cards with the "→" link pinned to the bottom of each */
	display: flex;
	flex-direction: column;
}
.upm-findcard .upm-cardlink {
	margin-top: auto;
	padding-top: 0.5rem;
}
.upm-findcard:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 32px -20px rgba(28, 28, 26, 0.4);
}
.upm-findcard h3 { margin-top: 0.15rem; margin-bottom: 0.5rem; }

/* Quiet mono "→" links inside cards and teasers. */
.upm-cardlink a {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	font-weight: 500;
	color: var(--wp--preset--color--slate-green);
	text-decoration: none;
}
.upm-cardlink a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   9. Article polish — break up the "march of paragraphs" on posts/About.
   --------------------------------------------------------------------------- */

/* A coral hairline mark sits above each H2 in long-form content, giving each
   section a quiet visual anchor without shouting. */
.wp-block-post-content > .wp-block-heading::before,
.upm-article > .wp-block-heading::before {
	content: "";
	display: block;
	width: 32px;
	height: 2px;
	background: var(--wp--preset--color--coral);
	opacity: 0.55;
	margin-bottom: 0.85rem;
	border-radius: 2px;
}

/* Comfortable measure + spacing for body copy in posts/pages. */
.wp-block-post-content p,
.upm-article p {
	max-width: 68ch;
}

/* Tighten list spacing so guardrail/step lists read as a unit, not a wall. */
.wp-block-post-content ul li,
.wp-block-post-content ol li {
	margin-bottom: 0.4rem;
}

/* The lead paragraph already exists (.upm-lead); add a hair of space under it. */
.upm-lead { margin-bottom: var(--wp--preset--spacing--40); }

/* Brand figure — inline SVG graphics (restrained, palette-only). */
.upm-figure {
	margin-block: var(--wp--preset--spacing--60);
}
.upm-figcaption {
	margin-top: 0.7rem;
	text-align: center;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.78rem;
	letter-spacing: 0.03em;
	color: var(--wp--preset--color--muted-grey);
}

/* Previous / next post navigation at the foot of a single post. */
.upm-postnav {
	gap: var(--wp--preset--spacing--40);
}
.upm-postnav .wp-block-post-navigation-link {
	font-size: 0.95rem;
	max-width: 47%;
}
.upm-postnav .post-navigation-link-next {
	margin-inline-start: auto;
	text-align: right;
}
.upm-postnav .wp-block-post-navigation-link a {
	color: var(--wp--preset--color--slate-green);
	text-decoration: none;
	font-weight: 600;
}
.upm-postnav .wp-block-post-navigation-link a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   10. Featured images / branded covers (SVG-safe).
   --------------------------------------------------------------------------- */

.wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* Card covers: fill the top of the card, crop to 16:9, rounded. */
.upm-postlist .wp-block-post-featured-image {
	margin: 0 0 1rem;
	border-radius: 8px;
	overflow: hidden;
}
.upm-postlist .wp-block-post-featured-image img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* Single-post header cover: a calm hairline frame, never oversized. */
.wp-block-post-featured-image.alignwide img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border: 1px solid #1c1c1a0f;
}

/* Visually-hidden but screen-reader/SEO-readable (the cover carries the title
   visibly; this keeps a real <h1> in the document). */
.upm-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------------------
   11. Branded checklist — green tick instead of a bullet (toolkit "what's
       inside", any "here's what you get" list).
   --------------------------------------------------------------------------- */
.upm-checklist {
	list-style: none;
	padding-left: 0;
}
.upm-checklist li {
	position: relative;
	padding-left: 1.9rem;
}
.upm-checklist li::before {
	content: "";
	position: absolute;
	left: 0.15rem;
	top: 0.32em;
	width: 0.42rem;
	height: 0.78rem;
	border: solid var(--wp--preset--color--slate-green);
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg);
}

/* Footer social icons — slate-green, warm to the coral human-mark on hover. */
.upm-social.is-style-logos-only .wp-social-link svg {
	width: 22px;
	height: 22px;
}
.upm-social .wp-social-link {
	transition: color 0.12s ease, transform 0.12s ease;
}
.upm-social .wp-social-link:hover {
	color: var(--wp--preset--color--coral) !important;
	transform: translateY(-2px);
}
