/*
 * Nomon Theme — base stylesheet, loaded on the frontend and inside the editor iframe.
 *
 * Tailwind handles reset and utilities; this file owns only what utilities can't express.
 * Responsibilities and the cascade smoke-test: docs/styling.md.
 */

/* Up front so layer order doesn't depend on when Blockstudio's inline style loads. Holds
 * only while Blockstudio emits layered utilities — smoke-test in docs/styling.md. */
@layer theme, base, components, utilities;

/* The value theme.json `styles.spacing.padding` reads; theme.json cannot step at a breakpoint. */
:root {
	--site-padding-x: 60px;
	--scroll-offset: 150px;
	--section-y: 75px;
	--gradient-brand: linear-gradient(90deg, #f7a82a, #ff0000);
	--button-text: #fff;
	--bg-ramona-tall: linear-gradient(rgb(34 3 11), rgb(54 3 16) 25%, rgb(85 17 2) 50%, rgb(95 44 1) 75%, rgb(58 35 0));
	--bg-ramona-wide:
		radial-gradient(48% 150% at 12% 100%, rgb(89 19 2), rgb(58 3 18) 50%, transparent),
		radial-gradient(35% 110% at 95% 100%, rgb(40 3 10), transparent),
		rgb(13 1 5);
	--bg-ramona-footer: var(--bg-ramona-wide);
}
@media (max-width: 767.98px) {
	:root { --bg-ramona-footer: var(--bg-ramona-tall); }
}
@media (max-width: 1220px) {
	:root { --scroll-offset: 80px; }
}
@media (max-width: 991px) {
	:root { --site-padding-x: 30px; }
}

html {
	background-color: var(--wp--preset--color--black);
}

/* Unlayered on purpose: wrapping this ties with preflight's `body { line-height: inherit }`. */
body {
	background-color: var(--wp--preset--color--black);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--regular);
	font-weight: 400;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	--prose-cap: 900px;
}

@media (max-width: 991px) {
	body { --prose-cap: 100%; }
}

/* WP's `size-full` marker collides with Tailwind's utility of that name; unlayered on
 * purpose so it beats the layered utility. See docs/styling.md. */
.wp-block-image.size-full {
	width: auto;
	height: auto;
}

/* Block, not inline-block: the line box under an inline anchor opens a gap above the caption. */
.wp-block-image > a {
	display: block;
	width: fit-content;
}

/* Text-align control is hidden; unlayered at (0,2,1) to beat core's unlayered `:root .has-text-align-*`. */
:root :is(p, h1, h2, h3, h4, h5, h6):is(
	.has-text-align-left,
	.has-text-align-center,
	.has-text-align-right
) {
	text-align: inherit;
}

@layer base {
	body p { margin-block: 1.5rem; }
	body figure { margin-block: 3rem; }

	body :is(h1, h2, h3, h4, h5, h6) { font-weight: 700; line-height: 1.4; }

	body h1 { font-size: var(--wp--preset--font-size--heading-1); margin-block: 3rem 1.5rem; }
	body h2 { font-size: var(--wp--preset--font-size--heading-2); margin-block: 3rem 1.5rem; }
	body h3 { font-size: var(--wp--preset--font-size--heading-3); margin-block: 2rem 1.5rem; }
	body h4 { font-size: var(--wp--preset--font-size--heading-5); margin-block: 2rem 1.5rem; font-weight: 400; color: var(--wp--preset--color--orange); }
	body h5 { font-size: 20px; margin-block: 1.5rem 1.5rem; }
	body h6 { font-size: 18px; margin-block: 1.5rem 1.5rem; }

	/* Stacked headings: any heading directly following another collapses its top margin. */
	body :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) { margin-top: 0; }

	/* core/list block: restore bullets/numbers and indent that Tailwind preflight zeroes. */
	.wp-block-list { margin-block: 1.5rem; padding-inline-start: 1.5em; }
	.wp-block-list:where(ul) { list-style: disc; }
	.wp-block-list:where(ol) { list-style: decimal; }
	.wp-block-list :where(li > *) { margin-block: 0.5rem; }
	.wp-block-list :where(li > :first-child) { margin-top: 0; }
	.wp-block-list :where(li > :last-child)  { margin-bottom: 0; }

	/* First/last reset: heading at top of a section, paragraph at end, don't push the container. */
	body :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }
	body p:last-child { margin-bottom: 0; }
}

/* Prose cap; descendant selector so prose inside a nested group is capped too. */
.wp-block-group :is(p, h1, h2, h3, h4, h5, h6, ul, ol, figure, form),
:is(.site-content, .page-content) > :is(p, h1, h2, h3, h4, h5, h6, ul, ol, figure, form) {
	max-width: var(--prose-cap);
	margin-inline: auto;
}

