/*
 * Nomad Saddle: base styles.
 *
 * The foundation (design tokens, typography, links, buttons, forms and a page
 * container), then components, then utilities. Colours are neutral
 * placeholders until the design is final; change the tokens in :root and
 * everything follows.
 */

/* Tokens
   ------------------------------------------------------------------ */

:root {
	/* Fonts. Goudy Bookletter 1911 only ships a regular weight. */
	--font-heading: "Goudy Bookletter 1911", Georgia, "Times New Roman", serif;
	--font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Type scale, one size per text style in the design. The design calls
	   them "Body 1" to "Body 7" and "Button", in this order; here they are
	   named for what they are. Sizes: 30, 26, 23, 18, 17, 15, 11 and 13px.
	   Body (Body 4) is the default for page text. */
	--text-lead: 1.875rem;
	--text-subtitle-lg: 1.625rem;
	--text-subtitle: 1.4375rem;
	--text-body: 1.125rem;
	--text-subtitle-sm: 1.0625rem;
	--text-small: 0.9375rem;
	--text-caption: 0.6875rem;
	--text-button: 0.8125rem;
	/* Body 4's old name, still used by templates and saved content. */
	--text-body-lg: var(--text-body);

	/* Headings are 50, 36, 36, 22, 16 and 13px in the design; the three
	   largest shrink on narrow screens and are full size from about 1200px. */
	--text-h6: 0.8125rem;
	--text-h5: 1rem;
	--text-h4: 1.375rem;
	--text-h3: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);
	--text-h2: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);
	--text-h1: clamp(2rem, 1.25rem + 2.5vw, 3.125rem);

	/* Colours. Background, buttons, dividers, testimonial cards and footer are
	   from the design; the rest are still placeholders. */
	--color-text: #000000;
	--color-muted: #6b665f;
	--color-bg: #f1f4f4;
	--color-surface: #f5f5f5;
	--color-border: #d9d5ce;
	/* Dividers (hr and the Separator block) and the other thin lines. */
	--color-divider: #cbd7d6;
	--color-divider-strong: #acacac;
	/* Text that cannot be clicked: the current page number, and Previous or
	   Next when there is no page to go to. */
	--color-inactive: #acacac;
	--color-accent: #000000;
	--color-accent-contrast: #ffffff;
	/* Button fill. The footer sets it back to black (see .site-footer). */
	--color-button: #3a4753;
	--color-testimonial: #cbd7d6;
	/* Form fields: white, so they stand out on the page's background. */
	--color-field: #ffffff;
	--color-error: #b3261e;
	/* A sent form's thank-you, behind white text (about 5:1 contrast). */
	--color-success: #3b7a57;
	/* A sold-out row of a ride's Available Dates table. */
	--color-sold-out: #c0c0c0;
	--color-footer: #3a4753;
	--color-footer-text: #ffffff;

	/* Spacing. */
	--space-xs: 0.5rem;
	--space-sm: 1rem;
	--space-md: 1.5rem;
	--space-lg: 2.5rem;
	--space-xl: 4rem;
	--space-2xl: 6rem;
	/* Between sections of a page: 32px on phones, growing to 70px from 875px wide. */
	--space-section: clamp(2rem, 8vw, 4.375rem);
	/* Above and below a divider: 32px on phones, growing to 80px from 1000px wide. */
	--space-divider: clamp(2rem, 8vw, 5rem);

	/* Layout. */
	--container: 72rem;
	--container-narrow: 46rem;
	/* About 856px: the booking page and the Journal's cards. */
	--container-medium: 53.5rem;
	/* Placeholder: the "Wide width" block alignment. */
	--container-wide: 90rem;
	--gutter: 1.25rem;
	/* Rounded corners on images, boxes and buttons. */
	--radius: 5px;
}

/* Reset
   ------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	/* A flat colour. The header's background matches it (see
	   .site-header::before). The stone texture below is switched off. */
	background: var(--color-bg);
	/* background: var(--color-bg) url("../images/body-bg.jpg") repeat;
	background-size: 50%; */
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--text-body);
	font-weight: 400;
	/* 25px on 18px in the design. */
	line-height: 1.389;
	-webkit-font-smoothing: antialiased;
}

/* The classic editor's editing area is a <body> of its own, and this
   stylesheet is loaded into it: give it back the space round its text. */
.mce-content-body {
	margin: var(--space-xs) var(--space-sm);
}

img,
svg,
video,
iframe {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

/* Images and Cover blocks in the content get the same rounded corners as the
   rest of the site, except at full width, where they meet the screen's
   edges. An Image block's own Rounded style or radius setting still wins.
   The Cover block clips its photo and overlay to its corners. */
.wp-block-image img,
img[class*="wp-image-"],
.wp-block-cover {
	border-radius: var(--radius);
}

.wp-block-image.alignfull img,
.wp-block-cover.alignfull {
	border-radius: 0;
}

/* Typography
   ------------------------------------------------------------------ */

/* Each heading style is also a class (.h1 to .h6), for text that takes a
   heading's look without being a heading. */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
	margin: 0 0 var(--space-sm);
	font-family: var(--font-heading);
	font-weight: 400;
	/* "Auto" in the design: the font's own line height. */
	line-height: normal;
	text-wrap: balance;
}

