@view-transition {
	navigation: auto;
}

:root {
	--dark: #17050e;
	--light: #fff2da;

	--yellow: #f9c836;
	--pink: #e63b7a;
	--blue: #596be1;
	--navy: #181369;
	--grey: #f9e6c3;

	--bgCol: var(--light);
	--textCol: var(--dark);

	--frameBg: var(--pink);
	--frameText: var(--dark);

	--highlight: var(--yellow);

	font-size: calc(.125vi + .125vb + 1em);
}

:root[data-theme='dark'] {
	--bgCol: var(--dark);
	--textCol: var(--light);

	--highlight: var(--blue);

	--grey: #2e0a1d;
}

* {
	box-sizing: border-box;
}

body {
	background-color: var(--bgCol);
	background-image:  linear-gradient(var(--grey) 1px, transparent 1px), linear-gradient(to right, var(--grey) 1px, var(--bgCol) 1px);
	background-size: 20px 20px;

	color: var(--textCol);

	display: flex;
	flex-flow: column;
	justify-content: space-between;
	gap: 2em;

	width: 100%; height: 100vh;
	margin: 0;

	font-family: "Argent Pixel CF", serif;
}

body > *:not(footer) {
	padding: 1em;
}

header {
	display: flex;
	flex-flow: row wrap;
	justify-content: space-between;
	gap: 1em;
	max-width: 100%;
	margin-block: 1em;
}

#masthead {
	max-width: 20rem;
	aspect-ratio: 2.79 / 1;
}

#masthead:is(:hover, :focus-visible) {
	background: var(--pink);
	border-radius: 40px;
}

.logo-wrapper {
	height: auto;
	width: 100%;
	transition: transform 0.5s ease;
}

#masthead:is(:hover, :focus-visible) .logo-wrapper {
	transform: rotate(-5deg);
}

.logo .sabby-inner {
	fill: #f1cb23;
}
.logo .sabby-outer path {
	fill: #404bb5;
}
.logo .outline {
	fill: none;
}
.logo .co-op {
	fill: #404bb5;
}
[data-theme="dark"] .logo .outline {
	fill: #f1cb23;
}
[data-theme="dark"] .logo .co-op {
	fill: #f1cb23;
}
/* i added the #masthead:not(:hover, :focus-visible) so that there is sufficient colour contrast against the pink background */
[data-theme="light"] #masthead:is(:hover, :focus-visible) .logo .outline {
	fill: #f1cb23;
}
[data-theme="light"] #masthead:is(:hover, :focus-visible) .logo .co-op {
	fill: #f1cb23;
}

nav:not([aria-labelledby]) {
	display: flex;
	align-items: center;
}

nav ul {
	display: flex;
	flex-flow: row nowrap;
	gap: 8px;
	list-style: none;
	padding-left: 0;
	margin: 0;
	max-width: none;
}

nav ul li {
	padding: 2px;
}

header nav :is(a, button) {
	background-color: var(--yellow);
	border: 4px solid var(--blue);
	border-radius: 24px;
	box-shadow: -8px 8px var(--blue);
	outline-offset: -8px;

	font-family: "Speeches And Cream", sans-serif;
	font-style: italic;
	font-weight: bold;
	text-transform: uppercase;

	display: block;
	padding: 12px;

	color: var(--pink);
}

nav :is(a, button):is(:hover, :focus-visible) { 
	background-color: var(--pink);
	color: var(--dark);
	transition: color 0.5s ease;
	transition: background-color 0.5s ease;
}

nav :is(a, button):active {
	transform: translate(-8px,8px);
	box-shadow: none;
}

nav #lightToggle {
	aspect-ratio: 1 / 1;
	height: 100%;
}

.toc ol {
	list-style-type: "— ";
}

footer {
	font-size: 0.9em;
	line-height: 1.4;
}

footer section {
	display: flex;
	flex-flow: row;
	justify-content: space-between;
	align-items: center;
	padding-inline: 16px;
	padding-block: 8px;
}

footer p {
	margin-block: 0;
}

footer a {
	text-decoration-thickness: 1px;
	padding: 2px;
}

#footer-info {
	background-color: var(--bgCol);
	padding-block: 16px;
}

#footer-credits {
	background-color: var(--grey);
}

main {
	flex-basis: 100%;
	width: 100%;
	margin-inline: auto;
}

main section {
	margin: auto;
	max-width: 80ch;

	margin-inline: auto;
	margin-block: 2em;
}

main section:nth-child(1) {
	margin-block-start: 0;
}

hr {
	border: 0;
	border-top: 4px dotted var(--pink);
}

main > hr { margin-inline: 1em }

#blurb {
	display: grid;
	align-items: center;
	justify-content: center;
	grid-template-columns: 1fr 1fr 1fr;
}

#blurb img {
	grid-area: 1 / 2 / -1 / 4;
	width: 100%;
	height: 100%;
	object-fit: cover;
	align-self: flex-end;
	border-radius: 24px;
}

#blurb h1 {
	grid-area: 1 / 1 / -1 / 3;
	font-size: calc(1vi + 1vb + 1em);
	font-style: italic;
	max-width: 30ch;
	color: var(--textCol);
	text-shadow: -4px 4px var(--bgCol);
	-webkit-text-stroke: 2px var(--bgCol);
	paint-order: stroke fill;
}

h1, h2, h3, h4, h5, h6 {
	font-family: "Speeches And Cream", sans-serif;
	font-weight: bold;
	text-transform: uppercase;
}