/* The `.content` scale of pages and event singles; not for home blocks. Literal px: docs/styling.md. */
@layer base {
	:is(.page-content, .editor-styles-wrapper) :is(h2, h3, h4, h5, h6) {
		font-weight: 600;
		line-height: 1.6;
		overflow-wrap: anywhere;
	}
	:is(.page-content, .editor-styles-wrapper) h2 { font-size: 36px; }
	:is(.page-content, .editor-styles-wrapper) h3 { font-size: 28px; }
	:is(.page-content, .editor-styles-wrapper) h4 { font-size: 24px; }
	:is(.page-content, .editor-styles-wrapper) h5 { font-size: 20px; }
	:is(.page-content, .editor-styles-wrapper) h6 { font-size: 18px; }
	@media (max-width: 767px) {
		:is(.page-content, .editor-styles-wrapper) h2 { font-size: 30px; }
		:is(.page-content, .editor-styles-wrapper) h3 { font-size: 24px; }
	}

	:is(.page-content, .editor-styles-wrapper) :is(p, li) {
		font-size: 20px;
		font-weight: 300;
		line-height: 36px;
		overflow-wrap: anywhere;
	}
	:is(.page-content, .editor-styles-wrapper) :is(ul, ol) {
		font-size: 20px;
		list-style-position: outside;
		padding-inline: 1em;
	}
	:is(.page-content, .editor-styles-wrapper) li { margin-top: 10px; }
	:is(.page-content, .editor-styles-wrapper) :where(p, li, td, th) a { text-decoration: underline; }
	:is(.page-content, .editor-styles-wrapper) :is(strong, b) { font-weight: 400; }

	:is(.page-content, .editor-styles-wrapper) :is(td, th) {
		font-size: 18px;
		line-height: 30.6px;
	}
	:is(.page-content, .editor-styles-wrapper) td { font-weight: 400; }
	:is(.page-content, .editor-styles-wrapper) figcaption { font-size: 16px; }
	:is(.page-content, .editor-styles-wrapper) .wp-block-embed__wrapper iframe { height: 400px; }
}

/* Unlayered, as WP's layout margins are; direct children only, so block utilities still win inside `nomon/*`. */
:is(.page-content, .editor-styles-wrapper) .wp-block-group > :is(h2, h3, h4, h5, h6) { margin-block: 50px 30px; }
:is(.page-content, .editor-styles-wrapper) .wp-block-group > p { margin-block: 30px; }
:is(.page-content, .editor-styles-wrapper) .wp-block-group > :is(ul, ol) { margin-block: 0; }
:is(.page-content, .editor-styles-wrapper) .wp-block-group > figure { margin-block: 30px 0; }
:is(.page-content, .editor-styles-wrapper) .wp-block-group > :first-child { margin-top: 0; }
:is(.page-content, .editor-styles-wrapper) .wp-block-group > :last-child { margin-bottom: 0; }

/* Live's `h2` margin of 50 at every width; each `h2` starts a group here. */
.page-content.has-global-padding > .wp-block-group + .wp-block-group { margin-top: 50px; }

/* WP's preset class is `!important`, and the editor saves it on every paragraph (assets/js/editor.js). */
:is(.page-content, .editor-styles-wrapper) p.has-regular-font-size { font-size: 20px !important; }

.page-content > :first-child { margin-top: 75px; }
.page-content > :last-child { margin-bottom: 75px; }

.wp-block-group .nomon-opening-hours { max-width: var(--prose-cap); margin-inline: auto; }

/* Auto-bleed, mirroring native `.alignfull`; `!important` matches WP's own margin rule. */
.has-global-padding > .wp-block-group.has-background {
	max-width: none;
	margin-left: calc(var(--wp--style--root--padding-left) * -1) !important;
	margin-right: calc(var(--wp--style--root--padding-right) * -1) !important;
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
}

/* Spacing controls are disabled in theme.json, so colored sections need a default. */
.wp-block-group.has-background {
	padding-block: clamp(2rem, 6vw, 4rem);
}

/* Body text is white, so every non-black swatch needs dark text. */
.wp-block-group:is(.has-orange-background-color, .has-red-background-color, .has-white-background-color, .has-off-white-background-color) {
	color: var(--wp--preset--color--black);
}

/* Duplo gap; the owl selector leaves the first section flush with the page top. Scoped to
 * `core/group` as the only duplo — add block names when composite blocks join. */
