/*
Theme Name: Kindred
Theme URI: https://tenfoldthemes.example/kindred
Author: Tenfold Themes
Author URI: https://tenfoldthemes.example
Description: A warm, hand-stitched block theme for nonprofits, foundations and community charities — patchwork-quilt hero art, honey impact meters, donation and volunteer CTAs, transparency and program sections, 17 patterns, four full-page layouts, a Candlelight dark style and locally hosted Gelasio & Nunito Sans fonts.
Requires at least: 6.6
Tested up to: 6.8
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: kindred
Tags: block-theme, full-site-editing, block-patterns, block-styles, custom-colors, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks, one-column, education, entertainment, blog
*/

/* ---------------------------------------------------------------------------
 * Focus visibility & motion
 * ------------------------------------------------------------------------- */

:where(a, button, input, summary, textarea, select, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 6px;
}

::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

a,
.wp-block-button__link,
.wp-element-button {
	transition: var(--wp--custom--transition);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------------------------------------------------------------------------
 * Block style: Group — Quilt Patch card / Patch card (hover lift)
 * A soft rounded patch with a stitched hairline border, like a fabric square
 * sewn onto the page.
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-patch,
.wp-block-group.is-style-patch-hover {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--m);
	box-shadow: var(--wp--preset--shadow--card);
	padding: var(--wp--preset--spacing--40);
}

.wp-block-group.is-style-patch-hover {
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.wp-block-group.is-style-patch-hover:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--lift);
	transform: translateY(-4px);
}

/* Stitched patch: a dashed honey top-stitch inset inside the patch edge. */
.wp-block-group.is-style-stitched {
	position: relative;
	background: var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius--m);
	padding: var(--wp--preset--spacing--40);
}

.wp-block-group.is-style-stitched::before {
	content: "";
	position: absolute;
	inset: 7px;
	border: 2px dashed var(--wp--preset--color--accent);
	border-radius: calc(var(--wp--custom--radius--m) - 4px);
	pointer-events: none;
	opacity: 0.85;
}

/* ---------------------------------------------------------------------------
 * Block style: List — Stitched checks
 * Each item begins with a raspberry needle-and-thread tick.
 * ------------------------------------------------------------------------- */

ul.is-style-stitches {
	list-style: none;
	padding-left: 0;
}

ul.is-style-stitches > li {
	padding-left: 2em;
	position: relative;
	margin-bottom: 0.6em;
}

ul.is-style-stitches > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.12em;
	width: 1.3em;
	height: 1.3em;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="3 2.4" d="M4 12.5l4.5 4.5L20 6"/></svg>') center / contain no-repeat;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="3 2.4" d="M4 12.5l4.5 4.5L20 6"/></svg>') center / contain no-repeat;
}

/* ---------------------------------------------------------------------------
 * Block style: Paragraph — Eyebrow
 * Community-log label: uppercase Nunito Sans with a honey stitch-dash prefix.
 * ------------------------------------------------------------------------- */

p.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

p.is-style-eyebrow::before {
	content: "";
	display: inline-block;
	width: 1.6em;
	height: 0;
	margin-right: 0.7em;
	vertical-align: 0.28em;
	border-top: 3px dashed var(--wp--preset--color--accent);
}

/* On dark cocoa bands the eyebrow reads in honey. */
.has-contrast-background-color p.is-style-eyebrow,
.is-style-eyebrow.has-accent-color {
	color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------------------
 * Block style: Separator — Stitch rule
 * A short honey running-stitch dashed rule.
 * ------------------------------------------------------------------------- */

hr.wp-block-separator.is-style-stitch-rule {
	border: none;
	height: 0;
	width: 84px;
	max-width: 84px;
	border-top: 3px dashed var(--wp--preset--color--accent);
	background: none;
	opacity: 1;
}

/* ---------------------------------------------------------------------------
 * Honey impact meter — a stitched progress bar (used in impact sections)
 * ------------------------------------------------------------------------- */

.wp-block-group.kindred-meter {
	background: var(--wp--preset--color--tint);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--full);
	overflow: hidden;
	min-height: 18px;
}

.wp-block-columns.kindred-meter {
	background: var(--wp--preset--color--tint);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--full);
	overflow: hidden;
	min-height: 20px;
	margin-block: 0;
}

.wp-block-columns.kindred-meter .kindred-meter-fill {
	position: relative;
	background: var(--wp--preset--color--accent);
	border-radius: var(--wp--custom--radius--full);
}

.wp-block-columns.kindred-meter .kindred-meter-fill::after {
	content: "";
	position: absolute;
	left: 10px;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	border-top: 2px dashed var(--wp--preset--color--contrast);
	opacity: 0.35;
}

/* ---------------------------------------------------------------------------
 * Details / FAQ affordance
 * ------------------------------------------------------------------------- */

.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.4em;
	font-weight: 600;
	line-height: 1;
	color: var(--wp--preset--color--primary);
	transition: transform 0.2s ease;
}

.wp-block-details[open] summary::after {
	content: "−";
}

.wp-block-details > :not(summary) {
	font-weight: 400;
	color: var(--wp--preset--color--contrast-2);
}

/* ---------------------------------------------------------------------------
 * Tables — transparency & schedule charts
 * ------------------------------------------------------------------------- */

.wp-block-table thead {
	border-bottom: 2px solid var(--wp--preset--color--contrast);
}

.wp-block-table th {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 0.8125rem;
}

.wp-block-table td {
	border-color: var(--wp--preset--color--border);
}

/* ---------------------------------------------------------------------------
 * Small refinements
 * ------------------------------------------------------------------------- */

.wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 2px;
}

.wp-block-image img {
	height: auto;
	max-width: 100%;
}
