/* The Menu (scale cards, then a scale's type cards), from the chosen drawing (projects/fixtures/design/canvas/Main.dc.html
   and Main-phone.dc.html). Colours and fonts come from the site's fast-tracks-design tokens (ft-redesign-shared).
   Every selector starts with .ftfx-root.ftfx-menu so the theme's link and heading styles never win.
   --ftfx-stacks (set on the root by templates/menu.php): the sheet of scale stack pictures, 5 across x 4 down. */

.ftfx-root.ftfx-menu {
	container-type: inline-size;
	container-name: ftfx;
	font-family: var(--font-body);
	color: var(--espresso-900);
	background: var(--sand-50);
	font-size: 17px;
	line-height: 1.45;
}

.ftfx-root.ftfx-menu .ftfx-wrap {
	padding-top: 28px;
	padding-bottom: 56px;
}

.ftfx-root.ftfx-menu :is(h1, h2, p) {
	font-family: var(--font-body);
	text-transform: none;
	letter-spacing: normal;
	padding: 0;
	border: 0;
	color: inherit;
}

.ftfx-root.ftfx-menu a {
	color: var(--brass-600);
}

.ftfx-root.ftfx-menu a:hover {
	color: var(--brass-800);
}

.ftfx-root.ftfx-menu a:focus-visible {
	outline: 3px solid var(--brass-500);
	outline-offset: 3px;
}

.ftfx-root.ftfx-menu .ftfx-menu-crumb {
	margin: 0 0 6px;
	font-size: 15px;
	color: var(--sand-600);
}

.ftfx-root.ftfx-menu .ftfx-menu-h1 {
	margin: 0 0 18px;
	font-size: 36px;
	font-weight: 800;
	line-height: 1.2;
}


.ftfx-root.ftfx-menu .ftfx-menu-back {
	margin: -8px 0 20px;
}

.ftfx-root.ftfx-menu .ftfx-menu-back a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-size: 17px;
	font-weight: 700;
	text-decoration: underline;
}

.ftfx-root.ftfx-menu .ftfx-menu-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}

/* Scale cards: one column per standard gauge scale, its narrow gauges stacked under it. */
.ftfx-root.ftfx-menu .ftfx-menu-cols {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	align-items: start;
	gap: 16px;
}

.ftfx-root.ftfx-menu .ftfx-menu-col {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

/* A card: the slate dark of the fixture pictures, a lift on hover. Its width sets the cqw sizes inside it. */
.ftfx-root.ftfx-menu .ftfx-menu-card {
	container-type: inline-size;
	position: relative;
	display: flex;
	flex-direction: column;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
	background: #141517; /* the slate behind the fixture plates in the shop's pictures */
	color: #fff;
	text-decoration: none;
	box-shadow: 0 1px 3px rgba(37, 20, 9, 0.18);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ftfx-root.ftfx-menu .ftfx-menu-card:hover {
	color: #fff;
	transform: translateY(-3px);
	box-shadow: 0 8px 22px rgba(37, 20, 9, 0.28);
}

/* Scale card: white, name and ratio on top over a short brass line, the cut-out stack of fixture plates
   under it (Tim chose "White + brass line", 2026-12-02). */
.ftfx-root.ftfx-menu .ftfx-menu-scale {
	background: #fff;
	color: var(--espresso-900);
	border: 1px solid var(--sand-200);
}

.ftfx-root.ftfx-menu .ftfx-menu-scale:hover {
	color: var(--espresso-900);
	border-color: var(--brass-500);
}

.ftfx-root.ftfx-menu .ftfx-menu-head {
	position: relative;
	flex: 0 0 auto;
	min-height: 32cqw;
	box-sizing: border-box;
	padding: 2cqw 3cqw;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	align-content: center;
	justify-content: center;
	column-gap: 5cqw;
	row-gap: 2px;
}

.ftfx-root.ftfx-menu .ftfx-menu-head::after {
	content: "";
	position: absolute;
	left: 30%;
	right: 30%;
	bottom: 1cqw;
	height: 3px;
	background: var(--brass-500);
}

.ftfx-root.ftfx-menu .ftfx-menu-name {
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.ftfx-root.ftfx-menu .ftfx-menu-ratio {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--brass-700);
	white-space: nowrap;
}

.ftfx-root.ftfx-menu .ftfx-menu-pic {
	flex: 1 1 0;
	min-height: 0;
	position: relative;
	overflow: hidden;
}

.ftfx-root.ftfx-menu .ftfx-menu-stack {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 68cqw; /* one picture is 448 x 305: 68% of the card's width */
	transform: translateY(-50%);
	background-image: var(--ftfx-stacks);
	background-size: 500% 400%;
	background-repeat: no-repeat;
	filter: drop-shadow(0 3px 4px rgba(37, 20, 9, 0.28));
}

/* Type card: the best seller's own picture, the type name in a dark band over its top. */
.ftfx-root.ftfx-menu .ftfx-menu-type img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ftfx-root.ftfx-menu .ftfx-menu-band {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	min-height: 24cqw;
	box-sizing: border-box;
	padding: 3cqw 6%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: max(17px, 8.6cqw);
	font-weight: 700;
	line-height: 1.15;
	background: linear-gradient(180deg, #141517 0%, #141517 91%, rgba(20, 21, 23, 0) 100%);
}

@container ftfx (max-width: 900px) {
	.ftfx-root.ftfx-menu .ftfx-menu-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ftfx-root.ftfx-menu .ftfx-menu-cols {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 32px;
	}
}

@container ftfx (max-width: 600px) {
	.ftfx-root.ftfx-menu .ftfx-menu-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	/* Phone: each column becomes a row block, its scales three a row. */
	.ftfx-root.ftfx-menu .ftfx-menu-cols {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.ftfx-root.ftfx-menu .ftfx-menu-col {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px;
	}

	.ftfx-root.ftfx-menu .ftfx-menu-h1 {
		font-size: 28px;
	}
}

/* Below 380 px three scale cards a row get too narrow for "S Hi-Rail" at 16 px: two a row. */
@container ftfx (max-width: 380px) {
	.ftfx-root.ftfx-menu .ftfx-menu-col {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* QuickSticks scale card: the best seller's photo until the stack sheet is made. */
.ftfx-root.ftfx-menu .ftfx-menu-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
