/*
Theme Name: Caryn White
Theme URI: https://carynwhite.com
Author: Caryn White
Author URI: https://carynwhite.com
Description: Block theme for Caryn White, Spiritual Life Coach. Every brand decision (colour, type, spacing) lives in theme.json, and every homepage section is a registered pattern, so pages stay editable from the block editor without touching code.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.12
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: caryn-white
Tags: full-site-editing, block-patterns, blog, one-column, accessibility-ready, custom-colors, wide-blocks
*/

/* -------------------------------------------------------------------------
   Mechanism and layout that block supports cannot express: the header over
   the hero photo, the photo scrim, the footpath, the full-bleed splits and
   Gravity Forms. Every colour, size and space resolves to a theme.json
   preset, so a re-skin is an edit to theme.json.

   Section classes (cw-hero, cw-canopy, cw-split ...) are set by the patterns
   in the patterns folder. Keep the two in step.
   ---------------------------------------------------------------------- */

/* --- Accessibility ------------------------------------------------------ */

/* Visually hidden, still read by screen readers. Used by the new-tab note,
   the quote section's heading and core's own labels. Keep it on any CSS
   optimiser's never-strip list, or the hidden text shows to everyone. */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	width: auto;
	z-index: 100000;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 12px 22px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

.skip-link:focus {
	left: 16px;
	top: 16px;
}

:where(a, button, input, textarea, select, summary, .wp-block-navigation-item__content):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

/* On the dark band and over photos the deep rosehip ring would vanish. */
:where(.has-canopy-background-color, .cw-hero, .home .cw-header) :where(a, button, input, summary):focus-visible {
	outline-color: var(--wp--preset--color--accent-light);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

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

	/* `clip`, not `hidden`: `hidden` makes this a scroll container and
	   silently kills position: sticky on the header. */
	overflow-x: clip;
}

/* An in-page link (Book a Soul Reading -> #work) must not land under the
   sticky header. */
:target {
	scroll-margin-top: 96px;
}

/* The homepage header scrolls away with the hero, so nothing covers the
   target there and the offset would only leave a gap above the section. */
.home :target {
	scroll-margin-top: 0;
}

/* --- Section stacking ---------------------------------------------------
   WordPress puts the block gap between header, main and footer, and between
   stacked page sections, which shows the page background as a stripe
   between coloured bands. Rhythm comes from each section's own padding. The
   gap is only collapsed where two full-width sections meet, so ordinary
   blocks the client inserts between sections keep their spacing.
   ---------------------------------------------------------------------- */

.wp-site-blocks > * + * {
	margin-block-start: 0;
}

.wp-block-post-content > .alignfull + .alignfull,
.block-editor-block-list__layout > .alignfull + .alignfull {
	margin-block-start: 0;
}

.cw-section {
	padding-block: var(--wp--preset--spacing--90);
}

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

:where(p) {
	text-wrap: pretty;
}

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

a:hover {
	text-decoration-thickness: 2px;
}

/* A short row of a button and a text link (hero, About). */
.cw-actions {
	gap: 14px 28px;
	margin-top: 1.8em;
}

.cw-actions > p {
	margin: 0;
	font-weight: 500;
}

/* --- Buttons ------------------------------------------------------------ */

.wp-block-button__link {
	transition: background-color 120ms ease, color 120ms ease;
}

/* Button style "Light pink (for the dark green band)". */
.wp-block-button.is-style-on-dark > .wp-block-button__link {
	background-color: var(--wp--preset--color--accent-light);
	color: var(--wp--preset--color--canopy);
}

.wp-block-button.is-style-on-dark > .wp-block-button__link:hover,
.wp-block-button.is-style-on-dark > .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--accent-pale);
	color: var(--wp--preset--color--canopy);
}

/* --- Header -------------------------------------------------------------
   Interior pages: a solid sticky bar. Homepage: transparent, over the hero
   photo, scrolling away with it (as in the design).
   ---------------------------------------------------------------------- */

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Logged in, the fixed admin bar covers the top of the page. */
.admin-bar .wp-site-blocks > header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 0px);
}

