/*
Theme Name: Field and Vine
Theme URI: https://field-vine.com/
Author: Field and Vine
Author URI: https://field-vine.com/
Description: Block theme for field-vine.com. It carries the Screen Brand Standards and the Website Design Standards: the brand palette, Newsreader and Manrope served from the theme, the header, the charcoal footer, the components and the site's page patterns.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
Version: 0.17.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: field-and-vine
*/

/*
 * The design tokens (colors, type, spacing, widths) live in theme.json. This
 * stylesheet holds what theme.json cannot express: states, components and
 * the page patterns' layouts. Colors and sizes come from the presets.
 */

:root {
	--fv-ivory: var(--wp--preset--color--ivory);
	--fv-warm-ivory: var(--wp--preset--color--warm-ivory);
	--fv-white: var(--wp--preset--color--white);
	--fv-charcoal: var(--wp--preset--color--charcoal);
	--fv-bronze: var(--wp--preset--color--bronze);
	--fv-deep-bronze: var(--wp--preset--color--deep-bronze);
	--fv-light-sage: var(--wp--preset--color--light-sage);
	--fv-light-bronze: var(--wp--preset--color--light-bronze);
	--fv-hover-charcoal: var(--wp--preset--color--hover-charcoal);
	--fv-field-border: var(--wp--preset--color--field-border);
	--fv-rule: var(--wp--custom--rule);
	--fv-rule-dark: var(--wp--custom--rule-on-charcoal);
	--fv-radius: var(--wp--custom--radius);
	/* Card padding: 24px on phones, growing with screen width to 40px on wide screens. */
	--fv-card-pad: var(--wp--custom--card-padding);
	--fv-s1: var(--wp--preset--spacing--10);
	--fv-s2: var(--wp--preset--spacing--20);
	--fv-s3: var(--wp--preset--spacing--30);
	--fv-s4: var(--wp--preset--spacing--40);
	--fv-s5: var(--wp--preset--spacing--50);
	--fv-section: var(--wp--preset--spacing--section);
	--fv-sans: var(--wp--preset--font-family--manrope);
	--fv-serif: var(--wp--preset--font-family--newsreader-headings);

	/* Colors that change on charcoal; see .has-charcoal-background-color. */
	--fv-label: var(--fv-deep-bronze);
	--fv-accent: var(--fv-bronze);
	--fv-focus: var(--fv-charcoal);
	--fv-divider: var(--fv-rule);
}

/*
 * The content's edge: where the content, up to 1200px wide, starts inside the
 * page's side margins, measured from the side of the full-width element that
 * uses it. The header's logo and Contact button and Home's opening panel sit
 * on it, so they share one left edge with every section. It is set on the
 * body, where WordPress sets the content width and side margins it uses.
 */
body {
	--fv-content-edge: max(var(--wp--style--root--padding-left), calc((100% - var(--wp--style--global--content-size)) / 2));
}

.has-charcoal-background-color {
	--fv-label: var(--fv-light-sage);
	--fv-accent: var(--fv-light-bronze);
	--fv-focus: var(--fv-light-sage);
	--fv-divider: var(--fv-rule-dark);
}

body {
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

/* The header, page and footer meet without gaps; sections set their own spacing. */
.wp-site-blocks > * {
	margin-block: 0;
}

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

p, figcaption, blockquote {
	text-wrap: pretty;
}

img {
	max-width: 100%;
	height: auto;
}

/*
 * The patterns' containers lay their children out with their own gaps, so
 * WordPress's flow-layout margins between children are removed here, with
 * enough weight to apply in the editor too. Rules further down that add a
 * margin to a particular child use at least the same weight.
 */
:root :is(.fv-grid-3, .fv-cards, .fv-card-set, .fv-listings, .fv-feature, .fv-stack, .fv-panel, .fv-panel-text, .fv-panel-item, .fv-places, .fv-stages, .fv-stage, .fv-split, .fv-split-text, .fv-story, .fv-story-text, .fv-story-part, .fv-facts, .fv-fact, .fv-contact, .fv-contact-details, .fv-detail, .fv-card-body, .is-style-fv-card, .fv-point, .fv-head, .fv-head-title, .fv-intro-row, .fv-invitation-card, .fv-opening, .fv-opening-panel, .fv-strip-items, .fv-strip-item, .fv-footer-columns, .fv-footer-columns > *, .fv-footer-group, .fv-footer-base, .fv-header-bar, .fv-header-tools, .fv-link-row) > * {
	margin-block: 0;
}

/* ---------- States: focus, links and hover ---------- */

:where(.wp-site-blocks) :focus-visible {
	outline: 2px solid var(--fv-focus);
	outline-offset: 1px;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* A link within text is underlined in the text color at rest, and its underline turns bronze on hover. */
a:hover {
	text-decoration-color: var(--fv-accent);
}

/*
 * Links that sit without an underline gain it on hover, in bronze. The
 * underline is there at rest without color, so it can fade in.
 */
:is(.fv-header, .fv-footer, .is-style-fv-arrow, .fv-contact-details) a:not(.wp-element-button) {
	text-decoration-line: underline;
	text-decoration-color: transparent;
}

:is(.fv-header, .fv-footer, .is-style-fv-arrow, .fv-contact-details) a:not(.wp-element-button):hover {
	text-decoration-color: var(--fv-accent);
}

.fv-strip-link a,
.wp-block-post-title a,
.wp-block-heading a {
	text-decoration: none;
}

/* Text 24px and larger turns bronze on hover. */
.wp-block-heading a:hover,
.wp-block-post-title a:hover {
	color: var(--fv-accent);
}

/* Hover color changes fade over 250ms. Nothing moves for visitors who ask for reduced motion (see the end of this file). */
a,
.wp-element-button,
.wp-block-button__link,
.fluentform .ff-btn-submit,
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close,
.fv-viewer-button {
	transition: color 250ms, background-color 250ms, border-color 250ms, text-decoration-color 250ms;
}

/* ---------- Components: buttons ---------- */

.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--fv-charcoal);
	border: 1px solid var(--fv-charcoal);
	padding: 0 24px;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--fv-charcoal);
	color: var(--fv-ivory);
}

.has-charcoal-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	background: var(--fv-ivory);
	border-color: var(--fv-ivory);
	color: var(--fv-charcoal);
}

/* ---------- Components: form fields ---------- */

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
	font: 400 16px/1.4 var(--fv-sans);
	color: var(--fv-charcoal);
	background: var(--fv-white);
	border: 1px solid var(--fv-field-border);
	border-radius: var(--fv-radius);
	padding: 12px;
	min-height: 48px;
	box-sizing: border-box;
}

textarea {
	min-height: 140px;
	resize: vertical;
}

label {
	font: 500 13px/1.4 var(--fv-sans);
	letter-spacing: 0.04em;
	color: var(--fv-charcoal);
}

/* A field's label sits above it, 6px apart. */
label:has(+ input, + select, + textarea) {
	display: block;
	margin-bottom: 6px;
}

/*
 * The contact form, a Fluent Forms form set to "Inherit Theme Style". Fluent
 * Forms' own stylesheets don't load (see inc/forms.php), so these rules carry
 * the few layout rules of theirs the form uses as well as its look.
 */

/* Hidden parts: the spam trap, which people never see at any width, and what Fluent Forms hides while it works. */
.fluentform .ff-el-group.ff-hpsf-container,
.fluentform .ff-hidden,
.fluentform .ff_force_hide {
	display: none !important;
}

.ff-support-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fluentform .ff-el-group {
	margin: 0 0 var(--fv-s3);
}

/* The label sits above its field, 6px apart. */
.fluentform .ff-el-input--label {
	margin-bottom: 6px;
}

.fluentform .ff-el-input--label label {
	display: block;
}

.fluentform .ff-el-form-control {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
}

.fluentform select.ff-el-form-control {
	appearance: none;
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2349453F' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px 8px;
	cursor: pointer;
}

/*
 * A field with an error: a charcoal border, drawn 2px wide inside the field
 * so nothing moves, and its message below in charcoal after a warning mark,
 * so the error never rests on color alone. The Screen Brand Standards set no
 * error color, so errors use charcoal; the selector outweighs the base field
 * rule above for every kind of field.
 */
.fluentform .ff-el-group.ff-el-is-error .ff-el-input--content > .ff-el-form-control {
	border-color: var(--fv-charcoal);
	box-shadow: inset 0 0 0 1px var(--fv-charcoal);
}

.fluentform .error.text-danger {
	display: flex;
	align-items: flex-start;
	gap: var(--fv-s1);
	margin-top: 6px;
	font: 400 var(--wp--preset--font-size--small)/1.4 var(--fv-sans);
	color: var(--fv-charcoal);
}

.fluentform .error.text-danger::before {
	content: "!";
	content: "!" / "";
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--fv-charcoal);
	color: var(--fv-white);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

/* Errors that belong to the whole form, such as a failed send, gather below it. */
.ff-errors-in-stack {
	display: none;
	margin-top: var(--fv-s3);
}

.ff-errors-in-stack .error.text-danger + .error.text-danger {
	margin-top: var(--fv-s1);
}

