/*
Theme Name: Sebo Theme
Theme URI: https://sebomarketing.com
Author: Sebo Marketing
Author URI: https://sebomarketing.com
Description: Brand-agnostic WordPress block theme used as the starting point for Sebo Marketing client sites. All colour, type, and spacing decisions live as design tokens in theme.json; this stylesheet only covers what theme.json cannot express. WooCommerce-ready.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sebo
Tags: block-theme, full-site-editing, e-commerce, one-column, custom-colors, custom-menu, editor-style
*/

/* -------------------------------------------------------------------------
   1. Base
   ---------------------------------------------------------------------- */

:root {
	/* 3:1 against the field background, per WCAG 1.4.11. A hairline that
	   fails contrast is the thing that tells someone where the input is. */
	--sb-field-border: color-mix(in srgb, var(--wp--preset--color--ink) 58%, var(--wp--preset--color--base));
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-optical-sizing: auto;
}

/* Balance short headings rather than leaving a single orphaned word. */
h1,
h2,
h3,
.wp-block-post-title {
	text-wrap: balance;
}

p,
li {
	text-wrap: pretty;
}

/* Body copy caps its measure even inside wide containers. */
:where(.entry-content) p:not([class*="has-"]) {
	max-width: 68ch;
}

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

/* WordPress puts a block-gap margin between every top-level block, which
   leaves a white strip between the header and the first full-bleed section,
   and another between the last section and the footer. Sections carry their
   own padding, so those gaps are never wanted here. */
.wp-site-blocks > main,
.wp-site-blocks > .wp-block-template-part {
	margin-block-start: 0;
}

/* -------------------------------------------------------------------------
   2. Focus — a single visible treatment everywhere.
      Never remove this; keyboard users depend on it.
   ---------------------------------------------------------------------- */

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

/* Dark grounds need a light ring to stay visible. */
.sb-on-dark :where(a, button, input, select, textarea):focus-visible {
	outline-color: var(--wp--preset--color--accent);
}

.skip-link {
	position: absolute;
	top: -100vh;
	left: 0;
	z-index: 999999;
	padding: 0.85rem 1.5rem;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	border-bottom-right-radius: 6px;
}

.skip-link:focus {
	top: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* -------------------------------------------------------------------------
   3. Links — underlines that sit below the baseline rather than
      slicing through descenders.
   ---------------------------------------------------------------------- */

:where(.entry-content, .wp-block-post-content) a:where(:not(.wp-element-button):not(.wp-block-button__link)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	text-decoration-color: color-mix(in srgb, var(--wp--preset--color--action) 42%, transparent);
	transition: text-decoration-color var(--wp--custom--transition--base);
}

:where(.entry-content, .wp-block-post-content) a:where(:not(.wp-element-button)):hover {
	text-decoration-color: currentColor;
}

/* Buttons and nav links must not inherit the content underline. */
.wp-block-navigation a,
.wp-element-button,
.wp-block-button__link {
	text-decoration: none;
}

.wp-element-button,
.wp-block-button__link {
	transition: background-color var(--wp--custom--transition--base),
		color var(--wp--custom--transition--base),
		transform var(--wp--custom--transition--base);
}

.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-1px);
}

/* Secondary button: outlined, for lower-priority actions. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--action);
	border: 1.5px solid var(--wp--preset--color--action);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
}

/* -------------------------------------------------------------------------
   4. Header
   ---------------------------------------------------------------------- */

/* header.js adds this to <html> for the length of one measurement, so it can
   read the header's expanded height instead of whatever height the transition
   happened to be part-way through. Removed in the same frame. */
.sb-measuring *,
.sb-measuring *::before,
.sb-measuring *::after {
	transition: none !important;
	animation: none !important;
}

/* Stickiness has to live on the template-part wrapper, not on .sb-header.
   WordPress renders the header part inside a <div class="wp-block-template-part">
   that is exactly as tall as the header, and a sticky element cannot travel
   beyond its containing block — so sticking it to .sb-header gives it zero
   travel and it scrolls away immediately. */
.wp-site-blocks > .wp-block-template-part:has(.sb-header),
.wp-site-blocks > .wp-block-template-part:first-child {
	position: sticky;
	/* The admin bar is position:fixed at the top of the viewport for logged-in
	   users, so a header stuck to 0 slides underneath it. WordPress exposes the
	   bar's height as a custom property (32px, or 46px under 782px), which also
	   keeps this correct when the bar is absent. */
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}

/* Fallback for WordPress versions that do not set the custom property. */
body.admin-bar .wp-site-blocks > .wp-block-template-part:has(.sb-header),
body.admin-bar .wp-site-blocks > .wp-block-template-part:first-child {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .wp-site-blocks > .wp-block-template-part:has(.sb-header),
	body.admin-bar .wp-site-blocks > .wp-block-template-part:first-child {
		top: var(--wp-admin--admin-bar--height, 46px);
	}
}

/* Below 600px the admin bar stops being fixed and scrolls away with the page,
   so the header must sit flush again or it leaves a 46px gap. */
@media screen and (max-width: 600px) {
	body.admin-bar .wp-site-blocks > .wp-block-template-part:has(.sb-header),
	body.admin-bar .wp-site-blocks > .wp-block-template-part:first-child {
		top: 0;
	}
}

/* The frosted background lives on a pseudo-element, not on .sb-header itself.
   backdrop-filter makes an element the containing block for its
   position:fixed descendants, which collapsed the mobile menu overlay to the
   height of the header instead of the viewport. Keeping the filter on a
   childless pseudo-element preserves the effect without that side effect. */
.sb-header {
	position: relative;
	background: transparent;
	border-bottom: var(--wp--custom--rule--hairline);
}

.sb-header::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	/* Derived from the palette, not hard-coded white: on a site whose `base` is
	   a warm paper tone, a white header reads as a different, colder surface
	   floating above the page. color-mix keeps the frosted translucency while
	   tracking whatever `base` the brand happens to be. */
	background: color-mix(in srgb, var(--wp--preset--color--base) 92%, transparent);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
}

.sb-header__bar {
	position: relative;
	z-index: 1;
}

/* The bar carries the vertical rhythm, and shrinks in the compact state.
   Padding is on the bar rather than the header so the sticky background
   still spans the full viewport width. */
.sb-header__bar {
	padding-block: clamp(0.85rem, 1.6vw, 1.35rem);
	transition: padding-block var(--wp--custom--transition--base);
}

.sb-header .custom-logo-link,
.sb-header .wp-block-site-logo a {
	display: block;
	line-height: 0;
}