/* Capitals. */
h1,
.h1 {
	font-size: var(--text-h1);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* Capitals, with 10% letter-spacing. */
h2,
.h2 {
	font-size: var(--text-h2);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* Not capitals, even on an h1 or h2 given the look of an H3 (the booking
   page title, the Rides page cards, the Journal post title). */
h3,
.h3 {
	font-size: var(--text-h3);
	letter-spacing: normal;
	text-transform: none;
}

/* Always centred. */
h4,
.h4 {
	font-size: var(--text-h4);
	letter-spacing: 0.2em;
	text-align: center;
}

h5,
.h5 {
	font-size: var(--text-h5);
	letter-spacing: 0.2em;
}

/* The one heading in the body font, and bold. */
h6,
.h6 {
	font-family: var(--font-body);
	font-size: var(--text-h6);
	font-weight: 700;
	letter-spacing: 0.25em;
}

/* The three smallest are capitals. */
h4,
h5,
h6,
.h4,
.h5,
.h6 {
	text-transform: uppercase;
}

/* Text styles. Page text is the body style by default; the classes put any
   style on any element, and each one sets the whole style so it also works
   on a heading. The is-style- classes are the same styles chosen in the block
   editor (see inc/editor.php). */
.text-lead,
.text-subtitle-lg,
.text-subtitle,
.text-body,
.text-body-lg,
.text-subtitle-sm,
.text-small,
.text-caption,
.is-style-text-lead,
.is-style-text-subtitle-lg,
.is-style-text-subtitle,
.is-style-text-body-lg,
.is-style-text-subtitle-sm,
.is-style-text-small,
.is-style-text-caption {
	font-family: var(--font-body);
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
}

.text-lead,
.is-style-text-lead {
	font-family: var(--font-heading);
	font-size: var(--text-lead);
	/* 35px on 30px in the design. */
	line-height: 1.167;
}

.text-subtitle-lg,
.text-subtitle,
.text-subtitle-sm,
.is-style-text-subtitle-lg,
.is-style-text-subtitle,
.is-style-text-subtitle-sm {
	font-weight: 700;
	line-height: normal;
}

.text-subtitle-lg,
.is-style-text-subtitle-lg {
	font-size: var(--text-subtitle-lg);
}

.text-subtitle,
.is-style-text-subtitle {
	font-size: var(--text-subtitle);
}

/* Body 4, the default page text. text-body-lg is its old name, kept because
   templates and saved content use it. */
.text-body,
.text-body-lg,
.is-style-text-body-lg {
	font-size: var(--text-body);
	/* 25px on 18px. */
	line-height: 1.389;
}

/* Body 5: bold, 20px on 17px. */
.text-subtitle-sm,
.is-style-text-subtitle-sm {
	font-size: var(--text-subtitle-sm);
	line-height: 1.176;
}

/* Body 6: 20px on 15px. */
.text-small,
.is-style-text-small {
	font-size: var(--text-small);
	line-height: 1.333;
}

/* Image captions use the caption style too. */
.text-caption,
.is-style-text-caption,
.wp-caption-text,
figcaption {
	font-size: var(--text-caption);
	/* 16px on 11px. */
	line-height: 1.455;
}

/* Space above a heading that follows other content. */
* + h2,
* + h3,
* + h4 {
	margin-top: var(--space-lg);
}

p,
ul,
ol,
blockquote,
table,
figure {
	margin: 0 0 var(--space-sm);
}

ul,
ol {
	padding-left: 1.25em;
}

li + li {
	margin-top: 0.25em;
}

a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--color-muted);
}

/* The Hyperlink Group block (a plugin) makes a whole group of blocks one
   link: its text is underlined only on hover. */
a.wp-block-tiptip-hyperlink-group-block {
	text-decoration: none;
}

a.wp-block-tiptip-hyperlink-group-block:hover {
	text-decoration: underline;
}

/* Not on text being edited in the block editor. */
:focus-visible:where(:not([contenteditable])) {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

strong,
b {
	font-weight: 700;
}

small {
	font-size: var(--text-caption);
}

blockquote {
	padding-left: var(--space-md);
	border-left: 2px solid var(--color-border);
	font-family: var(--font-heading);
	font-size: var(--text-subtitle);
}

/* The class is there to beat core's 2px rule for the Separator block. The
   line takes the text colour, so a colour picked in the editor still applies. */
hr,
.wp-block-separator {
	margin: var(--space-divider) 0;
	border: 0;
	border-top: 1px solid;
	color: var(--color-divider);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: var(--space-xs) var(--space-sm);
	border-bottom: 1px solid var(--color-border);
	text-align: left;
}

/* Layout
   ------------------------------------------------------------------ */

/* Page content sits in a centred container by default. */
main,
.container {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}

/* The gap under the content is the footer's margin. */
main {
	padding-top: var(--space-lg);
}

/* A page built from sections in the block editor (the front page). The page
   has no container of its own: each block keeps to the container width unless
   it is set to Wide width or Full width in the editor. */
.page-sections {
	width: auto;
	padding-block: 0;
}

.page-sections > * {
	max-width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}

.page-sections > .alignwide,
.page-sections > .container--wide {
	max-width: min(100% - 2 * var(--gutter), var(--container-wide));
}

.page-sections > .alignfull {
	max-width: none;
}

.container--narrow {
	max-width: var(--container-narrow);
}

.container--medium {
	max-width: var(--container-medium);
}

/* As wide as a Wide width block (the footer). */
.container--wide {
	width: min(100% - 2 * var(--gutter), var(--container-wide));
}

/* On its own on a block of a sections page, it still keeps the side gutters. */
.page-sections > .container--narrow {
	max-width: min(100% - 2 * var(--gutter), var(--container-narrow));
}

.page-sections > .container--medium {
	max-width: min(100% - 2 * var(--gutter), var(--container-medium));
}

/* On phones the space between sections shrinks to 32px, which is too tight
   above these: they get 40px more (the Journal cards under the hero, the
   ride's Itinerary, and How to Book and Cancellation Policy). */
@media (max-width: 39.99rem) {
	.container--medium {
		padding-top: var(--space-lg);
	}
}

/* Sections pages that keep the usual space under the header: a regular page
   (page.php), which has no visible title, and the Journal. */
.page-plain,
.journal {
	padding-top: var(--space-lg);
}

section + section {
	margin-top: var(--space-lg);
}

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

/* Not the block editor's own buttons (.components-button), which share the
   editing area with the page content. */
.button,
button:where(:not(.components-button)),
input[type="submit"] {
	display: inline-block;
	padding: 0.8em 1.6em;
	border: 1px solid var(--color-button);
	border-radius: var(--radius);
	background: var(--color-button);
	color: var(--color-accent-contrast);
	font-family: var(--font-body);
	font-size: var(--text-button);
	font-weight: 700;
	letter-spacing: 0.25em;
	/* "Auto" in the design: the font's own line height. */
	line-height: normal;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.button:hover,
button:where(:not(.components-button)):hover,
input[type="submit"]:hover {
	background: white;
	color: var(--color-accent);
}

.button--outline {
	background: transparent;
	color: var(--color-button);
}

.button--outline:hover {
	background: var(--color-button);
	color: var(--color-accent-contrast);
}

/* A bare button around an icon: slider arrows and the menu button. */
.icon-button {
	padding: var(--space-xs);
	border: 0;
	background: none;
	color: var(--color-text);
	line-height: 0;
}

/* No fill on hover, unlike other buttons: only the colour changes. */
.icon-button:hover {
	background: none;
	color: var(--color-muted);
}

.icon-button:disabled {
	opacity: 0.3;
	cursor: default;
}

/* Forms (including Contact Form 7)
   ------------------------------------------------------------------ */

label {
	display: block;
	margin-bottom: var(--space-sm);
	font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="search"],
input[type="password"],
select,
textarea {
	display: block;
	width: 100%;
	margin-top: 0.35em;
	padding: 0.7em 0.9em;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	background: var(--color-field);
	color: var(--color-text);
	font: inherit;
	/* Body 6 (15px on 20px), except on iOS (below). */
	font-size: var(--text-small);
	font-weight: 400;
	line-height: 1.333;
}

/* iPhones and iPads zoom the page when a field with text under 16px takes
   focus, so there the fields are 16px. Only iOS browsers support
   -webkit-touch-callout. */
@supports (-webkit-touch-callout: none) {
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	input[type="number"],
	input[type="url"],
	input[type="search"],
	input[type="password"],
	select,
	textarea {
		font-size: max(1rem, var(--text-small));
	}
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--color-accent);
	outline: 0;
}

.wpcf7 form {
	max-width: var(--container-narrow);
}

/* Single-line fields and dropdowns are about 35px high, like the sign-up
   form's. Text areas keep their height. */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 input[type="url"],
.wpcf7 select {
	height: 2.1875rem;
	padding-block: 0;
}

/* The error under a field and the reply under the form are in the Body 6
   style (15px on 20px), the same size as the fields. */
.wpcf7-not-valid-tip {
	margin-top: 0.35em;
	color: var(--color-error);
	font-size: var(--text-small);
	font-weight: 400;
	line-height: 1.333;
}

.wpcf7 form .wpcf7-response-output {
	margin: var(--space-sm) 0 0;
	padding: var(--space-sm);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font-size: var(--text-small);
	line-height: 1.333;
}

/* Contact Form 7 adds the sent class to the form once the message has gone:
   the thank-you is then white on green, to stand out. */
.wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--color-success);
	background: var(--color-success);
	color: var(--color-accent-contrast);
}