.ff-errors-in-stack .error-clear {
	margin-left: auto;
	padding: 0 var(--fv-s1);
	cursor: pointer;
}

/* Send sits a step further below the last field; the gaps between groups collapse into it. */
.fluentform .ff_submit_btn_wrapper {
	margin: var(--fv-s4) 0 0;
}

/* Send: the filled button. */
.fluentform .ff-btn-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 24px;
	font: 500 16px/1 var(--fv-sans);
	color: var(--fv-ivory);
	background: var(--fv-charcoal);
	border: 1px solid var(--fv-charcoal);
	border-radius: var(--fv-radius);
	white-space: nowrap;
	cursor: pointer;
}

.fluentform .ff-btn-submit:hover {
	background: var(--fv-hover-charcoal);
	border-color: var(--fv-hover-charcoal);
	color: var(--fv-ivory);
}

.fluentform .ff-btn-submit.disabled,
.fluentform .ff-btn-submit.ff-working {
	opacity: 0.65;
	cursor: progress;
}

/* The confirmation that replaces the form once it is sent. */
.fluentform .ff-message-success {
	margin-top: var(--fv-s3);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.5;
	color: var(--fv-charcoal);
}

.fluentform .ff_force_hide + .ff-message-success {
	margin-top: 0;
}

.fluentform .ff-message-success > :first-child {
	margin-top: 0;
}

.fluentform .ff-message-success > :last-child {
	margin-bottom: 0;
}

/* ---------- Components: labels, arrow links, tags, numbers ---------- */

.is-style-fv-label,
:is(h1, h2, h3, h4, h5, h6).is-style-fv-label {
	font-family: var(--fv-sans);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fv-label);
}

.is-style-fv-arrow {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
}

/*
 * Tap target: the link's box is at least 44px tall at every width. Padding
 * makes up the difference to its lines and an equal negative margin takes it
 * back, so the link's text and everything around it stay where they were.
 */
.is-style-fv-arrow a {
	display: inline-block;
	padding-block: calc((44px - 1lh) / 2);
	margin-block: calc((1lh - 44px) / 2);
}

.is-style-fv-arrow a::after {
	content: "→";
	display: inline-block;
	margin-left: var(--fv-s1);
	color: var(--fv-accent);
}

.fv-tag {
	display: block;
	width: fit-content;
	align-self: flex-start;
	background: var(--fv-ivory);
	color: var(--fv-charcoal);
	border: 1px solid var(--fv-rule);
	border-radius: var(--fv-radius);
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	padding: 7px 10px;
	margin-block: 0;
	margin-inline: 0 !important;
}

/* A tag set directly in a section, such as a Project page's "Under construction", starts at the content width's edge, like the text around it. */
.is-layout-constrained > .fv-tag {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}

.fv-number {
	font-family: var(--fv-serif);
	font-size: 34px;
	line-height: 1;
	color: var(--fv-accent);
}

/* ---------- Components: cards ---------- */

.is-style-fv-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--fv-white);
	color: var(--fv-charcoal);
	border: 1px solid var(--wp--custom--card-border);
	border-radius: var(--fv-radius);
	overflow: hidden;
}

.is-style-fv-card > * {
	margin-block: 0;
}

.is-style-fv-card > .wp-block-image,
.is-style-fv-card > .wp-block-post-featured-image {
	margin: 0;
}

.is-style-fv-card > .wp-block-image img,
.is-style-fv-card > .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	border-radius: 0;
}

.is-style-fv-card > .fv-tag {
	position: absolute;
	left: 14px;
	top: 14px;
}

/*
 * Card text starts at the top of its body, so a row's labels and titles line
 * up and a longer title makes its card, and the row, taller. A card with no
 * photo yet, such as a planned home before its rendering, keeps an empty
 * space of the photo's shape, with its tag where a photo card's sits, so its
 * text lines up with the photo cards beside it. The contact form's card and
 * text cards, such as commercial work shown in text only, never have a
 * photo, so they keep no such space.
 */
.is-style-fv-card:not(.fv-form-card):not(.fv-text-card):not(:has(> .wp-block-image img, > .wp-block-post-featured-image img))::before {
	content: "";
	display: block;
	aspect-ratio: 4 / 3;
}

.fv-query-feature .fv-cards > li:not(:first-child) .is-style-fv-card:not(:has(> .wp-block-post-featured-image img))::before {
	aspect-ratio: 16 / 9;
}

.fv-query-feature .fv-cards > li:first-child .is-style-fv-card:not(:has(> .wp-block-post-featured-image img))::before {
	aspect-ratio: auto;
	flex: 1;
	min-height: 360px;
}

.fv-card-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
	padding: var(--fv-card-pad);
}

.fv-card-body > * {
	margin-block: 0;
}

.fv-card-body .is-style-fv-label {
	font-size: 12px;
}

.is-style-fv-card .wp-block-heading,
.is-style-fv-card .wp-block-post-title {
	font-size: var(--wp--preset--font-size--card-title);
	line-height: 1.25;
	margin: 0;
}

/*
 * A text card, such as commercial work shown in text only, takes the height
 * its row's photo cards set, and its text, shorter than they are, centers
 * vertically in it.
 */
.fv-text-card > .fv-card-body {
	justify-content: center;
}

/* The card's title link covers the card, so the whole card is one link. */
.is-style-fv-card :is(.wp-block-heading, .wp-block-post-title) a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.is-style-fv-card:has(:is(.wp-block-heading, .wp-block-post-title) a):hover :is(.wp-block-heading, .wp-block-post-title) a {
	color: var(--fv-bronze);
}

.is-style-fv-card:has(:is(.wp-block-heading, .wp-block-post-title) a:focus-visible) {
	outline: 2px solid var(--fv-focus);
	outline-offset: 1px;
}

.is-style-fv-card :is(.wp-block-heading, .wp-block-post-title) a:focus-visible {
	outline: none;
}

.is-style-fv-card .wp-block-post-excerpt__excerpt,
.is-style-fv-card .wp-block-post-excerpt {
	margin: 0;
}

/* Numbered cards. */
.fv-point {
	background: var(--fv-ivory);
	border: 1px solid var(--fv-rule);
	border-radius: var(--fv-radius);
	padding: var(--fv-card-pad);
}

.fv-point > * {
	margin-block: 0;
}

/* A card's number sits above its title, set apart by space alone, with no divider between them. */
.fv-point > .fv-number {
	margin-top: 0;
	margin-bottom: var(--fv-s2);
}

.fv-point > .wp-block-heading {
	font-size: 22px;
	margin-bottom: var(--fv-s1);
}

.fv-point > .is-style-fv-arrow {
	margin-top: var(--fv-s2);
}

.has-warm-ivory-background-color .fv-point {
	background: var(--fv-ivory);
}

/* A numbered card is the card component: a white panel with the card border and a 24px title. */
.fv-point:has(> .fv-number):not(.fv-nothing-listed) {
	background: var(--fv-white);
	border-color: var(--wp--custom--card-border);
}

.fv-point:has(> .fv-number) > .wp-block-heading {
	font-size: 24px;
	line-height: 1.25;
}

/* The "Nothing listed that fits?" card is a text card: the card component's white panel and border. */
.fv-point.fv-nothing-listed {
	background: var(--fv-white);
	border-color: var(--wp--custom--card-border);
}

/* ---------- Layout: the page frame and sections ---------- */

.fv-main,
.fv-main > .wp-block-post-content,
.fv-main > * {
	margin-block: 0;
}

.fv-content > .fv-section,
.fv-content > .fv-opening,
.fv-content > .fv-strip,
.fv-main > .fv-section,
.fv-main > .wp-block-post-content > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

.fv-section {
	padding-block: var(--fv-section);
}

/* Neighboring sections on the same background share one gap. */
.fv-section:not(.has-background) + .fv-section:not(.has-background),
.fv-section.has-warm-ivory-background-color + .fv-section.has-warm-ivory-background-color,
.fv-section.has-charcoal-background-color + .fv-section.has-charcoal-background-color {
	padding-block-start: 0;
}

/* 40px separates a page's intro from the section that follows it, or from the band that starts it. */
.fv-intro {
	padding-block: var(--fv-s4);
}

/*
 * A page's intro followed directly by content, such as Our Work's gallery,
 * takes the section header's thin divider between them: 16px below the
 * intro's last line, with the content starting 24px below the divider, as
 * content does below a section header. A page that opens with a
 * photo-and-text split carrying its title, and Home, have no intro, so they
 * take none.
 */
.fv-intro.fv-section:has(+ .fv-section:not(.has-background)) {
	padding-block-end: var(--fv-s3);
}

.fv-intro.fv-section:has(+ .fv-section:not(.has-background)) > .fv-intro-row {
	padding-block-end: var(--fv-s2);
	border-bottom: 1px solid var(--fv-divider);
}

.fv-intro.fv-section + .fv-section:not(.has-background),
.fv-intro + .fv-content > .fv-section:first-child:not(.has-background) {
	padding-block-start: 0;
}