.sb-header .wp-block-site-logo img {
	/* The mark is fine line art and the "PUBLISHING" lettering is light, so
	   the logo needs a little more room than a typical wordmark to stay
	   legible at small sizes. */
	width: clamp(156px, 17vw, 198px);
	height: auto;
	transition: opacity var(--wp--custom--transition--base);
}

.sb-header .wp-block-site-logo a:hover img {
	opacity: 0.78;
}

/* -----------------------------------------------------------------
   Compact (scrolled) header.

   The `is-compact` class is toggled by assets/js/header.js past a
   scroll threshold. Only the circular fairy mark shows, and the bar
   loses height, so more of the page stays visible while scrolling.
   ----------------------------------------------------------------- */

.sb-brand__mark {
	display: none;
	margin: 0;
	line-height: 0;
}

.sb-brand__mark img {
	display: block;
	width: 46px;
	height: auto;
	transition: opacity var(--wp--custom--transition--base);
}

.sb-brand__mark a:hover img {
	opacity: 0.78;
}

.sb-header.is-compact .sb-header__bar {
	padding-block: 0.5rem;
}

.sb-header.is-compact .wp-block-site-logo {
	display: none;
}

.sb-header.is-compact .sb-brand__mark {
	display: block;
}

/* Without JS the header simply stays in its full state — the mark is the
   progressive enhancement, not the baseline. */

/* Nav links: an animated rule that grows from the left on hover, and
   stays put for the current page. */
.sb-header .wp-block-navigation-item__content {
	position: relative;
	padding-block: 0.35rem;
	color: var(--wp--preset--color--ink);
}

.sb-header .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--wp--preset--color--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--wp--custom--transition--base);
}

.sb-header .wp-block-navigation-item:hover .wp-block-navigation-item__content::after,
.sb-header .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content::after,
.sb-header .wp-block-navigation-item.current-menu-ancestor .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/* Submenu (the Books dropdown). */
.sb-header .wp-block-navigation__submenu-container {
	border: none;
	border-radius: 10px;
	padding: 0.4rem;
	min-width: 15rem;
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--lifted);
}

.sb-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.6rem 0.85rem;
	border-radius: 6px;
	width: 100%;
}

.sb-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
	display: none;
}

.sb-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--action);
}

/* -----------------------------------------------------------------
   Mobile overlay menu

   Full-screen, translucent so the page stays faintly visible behind
   it, with a large close control. Woo/WP already render the open and
   close buttons; this is presentation only.
   ----------------------------------------------------------------- */

.wp-block-navigation__responsive-container.is-menu-open,
.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	padding: clamp(1.25rem, 5vw, 2.5rem);
	/* Warm wash — enough to read against, still showing the page beneath.
	   !important because Woo/WP set `background-color: inherit` here at equal
	   specificity, which otherwise picks up the header's opaque white. */
	background-color: rgba(247, 244, 236, 0.9) !important;
	backdrop-filter: blur(16px) saturate(150%);
	-webkit-backdrop-filter: blur(16px) saturate(150%);
	align-items: stretch;
	justify-content: flex-start;
}

/* Give the list room below the close button and centre it in the sheet. */
/* WordPress nests two wrappers between the overlay and the menu list
   (__responsive-close, then __responsive-dialog). Both must grow, or the
   content has no height to be centred within. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__responsive-container-content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	/* Centre the list in the sheet rather than stacking it under the close
	   button with dead space below. */
	justify-content: center;
	padding-block: clamp(2rem, 8vh, 4rem);
	width: 100%;
	min-height: 0;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container {
	gap: 0;
	width: 100%;
	max-width: 22rem;
	text-align: center;
	/* WordPress gives the list flex-grow, which pins the items to the top of
	   the sheet. Auto block margins centre it regardless of that. */
	flex: 0 0 auto;
	margin-block: auto;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item {
	width: 100%;
	justify-content: center;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 14%, transparent);
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item:last-child {
	border-bottom: 0;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	color: var(--wp--preset--color--ink);
	/* Comfortable tap target. */
	padding-block: 0.85rem;
	width: 100%;
	justify-content: center;
}

/* The desktop hover rule draws an underline bar; not wanted in the sheet. */
.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item__content::after {
	display: none;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--action);
}

/* Submenu (Books) sits indented and quieter, always expanded in the sheet. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	box-shadow: none;
	background: transparent;
	border: 0;
	padding: 0 0 0.5rem;
	min-width: 0;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__submenu-container
	.wp-block-navigation-item {
	border-bottom: 0;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__submenu-container
	.wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	color: var(--wp--preset--color--muted);
	padding-block: 0.6rem;
}

/* Open (hamburger) control. */
.wp-block-navigation__responsive-container-open {
	padding: 0.4rem;
	color: var(--wp--preset--color--ink);
}

.wp-block-navigation__responsive-container-open:hover {
	color: var(--wp--preset--color--action);
}

/* Close (X) control — enlarged and given a visible hit area, since the
   default is a small bare glyph in the corner. */
.wp-block-navigation__responsive-container-close {
	top: clamp(1.25rem, 5vw, 2.5rem);
	right: clamp(1.25rem, 5vw, 2.5rem);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--wp--preset--color--base) 90%, transparent);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--soft);
	transition: background-color var(--wp--custom--transition--base),
		color var(--wp--custom--transition--base);
}

.wp-block-navigation__responsive-container-close:hover {
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
}

.wp-block-navigation__responsive-container-close svg {
	width: 26px;
	height: 26px;
}

/* The overlay is fixed to the viewport, so it must clear the admin bar. */
body.admin-bar .wp-block-navigation__responsive-container.is-menu-open {
	top: var(--wp-admin--admin-bar--height, 46px);
}

/* -------------------------------------------------------------------------
   5. Cart indicator in the header
   ---------------------------------------------------------------------- */

.sb-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem;
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	transition: background-color var(--wp--custom--transition--base);
}

.sb-cart:hover {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--action);
}

.sb-cart svg {
	width: 22px;
	height: 22px;
	display: block;
}

.sb-cart__count {
	position: absolute;
	top: -1px;
	right: -3px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.sb-cart__count:empty,
.sb-cart__count[data-count="0"] {
	display: none;
}

/* -------------------------------------------------------------------------
   6. Footer
   ---------------------------------------------------------------------- */

.sb-footer {
	background: var(--wp--preset--color--ink);
	color: rgba(255, 255, 255, 0.82);
}

/* The stacked lockup's fairy mark is hairline linework. At 200px those
   white strokes fall below a device pixel and alias into looking rough,
   which reads as pixelation even though the source is vector. Giving it
   more room is the actual fix. */
.sb-footer .wp-block-site-logo img,
.sb-footer__logo img {
	width: clamp(215px, 22vw, 275px);
	height: auto;
	/* Nudge the fine strokes away from sub-pixel rendering. */
	shape-rendering: geometricPrecision;
}

.sb-footer :where(h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--base);
}