/* WordPress content
   ------------------------------------------------------------------ */

.alignleft {
	float: left;
	margin: 0 var(--space-md) var(--space-sm) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--space-sm) var(--space-md);
}

.aligncenter {
	margin-inline: auto;
}

/* A captioned image from the classic editor. WordPress sets its width to
   the image's; it still has to fit a narrow column. */
.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
figcaption {
	margin-top: var(--space-xs);
	color: var(--color-muted);
}

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

/* Site header
   ------------------------------------------------------------------ */

/* Sticky, and shorter once the page is scrolled: site-header.js adds
   .is-scrolled past 50px. The header's real height never changes. Its parts
   are moved and scaled with transforms and its background is clipped shorter.
   A sticky header that really changed height would shift the page under it,
   and browsers respond by adjusting the scroll position, which makes the
   header flicker around the 50px mark. */
.site-header {
	/* Space above and below the logos, and how much they scale down when
	   scrolled. Small screens first. */
	--header-pad: var(--space-sm);
	--header-scale: 0.75;

	/* The shapes (width divided by height) of the logo name and the brand
	   mark, set on the element by inc/header.php. The site name stands in for
	   a logo at about 6:1, and no brand mark takes no room. */
	--header-logo-ratio: 6;
	--header-mark-ratio: 0;
	/* The tallest the logos may be: growing with the screen on phones, and
	   from 40rem (below) the desktop height set in the Customizer
	   (--header-logo-desktop, also from inc/header.php). */
	--header-logo-max: min(clamp(2.25rem, 1.57rem + 2.9vw, 3.75rem), var(--header-logo-desktop, 2.5rem));
	/* At least this much space between the brand mark and the logo name. */
	--header-gap: var(--space-sm);
	/* Room for the menu button, right of the logo name. Small screens only. */
	--header-toggle-room: 2.5rem;
	/* The width of the header's content: the wide container. */
	--header-width: min(100vw - 2 * var(--gutter), var(--container-wide));

	/* The height of both logos: the tallest allowed, or less where the logo
	   name, centred, would not fit between the brand mark and the same room
	   on its right (or the menu button). */
	--header-logo: min(
		var(--header-logo-max),
		(var(--header-width) - 2 * var(--header-gap)) / (var(--header-logo-ratio) + 2 * var(--header-mark-ratio)),
		(var(--header-width) - 2 * var(--header-gap) - 2 * var(--header-toggle-room)) / var(--header-logo-ratio)
	);

	/* How much shorter the header gets. */
	--header-shrink: calc((2 * var(--header-pad) + var(--header-logo)) * (1 - var(--header-scale)));

	position: sticky;
	/* Below the admin bar when logged in. */
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	/* When shrunk, the bottom of the header's box is empty space over the
	   page: it must not catch clicks. The header's parts turn them back on. */
	pointer-events: none;
}

/* Measured from the header itself, so a scrollbar is not counted in its
   width (100vw counts it). */
@supports (width: 1cqi) {
	.site-header {
		container-type: inline-size;
		--header-width: min(100cqi - 2 * var(--gutter), var(--container-wide));
	}
}

/* The content keeps to the wide container (the width of a Wide width
   block); the background stays full width. */
.site-header__inner {
	position: relative;
	width: min(100% - 2 * var(--gutter), var(--container-wide));
	margin-inline: auto;
}

/* The parts that take clicks. The logo row's own box is left out: once the
   header shrinks, the bottom of it is over the page. */
.site-header__brand > *,
.site-header__toggle,
.site-header__nav {
	pointer-events: auto;
}

/* The background is a layer of its own, so that it can be clipped shorter
   without clipping the sub-menus, which hang below the header. */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	/* The page's background colour. (If the stone texture below is switched
	   back on, it lines up with the page's at the top.) */
	background: var(--color-bg);
	/* background: var(--color-bg) url("../images/body-bg.jpg") repeat;
	background-size: 50%; */
	clip-path: inset(0);
	pointer-events: auto;
	transition: clip-path 0.3s ease;
}

.site-header.is-scrolled::before {
	clip-path: inset(0 0 var(--header-shrink) 0);
}

/* Under 600px the admin bar scrolls away with the page. */
@media (max-width: 600px) {
	.site-header {
		top: 0;
	}
}

@media (min-width: 40rem) {
	.site-header {
		--header-pad: var(--space-md);
		--header-logo-max: var(--header-logo-desktop, 2.5rem);
		--header-scale: 0.6;
		--header-gap: var(--space-md);
		--header-toggle-room: 0px;
	}
}

/* The brand mark and the logo name in one row, vertically centred, both the
   logo height. The brand mark's box and an empty box after the logo name
   share the space either side equally, so the logo name stays in the
   middle. If the row is ever too narrow, the brand mark keeps its size and
   the logo name moves right rather than covering it. */
.site-header__brand {
	display: flex;
	column-gap: var(--header-gap);
	align-items: center;
	padding-block: var(--header-pad);
}

.site-header__mark {
	display: flex;
	flex: 1 1 0;
}

.site-header__brand::after {
	content: "";
	flex: 1 1 0;
	/* Clear of the menu button on small screens. */
	min-width: var(--header-toggle-room);
}

.site-header__logo {
	flex: 0 1 auto;
	min-width: 0;
}

/* Scaled from the top of the row, the logos and the space above them shrink
   together, and the two stay level. */
.site-header__mark,
.site-header__logo {
	transition: transform 0.3s ease;
}

.site-header__mark {
	transform-origin: left calc(-1 * var(--header-pad));
}

.site-header__logo {
	transform-origin: center calc(-1 * var(--header-pad));
}

