/* Homepage only. */

body.home { background: var(--paper); }

/* Hero */

.hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: min(calc(100vh - var(--header-height)), 820px);
	overflow: hidden;
	color: #fff;
}

.hero__media,
.hero__media::after,
.hero__poster,
.hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* Stops 2px short, so no dark line shows under the brushed edge */
.hero__media {
	height: calc(100% - 2px);
	overflow: hidden;
	background: var(--ink);
}

.hero__poster,
.hero__video { object-fit: cover; }

.hero__video {
	opacity: 0;
	transition: opacity .6s;
}

.hero__video.is-playing { opacity: 1; }

/* Light gradient. Soft text shadows help the heading stand out. */
.hero__media::after {
	content: "";
	background:
		linear-gradient(90deg, rgba(16, 19, 18, .5) 0%, rgba(16, 19, 18, .32) 40%, rgba(16, 19, 18, 0) 70%),
		linear-gradient(0deg, rgba(16, 19, 18, .6) 0%, rgba(16, 19, 18, 0) 50%);
}

.hero__inner {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	padding-top: 64px;
	padding-bottom: 104px;
}

.hero__heading {
	font-size: clamp(64px, 10vw, 150px);
	line-height: .92;
	text-transform: uppercase;
}

.hero__heading,
.hero__intro { text-shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 2px 20px rgba(0, 0, 0, .5); }

.hero__heading span { display: block; }
.hero__heading span:nth-child(2) { color: var(--lime); }

.hero__intro {
	max-width: 540px;
	margin: 22px 0 30px;
	font-size: clamp(17px, 1.5vw, 20px);
}

.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* The original brushed edge. The background colour should match the next section. */
.hero__tear {
	position: absolute;
	bottom: -2px;
	left: 50%;
	width: max(100%, 1200px); /* Keeps the rough detail visible on phones */
	aspect-ratio: 2062 / 62;
	background: var(--paper);
	-webkit-mask: url(../images/torn-edge.svg) top center / 100% calc(100% + 3px) no-repeat;
	mask: url(../images/torn-edge.svg) top center / 100% calc(100% + 3px) no-repeat;
	pointer-events: none;
	transform: translateX(-50%);
}

.hero__pause {
	position: absolute;
	right: var(--gutter);
	bottom: calc(max(100vw, 1200px) * .03 + 16px); /* Sits above the brushed edge */
	min-height: 32px;
	padding: 4px 12px;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 999px;
	background: rgba(16, 19, 18, .65);
	color: #fff;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.hero__pause[hidden] { display: none; }

/* Next start line card */

.next-event {
	flex: none;
	width: 340px;
	padding: 20px;
	border-radius: 18px;
	background: #fff;
	color: var(--ink);
	box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .5);
}

.next-event[hidden] { display: none; }
.next-event p { margin: 0; }

.next-event__top,
.next-event__bottom {
	display: flex;
	align-items: center;
	gap: 16px;
}

.next-event__bottom {
	justify-content: space-between;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
}

.next-event__logo {
	flex: none;
	width: 76px;
	height: 88px;
	object-fit: contain;
}

.next-event__label { color: var(--muted); font-size: 14px; }
.next-event__name { margin: 4px 0 6px; font-size: 32px; }
.next-event__name a { color: inherit; text-decoration: none; }
.next-event__name a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.next-event__date { font-size: 15px; }

.next-event__count { display: flex; align-items: center; gap: 8px; font-size: 14px; }

.next-event__count strong {
	color: var(--green-dark);
	font-family: var(--font-heading);
	font-size: 40px;
	font-weight: 400;
	line-height: 1;
}

@media (max-width: 1000px) {
	.hero { min-height: 0; }

	.hero__inner {
		flex-direction: column;
		align-items: flex-start;
		padding-top: 96px;
	}

	/* Text covers the full width here, so darken evenly */
	.hero__media::after {
		background: linear-gradient(0deg, rgba(16, 19, 18, .85) 0%, rgba(16, 19, 18, .68) 65%, rgba(16, 19, 18, .62) 100%);
	}

	.next-event { width: 100%; max-width: 420px; }
}

@media (max-width: 560px) {
	.hero__inner { padding-bottom: 64px; }
	.hero__heading { font-size: clamp(56px, 19vw, 84px); }
	.hero__buttons { width: 100%; flex-direction: column; }
	.hero__content { width: 100%; }
}