/* Footer column titles are h2s (a real outline for screen readers: an h6 straight
   after the page's h1 is flagged), drawn like the small caps label they replaced. */
.sb-footer .sb-footer__title {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.4;
}

.sb-footer a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
}

.sb-footer a:hover {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.sb-footer .wp-block-navigation {
	gap: 0.55rem;
}

.sb-footer__legal {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* -------------------------------------------------------------------------
   7. Editorial pieces
   ---------------------------------------------------------------------- */

/* Eyebrow label above a section heading. */
.sb-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--action);
}

/* When the eyebrow is a term list (e.g. the product category on a book page)
   its links must not pick up the content underline — at this size and letter
   spacing an underline reads as noise. */
.sb-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.sb-eyebrow a:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* A framed image with depth, for a product shot or cover. */
.sb-object img {
	border-radius: 3px 10px 10px 3px;
	box-shadow: var(--wp--preset--shadow--lifted);
}

/* -----------------------------------------------------------------
   Immersive hero — artwork behind the copy

   A whole-image dim would flatten the painting, so the scrim is
   left-weighted: dark enough for white type on the copy side, and
   clear on the right where the cover sits.
   ----------------------------------------------------------------- */

.sb-hero-immersive {
	position: relative;
	overflow: hidden;
}

.sb-hero-immersive::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(
			100deg,
			rgba(38, 30, 26, 0.88) 0%,
			rgba(38, 30, 26, 0.74) 36%,
			rgba(38, 30, 26, 0.34) 62%,
			rgba(38, 30, 26, 0.12) 100%
		);
}

/* On narrow screens the columns stack, so the copy sits over the middle of
   the image and needs an even wash instead of a side gradient. */
@media (max-width: 781px) {
	.sb-hero-immersive::before {
		background: linear-gradient(
			180deg,
			rgba(38, 30, 26, 0.72) 0%,
			rgba(38, 30, 26, 0.84) 55%,
			rgba(38, 30, 26, 0.72) 100%
		);
	}
}

.sb-hero-immersive .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

.sb-hero-immersive__eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	/* Brand green reads well against the dark scrim; it is only unusable
	   on light grounds. */
	color: var(--wp--preset--color--accent);
}

.sb-hero-immersive__meta {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

.sb-hero-immersive h1 em {
	font-style: italic;
}

/* Lift the cover off the artwork so it reads as a physical object rather
   than part of the painting. */
.sb-object--floating img {
	box-shadow: 0 4px 12px rgba(20, 28, 25, 0.3), 0 28px 64px rgba(20, 28, 25, 0.45);
}

/* Outline button on a dark ground. */
.sb-btn-on-dark .wp-block-button__link,
.wp-block-button.is-style-outline.sb-btn-on-dark > .wp-block-button__link {
	color: var(--wp--preset--color--base);
	border-color: rgba(255, 255, 255, 0.65);
	background: transparent;
}

.sb-btn-on-dark .wp-block-button__link:hover,
.wp-block-button.is-style-outline.sb-btn-on-dark > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--action);
	border-color: var(--wp--preset--color--base);
}

/* A soft rounded frame for photography and artwork. */
.sb-media img,
.sb-gallery figure.wp-block-image img {
	border-radius: 14px;
}

/* A band of field photography. The flower frames are all portrait, and a
   column of full-height 2:3 images makes the grid taller than the section it
   sits in — so the tiles are held to a gentler portrait ratio and the subject
   is cropped to fill. Ratio, not spacing, so there is no token for it. */
.sb-gallery figure.wp-block-image {
	aspect-ratio: 4 / 5;
}

/* The grand-opening frames are landscape. Cropping a group portrait to 4:5
   cuts people out of the sides, so that band opts into the frame's own ratio. */
.sb-gallery--wide figure.wp-block-image {
	aspect-ratio: 3 / 2;
}

.sb-gallery figure.wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Event photo galleries (Past Events): mixed portrait and landscape phone
   photos, so no fixed tile ratio. Each photo keeps its own shape and the
   columns pack, same idea as the shop preview. WordPress's own gallery rules
   set widths with an ID-weighted selector, hence the !important on the two
   layout properties it would otherwise win. */
.wp-block-gallery.sb-gallery--masonry {
	display: block;
	column-count: 3;
	column-gap: var(--wp--preset--spacing--10);
}

.wp-block-gallery.sb-gallery--masonry figure.wp-block-image {
	display: block;
	width: 100% !important;
	flex: none !important;
	/* !important: core's gallery rule zeroes this with an ID-weighted selector. Same
	   token as column-gap above, so the gaps match both ways. */
	margin: 0 0 var(--wp--preset--spacing--10) !important;
	aspect-ratio: auto;
	break-inside: avoid;
}

/* No aspect-ratio override on the img itself: WordPress marks lazy images
   `sizes="auto"`, which gives a not-yet-loaded image a 3000x1500 intrinsic size,
   and `aspect-ratio: auto` here made every such tile render 1500px tall until it
   scrolled into view. Left alone, the browser derives the ratio from the
   width/height attributes, which are correct from the first paint. */
.wp-block-gallery.sb-gallery--masonry figure.wp-block-image img {
	width: 100%;
	height: auto;
	object-fit: initial;
}

@media (max-width: 900px) {
	.wp-block-gallery.sb-gallery--masonry {
		column-count: 2;
	}
}

/* Emphasised pull quote, for a tagline or short testimonial. */
.sb-lede-quote {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	font-style: italic;
	line-height: 1.55;
	color: var(--wp--preset--color--action);
	text-align: center;
}

/* Decorative divider: a hairline rule either side of a small glyph. */
.sb-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	color: var(--wp--preset--color--accent);
}

.sb-divider::before,
.sb-divider::after {
	content: "";
	height: 1px;
	flex: 1 1 auto;
	max-width: 7rem;
	background: currentColor;
}

/* Cards */
.sb-card {
	background: var(--wp--preset--color--base);
	border-radius: 16px;
	box-shadow: var(--wp--preset--shadow--soft);
	overflow: hidden;
	transition: box-shadow var(--wp--custom--transition--base),
		transform var(--wp--custom--transition--base);
}

.sb-card:hover {
	box-shadow: var(--wp--preset--shadow--lifted);
	transform: translateY(-3px);
}