.has-global-padding > .wp-block-group + .wp-block-group {
	margin-top: clamp(2rem, 5vw, 75px);
}

@layer base {
	html {
		scroll-behavior: smooth;
		scroll-padding-top: var(--scroll-offset, 2rem);
	}

	/* Editor blocks have their own selection outline. */
	:focus-visible:not(.block-editor-block-list__block, [contenteditable]) {
		outline: 2px solid var(--wp--preset--color--white);
		outline-offset: 2px;
		box-shadow: 0 0 0 2px var(--wp--preset--color--black);
	}

	/* Gutenberg can't hide these toolbar buttons, so cancel the effect instead. */
	:where(h1, h2, h3, h4, h5, h6) :is(strong, b, em, i) {
		font-weight: inherit;
		font-style: inherit;
	}

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

	.skip-link:focus {
		clip-path: none;
		height: auto;
		margin: 0;
		overflow: auto;
		padding: 1rem;
		position: absolute;
		inset-block-start: 0;
		inset-inline-start: 0;
		width: auto;
		z-index: 100000;
		background: #000;
		color: #fff;
		text-decoration: underline;
	}

	/* WCAG 2.4.4: per-site CSS may restyle or hide the glyph, never the screen-reader text. */
	a.is-external-link::after,
	a.is-new-window::after {
		content: " ↗";
		display: inline-block;
		font-size: 0.85em;
		vertical-align: super;
		line-height: 1;
	}
	a.is-new-window::after {
		content: " ⧉";
	}
	a.is-external-link.is-new-window::after {
		content: " ⧉";
	}

	/* Hides the glyph in the footer and credit bar only; the screen-reader text stays. */
	:is(.site-footer, .nomon_footer) a.is-external-link::after,
	:is(.site-footer, .nomon_footer) a.is-new-window::after,
	:is(.site-footer, .nomon_footer) a.is-external-link.is-new-window::after {
		content: none;
	}
}

/* Critical Swiper layout before the lazy vendor CSS lands. No pre-init `visibility: hidden`
 * — that hid the hero from FlyingPress's above-the-fold pass, costing the LCP preload. */
.swiper { overflow: hidden; }
.swiper-wrapper { display: flex; }
.swiper-slide { flex-shrink: 0; width: 100%; }
/* Overrides FlyingPress Lazy Render's inline style — see docs/runtimes.md. */
.swiper-slide,
.swiper-slide * { content-visibility: visible !important; }

/* Glass lives on a pseudo: `position` or `backdrop-filter` on the details box would trap the
 * link's `::before`, and the whole card has to stay one click target, closed too. */
