/*
 * Coming soon home page.
 * Colors, font sizes and spacing come from theme.json variables.
 * Layout widths that theme.json does not hold use rem.
 */

.hmx-cs {
	/* Side space that keeps the content inside the wide width of the theme. */
	--hmx-cs-gutter: max(var(--wp--preset--spacing--50), calc((100% - var(--wp--style--global--wide-size)) / 2));
	--hmx-cs-dark: var(--wp--preset--color--secondary);
	--hmx-cs-on-dark: var(--wp--preset--color--secondary-contrast);
	font-weight: var(--wp--custom--font-weight--medium);
}

/* The page sets every gap with flex or grid, so block margins are off. */
.hmx-cs.hmx-cs :where(p, h1, h2, h3, ul, li, figure, .wp-block-group, .wp-block-buttons, .wp-block-button, .wp-block-shortcode, form) {
	margin-block: 0;
}

.hmx-cs :where(ul) {
	list-style: none;
	padding: 0;
}

.hmx-cs :where(.wp-block-image) img {
	display: block;
	height: auto;
	max-width: 100%;
}

.hmx-cs :where(h1, h2) {
	text-transform: uppercase;
}

/* Dark and red areas: light text, light focus ring, links that take the text color. */
.hmx-cs__topbar,
.hmx-cs__header,
.hmx-cs__features,
.hmx-cs__enquire,
.hmx-cs__footer {
	--hmx-focus-color: var(--hmx-cs-on-dark);
	color: var(--hmx-cs-on-dark);
}

.hmx-cs :is(.hmx-cs__topbar, .hmx-cs__header, .hmx-cs__enquire, .hmx-cs__footer) :where(h1, h2, a:not(.wp-element-button)) {
	color: inherit;
}

/* Top bar. */

.hmx-cs__topbar {
	align-items: center;
	background: var(--wp--preset--color--primary);
	display: flex;
	flex-wrap: wrap;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--semibold);
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--50);
	justify-content: space-between;
	padding: var(--wp--preset--spacing--20) var(--hmx-cs-gutter);
}

.hmx-cs__topbar a {
	text-decoration: none;
}

.hmx-cs__topbar a:hover {
	text-decoration: underline;
}

.hmx-cs__topbar-note {
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Header and hero. The white band at the bottom lets the photos sit across the edge. */

.hmx-cs__header {
	background:
		linear-gradient(var(--wp--preset--color--background), var(--wp--preset--color--background)) bottom / 100% var(--wp--preset--spacing--80) no-repeat,
		var(--hmx-cs-dark);
	padding-inline: var(--hmx-cs-gutter);
}

.hmx-cs__bar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--60);
	justify-content: space-between;
	padding-block: var(--wp--preset--spacing--50);
}

.hmx-cs__logo img {
	width: 6.5rem;
}

.hmx-cs__logo a {
	align-items: center;
	display: flex;
	min-height: var(--wp--custom--target--min);
}

.hmx-cs__nav-list {
	display: flex;
	flex-wrap: wrap;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--semibold);
	gap: 0 var(--wp--preset--spacing--50);
	text-transform: uppercase;
}

.hmx-cs__nav-list a {
	align-items: center;
	display: flex;
	min-height: var(--wp--custom--target--min);
	text-decoration: none;
}

.hmx-cs__nav-list a:hover {
	text-decoration: underline;
}

.hmx-cs__hero {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
	padding-block: var(--wp--preset--spacing--70);
	text-align: center;
}

.hmx-cs__eyebrow {
	background: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--semibold);
	letter-spacing: 0.08em;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--40);
	text-transform: uppercase;
}

.hmx-cs__title {
	max-width: 22ch;
	text-wrap: balance;
}

.hmx-cs__lead {
	color: var(--wp--preset--color--secondary-muted);
	max-width: 36rem;
	text-wrap: pretty;
}

.hmx-cs__hero-actions {
	gap: var(--wp--preset--spacing--30);
	justify-content: center;
}

.hmx-cs__header .wp-block-button__link:is(:hover, :focus) {
	background: var(--wp--preset--color--background);
	border-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--text);
}

.hmx-cs__button-ghost .wp-block-button__link {
	background: transparent;
	border-color: currentColor;
}

.hmx-cs__photos {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
}

.hmx-cs__photo {
	background: var(--hmx-cs-dark);
	position: relative;
}

.hmx-cs__photo img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
}

.hmx-cs.hmx-cs .hmx-cs__photo figcaption {
	background: var(--hmx-cs-dark);
	bottom: var(--wp--preset--spacing--40);
	color: var(--hmx-cs-on-dark);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--semibold);
	left: var(--wp--preset--spacing--40);
	letter-spacing: 0.06em;
	margin: 0;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
	position: absolute;
	text-transform: uppercase;
}

/* Section headings. */

.hmx-cs__section-head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--50);
	justify-content: space-between;
}