/* -------------------------------------------------------------------------
   8. Blog
   ---------------------------------------------------------------------- */

/* The post grid is declared as a fixed 3-up in the templates, because
   combining columnCount with minimumColumnWidth made WordPress emit an
   unpredictable 2-up. Collapsing for narrower screens is done here. */
.wp-block-post-template.is-layout-grid {
	gap: var(--wp--preset--spacing--30);
}

@media (max-width: 1024px) {
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 660px) {
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

/* The blog intro sits in a wide container so its rule spans the grid; its
   text should start at the same left edge as the first card, not be centred
   inside it. */
.sb-blog-intro > * {
	margin-inline: 0;
}

.sb-blog-intro p {
	max-width: 58ch;
}

/* Cards stretch to the row height so the "Keep reading" link lands on a
   consistent baseline instead of floating wherever the excerpt ends. */
.sb-post-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.sb-post-card .wp-block-post-excerpt {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.sb-post-card .wp-block-post-excerpt__more-text {
	margin-top: auto;
	padding-top: 0.75rem;
}

.sb-post-card .wp-block-post-excerpt__more-text a {
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--action) 38%, transparent);
}

.sb-post-card .wp-block-post-excerpt__more-text a:hover {
	border-bottom-color: currentColor;
}

.sb-post-card .wp-block-post-featured-image img {
	border-radius: 12px;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	width: 100%;
}

.sb-post-card .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
}

.sb-post-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}

.sb-post-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--action);
}

.sb-meta {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.wp-block-query-pagination {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* -------------------------------------------------------------------------
   9. Forms — Gravity Forms and core inputs share one look
   ---------------------------------------------------------------------- */

input:where([type="text"], [type="email"], [type="url"], [type="tel"], [type="number"], [type="password"], [type="search"], [type="date"]),
select,
textarea,
.wp-block-search__input {
	width: 100%;
	padding: 0.8rem 1rem;
	background: var(--wp--preset--color--base);
	border: 1.5px solid var(--sb-field-border);
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--ink);
	transition: border-color var(--wp--custom--transition--base),
		box-shadow var(--wp--custom--transition--base);
}

input:where([type="text"], [type="email"], [type="url"], [type="tel"], [type="number"], [type="password"], [type="search"]):focus,
select:focus,
textarea:focus {
	border-color: var(--wp--preset--color--action);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--action) 16%, transparent);
	outline: none;
}

::placeholder {
	color: color-mix(in srgb, var(--wp--preset--color--ink) 55%, transparent);
	opacity: 1;
}

label {
	display: block;
	margin-bottom: 0.4rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

/* -----------------------------------------------------------------
   Gravity Forms

   Selectors are doubled up on `.gform_wrapper.gravity-theme` where
   Gravity's own stylesheet would otherwise win on specificity.
   ----------------------------------------------------------------- */

.gform_wrapper.gravity-theme .gform_fields {
	grid-row-gap: var(--wp--preset--spacing--20);
	grid-column-gap: var(--wp--preset--spacing--20);
}

/* `.gform_fields` is load-bearing. Gravity ships
   `.gform_wrapper.gravity-theme .gfield_label` verbatim and its stylesheet is
   printed after the theme's, so an identical selector loses on source order
   and silently does nothing. */
.gform_wrapper.gravity-theme .gform_fields .gfield_label,
.gform_wrapper.gravity-theme .gform_fields legend.gfield_label,
.gform_wrapper.gravity-theme .gform_fields .gform-field-label {
	display: block;
	margin-bottom: 0.4rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	letter-spacing: 0;
}

.gform_wrapper.gravity-theme .gfield_label .gfield_required,
.gform_wrapper.gravity-theme .gfield_label .gfield_required_text,
.gform_wrapper.gravity-theme .gfield_label .gfield_required_asterisk {
	color: #a4341f;
	font-weight: 600;
}

.gform_wrapper.gravity-theme .gform_fields .gfield_description {
	padding-top: 0.35rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
	line-height: 1.5;
}

/* Inputs: match the site's field styling, overriding Gravity's. */
.gform_wrapper.gravity-theme .ginput_container input[type="text"],
.gform_wrapper.gravity-theme .ginput_container input[type="email"],
.gform_wrapper.gravity-theme .ginput_container input[type="tel"],
.gform_wrapper.gravity-theme .ginput_container input[type="url"],
.gform_wrapper.gravity-theme .ginput_container input[type="number"],
.gform_wrapper.gravity-theme .ginput_container select,
.gform_wrapper.gravity-theme .ginput_container textarea {
	width: 100%;
	padding: 0.8rem 1rem;
	background: var(--wp--preset--color--base);
	border: 1.5px solid var(--sb-field-border);
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--ink);
	line-height: 1.5;
	transition: border-color var(--wp--custom--transition--base),
		box-shadow var(--wp--custom--transition--base);
}

.gform_wrapper.gravity-theme .ginput_container textarea {
	min-height: 9rem;
	resize: vertical;
}

.gform_wrapper.gravity-theme .ginput_container input:focus,
.gform_wrapper.gravity-theme .ginput_container select:focus,
.gform_wrapper.gravity-theme .ginput_container textarea:focus {
	border-color: var(--wp--preset--color--action);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--action) 16%, transparent);
	outline: none;
}

/* Native select needs its own chevron once the default look is replaced. */
.gform_wrapper.gravity-theme .ginput_container select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A4E52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	background-size: 18px 18px;
	padding-right: 2.6rem;
}

/* Submit button — the brand pill. */
.gform_wrapper.gravity-theme .gform_footer input[type="submit"],
.gform_wrapper.gravity-theme .gform_footer button[type="submit"],
.gform_wrapper.gravity-theme .gform_page_footer input[type="button"],
.gform_wrapper.gravity-theme .gform_page_footer input[type="submit"] {
	width: auto;
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
	border: 0;
	border-radius: 999px;
	padding: 0.95rem 2.1rem;
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.03em;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
	transition: background-color var(--wp--custom--transition--base),
		transform var(--wp--custom--transition--base);
}

.gform_wrapper.gravity-theme .gform_footer input[type="submit"]:hover,
.gform_wrapper.gravity-theme .gform_footer button[type="submit"]:hover {
	background: var(--wp--preset--color--ink);
	transform: translateY(-1px);
}

.gform_wrapper.gravity-theme .gform_footer {
	padding: var(--wp--preset--spacing--20) 0 0;
	margin: 0;
	justify-content: flex-start;
}

