/* ==========================================================
   FastDemocracy Hub: theme styles
   (colors, fonts, sizes and base elements live in theme.json)
   ========================================================== */

:root {
	--fd-radius-card: 16px;
	--fd-shadow-card: 0 12px 28px rgba(50, 74, 94, 0.12);
	--fd-shadow-soft: 0 6px 18px rgba(50, 74, 94, 0.08);
	--fd-muted: #66737e;
}

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

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--navy);
	outline-offset: 2px;
}
:where(.has-navy-background-color, .has-navy-deep-background-color) :where(a, button):focus-visible {
	outline-color: var(--wp--preset--color--yellow);
}

h1, h2, h3, h4 { text-wrap: balance; }

/* ---------- Block style: Eyebrow (paragraph) ---------- */
.is-style-fd-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.75rem !important;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--wp--preset--color--navy);
}
.is-style-fd-eyebrow::before {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background: var(--wp--preset--color--yellow);
}
.is-style-fd-eyebrow.has-text-align-center { justify-content: center; }
:where(.has-navy-background-color, .has-navy-deep-background-color) .is-style-fd-eyebrow {
	color: var(--wp--preset--color--yellow);
}

/* ---------- Block style: Lede (paragraph) ---------- */
.is-style-fd-lede {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

/* ---------- Block style: Card (group) ---------- */
.is-style-fd-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: var(--fd-radius-card);
	padding: 1.75rem 1.625rem 1.875rem;
	color: var(--wp--preset--color--slate);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.is-style-fd-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--fd-shadow-card);
}
.is-style-fd-card.has-navy-background-color {
	border-color: var(--wp--preset--color--navy);
	color: rgba(255, 255, 255, 0.86);
}
.is-style-fd-card.has-navy-background-color :where(h1, h2, h3, h4) { color: #fff; }

/* ---------- Block style: Callout (group) ---------- */
.is-style-fd-callout {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--grey);
	border-left: 6px solid var(--wp--preset--color--yellow);
	border-radius: 18px;
	box-shadow: 0 14px 34px rgba(50, 74, 94, 0.08);
	padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.75rem);
}

/* ---------- Block style: Rounded panel (group) ---------- */
.is-style-fd-panel {
	border-radius: 24px;
	padding: clamp(2rem, 5vw, 3.5rem);
}

/* ---------- Block styles: Buttons ---------- */
.wp-block-button.is-style-fd-ghost .wp-block-button__link {
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}
.wp-block-button.is-style-fd-ghost .wp-block-button__link:hover {
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 2px #fff;
}
.wp-block-button.is-style-fd-navy .wp-block-button__link {
	background: var(--wp--preset--color--navy);
	color: #fff;
}
.wp-block-button.is-style-fd-navy .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy-deep);
	color: #fff;
}
.wp-block-button__link {
	transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button:not([class*="is-style-fd-"]) .wp-block-button__link {
	box-shadow: 0 6px 18px rgba(240, 196, 32, 0.3);
}

/* ---------- Block style: Checklist (list) ---------- */
ul.is-style-fd-checklist {
	list-style: none;
	padding-left: 0;
}
ul.is-style-fd-checklist li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.6rem;
}
ul.is-style-fd-checklist li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0.1em;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 50%;
	background: var(--wp--preset--color--blue);
	color: var(--wp--preset--color--navy);
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1.35rem;
	text-align: center;
}

/* ---------- Block style: Rounded image ---------- */
.is-style-fd-rounded img {
	border-radius: var(--fd-radius-card);
	box-shadow: var(--fd-shadow-card);
}

/* ==========================================================
   Header
   ========================================================== */
