/*
Theme Name: Unstuck at Home
Theme URI: https://unstuckathome.com/
Author: UnstuckAtHome
Author URI: https://unstuckathome.com/
Description: A calm, fast block theme for UnstuckAtHome: ADHD-friendly cleaning and low-energy home systems. Large legible type, a linen and sage palette, and ready-made article blocks (Quick-Win Box, Battery Check, Exit Door, lead magnet CTA, Gumroad product, affiliate picks, FAQ and resource box).
Requires at least: 6.6
Tested up to: 7.2
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: unstuck
Tags: blog, one-column, block-patterns, full-site-editing, accessibility-ready, custom-colors, editor-style
*/

/* ---------- Base comfort ---------- */

:root {
	--unstuck-radius: 16px;
	--unstuck-radius-small: 10px;
}

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

::selection {
	background: var(--wp--preset--color--sage-soft);
	color: var(--wp--preset--color--charcoal);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--clay);
	outline-offset: 3px;
	border-radius: 4px;
}

.entry-content a,
.wp-block-post-content a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

.wp-block-post-content strong {
	font-weight: 700;
	background: linear-gradient(transparent 62%, var(--wp--preset--color--sage-soft) 62%);
}

.wp-block-post-content h2 {
	margin-top: 2.75rem;
}

.wp-block-post-content h3 {
	margin-top: 2rem;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Header & footer ---------- */

.unstuck-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--linen);
}

.unstuck-header .wp-block-button__link {
	font-size: 0.9375rem;
	padding: 0.55rem 1.1rem;
	background: var(--wp--preset--color--clay);
}

.unstuck-header .wp-block-button__link:hover {
	background: var(--wp--preset--color--charcoal);
}

.unstuck-tagline {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.unstuck-footer {
	background: var(--wp--preset--color--charcoal);
	color: #EDE7DC;
}

.unstuck-footer a {
	color: #EDE7DC;
}

.unstuck-footer a:hover {
	color: var(--wp--preset--color--sage-soft);
}

.unstuck-footer .wp-block-site-title a {
	color: #EDE7DC;
}

.unstuck-footer .wp-block-list {
	list-style: none;
	padding-left: 0;
}

.unstuck-footer-rule {
	border-color: #4A4741 !important;
	opacity: 1;
}

.unstuck-footer .unstuck-disclaimer {
	color: #BDB5A8;
	font-size: var(--wp--preset--font-size--small);
	max-width: 62ch;
	margin-left: 0 !important;
}

/* ---------- Small label above boxes ---------- */

.unstuck-label {
	font-size: 0.8125rem !important;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 0.25rem !important;
	color: var(--wp--preset--color--sage-deep);
}

/* ---------- Quick-Win Box ---------- */

.is-style-quick-win {
	background: var(--wp--preset--color--sage-soft);
	border-left: 5px solid var(--wp--preset--color--sage-deep);
	border-radius: var(--unstuck-radius-small);
	padding: 1.25rem 1.5rem !important;
}

.is-style-quick-win ol,
.is-style-quick-win ul {
	margin: 0.25rem 0 0;
	padding-left: 1.25rem;
}

.is-style-quick-win li + li {
	margin-top: 0.3rem;
}

/* ---------- Battery Check ---------- */

.is-style-battery {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--unstuck-radius);
	padding: 1.5rem !important;
}

.is-style-battery .wp-block-columns {
	gap: 1.25rem;
	margin-bottom: 0;
}

.is-style-battery .wp-block-column {
	position: relative;
	font-size: 1rem;
	line-height: 1.55;
}

.is-style-battery .wp-block-column p {
	margin: 0.35rem 0 0;
}

.is-style-battery .battery-10,
.is-style-battery .battery-50,
.is-style-battery .battery-100 {
	--level: 50%;
	--fill: var(--wp--preset--color--sage);
}

.is-style-battery .battery-10 { --level: 18%; --fill: var(--wp--preset--color--clay); }
.is-style-battery .battery-50 { --level: 55%; --fill: var(--wp--preset--color--sage); }
.is-style-battery .battery-100 { --level: 100%; --fill: var(--wp--preset--color--sage-deep); }

.is-style-battery .wp-block-column::before {
	content: "";
	display: block;
	width: 44px;
	height: 20px;
	box-sizing: border-box;
	border: 2px solid var(--wp--preset--color--charcoal);
	border-radius: 5px;
	padding: 2px;
	background: linear-gradient(90deg, var(--fill) 0 var(--level), transparent var(--level)) content-box;
	margin-bottom: 0.6rem;
}

.is-style-battery .wp-block-column::after {
	content: "";
	position: absolute;
	top: 6px;
	left: 44px;
	width: 4px;
	height: 8px;
	border-radius: 0 2px 2px 0;
	background: var(--wp--preset--color--charcoal);
}

/* ---------- Steps & Exit Door ---------- */