.site-header.is-scrolled .site-header__mark,
.site-header.is-scrolled .site-header__logo {
	transform: scale(var(--header-scale));
}

/* The site name stands in until a logo is uploaded. */
.site-header__logo a {
	display: block;
	font-family: var(--font-heading);
	font-size: var(--header-logo);
	line-height: var(--header-logo);
	text-decoration: none;
}

.site-header__logo img,
.site-header__mark-image {
	width: auto;
	height: var(--header-logo);
}

/* Drawn smaller, not cropped, if the row is ever too narrow for it. */
.site-header__logo img {
	object-fit: contain;
}

/* Always its full size (see the row above). */
.site-header__mark-image {
	max-width: none;
}

.site-header__nav {
	padding-bottom: var(--space-sm);
	transition: transform 0.3s ease;
}

.site-header.is-scrolled .site-header__nav {
	transform: translateY(calc(-1 * var(--header-shrink)));
}

.site-header__menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	/* 60px between items on desktop, closing up on narrower screens. */
	gap: var(--space-xs) clamp(1.5rem, 5vw, 3.75rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-header__menu li {
	margin: 0;
}

.site-header__menu a {
	text-decoration: none;
}

/* A menu item with a sub-menu is a button, not a link (inc/header.php). It
   takes the look of the links beside it. */
.site-header__submenu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}

/* No fill on hover, unlike other buttons: only the colour changes. */
.site-header__submenu-toggle:hover {
	background: none;
	color: var(--color-muted);
}

.site-header__submenu-toggle svg {
	transition: transform 0.2s ease;
}

.is-open > .site-header__submenu-toggle svg {
	transform: rotate(180deg);
}

/* Sub-menus: a panel hanging from the bottom edge of the header, lined up
   with the left edge of its button, with the items left aligned. Hidden
   until the button is pressed (.is-open, from site-header.js); a mouse also
   opens it by pointing. */
.site-header__menu > li {
	position: relative;
}

.site-header__menu .sub-menu {
	display: none;
	position: absolute;
	/* Past the space under the menu row, to where the header ends. */
	top: calc(100% + var(--space-sm));
	left: 0;
	width: max-content;
	max-width: 20rem;
	margin: 0;
	padding: var(--space-sm) var(--space-md);
	background: var(--color-bg);
	list-style: none;
	text-align: left;
}

/* Fills the gap between the button and the panel, so the panel stays open
   while the mouse crosses it. */
.site-header__menu .sub-menu::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 100%;
	left: 0;
	height: var(--space-sm);
}

.site-header__menu .sub-menu li + li {
	margin-top: var(--space-sm);
}

.site-header__menu .is-open > .sub-menu {
	display: block;
}

@media (hover: hover) {
	.site-header__menu li:hover > .sub-menu {
		display: block;
	}
}

/* The menu button, level with the middle of the logo. Small screens only. */
.site-header__toggle {
	display: none;
	position: absolute;
	top: calc(var(--header-pad) + var(--header-logo) / 2);
	right: 0;
	transform: translateY(-50%);
	transition: transform 0.3s ease;
}

.site-header.is-scrolled .site-header__toggle {
	transform: translateY(calc(-50% - var(--header-shrink) / 2));
}

/* Small screens: the menu is a list that the button opens. This waits for the
   js class (set in header.php) so that the menu can always be reached. */
@media (width < 40rem) {
	.js .site-header__toggle {
		display: block;
	}

	.js .site-header__nav {
		display: none;
	}

	.js .site-header.is-open .site-header__nav {
		display: block;
	}

	.site-header__menu {
		flex-direction: column;
		align-items: center;
		gap: var(--space-sm);
	}

	/* Sub-menus open in place, under their button. Without the script they
	   are simply shown. */
	.site-header__menu > li {
		text-align: center;
	}

	.site-header__menu .sub-menu {
		display: block;
		position: static;
		width: auto;
		max-width: none;
		padding: var(--space-sm) 0 0;
		text-align: center;
	}

	.site-header__menu .sub-menu::before {
		content: none;
	}

	.js .site-header__menu .sub-menu {
		display: none;
	}

	.js .site-header__menu .is-open > .sub-menu {
		display: block;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header::before,
	.site-header__logo,
	.site-header__mark,
	.site-header__nav,
	.site-header__toggle,
	.site-header__submenu-toggle svg {
		transition: none;
	}
}

/* Site footer
   ------------------------------------------------------------------ */

.site-footer {
	--footer-line: rgb(255 255 255 / 0.25);
	/* Buttons in the footer stay black: the usual button colour is the
	   footer's own background. */
	--color-button: var(--color-accent);

	/* Keeps every page's content clear of the footer. A margin, so that it
	   merges with the bottom margin of the last block instead of adding to it. */
	margin-top: var(--space-section);
	background: var(--color-footer);
	color: var(--color-footer-text);
}

/* Links and focus rings for the dark background. */
.site-footer a {
	color: inherit;
	text-decoration: none;
}

.site-footer a:hover {
	color: inherit;
	text-decoration: underline;
}

.site-footer :focus-visible {
	outline-color: currentColor;
}

.site-footer__main {
	padding-block: var(--space-lg) calc(var(--space-lg) / 2);
}

/* The widget columns: stacked on small screens, three across from 48rem. */
.site-footer__columns {
	display: grid;
	gap: var(--space-lg);
}

@media (min-width: 48rem) {
	.site-footer__columns {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--space-xl);
	}
}

.site-footer__widget + .site-footer__widget {
	margin-top: var(--space-lg);
}

/* A widget's title. The h5 class gives it the H5 text style, and the border is
   the line under it. */
.site-footer__title {
	margin: 0 0 var(--space-md);
	padding-bottom: var(--space-sm);
	border-bottom: 1px solid var(--footer-line);
}

/* Menus and other lists in a widget. */
.site-footer__widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__widget li {
	margin: 0;
}

/* 12px between items. */
.site-footer__widget li + li {
	margin-top: calc(var(--space-xs) * 1.5);
}

/* Mailchimp's own form puts its button straight under the field. */
.site-footer__widget button,
.site-footer__widget input[type="submit"] {
	margin-top: var(--space-xs);
}

/* Social icons, with the email address on the line below. */
.site-footer__contact {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-xs);
}

.site-footer__columns + .site-footer__contact {
	margin-top: var(--space-sm);
}

