/*
 * Crazy Runners — home page (front-page.php, inc/home.php).
 * Loaded on the front page only, after style.css, assets/css/woocommerce.css and assets/css/cards.css.
 *
 * Top to bottom: banners (.crs-slider, .crs-slide), identity strip (.crs-home-intro), shop tiles (.crs-tiles),
 * product rows (.crs-row), brands (.crs-home-brands), services (.crs-home-services), reviews, the shop
 * (.crs-shopband). Dark fills for the banners, the services and the shop; the product areas stay light.
 *
 * Contrast of text laid over a photo. The worst photo is a white one. White text needs a background no
 * lighter than #767676 for 4.5:1, that is at least 54 % of --crs-ink over white; --crs-on-ink-muted and
 * --crs-on-ink-accent need about 78 %. Every scrim below is at least 82 % under text (11:1 for white,
 * 5.6:1 for muted, 4.9:1 for the accent), and fades only where nothing is written.
 */

/* ==========================================================================
   1. Tokens and section headings
   ========================================================================== */

.crs-home {
	/* --crs-ink as RGB channels, for translucent overlays: keep the two equal. */
	--crs-home-ink: 17, 19, 21;
	--crs-home-pad: clamp(36px, 5vw, 64px);
	/* Height kept for the banners before any image arrives. */
	--crs-slider-h: clamp(460px, 125vw, 520px);
	--crs-slider-controls: 84px;
}

.crs-home__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 24px;
	margin: 0 0 clamp(20px, 3vw, 32px);
}

.crs-home__heading {
	min-width: 0;
}

.crs-home__title {
	margin: 0;
	font-size: clamp(1.625rem, 1.2rem + 2vw, 2.625rem);
	font-style: italic;
	font-weight: 900;
	line-height: 1.02;
	letter-spacing: -.025em;
	text-transform: uppercase;
}

/* A short slanted bar: the page's signature under every section title. */
.crs-home__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 5px;
	margin-top: 12px;
	background: var(--crs-accent);
	transform: skewX(-24deg);
	transform-origin: 0 100%;
}

.crs-home .crs-kicker {
	font-weight: 800;
	letter-spacing: .12em;
}

/* The page's own content now comes right under the dark services band: it needs its top padding back. */
.crs-home .crs-home-content {
	padding-top: clamp(40px, 6vw, 72px);
}

/* The reviews are now followed by the shop band, not by a section that brought its own top padding. */
.crs-home .crs-reviews {
	padding-bottom: clamp(48px, 7vw, 96px);
}

/* The average the shop read on its listing, with the day it read it. */
.crs-reviews__rating {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin: 14px 0 0;
	color: var(--crs-muted);
	font-size: .9375rem;
}

.crs-reviews__stars {
	display: inline-flex;
	gap: 2px;
	color: var(--crs-border);
}

.crs-reviews__star {
	display: inline-flex;
}

.crs-reviews__star.is-on {
	color: var(--crs-accent);
}

.crs-reviews__star.is-on .crs-icon {
	fill: currentColor;
}

.crs-reviews__score strong {
	color: var(--crs-text);
	font-size: 1.0625rem;
}

/* Under the name of the person, when the reviews were copied from Google. */
.crs-review__source {
	display: block;
	margin-top: 2px;
	color: var(--crs-muted);
	font-size: .8125rem;
	font-weight: 400;
}

.crs-reviews__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: clamp(24px, 4vw, 36px) 0 0;
}

/* ==========================================================================
   2. Banners
   ========================================================================== */

.crs-slider {
	position: relative;
	background: var(--crs-ink);
	color: var(--crs-on-ink);
}