.event-card__details {
	width: 100%;
	height: 90px;
	padding: 15px 25px;
	display: flex;
	flex-direction: column;
	/* Not `hidden`: focusing the clipped link would scroll the box and leave it scrolled when closed. */
	overflow: clip;
	transition: height .5s ease;
}
.event-card__details::before {
	content: "";
	position: absolute;
	inset: auto 0 0;
	z-index: -1;
	height: 90px;
	background: rgb(0 0 0 / var(--overlay, .19));
	box-shadow: 0 4px 30px rgba(0, 0, 0, .1);
	backdrop-filter: blur(8.9px);
	transition: height .5s ease;
}
.event-card:is(:hover, :focus-within) .event-card__details,
.event-card:is(:hover, :focus-within) .event-card__details::before { height: 100%; }
.event-card__badge { transition: opacity .5s ease; }
/* The opened glass covers the badge and leaves it unreadable (2.1:1). */
.event-card:is(:hover, :focus-within) .event-card__badge { opacity: 0; }
.event-card__date {
	display: block;
	margin-bottom: 5px;
	font-size: 18px;
	line-height: 25.2px;
	font-weight: 500;
	color: #fff;
}
/* Doubled class, unlayered: must beat the prose cap on headings inside `.wp-block-group`. */
.event-card .event-card__title {
	flex-shrink: 0;
	max-width: 100%;
	margin: 0 0 5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.event-card:is(:hover, :focus-within) .event-card__title { white-space: normal; }
/* Opacity only: `visibility: hidden` would take the link out of the tab order. */
.event-card__link {
	align-self: flex-start;
	margin-top: auto;
	margin-bottom: -40px;
	border-bottom: 1px solid var(--wp--preset--color--orange);
	color: #fff;
	opacity: 0;
	transition: opacity .5s ease, margin-bottom .5s ease;
}
.event-card__link::before {
	content: "";
	position: absolute;
	inset: 0;
}
.event-card:is(:hover, :focus-within) .event-card__link {
	margin-bottom: 15px;
	opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
	.event-card__details,
	.event-card__details::before,
	.event-card__badge { transition: none; }
}

/* Grid brings its own 25/75; the page's first/last-child margins of 75 would stack on it. */
.page-content > .nomon-events { margin-block: 0; }
.nomon-events__slider {
	margin-top: 25px;
	--swiper-pagination-bottom: -46px;
	--swiper-pagination-color: var(--wp--preset--color--orange);
	--swiper-pagination-bullet-inactive-color: var(--wp--preset--color--orange);
	--swiper-pagination-bullet-inactive-opacity: .5;
}
/* Not `hidden` below 768: the dots sit outside the box and would be clipped with the cards. */
.nomon-events__slider.swiper { overflow: clip visible; }
.nomon-events__slider .swiper-slide { width: 90%; }
@media (min-width: 768px) {
	/* Cards run past the track to the viewport edge; `.site-content` clips them. */
	.nomon-events__slider.swiper { overflow: visible; }
	.nomon-events__slider .swiper-slide { width: 25%; }
	/* Swiper makes one dot per snap point and none past the track, so a short list would get a
	 * single dot. A full-width last slide gives every card its own snap point. */
	.nomon-events__slider .swiper-slide:last-child { width: 100%; }
	.nomon-events__slider .swiper-slide:last-child .event-card { width: 25%; }
}
/* A 10px dot in a 24px target (WCAG 2.5.8); padding, so the dot's own look stays. */
:is(.nomon-events__slider, .home-hero) {
	--swiper-pagination-bullet-size: 10px;
	--swiper-pagination-bullet-horizontal-gap: 0px;
}
:is(.nomon-events__slider, .home-hero) .swiper-pagination-bullet {
	box-sizing: content-box;
	padding: 7px;
	background-clip: content-box;
}
.site-content { overflow-x: clip; }

.home-content {
	position: relative;
	background: var(--bg-ramona-tall);
}
/* Unlayered, as WP's layout margins are. */
.home-content > .wp-block-group {
	box-sizing: border-box;
	max-width: calc(1480px + 2 * var(--site-padding-x));
	margin-block: 0;
	margin-inline: auto;
	padding: 75px var(--site-padding-x);
}
.home-content > .wp-block-group > * {
	max-width: none;
	margin-block: 0;
}
/* Must beat the prose cap on headings inside `.wp-block-group`. */
.home-content .wp-block-group > h2.wp-block-heading {
	position: relative;
	z-index: 2;
	color: #f5f5f5;
	font-size: 45px;
	line-height: 63px;
	font-weight: 700;
}
.home-content > .wp-block-group > .nomon-social-wall { margin-top: 50px; }
/* Above the fade: it would dim the panel's text below AA, down to 2.5:1 at 820. */
.home-content .nomon-imagecard__panel {
	position: relative;
	z-index: 2;
}
.home-content > :is(.nomon-intro, .nomon-imagecard) { margin-block: 0; }
/* Live's margins collapsed to 75 between cards. */
.home-content > .nomon-imagecard + .nomon-imagecard { padding-top: 0; }
@media (max-width: 767px) {
	.home-content .wp-block-group > h2.wp-block-heading {
		font-size: 35px;
		line-height: 49px;
	}
}

/* The share button's own label says where it goes; the screen-reader text stays. */
.event-share a::after { content: none; }

/* Editor-only: flattens Gutenberg's InnerBlocks wrapper chain, which breaks parent flex/grid.
 * Unlayered to outrank editor styles; descendant combinators because `useBlockProps` shifts a level. */
[data-type^="nomon/"] .block-editor-inner-blocks,
[data-type^="nomon/"] .block-editor-block-list__layout:not([data-type]) {
	display: contents;
}

/* Editor-only: the block wrapper, not the link, is the flex child of `nomon/buttons`. */
[data-type="nomon/button"] {
	display: grid;
}
.nomon-buttons--equal.flex-row > [data-type="nomon/button"] {
	flex: 1 1 0%;
	min-width: 0;
}

/* Editor-only: Blockstudio's marker span takes `:first-child`, so the block after it gets a block gap. */
:is(.is-layout-flow, .is-layout-constrained) > [data-blockstudio-render-marker]:first-child + * {
	margin-block-start: 0;
}

/* Editor-only: the front end swaps the `+` glyph for `plus.svg` (inc/integrations/core-blocks.php). */
[data-type="core/accordion-heading"] .wp-block-accordion-heading__toggle-icon {
	position: relative;
	-webkit-text-fill-color: transparent;
}
[data-type="core/accordion-heading"] .wp-block-accordion-heading__toggle-icon::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: currentColor;
	mask: url("../icons/plus.svg") center / contain no-repeat;
}