.site-footer__social {
	display: flex;
	gap: var(--space-sm);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__social li {
	margin: 0;
}

/* Each icon is cut out of a filled square: the square in the footer's text
   colour, the icon in the footer's background colour. */
.site-footer__social a {
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: var(--radius);
	background: var(--color-footer-text);
	color: var(--color-footer);
	line-height: 0;
}

.site-footer__social a:hover {
	color: var(--color-footer);
	opacity: 0.7;
}

/* The link's own colour is the dark icon, which would hide the focus ring. */
.site-footer__social a:focus-visible {
	outline-color: var(--color-footer-text);
}

/* Drawn smaller than their 24px grid, so the lines are thickened to keep
   their weight. */
.site-footer__social svg {
	width: 1.75rem;
	height: 1.75rem;
	stroke-width: 2;
}

/* The line above the copyright runs the full width of the page; the text
   keeps to the container. */
.site-footer__legal {
	padding-block: var(--space-sm);
	border-top: 1px solid var(--footer-line);
	text-align: center;
}

.site-footer__legal .container {
	margin-bottom: 0;
}

/* Hero
   ------------------------------------------------------------------ */

/* A photo band at the top of a page (a ride, the Journal), with its text
   centred on it: the photo under a 30% black overlay, the text in white.
   Without a photo it is a plain dark band. Put alignwide on it to make it
   wider than the page container. */
.hero {
	display: grid;
	position: relative;
	place-items: center;
	min-height: 28.125rem;
	padding: var(--space-lg) var(--gutter);
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--color-accent);
	color: var(--color-accent-contrast);
	text-align: center;
}

.hero__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 0.3);
}

.hero__content {
	position: relative;
	z-index: 1;
}

.hero__content > :last-child {
	margin-bottom: 0;
}

/* A ride's Header Video: over the image (both are .hero__image), hidden
   until assets/js/hero-video.js has it playing, then faded in. Its own
   rounded corners, because Safari does not always clip a video to its
   parent's. */
.hero__video {
	border-radius: inherit;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.hero__video.is-playing {
	opacity: 1;
}

/* The video's pause / play button, in the bottom right corner, white like
   the hero's text. */
.hero__video-toggle {
	position: absolute;
	right: var(--space-xs);
	bottom: var(--space-xs);
	z-index: 1;
	color: inherit;
	filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.8));
}

.hero__video-toggle:hover {
	color: inherit;
	opacity: 0.7;
}

.hero__video-toggle:focus-visible {
	outline-color: currentColor;
}

.hero__video-toggle svg {
	display: block;
}

.hero__video-toggle .hero__video-play,
.hero__video-toggle.is-paused .hero__video-pause {
	display: none;
}

.hero__video-toggle.is-paused .hero__video-play {
	display: block;
}

/* Expandable rows
   ------------------------------------------------------------------ */

/* A <details> row that opens on its own: a line under it (and over the
   first), its <summary> as the title with a + at the end that becomes a
   minus while open, and the content in .disclosure__body. Used by the
   itinerary on ride pages and by [faq]. assets/js/disclosure.js slides them
   open and shut. */
.disclosure {
	border-bottom: 1px solid var(--color-divider);
}

.disclosure:first-of-type {
	border-top: 1px solid var(--color-divider);
}

.disclosure summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	padding-block: var(--space-sm);
	cursor: pointer;
	list-style: none;
}

.disclosure summary::-webkit-details-marker {
	display: none;
}

.disclosure summary::after {
	content: "+";
	font-size: 1.5em;
	font-weight: 400;
	line-height: 1;
}

.disclosure[open] summary::after {
	content: "\2212";
}

/* While it slides shut (assets/js/disclosure.js), it is still open. */
.disclosure.is-closing summary::after {
	content: "+";
}

.disclosure__body {
	padding-bottom: var(--space-sm);
}

/* FAQ: [faq] (inc/faq.php)
   ------------------------------------------------------------------ */

/* As wide as the itinerary on a ride page, and centred. The Shortcode block
   cannot take a spacing class, so the space above is set here. */
.faq {
	max-width: var(--container-narrow);
	margin: var(--space-lg) auto 0;
}

/* As a top-level block of a page, it still keeps the side gutters. */
.page-sections > .faq {
	max-width: min(100% - 2 * var(--gutter), var(--container-narrow));
}

/* Rides page (archive-ride.php)
   ------------------------------------------------------------------ */

/* One card to a row; two from 48rem. */
.ride-grid {
	display: grid;
	gap: var(--space-xl) var(--space-lg);
}

@media (min-width: 48rem) {
	.ride-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* A column, so that the facts, price and button sit at the bottom and line up
   across a row when the descriptions differ in length. */
.ride-card {
	display: flex;
	flex-direction: column;
}

/* 10:7, matching the ride-card image sizes. Without a featured image the box
   stays as a plain panel. */
.ride-card__image {
	aspect-ratio: 10 / 7;
	margin-bottom: var(--space-md);
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--color-surface);
}

.ride-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ride-card__country {
	margin: 0 0 var(--space-xs);
}

.ride-card__title {
	margin: 0 0 var(--space-sm);
}

.ride-card__title a {
	text-decoration: none;
}

.ride-card__details {
	margin-top: auto;
}

.ride-card__facts,
.ride-card__price {
	margin-bottom: 0;
}

.ride-card__pipe {
	font-weight: 400;
}

.ride-card__facts + .ride-card__price {
	margin-top: var(--space-xs);
}

/* The same space above the button whether or not there is a price. */
.ride-card__details .button {
	margin-top: var(--space-md);
}

/* Journal (home.php)
   ------------------------------------------------------------------ */

/* The hero, then the cards one section-space below it. */
.journal > * + * {
	margin-top: var(--space-section);
}

/* Lower than the usual 450px hero. */
.journal-hero {
	min-height: 18.75rem;
}

/* One card to a row on phones, two from 30rem and three from 48rem, 60px
   apart. The card image sizes in home.php follow these widths. */
.journal-grid {
	display: grid;
	gap: var(--space-lg) var(--space-md);
}

@media (min-width: 30rem) {
	.journal-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 48rem) {
	.journal-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 3.75rem;
	}
}

/* The whole card is one link. */
.journal-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

/* 3:4, matching the journal-card image sizes. Without a featured image the
   box stays as a plain panel. */
.journal-card__image {
	aspect-ratio: 3 / 4;
	margin-bottom: var(--space-sm);
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--color-surface);
}

/* On phones, one card to a row, it is half as tall: 3:2, the middle of the
   3:4 crop. */
@media (max-width: 29.99rem) {
	.journal-card__image {
		aspect-ratio: 3 / 2;
	}
}

