/**
 * Menu page.
 *
 * Loaded only on the page with slug "menu" (see burgerboi_enqueue_page_style).
 * Figma frame "Menu", 1512 wide. Uses the theme design tokens from main.css.
 *
 * 1. Hero
 * 2. Sticky category nav
 * 3. Category sections
 * 4. Cards (big + list)
 * 5. Responsive
 */

/* -------------------------------------------------------------------------- */
/* 1. Hero                                                                     */
/* -------------------------------------------------------------------------- */

.mhero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: clamp(420px, 37.8vw, 572px); /* header (~90px) + this ≈ the 670 design hero */
	padding-block: clamp(48px, 5.29vw, 80px);
	background: var(--c-ink);
	color: var(--c-white);
	isolation: isolate;
}

.mhero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.mhero__media img,
.mhero__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Dark scrim so the copy stays legible on any photo. */
.mhero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgb(17 17 17 / 20%) 0%, rgb(17 17 17 / 85%) 100%);
}

.mhero__inner {
	display: flex;
	gap: 32px;
	align-items: flex-end;
	justify-content: space-between;
	width: 100%;
}

.mhero__eyebrow {
	margin: 0 0 16px;
	font-size: clamp(16px, 1.587vw, 24px); /* 24 / 1512 */
	font-weight: var(--fw-semibold);
	line-height: 1.2;
	text-transform: uppercase;
}

.mhero__title {
	margin: 0;
	font-size: clamp(40px, 4.7619vw, 72px); /* 72 / 1512 */
	font-weight: var(--fw-bold);
	letter-spacing: -0.02em;
	line-height: 1;
	text-transform: uppercase;
}

.mhero__title-accent {
	display: block;
	color: var(--c-purple);
}

.mhero__actions {
	display: flex;
	flex-shrink: 0;
	flex-direction: column;
	align-items: flex-end;
	gap: 16px;
}

/* -------------------------------------------------------------------------- */
/* 2. Sticky category nav                                                      */
/* -------------------------------------------------------------------------- */

.mnav {
	position: sticky;
	/* Comes to rest under the sticky site header rather than beneath it. */
	top: var(--header-h);
	z-index: 50;
	padding-block: 16px;
	background: var(--c-white);
	border-bottom: 1px solid var(--c-cream);
}

.mnav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * Wrapped, the fourteen categories stack five rows deep on a phone — a sticky
 * bar roughly 280px tall, which with the header leaves barely half the screen
 * for the menu it is meant to navigate. One scrolling row instead, the same
 * idiom the location and category rails already use.
 */
@media (max-width: 900px) {
	.mnav__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		/* Bleed to the screen edges so the row does not appear to end at the gutter. */
		margin-inline: calc(var(--gutter) * -1);
		padding-inline: var(--gutter);
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.mnav__list::-webkit-scrollbar {
		display: none;
	}

	.mnav__list > li {
		flex: 0 0 auto;
	}

	/* One row rather than two, so the anchor no longer overshoots. */
	.mcat {
		scroll-margin-top: 72px;
	}
}

/* Pills: outline by default, solid purple for the section in view. */
.mnav__link {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border: 1px solid rgb(51 51 51 / 35%);
	border-radius: var(--radius-pill);
	color: var(--c-charcoal);
	font-size: 14px;
	font-weight: var(--fw-semibold);
	letter-spacing: 0.02em;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
	transition:
		background-color var(--duration) var(--ease),
		border-color var(--duration) var(--ease),
		color var(--duration) var(--ease);
}

.mnav__link:hover,
.mnav__link.is-active {
	border-color: var(--c-purple);
	background: var(--c-purple);
	color: var(--c-white);
}

/* -------------------------------------------------------------------------- */
/* 3. Category sections                                                        */
/* -------------------------------------------------------------------------- */

