/* The Communard — supplemental styles (design system beyond theme.json) */

:root {
	--communard-rule: var(--wp--preset--color--border, #D8D2C3);
	--communard-stripe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='16' viewBox='0 0 260 16'%3E%3Cg%3E%3Crect x='0' y='2' width='26' height='12' rx='2' fill='%237A1F2B'/%3E%3Crect x='32' y='2' width='18' height='12' rx='2' fill='%231C1B19'/%3E%3Crect x='56' y='2' width='14' height='12' rx='2' fill='%237A1F2B'/%3E%3Crect x='76' y='2' width='30' height='12' rx='2' fill='%234A4E4D'/%3E%3Crect x='112' y='2' width='24' height='12' rx='2' fill='%237A1F2B'/%3E%3Crect x='142' y='2' width='16' height='12' rx='2' fill='%231C1B19'/%3E%3Crect x='164' y='2' width='22' height='12' rx='2' fill='%234A4E4D'/%3E%3Crect x='192' y='2' width='20' height='12' rx='2' fill='%237A1F2B'/%3E%3Crect x='218' y='2' width='16' height='12' rx='2' fill='%231C1B19'/%3E%3Crect x='240' y='2' width='20' height='12' rx='2' fill='%234A4E4D'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Stripe device -------------------------------------------------- */
.communard-stripe {
	display: block;
	width: 260px;
	max-width: 60%;
	height: 16px;
	margin: 0.75rem auto;
	background: var(--communard-stripe) center / contain no-repeat;
}
.communard-stripe--left { margin-left: 0; margin-right: auto; }

/* ---- Masthead ------------------------------------------------------- */
.communard-masthead {
	text-align: center;
	padding-block: 1.5rem 0.75rem;
}
.communard-eyebrow {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.42em;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--maroon);
	margin: 0 0 0.35rem;
	padding-left: 0.42em;
}
.communard-rule--double {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--ink);
	border-bottom: 1px solid var(--wp--preset--color--ink);
	height: 4px;
	margin: 0.5rem auto;
	max-width: 100%;
}

/* Site title as wordmark */
.wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.wp-block-site-title { letter-spacing: 0.01em; }

/* ---- Navigation --------------------------------------------------- */
.wp-block-navigation {
	justify-content: center;
	column-gap: 1.75rem;
}
.wp-block-navigation .wp-block-navigation-item__content { text-decoration: none; padding-block: 0.5rem; }
.wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--maroon); }

/* ---- Section headers (archive / homepage modules) ----------------- */
.communard-section-head {
	text-align: center;
	margin-bottom: 1.5rem;
}
.communard-section-head .wp-block-heading,
.communard-section-head h2 {
	display: inline-block;
	font-size: 1.35rem;
	letter-spacing: 0.02em;
	margin: 0 0 0.25rem;
}
.communard-section-head::after {
	content: "";
	display: block;
	width: 180px;
	max-width: 70%;
	height: 12px;
	margin: 0.35rem auto 0;
	background: var(--communard-stripe) center / contain no-repeat;
}

/* Generic thin rule used between modules */
.communard-hr {
	border: 0;
	border-top: 1px solid var(--communard-rule);
	margin-block: 2.5rem;
}