.home .wp-site-blocks > header.wp-block-template-part {
	position: absolute;
	left: 0;
	right: 0;
	background: transparent;
	border-bottom: 0;
}

.cw-head__row {
	min-height: 84px;
	gap: 32px;
}

.cw-brand .wp-block-site-title a {
	color: inherit;
	text-decoration: none;
}

.cw-brand .wp-block-site-tagline {
	margin-top: 4px;
	color: var(--wp--preset--color--ink-soft);
}

.cw-head__actions {
	gap: 32px;
}

.cw-nav .wp-block-navigation__container {
	gap: 28px;
}

/* The header is one row or nothing: wrapped nav labels and a two-line
   button read as broken. Below the width where it all fits, the menu
   button takes over (see the media query further down). */
.cw-brand .wp-block-site-title,
.cw-brand .wp-block-site-tagline,
.cw-nav .wp-block-navigation-item__content,
.cw-head__cta .wp-block-button__link {
	white-space: nowrap;
}

.cw-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
	text-decoration: none;
}

.cw-nav .wp-block-navigation-item__content:hover {
	text-decoration: underline;
}

.home .cw-head,
.home .cw-brand .wp-block-site-tagline,
.home .cw-nav .wp-block-navigation-item__content,
.home .cw-nav .wp-block-navigation__responsive-container-open {
	color: var(--wp--preset--color--white);
}

.home .cw-brand .wp-block-site-tagline {
	opacity: 0.85;
}

/* The name, four links and the button need about 918px in one row (about
   1000px of viewport with the gutters), so below 1080px the menu button
   takes over. Core switches at 600px, so the overlay is held open here. The
   design's 900px is the layout breakpoint, not the header's. */
@media (max-width: 1079px) {
	.cw-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

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

	/* Two classes: core's .wp-block-buttons.is-layout-flex sets display. */
	.wp-block-buttons.cw-head__cta {
		display: none;
	}
}

/* The menu button reads as a labelled control, as in the design. */
.cw-nav .wp-block-navigation__responsive-container-open {
	padding: 9px 12px;
	border: 1px solid currentColor;
	border-radius: var(--wp--custom--radius--button);
}

/* Phone menu: full-screen canopy with the links in the heading face. */
/* Core paints the open overlay white from
   .wp-block-navigation:not(.has-background) ... .is-menu-open, four classes
   deep, so the selector has to match that to win. */
.wp-block-navigation.cw-nav:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50) var(--wp--custom--gutter) var(--wp--preset--spacing--60);
	background-color: var(--wp--preset--color--canopy);
	color: var(--wp--preset--color--leaf);
}

.cw-nav .is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch !important;
	padding-top: var(--wp--preset--spacing--80) !important;
}

.cw-nav .is-menu-open .wp-block-navigation__container {
	align-items: stretch !important;
	gap: 0 !important;
	width: 100%;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--leaf) 22%, transparent);
}

.cw-nav .is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--leaf) 22%, transparent);
}

.cw-nav .is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 0.85rem 0 !important;
	color: var(--wp--preset--color--leaf) !important;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--subhead);
	font-weight: 400;
	text-align: left;
}

/* --- Hero: full-width forest photo -------------------------------------- */

.wp-block-cover.cw-hero {
	min-height: min(92vh, 900px) !important;
	padding: 140px 0 clamp(48px, 7vw, 104px);
	background-color: var(--wp--preset--color--canopy);
}

/* The scrim. The block's own overlay is left at 0% so the client never has
   to manage it; this paints the gradient that keeps the text readable on
   whatever photo they choose. Darkest at the left and the foot, where the
   text sits. */