.mcat {
	padding-block: clamp(40px, 4.23vw, 64px); /* 64 / 1512 */
	/*
	 * Offset for the sticky nav when jumping to an anchor. It covers the nav only
	 * — html's scroll-padding-top already accounts for the header above it, and
	 * the two add up. The row wraps to two on a wide screen and scrolls as one on
	 * a phone, hence the second value.
	 */
	scroll-margin-top: 122px;
}

.mcat--light {
	background: var(--c-white);
}

.mcat--tint {
	background: var(--c-off-white);
}

.mcat__inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mcat__head {
	display: flex;
	gap: 24px;
	align-items: flex-end;
	justify-content: space-between;
}

.mcat__title {
	margin: 0;
	color: var(--c-charcoal);
	font-size: clamp(32px, 3.1746vw, 48px); /* 48 / 1512 */
	font-weight: var(--fw-bold);
	line-height: 1.2;
	text-transform: uppercase;
}

.mcat__sub {
	margin: 8px 0 0;
	color: var(--c-grey);
	font-size: 18px;
	font-weight: var(--fw-medium);
	line-height: 1.6;
}

.mcat__order {
	flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* 4. Cards                                                                    */
/* -------------------------------------------------------------------------- */

/*
 * Three 444px cards per 1380px row with 24px gaps: 444×3 + 24×2 = 1380.
 * A grid keeps the columns equal and lets list cards grow to their text.
 */
.mgrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	/* Cards in a row share the tallest one's height, so a shorter description
	   (or fewer meta facts) no longer makes a card come up short beside the
	   first. Big cards already fill via flex, pushing their CTA to the bottom. */
	align-items: stretch;
}

/* The list card spans differently, but both fit the same 3-col grid. */

.mcard {
	overflow: hidden;
	border: 1px solid var(--c-cream);
	border-radius: 12px;
	background: var(--c-off-white);
}

.mcard__media {
	position: relative;
}

.mcard__media img {
	display: block;
	object-fit: cover;
}

.mcard__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mcard__title {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	color: var(--c-charcoal);
	text-transform: none;
}

.mcard__tag {
	padding: 2px 10px;
	border-radius: var(--radius-pill);
	background: var(--c-purple);
	color: var(--c-white);
	font-size: 12px;
	font-weight: var(--fw-semibold);
	line-height: 1.6;
	text-transform: uppercase;
}

.mcard__desc {
	margin: 0;
	color: var(--c-grey);
	font-size: 14px;
	font-weight: var(--fw-medium);
	line-height: 1.5;
}

.mcard__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: center;
	justify-content: space-between;
}

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

/* The order link: an outline purple pill with a sliding arrow. */
.mcard__order {
	display: inline-flex;
	gap: 4px;
	align-items: center;
	flex-shrink: 0;
	padding: 6px 12px;
	border: 1px solid var(--c-purple);
	border-radius: var(--radius-pill);
	color: var(--c-purple);
	font-size: 14px;
	font-weight: var(--fw-semibold);
	line-height: 1.6;
	text-transform: uppercase;
	transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

.mcard__order:hover {
	background: var(--c-purple);
	color: var(--c-white);
}

.mcard__order-icon {
	width: 20px;
	height: 20px;
	transition: transform var(--duration) var(--ease);
}

.mcard__order:hover .mcard__order-icon {
	transform: translateX(3px);
}

/* --- Big card: image on top --- */

.mcard--big {
	display: flex;
	flex-direction: column;
}

.mcard--big .mcard__media {
	aspect-ratio: 444 / 270;
}

/* The Smash feature cards hold tall, standing burger photos. The wide default
   box crops a standing burger down to a zoomed middle band, so give these a
   near-square box that shows the whole burger. */
#cat-smash .mcard--big .mcard__media {
	aspect-ratio: 1 / 1;
}

/* Shake photos are tall drinks on a square shot; the wide default box would cut
   off the straw and the base. A square box matches the source and shows the
   whole cup, top to bottom. */
#cat-shakes .mcard--big .mcard__media {
	aspect-ratio: 1 / 1;
}