.journal-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.journal-card__title {
	margin: 0 0 var(--space-xs);
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

.journal-card__date {
	display: block;
	margin: 0;
}

.journal__empty {
	text-align: center;
}

/* A Journal post (single-post.php): in the page container, wider than the
   cards. The featured image at its own shape, then the title and the date. */
.journal-post__image {
	width: 100%;
	margin-bottom: var(--space-lg);
	border-radius: var(--radius);
}

.journal-post__header {
	margin-bottom: var(--space-lg);
}

.journal-post__title {
	margin: 0 0 var(--space-xs);
}

.journal-post__date {
	display: block;
	margin: 0;
}

.journal-post__content > :last-child {
	margin-bottom: 0;
}

/* "← Back to Journal" under the post, on the left: an ordinary underlined
   link in the body text style, like "← Back to {ride}" on the booking page. */
.journal-post__back {
	margin: var(--space-xl) 0 0;
}

/* Single ride (single-ride.php)
   ------------------------------------------------------------------ */

/* Every section, and each divider, is as wide as a Wide width block, except
   those given a narrower container (the itinerary, and How to Book and
   Cancellation Policy, are container--medium). */
.ride.page-sections > :not(.container--narrow, .container--medium) {
	max-width: min(100% - 2 * var(--gutter), var(--container-wide));
}

/* The page is a run of sections one section-space apart. A divider between
   two of them has the divider space on each side instead. */
.ride > * + * {
	margin-top: var(--space-section);
}

.ride > hr,
.ride > hr + * {
	margin-top: var(--space-divider);
}

/* Hero (see Hero above): the featured image, with the title, facts and
   button. */
.ride-hero .h4 {
	margin-bottom: var(--space-md);
}

/* Overview: boxes packed into up to three columns, each as tall as its text.
   They fill one column, then the next. */
.ride-overview__boxes {
	columns: 18rem 3;
	column-gap: var(--space-md);
}

/* With an Overview image, the first three boxes are a row above it: a grid
   with the same columns as the boxes below (up to three, at least 18rem
   wide), so that each box keeps to its own column. */
.ride-overview__boxes--top {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(18rem, (100% - 2 * var(--space-md)) / 3)), 1fr));
	gap: var(--space-md);
	align-items: start;
	columns: auto;
}

.ride-overview__boxes--top .ride-overview__box {
	margin-bottom: 0;
}

/* The same space above and below it as between the page's sections. */
.ride-overview__image {
	width: 100%;
	margin-block: var(--space-section);
	border-radius: var(--radius);
}

/* flow-root keeps a left- or right-aligned image inside the box. */
.ride-overview__box {
	display: flow-root;
	margin-bottom: var(--space-md);
	padding: var(--space-md);
	break-inside: avoid;
	border: solid 1px var(--color-divider);
	border-radius: var(--radius);
}

.ride-overview__box > :last-child {
	margin-bottom: 0;
}

/* Available dates: a two-column table has no need of the full width. It is
   620px at most and sits in the middle, under its centred heading. */
.ride-dates table {
	max-width: 38.75rem;
	margin: 0 auto;
}

.ride-dates th,
.ride-dates td {
	text-align: center;
}

/* A darker line under the column headings, a light one between the rows and
   none under the last. The text styles are classes on the cells. */
.ride-dates th {
	border-bottom-color: var(--color-divider-strong);
}

.ride-dates td {
	border-bottom-color: var(--color-divider);
}

.ride-dates tr:last-child td {
	border-bottom: 0;
}

.ride-dates .is-sold-out {
	color: var(--color-sold-out);
}

/* The text under the table (Appearance > Customize > Ride page), as wide as
   the table. */
.ride-dates__note {
	max-width: 38.75rem;
	margin: var(--space-md) auto 0;
	text-align: center;
}

.ride-dates__note > :last-child {
	margin-bottom: 0;
}

.ride-dates__note a {
	text-decoration: underline;
}

/* The two "Apply Now" sections, centred. */
.ride-cta,
.ride-apply {
	text-align: center;
}

/* Its column is the full width of the section, so that the image can be. */
.ride-cta {
	display: grid;
	justify-items: center;
}

/* The itinerary follows "Ready to ride?" closely, not a section-space below. */
.ride > .ride-cta + .ride-itinerary {
	margin-top: var(--space-lg);
}

/* The ride's own image, below the button. */
.ride-cta__image {
	width: 100%;
	margin-top: var(--space-lg);
	border-radius: var(--radius);
}

.ride-cta p {
	margin-bottom: var(--space-md);
}

/* The text under the button (Appearance > Customize > Ride page). */
.ride-apply__text {
	margin-top: var(--space-md);
}

.ride-apply__text > :last-child {
	margin-bottom: 0;
}

.ride-apply__text a {
	text-decoration: underline;
}

/* Itinerary: each day is an expandable row (see Expandable rows above). */
.ride-itinerary__intro {
	margin-bottom: var(--space-md);
	text-align: center;
}

/* How to Book and Cancellation Policy: side by side from 48rem. */
.ride-terms {
	display: grid;
	gap: var(--space-lg) var(--space-xl);
}

.ride-terms > section {
	margin-top: 0;
}

.ride-terms h2 {
	text-align: center;
}

@media (min-width: 48rem) {
	.ride-terms {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Gallery: square thumbnails, two to a row and six from 40rem. */
.ride-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-xs);
	padding: 0;
	list-style: none;
}

@media (min-width: 40rem) {
	.ride-gallery {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

/* Fewer photos than fill a row (one on a phone, under six from 40rem): they
   keep the size they have in a full row and sit in the middle. */
.ride-gallery:not(:has(> li:nth-child(2))) {
	grid-template-columns: calc((100% - var(--space-xs)) / 2);
	justify-content: center;
}

@media (min-width: 40rem) {
	.ride-gallery:not(:has(> li:nth-child(6))) {
		grid-template-columns: none;
		grid-auto-columns: calc((100% - 5 * var(--space-xs)) / 6);
		grid-auto-flow: column;
		justify-content: center;
	}
}

.ride-gallery li {
	margin: 0;
}

.ride-gallery a {
	display: block;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--color-surface);
}

.ride-gallery img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

/* The photo viewer: a dialog over the whole screen (ride-gallery.js). */
.lightbox {
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgb(0 0 0 / 0.9);
	color: var(--color-accent-contrast);
}

/* Only while open: a closed dialog must stay hidden. */
.lightbox[open] {
	display: grid;
	place-items: center;
}

/* The page behind does not scroll while it is open. */
html:has(.lightbox[open]) {
	overflow: hidden;
}

/* On small screens the photo takes the full width and the arrows sit on top
   of it; from 40rem it keeps clear of them. */
.lightbox__image {
	max-width: 100vw;
	max-height: calc(100dvh - 7rem);
	object-fit: contain;
	border-radius: var(--radius);
}

@media (min-width: 40rem) {
	.lightbox__image {
		max-width: calc(100vw - 7rem);
		max-height: calc(100dvh - 2 * var(--space-md));
	}
}

/* The shadow keeps the icons readable over a light photo. */
.lightbox .icon-button {
	position: absolute;
	color: inherit;
	filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.8));
}

.lightbox .icon-button:hover {
	color: inherit;
	opacity: 0.7;
}

.lightbox :focus-visible {
	outline-color: currentColor;
}