/* Validation */
.gform_wrapper.gravity-theme .gfield_description.validation_message,
.gform_wrapper.gravity-theme .validation_message {
	margin-top: 0.4rem;
	padding: 0.5rem 0.75rem;
	background: #fdf3f1;
	border: 0;
	border-left: 3px solid #a4341f;
	border-radius: 6px;
	font-size: var(--wp--preset--font-size--x-small);
	color: #8f2d1b;
}

/* These restate the base field selector's shape with `.gfield_error` added.
   Written as `.gfield_error input` alone they are LESS specific than the base
   rule, which carries an [type="..."] attribute selector, so an invalid field
   keeps its normal border and never looks wrong. */
.gform_wrapper.gravity-theme .gfield_error .ginput_container input[type="text"],
.gform_wrapper.gravity-theme .gfield_error .ginput_container input[type="email"],
.gform_wrapper.gravity-theme .gfield_error .ginput_container input[type="tel"],
.gform_wrapper.gravity-theme .gfield_error .ginput_container input[type="url"],
.gform_wrapper.gravity-theme .gfield_error .ginput_container input[type="number"],
.gform_wrapper.gravity-theme .gfield_error .ginput_container select,
.gform_wrapper.gravity-theme .gfield_error .ginput_container textarea,
.gform_wrapper.gravity-theme .gfield_error .gchoice {
	border-color: #a4341f;
	box-shadow: 0 0 0 3px rgba(164, 52, 31, 0.1);
}

.gform_wrapper.gravity-theme .gform_validation_errors {
	border-radius: 10px;
	border: 0;
	border-left: 3px solid #a4341f;
	background: #fdf3f1;
	box-shadow: none;
	padding: 1rem 1.25rem;
}

.gform_wrapper.gravity-theme .gform_validation_errors > h2 {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: #8f2d1b;
	margin: 0;
}

.gform_wrapper.gravity-theme .gform_validation_errors > h2::before {
	display: none;
}

/* Inline confirmation, for any form not routed to a Thank You page. */
.gform_confirmation_message {
	padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--surface);
	border-left: 3px solid var(--wp--preset--color--action);
	border-radius: 10px;
	font-size: var(--wp--preset--font-size--large);
	font-family: var(--wp--preset--font-family--heading);
}

/* -------------------------------------------------------------------------
   10. Utilities
   ---------------------------------------------------------------------- */

/* Let a wide/full block bleed to the viewport edge on small screens. */
@media (max-width: 600px) {
	.sb-bleed-mobile {
		margin-left: calc(var(--wp--preset--spacing--20) * -1);
		margin-right: calc(var(--wp--preset--spacing--20) * -1);
		border-radius: 0;
	}
}

/* Alternating feature rows.

   sebo/feature-pair ships image-first. Adding this to its columns block
   reverses the pair on desktop so consecutive rows do not read as one repeated
   shape. It is a visual reversal only — DOM order is untouched, so the reading
   order a screen reader and a keyboard follow stays image-then-copy, and below
   the columns breakpoint the stacked order is unchanged too. */
@media (min-width: 782px) {
	.wp-block-columns.sb-flip {
		flex-direction: row-reverse;
	}
}

/* The closing CTA band. Accent appears as the rule that separates it from the
   section above — a fill and a separator, which is what accent is for — rather
   than as the ground under the text. See patterns/cta-band.php. */
.sb-cta-band {
	border-top: 3px solid var(--wp--preset--color--accent);
}

/* Event lists, rendered by the farmhouse-events plugin.

   The plugin owns the data and emits theme class names; the look lives here, so
   the events pages restyle with the rest of the site and the plugin ships no
   CSS of its own. */
.fh-events {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	gap: var(--wp--preset--spacing--30);
	margin: 0;
	padding: 0;
	list-style: none;
}

.fh-event {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--surface);
	border-radius: 16px;
}

.fh-event__media {
	margin-bottom: var(--wp--preset--spacing--10);
	overflow: hidden;
	border-radius: 12px;
}

.fh-event__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.fh-event__title {
	margin: 0;
}

.fh-event__excerpt {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

/* The empty state is a real state, not an error: a calendar with nothing on it
   is the normal condition between seasons. */
.fh-events__empty {
	max-width: 34rem;
	margin-inline: auto;
	color: var(--wp--preset--color--muted);
}

/* Class sign-up, from farmhouse-events/includes/signups.php. The plugin emits
   these class names; the look is the theme's, same as the list above. */
.fh-event__time {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

.fh-event__price,
.fh-event__spots {
	margin: 0;
}

.fh-event__price {
	font-weight: 700;
}

.fh-event__spots {
	color: var(--wp--preset--color--muted);
}

/* "3 spots left" turns urgent without turning red: action is the one
   accessible emphasis colour on every ground this sits on. */
.fh-event__spots.is-low {
	color: var(--wp--preset--color--action);
	font-weight: 700;
}

.fh-event__spots.is-full {
	font-weight: 700;
}

/* Pin the button to the card's foot so cards of different copy length line up. */
.fh-event__signup {
	align-self: flex-start;
	margin-top: auto;
	padding-top: 0.7rem;
	padding-bottom: 0.7rem;
}

.fh-event__excerpt {
	margin-bottom: auto;
}

/* Single class: photo left, facts-and-button panel right, details below. With
   no photo the panel takes the whole row. */
.fh-event-hero > .wp-block-column:first-child:not(:has(img)) {
	display: none;
}

.fh-event-hero .wp-block-post-featured-image {
	margin: 0;
}

/* The facts-and-button panel at the top of a single class. */
.fh-signup {
	padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--surface);
	border-radius: 16px;
}

.fh-signup__facts {
	display: grid;
	gap: 0.75rem;
	margin: 0 0 var(--wp--preset--spacing--20);
}

.fh-signup__facts > div {
	display: grid;
	grid-template-columns: 6rem 1fr;
	gap: 0.75rem;
	align-items: baseline;
}

.fh-signup__facts dt {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--action);
}

.fh-signup__facts dd {
	margin: 0;
}

.fh-signup__form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.fh-signup__form label {
	margin: 0;
	font-weight: 700;
}

.fh-signup__form select {
	width: auto;
	min-width: 5.5rem;
	min-height: 44px;
	padding: 0.5rem 2rem 0.5rem 0.9rem;
	color: var(--wp--preset--color--ink);
	background-color: var(--wp--preset--color--base);
	border: 1.5px solid var(--sb-field-border);
	border-radius: 8px;
	font: inherit;
}

.fh-signup__note,
.fh-signup__policy {
	margin: 0;
}

.fh-signup__policy {
	margin-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--muted);
}