/* Editor-only: a drag saves the box's computed `aspectRatio`, which the ratio dropdown
 * cannot display or clear (`docs/integrations.md`). Selector length beats the components
 * stylesheet's own `.has-show-handle` rule at (0,3,0). */
[data-type="core/image"] .components-resizable-box__container.has-show-handle .components-resizable-box__handle {
	display: none;
}

/* Editor-only: makes the post title read as page metadata, not the first H1. No negative
 * inline margin needed — `useRootPaddingAwareAlignments` leaves body itself unpadded. */
/* WP core's editor styles add a top padding to the iframe body; zero it. */
body {
	padding-top: 0;
}

.edit-post-visual-editor__post-title-wrapper {
	background-color: #f0f0f0;
	color: #1e1e1e;
	margin-block-start: 0 !important;
	margin-block-end: 3rem;
	padding-inline: var(--wp--style--root--padding-left);
}

.edit-post-visual-editor__post-title-wrapper .editor-post-title {
	color: inherit;
	margin: 0 auto;
	max-width: var(--wp--style--global--content-size);
	padding-block: 3rem;
}

.edit-post-visual-editor__post-title-wrapper .editor-post-title::before {
	content: "Sivun otsikko";
	display: block;
	color: #666;
	font-size: 0.875rem;
	font-weight: 500;
	margin-block-end: 0.75rem;
}

.post-type-post .edit-post-visual-editor__post-title-wrapper .editor-post-title::before {
	content: "Artikkelin otsikko";
}

.edit-post-visual-editor__post-title-wrapper .editor-post-title [data-rich-text-placeholder]::after {
	color: #666;
	opacity: 1;
}

:root {
	/* Must stay numeric: JS reads it via getComputedStyle for matchMedia. */
	--breakpoint-nav: 767px;

	--hamburger-color: var(--wp--preset--color--white);
	--hamburger-color-active: var(--wp--preset--color--white);
	--hamburger-width: 20px;
	--hamburger-layer-height: 2px;

	/* Desktop dropdowns */
	--color-main-level: var(--wp--preset--color--white);
	--color-hover-main-level: var(--wp--preset--color--orange);
	--color-current: var(--wp--preset--color--white);
	--typography-size-main-level: 18px;
	--typography-weight-main-level: 500;
	--padding-main-level-vertical: 0;
	--gap-main-level-horizontal: 30px;
	--gap-between-dropdown-toggle: 0.9375rem;
	--dropdown-toggle-size: 0.75rem;

	--color-sub-menu: var(--wp--preset--color--white);
	--color-hover-sub-menu: var(--wp--preset--color--white);
	--color-background-sub-menu: var(--wp--preset--color--black);
	--typography-size-sub-menu: 1rem;
	--typography-weight-sub-menu: 600;
	--padding-sub-menu-vertical: 0.625rem;
	--padding-sub-menu-link-vertical: 0.5rem;
	--padding-sub-menu-link-horizontal: 1.25rem;
	--width-sub-menu: 12.5rem;
	--gap-dropdown: 1.6rem;

	/* Mobile drawer */
	--width-navigation: 300px;
	--color-background-menu-items: #23282d;
	--color-separator-nav-mobile: transparent;
	--color-main-level-menu-item-mobile: var(--wp--preset--color--white);
	--color-main-level-menu-item-hover-focus-mobile: var(--wp--preset--color--white);
	--color-sub-menu-mobile: color-mix(in srgb, var(--wp--preset--color--white) 80%, transparent);
	--color-current-menu-item: var(--wp--preset--color--white);
	--color-dropdown-toggle-mobile: var(--wp--preset--color--white);
	--typography-size-main-level-mobile: 18px;
	--typography-weight-main-level-mobile: 400;
	--padding-main-level-vertical-mobile: 14.2px; /* 60 with the 30.6 line and the 1 separator */
	--typography-size-sub-menu-mobile: 0.9375rem;
	--typography-weight-sub-menu-mobile: 600;
	--margin-left-sub-menu: 0.625rem;
	--padding-sub-menu-vertical-mobile: 0.5rem;
	--padding-sub-menu-horizontal-mobile: 30px;
}

.hamburger {
	display: block;
	width: var(--hamburger-width);
	height: var(--hamburger-layer-height);
	background-color: var(--hamburger-color);
	position: relative;
	transition: all 0.2s ease 0s;
	flex-shrink: 0;
}
.hamburger::before,
.hamburger::after {
	content: "";
	display: block;
	width: var(--hamburger-width);
	height: var(--hamburger-layer-height);
	background-color: var(--hamburger-color);
	position: absolute;
	transition: all 0.2s ease 0s;
}
.hamburger::before { top: -7px; }
.hamburger::after  { bottom: -7px; }