.fv-intro > .is-style-fv-label,
.fv-intro > .fv-tag {
	margin-block-end: var(--fv-s2);
}

.fv-intro-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fv-s3) var(--fv-s5);
	align-items: flex-end;
	justify-content: space-between;
}

.fv-intro-row > * {
	margin-block: 0;
}

.fv-intro-row > .wp-block-heading {
	max-width: 720px;
}

.fv-intro-line {
	max-width: 460px;
}

.fv-intro > * + * {
	margin-block-start: 0;
}

.fv-entry-intro .wp-block-post-title {
	margin: 0;
}

.fv-link-row {
	margin-block-start: var(--fv-s3);
	gap: var(--fv-s2) var(--fv-s4);
}

/*
 * In a page's intro, the heading and its line sit in the photo-and-text
 * split's two columns, the heading in the photo's and the line in the
 * text's, both lined up at the bottom. Where the split stacks, so does the intro.
 */
@media (min-width: 861px) {
	.fv-intro-row {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: var(--fv-s3) var(--fv-s5);
		align-items: end;
	}

	.fv-intro-row > .wp-block-heading,
	.fv-intro-line {
		max-width: none;
	}
}

/*
 * Section header: the numbered label and the heading on the left and the
 * short line, when there is one, on the right, lined up at the bottom, with a
 * thin divider between the row and the content below it. A long heading
 * wraps within its column rather than pushing the line below it. On tablets
 * and phones the line stacks below the heading.
 */
.fv-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
	gap: var(--fv-s2) var(--fv-s4);
	align-items: end;
	border-bottom: 1px solid var(--fv-divider);
	padding-bottom: var(--fv-s2);
	margin-block: 0 var(--fv-s3);
}

/* A header with nothing below it, such as Contact's "Where we build", draws no divider, and the section's own spacing follows it. */
.fv-head:last-child {
	margin-block-end: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.fv-head > *,
.fv-head-title > * {
	margin-block: 0;
}

.fv-head > .fv-head-title {
	grid-column: 1;
}

.fv-head > .fv-head-line {
	grid-column: 2;
}

.fv-head-title > .is-style-fv-label {
	margin-block-end: var(--fv-s2);
}

@media (max-width: 860px) {
	.fv-head {
		grid-template-columns: minmax(0, 1fr);
	}

	.fv-head > .fv-head-line {
		grid-column: 1;
		max-width: 420px;
	}
}

/*
 * When the content below runs as one vertical column of rows, such as the
 * numbered stages and the listing rows, the short line sits under the
 * heading at every width, close to the rows it introduces.
 */
.fv-head:has(+ :is(.fv-stages, .fv-listings)) {
	grid-template-columns: minmax(0, 1fr);
}

.fv-head:has(+ :is(.fv-stages, .fv-listings)) > .fv-head-line {
	grid-column: 1;
	max-width: 420px;
}

.fv-section > .is-style-fv-arrow {
	margin-block-start: var(--fv-s3);
}

/* Grids. Flow layout's gaps between children are replaced by the grid's. */
.fv-grid-3,
.fv-cards,
.fv-card-set {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--fv-s3);
	margin-block: 0;
	padding: 0;
	list-style: none;
}

.fv-grid-3 > *,
.fv-cards > *,
.fv-card-set > * {
	margin-block: 0;
}

.fv-cards > li {
	display: flex;
}

.fv-cards > li > .is-style-fv-card {
	flex: 1;
}

/*
 * A query's cards and the text cards after it share one grid, such as the
 * remodels band's cards and its commercial text card, and the listings and
 * the "Nothing listed that fits?" card.
 */
:is(.fv-card-set, .fv-listings) > .wp-block-query,
:is(.fv-card-set, .fv-listings) > .wp-block-query > .fv-cards {
	display: contents;
}

/*
 * Listing rows: one card to a row, its image down the left side and its text
 * on the right, with the "Nothing listed that fits?" text card as the last
 * row. Text shorter than the image centers vertically beside it; when the
 * text is taller, the image starts at the top of the row. On tablets and
 * phones the image stacks above the text.
 */
.fv-listings {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--fv-s3);
}

.fv-listings > * {
	margin-block: 0;
}

@media (min-width: 861px) {
	.fv-listings .is-style-fv-card {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		align-items: start;
	}

	.fv-listings .is-style-fv-card > .wp-block-post-featured-image,
	.fv-listings .is-style-fv-card::before {
		grid-column: 1;
		grid-row: 1;
	}

	.fv-listings .is-style-fv-card > .fv-card-body {
		grid-column: 2;
		grid-row: 1;
		align-self: center;
	}
}

/*
 * A listing with no image yet, such as lots not yet photographed, is a text
 * card taking its full row at every width: no empty image space, its type tag
 * above its text rather than over a photo. The :root on the space's rule
 * gives it the same weight as the general rule that keeps a photo-shaped
 * space in cards without a photo, so this later rule wins.
 */
.fv-listings .is-style-fv-card:not(:has(> .wp-block-post-featured-image img)) {
	display: flex;
	flex-direction: column;
}

:root .fv-listings .is-style-fv-card:not(:has(> .wp-block-post-featured-image img))::before {
	content: none;
}

:root .fv-listings .is-style-fv-card:not(:has(> .wp-block-post-featured-image img)) > .fv-tag {
	position: static;
	align-self: flex-start;
	margin-block: var(--fv-card-pad) 0;
	margin-inline: var(--fv-card-pad) 0 !important;
}

:root .fv-listings .is-style-fv-card:not(:has(> .wp-block-post-featured-image img)) > .fv-card-body {
	align-self: stretch;
}

:root .fv-listings .is-style-fv-card:not(:has(> .wp-block-post-featured-image img)) > .fv-tag + .fv-card-body {
	padding-block-start: var(--fv-s2);
}

.fv-query-grid,
.fv-query-feature + .fv-query-grid {
	margin-block-start: var(--fv-s3);
}

.fv-query-feature + .fv-query-grid:not(:has(li)) {
	display: none;
}

/* One large card beside two stacked cards. */
.fv-feature,
.fv-query-feature .fv-cards {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: var(--fv-s3);
}

.fv-feature > * {
	margin-block: 0;
}

.fv-stack {
	display: grid;
	gap: var(--fv-s3);
}

.fv-stack > * {
	margin-block: 0;
}

.fv-query-feature .fv-cards > li:first-child {
	grid-row: span 2;
}

/* The lead card's photo fills the height the two stacked cards set. */
.fv-card-lead > .wp-block-image,
.fv-query-feature .fv-cards > li:first-child .wp-block-post-featured-image {
	position: relative;
	flex: 1;
	min-height: 360px;
}

.fv-card-lead > .wp-block-image img,
.fv-query-feature .fv-cards > li:first-child .wp-block-post-featured-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	aspect-ratio: auto !important;
	object-fit: cover;
}

.fv-card-lead > .fv-card-body,
.fv-query-feature .fv-cards > li:first-child .fv-card-body {
	flex: 0;
}

.fv-query-feature .fv-cards > li:not(:first-child) .wp-block-post-featured-image img {
	aspect-ratio: 16 / 9 !important;
}

/*
 * A gallery of cards, such as Our Work's custom homes and Home's run of our
 * work, whose rows share one three-column grid. inc/card-gallery.php places
 * each card: a large card across two columns with two stacked cards in the
 * third, rows of three, and rows of two at the end. The grid has six tracks,
 * so a card takes two, a large card four and a card in a row of two three.
 * On tablets the cards run two to a row, with the first card, and a last
 * card left alone, across the row; on phones, one column.
 */
@media (min-width: 901px) {
	.fv-cards.fv-card-gallery {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.fv-card-gallery > li {
		grid-column: var(--fv-card-col, span 2);
		grid-row: var(--fv-card-row, auto);
	}

	/* The large card's photo fills the height its two stacked cards set. */
	.fv-card-gallery > .fv-card-large .wp-block-post-featured-image {
		position: relative;
		flex: 1;
		min-height: 360px;
	}

	.fv-card-gallery > .fv-card-large .wp-block-post-featured-image img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100% !important;
		aspect-ratio: auto !important;
		object-fit: cover;
	}

	.fv-card-gallery > .fv-card-large .fv-card-body {
		flex: 0;
	}

	.fv-card-gallery > .fv-card-large .is-style-fv-card:not(:has(> .wp-block-post-featured-image img))::before {
		aspect-ratio: auto;
		flex: 1;
		min-height: 360px;
	}

	.fv-card-gallery > .fv-card-stacked .wp-block-post-featured-image img {
		aspect-ratio: 16 / 9 !important;
	}

	.fv-card-gallery > .fv-card-stacked .is-style-fv-card:not(:has(> .wp-block-post-featured-image img))::before {
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 900px) {
	.fv-card-gallery > .fv-card-full-tablet {
		grid-column: 1 / -1;
	}

	.fv-card-gallery > .fv-card-full-tablet .wp-block-post-featured-image img {
		aspect-ratio: 16 / 9 !important;
	}

	.fv-card-gallery > .fv-card-full-tablet .is-style-fv-card:not(:has(> .wp-block-post-featured-image img))::before {
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 600px) {
	.fv-card-gallery > .fv-card-full-tablet .wp-block-post-featured-image img {
		aspect-ratio: 4 / 3 !important;
	}

	.fv-card-gallery > .fv-card-full-tablet .is-style-fv-card:not(:has(> .wp-block-post-featured-image img))::before {
		aspect-ratio: 4 / 3;
	}
}

/* Photo panel on charcoal. */
.fv-panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	border-radius: var(--fv-radius);
	overflow: hidden;
}

.fv-panel > * {
	margin-block: 0;
}

.fv-panel-photo {
	margin: 0;
}

.fv-panel-photo img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 380px;
	object-fit: cover;
	border-radius: 0;
}