@media (max-width: 480px) {
	.fh-signup__facts > div {
		grid-template-columns: 1fr;
		gap: 0.1rem;
	}
}

/* Newsletter sign-up (footer and homepage), a one-field Gravity form. Field
   and button sit on one row where there is room. */
.sb-newsletter .gform_wrapper form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.75rem;
}

.sb-newsletter .gform_wrapper .gform-body {
	flex: 1 1 15rem;
}

.sb-newsletter .gform_wrapper.gravity-theme .gform_footer {
	flex: none;
	margin: 0;
	padding: 0;
}

/* Gravity renders the submit as a <button> here (an <input> in some versions);
   the theme's own button rule is (0,4,1) specific, so these match it to win. */
.sb-newsletter .gform_wrapper.gravity-theme .gform_footer input[type="submit"],
.sb-newsletter .gform_wrapper.gravity-theme .gform_footer button[type="submit"] {
	min-height: 52px;
	margin: 0;
}

.sb-newsletter__note {
	margin: 0.5rem 0 0;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.5;
}

.sb-newsletter .gform_confirmation_message {
	margin: 0;
}

/* On the dark footer a base-coloured button outlines cleanly; the usual
   action fill is too close to the ink ground for its edge to read. */
.sb-newsletter--footer .gform_wrapper.gravity-theme .gform_footer input[type="submit"],
.sb-newsletter--footer .gform_wrapper.gravity-theme .gform_footer button[type="submit"] {
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
}

.sb-newsletter--footer .gform_wrapper.gravity-theme .gform_footer input[type="submit"]:hover,
.sb-newsletter--footer .gform_wrapper.gravity-theme .gform_footer button[type="submit"]:hover {
	background: var(--wp--preset--color--tint);
	border-color: var(--wp--preset--color--tint);
}

.sb-newsletter--footer .sb-newsletter__note a {
	color: inherit;
}

/* A product embedded in a page via [product_page].

   The block single-product TEMPLATE lays the gallery and summary out as
   columns; the shortcode emits the classic markup instead, which stacks. Left
   alone, the gallery renders at the full content width and pushes the price and
   the add-to-cart controls below the fold — the two things the page exists for.

   This mirrors the 46/54 split in templates/single-product.html so an embedded
   product and a product page look like the same site. */
.entry-content .product.type-product > .summary {
	margin: 0;
}

.entry-content .product.type-product > .woocommerce-product-gallery {
	max-width: 26rem;
	margin-inline: auto;
}

@media (min-width: 782px) {
	.entry-content .product.type-product {
		display: grid;
		grid-template-columns: 46% 1fr;
		column-gap: var(--wp--preset--spacing--50);
		align-items: start;
	}

	.entry-content .product.type-product > .woocommerce-product-gallery {
		grid-column: 1;
		max-width: none;
	}

	.entry-content .product.type-product > .summary {
		grid-column: 2;
	}

	/* The description tab runs the full width underneath both columns. */
	.entry-content .product.type-product > .woocommerce-tabs {
		grid-column: 1 / -1;
		margin-top: var(--wp--preset--spacing--40);
	}
}

/* Variation dropdowns. Woo's own stylesheet is dequeued in theory, but its
   select styling (a fixed height that's too short for its own padding, so
   the option text clips top and bottom — reported 2026-09-24 on the "Term"
   and "Pickup day" dropdowns) still wins over the rule below on specificity
   or load order somewhere. `!important` and an explicit auto height make
   this the one that actually renders, and it takes over the chevron too
   (matching the Gravity Forms select treatment) rather than leave that to
   whichever stylesheet happens to be winning. */
.entry-content .variations select {
	width: 100%;
	height: auto !important;
	padding: 0.7em 2.4em 0.7em 0.9em !important;
	line-height: 1.5 !important;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--base) !important;
	border: 1px solid var(--wp--preset--color--tint);
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	appearance: none !important;
	-webkit-appearance: none !important;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A4E52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 0.9rem center !important;
	background-size: 18px 18px !important;
}

.entry-content .variations {
	width: 100%;
	margin-bottom: var(--wp--preset--spacing--20);
	border-collapse: collapse;
}

.entry-content .variations th,
.entry-content .variations td {
	display: block;
	padding: 0;
	text-align: left;
}

.entry-content .variations th {
	margin-bottom: 0.35rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.entry-content .variations td {
	margin-bottom: var(--wp--preset--spacing--10);
}

/* Stock state is the capacity cap talking. It should read as information, not
   as an error, until it actually is one. */
.entry-content .stock.in-stock {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.entry-content .stock.out-of-stock {
	color: var(--wp--preset--color--action);
	font-weight: 600;
}

/* Overlay text needs a scrim to stay readable over artwork. */
.sb-scrim::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(74, 78, 82, 0.55) 0%,
		rgba(74, 78, 82, 0.2) 45%,
		rgba(74, 78, 82, 0.5) 100%
	);
	pointer-events: none;
}

.sb-scrim > * {
	position: relative;
	z-index: 1;
}

/* A monochrome logo can serve both the light header and the dark footer by
   being inverted, rather than needing a separate reversed asset. Only sound for
   single-colour marks — a full-colour logo must have its own reversed file. */
.sb-footer__logo--invert img {
	filter: invert(1) brightness(1.9);
}

/* -------------------------------------------------------------------------
   11. Motion

   Paired with assets/js/reveal.js. The `sb-js` flag is set by an inline
   script in the head, BEFORE paint, so without JavaScript everything stays
   visible rather than being hidden behind an animation that never runs.
   ---------------------------------------------------------------------- */

.sb-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 640ms cubic-bezier(0.16, 1, 0.3, 1),
		transform 640ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sb-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* Without JavaScript nothing is ever revealed, so the content must start
   visible and the animation must be the enhancement. */
html:not(.sb-js) .sb-reveal {
	opacity: 1;
	transform: none;
	transition: none;
}