.lightbox__close {
	top: var(--space-xs);
	right: var(--space-xs);
}

.lightbox__arrow {
	top: 50%;
	transform: translateY(-50%);
}

.lightbox__arrow--prev {
	left: var(--space-xs);
}

.lightbox__arrow--next {
	right: var(--space-xs);
}

/* Booking page (single-ride-book.php)
   ------------------------------------------------------------------ */

/* About 856px wide: the heading and intro centred above the form, which
   takes the full width. */
.ride-book {
	max-width: var(--container-medium);
}

.ride-book__header {
	margin-bottom: var(--space-lg);
	text-align: left;
}

.ride-book__header .h5 {
	margin-bottom: var(--space-xs);
}

.ride-book__header h1 {
	margin-bottom: 0;
}

.ride-book__intro {
	margin-top: var(--space-md);
}

.ride-book__intro > :last-child {
	margin-bottom: 0;
}

.ride-book .wpcf7 form {
	max-width: none;
}

/* Rider Interest Form (Contact Form 7)
   ------------------------------------------------------------------ */

/* Two columns from 48rem. A field sits in the first column unless it is
   .rider-form__wide (both columns) or .rider-form__col2 (the second, next to
   the field before it). One column on small screens. */
.rider-form {
	display: grid;
	gap: var(--space-md) var(--space-lg);
}

@media (min-width: 48rem) {
	.rider-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rider-form > * {
		grid-column: 1;
	}

	.rider-form > .rider-form__wide {
		grid-column: 1 / -1;
	}

	.rider-form > .rider-form__col2 {
		grid-column: 2;
	}
}

/* Two or three fields side by side within one column, such as first and
   last name, or the day, month and year of a birthday. */
.rider-form__group {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: var(--space-sm);
}

/* Labels, questions, answer options and the statements above the checkboxes
   are all in the Body 4 style (text-body). */
.rider-form label,
.rider-form legend,
.rider-form__statement {
	font-size: var(--text-body);
	font-weight: 400;
	line-height: 1.389;
}

.rider-form label {
	margin-bottom: 0;
}

.rider-form fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

/* The question over a group of fields or a set of radio buttons. */
.rider-form legend {
	margin-bottom: 0.35em;
	padding: 0;
}

/* The asterisk on a required field. It is hidden from screen readers, which
   already announce the field as required. */
.rider-form__required {
	color: var(--color-error);
}

.rider-form__help {
	margin: 0;
	color: var(--color-muted);
}

/* Help under a question, before its answers. */
.rider-form legend + .rider-form__help {
	margin-bottom: var(--space-xs);
}

/* Radio buttons and checkboxes: on one line with their text. */
.rider-form .wpcf7-list-item {
	margin: 0 var(--space-md) 0 0;
}

.rider-form .wpcf7-list-item label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

/* The consent checkboxes (Terms and Conditions, sharing with local operators):
   their labels are in the Body 6 style (text-small); the statements above
   them stay Body 4. */
.rider-form .wpcf7-acceptance label {
	font-size: var(--text-small);
	line-height: 1.333;
}

.rider-form__statement {
	margin: 0;
}

/* Pagination (nomad_saddle_pagination(), inc/pagination.php)
   ------------------------------------------------------------------ */

/* Under a line across the block: Previous on the left, the page numbers in
   the middle and Next on the right. On phones the numbers have a row of
   their own above the two links. */
.pagination {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-areas:
		"numbers numbers"
		"prev next";
	gap: var(--space-sm);
	align-items: center;
	margin-top: var(--space-xl);
	padding-top: var(--space-md);
	border-top: 1px solid var(--color-divider);
}

@media (min-width: 40rem) {
	.pagination {
		grid-template-columns: 1fr max-content 1fr;
		grid-template-areas: "prev numbers next";
	}
}

/* Previous and Next are in the H5 style (the h5 class), without its margin. */
.pagination__prev,
.pagination__next {
	margin: 0;
	text-decoration: none;
}

.pagination__prev {
	grid-area: prev;
	justify-self: start;
}

.pagination__next {
	grid-area: next;
	justify-self: end;
}

/* On the first page Previous, and on the last page Next, is greyed out. */
.pagination [aria-disabled="true"],
.pagination [aria-disabled="true"]:hover {
	color: var(--color-inactive);
	cursor: default;
}

/* The numbers are in the Body 4 style (the text-body-lg class). */
.pagination__numbers {
	display: flex;
	grid-area: numbers;
	justify-content: center;
	gap: var(--space-xs);
}

/* Plain numbers, each in a box at least 24px wide and 40px high so that it
   is easy to tap. The page being shown is grey; the others are black and
   get a thin underline on hover. */
.page-numbers {
	display: grid;
	place-items: center;
	min-width: 1.5rem;
	height: 2.5rem;
	color: var(--color-text);
	text-decoration: none;
}

a.page-numbers:hover {
	color: var(--color-text);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
}

.page-numbers.current {
	color: var(--color-inactive);
}

/* Ride carousel: [ride_carousel]
   ------------------------------------------------------------------ */

.ride-carousel {
	--ride-carousel-gap: var(--space-md);
	/* 3:4 on narrow screens and 4:3 from 40rem (below). The <picture> in
	   ride-carousel.php swaps to the matching crop at the same width. */
	--ride-carousel-ratio: 3 / 4;

	/* Size of the side slides relative to the active one. */
	--ride-carousel-scale: 0.85;

	/* Width of the active slide. Three slides fill the row; on narrow screens
	   it stops shrinking and the side slides run off the edges instead. */
	--ride-carousel-slide: max(13rem, calc((100% - 2 * var(--ride-carousel-gap)) / (1 + 2 * var(--ride-carousel-scale))));

	/* Distance from one slide to the next, as a translate on a slide. */
	--ride-carousel-step: calc(50% * (1 + var(--ride-carousel-scale)) + var(--ride-carousel-gap));
}

@media (min-width: 40rem) {
	.ride-carousel {
		--ride-carousel-ratio: 4 / 3;
	}
}

.ride-carousel__stage {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	overflow-x: clip;
	touch-action: pan-y;
}

/* Every slide is stacked in the middle, then moved out to its position.
   Positions -2 and 2 are out of view, ready to come in. */
.ride-carousel__slide {
	grid-area: 1 / 1;
	justify-self: center;
	width: var(--ride-carousel-slide);
	aspect-ratio: var(--ride-carousel-ratio);
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--color-surface);
	opacity: 0;
	transition: transform 0.5s ease, opacity 0.5s ease;
}

.ride-carousel__slide[data-position="-2"] {
	transform: translateX(calc(-2 * var(--ride-carousel-step))) scale(var(--ride-carousel-scale));
}

.ride-carousel__slide[data-position="-1"] {
	opacity: 0.7;
	transform: translateX(calc(-1 * var(--ride-carousel-step))) scale(var(--ride-carousel-scale));
}

