/*
 * Ravenflair: the base styles, on every page.
 *
 * The brand file (theme.json) holds the colours, the fonts and the corners; a client's look
 * changes them there. The tokens below read the brand file, and every rule in the theme's
 * CSS reads only these tokens, so a restyle never touches a rule.
 *
 * No rule here styles a bare tag: every selector is one of the theme's own "rf-" classes.
 *
 * The skeleton's own colours (Adonny, Nov 21): a neutral black for the header, the footer
 * and the text, white, a light gray, and one accent, Ravenflair's red. The red is the
 * wordmark's (#e8282b) a touch darker, so white text on it meets the standard contrast.
 * "--rf-slate" is the dark band colour whatever a look makes it: black here.
 */

:root {
	--rf-accent: var(--wp--preset--color--accent, #de2528);
	--rf-on-accent: var(--wp--preset--color--on-accent, #fff);
	--rf-ink: var(--wp--preset--color--ink, #111);
	--rf-ink-2: var(--wp--preset--color--ink-2, #3d444b);
	--rf-steel: var(--wp--preset--color--steel, #5f6873);
	--rf-slate: var(--wp--preset--color--slate, #111);
	--rf-rule: var(--wp--preset--color--rule, #d9dde1);
	--rf-tint: var(--wp--preset--color--tint, #f3f4f6);
	--rf-paper: var(--wp--preset--color--paper, #fff);
	--rf-font-head: var(--wp--preset--font-family--head, system-ui, sans-serif);
	--rf-font-body: var(--wp--preset--font-family--body, system-ui, sans-serif);
	--rf-radius: var(--wp--custom--rf--radius, 6px);
	--rf-bar-h: var(--wp--custom--rf--bar-h, 64px);
	--rf-wrap: 1240px;
	--rf-gut: clamp(16px, 4vw, 32px);
	--rf-focus: #1d4ed8;
}

:where([class^="rf-"], [class*=" rf-"]) {
	box-sizing: border-box;
}

:where([class^="rf-"], [class*=" rf-"]):focus-visible {
	outline: 3px solid var(--rf-focus);
	outline-offset: 2px;
}

/* For screen readers only. */
.rf-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.rf-wrap {
	width: 100%;
	max-width: calc(var(--rf-wrap) + 2 * var(--rf-gut));
	margin-inline: auto;
	padding-inline: var(--rf-gut);
}

.rf-main {
	display: block;
	min-height: 60vh;
	padding-block: clamp(20px, 3.5vw, 40px) clamp(40px, 7vw, 88px);
	font-family: var(--rf-font-body);
	color: var(--rf-ink);
	overflow-wrap: break-word;
}

/* A plain page (privacy policy): WordPress's own title and text, in a reading column. */
.rf-plain {
	max-width: calc(760px + 2 * var(--rf-gut));
	margin-inline: auto;
	padding-inline: var(--rf-gut);
}

/* Buttons. The accent stays solid: no gradient, no glow (docs/CONTEXT.md, design rules). */
.rf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border: 2px solid var(--rf-accent);
	border-radius: var(--rf-radius);
	background: var(--rf-accent);
	color: var(--rf-on-accent);
	font: 700 1rem/1.15 var(--rf-font-body);
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.rf-btn:hover {
	filter: brightness(0.92);
}

.rf-btn--ghost {
	border-color: var(--rf-ink);
	background: transparent;
	color: var(--rf-ink);
}

.rf-btn--ghost:hover {
	background: var(--rf-ink);
	color: var(--rf-paper);
	filter: none;
}

/* A small label on a machine: "Used available", "Also for rent". */
.rf-pill {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 0 10px;
	border: 1px solid var(--rf-rule);
	border-radius: 999px;
	background: var(--rf-tint);
	color: var(--rf-ink-2);
	font-size: 0.75rem;
	font-weight: 700;
	white-space: nowrap;
}

/* A photo's frame, and the labelled box that stands in for a missing or failed photo. */
.rf-ph {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	background: var(--rf-tint);
}

.rf-ph__box {
	display: flex;
	position: absolute;
	inset: 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 12px;
	background: var(--rf-tint);
	color: var(--rf-steel);
	text-align: center;
}

.rf-ph__label {
	color: var(--rf-ink-2);
	font: 800 1.125rem/1.2 var(--rf-font-head);
}

.rf-ph__note {
	font-size: 0.8125rem;
}

/* The header, plain form. */
.rf-hdr {
	--rf-focus: #fff;
	background: var(--rf-slate);
	color: #fff;
	font-family: var(--rf-font-body);
}

.rf-hdr__in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 24px;
	min-height: var(--rf-bar-h);
	padding-block: 8px;
}

.rf-hdr__brand {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: inherit;
	font: 800 1.125rem/1.2 var(--rf-font-head);
	letter-spacing: -0.01em;
	text-decoration: none;
}

.rf-hdr__logo {
	display: block;
	width: auto;
	max-width: min(220px, 46vw);
	height: 40px;
}

.rf-hdr__nav {
	margin-inline-start: auto;
}

.rf-hdr__list {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rf-hdr__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 14px;
	border-radius: var(--rf-radius);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.rf-hdr__link:hover {
	background: rgb(255 255 255 / 0.12);
}

.rf-hdr__link[aria-current] {
	box-shadow: inset 0 -3px 0 var(--rf-accent);
}

.rf-hdr__call {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 16px;
	border-radius: var(--rf-radius);
	background: var(--rf-accent);
	color: var(--rf-on-accent);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

@media (max-width: 719px) {
	.rf-hdr__in {
		gap: 0 12px;
		padding-block: 8px 0;
	}

	.rf-hdr__call {
		margin-inline-start: auto;
		padding: 0 12px;
	}

	.rf-hdr__call-word {
		display: none;
	}

	/* The menu takes its own row and slides sideways when it is wider than the screen. */
	.rf-hdr__nav {
		flex: 1 0 100%;
		order: 3;
		margin-inline: calc(var(--rf-gut) * -1);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.rf-hdr__list {
		padding-inline: calc(var(--rf-gut) - 14px);
	}

	.rf-hdr__link {
		min-height: 48px;
		border-radius: 0;
	}
}

/* The footer, plain form. */
.rf-ftr {
	--rf-focus: #fff;
	background: var(--rf-slate);
	color: #fff;
	font-family: var(--rf-font-body);
	font-size: 0.9375rem;
}

.rf-ftr__in {
	display: grid;
	grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr);
	gap: 28px 40px;
	padding-block: 44px 28px;
}

.rf-ftr__name {
	margin: 0;
	font: 800 1.25rem/1.2 var(--rf-font-head);
}

.rf-ftr__tag {
	margin: 8px 0 0;
	color: rgb(255 255 255 / 0.72);
}

.rf-ftr__branches {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rf-ftr__branch-name {
	margin: 0 0 6px;
	font-weight: 700;
}

.rf-ftr__addr {
	margin: 0 0 6px;
	color: rgb(255 255 255 / 0.72);
}

.rf-ftr__phone {
	margin: 0;
}

.rf-ftr__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #fff;
	font-weight: 700;
}

.rf-ftr__base {
	padding-block: 16px 24px;
	border-top: 1px solid rgb(255 255 255 / 0.16);
}

.rf-ftr__legal {
	margin: 0;
	color: rgb(255 255 255 / 0.72);
	font-size: 0.8125rem;
}

@media (max-width: 719px) {
	.rf-ftr__in {
		grid-template-columns: minmax(0, 1fr);
		padding-block: 32px 20px;
	}
}

/* Home (stand-in) and "page not found": the heading and the doors into the machines. */
.rf-home__head {
	padding-block: clamp(12px, 4vw, 48px) 28px;
}

.rf-home__title {
	margin: 0;
	font: 800 clamp(2rem, 6vw, 3.25rem)/1.05 var(--rf-font-head);
	letter-spacing: -0.02em;
}

.rf-home__lead {
	max-width: 60ch;
	margin: 12px 0 0;
	color: var(--rf-ink-2);
	font-size: 1.125rem;
}

.rf-home__back {
	margin: 28px 0 0;
}

.rf-doors {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rf-door {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 128px;
	padding: 20px;
	border: 1px solid var(--rf-rule);
	border-top: 4px solid var(--rf-accent);
	border-radius: var(--rf-radius);
	background: var(--rf-paper);
	color: var(--rf-ink);
	text-decoration: none;
}

.rf-door:hover {
	border-color: var(--rf-ink);
	border-top-color: var(--rf-accent);
}

.rf-door__label {
	font: 800 1.375rem/1.15 var(--rf-font-head);
	letter-spacing: -0.01em;
}

.rf-door__count {
	color: var(--rf-steel);
}