/* The template-part wrapper (<header class="fd-header-wrap">) is what sticks. */
.fd-header-wrap {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .fd-header-wrap { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) {
	.admin-bar .fd-header-wrap { top: 0; }
}
.fd-header {
	border-bottom: 1px solid var(--wp--preset--color--mist);
	/* Solid, no backdrop-filter: a filter here would trap the full-screen mobile menu inside the header. */
	background: var(--wp--preset--color--white);
}
.fd-brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
}
.fd-brand img {
	width: 40px;
	height: 40px;
	display: block;
}
.fd-brand span {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 800;
	font-size: 1.2rem;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--navy);
}
.fd-header .wp-block-navigation-item__content {
	color: var(--wp--preset--color--ink);
	padding-block: 0.4rem;
	border-bottom: 2px solid transparent;
}
.fd-header .wp-block-navigation-item__content:hover,
.fd-header .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--yellow);
}
.fd-header .wp-block-button__link {
	padding: 0.7rem 1.25rem;
	font-size: 0.875rem;
	box-shadow: none !important;
}
/* Mobile menu overlay */
.fd-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--navy) !important;
	color: #fff !important;
	padding: 1.5rem clamp(1rem, 4vw, 2rem);
}
.fd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: #fff;
	font-size: 1.25rem;
	padding-block: 0.5rem;
}
.fd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	color: #fff;
}
.fd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.fd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important;
	gap: 0.75rem;
	padding-top: 2.5rem;
}
@media (max-width: 781px) {
	.fd-header .fd-header-cta { display: none; }
}

/* ==========================================================
   Footer (mirrors fastdemocracy.com)
   ========================================================== */