.fv-panel-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--fv-s4);
	padding: var(--fv-s4) var(--fv-s5) var(--fv-s4) var(--fv-s4);
}

.fv-panel-text > * {
	margin-block: 0;
}

.fv-panel-item {
	display: flex;
	flex-direction: column;
	gap: var(--fv-s1);
}

.fv-panel-item > * {
	margin-block: 0;
}

.fv-panel-item > .is-style-fv-label {
	font-size: 12px;
	margin: 0;
}

.fv-places {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--fv-s3) var(--fv-s4);
}

.fv-places > .fv-panel-item {
	margin: 0;
	border-top: 1px solid var(--fv-rule-dark);
	padding-top: var(--fv-s2);
}

/*
 * Numbered stages on charcoal, one to a row: the number and title together in
 * a left column about a third of the content width, and the paragraph to the
 * right, at most 640px wide, with a divider between stages. The section
 * header's divider is the only line above the first stage, which starts the
 * usual 24px below it. Up to tablets the paragraph sits below the title.
 */
.fv-stages {
	display: grid;
	margin: 0;
}

.fv-stage {
	display: grid;
	grid-template-columns: 52px minmax(0, calc(100% / 3 - 52px - var(--fv-s3))) minmax(0, 640px);
	gap: var(--fv-s3);
	align-items: baseline;
	padding: var(--fv-s3) 0;
	border-top: 1px solid var(--fv-rule-dark);
	margin: 0;
}

.fv-stage:first-child {
	padding-top: 0;
	border-top: 0;
}

.fv-stage > * {
	margin: 0;
}

.fv-stage > .fv-number {
	font-size: 30px;
}

.fv-stage > .wp-block-heading {
	font-size: var(--wp--preset--font-size--card-title);
}

/* Photo-and-text split. */
.fv-split {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: var(--fv-s5);
	align-items: center;
}

.fv-split.fv-split-flip {
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.fv-split > * {
	margin: 0;
}

/* Text shorter than its photo is centered beside it; when the text is taller, the photo starts at the top of the row. */
.fv-split > .wp-block-image {
	align-self: start;
}

.fv-split img {
	display: block;
	width: 100%;
}

/*
 * A split that opens a page, with the page's main heading in its text, such
 * as Belle Meade's opening, sets its photo across two of the three columns
 * of the content grid and its text in the third, the columns and 24px gap
 * the card grids below it use, so the photo lines up with a gallery's large
 * card. The text keeps the split's usual 56px from the photo by starting
 * 32px into its column. The photo keeps its 3:2 frame and the split's
 * alignment. Where the content grid leaves three columns, at 900px and
 * narrower, the photo stacks above the text.
 */
@media (min-width: 901px) {
	:is(.fv-content, .fv-main) > .fv-section:first-child > .fv-split:has(> .fv-split-text > h1) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: var(--fv-s3);
	}

	:is(.fv-content, .fv-main) > .fv-section:first-child > .fv-split:has(> .fv-split-text > h1) > .wp-block-image {
		grid-column: span 2;
	}

	:is(.fv-content, .fv-main) > .fv-section:first-child > .fv-split:has(> .fv-split-text > h1) > .fv-split-text {
		padding-inline-start: calc(var(--fv-s5) - var(--fv-s3));
	}

	:is(.fv-content, .fv-main) > .fv-section:first-child > .fv-split:has(> .fv-split-text > h1).fv-split-flip > .fv-split-text {
		padding-inline: 0 calc(var(--fv-s5) - var(--fv-s3));
	}
}

@media (max-width: 900px) {
	:is(.fv-content, .fv-main) > .fv-section:first-child > .fv-split:has(> .fv-split-text > h1) {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--fv-s4);
	}

	:is(.fv-content, .fv-main) > .fv-section:first-child > .fv-split:has(> .fv-split-text > h1).fv-split-flip > .wp-block-image {
		order: -1;
	}
}

.fv-split-text,
.fv-story-text,
.fv-story-part {
	display: flex;
	flex-direction: column;
	gap: var(--fv-s3);
}

.fv-split-text > *,
.fv-story-text > *,
.fv-story-part > * {
	margin: 0;
}

.fv-split-text > .is-style-fv-label,
.fv-story-part > .is-style-fv-label {
	margin-block-end: calc(var(--fv-s2) - var(--fv-s3));
}

/*
 * Project and Listing pages: photos, facts and story. The gallery's first
 * photo leads, the facts row follows it, and the rest of the photos sit in
 * rows of two by their own shape (inc/galleries.php): landscape photos in
 * landscape slots and portrait photos in portrait slots.
 */
/*
 * Each photo's slot is its figure: the figure takes the slot's shape from
 * its width, and the photo, inside its button once assets/js/gallery.js
 * runs, fills it exactly. The photo is out of the flow, so its height never
 * depends on WordPress's rules for a cropped gallery's images (flex: 1 0 0%
 * and height: 100%), which a browser can resolve to a photo taller than its
 * slot, overlapping the row below, as Safari did on a phone held sideways.
 * Every row is exactly as tall as its slots, at every width.
 */
.fv-photo {
	position: relative;
	width: 100% !important;
	min-height: 0;
	margin: 0;
}

.fv-photo > img,
.fv-photo > .fv-photo-open,
.fv-photo > .fv-photo-open > img {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	margin: 0;
}

.fv-photo img {
	display: block;
	object-fit: cover;
	border-radius: var(--fv-radius);
}

.fv-slot-lead {
	aspect-ratio: 2 / 1;
}

.fv-slot-landscape {
	aspect-ratio: 4 / 3;
}

.fv-slot-portrait {
	aspect-ratio: 3 / 4;
}

.fv-slot-wide {
	aspect-ratio: 16 / 9;
}

/*
 * The gallery's rows stack in one column. WordPress sets a gallery to wrap,
 * and in a wrapping column each row's width is settled only after its
 * height, so a browser can size a row for a width it doesn't end up with.
 * One unwrapped column gives every row the gallery's full width first.
 */
.fv-gallery.wp-block-gallery {
	display: flex !important;
	flex-direction: column;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	gap: var(--fv-s2) !important;
	margin: 0;
}

.fv-entry-photos > .fv-gallery.wp-block-gallery {
	margin-block-start: var(--fv-s4);
}

.fv-gallery-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--fv-s2);
}

.fv-gallery.wp-block-gallery .fv-gallery-row > .wp-block-image {
	width: 100% !important;
	margin: 0 !important;
}

.fv-gallery-row-wide {
	grid-template-columns: minmax(0, 1fr);
}

/* A photo left without a partner of its shape, a portrait or a landscape too narrow to run full width, keeps its own slot, centered on the gallery's center line. */
.fv-gallery-row-single {
	grid-template-columns: minmax(0, 1fr);
	width: calc((100% - var(--fv-s2)) / 2);
	align-self: center;
}

/* An entry with no photos yet: no empty gallery, and the facts row follows its name. */
.fv-gallery.wp-block-gallery:not(:has(img)) {
	display: none !important;
}

.fv-entry-photos:not(:has(img)) > .fv-facts {
	margin-block-start: 0;
}

/* A gallery photo opens the larger view (assets/js/gallery.js). */
.fv-photo-open {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--fv-radius);
	background: none;
	color: inherit;
	font: inherit;
	cursor: zoom-in;
}

.fv-photo-open:focus-visible {
	outline: 2px solid var(--fv-focus);
	outline-offset: 1px;
}

/* A photo's caption, such as "Concept plan", is a tag on the photo: charcoal on ivory, whatever the photo behind it. */
.fv-entry-photos figure.fv-photo.wp-block-image > figcaption.wp-element-caption {
	position: absolute;
	top: 14px;
	left: 14px;
	right: auto;
	bottom: auto;
	box-sizing: border-box;
	width: fit-content;
	max-width: calc(100% - 28px);
	max-height: none;
	overflow: visible;
	margin: 0;
	padding: 7px 10px;
	background: var(--fv-ivory);
	color: var(--fv-charcoal);
	border: 1px solid var(--fv-rule);
	border-radius: var(--fv-radius);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	text-align: left;
	text-shadow: none;
	pointer-events: none;
}

.fv-entry-photos figure.fv-photo.wp-block-image::before {
	content: none !important;
}

/* A floor plan or site plan shows whole within its frame, never cropped, on an ivory ground. */
.fv-plan img {
	box-sizing: border-box;
	object-fit: contain !important;
	padding: var(--fv-s2) !important;
	background: var(--fv-ivory);
}