/* Without JavaScript this is all there is: a track that scrolls sideways and stops on each banner. */
.crs-slider__track {
	position: relative;
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

/*
 * With JavaScript the buttons and the dots replace the scrollbar. Keyed on the class set in the <head>, not
 * on the one home.js adds, so the bar never shows and then goes, moving the page under the banners.
 */
.crs-js .crs-slider__track {
	scrollbar-width: none;
}

.crs-js .crs-slider__track::-webkit-scrollbar {
	display: none;
}

.crs-slide {
	position: relative;
	display: flex;
	flex: 0 0 100%;
	min-width: 0;
	/* A minimum, not a height: a long text on a narrow screen makes the banners taller instead of being cut. */
	min-height: var(--crs-slider-h);
	overflow: hidden;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

.crs-slide__media {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
	overflow: hidden;
}

.crs-slide__img,
.crs-slide__video {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
}

/* Added by home.js over the visual of the banner on screen; shown once it really plays. */
.crs-slide__video {
	opacity: 0;
	transition: opacity .4s ease;
	pointer-events: none;
}

.crs-slide__video.is-playing {
	opacity: 1;
}

.crs-slide__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-end;
}

.crs-slide__content {
	position: relative;
	/* Its own stacking context: the scrim (::before) stays above the photo and under the text. */
	z-index: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	max-width: 640px;
	padding: 40px 0 var(--crs-slider-controls);
}

.crs-slide__logo {
	display: block;
	width: auto;
	height: clamp(44px, 6vw, 60px);
	margin: 0 0 18px;
}

.crs-slide__kicker {
	margin: 0 0 12px;
	font-size: .8125rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.crs-slide__title {
	margin: 0 0 14px;
	font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.25rem);
	font-style: italic;
	font-weight: 900;
	line-height: 1;
	letter-spacing: -.03em;
	text-transform: uppercase;
	text-wrap: balance;
}

.crs-slide__text {
	max-width: 46ch;
	margin: 0 0 22px;
	font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
	line-height: 1.5;
}

.crs-slide__actions {
	margin: 0;
}

/* --- Photo: the visual covers the banner, the text sits on a dark gradient ---------------------------- */

.crs-slide--photo {
	background: var(--crs-ink);
	color: var(--crs-on-ink);
}

/*
 * The scrim belongs to the text block, not to the banner: it is as dark as it must be under every line
 * whatever the width of the screen, and fades only past the block. On a phone the text is at the bottom:
 * the gradient rises from the bottom edge and fades above the first line.
 */
.crs-slide--photo .crs-slide__content::before {
	content: "";
	position: absolute;
	top: -96px;
	right: -100vw;
	bottom: 0;
	left: -100vw;
	z-index: -1;
	background: linear-gradient(to top, rgba(var(--crs-home-ink), .92) 0, rgba(var(--crs-home-ink), .84) calc(100% - 96px), rgba(var(--crs-home-ink), 0) 100%);
	pointer-events: none;
}

.crs-slide--photo .crs-slide__kicker {
	color: var(--crs-on-ink-accent);
}

/* The bundled logo only (a black drawing on a transparent ground): every opaque pixel becomes white. */
.crs-slide--photo .crs-slide__logo--mono,
.crs-slide--plain .crs-slide__logo--mono {
	filter: brightness(0) invert(1);
}

/*
 * A logo chosen in the Customizer: its file may have an opaque ground, which the filter above would turn into
 * a white rectangle. No filter: the logo as it is, on the white ground it has in the header. The padding is
 * added around the logo (content-box), which keeps its height.
 */
.crs-slide--photo .crs-slide__logo--plate,
.crs-slide--plain .crs-slide__logo--plate {
	box-sizing: content-box;
	max-width: calc(100% - 20px);
	padding: 6px 10px;
	border-radius: var(--crs-radius-sm);
	background: var(--crs-bg);
	object-fit: contain;
}

/* "Bare": the visual carries its own text. The whole banner is the link. */
.crs-slide__cover {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
}

.crs-slide__cover:focus-visible {
	outline: 0;
}

.crs-slide__cover:focus-visible::after {
	content: "";
	position: absolute;
	top: 8px;
	right: 8px;
	bottom: 8px;
	left: 8px;
	z-index: 2;
	border: 3px solid var(--crs-on-ink);
	outline: 3px solid var(--crs-ink);
}

/* --- Product: a light spotlight, the photo melts into the banner (same colour as its own padding) ----- */

.crs-slide--product {
	background: var(--crs-surface);
	color: var(--crs-text);
}

.crs-slide--product .crs-slide__inner {
	flex-direction: column;
	align-items: stretch;
}

.crs-slide--product .crs-slide__media {
	position: relative;
	flex: 1 1 auto;
	order: -1;
	min-height: 230px;
}

.crs-slide--product .crs-slide__img,
.crs-slide--product .crs-slide__video {
	object-fit: contain;
}

.crs-slide--product .crs-slide__content {
	flex: 0 0 auto;
	max-width: none;
	padding-top: 4px;
}

/* The kicker as a label stuck on the banner. */
.crs-slide--product .crs-slide__kicker {
	padding: 6px 12px;
	border-radius: 4px;
	background: var(--crs-ink);
	color: var(--crs-on-ink);
}

.crs-slide--product .crs-slide__title {
	margin-bottom: 10px;
	font-size: clamp(1.75rem, 1.1rem + 3vw, 3.5rem);
}

.crs-slide--product .crs-slide__text {
	margin-bottom: 14px;
	color: var(--crs-muted);
}

.crs-slide__price {
	margin: 0 0 20px;
	font-size: clamp(1.375rem, 1.1rem + 1.4vw, 2.125rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.01em;
}

.crs-slide__price del {
	margin-right: 8px;
	color: var(--crs-muted);
	font-size: .7em;
	font-weight: 400;
}

.crs-slide__price ins {
	background: none;
	color: var(--crs-accent-hover);
	text-decoration: none;
}

/* --- Plain: no visual, the accent colour and large type (white on --crs-accent: 5:1) ----------------- */

.crs-slide--plain {
	background: var(--crs-accent);
	color: #fff;
}

.crs-slide--plain .crs-slide__inner {
	align-items: center;
}

/* Darker than the fill, never lighter: the lines pass under the text without taking contrast away. */
.crs-slide__lanes {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	color: rgba(var(--crs-home-ink), .16);
}

.crs-slide--plain .crs-slide__kicker {
	font-size: clamp(1rem, .9rem + .7vw, 1.5rem);
	letter-spacing: .06em;
}

.crs-slide--plain .crs-slide__title {
	font-size: clamp(2.5rem, 1.3rem + 6.4vw, 6rem);
	line-height: .95;
}

.crs-slide--plain .crs-slide__btn {
	background: var(--crs-on-ink);
	color: var(--crs-ink);
}

.crs-slide--plain .crs-slide__btn:hover,
.crs-slide--plain .crs-slide__btn:focus-visible {
	background: var(--crs-ink);
	color: var(--crs-on-ink);
}

/* The accent outline would vanish on a photo, on the accent fill and on the dark controls. */
.crs-slide--photo :focus-visible,
.crs-slide--plain :focus-visible,
.crs-slider__controls :focus-visible {
	outline-color: var(--crs-on-ink);
}

/* --- Controls, taken out of their <template> by home.js ------------------------------------------------ */

/* One dark pill for all of them: readable over a photo, the accent fill and the light product banner alike. */
.crs-slider__controls {
	position: absolute;
	bottom: 18px;
	left: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 2px;
	max-width: calc(100% - 24px);
	padding: 4px;
	border: 1px solid var(--crs-on-ink-line);
	border-radius: 999px;
	background: rgba(var(--crs-home-ink), .9);
	color: var(--crs-on-ink);
	transform: translateX(-50%);
}

.crs-slider__btn {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.crs-slider__btn:hover {
	background: rgba(255, 255, 255, .16);
}

/* home.js hides what cannot be used: the pause button when less motion is asked for. */
.crs-slider__controls[hidden],
.crs-slider__btn[hidden] {
	display: none;
}

/* The theme has one arrow: the "previous" buttons show it mirrored. */
.crs-slider__btn--prev .crs-icon,
.crs-row__btn--prev .crs-icon {
	transform: scaleX(-1);
}

/* Pause: two bars. Play: a triangle. Drawn here, the theme has no such icon. */
.crs-slider__toggle-icon {
	display: block;
	width: 12px;
	height: 14px;
	border-right: 4px solid currentColor;
	border-left: 4px solid currentColor;
}

.crs-slider__btn--toggle.is-paused .crs-slider__toggle-icon {
	width: 0;
	height: 0;
	margin-left: 3px;
	border-width: 8px 0 8px 13px;
	border-style: solid;
	border-color: transparent transparent transparent currentColor;
}

.crs-slider__dots {
	display: flex;
	flex: 0 1 auto;
	align-items: center;
	min-width: 0;
}

.crs-slider__dot {
	position: relative;
	flex: 0 1 24px;
	width: 24px;
	min-width: 16px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
}

.crs-slider__dot::before {
	content: "";
	position: absolute;
	top: 50%;
	right: 8px;
	left: 8px;
	height: 8px;
	margin-top: -4px;
	border-radius: 4px;
	background: var(--crs-on-ink-muted);
	transition: right .2s ease, left .2s ease, background-color .2s ease;
}

.crs-slider__dot:hover::before {
	background: var(--crs-on-ink);
}

/* The banner on screen: a longer mark, not only another colour. */
.crs-slider__dot[aria-current="true"]::before {
	right: 1px;
	left: 1px;
	background: var(--crs-on-ink-accent);
}

/* ==========================================================================
   3. Identity strip: the page's H1, compact, right under the banners
   ========================================================================== */

.crs-home-intro {
	padding: clamp(22px, 3vw, 36px) 0;
	border-bottom: 1px solid var(--crs-border);
	background: var(--crs-bg);
}

.crs-home-intro__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px 40px;
	align-items: center;
}

.crs-home-intro__title {
	margin: 0 0 8px;
	font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.9375rem);
	font-weight: 900;
	line-height: 1.12;
	letter-spacing: -.02em;
}

.crs-home-intro__lead {
	max-width: 74ch;
	color: var(--crs-muted);
	font-size: .96875rem;
	line-height: 1.55;
}

.crs-home-intro__lead p {
	margin: 0 0 .6em;
}

.crs-home-intro__lead p:last-child {
	margin-bottom: 0;
}

.crs-home-intro__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.crs-home-intro__actions .crs-btn {
	flex: 1 1 200px;
}

/* On one line as soon as they fit, on every screen: the strip stays short. */
.crs-home-intro .crs-facts {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0 22px;
	margin: 0;
}

/* ==========================================================================
   4. Shop tiles
   ========================================================================== */

.crs-tiles {
	padding-top: var(--crs-home-pad);
	padding-bottom: var(--crs-home-pad);
}

.crs-tiles__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.crs-tiles__item {
	min-width: 0;
}

/* A tile: the visual on the light colour the product photos are padded with, the name on a dark base. */
.crs-tiles__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border-radius: var(--crs-radius);
	background: var(--crs-ink);
	color: var(--crs-on-ink);
	text-decoration: none;
}