.js-nav-active .hamburger { background-color: transparent; }
.js-nav-active .hamburger::before,
.js-nav-active .hamburger::after {
	background-color: var(--hamburger-color-active);
	left: 0;
	top: 0;
}
.js-nav-active .hamburger::before { transform: rotate(-45deg); }
.js-nav-active .hamburger::after  { transform: rotate(45deg); }

.nav-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 -12px 0 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	position: relative;
	z-index: 99999;
}

body.js-nav-active { overflow: hidden; }

@media (max-width: 767.98px) {
	.nav-primary .menu-items ul { display: none; }
	.nav-primary ul .sub-menu.toggled-on { display: block; }

	.nav-primary { align-self: center; }

	.site-header ul,
	.site-header li,
	.site-header a { position: relative; }

	/* Fixed against `.site-header__row`, whose blur makes it the containing block: top 0 is under the marquee. */
	.nav-primary .menu-items-wrapper {
		position: fixed;
		top: 0;
		left: 0;
		right: auto;
		width: var(--width-navigation);
		height: calc(100dvh - 27px); /* JS recalculates from the row's position */
		background: var(--bg-ramona-tall);
		transform: translate3d(-100%, 0, 0);
		transition: transform 220ms cubic-bezier(0.19, 1, 0.22, 1), opacity 180ms ease-in-out;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		overflow: auto;
		padding-bottom: 7.5rem;
		backface-visibility: hidden;
		z-index: 5;
	}

	.nav-primary .menu-items { margin: 0; padding: 0; list-style: none; }
	.nav-primary .menu-item  { margin: 0; }

	.nav-primary .menu-item a {
		display: block;
		padding-block: var(--padding-main-level-vertical-mobile);
		padding-inline: var(--padding-sub-menu-horizontal-mobile);
		border-top: 1px solid var(--color-separator-nav-mobile);
		color: var(--color-main-level-menu-item-mobile);
		font-size: var(--typography-size-main-level-mobile);
		font-weight: var(--typography-weight-main-level-mobile);
		text-decoration: none;
		position: relative;
		z-index: 0;
	}
	.nav-primary .menu-item a:hover,
	.nav-primary .menu-item a:focus { color: var(--color-main-level-menu-item-hover-focus-mobile); }
	.nav-primary .menu-item.current-menu-parent > a,
	.nav-primary .menu-item.current-menu-item > a { color: var(--color-current-menu-item); }

	.nav-primary .sub-menu { margin: 0; padding: 0; list-style: none; }
	.nav-primary .sub-menu a {
		color: var(--color-sub-menu-mobile);
		font-size: var(--typography-size-sub-menu-mobile);
		font-weight: var(--typography-weight-sub-menu-mobile);
		padding-block: var(--padding-sub-menu-vertical-mobile);
		padding-left: calc(var(--padding-sub-menu-horizontal-mobile) + var(--margin-left-sub-menu));
	}
	.nav-primary .sub-menu .sub-menu a {
		padding-left: calc(var(--padding-sub-menu-horizontal-mobile) + var(--margin-left-sub-menu) * 2);
	}

	.nav-primary .dropdown-toggle {
		position: absolute;
		top: 2px;
		right: 0;
		height: 100%;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		overflow: hidden;
		padding-block: var(--padding-sub-menu-vertical-mobile);
		padding-left: var(--padding-sub-menu-horizontal-mobile);
		padding-right: calc(var(--padding-sub-menu-horizontal-mobile) - calc(var(--dropdown-toggle-size) / 2));
		background: transparent;
		border: 0;
		color: var(--color-dropdown-toggle-mobile);
		cursor: pointer;
		z-index: 100;
	}
	.nav-primary .dropdown-toggle svg {
		width: var(--dropdown-toggle-size);
		height: var(--dropdown-toggle-size);
		transition: transform 150ms;
		pointer-events: none;
	}
	.nav-primary .dropdown-toggle.toggled-on svg { transform: rotate(180deg); }
	.nav-primary .sub-menu .dropdown-toggle { color: var(--color-sub-menu-mobile); }

	.js-nav-active .nav-primary .menu-items-wrapper {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translate3d(0, 0, 0);
	}

	/* The drawer's `overflow: auto` would clip an outer ring. */
	.nav-primary .menu-item a:focus-visible { outline-offset: -2px; }

	body::after {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 998;
		background: rgba(0, 0, 0, .25);
		opacity: 0;
		visibility: hidden;
		transition: opacity .2s, visibility .2s;
	}
	body.js-nav-active::after {
		opacity: 1;
		visibility: visible;
	}
}