.hmx-cs.hmx-cs .hmx-cs__section-head {
	margin-block-end: var(--wp--preset--spacing--50);
}

.hmx-cs__section-head p {
	color: var(--wp--preset--color--text-muted);
}

/* Brand logos. A row that scrolls by hand, or a loop when the script runs. */

.hmx-cs__brands {
	padding: var(--wp--preset--spacing--70) var(--hmx-cs-gutter) 0;
	scroll-margin-top: var(--wp--preset--spacing--40);
}

.hmx-cs__panel {
	background: var(--wp--preset--color--surface);
	padding: var(--wp--preset--spacing--60);
}

.hmx-cs__marquee {
	overflow-x: auto;
}

.hmx-cs__marquee.is-animated {
	overflow: hidden;
}

.hmx-cs__track {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	width: max-content;
}

.hmx-cs__brand {
	align-items: center;
	background: var(--wp--preset--color--background);
	display: flex;
	flex: none;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	justify-content: space-between;
	min-height: 9.5rem;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40) var(--wp--preset--spacing--40);
	width: 13.75rem;
}

.hmx-cs__brand .wp-block-image {
	align-items: center;
	display: flex;
	flex: 1;
	justify-content: center;
}

.hmx-cs__brand img {
	max-height: 3rem;
	max-width: 10rem;
	object-fit: contain;
	width: auto;
}

.hmx-cs__brand--tall img {
	max-height: 5.25rem;
}

.hmx-cs__brand--wide img {
	max-height: 1.5rem;
}

.hmx-cs__brand p {
	color: var(--wp--preset--color--text-muted);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--semibold);
	text-align: center;
}

.hmx-cs__marquee.is-animated .hmx-cs__track {
	animation: hmx-cs-marquee 40s linear infinite;
}

.hmx-cs__marquee.is-animated:hover .hmx-cs__track,
.hmx-cs__marquee.is-paused .hmx-cs__track {
	animation-play-state: paused;
}

/* Half of the track is one full set of logos. Half of one gap closes the loop. */
@keyframes hmx-cs-marquee {
	to {
		transform: translateX(calc(-50% - var(--wp--preset--spacing--40) / 2));
	}
}

/* Pause and play button for the logo loop. The icon is drawn with CSS. */
.hmx-cs__marquee-toggle {
	align-items: center;
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--sm);
	color: var(--wp--preset--color--text);
	cursor: pointer;
	display: flex;
	height: var(--wp--custom--target--min);
	justify-content: center;
	margin-block-start: var(--wp--preset--spacing--40);
	margin-inline-start: auto;
	padding: 0;
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition);
	width: var(--wp--custom--target--min);
}

.hmx-cs__marquee-toggle:is(:hover, :focus-visible) {
	background: var(--hmx-cs-dark);
	border-color: var(--hmx-cs-dark);
	color: var(--hmx-cs-on-dark);
}

/* Pause: two bars. */
.hmx-cs__marquee-toggle::before {
	border-inline: 0.25rem solid currentColor;
	content: "";
	height: 0.875rem;
	width: 0.25rem;
}

/* Play: a triangle. */
.hmx-cs__marquee-toggle.is-paused::before {
	background: currentColor;
	border: 0;
	clip-path: polygon(0 0, 100% 50%, 0 100%);
	width: 0.75rem;
}

/* Featured rides. */

.hmx-cs__rides {
	padding: var(--wp--preset--spacing--70) var(--hmx-cs-gutter);
	scroll-margin-top: 0;
}

/* Two cards in a row on a phone. More when there is room. */
.hmx-cs__cards {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 48rem) {
	.hmx-cs__cards {
		gap: var(--wp--preset--spacing--50);
		grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	}
}

.hmx-cs__card {
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--border);
	display: flex;
	flex-direction: column;
}

.hmx-cs__card-image {
	aspect-ratio: 4 / 3;
	border-bottom: 1px solid var(--wp--preset--color--border);
	overflow: hidden;
}

.hmx-cs__card-image img {
	box-sizing: border-box;
	height: 100%;
	object-fit: contain;
	padding: var(--wp--preset--spacing--40);
	width: 100%;
}

.hmx-cs__card-image--cover img {
	object-fit: cover;
	padding: 0;
}

.hmx-cs__card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--wp--preset--spacing--10);
	padding: var(--wp--preset--spacing--40);
}

@media (min-width: 48rem) {
	.hmx-cs__card-body {
		padding: var(--wp--preset--spacing--50);
	}
}