.crs-tiles__link:hover {
	color: var(--crs-on-ink);
}

.crs-tiles__media {
	position: relative;
	display: block;
	flex: 1 1 auto;
	overflow: hidden;
	background: var(--crs-surface);
	aspect-ratio: 1 / 1;
}

.crs-tiles__img {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	/* A product photo: the whole shoe. */
	object-fit: contain;
}

/* The category's own thumbnail, chosen in WooCommerce: any photo, any shape. */
.crs-tiles__item--own .crs-tiles__img {
	object-fit: cover;
}

.crs-tiles__label {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 52px;
	padding: 10px 14px;
	font-size: .9375rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.crs-tiles__name {
	min-width: 0;
}

.crs-tiles__label .crs-icon {
	color: var(--crs-on-ink-accent);
}

/* "Promotions": the accent colour instead of a photo (white on --crs-accent: 5:1). On a phone, one wide strip. */
.crs-tiles__item--promo {
	grid-column: 1 / -1;
}

.crs-tiles__item--promo .crs-tiles__link {
	flex-direction: row;
	align-items: center;
	background: var(--crs-accent);
	color: #fff;
}

.crs-tiles__item--promo .crs-tiles__link:hover {
	background: var(--crs-accent-hover);
	color: #fff;
}

.crs-tiles__item--promo .crs-tiles__media {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	padding: 6px 4px 6px 18px;
	background: none;
	aspect-ratio: auto;
}

.crs-tiles__percent {
	font-size: 3.25rem;
	font-style: italic;
	font-weight: 900;
	line-height: 1;
}

.crs-tiles__item--promo .crs-tiles__label {
	flex: 1 1 auto;
}

.crs-tiles__item--promo .crs-tiles__label .crs-icon {
	color: #fff;
}

.crs-tiles__count {
	display: block;
	margin-top: 2px;
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

.crs-tiles__more {
	margin: clamp(20px, 3vw, 28px) 0 0;
	text-align: center;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.crs-tiles__img,
	.crs-shopband__thumb {
		transition: transform .3s ease;
	}

	.crs-tiles__link:hover .crs-tiles__img,
	.crs-shopband__photo:hover .crs-shopband__thumb {
		transform: scale(1.05);
	}

	.crs-tiles__label .crs-icon {
		transition: transform .2s ease;
	}

	.crs-tiles__link:hover .crs-tiles__label .crs-icon {
		transform: translateX(4px);
	}
}

/* ==========================================================================
   5. Product rows: one line of the theme's cards that scrolls sideways
   ========================================================================== */

.crs-row {
	padding-top: var(--crs-home-pad);
	padding-bottom: var(--crs-home-pad);
	background: var(--crs-surface);
}

.crs-row + .crs-row {
	padding-top: 0;
}

.crs-row__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 18px;
}

/*
 * The two buttons home.js adds — on a phone too: there the row shows two whole cards and nothing of the third,
 * so the arrows are what tells there is more (a card cut by the edge of the screen read as a display fault).
 */
.crs-row__nav {
	display: flex;
	gap: 8px;
}

/* home.js hides the buttons of a row that has nothing to scroll. */
.crs-row__nav[hidden] {
	display: none;
}

.crs-row__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--crs-sage-600);
	border-radius: 50%;
	background: var(--crs-bg);
	color: var(--crs-text);
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.crs-row__btn:hover:not(:disabled),
.crs-row__btn:focus-visible:not(:disabled) {
	border-color: var(--crs-ink);
	background: var(--crs-ink);
	color: var(--crs-on-ink);
}