.wp-block-cover.cw-hero > .wp-block-cover__background {
	opacity: 1 !important;
	background-color: transparent !important;
	background-image:
		linear-gradient(90deg, color-mix(in srgb, var(--wp--preset--color--canopy-deep) 82%, transparent) 0%, color-mix(in srgb, var(--wp--preset--color--canopy-deep) 55%, transparent) 42%, transparent 72%),
		linear-gradient(0deg, color-mix(in srgb, var(--wp--preset--color--canopy-deep) 55%, transparent) 0%, transparent 45%),
		linear-gradient(180deg, color-mix(in srgb, var(--wp--preset--color--canopy-deep) 50%, transparent) 0%, transparent 18%);
}

/* Anything over the scrim needs its own stacking context or it renders
   washed out underneath it. Core gives the inner container one; keep it. */
.cw-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 1;
	color: var(--wp--preset--color--white);
}

/* With a content position set ("bottom left"), core shrink-wraps the inner
   container (width: auto, margin: 0), so its constrained layout has no
   width to centre the content column in and the copy sat against the
   screen edge. Full width restores the column, aligned with the header. */
.wp-block-cover.cw-hero.has-custom-content-position .wp-block-cover__inner-container {
	width: 100% !important;

	/* Core zeroes the side padding of a global-padding element nested in an
	   alignfull block, so below 1440px the headline touched the screen edge.
	   Restore the page gutter. */
	padding-left: var(--wp--custom--gutter) !important;
	padding-right: var(--wp--custom--gutter) !important;
}

.cw-hero h1 {
	max-width: 13ch;
	color: var(--wp--preset--color--white);
}

.cw-hero .cw-hero__walk {
	max-width: 20ch;
	margin: 0.55em 0 0 clamp(0px, 7vw, 120px);
	font-style: italic;
	line-height: 1.25;
}

.cw-hero .cw-hero__who {
	max-width: 46ch;
	margin: 2em 0 0;
	color: color-mix(in srgb, var(--wp--preset--color--white) 92%, transparent);
}

.cw-hero .cw-actions a:not(.wp-element-button) {
	color: var(--wp--preset--color--white);
}

@media (max-width: 900px) {
	.wp-block-cover.cw-hero {
		min-height: min(88svh, 760px) !important;
	}

	.wp-block-cover.cw-hero > .wp-block-cover__background {
		background-image:
			linear-gradient(0deg, color-mix(in srgb, var(--wp--preset--color--canopy-deep) 90%, transparent) 0%, color-mix(in srgb, var(--wp--preset--color--canopy-deep) 60%, transparent) 50%, color-mix(in srgb, var(--wp--preset--color--canopy-deep) 15%, transparent) 80%),
			linear-gradient(180deg, color-mix(in srgb, var(--wp--preset--color--canopy-deep) 55%, transparent) 0%, transparent 20%);
	}
}

/* --- Is this where you are? --------------------------------------------- */

.wp-block-columns.cw-where__cols {
	gap: clamp(32px, 6vw, 96px);
	margin-bottom: 0;
}

.wp-block-columns.cw-where__cols > .wp-block-column.cw-where__copy {
	flex: 7 1 0;
	max-width: 640px;
}

.wp-block-columns.cw-where__cols > .wp-block-column.cw-where__photo {
	flex: 4 1 0;
}

.cw-where h2 {
	margin-bottom: 0.8em;
}

.cw-where .cw-lead {
	line-height: 1.5;
}

.wp-block-image.cw-portrait {
	margin: 0;
}

.wp-block-image.cw-portrait img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: 50% 30%;
	border-radius: var(--wp--custom--radius--card);
}

