/* Parts shared by the home page and inner pages. */
.text-accent {
	color: var(--color-accent);
}

.text-accent-soft {
	color: var(--color-accent-soft);
}

.text-white {
	color: var(--color-white);
}

.text-black {
	color: var(--color-black);
}

.tour-card__media {
	display: block;
	max-width: 25rem;
	transition: transform 0.5s var(--ease-out), filter 0.5s var(--ease-out);
}

/* The frame and badge are part of the image, so the card lifts instead of zooming. drop-shadow follows its shape. */
.tour-card:hover .tour-card__media {
	filter: drop-shadow(0 0.875rem 1.25rem rgb(255 55 0 / 0.28));
	transform: translateY(-10px);
}

.tour-card__media img {
	width: 100%;
}

.tour-card__title {
	margin: 0.725rem 0 0.3rem;
	font-size: 2.25rem;
	font-weight: 200;
	line-height: 0.89;
	text-transform: uppercase;
}

.tour-card__title a {
	color: var(--color-black);
	text-decoration: none;
	transition: color var(--duration-normal);
}

.tour-card__title span {
	transition: color var(--duration-normal);
}

.tour-card:hover .tour-card__title a {
	color: var(--color-accent-soft);
}

.tour-card:hover .tour-card__title span {
	color: var(--color-accent);
}

/*
 * Scroll reveal. main.js adds .reveal only to elements below the fold, so the page works without JS.
 * The html prefix beats component transitions such as .promo-banner until main.js removes the class.
 */
html .reveal {
	opacity: 0;
	transform: translateY(1.5rem);
	transition:
		/* Keep in sync with REVEAL_DURATION_MS in main.js. */
		opacity 0.7s var(--ease-out) var(--reveal-delay, 0ms),
		transform 0.7s var(--ease-out) var(--reveal-delay, 0ms);
}

html .reveal.is-revealed {
	opacity: 1;
	transform: none;
}

.tour-card__schedule {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 1.5rem;
	line-height: 1.2;
	text-transform: uppercase;
}

.tour-card .separator {
	margin-block: 0.75rem;
}

.tour-card__note {
	margin: 0;
	color: var(--color-accent);
	font-size: 1.125rem;
}

/*
 * Drifting clouds behind the weather bar and page titles. forecast-loop.webp is forecast.webp
 * plus its mirror image (2794 x 251), so it tiles without a seam. The layer is two tiles wide
 * and moves left by one tile. Taller boxes stretch the image vertically, never horizontally.
 */
.cloud-drift {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background-color: var(--color-accent);
}

.cloud-drift::before {
	position: absolute;
	top: 50%;
	left: 0;
	z-index: -1;
	width: 5588px;
	height: max(251px, 100%);
	background: url("../images/forecast-loop.webp") 0 0 / 2794px 100% repeat-x;
	content: "";
	transform: translateY(-50%);
	animation: cloud-drift 120s linear infinite;
}

@keyframes cloud-drift {
	to {
		transform: translate(-2794px, -50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cloud-drift::before {
		animation: none;
	}
}

/* Back to top. main.js adds .is-visible once the page is scrolled down. */
.back-to-top {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 40;
	display: grid;
	width: 3.25rem;
	height: 3.25rem;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: var(--radius-button);
	background: var(--color-accent-soft);
	box-shadow: var(--shadow-accent);
	color: var(--color-white);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(1rem);
	transition:
		opacity var(--duration-normal),
		visibility var(--duration-normal),
		background-color var(--duration-normal),
		box-shadow var(--duration-normal),
		transform var(--duration-normal) var(--ease-out);
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.back-to-top.is-visible:hover {
	background: var(--color-ink);
	box-shadow: var(--shadow-ink);
	transform: translateY(-4px);
}

.back-to-top svg {
	transition: transform var(--duration-normal) var(--ease-out);
}

.back-to-top:hover svg {
	transform: translateY(-3px);
}

.back-to-top:active svg {
	transform: translateY(-6px);
}

@media (max-width: 767px) {
	.back-to-top {
		right: 1rem;
		bottom: 1rem;
		width: 2.875rem;
		height: 2.875rem;
	}
}

.review-card {
	scroll-snap-align: start;
	margin: 0;
	padding: 1.875rem 1.5rem;
	border-radius: var(--radius-signature);
	background: var(--color-tint);
	color: var(--color-black);
	line-height: 1.43;
}

.review-card__heading {
	margin: 0;
	font-weight: 700;
}

.review-card blockquote {
	margin: 0;
}

.review-card__visited {
	margin: 1rem 0;
	font-style: italic;
	font-weight: 700;
}

.review-card__author {
	color: var(--color-accent-soft);
	font-family: var(--font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	text-transform: uppercase;
}

@media (max-width: 767px) {
	.tour-card__media {
		max-width: 22.8125rem;
	}
}