.crs-row__btn:disabled {
	opacity: .35;
	cursor: default;
}

/*
 * WooCommerce's list becomes the scroller. It replaces the grid of assets/css/woocommerce.css
 * (".woocommerce ul.products", 2 / 3 / 4 columns) for these lists only.
 * The padding leaves room for what a card shows outside its box (hover lift and shadow, focus ring), which a
 * scroller would cut; the negative margins put the first card back on the container's edge and let the row
 * run to the edge of a phone's screen.
 */
.crs-row .woocommerce ul.products {
	display: grid;
	grid-template-columns: none;
	/* On a phone: two whole cards. The gap equals the side padding, so the third card starts exactly at the edge. */
	grid-auto-columns: calc((100% - 20px) / 2);
	grid-auto-flow: column;
	gap: 20px;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	margin: -8px -20px 0;
	padding: 8px 20px 18px;
	scroll-padding: 0 20px;
	scroll-snap-type: x mandatory;
	scrollbar-color: var(--crs-sage-100) transparent;
	scrollbar-width: thin;
}

.crs-row .woocommerce ul.products li.product {
	scroll-snap-align: start;
}

/* ==========================================================================
   6. Brands: logos when the shop has uploaded them, names otherwise, or both
   ========================================================================== */

.crs-home-brands {
	padding: clamp(26px, 4vw, 44px) 0;
	/* Both rules: the band follows the light product rows, or the white hero when there is no shop. */
	border-top: 1px solid var(--crs-border);
	border-bottom: 1px solid var(--crs-border);
	background: var(--crs-bg);
}