/* Stacks at 900px with the menu and the splits, not at core's 781px. */
@media (max-width: 900px) {
	.wp-block-columns.cw-where__cols {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.cw-where__cols > .wp-block-column {
		flex-basis: 100% !important;
		max-width: none;
	}

	.wp-block-image.cw-portrait img {
		aspect-ratio: 4 / 3;
		max-height: 420px;
	}
}

/* --- Where to begin: the canopy band and the footpath -------------------- */

.cw-canopy a:not(.wp-element-button) {
	color: var(--wp--preset--color--accent-light);
}

.cw-canopy .cw-canopy__intro {
	max-width: 48ch;
	margin-top: 0.9em;
}

.cw-path {
	position: relative;
	margin-top: clamp(40px, 6vw, 72px);
}

.cw-path__line {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}

.cw-path__track {
	fill: none;
	stroke: var(--wp--preset--color--accent-light);
	stroke-opacity: 0.75;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 1 11;
}

.cw-path__trail {
	fill: none;
	stroke: var(--wp--preset--color--white);
	stroke-width: 10;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cw-path > .wp-block-columns.cw-leg {
	position: relative;
	justify-content: space-between;
	align-items: center;
	gap: clamp(20px, 3vw, 40px);
	margin: 0 0 clamp(72px, 8vw, 112px);
}

.cw-path > .wp-block-columns.cw-leg:last-child {
	margin-bottom: 0;
}

.wp-block-columns.cw-leg > .wp-block-column.cw-stop {
	flex: 0 0 50%;
}

.wp-block-columns.cw-leg > .wp-block-column.cw-aside {
	flex: 0 0 41.666%;
}

.cw-stop {
	position: relative;
	padding-left: 44px;
}

/* The stop's marker on the path. The ring in the band colour lets the path
   run into the dot without showing through it. */
.cw-stop::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55rem;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-light);
	box-shadow: 0 0 0 6px var(--wp--preset--color--canopy);
}

.cw-stop h3 {
	margin: 0;
}

.cw-stop .cw-stop__facts {
	margin-top: 0.35em;
	font-weight: 600;
}

.cw-stop .wp-block-buttons {
	margin-top: 1.2em;
}

.cw-aside .wp-block-image {
	margin: 0;
}

.cw-aside .wp-block-image img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--card);
}

.wp-block-quote.cw-aside__quote {
	margin: 0;
	padding-left: 22px;
	border-left: 2px solid var(--wp--preset--color--accent-light);
}

.wp-block-quote.cw-aside__quote p {
	margin: 0 0 0.6em;
	color: var(--wp--preset--color--white);
}

.wp-block-quote cite {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-style: normal;
	font-weight: 600;
}

.cw-aside__quote cite {
	color: var(--wp--preset--color--accent-light);
}

/* Set by path.js only, so without the script the asides simply show. */
.cw-path.is-walking .cw-aside {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.8s ease, transform 0.8s ease;
}

.cw-path.is-walking .cw-aside.is-in {
	opacity: 1;
	transform: none;
}

.cw-canopy .cw-canopy__also {
	margin-top: clamp(56px, 7vw, 88px);
	padding-top: 28px;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--leaf) 22%, transparent);
}