.hmx-cs__card-brand {
	color: var(--wp--preset--color--primary-dark);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--bold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hmx-cs__card-title {
	font-size: var(--wp--preset--font-size--lg);
}

.hmx-cs__card-line {
	color: var(--wp--preset--color--text-muted);
	font-size: var(--wp--preset--font-size--sm);
}

.hmx-cs.hmx-cs .hmx-cs__card-actions {
	margin-block-start: auto;
	padding-block-start: var(--wp--preset--spacing--40);
}

.hmx-cs__enquire-link,
.hmx-cs__enquire-link .wp-block-button__link {
	width: 100%;
}

.hmx-cs__enquire-link .wp-block-button__link {
	background: var(--hmx-cs-dark);
	border-color: var(--hmx-cs-dark);
	box-sizing: border-box;
	color: var(--hmx-cs-on-dark);
	text-align: center;
}

.hmx-cs__enquire-link .wp-block-button__link:is(:hover, :focus) {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-contrast);
}

/* Three short claims. */

.hmx-cs__features {
	background: var(--hmx-cs-dark);
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--60);
	justify-content: space-around;
	padding: var(--wp--preset--spacing--40) var(--hmx-cs-gutter);
}

.hmx-cs__features li {
	align-items: center;
	display: flex;
	font-size: var(--wp--preset--font-size--sm);
	gap: var(--wp--preset--spacing--30);
}

.hmx-cs__features li::before {
	background: var(--wp--preset--color--primary);
	border-radius: 50%;
	content: "";
	flex: none;
	height: 0.625rem;
	width: 0.625rem;
}

/* Enquiry. */

.hmx-cs__enquire {
	background: linear-gradient(90deg, var(--wp--preset--color--primary-dark), var(--wp--preset--color--primary));
	display: grid;
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
	padding: var(--wp--preset--spacing--70) var(--hmx-cs-gutter);
	scroll-margin-top: 0;
}

.hmx-cs__enquire-intro {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
}

.hmx-cs__enquire-intro p {
	max-width: 30rem;
}

.hmx-cs__enquire-phone a {
	font-weight: var(--wp--custom--font-weight--bold);
}

.hmx-enquiry {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}

.hmx-enquiry__field {
	display: flex;
	flex-direction: column;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--semibold);
	gap: var(--wp--preset--spacing--10);
	min-width: 0;
}

.hmx-enquiry__field--full,
.hmx-enquiry__notice,
.hmx-enquiry__note,
.hmx-enquiry__submit {
	grid-column: 1 / -1;
}

.hmx-enquiry :is(input, select, textarea) {
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--background);
	border-radius: var(--wp--custom--radius--sm);
	box-sizing: border-box;
	color: var(--wp--preset--color--text);
	font: inherit;
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--font-weight--medium);
	min-height: 3rem;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	width: 100%;
}

.hmx-enquiry textarea {
	min-height: 6rem;
	resize: vertical;
}

/* The honeypot field. People do not see it. Bots fill it. */
.hmx-enquiry__trap {
	height: 1px;
	left: -9999rem;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

.hmx-enquiry__note {
	font-size: var(--wp--preset--font-size--sm);
}

.hmx-enquiry__submit {
	background: var(--hmx-cs-dark);
	border: 1px solid var(--hmx-cs-dark);
	border-radius: var(--wp--custom--radius--sm);
	color: var(--hmx-cs-on-dark);
	cursor: pointer;
	font: inherit;
	font-weight: var(--wp--custom--font-weight--bold);
	justify-self: start;
	min-height: 3rem;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--60);
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition);
}

.hmx-enquiry__submit:is(:hover, :focus) {
	background: var(--wp--preset--color--background);
	border-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--text);
}

.hmx-enquiry__notice {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--text);
	font-weight: var(--wp--custom--font-weight--semibold);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
}

/* Footer. */

.hmx-cs__footer {
	background: var(--hmx-cs-dark);
	padding: var(--wp--preset--spacing--70) var(--hmx-cs-gutter) var(--wp--preset--spacing--50);
	scroll-margin-top: 0;
}

.hmx-cs__footer-grid {
	display: grid;
	gap: var(--wp--preset--spacing--60);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
}

.hmx-cs__footer-col {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
}

.hmx-cs__footer-title {
	font-size: var(--wp--preset--font-size--md);
	text-transform: none;
}

.hmx-cs__footer-list {
	color: var(--wp--preset--color--secondary-muted);
	display: grid;
	font-size: var(--wp--preset--font-size--sm);
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--40);
}

.hmx-cs__footer-list--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hmx-cs__footer-list a {
	align-items: center;
	display: inline-flex;
	min-height: 1.5rem;
	text-decoration: none;
}

.hmx-cs__footer-list a:hover {
	color: var(--hmx-cs-on-dark);
	text-decoration: underline;
}

.hmx-cs.hmx-cs .hmx-cs__copyright {
	border-top: 1px solid color-mix(in srgb, var(--hmx-cs-on-dark) 20%, transparent);
	color: var(--wp--preset--color--secondary-muted);
	font-size: var(--wp--preset--font-size--sm);
	margin-block-start: var(--wp--preset--spacing--60);
	padding-block-start: var(--wp--preset--spacing--50);
}