.fv-photo.fv-plan img {
	border: 1px solid var(--fv-rule);
}

.fv-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fv-facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 1px solid var(--fv-rule);
	border-bottom: 1px solid var(--fv-rule);
	margin-block: var(--fv-s4) 0;
}

.fv-fact {
	padding: var(--fv-s2) var(--fv-s3) var(--fv-s2) 0;
	margin: 0;
}

.fv-fact > * {
	margin: 0;
}

.fv-fact:not(:has(.fv-fact-value)),
.fv-facts:not(:has(.fv-fact-value)) {
	display: none;
}

.fv-fact-label {
	color: var(--fv-label);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.fv-fact > .fv-fact-value {
	margin-top: 4px;
	font-size: var(--wp--preset--font-size--small);
}

/*
 * The story follows the gallery's first row, as a photo-and-text split beside
 * the next landscape photo, in a 3:2 frame, or on its own when no photo is
 * left for it (inc/galleries.php).
 */
.fv-story > * {
	margin: 0;
}

.fv-entry-photos > .fv-story {
	margin-block: var(--fv-s5) 0;
}

.fv-entry-photos > .fv-story + .fv-gallery.wp-block-gallery {
	margin-block-start: var(--fv-s5);
}

.fv-entry-photos:not(:has(img)) > .fv-story {
	margin-block-start: var(--fv-s4);
}

.fv-slot-story {
	aspect-ratio: 3 / 2;
}

.fv-story-alone > .fv-story-text {
	max-width: 760px;
}

.fv-story-text {
	gap: var(--fv-s4);
}

.fv-story-part p:not(.is-style-fv-label) {
	max-width: 640px;
}

/* Closing invitation. */
.fv-invitation-card {
	max-width: 760px;
	margin-inline: auto !important;
	text-align: center;
	align-items: center;
	gap: var(--fv-s2);
	padding: var(--fv-card-pad);
}

.fv-invitation-card > * {
	margin: 0;
}

.fv-invitation-card > p {
	max-width: 540px;
}

/* The 404 page's heading sets each of its two sentences on its own line and
   balances it there: balance doesn't carry across a line break. */
.fv-not-found h1 > .fv-line {
	display: block;
	text-wrap: balance;
}

/* Contact. */
.fv-contact {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: var(--fv-s4);
	align-items: start;
}

/*
 * On Contact, the introduction's line sits under the page title at every
 * width, and the page intro's divider sits between it and the form's card
 * and the details, with no section-label row.
 */
:root .fv-intro:has(+ .fv-contact-section) .fv-intro-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--fv-s2);
}

:root .fv-intro:has(+ .fv-contact-section) .fv-intro-row > .wp-block-heading {
	max-width: 720px;
}

:root .fv-intro:has(+ .fv-contact-section) .fv-intro-line {
	max-width: 560px;
}

.fv-contact > * {
	margin: 0;
}

.fv-form-card {
	padding: var(--fv-card-pad);
}

/* The form's card: the line under the form, such as its privacy note, sits one step below it. */
:root .fv-form-card > * + * {
	margin-block-start: var(--fv-s3);
}

.fv-form-place {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 360px;
	border: 1px dashed var(--fv-field-border);
	border-radius: var(--fv-radius);
	font-size: var(--wp--preset--font-size--small);
}

/*
 * The contact details, Call, Email and Office, each a label over its lines
 * with a thin divider between them: on Contact beside the form, and in the
 * footer, on charcoal, where the divider and label take their charcoal
 * colors. Lines keep their natural spacing.
 */
.fv-contact-details {
	display: flex;
	flex-direction: column;
}

.fv-detail {
	padding: var(--fv-s2) 0;
	border-top: 1px solid var(--fv-divider);
	margin: 0;
}

.fv-detail:first-child {
	border-top: 0;
	padding-top: 0;
}

.fv-detail > * {
	margin: 0;
}

.fv-detail > .fv-detail-label {
	color: var(--fv-label);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.fv-detail > p:not(.fv-detail-label) {
	font-size: var(--wp--preset--font-size--small);
}

/*
 * Each link is a 44px tap target: its padding makes up the height and an
 * equal negative margin takes it back, so the area reaches around the text
 * without adding space between the lines.
 */
.fv-detail a {
	display: inline-block;
	padding-block: calc((44px - 1lh) / 2);
	margin-block: calc((1lh - 44px) / 2);
}

/* Neighborhood map, in a white frame with the card component's border. */
.fv-map {
	box-sizing: border-box;
	margin-block: 0;
	background: var(--fv-white);
	border: 1px solid var(--wp--custom--card-border);
	border-radius: var(--fv-radius);
	padding: var(--fv-s2);
}

.fv-map img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 2px;
}

/* Client quotes. */
.fv-quote.wp-block-quote {
	margin: 0;
	padding: 0;
	border: 0;
	display: flex;
	flex-direction: column;
	gap: var(--fv-s2);
}

.fv-quote p {
	font-family: var(--fv-serif);
	font-size: 22px;
	line-height: 1.4;
}

/* The opening quotation mark, before the quote's first paragraph only. */
.fv-quote p:first-of-type::before {
	content: "\201C";
	display: block;
	font-size: 48px;
	line-height: 0.6;
	color: var(--fv-accent);
	margin-bottom: var(--fv-s1);
}

.fv-quote cite {
	font-style: normal;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fv-label);
}

/* Text pages. */
.fv-prose > * {
	max-width: 720px;
}

.fv-prose > * + * {
	margin-block-start: var(--fv-s2);
}

.fv-prose > .wp-block-heading:not(:first-child) {
	margin-block-start: var(--fv-s4);
}

/* ---------- Opening (Home) ---------- */

/*
 * A full-screen opening: the header, the opening and the charcoal strip of
 * three links below it fill the first screen together, so a visitor lands on
 * the photo, the panel and the strip. The photo fills the opening behind the
 * ivory panel with a centered crop, so any photo can lead, and the panel sits
 * centered on the left with its text on the content grid of the sections
 * below. svh ignores phones' browser bars as they show and hide. The panel is
 * in the page's flow, so on a screen too short for the panel and the strip
 * the opening grows rather than cutting anything off.
 */
:root {
	/* The strip's height: one row of three links, or three compact rows on tablets and phones. */
	--fv-strip-height: 94px;
}

.fv-opening {
	position: relative;
	display: grid;
	align-items: center;
	box-sizing: border-box;
	min-height: calc(100svh - var(--fv-header-height) - var(--wp-admin--admin-bar--height, 0px) - var(--fv-strip-height));
	padding-block: var(--fv-s5);
	margin: 0;
}

.fv-opening > * {
	margin-block: 0;
}

.fv-opening-photo {
	position: absolute;
	inset: 0;
	margin: 0;
}

.fv-opening-photo img {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	object-position: 50% 50%;
	border-radius: 0;
}

/* The image the opening's script fills in (inc/opening.php) stays out of the way until it has its photo. */
.fv-opening-photo img[hidden] {
	display: none;
}

/*
 * On desktop the panel sits over the photo's left side, its left edge on the
 * content's edge, in line with the logo and the sections below, about 44% of
 * the photo's width, with 30px inside it. It is at least tall enough to cover
 * about a fifth of the photo (0.2 / 0.44 of the first screen's opening), with
 * its text centered in it.
 */
.fv-opening-panel {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 44%;
	min-height: calc((100svh - var(--fv-header-height) - var(--wp-admin--admin-bar--height, 0px) - var(--fv-strip-height)) * 0.4545);
	margin: 0 0 0 var(--fv-content-edge) !important;
	background: var(--fv-ivory);
	padding: 30px;
	border-radius: var(--fv-radius);
}

/* In the editor, the set of opening photos shows as a gallery above the panel. */
.fv-opening > .fv-opening-photos {
	margin-block-end: var(--fv-s3);
}

/*
 * On tablets and phones the panel runs the full width at the foot of the
 * opening, just above the strip, and the photo fills the space above it, at
 * least 96px tall, with its crop centered in what shows.
 */
@media (max-width: 900px) {
	.fv-opening {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		padding-block: 0;
	}

	.fv-opening-photo {
		position: relative;
		inset: auto;
		flex: 1 0 96px;
	}

	.fv-opening-photo img {
		position: absolute;
		inset: 0;
	}

	.fv-opening-panel {
		width: 100%;
		min-height: 0;
		margin: 0 !important;
		padding: var(--fv-s4) var(--fv-content-edge);
		border-radius: 0;
	}
}

.fv-opening-panel > * {
	margin: 0;
}

.fv-opening-panel > .wp-block-heading {
	margin-bottom: var(--fv-s2);
}

/*
 * The heading keeps its phrases whole: its text joins them with non-breaking
 * spaces, such as "Greater Kalamazoo". On the narrowest phones the size
 * steps down just enough for the longest phrase, about eight times the font
 * size, to fit the line.
 */
.fv-opening-panel > .wp-block-heading {
	font-size: min(var(--wp--preset--font-size--display), calc((100vw - 2 * var(--wp--style--root--padding-left)) / 8)) !important;
	line-height: 1.08;
	max-width: 10.5em;
}