@media (max-width: 900px) {
	.cw-path > .wp-block-columns.cw-leg {
		display: block;
	}

	.wp-block-columns.cw-leg > .wp-block-column.cw-aside {
		margin: 32px 0 0 44px;
	}

	/* The stop comes first on a phone, whichever side it sits on above. */
	.cw-path > .wp-block-columns.cw-leg--right {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.cw-leg--right > .wp-block-column.cw-stop {
		order: -1;
	}
}

/* --- How I work ---------------------------------------------------------- */

.cw-how .cw-how__title {
	max-width: 24ch;
	margin-bottom: clamp(36px, 5vw, 56px);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.015em;
}

/* Two to a row. Core sizes grid columns from the block's own gap, so a
   wider gap set here made two columns no longer fit and it fell back to
   one. The columns are stated outright instead. */
.cw-how__grid {
	max-width: 980px;
	gap: 36px clamp(32px, 6vw, 96px) !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 781px) {
	.cw-how__grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

.cw-how__item h3 {
	margin-bottom: 0.35em;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
}

.cw-how__item p {
	margin-top: 0;
}

/* --- Full-bleed splits (About, Forest Wisdom) ----------------------------
   The photo half runs to the screen edge; the text half lines up with the
   page's content column, so it is padded by however far that column sits in
   from the edge.
   ---------------------------------------------------------------------- */

/* The split is a size container so the edge is measured from its own width
   (100cqw). 100vw includes the scrollbar, which put the text 7.5px right of
   the content column at 1440px. */
.wp-block-media-text.cw-split {
	container-type: inline-size;
	--cw-edge: max(var(--wp--custom--gutter), calc((100cqw - var(--wp--style--global--content-size)) / 2));
	min-height: min(78vh, 760px);
	grid-template-columns: 50% 1fr;
}

.wp-block-media-text.cw-split.has-media-on-the-right {
	grid-template-columns: 1fr 50%;
}

.wp-block-media-text.cw-split > .wp-block-media-text__content {
	padding: clamp(56px, 8vw, 112px) var(--cw-edge) clamp(56px, 8vw, 112px) clamp(32px, 6vw, 96px);
}

.wp-block-media-text.cw-split.has-media-on-the-right > .wp-block-media-text__content {
	padding-left: var(--cw-edge);
	padding-right: clamp(32px, 6vw, 96px);
}

.wp-block-media-text.cw-split > .wp-block-media-text__content > * {
	max-width: 540px;
}

.cw-split h2 {
	margin-bottom: 0.6em;
}

.cw-about .cw-actions {
	margin-top: 1.6em;
}

@media (max-width: 900px) {
	.wp-block-media-text.cw-split,
	.wp-block-media-text.cw-split.has-media-on-the-right {
		grid-template-columns: 100% !important;
		min-height: 0;
	}

	.wp-block-media-text.cw-split > .wp-block-media-text__media {
		grid-column: 1 !important;
		grid-row: 1 !important;
		height: 62vw;
		max-height: 440px;
	}

	.wp-block-media-text.cw-split > .wp-block-media-text__content {
		grid-column: 1 !important;
		grid-row: 2 !important;
		padding: clamp(48px, 10vw, 72px) var(--wp--custom--gutter) !important;
	}
}

/* --- Client quote (large) ------------------------------------------------ */

.cw-voices {
	padding-block: clamp(72px, 10vw, 140px);
}

.wp-block-quote.cw-quote-large {
	max-width: 1000px;
	margin: 0;
	padding: 0;
	border: 0;
}

.wp-block-quote.cw-quote-large p {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--quote-large);
	line-height: 1.35;
	letter-spacing: -0.015em;
}

.cw-quote-large cite {
	color: var(--wp--preset--color--ink-soft);
}

.cw-voices .cw-press {
	margin-top: clamp(40px, 5vw, 64px);
	padding-top: 24px;
	border-top: 1px solid var(--wp--preset--color--line);
}

/* --- Forest Wisdom sign-up ---------------------------------------------- */

.cw-wisdom .cw-reset {
	margin-top: 2em;
	padding-top: 1.4em;
	border-top: 1px solid var(--wp--preset--color--line);
}

.cw-reset h3 {
	margin-bottom: 0.4em;
	font-size: 1.3rem;
}

.cw-reset p {
	margin-top: 0;
}

/* The sign-up is one field and a button on one line, as in the design. */
.cw-wisdom .gform_wrapper.gform-theme form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	margin: 1.4em 0 0.6em;
}

.cw-wisdom .gform_wrapper.gform-theme .gform-body {
	flex: 1 1 240px;
}

.cw-wisdom .gform_wrapper.gform-theme .gform_footer {
	margin: 0 !important;
	padding: 0 !important;
}

.cw-wisdom .gform_wrapper.gform-theme .gform_validation_errors {
	display: none;
}

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

.cw-foot {
	padding-block: 56px 40px;
	font-size: 0.97rem;
}

.cw-foot a {
	color: var(--wp--preset--color--leaf);
}

