/**
 * Homepage sections.
 *
 * Loaded only on the front page — see burgerboi_enqueue_page_style() in
 * inc/enqueue.php. Sections are added here as each is built against Figma.
 *
 * Figma reference: frame "Home", 1512 × 7965.
 * vw midpoints are computed against 1512 so every clamp() maximum lands on the
 * exact Figma value at a 1512px viewport (e.g. 144 / 1512 = 9.5238vw).
 *
 *  1. Hero
 *  2. Order strip
 *  3. Menu categories
 *  4. Marquee
 *  5. Story
 *  6. Signature drop
 *  7. Fan favourites
 *  8. Social wall
 *  9. Locations
 * 10. Franchise
 * 11. News
 * 12. Newsletter
 */

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

/*
 * Figma "header" group: 1512 × 914, black base with the artwork on top, a
 * bottom-up black scrim, and the copy sitting on the scrim.
 *
 * The header overlays the hero rather than pushing it down, so the hero is the
 * positioning context for it.
 */
/*
 * 110px is the Figma value: both the copy and the buttons sit their boxes 110px
 * off the base of the 914px frame. The headline needs a correction on top of
 * that — see .hero__title — because a CSS line box is not a Figma text frame.
 */
.hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(600px, 60.45vw, 914px); /* 914 / 1512 */
	padding-block-end: clamp(64px, 7.2751vw, 110px); /* 110 / 1512 */
	background-color: var(--c-black);
	color: var(--c-white);
	isolation: isolate;
}

/* The uploaded background image, when there is one. */
.hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.hero__media img,
.hero__video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * The scrim: transparent at the top, solid black at the base. It covers the
 * bottom 470px of the 914px frame — 51.42% — so the headline always has
 * contrast no matter what image is behind it.
 */
.hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	z-index: -1;
	height: 51.42%;
	background: linear-gradient(180deg, rgb(0 0 0 / 0%) 0%, rgb(0 0 0 / 100%) 100%);
	pointer-events: none;
}

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

/*
 * Figma sets a 16px gap between the eyebrow and the headline. The headline's
 * line box already contributes ~16px of leading above its glyphs at 144px, so a
 * CSS gap of 0 reproduces the 16px of *visible* space in the design. Below the
 * desktop breakpoint the type shrinks, that leading shrinks with it, and a real
 * gap is reinstated.
 */
.hero__content {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

@media (max-width: 1100px) {
	.hero__content {
		gap: 8px;
	}
}

/* GeneralSans-SemiboldItalic, 24px, line-height 28.8 (1.2). */
.hero__eyebrow {
	margin: 0;
	font-size: clamp(16px, 1.587vw, 24px); /* 24 / 1512 */
	font-style: italic;
	font-weight: var(--fw-semibold);
	line-height: 1.2;
}

/*
 * The headline: 144px, line-height 129.6 (0.9), letter-spacing -4.32px
 * (-0.03em). The accent half is a character-range override in Figma; here it is
 * its own span so the two halves stay separately editable.
 */
/*
 * At line-height 0.9 the line box is shorter than the glyphs, but it still
 * carries leading below the last baseline — about 11px at 144px. The design
 * measures to the ink, so the box is pulled down by that amount. Expressed in
 * em, it scales with the headline instead of drifting at other viewport widths.
 */
.hero__title {
	margin: 0 0 -0.076em;
	font-size: clamp(40px, 9.5238vw, 144px); /* 144 / 1512 */
	font-weight: var(--fw-bold);
	letter-spacing: -0.03em;
	line-height: 0.9;
	text-transform: uppercase;
}

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

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

/* --- Scroll cue --- */

.hero__scroll {
	position: absolute;
	bottom: 20px;
	left: 50%;
	display: inline-flex;
	gap: 10px;
	align-items: center;
	padding: 10px;
	color: var(--c-white);
	font-size: 18px;
	font-weight: var(--fw-semibold);
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
	transform: translateX(-50%);
	transition: opacity var(--duration) var(--ease);
}

.hero__scroll:hover {
	opacity: 0.7;
}

.hero__scroll svg {
	width: 24px;
	height: 24px;
	animation: hero-bob 1.8s var(--ease) infinite;
}

@keyframes hero-bob {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(4px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero__scroll svg {
		animation: none;
	}
}

/* --- Below the Figma breakpoint --- */

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

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

@media (max-width: 640px) {
	.hero {
		padding-block-end: 80px;
	}

	.hero__actions {
		width: 100%;
	}

	.hero__actions .btn {
		width: 100%;
	}

	.hero__scroll {
		display: none; /* The cue is redundant on a phone. */
	}
}