/* Absolutely fill the aspect box so every card image is the same height, no
 * matter the source photo's proportions. */
.mcard--big .mcard__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.mcard--big .mcard__body {
	flex: 1;
	justify-content: space-between;
	padding: 16px;
}

.mcard--big .mcard__title {
	font-size: 24px;
	font-weight: var(--fw-bold);
	line-height: 1.2;
}

/* Big-card meta reads as plain dark facts, per the design. */
.mcard--big .mcard__meta-item {
	color: var(--c-charcoal);
	font-size: 14px;
	font-weight: var(--fw-medium);
	line-height: 1.6;
}

/* --- List card: image on the left --- */

.mcard--list {
	display: flex;
	gap: 12px;
	padding: 12px;
}

.mcard--list .mcard__media {
	flex-shrink: 0;
	width: 100px;
	height: 100px;
	overflow: hidden;
	border-radius: 8px;
}

.mcard--list .mcard__media img {
	width: 100%;
	height: 100%;
}

.mcard--list .mcard__body {
	flex: 1;
	min-width: 0;
	justify-content: space-between;
}

.mcard--list .mcard__title {
	font-size: 20px;
	font-weight: var(--fw-semibold);
	line-height: 1.3;
}

/* List-card meta reads as small purple pills. */
.mcard--list .mcard__meta-item {
	padding: 1px 10px;
	border: 1px solid rgb(102 75 186 / 35%);
	border-radius: var(--radius-pill);
	color: var(--c-purple);
	font-size: 13px;
	font-weight: var(--fw-medium);
	line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* 5. Responsive                                                               */
/* -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
	.mgrid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 900px) {
	.mhero__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
	}

	.mhero__actions {
		align-items: flex-start;
	}

	.mcat__head {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 600px) {
	.mgrid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 400px) {
	.mcard--list {
		flex-direction: column;
	}

	.mcard--list .mcard__media {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 10;
	}
}

/* ========================================================================== */
/* A category's own page — /menu/fuel/ and the rest                            */
/* ========================================================================== */

/*
 * Measurements follow the same device as the dish page: --mcp-k is 1px at the
 * 1512px canvas the design is drawn on and shrinks with the viewport, so the
 * page holds its proportions rather than snapping at breakpoints.
 */
.mcp {
	--mcp-k: clamp(0.62px, 0.0661vw, 1px);
	--mcp-purple: #664bba;
	--mcp-purple-dark: #573da7;
	--mcp-purple-light: #8166d6;
	--mcp-lilac: #c4b4d7;
	--mcp-ink: #333;
	--mcp-grey: #757575;
	--mcp-off: #f5f3f2;

	background: #fff;
}

/* --- Hero --- */

.mcp-hero {
	background: var(--mcp-purple);
	padding: calc(96 * var(--mcp-k)) 0 calc(72 * var(--mcp-k));
}

.mcp-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	gap: calc(32 * var(--mcp-k));
	max-width: calc(1380 * var(--mcp-k));
	margin: 0 auto;
	padding: 0 24px;
}

.mcp-crumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: calc(8 * var(--mcp-k));
	margin-bottom: calc(16 * var(--mcp-k));
}

.mcp-crumb__link {
	color: var(--mcp-lilac);
	font-size: calc(16 * var(--mcp-k));
	font-weight: 500;
	text-decoration: none;
	transition: color 200ms ease;
}

.mcp-crumb__link:hover,
.mcp-crumb__link--current {
	color: #fff;
}

.mcp-crumb__sep {
	width: calc(20 * var(--mcp-k));
	height: calc(20 * var(--mcp-k));
	flex: none;
	color: var(--mcp-lilac);
}

.mcp-hero__eyebrow {
	margin: 0 0 calc(12 * var(--mcp-k));
	color: #fff;
	font-size: calc(20 * var(--mcp-k));
	font-weight: 600;
	letter-spacing: calc(1 * var(--mcp-k));
	text-transform: uppercase;
}