.fd-footer {
	color: rgba(255, 255, 255, 0.86);
}
.fd-footer a {
	color: #fff;
	text-decoration: none;
}
.fd-footer a:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--yellow);
	text-underline-offset: 3px;
}
.fd-footer .fd-footer-heading {
	color: var(--wp--preset--color--yellow);
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 600;
	font-size: 1rem;
	margin-bottom: 0.25rem;
}
.fd-footer .fd-footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
}
.fd-footer .fd-footer-links li { margin: 0 0 0.35rem; }
.fd-footer .fd-footer-company {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 600;
	font-size: 1.5rem;
	color: #fff;
	letter-spacing: -0.01em;
	line-height: 1.2;
}
.fd-footer .fd-footer-logo img {
	width: 64px;
	height: 64px;
}
.fd-footer .wp-block-social-links .wp-social-link {
	background: transparent !important;
	color: #fff !important;
}
.fd-footer .wp-block-social-links .wp-social-link svg {
	width: 26px;
	height: 26px;
}
.fd-footer .fd-footer-legal {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================
   Hero band (navy) and section bands
   ========================================================== */
.fd-hero {
	background:
		radial-gradient(900px 420px at 85% -10%, rgba(168, 205, 238, 0.28), transparent 60%),
		radial-gradient(600px 300px at -5% 110%, rgba(240, 196, 32, 0.14), transparent 60%),
		var(--wp--preset--color--navy) !important;
	color: rgba(255, 255, 255, 0.86);
	overflow: hidden;
}
.fd-hero :where(h1, h2, h3) { color: #fff; }
.fd-hero .is-style-fd-lede { color: rgba(255, 255, 255, 0.86); }
.fd-cta-band {
	background:
		radial-gradient(700px 320px at 50% 120%, rgba(240, 196, 32, 0.18), transparent 65%),
		var(--wp--preset--color--navy) !important;
	color: rgba(255, 255, 255, 0.84);
}
.fd-cta-band :where(h1, h2, h3) { color: #fff; }

/* Section header row: heading on the left, "View all" link on the right */
.fd-section-head {
	align-items: flex-end !important;
}
.fd-view-all a {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
	font-size: 0.9375rem;
	text-decoration: none;
	white-space: nowrap;
}
.fd-view-all a::after { content: " →"; }

/* ==========================================================
   Post cards (Query Loop)
   ========================================================== */
.fd-cards .wp-block-post {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: var(--fd-radius-card);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fd-cards .wp-block-post:hover {
	transform: translateY(-2px);
	box-shadow: var(--fd-shadow-card);
}
.fd-cards .wp-block-post-featured-image {
	margin: 0;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--mist);
}
.fd-cards .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.fd-card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1.375rem 1.5rem 1.5rem;
}
.fd-card-body .wp-block-post-title {
	font-size: 1.1875rem;
	line-height: 1.3;
	letter-spacing: -0.01em;
}
.fd-card-body .wp-block-post-excerpt__excerpt { margin: 0; }
.fd-card-body .wp-block-read-more,
.fd-card-body .wp-block-post-excerpt__more-text { margin-top: auto; }
.fd-card-body .wp-block-read-more::after { content: " →"; }
/* Cards on navy backgrounds keep their white surface */
.fd-cards .wp-block-post :where(h2, h3) { color: var(--wp--preset--color--ink); }

.wp-block-query-no-results { color: var(--fd-muted); }

/* Pagination */
.wp-block-query-pagination {
	gap: 0.5rem;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 600;
	font-size: 0.9375rem;
}
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	text-decoration: none;
	padding: 0.4rem 0.75rem;
	border-radius: 8px;
}
.wp-block-query-pagination .page-numbers.current {
	background: var(--wp--preset--color--navy);
	color: #fff;
}
.wp-block-query-pagination a:hover { background: var(--wp--preset--color--mist); }

/* ==========================================================
   Articles (blog posts, news, case studies)
   ========================================================== */
.fd-article .wp-block-post-content > * + * { margin-block-start: 1.25em; }
.fd-article .wp-block-post-content :where(h2) { font-size: var(--wp--preset--font-size--x-large); margin-block-start: 2em; }
.fd-article .wp-block-post-content :where(h3) { font-size: var(--wp--preset--font-size--large); margin-block-start: 1.75em; }
.fd-article .wp-block-post-content img { border-radius: 12px; }
.fd-article .wp-block-post-content a { text-underline-offset: 2px; }
.fd-meta {
	color: var(--fd-muted);
	font-size: 0.9375rem;
}
.fd-meta > * + *::before {
	content: "·";
	margin-right: 0.5rem;
	color: var(--wp--preset--color--grey);
}

/* ==========================================================
   Gated content
   ========================================================== */
.fd-form-card {
	background: var(--wp--preset--color--white);
	border-radius: 18px;
	box-shadow: var(--fd-shadow-card);
	border: 1px solid var(--wp--preset--color--grey);
	padding: clamp(1.5rem, 4vw, 2.25rem);
	color: var(--wp--preset--color--slate);
}
.fd-form-card :where(h2, h3) { color: var(--wp--preset--color--ink); }
.fd-form-placeholder {
	border: 2px dashed var(--wp--preset--color--grey);
	border-radius: 12px;
	padding: 1.5rem;
	text-align: center;
	color: var(--fd-muted);
	font-size: 0.9375rem;
}
.fd-lock-note {
	font-size: 0.8125rem;
	color: var(--fd-muted);
}

/* Light-touch styling for embedded HubSpot forms so they match the brand */
.fd-form-card .hs-form fieldset { max-width: none !important; }
.fd-form-card .hs-form .hs-form-field { margin-bottom: 1rem; }
.fd-form-card .hs-form label {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}
.fd-form-card .hs-form .hs-input:not([type="checkbox"]):not([type="radio"]) {
	width: 100% !important;
	box-sizing: border-box;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: 10px;
	font: inherit;
	background: #fff;
}
.fd-form-card .hs-form .hs-input:focus {
	outline: 2px solid var(--wp--preset--color--navy);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--navy);
}
.fd-form-card .hs-form .hs-button {
	width: 100%;
	padding: 0.95rem 1.75rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--navy-deep);
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
	font-size: 0.9375rem;
	cursor: pointer;
}
.fd-form-card .hs-form .hs-button:hover { background: #f5d24a; }
.fd-form-card .hs-error-msgs { list-style: none; padding: 0; margin: 0.35rem 0 0; color: #b3261e; font-size: 0.8125rem; }

/* ==========================================================
   Misc
   ========================================================== */
.wp-site-blocks { overflow-x: clip; }
.fd-muted { color: var(--fd-muted); }
.fd-404-code {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 800;
	font-size: clamp(5rem, 16vw, 9rem);
	line-height: 1;
	color: var(--wp--preset--color--blue);
	letter-spacing: -0.04em;
}

/* ==========================================================
   Layout fixes
   ========================================================== */
/* Header, content and footer sit flush (WordPress adds a gap by default). */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Card grids: 3 → 2 → 1 columns */
@media (max-width: 1000px) {
	.fd-cards .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.fd-cards .wp-block-post-template.is-layout-grid,
	.fd-news-list .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr; }
}
.fd-news-list .wp-block-post-date { margin: 0; }
.fd-news-list .wp-block-post-title { margin: 0; }