.ride-carousel__slide[data-position="0"] {
	opacity: 1;
	transform: translateX(0) scale(1);
}

.ride-carousel__slide[data-position="1"] {
	opacity: 0.7;
	transform: translateX(var(--ride-carousel-step)) scale(var(--ride-carousel-scale));
}

.ride-carousel__slide[data-position="2"] {
	transform: translateX(calc(2 * var(--ride-carousel-step))) scale(var(--ride-carousel-scale));
}

/* So the image is sized by the slide, not by its <picture> wrapper. */
.ride-carousel__slide picture {
	display: contents;
}

.ride-carousel__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* As wide as the active slide, but never too narrow for a title. */
.ride-carousel__footer {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	width: min(100%, max(18rem, var(--ride-carousel-slide)));
	margin: var(--space-md) auto 0;
}

.ride-carousel__captions {
	display: grid;
	flex: 1;
	min-width: 0;
	text-align: center;
}

/* Captions share one cell, so the row is as tall as the longest of them and
   does not jump between rides. The old one fades out before the new fades in. */
.ride-carousel__caption {
	grid-area: 1 / 1;
	align-self: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s;
}

.ride-carousel__caption.is-active {
	opacity: 1;
	visibility: visible;
	transition-delay: 0.2s;
}

/* The country takes the H6 style from its .h6 class; the title is a plain h3. */
.ride-carousel__country {
	margin: 0;
}

.ride-carousel__title {
	margin: 0;
}

.ride-carousel__title a {
	text-decoration: none;
}

.ride-carousel__arrow {
	flex: none;
}

@media (prefers-reduced-motion: reduce) {
	.ride-carousel__slide,
	.ride-carousel__caption {
		transition: none;
	}
}

/* Testimonial slider: [testimonial_slider]
   ------------------------------------------------------------------ */

/* An arrow on each side of the track. */
.testimonial-slider {
	--testimonial-gap: var(--space-md);

	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--space-xs);
}

/* The track is a scrolling row that snaps to each slide: it can be swiped,
   and the arrows scroll it (testimonial-slider.js). */
.testimonial-slider__track {
	display: flex;
	gap: var(--testimonial-gap);
	margin: 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.testimonial-slider__track::-webkit-scrollbar {
	display: none;
}

/* One slide in view; two from 48rem (below). The name and by line sit at the
   bottom, so they line up when the testimonials differ in length. */
.testimonial-slider__slide {
	display: flex;
	flex: none;
	flex-direction: column;
	width: 100%;
	margin: 0;
	padding: var(--space-md);
	border-radius: var(--radius);
	background: var(--color-testimonial);
	scroll-snap-align: start;
}

/* The copies the script adds either side to make the slider endless, while
   every testimonial fits in view. */
.testimonial-slider__slide[hidden] {
	display: none;
}

/* The card's body text style, not the site's blockquote style. */
.testimonial-slider__quote {
	margin: 0 0 auto;
	padding: 0;
	border: 0;
	font: inherit;
}

.testimonial-slider__quote > :last-child {
	margin-bottom: 0;
}

.testimonial-slider__name {
	margin: var(--space-md) 0 0;
}

.testimonial-slider__byline {
	margin: 0;
}

/* Slimmer arrows on small screens leave the slide more room. */
.testimonial-slider__arrow {
	padding-inline: 0;
}

@media (min-width: 48rem) {
	.testimonial-slider__slide {
		width: calc((100% - var(--testimonial-gap)) / 2);
		padding: var(--space-lg);
	}

	.testimonial-slider__arrow {
		padding-inline: var(--space-xs);
	}
}

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

/* Mailchimp form: [mailchimp_form]
   ------------------------------------------------------------------ */

.mailchimp-form {
	max-width: var(--container-narrow);
}

/* 35px fields, with no visible label above them to leave room for. */
.mailchimp-form input {
	height: 2.1875rem;
	margin-top: 0;
	padding-block: 0;
}

/* A field only bots fill in, kept off the page. */
.mailchimp-form__trap {
	position: absolute;
	left: -9999px;
}

/* The shortcode's align attribute places the button. */
.mailchimp-form__actions {
	margin: 0;
}

.mailchimp-form--center .mailchimp-form__actions {
	text-align: center;
}

.mailchimp-form--right .mailchimp-form__actions {
	text-align: right;
}

/* Mailchimp's answer, once the form has been sent. */
.mailchimp-form__message {
	margin: var(--space-sm) 0 0;
}

.mailchimp-form__message:empty {
	display: none;
}

/* Mailchimp's reply, once there is one: a box across the form, centred, in
   Body 6 (the small text style). White on black for the thank-you after
   signing up, white on red for an error. */
.mailchimp-form__message.is-success,
.mailchimp-form__message.is-error {
	padding: var(--space-xs) var(--space-md);
	font-size: var(--text-small);
	line-height: 1.333;
	background: var(--color-accent);
	color: var(--color-accent-contrast);
	text-align: center;
	border-radius: var(--radius);
}

.mailchimp-form__message.is-error {
	background: var(--color-error);
}

.mailchimp-form__message a {
	text-decoration: underline;
}

/* Utilities
   ------------------------------------------------------------------ */

/* 60px text, shrinking on narrow screens the way the large headings do. Only
   the size changes: the font is that of the element it is put on. */
.font-60 {
	font-size: var(--text-60);
}

/* Text in the error colour, e.g. a warning or a required-field note. */
.text-error {
	color: var(--color-error);
}

/* Space above (mt-) and below (mb-) a block, on the spacing scale. In the
   block editor they go in Advanced > Additional CSS class(es).

   They are !important because a utility has to win wherever it is used, and
   core resets the margins of blocks inside Row, Stack and Grid layouts with a
   stronger selector than a single class. */
.mt-0 {
	margin-top: 0 !important;
}

.mt-xs {
	margin-top: var(--space-xs) !important;
}

.mt-sm {
	margin-top: var(--space-sm) !important;
}

.mt-md {
	margin-top: var(--space-md) !important;
}

.mt-lg {
	margin-top: var(--space-lg) !important;
}

.mt-xl {
	margin-top: var(--space-xl) !important;
}

.mt-2xl {
	margin-top: var(--space-2xl) !important;
}

.mb-0 {
	margin-bottom: 0 !important;
}

.mb-xs {
	margin-bottom: var(--space-xs) !important;
}

.mb-sm {
	margin-bottom: var(--space-sm) !important;
}

.mb-md {
	margin-bottom: var(--space-md) !important;
}

.mb-lg {
	margin-bottom: var(--space-lg) !important;
}

.mb-xl {
	margin-bottom: var(--space-xl) !important;
}

.mb-2xl {
	margin-bottom: var(--space-2xl) !important;
}
