/**
 * A single dish.
 *
 * Built to the Figma frame "Product-Details-Description" (node 1087-6011), whose
 * canvas is 1512px wide. Every measurement below is the Figma number multiplied
 * by --dsh-k, which is 1px at 1512 and shrinks with the viewport — so the page
 * holds its proportions at any width instead of snapping at breakpoints. The
 * same device the franchise module uses.
 *
 * @package Burger_Boi
 * @since   1.0.0
 */

/*
 * The site guards against sideways overflow with `overflow-x: hidden` on body.
 * That also makes body a scrolling box, and position:sticky measures itself
 * against the nearest scrolling box — which here never moves, so nothing inside
 * ever sticks. `clip` forbids the same overflow without creating a scroll
 * container, so sticky works and the guard is unchanged.
 *
 * This stylesheet is only loaded on a dish, so the change goes no further.
 */
body {
	overflow-x: clip;
}

.dsh {
	/*
	 * 1px at 1512px wide, floored so nothing becomes unreadable on a phone and
	 * capped so the design never inflates past its drawn size.
	 */
	--dsh-k: clamp(0.62px, 0.0661vw, 1px);

	--dsh-purple: #664bba;
	--dsh-purple-dark: #573da7;
	--dsh-purple-light: #8166d6;
	--dsh-lilac: #c4b4d7;
	--dsh-ink: #333;
	--dsh-grey: #757575;
	--dsh-off: #f5f3f2;
	--dsh-warm: #e8e2e0;
	--dsh-red: #dc2626;

	/* The jump strip's own height, so things below can clear it. */
	--dsh-strip-h: calc(73 * var(--dsh-k));

	background: #fff;
	color: var(--dsh-ink);
}

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

.dsh-hero {
	position: relative;
	background: var(--dsh-purple);
	padding: calc(172 * var(--dsh-k)) 0 calc(96 * var(--dsh-k));
}

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

/* --- Breadcrumb --- */

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

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

.dsh-crumb__link:hover {
	color: #fff;
}

.dsh-crumb__link--current {
	color: #fff;
}

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

/* --- Titles --- */

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

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

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

/* --- Buttons --- */

.dsh-hero__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: calc(16 * var(--dsh-k));
	padding-top: calc(106 * var(--dsh-k));
}

.dsh-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, transform 220ms ease;
}

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

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

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

.dsh-btn--back:hover {
	background: #fff;
	color: #000;
}

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

/* The design points this one back the way it came. */
.dsh-btn__icon--back {
	transform: rotate(180deg);
}

/* -------------------------------------------------------------------------- */
/* 2. Jump strip                                                               */
/* -------------------------------------------------------------------------- */

.dsh-strip {
	position: sticky;
	/* Beneath the site header, which is sticky itself — as the menu nav does. */
	top: var(--header-h);
	z-index: 50;
	border-bottom: 1px solid var(--dsh-warm);
	background: #fff;
	padding: calc(16 * var(--dsh-k)) 0;
}

.dsh-strip__inner {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: calc(12 * var(--dsh-k));
	max-width: calc(1380 * var(--dsh-k));
	margin: 0 auto;
	padding: 0 24px;
}