/* On desktop the heading is 50px, stepping down only where the panel is too narrow for "Greater Kalamazoo" at that size. */
@media (min-width: 901px) {
	.fv-opening-panel > .wp-block-heading {
		font-size: min(50px, calc((44vw - 60px) / 8.2)) !important;
	}
}

/*
 * On desktop the strip's charcoal band runs the full width of the screen, and
 * its three links sit on the content grid's three columns, with the card
 * grids' 24px gap, so each link's text starts on its column's left edge, the
 * first on the content's edge. Each link's panel reaches halfway into the gaps
 * on either side, so neighboring panels meet in the middle of the gap, where
 * the divider between them sits, and the whole panel is the link. Its arrow
 * follows its title 8px later, as an arrow link's does.
 */
.fv-strip-items {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: var(--fv-s3);
	min-height: var(--fv-strip-height);
}

.fv-strip-item {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-content: end;
	padding: var(--fv-s3) calc(var(--fv-s3) / 2);
	border-right: 1px solid var(--fv-rule-dark);
	margin: 0 calc(var(--fv-s3) / -2);
}

.fv-strip-item:last-child {
	border-right: 0;
}

.fv-strip-item > * {
	margin: 0;
	grid-column: 1;
}

.fv-strip-item > .fv-number {
	font-family: var(--fv-sans);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	color: var(--fv-light-sage);
}

.fv-strip-link {
	font-family: var(--fv-serif);
	font-size: 24px;
	line-height: 1.2;
}

.fv-strip-link a {
	color: inherit;
}

.fv-strip-link a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.fv-strip-link::after {
	content: "→";
	content: "→" / "";
	margin-left: var(--fv-s1);
	color: var(--fv-light-bronze);
	font-size: 18px;
}

.fv-strip-item:hover .fv-strip-link a {
	color: var(--fv-light-bronze);
}

.fv-strip-item:has(a:focus-visible) {
	outline: 2px solid var(--fv-light-sage);
	outline-offset: -2px;
}

.fv-strip-link a:focus-visible {
	outline: none;
}

/* ---------- Header ---------- */

/*
 * The header's height, for layouts that fit the first screen below it: one
 * 80px row and its border, the compact phone header's 60px row, or two rows on
 * phones too narrow for one.
 */
:root {
	--fv-header-height: 81px;
}

/* Compact phone header. */
@media (min-width: 375px) and (max-width: 600px) {
	:root {
		--fv-header-height: 61px;
	}
}

@media (max-width: 374px) {
	:root {
		--fv-header-height: 105.5px;
	}
}

.fv-header-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 20;
}

/* On phones WordPress's admin bar scrolls away with the page, so the header sticks to the top. */
@media (max-width: 600px) {
	.admin-bar .fv-header-part {
		top: 0;
	}
}

/*
 * The header's border runs the full width of the screen, and its row sits on
 * the content's edges: the logo's artwork starts on the content's left edge
 * and the Contact button ends on its right edge, in line with the sections
 * below and, on Home, the opening panel.
 */
.fv-header {
	border-bottom: 1px solid var(--fv-rule);
}

.fv-header.has-global-padding {
	padding-left: var(--fv-content-edge);
	padding-right: var(--fv-content-edge);
}

.fv-header > .fv-header-bar {
	max-width: none;
}

.fv-header-bar {
	min-height: 80px;
	gap: var(--fv-s3);
}

.fv-header-bar > * {
	margin: 0;
}

.fv-logo {
	margin: 0;
	flex: none;
}

.fv-logo a {
	display: block;
}

.fv-logo img {
	display: block;
	width: 226px !important;
	height: auto;
	border-radius: 0;
}

.fv-header-tools {
	gap: 20px;
	font-size: 15px;
}

.fv-header-tools > *,
.fv-header-bar > * {
	margin: 0;
	flex-shrink: 0;
}

/* The Contact button keeps its keyboard focus outline and, on the Contact page, takes no current-page underline. */
.fv-header-contact .wp-block-button__link {
	min-height: 44px;
	padding: 0 20px;
}

.fv-menu {
	font-size: 15px;
}

.fv-menu .wp-block-navigation__container {
	gap: 32px;
}

/* The menu's links are underlined with a border, bronze on hover and for the current page, including Contact in the open menu. */
.fv-header .fv-menu .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0;
	white-space: nowrap;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.fv-menu .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--fv-bronze);
}

.fv-header .fv-menu .wp-block-navigation-item__content:hover {
	text-decoration: none;
	border-bottom-color: var(--fv-bronze);
}

.fv-menu .wp-block-navigation__responsive-container-open,
.fv-menu .wp-block-navigation__responsive-container-close {
	min-height: 44px;
	min-width: 44px;
	align-items: center;
	justify-content: center;
	font: 500 15px/1 var(--fv-sans);
	color: var(--fv-charcoal);
}

/* The open menu appears in place, without sliding or fading in. */
.fv-menu .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--fv-s3) var(--wp--style--root--padding-right) var(--fv-s4) var(--wp--style--root--padding-left);
	animation: none;
}

.fv-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 72px;
}

.fv-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: var(--fv-s1);
}

.fv-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-family: var(--fv-serif);
	font-size: 26px;
}

.fv-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding: 4px 0;
}

/* Contact is a button beside the menu, and a link only in the folded menu, which covers the header when open. */
.fv-menu .wp-block-navigation__responsive-container:not(.is-menu-open) .fv-menu-contact {
	display: none;
}

/*
 * The menu folds into its "Menu" button below 1180px. The logo, the five
 * links and Contact need about 850px plus the side margins, so the full menu
 * waits until they fit on one line with room to spare.
 */
@media (max-width: 1179px) {
	.fv-menu .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.fv-menu .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/*
 * Logo widths are of its artwork, which is 88.5% of its file's width. Wider
 * than phones the file is 226px, so the artwork is 200px, the minimum there.
 * Phones show the file at 193px, whose artwork is 171px wide, above their
 * 170px minimum; the file's transparent padding makes up the rest.
 */
@media (max-width: 600px) {
	.fv-logo img {
		width: 193px !important;
	}
}

/*
 * The logo's file keeps clear space around its artwork, 5.33% of its width at
 * the left. A negative margin cancels it, so the artwork starts on the
 * content's edge at every width: 12px for the 226px file, and 10.3px for the
 * phones' 193px file on the two-row header below 375px. The compact phone
 * header cancels it the same way below.
 */
.fv-header-bar > .fv-logo {
	margin-left: -12px;
}

@media (max-width: 374px) {
	.fv-header-bar > .fv-logo {
		margin-left: -10.3px;
	}
}

/*
 * Compact phone header. Phones from 375px: one 60px row that stays at the top
 * while the page scrolls. The logo, Menu and Contact keep their full sizes:
 * the logo's artwork starts on the page's left edge, its file's padding
 * cancelled by negative margins, and Menu starts more than the logo's clear
 * space (a quarter of its height, 8px) after the artwork. That needs 373px,
 * so narrower phones keep two rows, below.
 */
@media (min-width: 375px) and (max-width: 600px) {
	.fv-header-bar {
		box-sizing: border-box;
		height: 60px;
		min-height: 0;
		gap: 0;
	}

	.fv-header-bar > .fv-logo {
		margin: 0 -6px 0 -10px;
	}

	/* 8px between Menu and Contact on the narrowest phones, growing to the wider screens' 20px as room allows. */
	.fv-header-tools {
		gap: clamp(var(--fv-s1), 100vw - 367px, 20px);
	}
}

/* Phones narrower than 375px: the logo and Menu on the first row, and Contact on the second, at the right. */
@media (max-width: 374px) {
	.fv-header-bar {
		flex-wrap: wrap !important;
		row-gap: 0;
		padding-block: var(--fv-s1);
	}

	.fv-header-tools {
		display: contents !important;
	}

	.fv-menu {
		order: 2;
		margin-left: auto !important;
	}

	.fv-header-buttons {
		order: 3;
		margin-left: auto !important;
	}

	.fv-header-bar::after {
		content: "";
		order: 2;
		flex-basis: 100%;
		height: 0;
	}
}

/*
 * A link to part of a page and keyboard focus stop clear of the header: 112px
 * from the top of the screen wider than phones, and 40px below the header on
 * phones. Focus in the header and its open menu, which are always in view,
 * never scrolls the page. Scroll padding on the page would scroll it for both,
 * so the clearance is set on what's below the header instead.
 */
.wp-site-blocks > :not(.fv-header-part),
.wp-site-blocks > :not(.fv-header-part) * {
	scroll-margin-top: 112px;
}

@media (max-width: 600px) {
	.wp-site-blocks > :not(.fv-header-part),
	.wp-site-blocks > :not(.fv-header-part) * {
		scroll-margin-top: calc(var(--fv-header-height) + var(--fv-s4));
	}
}

/* ---------- Footer ---------- */

/*
 * --fv-tap is the height of a footer link's tap target: 44px, or 32px for
 * the Explore links on screens used with a mouse.
 */
.fv-footer {
	--fv-tap: 44px;
	padding-block-start: var(--fv-s5);
	font-size: var(--wp--preset--font-size--small);
}

.fv-footer > * {
	margin-block: 0;
}

/*
 * Wider than phones, three columns starting on the same top line: the brand
 * block from the content's left edge, the Explore links centered on the
 * page, and the Office and Contact details ending on the content's right
 * edge. The outer columns share the room left equally, so Explore stays
 * centered while both fit; when one needs more room it takes it and Explore
 * moves aside, always 40px from each neighbor.
 */
.fv-footer-columns {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	column-gap: var(--fv-s4);
	align-items: start;
	padding-bottom: var(--fv-s4);
	border-bottom: 1px solid var(--fv-rule-dark);
}

.fv-footer-columns > * {
	margin: 0;
}

.fv-footer-brand {
	justify-self: start;
	max-width: 340px;
}

.fv-footer-explore {
	justify-self: center;
}

/* The details' lines don't wrap, so the column keeps its width and ends on the content's edge. */
.fv-footer-details {
	justify-self: end;
	display: flex;
	flex-direction: column;
	gap: var(--fv-s3);
	white-space: nowrap;
}

/*
 * The logo's file keeps clear space around its artwork: at 175px wide,
 * 12.9px at the left, 11px at the top and 11.7px at the bottom. Negative
 * margins cancel it, so the artwork lines up with the text below it and the
 * tops of the column labels, and the description sits 24px below the
 * artwork.
 */
.fv-footer-brand > .fv-footer-logo {
	margin: -10.95px 0 calc(var(--fv-s3) - 11.75px) -12.9px;
}

/* The link holds only the logo, with no line space below it. */
.fv-footer-logo > a {
	display: block;
	width: fit-content;
}

.fv-footer-logo img {
	display: block;
	width: 175px !important;
	border-radius: 0;
}

/* The office's map coordinates, 16px below the description, as plain text. */
.fv-footer-brand > .fv-footer-coordinates {
	margin-block-start: var(--fv-s2);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.1em;
	color: var(--fv-light-sage);
}

/* Explore, Office and Contact: each label sits 8px above its first line. */
.fv-footer-heading.wp-block-heading {
	font-family: var(--fv-sans);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fv-light-sage);
	margin-bottom: var(--fv-s1);
}