p, ul, ol, blockquote {
	max-width: 50ch;	
}

ul {
	list-style-type: "— " ;
}

li {
	padding-block: 4px;
}

dl > div {
	margin-block-start: 16px;
}

dt {
	font-weight: bold;
	font-size: 1.1em;
}

dd {
	margin-inline-start: 1em;
}

dd ul {
	padding: 0;
}

dl:has(ul) dd:not(:has(ul))::before {
	content: "— ";
	margin-inline-start: -1em;
}

a {
	color: var(--pink);
	text-decoration: underline 2px;
}

.nw {
	white-space: nowrap;
}

a:hover {
	background-color: var(--yellow);
}

section.frame {
	padding: 1em;
	background-color: var(--frameBg);
	color: var(--frameText);
	border-radius: 24px;
}

.visually-hidden:not(:focus, :focus-within, :active) {
	transform: scale(0);
	position: absolute;
}

.flex-col {
	display: flex;
	flex-flow: row wrap;
}

.flex-row {
	display: flex;
	flex-flow: column wrap;

	> * {
		flex: 1;
	}
}

.flex-col .title {
	width: 100%;
}

.flex-col > .flex-child {
	width: 50%;
	padding-inline: 8px;
}

.flex-child > ul {
	margin-left: 0;
}

.poster-thumb {
	width: 100%;
}

.event-list {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	list-style: none;
	padding: 0;
	margin: 0 auto;
	min-width: 100%;
}

.event-list li {
	display: flex;
	flex-flow: column;
	gap: 8px;

	margin-inline: 4px;
	margin-block: 0.7em;
}

.event-list li p {
	margin: 0;
}

.event-list li > a:hover {
	background: none;
	opacity: 1;
}

.event-list :is(.poster-wrapper, .event-title) {
	display: block;
}

.event-list :is(.poster-wrapper, .event-title):hover {
	background: var(--yellow);
}

.event-list li > a img {
	display: block;
	width: 100%;
	object-fit: cover;
	aspect-ratio: 1 / 1;
}

.event-list li > a img:hover {
	mix-blend-mode: screen;
}

.event-list li > a .event-title {
	margin-top: 8px;
	inline-size: fit-content;
}

.event-list li em {
	display: inline-block;
	text-align: right;
	margin-bottom: 8px;
	background-color: var(--grey);
}

#event .title {
	border-bottom: 4px dotted var(--pink);
	padding-bottom: 0.7em;
	margin-bottom: 1em;
}

#event .title h1 {
	margin: 0;
}

#event .title date {
	display: inline-block;
	width: 100%;
	text-align: right;
	background-color: var(--grey);
	border-radius: 4px;
	padding: 8px;
}

#event .poster {
	object-fit: contain;
	height: 100%;
	margin-top: 1em;
}

#links {
	align-items: center;
}

#links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 0;

	list-style-type: none;
	width: auto;
	margin: auto;
}

#links li {
	padding: 4px;
}

#links a {
	color: var(--light);
	background-color: var(--blue);

	border: 4px solid var(--dark);
	border-radius: 24px;
	box-shadow: -8px 8px var(--dark);

	display: flex;
	justify-content: center;
	align-items: center;
}

#links a:hover {
	background-color: var(--yellow);
	transition: background-color 0.5s ease;
}

#links a:active {
	box-shadow: none;
	transform: translate(-8px,8px);
}

#links svg {
	max-height: 24px;
}

.socials a {
	text-decoration: none;
	aspect-ratio: 1 / 1;
	inline-size: 3.35rem;
}

p img.emoji, span img.emoji {
	max-height: 24px;
	transform: translateY(4px);
}

.button {
	display: block;
	text-align: center;
	border: 4px solid var(--pink);
	box-shadow: -8px 8px var(--pink);
	background-color: var(--yellow);

	border-radius: 1em;
	padding: 0.5em;
	margin-block: 2em;
	margin-inline: auto;

	max-width: 40ch;
	width: auto;

	font-family: "Speeches And Cream", sans-serif;
	color: var(--dark);
	text-decoration: none;
	font-size: 1.2em;
	font-style: italic;
	text-transform: uppercase;
}
.button:hover {
	background-color: var(--light);
	transition: background-color 0.5s ease;
}

.button:active { box-shadow: none; transform: translate(-8px,8px); }

.divider {
	color: var(--pink);
}

@media screen and (max-width: 800px) {
	nav ul { flex-flow: row wrap; }

	#blurb {
		grid-template-columns: 1fr;
	}

	#blurb :is(h1, img) {
		grid-area: 1 / 1 / -1 / -1;
	}

	#blurb h1 {
		margin-inline: 0.5em;
		max-width: 100%;
	}

	.flex-col {
		flex-flow: column;
	}

	.flex-col > .flex-child {
		width: 100%;
	}

	.flex-child > ul {
		padding-inline-start: 1em;
	}

	.event-list {
		grid-template-columns: 1fr 1fr;
	}

	.event-list li {
		display: flex;
		flex-flow: column;

		margin-inline: 4px;
		margin-block: 0.7em;
	}

	#links {
		align-items: flex-start;
	}

	footer section {
		flex-flow: row wrap;
		align-items: flex-start;
	}

	footer #footer-info p {
		width: 100%;
		margin-block: 0.4em;
	}

	footer #acknowledgement {
		flex-basis: 100% !important;
	}

}