@media (min-width: 768px) {
	.nav-toggle { display: none; }

	.nav-primary { line-height: 0; padding-block: 0; }

	.nav-primary .menu-items {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-end;
		column-gap: var(--gap-main-level-horizontal);
		row-gap: 0.625rem;
		margin: 0;
		padding: 0;
		list-style: none;
		position: relative;
	}

	.nav-primary .menu-item { margin: 0; position: relative; }

	.nav-primary .menu-item > a {
		display: inline-flex;
		align-items: center;
		color: var(--color-main-level);
		font-size: var(--typography-size-main-level);
		font-weight: var(--typography-weight-main-level);
		line-height: 1.7;
		padding-block: var(--padding-main-level-vertical);
		white-space: nowrap;
		text-decoration: none;
	}
	.nav-primary .menu-item.current-menu-parent > a,
	.nav-primary .menu-item.current-menu-item > a { color: var(--color-current); }
	.nav-primary .menu-item > a:hover {
		color: var(--color-hover-main-level);
		text-decoration: underline;
	}

	.nav-primary .menu-item.menu-item-has-children {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--gap-between-dropdown-toggle);
	}

	/* Bridges the menu-item/submenu gap so hover survives the empty space; only present
	 * while hovered, so it doesn't capture clicks at rest. */
	.nav-primary .menu-item.menu-item-has-children::after {
		content: "";
		display: block;
		position: absolute;
		top: 100%;
		width: 100%;
		max-width: var(--width-sub-menu);
		height: var(--gap-dropdown);
		visibility: hidden;
	}
	.nav-primary .menu-item.menu-item-has-children.hover-intent::after {
		visibility: visible;
		z-index: 100;
	}
	.nav-primary .sub-menu .menu-item-has-children::after { display: none; }

	.nav-primary .sub-menu {
		--color-current: var(--color-sub-menu);
		position: absolute;
		top: 100%;
		left: 0;
		width: var(--width-sub-menu);
		margin: 0;
		margin-top: var(--gap-dropdown);
		padding: 0;
		list-style: none;
		background-color: var(--color-background-sub-menu);
		opacity: 0;
		visibility: hidden;
		transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);
		z-index: 9;
	}
	.nav-primary .sub-menu .sub-menu {
		top: 0;
		left: 100%;
		margin-top: calc(-1 * var(--padding-sub-menu-vertical));
	}

	.nav-primary .sub-menu.is-out-of-viewport { left: auto; right: 0; }
	.nav-primary .sub-menu.is-out-of-viewport .sub-menu,
	.nav-primary .sub-menu .sub-menu.is-out-of-viewport { left: auto; right: 100%; }

	.nav-primary .menu-item .sub-menu a {
		display: inline-flex;
		align-items: center;
		width: 100%;
		color: var(--color-sub-menu);
		font-size: var(--typography-size-sub-menu);
		font-weight: var(--typography-weight-sub-menu);
		line-height: 1.5;
		padding-block: var(--padding-sub-menu-link-vertical);
		padding-inline: var(--padding-sub-menu-link-horizontal);
		text-decoration: none;
		white-space: normal;
	}
	.nav-primary .menu-item .sub-menu a:hover,
	.nav-primary .menu-item .sub-menu a:focus {
		color: var(--color-hover-sub-menu);
		text-decoration: underline;
		text-decoration-thickness: 2px;
	}
	.nav-primary .sub-menu .menu-item.current-menu-item > a {
		text-decoration: underline;
		text-decoration-thickness: 2px;
	}

	/* :hover for mouse, :focus-within for keyboard, .hover-intent (JS) to keep the menu
	 * open briefly after the cursor leaves and absorb stray movement. */
	.nav-primary .menu-item-has-children:hover > .sub-menu,
	.nav-primary .menu-item-has-children:focus-within > .sub-menu,
	.nav-primary .menu-item-has-children.hover-intent > .sub-menu {
		opacity: 1;
		visibility: visible;
		z-index: 12;
	}

	/* Dropdown toggle on desktop is decorative — pointer-events: none lets
	 * clicks fall through to the parent <a>. The svg is the visual cue. */
	.nav-primary .dropdown-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		background: transparent;
		border: 0;
		pointer-events: none;
	}
	.nav-primary .dropdown-toggle svg {
		width: var(--dropdown-toggle-size);
		height: var(--dropdown-toggle-size);
		transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1);
	}
	.nav-primary .menu-item-has-children.hover-intent > .dropdown-toggle svg {
		transform: rotateX(180deg);
	}
	.nav-primary .sub-menu .dropdown-toggle svg { transform: rotate(-90deg); }
	.nav-primary .sub-menu .hover-intent > .dropdown-toggle svg {
		transform: rotate(-90deg) rotateX(180deg);
	}
}