@media (prefers-reduced-motion: reduce) {
	.sb-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* -----------------------------------------------------------------
   Gravity radios, checkboxes and the datepicker

   Gravity renders the choice input as a SIBLING of its label, not
   inside it, so the card has to be the row. Styling the label instead
   leaves the native control floating outside the bordered box.
   ----------------------------------------------------------------- */

.gform_wrapper.gravity-theme .gfield_radio,
.gform_wrapper.gravity-theme .gfield_checkbox {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gform_wrapper.gravity-theme .gchoice {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 0;
	padding: 0 0.9rem;
	background: var(--wp--preset--color--surface);
	border: 1.5px solid var(--sb-field-border);
	border-radius: 10px;
	transition: background-color var(--wp--custom--transition--base),
		border-color var(--wp--custom--transition--base);
}

.gform_wrapper.gravity-theme .gchoice:hover,
.gform_wrapper.gravity-theme .gchoice:has(input:checked) {
	background: var(--wp--preset--color--tint);
	border-color: var(--wp--preset--color--action);
}

.gform_wrapper.gravity-theme .gchoice:has(input:focus-visible) {
	outline: 3px solid var(--wp--preset--color--action);
	outline-offset: 2px;
}

.gform_wrapper.gravity-theme .gchoice input[type="radio"],
.gform_wrapper.gravity-theme .gchoice input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0.85rem 0 0;
	accent-color: var(--wp--preset--color--action);
	cursor: pointer;
}

/* The label carries the vertical padding so the whole row height is a tap
   target, not just the text. `.gform_fields` for specificity: Gravity sets 600
   here, which otherwise renders UNCHECKED options bolder than the chosen one. */
.gform_wrapper.gravity-theme .gform_fields .gchoice label {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	min-height: 44px;
	margin: 0;
	padding: 0.7rem 0;
	background: none;
	border: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	line-height: 1.45;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}

.gform_wrapper.gravity-theme .gform_fields .gchoice:has(input:checked) label {
	font-weight: 600;
}

/* Gravity Forms 3.0 ships its OWN datepicker, not jQuery UI, so
   `#ui-datepicker-div` selectors match nothing. */
.gform-datepicker-calendar {
	border-radius: 12px;
	box-shadow: var(--wp--preset--shadow--lifted);
	font-family: var(--wp--preset--font-family--body);
}

.gform-datepicker-calendar td.day {
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
}

.gform-datepicker-calendar td.day:hover {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--action);
}

.gform-datepicker-calendar td.day.selected,
.gform-datepicker-calendar td.day[aria-selected="true"] {
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
	box-shadow: none;
}

.gform-datepicker-calendar td.day.dayToday {
	color: var(--wp--preset--color--action);
	font-weight: 600;
}

/* The honeypot is the whole anti-spam mechanism; it must stay hidden. */
.gform_wrapper.gravity-theme .gform_validation_container,
.gform_wrapper.gravity-theme .gfield--type-honeypot {
	display: none !important;
}

/* -------------------------------------------------------------------------
   8. Section identity — Farmhouse Florist / The Garage
   ---------------------------------------------------------------------- */

/* The brand guide gives each of the three businesses under this one site its
   own colour, submark, and illustration — Farmhouse Florist runs on olive
   green, The Garage on brick red. Client's explicit call, 2026-09-28: colour
   these sections but leave the shared sitewide header alone, so every rule
   here is scoped under the `sb-section-*` body class from inc/setup.php
   rather than touching header.html or the nav.

   Every page in each section (not just the landing page) gets: the page
   header band's watermark illustration below, and the eyebrow treatment.
   The section's own circular badge is placed once, on the section's landing
   page only, via content edit — see scripts/add-section-badges.php. */

/* Every other interior page (Shop, U-Pick, Flower Subscriptions, Garden
   Tours, The Lofts, Our Story, Visit, Contact, Thank You) gets the same
   corner-watermark treatment as a sitewide default, one shared illustration
   in the sitewide accent colour — the same "one illustration, reused
   everywhere" approach section 9 already takes for the CTA band, rather
   than a different flower per page. Added 2026-09-28, client's follow-up:
   "add these illustrations to the other pages as well."

   Scoped to any page-header band, not just non-section ones — the
   `.sb-section-florist`/`.sb-section-garage` rules below win on those pages
   because they add a class to the same selector, which is strictly more
   specific, not because of source order. Home is deliberately excluded:
   front-page.html's hero is a full-bleed photo, and a line-art watermark on
   top of a photograph doesn't work the way it does on a flat surface tint —
   it would need its own bespoke placement, not this one. The three legal
   pages (Privacy, Terms, Accessibility) use the plain `page` template, not
   page-header, so they were never in scope.

   Built as a `::before` layer rather than the band's own `background-image`
   (same technique as the CTA band in section 9) specifically so opacity can
   be controlled independently of the band's real text — a plain
   `background-image` on the band itself has no way to be faded without also
   fading the heading sitting on top of it. `position: relative` +
   `overflow: hidden` on the band clips the illustration to the band's own
   box; the `> *` rule keeps every real child (eyebrow, heading, lead,
   badge) stacked above the decorative layer. */
#sb-main > .entry-content > .wp-block-group:first-child {
	position: relative;
	overflow: hidden;
}

#sb-main > .entry-content > .wp-block-group:first-child > * {
	position: relative;
}

#sb-main > .entry-content > .wp-block-group:first-child::before {
	content: "";
	position: absolute;
	right: -60px;
	top: -80px;
	width: min(320px, 38vw);
	aspect-ratio: 2691 / 2462;
	background-image: url("assets/img/illustrations/bloom-accent.webp");
	background-repeat: no-repeat;
	background-size: contain;
	background-position: top right;
	pointer-events: none;
}

/* Farmhouse Florist: a pale olive bloom tucked into the page-header band.
   Watermark-only — decorative background imagery is exempt from the text
   contrast rules the rest of this stylesheet holds to. */
.sb-section-florist #sb-main > .entry-content > .wp-block-group:first-child::before {
	right: -60px;
	top: -80px;
	width: min(340px, 40vw);
	aspect-ratio: 2179 / 2131;
	background-image: url("assets/img/illustrations/bloom-florist.webp");
	background-position: top right;
}

/* Olive green fails AA as text at any size on this theme's grounds (2.06:1
   worst case — see SITE-BRIEF.md's `colors:` block) so it never becomes the
   eyebrow's own colour. A small filled dot ahead of the label is ornament,
   not text, and reads as this section's colour without an accessibility
   trade-off. */
.sb-section-florist .sb-eyebrow::before {
	content: "";
	display: inline-block;
	width: 0.4em;
	height: 0.4em;
	margin-right: 0.5em;
	border-radius: 50%;
	background: var(--wp--preset--color--olive);
	vertical-align: middle;
}

/* The Garage: a pale brick-red sprig in the opposite corner, so the two
   sections don't read as the same treatment recoloured. */
.sb-section-garage #sb-main > .entry-content > .wp-block-group:first-child::before {
	left: -40px;
	right: auto;
	top: 0;
	width: min(220px, 32vw);
	aspect-ratio: 1263 / 2589;
	background-image: url("assets/img/illustrations/sprig-garage.webp");
	background-position: top left;
}