/* ---- Breaking-news ticker ---------------------------------------- */
.communard-ticker {
	background: #1C1B19;
	color: #E8E2D3;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	display: flex;
	align-items: stretch;
	overflow: hidden;
	border-block: 1px solid #000;
}
.communard-ticker__flag {
	flex: 0 0 auto;
	background: #7A1F2B;
	color: #fff;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	display: flex;
	align-items: center;
	padding: 0.55rem 1rem;
	white-space: nowrap;
}
.communard-ticker__viewport { overflow: hidden; flex: 1 1 auto; position: relative; }
.communard-ticker__track {
	display: inline-flex;
	gap: 3rem;
	padding: 0.55rem 1.5rem;
	white-space: nowrap;
	animation: communard-ticker 38s linear infinite;
}
.communard-ticker:hover .communard-ticker__track,
.communard-ticker:focus-within .communard-ticker__track { animation-play-state: paused; }
.communard-ticker__track a { color: #E8E2D3; text-decoration: none; }
.communard-ticker__track a:hover { text-decoration: underline; }
@keyframes communard-ticker {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.communard-ticker__track { animation: none; white-space: normal; }
}

/* ---- Post meta / bylines ---------------------------------------- */
.communard-byline,
.wp-block-post-date,
.wp-block-post-author-name {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* ---- Editorial / Opinion treatment ----------------------------- */
.communard-label {
	display: inline-block;
	font-family: var(--wp--preset--font-family--sans);
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-weight: 600;
	font-size: 0.75rem;
	color: #fff;
	background: var(--wp--preset--color--maroon);
	padding: 0.25rem 0.6rem;
	margin-bottom: 0.75rem;
}
.communard-label--breaking { background: #A6231C; }
body.single-editorial .wp-block-post-title { font-style: normal; }
body.single-editorial .entry-content,
body.postid-editorial .entry-content { }
.communard-editorial-note {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
	border-left: 3px solid var(--wp--preset--color--maroon);
	padding-left: 1rem;
	margin-block: 1.5rem;
}

/* ---- Article body ---------------------------------------------- */
.wp-block-post-content { font-size: var(--wp--preset--font-size--medium); }
.wp-block-post-content p { max-width: 68ch; }
figure.wp-block-image figcaption { font-family: var(--wp--preset--font-family--sans); font-size: 0.8125rem; color: var(--wp--preset--color--muted); }
.wp-block-pullquote { border-left: 0; border-right: 0; padding: 1.5rem 0; }
.wp-block-pullquote p { font-size: 1.5rem; line-height: 1.3; }

/* ---- Story cards --------------------------------------------- */
.communard-card .wp-block-post-title { font-size: 1.15rem; line-height: 1.2; margin-block: 0.4rem; }
.communard-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.communard-card .wp-block-post-title a:hover { color: var(--wp--preset--color--maroon); }
.communard-lead .wp-block-post-title { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.communard-lead .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }

/* ---- Footer -------------------------------------------------- */
.communard-footer {
	background: #1C1B19;
	color: #E8E2D3;
	margin-top: 3rem;
}
.communard-footer a { color: #E8E2D3; }
.communard-footer .wp-block-heading { color: #E8E2D3 !important; }
.communard-colophon {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	color: #b7b0a1;
	text-align: center;
}

/* ---- Dark mode -------------------------------------------------- */
@media (prefers-color-scheme: dark) {
	:root {
		--wp--preset--color--page: #1C1B19;
		--wp--preset--color--surface: #26241f;
		--wp--preset--color--ink: #E8E2D3;
		--wp--preset--color--muted: #a9a291;
		--wp--preset--color--maroon: #A6414B;
		--wp--preset--color--maroon-dark: #c26770;
		--wp--preset--color--border: #3a3730;
		--communard-rule: #3a3730;
	}
	body { background: #1C1B19; color: #E8E2D3; }
	.communard-card .wp-block-post-title a,
	.communard-lead .wp-block-post-title a,
	.wp-block-site-title a { color: #E8E2D3; }
	.communard-rule--double { border-color: #E8E2D3; }
}

/* ---- Suppress leftover storefront chrome ---------------------- */
/* The site was scaffolded with WooCommerce / GiveWP demo content.
   Until those plugins are removed, hide the widgets they inject. */
.wc-block-mini-cart,
.wp-block-woocommerce-mini-cart,
.wp-block-woocommerce-customer-account,
.wc-block-customer-account,
.woocommerce-store-notice,
.wp-block-woocommerce-cart,
p.demo_store { display: none !important; }

/* ---- Lead story ---------------------------------------------- */
.communard-lead .wp-block-post-title { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; margin-block: 0.5rem; }
.communard-lead .wp-block-post-excerpt { max-width: 46ch; margin-inline: auto; }
.communard-lead .communard-byline { margin-top: 0.6rem; }

/* ---- Responsive ---------------------------------------------- */
@media (max-width: 600px) {
	.communard-eyebrow { letter-spacing: 0.3em; }
	.communard-ticker__flag { padding: 0.5rem 0.7rem; }
}
