/* Site-wide styles: brand settings, type, buttons and header. */

:root {
	--green: #679c2a;
	--green-dark: #4d7a1c;
	--lime: #91c93e;
	--red: #ce1126;
	--ink: #1f2322;
	--muted: #5f6662;
	--paper: #f1f2f1;
	--line: #dcdfdc;

	--font-heading: "alternate-gothic-no-2-d", Impact, sans-serif;
	--font-body: "azo-sans-web", system-ui, sans-serif;

	--header-height: 76px;
	--admin-bar: 0px;
	--gutter: clamp(16px, 4vw, 40px);
}

body {
	background: #fff;
	color: var(--ink);
	font-family: var(--font-body);
	font-weight: 400;
}

h1, h2, h3, h4 {
	margin: 0;
	font-family: var(--font-heading);
	font-weight: 400;
	line-height: 1;
}

.wrap {
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 var(--gutter);
}

:focus-visible {
	outline: 3px solid #f9d148;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--ink);
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100;
	width: auto;
	height: auto;
	padding: 12px 18px;
	clip: auto;
	background: #fff;
	color: var(--ink);
}

/* Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 26px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color .15s, color .15s;
}

.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #a5d95a; }

/* The brighter green from the original header */
.btn--brand { background: var(--green); color: #fff; }
.btn--brand:hover { background: var(--green-dark); }

.btn--green { background: var(--green-dark); color: #fff; }
.btn--green:hover { background: #3d6216; }

.btn--outline { border-color: #fff; color: #fff; }
.btn--outline:hover { background: #fff; color: var(--ink); }

/* Header */

html { scroll-padding-top: calc(var(--header-height) + var(--admin-bar)); }

.admin-bar { --admin-bar: 32px; }

.site-header {
	position: sticky;
	top: var(--admin-bar);
	z-index: 50;
	background: #fff;
	color: var(--ink);
	box-shadow: 0 1px 0 var(--line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: var(--header-height);
}

.site-logo { flex: none; }

.site-logo img {
	display: block;
	width: auto;
	height: 48px;
}

.site-nav { margin-left: auto; }

.site-nav__list {
	display: flex;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__link {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 14px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: inherit;
	font: 700 16px/1.2 var(--font-body);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.site-nav__link:hover,
.site-nav__link[aria-expanded="true"],
.icon-link:hover { background: var(--paper); }

.site-nav__link--series { color: var(--red); }

.events-toggle svg { width: 11px; transition: transform .2s; }
.events-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.site-tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

.site-tools .btn {
	min-height: 46px;
	margin-left: 6px;
	padding: 10px 22px;
	white-space: nowrap;
}

.icon-link {
	position: relative;
	display: grid;
	flex: none;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: inherit;
}

.icon-link svg {
	width: 23px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

.basket-count {
	position: absolute;
	top: 1px;
	right: 0;
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--green-dark);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

/* Events menu */

.events-menu { background: #fff; }
.events-menu__title { display: none; }

.events-menu__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 12px;
	padding-top: 24px;
	padding-bottom: 28px;
}

.events-menu a { color: inherit; text-decoration: none; }

.events-menu__event {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 16px 10px;
	border-radius: 14px;
	text-align: center;
}

.events-menu__event:hover { background: var(--paper); }

.events-menu__logo {
	width: 84px;
	height: 84px;
	object-fit: contain;
}

.events-menu strong {
	display: block;
	font: 400 26px/1 var(--font-heading);
	text-transform: uppercase;
}

.events-menu small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.3; }

.events-menu .events-menu__series {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 12px;
	padding: 20px;
	border-radius: 14px;
	background: var(--ink);
	color: #fff;
	font-size: 15px;
}

.events-menu__series em { color: var(--lime); font-style: normal; font-weight: 700; }

.menu-toggle,
.site-nav__mobile { display: none; }

@media (min-width: 1001px) {
	.js .events-menu {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		visibility: hidden;
		max-height: calc(100vh - var(--header-height) - var(--admin-bar));
		overflow-y: auto;
		border-top: 1px solid var(--line);
		box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .3);
		opacity: 0;
		transition: opacity .15s, visibility .15s;
	}

	.js .events-menu.is-open { visibility: visible; opacity: 1; }
}

@media (max-width: 1000px) {
	:root { --header-height: 72px; }

	.site-header__inner { gap: 8px; }
	.site-logo { margin-right: auto; }
	.site-logo img { height: 44px; }

	.site-tools { order: 1; }
	.site-tools__account,
	.site-tools .site-tools__enter { display: none; }

	.js .menu-toggle {
		display: grid;
		order: 2;
		margin-right: -8px;
		padding: 0;
		border: 0;
		background: none;
		cursor: pointer;
	}

	.menu-toggle__bars,
	.menu-toggle__bars::before,
	.menu-toggle__bars::after {
		display: block;
		width: 26px;
		height: 3px;
		background: currentColor;
		transition: transform .2s;
	}

	.menu-toggle__bars { position: relative; }

	.menu-toggle__bars::before,
	.menu-toggle__bars::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.menu-toggle__bars::before { top: -8px; }
	.menu-toggle__bars::after { top: 8px; }

	[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
	[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(8px) rotate(45deg); }
	[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-8px) rotate(-45deg); }

	/* Full-screen charcoal menu below the header */
	.menu-open { overflow: hidden; }

	.site-nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		height: calc(100vh - var(--header-height) - var(--admin-bar));
		height: calc(100dvh - var(--header-height) - var(--admin-bar));
		padding: 24px var(--gutter) 40px;
		overflow-y: auto;
		background: var(--ink);
		color: #fff;
	}

	.js .site-nav:not(.is-open) { display: none; }

	/* Without JavaScript, show the menu as part of the page */
	html:not(.js) .site-header { position: static; }
	html:not(.js) .site-header__inner { flex-wrap: wrap; }
	html:not(.js) .site-nav { position: static; order: 3; width: 100%; height: auto; }

	.site-nav__list { display: block; margin-bottom: 28px; }
	.site-nav__mobile { display: block; }
	.btn.site-nav__mobile { display: flex; }
	.events-toggle { display: none; }

	.site-nav a.site-nav__link {
		padding: 14px 0;
		border-bottom: 1px solid rgba(255, 255, 255, .2);
		border-radius: 0;
		background: none;
		color: #fff;
		font: 400 30px/1 var(--font-heading);
		text-transform: uppercase;
	}

	.events-menu { margin-bottom: 16px; background: none; }

	.events-menu__title {
		display: block;
		margin: 0 0 12px;
		font-weight: 700;
	}

	.events-menu__grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 10px;
		padding: 0;
	}

	.events-menu__event {
		flex-direction: row;
		padding: 10px;
		background: rgba(255, 255, 255, .08);
		text-align: left;
	}

	.events-menu__event:hover { background: rgba(255, 255, 255, .16); }
	.events-menu__logo { flex: none; width: 46px; height: 50px; }
	.events-menu strong { font-size: 22px; }
	.events-menu small { color: rgba(255, 255, 255, .8); font-size: 13px; }

	/* Run Like L has its own link just below */
	.events-menu .events-menu__series { display: none; }
}

@media (max-width: 782px) {
	.admin-bar { --admin-bar: 46px; }
}

@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}