.dsh-strip__pill {
	padding: calc(8 * var(--dsh-k)) calc(16 * var(--dsh-k));
	border: 1px solid var(--dsh-ink);
	border-radius: 1000px;
	color: var(--dsh-ink);
	font-size: calc(14 * var(--dsh-k));
	font-weight: 600;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.dsh-strip__pill:hover,
.dsh-strip__pill.is-active {
	border-color: var(--dsh-purple);
	background: var(--dsh-purple);
	color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Shared section furniture                                                    */
/* -------------------------------------------------------------------------- */

.dsh-sec {
	padding: calc(96 * var(--dsh-k)) 0;
	background: #fff;
	/* Both the header and the strip are sticky, so an anchor must clear both. */
	scroll-margin-top: calc(var(--header-h) + var(--dsh-strip-h));
}

.dsh-sec--tint {
	background: var(--dsh-off);
}

.dsh-wrap {
	max-width: calc(1440 * var(--dsh-k));
	margin: 0 auto;
	padding: 0 24px;
}

.dsh-eyebrow {
	margin: 0 0 calc(8 * var(--dsh-k));
	color: var(--dsh-purple);
	font-size: calc(16 * var(--dsh-k));
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: calc(0.64 * var(--dsh-k));
	text-transform: uppercase;
}

.dsh-h2 {
	margin: 0;
	color: var(--dsh-ink);
	font-size: calc(48 * var(--dsh-k));
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.dsh-h2--sm {
	font-size: calc(40 * var(--dsh-k));
	line-height: 1;
}

.dsh-head {
	margin-bottom: calc(24 * var(--dsh-k));
}

.dsh-head__sub {
	margin: calc(16 * var(--dsh-k)) 0 0;
	color: var(--dsh-ink);
	font-size: calc(14 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* 3. What it is                                                               */
/* -------------------------------------------------------------------------- */

.dsh-about {
	display: grid;
	grid-template-columns: calc(688 * var(--dsh-k)) minmax(0, 1fr);
	gap: calc(64 * var(--dsh-k));
	align-items: start;
}

.dsh-about__left {
	display: flex;
	flex-direction: column;
	gap: calc(24 * var(--dsh-k));
}

.dsh-about__media {
	overflow: hidden;
	border-radius: calc(8 * var(--dsh-k));
	aspect-ratio: 688 / 570;
}

.dsh-about__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * The description holds while the heading and the photograph scroll away.
 *
 * align-self is what allows it at all: a grid item stretches to the row by
 * default, and a full-height item has no room to travel within, so it never
 * sticks. Note this column is also the taller of the two, which sets the row's
 * height — so on a wide screen there is little room to travel and it mostly
 * reads as ordinary scrolling. It comes into its own as the column narrows and
 * the left side grows shorter than it.
 */
.dsh-about__right {
	position: sticky;
	top: calc(var(--header-h) + var(--dsh-strip-h) + 24 * var(--dsh-k));
	align-self: start;
	display: flex;
	flex-direction: column;
	gap: calc(24 * var(--dsh-k));
}

.dsh-about__subtitle {
	margin: 0;
	color: var(--dsh-ink);
	font-size: calc(20 * var(--dsh-k));
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: calc(0.6 * var(--dsh-k));
	text-transform: uppercase;
}

.dsh-about__body {
	margin: 0;
	color: var(--dsh-grey);
	font-size: calc(20 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

.dsh-callout {
	margin: 0;
	padding: calc(24 * var(--dsh-k));
	border: 1px solid var(--dsh-warm);
	border-radius: calc(8 * var(--dsh-k));
	background: var(--dsh-off);
	color: var(--dsh-ink);
	font-size: calc(16 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

/* A tinted section needs the callout to lift off it, not sink in. */
.dsh-sec--tint .dsh-callout {
	background: #fff;
}

.dsh-note {
	margin: 0;
	color: var(--dsh-grey);
	font-size: calc(12 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* Macros                                                                      */
/* -------------------------------------------------------------------------- */

/*
 * One column per macro, and the block is only as wide as the macros in it.
 *
 * This used to be a fixed four columns, because the design has four. Remove one
 * — the fat figure, say, while the lab result is pending — and the fourth column
 * stayed behind as an empty stripe of grey. Add a fifth and it had nowhere to
 * go. Sizing the track to the content instead means the block narrows when a
 * macro is taken out and widens when one is added, with no rule to change.
 */
.dsh-macros {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, calc(172 * var(--dsh-k)));
	width: max-content;
	max-width: 100%;
	overflow: hidden;
	border-radius: calc(8 * var(--dsh-k));
	background: var(--dsh-warm);
}

.dsh-macro {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: calc(8 * var(--dsh-k));
	padding: calc(16 * var(--dsh-k)) calc(8 * var(--dsh-k));
	border-right: 1px solid #fff;
	text-align: center;
}

.dsh-macro:last-child {
	border-right: 0;
}

.dsh-macro__value {
	color: var(--dsh-ink);
	font-size: calc(40 * var(--dsh-k));
	font-weight: 600;
	line-height: 1;
}

.dsh-macro__label {
	color: var(--dsh-ink);
	font-size: calc(14 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: calc(0.28 * var(--dsh-k));
}

/*
 * The nutrition section repeats the figures on purple.
 *
 * This one is a full-width band beneath the heading, so it keeps the width and
 * shares it out between however many macros there are — the alternative, a band
 * stopping two thirds of the way across the page, reads as something failing to
 * load rather than as a design.
 */
.dsh-macros--purple {
	grid-auto-columns: minmax(0, 1fr);
	width: auto;
	margin-bottom: calc(24 * var(--dsh-k));
	background: var(--dsh-purple);
}

.dsh-macros--purple .dsh-macro__value,
.dsh-macros--purple .dsh-macro__label {
	color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Notices                                                                     */
/* -------------------------------------------------------------------------- */

.dsh-notice {
	display: flex;
	align-items: flex-start;
	gap: calc(16 * var(--dsh-k));
	margin-bottom: calc(24 * var(--dsh-k));
	padding: calc(24 * var(--dsh-k));
	border: 1px solid var(--dsh-warm);
	border-radius: calc(8 * var(--dsh-k));
	background: var(--dsh-off);
}

.dsh-notice__icon {
	width: calc(24 * var(--dsh-k));
	height: calc(24 * var(--dsh-k));
	flex: none;
	color: var(--dsh-ink);
}

.dsh-notice__title {
	margin: 0 0 calc(8 * var(--dsh-k));
	color: var(--dsh-ink);
	font-size: calc(18 * var(--dsh-k));
	font-weight: 600;
	line-height: 1.25;
}

.dsh-notice__body {
	margin: 0;
	color: var(--dsh-grey);
	font-size: calc(14 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

/* The allergen notice is the one thing on the page that must not be skimmed. */
.dsh-notice--alert {
	border-color: var(--dsh-red);
	background: #fef2f2;
}

.dsh-notice--alert .dsh-notice__icon,
.dsh-notice--alert .dsh-notice__title {
	color: var(--dsh-red);
}

.dsh-notice--alert .dsh-notice__body {
	color: var(--dsh-ink);
}

/* -------------------------------------------------------------------------- */
/* 4. Nutrition table                                                          */
/* -------------------------------------------------------------------------- */

.dsh-table {
	overflow: hidden;
	border: calc(2 * var(--dsh-k)) solid var(--dsh-purple);
	border-radius: calc(8 * var(--dsh-k));
}

.dsh-bar {
	padding: calc(24 * var(--dsh-k));
	border-bottom: 1px solid var(--dsh-warm);
}

.dsh-bar__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: calc(8 * var(--dsh-k));
	margin-bottom: calc(12 * var(--dsh-k));
}

.dsh-bar__label {
	color: var(--dsh-purple);
	font-size: calc(20 * var(--dsh-k));
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
}

.dsh-bar__value {
	color: var(--dsh-ink);
	font-size: calc(18 * var(--dsh-k));
	font-weight: 500;
}

.dsh-bar__track {
	height: calc(12 * var(--dsh-k));
	border-radius: 1000px;
	background: var(--dsh-warm);
}

.dsh-bar__fill {
	display: block;
	height: 100%;
	border-radius: 1000px;
	background: var(--dsh-purple);
}

.dsh-nut {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.dsh-nut__group th {
	padding: calc(20 * var(--dsh-k)) calc(24 * var(--dsh-k)) calc(8 * var(--dsh-k));
	color: var(--dsh-purple);
	font-size: calc(16 * var(--dsh-k));
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: calc(0.32 * var(--dsh-k));
	text-transform: uppercase;
}

.dsh-nut__row th,
.dsh-nut__row td {
	padding: calc(12 * var(--dsh-k)) calc(24 * var(--dsh-k));
	border-top: 1px solid var(--dsh-off);
	vertical-align: baseline;
}

.dsh-nut__row td {
	width: calc(180 * var(--dsh-k));
	color: var(--dsh-grey);
	font-size: calc(14 * var(--dsh-k));
	font-weight: 500;
	text-align: right;
}

.dsh-nut__row--major th {
	color: var(--dsh-ink);
	font-size: calc(16 * var(--dsh-k));
	font-weight: 600;
	text-transform: uppercase;
}

.dsh-nut__row--minor th {
	padding-left: calc(40 * var(--dsh-k));
	color: var(--dsh-grey);
	font-size: calc(16 * var(--dsh-k));
	font-weight: 500;
}

.dsh-footnote {
	margin: calc(24 * var(--dsh-k)) 0 0;
	color: var(--dsh-grey);
	font-size: calc(14 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: calc(0.28 * var(--dsh-k));
}

/* -------------------------------------------------------------------------- */
/* 5. Allergens                                                                */
/* -------------------------------------------------------------------------- */

.dsh-panel {
	display: flex;
	flex-direction: column;
	gap: calc(32 * var(--dsh-k));
	padding: calc(24 * var(--dsh-k));
	border: 1px solid var(--dsh-warm);
	border-radius: calc(8 * var(--dsh-k));
	background: var(--dsh-off);
}

.dsh-panel__title {
	margin: 0 0 calc(8 * var(--dsh-k));
	color: var(--dsh-ink);
	font-size: calc(20 * var(--dsh-k));
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
}

.dsh-panel__text {
	margin: 0;
	color: var(--dsh-grey);
	font-size: calc(18 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

.dsh-group {
	margin-top: calc(48 * var(--dsh-k));
}

.dsh-group__title {
	margin: 0 0 calc(16 * var(--dsh-k));
	color: var(--dsh-purple);
	font-size: calc(20 * var(--dsh-k));
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
}

.dsh-group__intro {
	margin: 0 0 calc(24 * var(--dsh-k));
	color: var(--dsh-grey);
	font-size: calc(14 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

/* --- Accordion --- */

.dsh-acc {
	display: flex;
	flex-direction: column;
	gap: calc(12 * var(--dsh-k));
}

.dsh-acc__item {
	border: 1px solid var(--dsh-warm);
	border-radius: calc(8 * var(--dsh-k));
	background: #fff;
}

.dsh-acc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: calc(16 * var(--dsh-k));
	padding: calc(16 * var(--dsh-k)) calc(24 * var(--dsh-k));
	color: var(--dsh-purple);
	font-size: calc(16 * var(--dsh-k));
	font-weight: 600;
	letter-spacing: calc(0.32 * var(--dsh-k));
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
}

/* The default disclosure triangle would sit beside our own chevron. */
.dsh-acc__head::-webkit-details-marker {
	display: none;
}

.dsh-acc__icon {
	width: calc(20 * var(--dsh-k));
	height: calc(20 * var(--dsh-k));
	flex: none;
	transition: transform 220ms ease;
}

.dsh-acc__item[open] .dsh-acc__icon {
	transform: rotate(180deg);
}

.dsh-acc__body {
	padding: 0 calc(24 * var(--dsh-k)) calc(24 * var(--dsh-k));
}

.dsh-acc__label {
	margin: 0 0 calc(8 * var(--dsh-k));
	color: var(--dsh-ink);
	font-size: calc(20 * var(--dsh-k));
	font-weight: 600;
	text-transform: uppercase;
}

.dsh-acc__text {
	margin: 0 0 calc(16 * var(--dsh-k));
	color: var(--dsh-grey);
	font-size: calc(18 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

.dsh-acc__contains {
	margin: 0 0 calc(8 * var(--dsh-k));
	color: var(--dsh-ink);
	font-size: calc(18 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

.dsh-acc__may {
	margin: 0;
	color: var(--dsh-grey);
	font-size: calc(14 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

/* --- Components --- */

.dsh-comps {
	display: flex;
	flex-direction: column;
	gap: calc(24 * var(--dsh-k));
}

.dsh-comp {
	padding: calc(24 * var(--dsh-k));
	border: 1px solid var(--dsh-warm);
	border-radius: calc(8 * var(--dsh-k));
	background: var(--dsh-off);
}

.dsh-comp__title {
	margin: 0 0 calc(12 * var(--dsh-k));
	color: var(--dsh-ink);
	font-size: calc(20 * var(--dsh-k));
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
}

.dsh-comp__text {
	margin: 0;
	color: var(--dsh-grey);
	font-size: calc(16 * var(--dsh-k));
	font-weight: 500;
	line-height: 1.6;
}

.dsh-comp__text + .dsh-comp__text {
	margin-top: calc(12 * var(--dsh-k));
}

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

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

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

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

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

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

	.dsh-about {
		grid-template-columns: minmax(0, 1fr);
		gap: calc(32 * var(--dsh-k));
	}

	/*
	 * Stacked, the two columns are one flow — pinning either half would sit it
	 * over the other rather than beside it.
	 */
	.dsh-about__right {
		position: static;
	}

	.dsh-h2 {
		font-size: clamp(26px, 6vw, 48px);
	}

	.dsh-h2--sm {
		font-size: clamp(24px, 5.5vw, 40px);
	}

	/* Side by side will not fit on a phone; two per row reads fine. */
	.dsh-macros {
		grid-auto-flow: row;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: auto;
	}

	.dsh-macro:nth-child(even) {
		border-right: 0;
	}

	/* Every row but the last is closed off underneath. */
	.dsh-macro:not(:nth-last-child(-n + 2)) {
		border-bottom: 1px solid #fff;
	}

	.dsh-macro__value {
		font-size: clamp(24px, 6vw, 40px);
	}

	/* The table is the one thing that cannot reflow — let it scroll itself. */
	.dsh-table {
		overflow-x: auto;
	}

	.dsh-nut {
		min-width: 520px;
	}
}

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