.is-style-exit-door {
	border: 2px dashed var(--wp--preset--color--sage);
	border-radius: var(--unstuck-radius-small);
	padding: 0.9rem 1.25rem !important;
	background: transparent;
}

.is-style-exit-door p {
	margin: 0;
}

.is-style-exit-door .unstuck-label {
	color: var(--wp--preset--color--clay);
}

/* ---------- Lead magnet CTA ---------- */

.is-style-cta-box {
	background: var(--wp--preset--color--clay-soft);
	border-radius: var(--unstuck-radius);
	padding: clamp(1.5rem, 4vw, 2.25rem) !important;
}

.is-style-cta-box h2,
.is-style-cta-box h3 {
	margin-top: 0 !important;
}

.is-style-cta-box .unstuck-label {
	color: var(--wp--preset--color--clay);
}

.is-style-cta-box .wp-block-button__link {
	background: var(--wp--preset--color--clay);
}

.is-style-cta-box .wp-block-button__link:hover {
	background: var(--wp--preset--color--charcoal);
}

.unstuck-fineprint {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small) !important;
}

/* ---------- Product cards (Gumroad + Amazon) ---------- */

.is-style-product-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--unstuck-radius);
	padding: 1.5rem !important;
	height: 100%;
}

.is-style-product-card h3 {
	margin-top: 0 !important;
}

.unstuck-price {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem !important;
	font-weight: 600;
	color: var(--wp--preset--color--sage-deep);
	margin: 0 !important;
}

.unstuck-free-alt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small) !important;
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 0.75rem;
}

.is-style-disclosure,
p.is-style-disclosure {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
}

/* ---------- Resource box (sensitive topics) ---------- */

.is-style-resource-box {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--sage);
	border-radius: var(--unstuck-radius);
	padding: 1.25rem 1.5rem !important;
	font-size: 1rem;
}

.is-style-resource-box p {
	margin: 0.4rem 0 0;
}

/* ---------- FAQ ---------- */

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 0.9rem 0;
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	list-style-position: inside;
}

.wp-block-details[open] summary {
	margin-bottom: 0.5rem;
}

/* ---------- Author box ---------- */

.is-style-author-box {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 1.5rem 0 !important;
	font-size: 1rem;
}

.is-style-author-box .wp-block-avatar img {
	border-radius: 999px;
}

/* ---------- Post meta ---------- */

.unstuck-meta {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.unstuck-meta p {
	margin: 0;
}

.unstuck-meta > * + *::before {
	content: "·";
	margin-right: 0.6rem;
	color: var(--wp--preset--color--sage);
}

/* ---------- Post cards (archives, home) ---------- */

.unstuck-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--unstuck-radius);
	overflow: hidden;
	height: 100%;
}

.unstuck-card .wp-block-post-featured-image {
	margin: 0;
}

.unstuck-card .wp-block-post-featured-image img {
	border-radius: 0;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.unstuck-card .unstuck-card-body {
	padding: 1.1rem 1.25rem 1.4rem !important;
}

.unstuck-card .wp-block-post-title {
	font-size: 1.3rem;
	margin: 0.35rem 0 0.5rem;
}

.unstuck-card .wp-block-post-excerpt {
	font-size: 1rem;
	color: var(--wp--preset--color--muted);
}

.unstuck-card .wp-block-post-excerpt__more-text {
	display: none;
}

/* ---------- Home: silos ---------- */

.unstuck-hero h1 {
	max-width: 18ch;
	margin-left: 0 !important;
}

.unstuck-hero .unstuck-hero-lede {
	font-size: var(--wp--preset--font-size--large);
	max-width: 40ch;
	margin-left: 0 !important;
	color: var(--wp--preset--color--muted);
}

.is-style-silo-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-top: 5px solid var(--wp--preset--color--sage);
	border-radius: var(--unstuck-radius);
	padding: 1.5rem !important;
	height: 100%;
}

.is-style-silo-card h3 {
	margin-top: 0 !important;
}

.is-style-silo-card .unstuck-label {
	color: var(--wp--preset--color--muted);
}

/* ---------- Landing page ---------- */

.unstuck-landing-checklist {
	list-style: none;
	padding-left: 0 !important;
}

.unstuck-landing-checklist li {
	padding-left: 2rem;
	position: relative;
	margin-bottom: 0.6rem;
}

.unstuck-landing-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 1.1rem;
	height: 1.1rem;
	border: 2px solid var(--wp--preset--color--sage-deep);
	border-radius: 4px;
}

.unstuck-form-slot {
	border: 2px dashed var(--wp--preset--color--clay);
	border-radius: var(--unstuck-radius-small);
	padding: 1rem 1.25rem !important;
	background: var(--wp--preset--color--surface);
}

/* ---------- Pinterest-friendly vertical images ---------- */

.wp-block-image.is-style-pin img {
	aspect-ratio: 2 / 3;
	object-fit: cover;
	max-width: 420px;
	margin-inline: auto;
	display: block;
}

/* ---------- Pagination ---------- */

.wp-block-query-pagination {
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
}