.cw-foot .wp-block-site-title a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.cw-foot .wp-block-site-tagline {
	margin-top: 4px;
}

.cw-foot__brand > p:not(.wp-block-site-title, .wp-block-site-tagline) {
	margin-top: 1.2em;
}

.wp-block-columns.cw-foot__cols {
	gap: 32px;
	margin-bottom: 0;
}

.cw-foot .cw-foot__head {
	margin: 0 0 0.8em;
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0;
}

.cw-foot__list {
	display: grid;
	gap: 0.45em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cw-foot .cw-foot__base {
	gap: 8px 24px;
	margin-top: 48px;
	padding-top: 20px;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--leaf) 18%, transparent);
}

.cw-foot__base p {
	margin: 0;
}

@media (max-width: 781px) {
	.wp-block-columns.cw-foot__cols {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.cw-foot__cols > .wp-block-column {
		flex-basis: calc(50% - 16px) !important;
	}

	.wp-block-columns.cw-foot__cols > .wp-block-column.cw-foot__brand {
		flex-basis: 100% !important;
	}
}

/* --- FAQ (core/details) --------------------------------------------------
   For the Akashic Records page. Questions in core/details also become
   FAQPage schema (functions.php), so editing one updates both.
   ---------------------------------------------------------------------- */

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 20px 0;
}

.wp-block-details summary {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 24px;
	list-style: none;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
}

.wp-block-details summary::-webkit-details-marker,
.wp-block-details summary::marker {
	display: none;
	content: "";
}

.wp-block-details summary::after {
	content: "+";
	flex: none;
	color: var(--wp--preset--color--accent);
	font-size: 1.4em;
	line-height: 1;
}

.wp-block-details[open] summary::after {
	content: "\2212";
}

.wp-block-details > *:not(summary) {
	max-width: 70ch;
	margin-top: 12px;
	color: var(--wp--preset--color--ink-soft);
}

/* --- Gravity Forms -------------------------------------------------------
   GF 3.x (Orbital theme) is styled through its --gf-* custom properties,
   which is upgrade-safe. GF prints each form's own colours inline against
   the form's ID, so these carry !important. Applies to every form,
   including ones the client adds.
   ---------------------------------------------------------------------- */