/*
 * The Explore links: one list, each link's line one tap target's height
 * from the next, so the targets meet without overlapping. That is 44px,
 * and 32px on screens used with a mouse.
 */
.fv-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	justify-items: start;
	gap: calc(var(--fv-tap) - 1lh);
}

@media (hover: hover) and (pointer: fine) {
	.fv-footer-links {
		--fv-tap: 32px;
	}
}

/*
 * Every footer link but the logo is a tap target of --fv-tap's height. Its
 * padding makes up the height and an equal negative margin takes it back,
 * so the area reaches around the text without moving any line.
 */
.fv-footer a:not(.fv-footer-logo a) {
	display: inline-block;
	padding-block: calc((var(--fv-tap) - 1lh) / 2);
	margin-block: calc((1lh - var(--fv-tap)) / 2);
}

/*
 * A row of social icons, when the site has social profiles, goes in the
 * Contact group after the email address, as the README describes.
 */
.fv-footer-contact > .fv-social-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fv-s2);
	margin: var(--fv-s2) 0 0;
	padding: 0;
	list-style: none;
}

/*
 * The bottom line: the copyright, the builder's license and Privacy,
 * left-aligned on one line, with a thin vertical divider between each.
 */
.fv-footer-base {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding-block: var(--fv-s3);
	font-size: var(--wp--preset--font-size--small);
}

.fv-footer-base > * {
	margin: 0;
}

.fv-footer-base > * + * {
	margin-inline-start: var(--fv-s2);
	padding-inline-start: var(--fv-s2);
	border-inline-start: 1px solid var(--fv-rule-dark);
}

/* ---------- Narrower screens ---------- */

/*
 * Full rows in a three-column card grid, such as a band of numbered cards
 * (fv-grid-3), a Query Loop's plain card grid and a card set
 * (inc/card-rows.php). Rows hold at most three cards, every row is full, and
 * leftover cards are set as the gallery's leftover rule sets them: the last
 * two run two to a row, or the last four when one card would be left alone,
 * so four cards, such as About's values, run two to a row. The grid has six
 * tracks, so a card takes two and a card in a row of two three. On tablets
 * the cards run two to a row, and a last card that would be alone takes the
 * whole row; on phones, one column.
 */
@media (min-width: 901px) {
	.fv-grid-3:not(:has(> .fv-quote)),
	:not(.fv-card-set, .fv-listings) > .wp-block-query:not(.fv-query-feature) > .fv-cards:not(.fv-card-gallery),
	.fv-card-set {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.fv-grid-3:not(:has(> .fv-quote)) > *,
	:not(.fv-card-set, .fv-listings) > .wp-block-query:not(.fv-query-feature) > .fv-cards:not(.fv-card-gallery) > *,
	.fv-card-set > *,
	.fv-card-set .fv-cards > li {
		grid-column: span 2;
	}

	.fv-grid-3:not(:has(> .fv-quote)):has(> :last-child:nth-child(3n + 2)) > :nth-last-child(-n + 2),
	.fv-grid-3:not(:has(> .fv-quote)):has(> :last-child:nth-child(3n + 1)) > :nth-last-child(-n + 4),
	:not(.fv-card-set, .fv-listings) > .wp-block-query:not(.fv-query-feature) > .fv-cards:not(.fv-card-gallery):has(> :last-child:nth-child(3n + 2)) > :nth-last-child(-n + 2),
	:not(.fv-card-set, .fv-listings) > .wp-block-query:not(.fv-query-feature) > .fv-cards:not(.fv-card-gallery):has(> :last-child:nth-child(3n + 1)) > :nth-last-child(-n + 4),
	.fv-card-set > .fv-card-half,
	.fv-card-set .fv-cards > li.fv-card-half {
		grid-column: span 3;
	}
}

@media (min-width: 601px) and (max-width: 900px) {
	.fv-grid-3:not(:has(> .fv-quote)):has(> :last-child:nth-child(odd)) > :last-child,
	:not(.fv-card-set, .fv-listings) > .wp-block-query:not(.fv-query-feature) > .fv-cards:not(.fv-card-gallery):has(> :last-child:nth-child(odd)) > :last-child,
	.fv-card-set > .fv-card-full-tablet,
	.fv-card-set .fv-cards > li.fv-card-full-tablet {
		grid-column: 1 / -1;
	}

	/* A photo card across the row keeps a wide photo, as the gallery's does. */
	.fv-grid-3:not(:has(> .fv-quote)):has(> :last-child:nth-child(odd)) > :last-child :is(.wp-block-post-featured-image, .wp-block-image) img,
	:not(.fv-card-set, .fv-listings) > .wp-block-query:not(.fv-query-feature) > .fv-cards:not(.fv-card-gallery):has(> :last-child:nth-child(odd)) > :last-child .wp-block-post-featured-image img,
	.fv-card-set .fv-card-full-tablet .wp-block-post-featured-image img {
		aspect-ratio: 16 / 9 !important;
	}
}

@media (max-width: 900px) {
	.fv-grid-3,
	.fv-cards,
	.fv-card-set,
	.fv-feature,
	.fv-query-feature .fv-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.fv-feature > .fv-card-lead,
	.fv-query-feature .fv-cards > li:first-child {
		grid-column: 1 / -1;
		grid-row: auto;
	}

	.fv-feature > .fv-stack {
		grid-column: 1 / -1;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.fv-stage {
		grid-template-columns: 52px minmax(0, 1fr);
	}

	.fv-stage > p:not(.fv-number) {
		grid-column: 2;
	}

	.fv-split,
	.fv-split.fv-split-flip,
	.fv-contact {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--fv-s4);
	}

	.fv-split.fv-split-flip > .wp-block-image {
		order: -1;
	}
}

/*
 * The panel of places, such as Home's Where we build, stacks its photo above
 * its text below 1100px, so each place's label, such as "Greater
 * Kalamazoo", keeps to one line in its column.
 */
@media (max-width: 1099px) {
	.fv-panel:has(.fv-places) {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 760px) {
	.fv-panel {
		grid-template-columns: minmax(0, 1fr);
	}

	.fv-panel-photo img {
		min-height: 240px;
	}

	.fv-panel-text {
		padding: var(--fv-s4) var(--fv-s3);
	}

	.fv-opening-panel {
		padding-block: var(--fv-s3);
	}
}

/* Up to tablets, the strip's three links are compact 44px rows on the content width: number, link and arrow on one line. */
@media (max-width: 860px) {
	:root {
		--fv-strip-height: 134px;
	}

	.fv-strip-items {
		grid-template-columns: minmax(0, 1fr);
	}

	.fv-strip-item {
		grid-template-columns: 28px minmax(0, 1fr) auto;
		align-items: center;
		min-height: 44px;
		padding: 4px 0;
		margin: 0;
		border-right: 0;
		border-bottom: 1px solid var(--fv-rule-dark);
	}

	.fv-strip-item > .fv-number {
		grid-column: 1;
	}

	.fv-strip-item > .fv-strip-link {
		grid-column: 2;
		grid-row: 1;
	}

	.fv-strip-link::after {
		content: none;
	}

	.fv-strip-item::after {
		content: "→";
		content: "→" / "";
		grid-column: 3;
		grid-row: 1;
		align-self: center;
		color: var(--fv-light-bronze);
		font-size: 18px;
	}

	.fv-strip-item:last-child {
		border-bottom: 0;
	}
}

/* On narrow screens the map keeps its lot numbers readable and scrolls sideways within its frame. */
@media (max-width: 760px) {
	.fv-map {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.fv-map img {
		width: 760px;
		max-width: none;
	}

	/* A cue under the map that stays in view as it scrolls, so it's clear there is more of the plan to the side. */
	.fv-map::after {
		content: "Swipe sideways to see the whole plan \2192";
		position: sticky;
		left: 0;
		display: block;
		width: fit-content;
		margin-top: var(--fv-s1);
		font-size: 14px;
		font-weight: 500;
		line-height: 1.4;
		color: var(--fv-charcoal);
	}
}

@media (max-width: 700px) {
	.fv-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.fv-grid-3,
	.fv-cards,
	.fv-card-set,
	.fv-feature,
	.fv-feature > .fv-stack,
	.fv-query-feature .fv-cards,
	.fv-places {
		grid-template-columns: minmax(0, 1fr);
	}

	.fv-card-lead > .wp-block-image,
	.fv-query-feature .fv-cards > li:first-child .wp-block-post-featured-image {
		min-height: 0;
		aspect-ratio: 4 / 3;
	}

	.fv-slot-lead {
		aspect-ratio: 4 / 3;
	}

	/* Numbered cards on warm ivory, such as Home's How We Build band: closer together and tighter inside, with the section's space above its heading kept. */
	.fv-section.has-warm-ivory-background-color {
		padding-block-end: var(--fv-s4);
	}

	.fv-section.has-warm-ivory-background-color > .fv-head {
		margin-block-end: var(--fv-s2);
	}

	.fv-section.has-warm-ivory-background-color .fv-grid-3 {
		gap: var(--fv-s2);
	}

	.fv-point > .fv-number {
		margin-bottom: var(--fv-s1);
		font-size: 28px;
	}

	/* A warm ivory band of numbered cards becomes plain rows separated by dividers. */
	.fv-section.has-warm-ivory-background-color .fv-grid-3:has(> .fv-point > .fv-number) {
		gap: 0;
	}

	.fv-section.has-warm-ivory-background-color .fv-point:has(> .fv-number) {
		background: none;
		border: 0;
		border-radius: 0;
		padding: var(--fv-s3) 0;
	}

	.fv-section.has-warm-ivory-background-color .fv-point:has(> .fv-number) + .fv-point {
		border-top: 1px solid var(--fv-rule);
	}

	.fv-section.has-warm-ivory-background-color .fv-point:has(> .fv-number):first-child {
		padding-top: var(--fv-s1);
	}

	.fv-section.has-warm-ivory-background-color > .is-style-fv-arrow {
		margin-block-start: var(--fv-s2);
	}
}

/*
 * Phones: the brand block runs the full content width, with no cap short of
 * its edge. Below it the Explore links and the Office and Contact details
 * sit side by side as two equal columns splitting the content width, each
 * starting at its column's left edge with its label on the same top line.
 * The 16px gap keeps the details' longest line, "Visits by appointment", on
 * one line at 360px, where each column is 152px; the lines may wrap where a
 * column is narrower. The bottom line's three items stack on the left edge
 * without divider lines, 24px apart, so Privacy's tap target stays clear.
 */
@media (max-width: 760px) {
	.fv-footer-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--fv-s2);
		row-gap: var(--fv-s4);
	}

	.fv-footer-brand {
		grid-column: 1 / -1;
		max-width: none;
	}

	.fv-footer-explore,
	.fv-footer-details {
		justify-self: stretch;
	}

	.fv-footer-details {
		white-space: normal;
	}

	.fv-footer-base {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--fv-s3);
	}

	.fv-footer-base > * + * {
		margin-inline-start: 0;
		padding-inline-start: 0;
		border-inline-start: 0;
	}
}