.site-footer { background: var(--bg-ramona-footer); }

/* Strength per image: inc/integrations/image-overlay.php. */
.photo-overlay { background-color: rgb(0 0 0 / var(--overlay, 0)); }
.site-header__row { background-color: rgb(0 0 0 / var(--overlay-nav, 0)); }

.home-hero {
	height: 100vh;
	--swiper-wrapper-transition-timing-function: cubic-bezier(.25, 1, .5, 1);
	--swiper-navigation-color: var(--wp--preset--color--white);
	--swiper-navigation-sides-offset: 3px;
	--swiper-pagination-color: var(--wp--preset--color--orange);
	--swiper-pagination-bullet-inactive-color: var(--wp--preset--color--orange);
	--swiper-pagination-bullet-inactive-opacity: .5;
	--swiper-pagination-bottom: 14px;
}
/* Before the lazy vendor CSS lands, so the text does not jump. */
.home-hero .swiper-wrapper { height: 100%; }
/* Beats the vendor's unlayered `height: 100%` on the arrow svg. */
.home-hero :is(.swiper-button-prev, .swiper-button-next) svg {
	width: auto;
	height: 25px;
}

.site-marquee {
	display: flex;
	height: 27px;
	-webkit-backdrop-filter: blur(8.9px);
	backdrop-filter: blur(8.9px);
	background-color: rgb(0 0 0 / var(--overlay-marquee, 0));
	color: var(--wp--preset--color--orange);
	font-size: 16px;
	line-height: 27px;
}
.site-marquee__viewport {
	flex: 1;
	min-width: 0;
	overflow: hidden;
}
/* Six items at 951 px: -50% is three pitches, so 150s keeps live's one pitch per 50s. */
.site-marquee__track {
	display: flex;
	width: max-content;
	animation: site-marquee 150s linear infinite;
}
.site-marquee__track.is-paused,
.site-marquee__track:hover,
.site-marquee__track:focus-within {
	animation-play-state: paused;
}
.site-marquee__item {
	flex: none;
	min-width: 951px;
	white-space: nowrap;
}
.site-marquee__toggle {
	flex: none;
	display: grid;
	place-items: center;
	align-self: center;
	width: 24px;
	height: 24px;
	color: var(--wp--preset--color--white);
	cursor: pointer;
}
/* Inset: the row is barely taller than the button and the page edge would clip the ring. */
.site-marquee__toggle:focus-visible { outline-offset: -2px; }
.site-marquee__toggle svg { width: 16px; height: 16px; }
.site-marquee__toggle[aria-pressed="false"] svg:last-child,
.site-marquee__toggle[aria-pressed="true"] svg:first-child {
	display: none;
}
@keyframes site-marquee {
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.site-marquee { height: auto; min-height: 27px; }
	.site-marquee__track { width: auto; animation: none; }
	.site-marquee__item {
		flex: 1;
		min-width: 0;
		padding-inline: var(--site-padding-x);
		white-space: normal;
	}
	.site-marquee__item[aria-hidden],
	.site-marquee__toggle {
		display: none;
	}
}

/* Beats WS Form's `:where([data-wsf-style-id])` tokens; its hover and focus tokens read this one. */
.wsf-form {
	--wsf-field-button-primary-color: var(--button-text);
	--wsf-field-button-font-size: 20px;
	--wsf-field-button-font-weight: 700;
	--wsf-form-color-danger: var(--wp--preset--color--orange);
	--wsf-field-border-color-focus: var(--wp--preset--color--orange);
	--wsf-field-box-shadow-color-focus: var(--wp--preset--color--orange);
	/* Typed text sits on the white field, where orange would fail AA. */
	--wsf-field-color-invalid: #000;
	--wsf-field-checkbox-checkmark-color: #000;
	/* The black tick needs a light box: 2.7:1 on WS Form's default blue. */
	--wsf-field-checkbox-checked-color-background: var(--wp--preset--color--orange);
	--wsf-field-radio-checked-color: #000;
}
.wsf-form .wsf-button-primary { background-image: var(--gradient-brand); }
.wsf-form .wsf-button-primary:is(:hover, :focus-visible) { background-image: none; }