.gform_wrapper.gform-theme {
	--gf-color-primary: var(--wp--preset--color--accent) !important;
	--gf-color-primary-rgb: 168, 35, 79 !important;
	--gf-color-primary-contrast: var(--wp--preset--color--white) !important;
	--gf-color-primary-darker: var(--wp--preset--color--accent-deep) !important;
	--gf-color-primary-lighter: var(--wp--preset--color--leaf) !important;
	--gf-color-danger: var(--wp--preset--color--accent-deep) !important;
	--gf-color-danger-rgb: 142, 28, 66 !important;

	--gf-ctrl-bg-color: var(--wp--preset--color--white) !important;
	--gf-ctrl-bg-color-focus: var(--wp--preset--color--white) !important;
	--gf-ctrl-border-color: var(--wp--preset--color--field-line) !important;
	--gf-ctrl-border-color-focus: var(--wp--preset--color--primary) !important;
	--gf-ctrl-outline-color-focus: color-mix(in srgb, var(--wp--preset--color--primary) 22%, transparent) !important;
	--gf-ctrl-outline-width-focus: 3px !important;
	--gf-ctrl-radius: var(--wp--custom--radius--field) !important;
	--gf-ctrl-color: var(--wp--preset--color--contrast) !important;
	--gf-ctrl-color-focus: var(--wp--preset--color--contrast) !important;
	--gf-ctrl-font-family: var(--wp--preset--font-family--body) !important;
	--gf-ctrl-font-size: var(--wp--preset--font-size--medium) !important;
	--gf-ctrl-size: 3.0625rem !important;
	--gf-ctrl-padding-x: 14px !important;
	--gf-ctrl-placeholder-color: var(--wp--preset--color--ink-soft) !important;
	--gf-ctrl-icon-color: var(--wp--preset--color--ink-soft) !important;

	--gf-ctrl-label-color-primary: var(--wp--preset--color--contrast) !important;
	--gf-ctrl-label-font-family-primary: var(--wp--preset--font-family--body) !important;
	--gf-ctrl-label-font-size-primary: var(--wp--preset--font-size--medium) !important;
	--gf-ctrl-label-font-weight-primary: 600 !important;
	--gf-ctrl-label-color-req: var(--wp--preset--color--ink-soft) !important;
	--gf-ctrl-label-font-family-req: var(--wp--preset--font-family--body) !important;
	--gf-ctrl-label-font-size-req: var(--wp--preset--font-size--small) !important;
	--gf-ctrl-label-font-weight-req: 400 !important;
	--gf-ctrl-desc-color: var(--wp--preset--color--ink-soft) !important;
	--gf-ctrl-desc-font-family: var(--wp--preset--font-family--body) !important;
	--gf-ctrl-desc-font-size: var(--wp--preset--font-size--small) !important;
	--gf-ctrl-desc-color-error: var(--wp--preset--color--accent-deep) !important;

	--gf-ctrl-btn-bg-color-primary: var(--wp--preset--color--accent) !important;
	--gf-ctrl-btn-bg-color-hover-primary: var(--wp--preset--color--accent-deep) !important;
	--gf-ctrl-btn-bg-color-focus-primary: var(--wp--preset--color--accent-deep) !important;
	--gf-ctrl-btn-border-color-primary: var(--wp--preset--color--accent) !important;
	--gf-ctrl-btn-border-color-hover-primary: var(--wp--preset--color--accent-deep) !important;
	--gf-ctrl-btn-border-color-focus-primary: var(--wp--preset--color--accent-deep) !important;
	--gf-ctrl-btn-color-primary: var(--wp--preset--color--white) !important;
	--gf-ctrl-btn-color-hover-primary: var(--wp--preset--color--white) !important;
	--gf-ctrl-btn-color-focus-primary: var(--wp--preset--color--white) !important;
	--gf-ctrl-btn-radius: var(--wp--custom--radius--button) !important;
	--gf-ctrl-btn-font-family: var(--wp--preset--font-family--body) !important;
	--gf-ctrl-btn-font-size: 1rem !important;
	--gf-ctrl-btn-font-weight: 600 !important;
	--gf-ctrl-btn-size: 3.0625rem !important;

	--gf-form-gap-y: 1.5rem !important;
	--gf-form-gap-x: 1.25rem !important;
	--gf-label-space-primary: 0.5rem !important;
	--gf-desc-space: 0.4rem !important;
}

/* Orbital controls carry a 38px line-height, which clips text in a box
   with padding. State it. */
.gform_wrapper.gform-theme input:not([type="checkbox"], [type="radio"], [type="submit"]),
.gform_wrapper.gform-theme select {
	line-height: 1.4;
}

/* GF's selects are appearance: none with no vertical padding, and Chrome
   then sits the chosen option at the top of the 49px box. */
.gform_wrapper.gform-theme select {
	padding-block: 11px;
}

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

.gform_confirmation_message {
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
	background: var(--wp--preset--color--white);
	border-left: 3px solid var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--field);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

/* --- New-tab links -------------------------------------------------------
   A small arrow after text links that open a new tab (external sites and
   PDFs, set in functions.php). Not on buttons or image links.
   ---------------------------------------------------------------------- */

a.cw-new-tab:not(.wp-element-button):not(:has(img))::after {
	content: "\2197";
	display: inline-block;
	margin-left: 0.2em;
	font-size: 0.8em;
	text-decoration: none;
}

/* --- Print --------------------------------------------------------------- */

@media print {
	.wp-site-blocks > header.wp-block-template-part {
		position: static;
	}

	.cw-path__line,
	.cw-nav {
		display: none;
	}
}