/* Mobile and tablet: the page-header band is `alignfull` but its text sits
   in a constrained 40rem column, so the illustration's actual clearance is
   the band's own side margin — (viewport − 640px) / 2 — not the viewport
   itself. That margin is generous at desktop (400px at 1440px wide) but
   shrinks fast below it: by ~900px it's down to ~130px, well under the
   flower's own width, so it spills onto the text. Reported twice
   2026-09-28: first on a phone (the sprig's stem crossing the heading,
   fixed by shrinking + fading below 660px), then again on a tablet-width
   screenshot around ~900px still using the full-size desktop version — this
   breakpoint was the gap between the two fixes, not a new bug. Widened from
   660px to 1024px, reusing the same shrunk-and-faded values rather than a
   third size tier, since 110–160px comfortably clears even the tightest
   margin in this range and 10% opacity makes any remaining overlap harmless. */
@media (max-width: 1024px) {
	#sb-main > .entry-content > .wp-block-group:first-child::before {
		right: -90px;
		top: -50px;
		width: 160px;
		opacity: 0.1;
	}

	.sb-section-florist #sb-main > .entry-content > .wp-block-group:first-child::before {
		right: -90px;
		top: -50px;
		width: 160px;
		opacity: 0.1;
	}

	.sb-section-garage #sb-main > .entry-content > .wp-block-group:first-child::before {
		left: -70px;
		top: 0;
		width: 110px;
		opacity: 0.1;
	}
}

/* Brick red clears AA comfortably as text on this theme's surface and base
   grounds (4.99:1 / 5.87:1) — only Light Olive (tint) is too tight, and the
   eyebrow never sits on tint (see the note beside `brick_red` in
   SITE-BRIEF.md). Safe to use directly, unlike olive above. */
.sb-section-garage .sb-eyebrow {
	color: var(--wp--preset--color--brick-red);
}

/* Section badges, placed once on each landing page (see
   scripts/add-section-badges.php). Sized to sit comfortably under the lead
   paragraph without competing with the H1. */
.sb-section-badge {
	display: block;
	width: 128px;
	height: auto;
	margin: var(--wp--preset--spacing--30) auto 0;
}

/* -------------------------------------------------------------------------
   9. Sitewide decorative accent
   ---------------------------------------------------------------------- */

/* A faint leaf branch in the corner of every closing CTA band — the one
   illustration placement that is genuinely sitewide rather than
   section-scoped, since cta-band.php already carries a stable class. Kept
   very pale so it reads as texture, not as competing content; the band's
   heading and buttons are unaffected since this sits behind them. */
.sb-cta-band {
	position: relative;
	overflow: hidden;
}

.sb-cta-band::after {
	content: "";
	position: absolute;
	right: -40px;
	bottom: -30px;
	width: min(420px, 55vw);
	height: 140px;
	background-image: url("assets/img/illustrations/leaf-branch-accent.webp");
	background-repeat: no-repeat;
	background-size: contain;
	background-position: bottom right;
	opacity: 0.16;
	pointer-events: none;
}

.sb-cta-band > * {
	position: relative;
}

/* Past Events: jump links above the galleries, and anchored section headings. */
.sb-jump-nav {
	gap: 0.6rem;
	margin: 0 0 var(--wp--preset--spacing--40);
}

.sb-jump-nav .wp-block-button__link {
	padding: 0.5rem 1rem;
	font-size: var(--wp--preset--font-size--small);
}

.sb-jump-target {
	scroll-margin-top: 6rem;
}

/* Reserve each photo's real shape before it loads (the width/height attributes
   give the ratio) instead of WordPress's 3000x1500 lazy-load placeholder, so
   jump links land where they should. */
.sb-gallery--masonry img {
	contain-intrinsic-size: none;
}

/* Page title bands (the tinted band holding an eyebrow and the h1). The block
   markup pads them with spacing|50; re-pointing that token on the band itself
   tightens every title band at once, with no change to page content. */
.wp-block-group.alignfull.has-surface-background-color:has(> h1) {
	--wp--preset--spacing--50: var(--wp--preset--spacing--30);
}

.wp-block-group.alignfull.has-surface-background-color:has(> h1) > :last-child {
	margin-bottom: 0;
}

/* Past Events: the client's phone clips are small portrait video, so they sit
   centred at a modest width under their gallery rather than stretching. */
.sb-event-videos {
	gap: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--30);
}

.sb-event-video {
	width: 18rem;
	max-width: 100%;
	margin: 0;
}

.sb-event-video video {
	display: block;
	width: 100%;
	height: auto;
	/* !important: something injects an inline aspect-ratio with the axes swapped. */
	aspect-ratio: 320 / 568 !important;
	background: var(--wp--preset--color--ink);
	border-radius: 16px;
}

/* Class sign-up with several sessions and an add-on (e.g. extra jugs). */
.fh-sessions {
	margin: 0 0 var(--wp--preset--spacing--20);
	padding: 0;
	border: 0;
	min-width: 0;
}

.fh-sessions legend {
	margin-bottom: 0.5rem;
	padding: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--action);
}

.fh-session {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 0.75rem;
	row-gap: 0.15rem;
	align-items: baseline;
	margin: 0 0 var(--wp--preset--spacing--20);
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--base);
	border: 1.5px solid var(--sb-field-border);
	border-radius: 12px;
	cursor: pointer;
}

.fh-session:has(input:checked) {
	border-color: var(--wp--preset--color--action);
}

.fh-session.is-unavailable {
	cursor: default;
	opacity: 0.6;
}

.fh-session input {
	grid-row: 1 / span 2;
	align-self: center;
	margin: 0;
}

.fh-session__when {
	font-weight: 700;
}

.fh-session__left {
	grid-column: 2;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.fh-signup__form--sessions {
	display: block;
}

.fh-signup__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

/* Single class: the description runs the full width of the page content. The
   theme otherwise caps body copy at a readable measure. */
.fh-event-details p:not([class*="has-"]) {
	max-width: none;
}

.fh-event-details .wp-block-gallery {
	margin-top: var(--wp--preset--spacing--30);
	margin-bottom: var(--wp--preset--spacing--30);
}

/* Beat the generic `.fh-signup__form label` reset so session cards keep their gap. */
.fh-signup__form .fh-session {
	margin: 0 0 var(--wp--preset--spacing--20);
	font-weight: 400;
}

.fh-signup__form .fh-session:last-of-type {
	margin-bottom: 0;
}

.fh-signup__form .fh-sessions {
	margin-bottom: var(--wp--preset--spacing--20);
}