/* Below 360px wide the two columns stack into one: Explore, then the Office and Contact details. */
@media (max-width: 359px) {
	.fv-footer-columns {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- The larger view of a gallery's photos ---------- */

/* It fills the screen in ivory, with the photo whole between its count and Close above and Previous and Next below. Nothing in it moves. */
html:has(.fv-viewer[open]) {
	overflow: hidden;
}

.fv-viewer {
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: var(--fv-s2) clamp(20px, 5vw, 64px);
	border: 0;
	background: var(--fv-ivory);
	color: var(--fv-charcoal);
	font-family: var(--fv-sans);
}

.fv-viewer[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: var(--fv-s2);
}

.fv-viewer::backdrop {
	background: var(--fv-ivory);
}

.fv-viewer :focus-visible {
	outline: 2px solid var(--fv-charcoal);
	outline-offset: 1px;
}

.fv-viewer-bar,
.fv-viewer-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--fv-s2);
}

.fv-viewer-count {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
}

.fv-viewer.has-one :is(.fv-viewer-count, .fv-viewer-nav) {
	visibility: hidden;
}

/* Sideways swipes reach the script, which moves between photos; up and down and pinching stay with the browser. */
.fv-viewer-photo {
	touch-action: pan-y pinch-zoom;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--fv-s1);
	min-height: 0;
	margin: 0;
}

.fv-viewer-photo img {
	display: block;
	flex: none;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	border-radius: var(--fv-radius);
}

/* With a caption, the photo leaves room for it directly below. */
.fv-viewer-photo:has(.fv-viewer-caption:not([hidden])) img {
	max-height: calc(100% - 32px);
}

.fv-viewer-caption {
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
}

/* Outline buttons, 44px tall where space is tight. */
.fv-viewer-button {
	display: inline-flex;
	align-items: center;
	gap: var(--fv-s1);
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid var(--fv-charcoal);
	border-radius: var(--fv-radius);
	background: transparent;
	color: var(--fv-charcoal);
	font-family: var(--fv-sans);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}

.fv-viewer-button:hover {
	background: var(--fv-charcoal);
	color: var(--fv-ivory);
}

/*
 * On a phone turned sideways, a screen wider than tall and at most 500px
 * tall, the photo takes the whole screen, and the count and Close overlay it
 * along its top edge and Previous and Next along its bottom edge, 16px in
 * from the sides of the screen. Each sits on its own ivory ground, so its
 * charcoal text reads at 8.5:1 whatever the photo behind it, and the buttons
 * keep their 44px height. A focused button's outline sits between two thin
 * ivory rings, so it shows against any photo. A caption, such as "Concept
 * plan", sits in the middle of the top edge. The bars let taps and swipes
 * between their controls through to the photo. In portrait and on wider
 * screens the larger view stays as it is above.
 */
@media (orientation: landscape) and (max-height: 500px) {
	.fv-viewer {
		padding: 0;
	}

	.fv-viewer[open] {
		display: block;
	}

	.fv-viewer-photo {
		position: absolute;
		inset: 0;
	}

	.fv-viewer-photo img,
	.fv-viewer-photo:has(.fv-viewer-caption:not([hidden])) img {
		max-width: 100%;
		max-height: 100%;
	}

	.fv-viewer-bar,
	.fv-viewer-nav {
		position: absolute;
		left: 0;
		right: 0;
		z-index: 1;
		box-sizing: border-box;
		padding-inline: max(var(--fv-s2), env(safe-area-inset-left)) max(var(--fv-s2), env(safe-area-inset-right));
		pointer-events: none;
	}

	.fv-viewer-bar {
		top: 0;
		padding-block-start: max(var(--fv-s2), env(safe-area-inset-top));
	}

	.fv-viewer-nav {
		bottom: 0;
		padding-block-end: max(var(--fv-s2), env(safe-area-inset-bottom));
	}

	.fv-viewer-bar > *,
	.fv-viewer-nav > * {
		pointer-events: auto;
	}

	.fv-viewer-count,
	.fv-viewer-caption {
		padding: 4px 12px;
		border-radius: var(--fv-radius);
		background: var(--fv-ivory);
		line-height: 1.6;
	}

	.fv-viewer-caption {
		position: absolute;
		top: max(var(--fv-s2), env(safe-area-inset-top));
		left: 50%;
		z-index: 1;
		max-width: calc(100% - 320px);
		transform: translateX(-50%);
	}

	.fv-viewer-button {
		background: var(--fv-ivory);
	}

	.fv-viewer-button:hover {
		background: var(--fv-charcoal);
	}

	.fv-viewer .fv-viewer-button:focus-visible {
		box-shadow: 0 0 0 5px var(--fv-ivory);
	}
}

/* ---------- Reduced motion ---------- */

/* For visitors who ask for reduced motion, nothing moves: no transitions, animations or smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}