.mcp-hero__title {
	margin: 0 0 calc(16 * var(--mcp-k));
	color: #fff;
	font-size: calc(72 * var(--mcp-k));
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.mcp-hero__intro {
	max-width: calc(900 * var(--mcp-k));
	margin: 0;
	color: #fff;
	font-size: calc(20 * var(--mcp-k));
	font-weight: 500;
	line-height: 1.6;
}

.mcp-hero__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: calc(12 * var(--mcp-k));
	padding-top: calc(56 * var(--mcp-k));
}

.mcp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 1000px;
	font-weight: 600;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.mcp-btn--primary {
	gap: calc(8 * var(--mcp-k));
	padding: calc(12 * var(--mcp-k)) calc(24 * var(--mcp-k));
	border: calc(2 * var(--mcp-k)) solid var(--mcp-purple-light);
	background: var(--mcp-purple-dark);
	color: #fff;
	font-size: calc(18 * var(--mcp-k));
	letter-spacing: calc(0.72 * var(--mcp-k));
}

.mcp-btn--primary:hover {
	background: var(--mcp-purple-light);
}

.mcp-btn--back {
	gap: calc(6 * var(--mcp-k));
	padding: calc(8 * var(--mcp-k)) calc(16 * var(--mcp-k));
	border: 1px solid #fff;
	background: transparent;
	color: #fff;
	font-size: calc(16 * var(--mcp-k));
	letter-spacing: calc(0.64 * var(--mcp-k));
}

.mcp-btn--back:hover {
	background: #fff;
	color: var(--mcp-purple);
}

.mcp-btn__icon {
	width: calc(20 * var(--mcp-k));
	height: calc(20 * var(--mcp-k));
	flex: none;
}

.mcp-btn__icon--back {
	transform: rotate(180deg);
}

/* --- The dishes --- */

.mcp-items {
	padding: calc(64 * var(--mcp-k)) 0 calc(72 * var(--mcp-k));
	background: #fff;
}

.mcp-items__cta {
	margin: calc(40 * var(--mcp-k)) 0 0;
	text-align: center;
}

.mcp-empty {
	margin: 0;
	color: var(--mcp-grey);
	font-size: calc(18 * var(--mcp-k));
}

/* --- What is it --- */

.mcp-about {
	padding: calc(80 * var(--mcp-k)) 0;
	background: var(--mcp-off);
}

.mcp-about__eyebrow {
	margin: 0 0 calc(12 * var(--mcp-k));
	color: var(--mcp-purple);
	font-size: calc(16 * var(--mcp-k));
	font-weight: 600;
	letter-spacing: calc(0.64 * var(--mcp-k));
	text-transform: uppercase;
}

.mcp-about__title {
	margin: 0 0 calc(28 * var(--mcp-k));
	color: var(--mcp-ink);
	font-size: calc(48 * var(--mcp-k));
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

.mcp-about__body {
	max-width: calc(1120 * var(--mcp-k));
	margin: 0 0 calc(20 * var(--mcp-k));
	color: var(--mcp-grey);
	font-size: calc(18 * var(--mcp-k));
	font-weight: 500;
	line-height: 1.7;
}

.mcp-about__body:last-child {
	margin-bottom: 0;
}

/* --- Narrow screens --- */

@media (max-width: 900px) {
	.mcp-hero {
		padding-top: calc(48 * var(--mcp-k));
	}

	.mcp-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.mcp-hero__actions {
		align-items: flex-start;
		padding-top: 0;
	}

	.mcp-hero__title {
		font-size: clamp(34px, 9vw, 72px);
	}

	.mcp-hero__intro,
	.mcp-about__body {
		font-size: clamp(15px, 2.4vw, 20px);
	}

	.mcp-about__title {
		font-size: clamp(26px, 7vw, 48px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mcp-btn,
	.mcp-crumb__link {
		transition: none;
	}
}
