/*
Theme Name: Faith Clinic
Theme URI: https://faithclinic.org
Author: Faith Clinic
Description: Block theme for faithclinic.org. Olive and gold, Young Serif headings, Figtree body text.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: faithclinic
*/

/* Dark mode: theme.json colors read these variables and fall back to the light values. */
@media (prefers-color-scheme: dark) {
	:root {
		--fc-bg: #14170F;
		--fc-surface: #1C2116;
		--fc-ink: #E9ECE0;
		--fc-muted: #A3AA94;
		--fc-line: #30372A;
		--fc-olive: #9FB27A;
		--fc-olive-soft: #262D1D;
		--fc-gold: #D9AE57;
		--fc-on-olive: #14170F;
		--fc-todo: #F0B97A;
		--fc-todo-bg: #3A2A17;
		color-scheme: dark;
	}
}

body {
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

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

:where(.wp-block-group) p {
	max-width: 65ch;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
}

/* Header */
.fc-header {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .fc-header {
	top: var(--wp-admin--admin-bar--height, 0px);
}
.fc-header .wp-block-site-title a {
	text-decoration: none;
}
.fc-header .wp-block-navigation-item__content {
	padding: 6px 10px;
	border-radius: 6px;
	font-weight: 500;
	opacity: .85;
	text-decoration: none;
}
.fc-header .wp-block-navigation-item__content:hover,
.fc-header .current-menu-item > .wp-block-navigation-item__content,
.fc-header [aria-current="page"] {
	opacity: 1;
	background: color-mix(in srgb, var(--wp--preset--color--on-olive) 16%, transparent);
}
.fc-header .fc-give > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--on-olive);
	opacity: 1;
	font-weight: 600;
}
.fc-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--olive) !important;
	color: var(--wp--preset--color--on-olive) !important;
	padding: 24px 16px;
}

/* Footer */
.fc-footer a {
	text-decoration: none;
}
.fc-footer a:hover {
	text-decoration: underline;
}
.fc-footer .fc-reg {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
}

/* Block styles (registered in functions.php) */
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .75rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}

.is-style-lead {
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--muted);
}

.wp-block-group.is-style-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	padding: 24px;
	min-width: 0;
}
.wp-block-group.is-style-card p:not(.is-style-eyebrow) {
	color: var(--wp--preset--color--muted);
}

.wp-block-group.is-style-band {
	background: var(--wp--preset--color--olive-soft);
	border-radius: 12px;
	padding: clamp(22px, 4vw, 32px);
}

.wp-block-group.is-style-slot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	padding: 16px 20px;
}
.wp-block-group.is-style-slot > :first-child {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.15rem;
	margin: 0;
}
.wp-block-group.is-style-slot > :last-child {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
	font-size: .9rem;
	color: var(--wp--preset--color--gold);
	margin: 0;
}

.wp-block-quote.is-style-verse {
	border-left: 3px solid var(--wp--preset--color--gold);
	padding: 8px 0 8px 20px;
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.2rem;
	color: var(--wp--preset--color--muted);
}
.wp-block-quote.is-style-verse cite {
	display: block;
	margin-top: 8px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: .8rem;
	font-style: normal;
	font-weight: 500;
	color: var(--wp--preset--color--gold);
}

.wp-block-table.is-style-facts table {
	border: 0;
	width: auto;
	font-size: .95rem;
}
.wp-block-table.is-style-facts td {
	border: 0;
	padding: 4px 20px 4px 0;
	vertical-align: top;
	font-variant-numeric: tabular-nums;
}
.wp-block-table.is-style-facts td:first-child {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .8rem;
	font-weight: 500;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	padding-top: 7px;
	white-space: nowrap;
}

/* Leader portraits inside cards */
.wp-block-image.fc-portrait {
	margin: 0;
}
.wp-block-image.fc-portrait img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Placeholder notes. functions.php removes these blocks from the production site. */
.is-style-todo {
	background: var(--wp--preset--color--todo-bg);
	color: var(--wp--preset--color--todo);
	border: 1px dashed var(--wp--preset--color--todo);
	border-radius: 8px;
	padding: 10px 14px;
	font-size: .9rem;
}
.is-style-todo::before {
	content: "Fill before launch";
	font-family: var(--wp--preset--font-family--mono);
	font-size: .75rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	font-weight: 700;
	margin-right: 6px;
}
.wp-block-group.is-style-todo {
	padding: 20px;
	font-size: inherit;
}
.wp-block-group.is-style-todo::before {
	display: block;
}
.wp-block-group.is-style-todo > p {
	font-size: .9rem;
}

/* Fluent Forms, matched to the theme */
.fluentform .ff-el-input--label label {
	font-weight: 600;
	font-size: .9rem;
	color: var(--wp--preset--color--ink);
}
.fluentform .ff-el-form-control {
	font: inherit;
	padding: 10px 12px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
}
.fluentform .ff-el-form-control:focus {
	border-color: var(--wp--preset--color--olive);
}
.fluentform .ff-el-tc label,
.fluentform .ff_t_c {
	font-size: .9rem;
	color: var(--wp--preset--color--muted);
}
.fluentform .ff-btn-submit {
	background: var(--wp--preset--color--olive) !important;
	color: var(--wp--preset--color--on-olive) !important;
	border: 1.5px solid var(--wp--preset--color--olive);
	border-radius: 8px;
	padding: 12px 20px;
	font: 600 1rem var(--wp--preset--font-family--body);
}
.fluentform .error,
.fluentform .text-danger {
	color: #A3261A;
}
.ff-message-success {
	background: var(--wp--preset--color--olive-soft);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	color: var(--wp--preset--color--ink);
	padding: 16px 20px;
	box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
	}
}