.crs-home-brands__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.crs-home-brands__title {
	flex: 0 0 auto;
	margin: 0;
	color: var(--crs-muted);
	font-size: .8125rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.crs-home-brands__list {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px clamp(22px, 4vw, 52px);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Every brand in a box of the same height, so a line of logos and names stays level. */
.crs-home-brands__brand {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	color: var(--crs-text);
	text-decoration: none;
}

a.crs-home-brands__brand:hover {
	color: var(--crs-accent-hover);
}

.crs-home-brands__name {
	font-size: clamp(1.25rem, 1rem + 1.2vw, 1.875rem);
	font-style: italic;
	font-weight: 900;
	line-height: 1;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.crs-home-brands__logo {
	display: block;
	width: auto;
	max-width: 150px;
	height: auto;
	max-height: 46px;
	object-fit: contain;
}

/* ==========================================================================
   7. Services: a compact dark band
   ========================================================================== */

/* The text colours are redefined for everything inside, as the top bar and the footer do. */
.crs-home-services {
	--crs-text: var(--crs-on-ink);
	--crs-muted: var(--crs-on-ink-muted);
	padding: clamp(40px, 6vw, 72px) 0;
	background: var(--crs-ink);
	color: var(--crs-text);
}

.crs-home-services .crs-kicker,
.crs-home-services__icon {
	color: var(--crs-on-ink-accent);
}

.crs-home-services :focus-visible {
	outline-color: var(--crs-on-ink);
}

.crs-home-services__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* On a phone: the icon on the left, the title and the text beside it. */
.crs-home-services__item {
	position: relative;
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	gap: 4px 16px;
	align-content: start;
	padding: 16px 0;
	border-top: 1px solid var(--crs-on-ink-line);
}

.crs-home-services__icon {
	display: inline-flex;
	grid-row: 1 / span 2;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
}

.crs-home-services__name {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0;
}

.crs-home-services__text {
	margin: 0;
	color: var(--crs-muted);
	font-size: .9375rem;
	line-height: 1.5;
}

/* A service that has its page: the title is the link, stretched over the whole entry. */
.crs-home-services__link {
	color: inherit;
	text-decoration: none;
}

.crs-home-services__link::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

.crs-home-services__link .crs-icon {
	margin-left: 4px;
	color: var(--crs-on-ink-accent);
}

.crs-home-services__link:hover {
	color: var(--crs-on-ink-accent);
}

.crs-home-services__link:focus-visible {
	outline: 0;
}

.crs-home-services__link:focus-visible::after {
	outline: 3px solid var(--crs-on-ink);
	outline-offset: 4px;
}

/* ==========================================================================
   8. The shop: a band on the large photo, then the small photos
   ========================================================================== */

/*
 * Dark over a photo: the text, line and link colours are redefined for everything inside (crs_hours_html()
 * follows). The accent rule at the bottom keeps the band and the dark footer two distinct things when no
 * small photo comes between them.
 */
.crs-shopband__hero {
	--crs-text: var(--crs-on-ink);
	--crs-muted: var(--crs-on-ink-muted);
	--crs-border: var(--crs-on-ink-line);
	position: relative;
	overflow: hidden;
	border-bottom: 6px solid var(--crs-accent);
	background: var(--crs-ink);
	color: var(--crs-text);
}

.crs-shopband__hero :focus-visible {
	outline-color: var(--crs-on-ink);
}

.crs-shopband__media {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

/* A landscape or a portrait source: it covers the band either way. */
.crs-shopband__img {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
}

/* The theme's storefront photo is a portrait: keep the shop front in the frame. */
.crs-shopband__img--bundled {
	object-position: 50% 58%;
}

/* From 900px the text runs over the photo, under a veil (see the contrast note at the top and the rule there). */
.crs-shopband__media::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: linear-gradient(to bottom, rgba(var(--crs-home-ink), .84) 0, rgba(var(--crs-home-ink), .92) 100%);
}

/*
 * Phones: the photo is not a background but the first thing of the band, whole and bare — it is what the band
 * is for — and the text follows on the dark ground. Only its bottom edge melts into that ground.
 */
@media (max-width: 899.98px) {
	.crs-shopband__media {
		position: relative;
		aspect-ratio: 3 / 2;
	}

	.crs-shopband__media::after {
		background: linear-gradient(to bottom, rgba(var(--crs-home-ink), 0) 62%, rgba(var(--crs-home-ink), 1) 100%);
	}
}

.crs-shopband__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	align-items: center;
	padding-top: clamp(48px, 8vw, 104px);
	padding-bottom: clamp(48px, 8vw, 104px);
}

/* Phones: the text follows the photo closely (see .crs-shopband__media). */
@media (max-width: 899.98px) {
	.crs-shopband__inner {
		padding-top: 12px;
	}
}

.crs-shopband__kicker {
	margin: 0 0 12px;
	color: var(--crs-on-ink-accent);
	font-size: .8125rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.crs-shopband__title {
	margin: 0 0 22px;
	font-size: clamp(2rem, 1.2rem + 3.6vw, 3.75rem);
	font-style: italic;
	font-weight: 900;
	line-height: .98;
	letter-spacing: -.03em;
	text-transform: uppercase;
}

.crs-shopband__subtitle {
	margin: 0 0 8px;
	font-size: clamp(1.125rem, 1rem + .6vw, 1.375rem);
	font-weight: 800;
	line-height: 1.25;
}

.crs-shopband__text {
	max-width: 52ch;
	margin: 0 0 24px;
	font-size: clamp(1.0625rem, 1rem + .4vw, 1.2rem);
}

.crs-shopband__label {
	margin: 0 0 10px;
	color: var(--crs-muted);
	font-size: .8125rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.crs-shopband__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.crs-shopband__chip {
	padding: 6px 14px;
	border: 1px solid var(--crs-on-ink-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, .08);
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1.4;
}

.crs-shopband__actions {
	margin: 26px 0 0;
}

/* A ghost button for a dark ground. */
.crs-shopband__ghost {
	border-color: var(--crs-on-ink);
	background: transparent;
	color: var(--crs-on-ink);
}

.crs-shopband__ghost:hover,
.crs-shopband__ghost:focus-visible {
	background: var(--crs-on-ink);
	color: var(--crs-ink);
}

/* Address, hours, contact: a panel with its own dark ground, so the photo may show more around it. */
.crs-shopband__info {
	padding: 6px clamp(18px, 3vw, 28px);
	border: 1px solid var(--crs-on-ink-line);
	border-radius: var(--crs-radius);
	background: rgba(var(--crs-home-ink), .88);
}

.crs-shopband__block {
	padding: 20px 0;
	border-top: 1px solid var(--crs-on-ink-line);
}

.crs-shopband__block:first-child {
	border-top: 0;
}

.crs-shopband__block-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.crs-shopband__block-title .crs-icon,
.crs-shopband__contact .crs-icon {
	color: var(--crs-on-ink-accent);
}

.crs-shopband__address {
	font-size: 1.0625rem;
}

.crs-shopband__route {
	margin: 14px 0 0;
}

.crs-shopband__contact {
	margin: 0;
	padding: 0;
	list-style: none;
}

.crs-shopband__contact li {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.crs-shopband__contact a {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	min-height: 44px;
	color: var(--crs-on-ink);
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.crs-shopband__contact a:hover {
	color: var(--crs-on-ink-accent);
	text-decoration: underline;
}

/* --- The small photos: right for any number from 0 to 6 ------------------------------------------------ */

.crs-shopband__gallery {
	padding: clamp(22px, 4vw, 40px) 0 clamp(32px, 5vw, 56px);
	background: var(--crs-bg);
}

.crs-shopband__gallery-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 24px;
	margin: 0 0 12px;
}

.crs-shopband__gallery-title {
	margin: 0;
	color: var(--crs-muted);
	font-size: .8125rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .12em;
	text-transform: uppercase;
}

/* On a phone: two per line; an odd number starts with one wide photo, so the last line is never half empty. */
.crs-shopband__photos {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.crs-shopband__photos--1 > :first-child,
.crs-shopband__photos--3 > :first-child,
.crs-shopband__photos--5 > :first-child {
	grid-column: 1 / -1;
}

.crs-shopband__photo {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--crs-radius-sm);
	background: var(--crs-surface);
	aspect-ratio: 4 / 3;
}

.crs-shopband__photos--1 > :first-child .crs-shopband__photo,
.crs-shopband__photos--3 > :first-child .crs-shopband__photo,
.crs-shopband__photos--5 > :first-child .crs-shopband__photo {
	aspect-ratio: 2 / 1;
}

.crs-shopband__thumb {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ==========================================================================
   9. Breakpoints
   ========================================================================== */

@media (min-width: 640px) {
	.crs-tiles__list {
		gap: 16px;
	}

	.crs-tiles__label {
		padding: 12px 18px;
		font-size: 1rem;
	}

	.crs-tiles__percent {
		font-size: 4rem;
	}

	.crs-row__nav {
		display: flex;
	}

	/* home.js hides the buttons of a row that has nothing to scroll. */
	.crs-row__nav[hidden] {
		display: none;
	}

	/* Three whole cards, none cut by the edge. */
	.crs-row .woocommerce ul.products {
		grid-auto-columns: calc((100% - 40px) / 3);
		gap: 20px;
	}

	.crs-home-services__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 40px;
	}

	/* The small photos on one line, each as wide as the others; one or two do not stretch across the page. */
	.crs-shopband__photos[class] {
		grid-template-columns: none;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
		gap: 12px;
	}

	.crs-shopband__photos[class] > li {
		grid-column: auto;
	}

	.crs-shopband__photos[class] > li .crs-shopband__photo {
		aspect-ratio: 4 / 3;
	}

	.crs-shopband__photos--1 {
		max-width: 420px;
	}

	.crs-shopband__photos--2 {
		max-width: 852px;
	}
}

@media (min-width: 900px) {
	.crs-home {
		/* About min(70vh, 640px), never under 440px on a low window. */
		--crs-slider-h: clamp(440px, 70vh, 640px);
		--crs-slider-controls: 96px;
	}

	/* Text on the left, at mid-height: the block takes the banner's full height, its scrim with it. */
	.crs-slide__inner {
		align-items: stretch;
	}

	.crs-slide__content {
		justify-content: center;
		padding-top: 48px;
	}

	.crs-slide--photo .crs-slide__content::before {
		top: 0;
		right: -240px;
		background: linear-gradient(to right, rgba(var(--crs-home-ink), .92) 0, rgba(var(--crs-home-ink), .84) calc(100% - 240px), rgba(var(--crs-home-ink), 0) 100%);
	}

	/* Product: the text on the left, the photo as tall as the banner on the right. */
	.crs-slide--product .crs-slide__inner {
		flex-direction: row;
		gap: clamp(24px, 4vw, 64px);
	}

	.crs-slide--product .crs-slide__content {
		flex: 1 1 0;
		max-width: 520px;
		padding-top: 48px;
	}

	.crs-slide--product .crs-slide__media {
		flex: 1.2 1 0;
		order: 0;
		min-height: 0;
	}

	.crs-slide--plain .crs-slide__content {
		max-width: 860px;
	}

	/* The controls under the text, on the container's left edge. */
	.crs-slider__controls {
		bottom: 26px;
		left: max(20px, calc((100% - var(--crs-container)) / 2));
		transform: none;
	}

	.crs-home-intro__inner {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.crs-home-intro__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.crs-home-intro__actions .crs-btn {
		flex: 0 0 auto;
	}

	.crs-home-intro__facts {
		grid-column: 1 / -1;
	}

	/* One line of tiles, "Promotions" a tile like the others. */
	.crs-tiles__list {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	}

	.crs-tiles__item--promo {
		grid-column: auto;
	}

	.crs-tiles__item--promo .crs-tiles__link {
		flex-direction: column;
		align-items: stretch;
	}

	.crs-tiles__item--promo .crs-tiles__media {
		flex: 1 1 auto;
		padding: 0;
		aspect-ratio: 1 / 1;
	}

	.crs-tiles__percent {
		font-size: clamp(6rem, 12vw, 9.5rem);
	}

	.crs-tiles__item--promo .crs-tiles__label {
		flex: 0 0 auto;
	}

	.crs-home-brands__inner {
		flex-direction: row;
		gap: 40px;
	}

	.crs-home-brands__list {
		justify-content: flex-start;
	}

	/*
	 * The text on the left keeps its full veil up to the end of its column (a little over half the width at
	 * every screen size); beyond it the photo shows, around the panel, which has its own ground.
	 *
	 * The 57% stop must stay to the right of the text column: with the grid below (1.15fr / .85fr, gap
	 * clamp(40px, 6vw, 88px)) in the 1160px container, the column ends between 51.8% and 53.7% of the band
	 * (53.7% at 1224px wide), where the veil is still .86: white text is above 11:1, the muted and accent
	 * texts above 5:1, even over a white photo. Check this again when the ratio of the grid, its gap or
	 * the stops change.
	 */
	.crs-shopband__media::after {
		background: linear-gradient(to right, rgba(var(--crs-home-ink), .92) 0, rgba(var(--crs-home-ink), .86) 57%, rgba(var(--crs-home-ink), .3) 80%, rgba(var(--crs-home-ink), .18) 100%);
	}

	.crs-shopband__inner {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
		gap: clamp(40px, 6vw, 88px);
	}
}

/*
 * Five tiles on one line in a narrow window: at 900px a tile is about 154px wide and "PROMOTIONS" (16px,
 * spaced capitals) is wider than what its label leaves beside the arrow; the page's "overflow-wrap:
 * break-word" then cuts the word in two. Tighter labels while there are five tiles or more (the selector
 * counts them: four tiles have the room and stay as they are), and a name is never cut inside a word.
 * From 1100px the tiles are wide enough again. Kept after the 640px and 900px blocks.
 */
@media (min-width: 900px) and (max-width: 1099.98px) {
	.crs-tiles__item:first-child:nth-last-child(n+5) .crs-tiles__label,
	.crs-tiles__item:first-child:nth-last-child(n+5) ~ .crs-tiles__item .crs-tiles__label {
		padding: 10px;
		font-size: .875rem;
		letter-spacing: 0;
	}

	.crs-tiles__item:first-child:nth-last-child(n+5) .crs-tiles__name,
	.crs-tiles__item:first-child:nth-last-child(n+5) ~ .crs-tiles__item .crs-tiles__name {
		overflow-wrap: normal;
	}
}

@media (min-width: 1100px) {
	/* Four cards fully visible, the fifth waiting. */
	.crs-row .woocommerce ul.products {
		grid-auto-columns: calc((100% - 72px) / 4);
		gap: 24px;
	}

	/* Five services side by side: the icon above the title. */
	.crs-home-services__list {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		column-gap: 28px;
	}

	.crs-home-services__item {
		display: block;
		padding: 20px 0 0;
	}

	.crs-home-services__icon {
		margin-bottom: 16px;
	}

	.crs-home-services__name {
		margin-bottom: 6px;
	}
}

@media print {
	.crs-slider__controls,
	.crs-row__nav,
	.crs-slide__video {
		display: none !important;
	}
}
