/* --- Sensible defaults --- */

* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html { scrollbar-gutter: stable; interpolate-size: allow-keywords; }
body { min-block-size: 100svb; }
img { max-inline-size: 100%; }

/* --- Global Custom Properties --- */

:root {
	--color-green-dark: oklch(0.2788 0.0404 184.68);
	--color-yellow: oklch(0.8402 0.1599 85.03);
	--color-orange: #EA9122;
	--color-green: #709d6b;
	--color-off-white: rgba(220, 220, 172, 1);
	--color-red: oklch(0.7 0.2 25);

	--gradient-gold: radial-gradient(ellipse farthest-corner at right bottom, #FEDB37 0%, #FDB931 8%, #9f7928 30%, #8A6E2F 40%, transparent 80%),
		radial-gradient(ellipse farthest-corner at left top, #FFFFFF 0%, #FFFFAC 8%, #D1B464 25%, #5d4a1f 62.5%, #5d4a1f 100%);

	/* --hdr-gradient: linear-gradient(
    to right in oklch,
    oklch(0.6444 0.242586 32.2465) 0%,
		oklch(0.8452 0.1762 100.85) 25%,
		oklch(0.7197 0.1196 147.97) 50%,
		oklch(0.5941 0.0935 224.53) 75%,
		oklch(0.4468 0.2081 325.76) 100%
  );
  --sdr-gradient: linear-gradient(to right, #ff3000 0%, #e6ce00 25%, #6db979 50%, #328aa8 75%, #890090 100%); */

	--width-main-column: 1080px;
	--padding-main-column: 2rem;
	--menu-logo-height: 64px;
}

/* --- Typography --- */

@font-face {
	font-family: "NexaRustSans";
	src: url("nexa-rust-sans-black.woff2") format("woff2");
	font-display: swap;
}

h1, h2, h3, h4, h5, h6 {
	font-family: "NexaRustSans", serif;
	text-align: center;
	line-height: 0.9;
	color: var(--color-off-white);
	word-break: break-word;
	margin-block: 64px 32px;
}

h1 {
	font-size: 3em;
	margin-block: 16px 48px;
}

h4 {
	margin-block: 32px 8px;
	color: color-mix(in oklch, var(--color-off-white) 50%, var(--color-orange) 50%);
}

@media (max-width: 1024px) {
	h1 { font-size: 2.25em; }
	h2 { font-size: 1.25em; }
}

@media (max-width: 640px) {
	.headline h1 { font-size: 1.5em; }
}

.headline {
	margin-block: 0 48px;

	h1, p {
		margin: 0;
	}

	.subtitle {
		text-align: center;
		font-size: 1.25rem;
		color: var(--color-green);
	}

	picture {
		display: block;
		margin: 0 auto;
		width: 80%;

		&:nth-of-type(1) {
			margin-block-end: 24px;
		}

		&:nth-of-type(2) {
			margin-block-start: 16px;
		}
	}
}

.contact-details {
	display: grid;
	grid-template-columns: max-content 1fr;
	column-gap: 0.8rem;
	row-gap: 0.2rem;
	align-items: center;
	margin: 0;

	dt,
	dd {
		margin: 0;
	}

	dt {
		font-weight: 700;
		text-align: right;

		&::after {
			content: ":";
		}
	}
}

@media (max-width: 640px) {
	.contact-details {
		grid-template-columns: 1fr;
		row-gap: 0.35rem;

		dt {
			text-align: left;
		}

		dt:not(:first-of-type) {
			margin-block-start: 0.35rem;
		}
	}
}

/* --- Layout --- */

@view-transition {
  navigation: auto;
}

html {
	font-size: 140%;
}

body {
	margin: 0;
	scrollbar-gutter: stable;
	font-family: "Crimson Pro", serif;
  font-optical-sizing: auto;
  font-style: normal;
	font-weight: 400;
	background-color: var(--color-green-dark);
	color: var(--color-green);
}

header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 10;
	background-image: url("/img/ui/background-2.jpg");
	background-image: image-set(
		url("/img/ui/background-2.avif") type("image/avif"),
		url("/img/ui/background-2.jpg") type("image/jpeg")
	);
	background-size: 800px;
	background-repeat: repeat;
	box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.25);
}

main-wrapper {
	display: flex;
	flex-direction: column;
	background-color: var(--color-green-dark);
	z-index: 1;
	position: relative;
	min-height: 100dvh;
	box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.25);
}

main {
	flex: 1;
	max-width: var(--width-main-column);
	width: 100%;
	margin-inline: auto;
	padding-inline: var(--padding-main-column);
	padding-block-start:calc(var(--padding-main-column) + var(--menu-logo-height) + 26px);
	padding-block-end: calc(var(--padding-main-column) * 2);
}

@media (max-width: 1024px) {
	main {
		padding-inline: calc(var(--padding-main-column) / 2);
		padding-block-start:calc(var(--padding-main-column) / 2 + var(--menu-logo-height) + 26px);
	}
}

footer {
	position: sticky;
	bottom: 0;
	z-index: 0;
	background-image: url("/img/ui/background-2.jpg");
	background-image: image-set(
		url("/img/ui/background-2.avif") type("image/avif"),
		url("/img/ui/background-2.jpg") type("image/jpeg")
	);
	background-size: 1600px;
	background-repeat: repeat;
	padding: 64px 32px;
	text-align: center;

	.links {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-wrap: wrap;
		gap: 0 8px;
		margin-block-end: 48px;

		.icon {
			display: flex; align-items: center;
			flex-shrink: 0;
			img { width: 1.5rem; height: 1.5rem; }
		}
	}

	.copyright {
		font-size: 0.75rem;
		margin-block: 0;
	}
}

.socials {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 16px 32px;
	margin-block-end: 24px;

	a {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-decoration: none;

		&:hover {
			text-decoration: underline;
		}
	}

	span {
		margin-block-start: 4px;
		font-size: 0.75rem;
		font-weight: 400;
	}
}

ul {
	padding-inline-start: 20px;
}

.page-divider {
	display: block;
	margin: 64px auto 0 auto;
	width: 80%;
}

.icon {
	display: inline-block;
	min-width: var(--icon-width, 1.25em);
	width: var(--icon-width, 1.25em);
	height: var(--icon-height, 1.25em);
}

.partners {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
	justify-content: center;

	img {
		border-radius: 50%;
		max-width: 180px;
	}
}

active-sponsors {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
	justify-content: center;

	generic-card {
		max-width: 320px;
		overflow: visible;

		&::before {
			border-radius: inherit;
		}
	}

	img {
		display: block;
		border-radius: 50%;
		max-width: 240px;
		padding: 6px;
		margin-inline: auto;
		margin-block: -32px 32px;
		background: var(--gradient-gold);
	}

	h3 {
		margin-block: 0 16px;

		small {
			display: block;
			font-size: 0.65rem;
			color: var(--color-yellow);
			margin-block-end: 8px;
		}

		span {
			display: block;
		}
	}

	p { font-size: 0.9rem; }
}

.ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	justify-content: center;
	margin-block: 64px 48px;
}

.vendor-registration, .side-quest-registration {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;

	form > p:nth-of-type(1) {
		margin-block-start: 0;
	}

	@media (max-width: 640px) {
		& { grid-template-columns: 1fr; }
	}
}

main-wrapper.dragon {
	&::before {
		content: "";
		position: absolute;
		inset: 0;
		background-image: url("/img/ui/dragon-bg.png");
		background-image: image-set(
			url("/img/ui/dragon-bg.avif") type("image/avif"),
			url("/img/ui/dragon-bg.png") type("image/png")
		);
		background-size: 80vw;
		background-repeat: no-repeat;
		background-position: center 25%;
		opacity: 0.1;
		z-index: -1;
	}
}

main.faq {
	details {
		margin-block-end: 32px;

		summary {
			background-color: var(--color-yellow);
			padding: 12px 16px;
			border-radius: 12px;
			color: var(--color-green-dark);
			transition: filter 400ms ease-out;

			&:hover {
				filter: brightness(1.3);
				transition: filter 200ms ease-in;
			}
		}
	}
}

.sponsors-page {
	.package-sold-out {
		color: var(--color-orange);
		font-weight: bold;
	}
}

/* --- Forms --- */

form[name] {
	max-width: 640px;
	margin-inline: auto;

	label > span {
		display: block;
		margin-block-end: 8px;
		color: var(--color-off-white);
	}

	input:not([type="radio"], [type="number"]), textarea, select {
		width: 100%;
		border-radius: 8px;
	}
}

input, textarea, select {
	border: 0;
	font: inherit;
	color: color-mix(in oklch, var(--color-green-dark) 50%, black 50%);
	border: 2px solid var(--color-green-dark);
	border-radius: 4px;
	padding: 8px 12px;
	background-color: var(--color-green);
}

textarea {
	min-height: calc(5em + 8px);
	field-sizing: content;
}

input::file-selector-button {
	background-color: var(--color-green-dark);
	color: var(--color-off-white);
	appearance: none;
	border: 0;
	border-radius: 4px;
	font-size: 0.8rem;
	padding: 5px 8px 4px;
	margin-inline-end: 8px;
}

number-input.enhanced {
	display: grid;
	grid-template-columns: auto minmax(0, max-content) auto;
	align-items: stretch;
	gap: 8px;
	justify-content: start;

	input[type="number"] {
		appearance: textfield;
		-moz-appearance: textfield;
		width: clamp(5.2rem, 5vw, 6.5rem);
		min-width: 0;
		text-align: center;
		padding-inline: 8px;
	}

	input[type="number"]::-webkit-outer-spin-button,
	input[type="number"]::-webkit-inner-spin-button {
		-webkit-appearance: none;
		margin: 0;
	}

	button {
		min-width: 2.3rem;
		aspect-ratio: 1;
		border-radius: 999px;
	}

	button .shadow,
	button .edge,
	button .front {
		border-radius: 999px;
	}

	button .front {
		padding: 4px 12px 6px;
		min-height: 2.25rem;
		font-size: 1.05rem;
		line-height: 1;
		justify-content: center;
	}

	button .front::after {
		display: none;
	}

	button:disabled {
		opacity: 0.6;
		cursor: not-allowed;
		filter: grayscale(0.2);
	}
}

file-preview {
	display: block;

	.preview-wrap:not([hidden]) {
		display: inline-block;
		position: relative;
		margin-block-start: 12px;
	}

	.img:not([hidden]) {
		display: block;
		max-width: 160px;
		max-height: 160px;
		border-radius: 4px;
		border: 2px solid var(--color-green);
		object-fit: contain;
	}

	.img-round:not([hidden]) {
		inline-size: 160px;
		block-size: 160px;
		border-radius: 50%;
		object-fit: cover;
	}

	.clear {
		display: grid;
		place-items: center;
		position: absolute;
		inset-block-start: 4px;
		inset-inline-end: 4px;
		inline-size: 1.25rem;
		block-size: 1.25rem;
		padding: 0;
		border: 0;
		border-radius: 999px;
		background-color: var(--color-yellow);
		color: var(--color-green-dark);
		font: inherit;
		font-size: 0.8rem;
		font-weight: 600;
		line-height: 1;
		cursor: pointer;
	}

	.error {
		margin-block: 8px 0;
		color: var(--color-red);
		font-size: 0.875rem;
	}
}

file-preview .hint, form .hint {
	margin-block: 8px;
	color: var(--color-off-white);
	font-size: 0.8rem;
	opacity: 0.6;
}


url-prefixer {
	display: block;

	&[checking] input {
		opacity: 0.6;
		cursor: wait;
	}

	.url-status:not(:empty) {
		display: block;
		margin-block-start: 4px;
		font-size: 0.8rem;
		color: var(--color-off-white);
		opacity: 0.6;
	}
}

gui-switch {
	--thumb-size: 1.5rem;
	--thumb: var(--color-green-dark);
	--track-inactive: color-mix(in oklch, var(--color-off-white) 50%, var(--color-green) 50%);
	--track-active: var(--color-off-white);
}

/* https://moderncss.dev/pure-css-custom-checkbox-style/ */
.form-control {
	display: grid;
  grid-template-columns: 1em auto;
  gap: 0.5em;

	input[type="checkbox"] {
		-webkit-appearance: none;
		appearance: none;
		background-color: var(--color-green-dark);
		margin: 0;
		padding: 0;
		font: inherit;
		color: currentColor;
		width: 1.15em;
		height: 1.15em;
		border: 0.15em solid currentColor;
		border-radius: 0.15em;
		transform: translateY(-0.075em);
		display: grid;
  	place-content: center;

		&::before {
			content: "";
			width: 0.65em;
			height: 0.65em;
			transform: scale(0);
			transition: 120ms transform ease-in-out;
			box-shadow: inset 1em 1em var(--color-off-white);
			background-color: CanvasText;
			transform-origin: bottom left;
  		clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
		}

		&:checked::before {
			transform: scale(1);
		}
	}
}

disable-unless[inert] {
	opacity: 0.5;
	transition: 100ms opacity ease-in-out;
}

/* --- Links & Buttons --- */

:focus-visible {
	outline-offset: 2px;
	outline-color: var(--color-orange);
	outline-width: 2px;
	outline-style: solid;
}

a {
	color: var(--color-yellow);
	font-weight: 600;
	text-decoration: none;
	transition: filter 400ms ease-out;

	&:hover {
		filter: brightness(1.3);
		transition: filter 200ms ease-in;
	}
}

/* Add a marker to external page links and skip media-only or explicitly opted-out links. */
a[href^="http"]:not([href*="//bircon.berlin"]):not([href*="//www.bircon.berlin"]):not(.no-external-icon):not(:has(img, picture, svg, video))::after {
	content: "";
	display: inline-block;
	inline-size: 0.6em;
	block-size: 0.6em;
	vertical-align: text-top;
	align-self: flex-start;
	margin-inline-start: 0.25em;
	background-color: currentColor;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M432 320H400a16 16 0 0 0-16 16V448H64V128H208a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16H48A48 48 0 0 0 0 112V464a48 48 0 0 0 48 48H400a48 48 0 0 0 48-48V336a16 16 0 0 0-16-16ZM488 0H360c-21.37 0-32.05 25.91-17 41l35.73 35.73L135 320.37a24 24 0 0 0 0 34L157.67 377a24 24 0 0 0 34 0L435.28 133.32 471 169c15 15 41 4.5 41-17V24A24 24 0 0 0 488 0Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M432 320H400a16 16 0 0 0-16 16V448H64V128H208a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16H48A48 48 0 0 0 0 112V464a48 48 0 0 0 48 48H400a48 48 0 0 0 48-48V336a16 16 0 0 0-16-16ZM488 0H360c-21.37 0-32.05 25.91-17 41l35.73 35.73L135 320.37a24 24 0 0 0 0 34L157.67 377a24 24 0 0 0 34 0L435.28 133.32 471 169c15 15 41 4.5 41-17V24A24 24 0 0 0 488 0Z'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/* Inspired by https://www.joshwcomeau.com/animation/3d-button/ */
button, .btn {
	display: inline-block;
	position: relative;
	border: none;
	background: transparent;
	padding: 0;
	cursor: pointer;
	font-family: inherit;
	font-weight: 600;
	color: var(--color-green-dark);
	outline-offset: 4px;
	transition: filter 250ms;

	.shadow {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		border-radius: 12px;
		background: hsl(0deg 0% 0% / 0.25);
		will-change: transform;
		transform: translateY(2px);
		transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
	}

	.edge {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		border-radius: 12px;
		background: linear-gradient(
			to left,
			hsl(46deg 100% 16%) 0%,
			hsl(46deg 100% 32%) 8%,
			hsl(46deg 100% 32%) 92%,
			hsl(46deg 100% 16%) 100%
		);
	}

	.front {
		display: flex;
		align-items: center;
		gap: 8px;
		position: relative;
		padding: 4px 24px 6px;
		border-radius: 12px;
		font-size: 1rem;
		color: var(--color-green-dark);
		background: var(--color-yellow);
		will-change: transform;
		transform: translateY(-4px);
		transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);

		&::after {
			content: "";
			display: block;
			width: 48px;
			height: 48px;
			background-image: url("/img/ui/icons/sword.png");
			background-size: contain;
			background-repeat: no-repeat;
			transform: rotate(225deg);
		}
	}

	&.no-icon .front::after {
		display: none;
	}

	&:hover {
		filter: brightness(1.3);
	}

	&:hover .front {
		transform: translateY(-6px);
		transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);
	}

	&:active .front {
		transform: translateY(-2px);
		transition: transform 34ms;
	}

	&:hover .shadow {
		transform: translateY(4px);
		transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);
	}

	&:active .shadow {
		transform: translateY(1px);
		transition: transform 34ms;
	}

	&:focus:not(:focus-visible) {
		outline: none;
	}
}

/* --- Cards --- */

section.scrolls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 32px;

	article {
		background-image: url("/img/ui/scroll.png");
		background-image: image-set(
			url("/img/ui/scroll.avif") type("image/avif"),
			url("/img/ui/scroll.png") type("image/png")
		);
		background-size: 100% 100%;	
		background-repeat: no-repeat;
		padding: 64px 32px;
		font-size: 0.85rem;

		.icon {
			display: block;
			margin: 0 auto 16px auto;
			width: 3rem;
			height: 3rem;
		}

		h3 {
			margin-block-start: 0;
			margin-block-end: 16px;
		}
	}
}

@media (max-width: 640px) {
	section.scrolls {
		article:nth-of-type(1) {
			p { margin-block: 0.5em; }
			picture {
				display: none;
			}
		}
	}

	.ctas .btn {
		display: block;
		width: 100%;

		.front {
			&::after {
				margin-inline-start: auto;
			}
		}
	}

	.partners img {
		max-width: 120px;
	}
}

generic-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 32px;
	--span: 1;
}

generic-card {
	display: block;
	position: relative;
	grid-column: span var(--span);
	@media (max-width: 760px) {
		& { grid-column: span 1; }
	}
	border-radius: 8px;
	padding: 0 24px;
	overflow: hidden;
	z-index: 0;
	text-shadow: 0 0 4px black;

	&::before {
		content: "";
		background-image: url("/img/ui/background-3.jpg");
		background-image: image-set(
			url("/img/ui/background-3.avif") type("image/avif"),
			url("/img/ui/background-3.jpg") type("image/jpeg")
		);
		background-size: 1600px;
		background-repeat: repeat;
		position: absolute;
		inset: 0;
		filter: brightness(0.5);
		z-index: -1;
	}

	h2 {
		margin-block: 24px 16px;
	}
}

/* --- Navigation --- */

#menu {
	max-width: 1080px;
	margin-inline: auto;
	padding-inline: var(--padding-main-column);
	padding-block: 10px 16px;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	

	> div {
		display: flex;
	}

	a:not(.btn), .dropdown, .menu-toggle {
		position: relative;
		padding: 8px 12px 8px 12px;
		text-shadow: 0 0 8px black;
	}

	.dropdown {
		border: none;
		font-weight: bold;
		position: relative;
		transition: filter 400ms ease-out;

		summary {
			list-style: none;
			display: flex;
			align-items: center;
			gap: 6px;
			cursor: pointer;
			color: var(--color-yellow);

			&::-webkit-details-marker {
				display: none;
			}

			&::after {
				content: '';
				display: inline-block;
				width: 0;
				height: 0;
				border-left: 4px solid transparent;
				border-right: 4px solid transparent;
				border-top: 5px solid currentColor;
				transition: transform 200ms ease;
			}

			&:hover {
				filter: brightness(1.3);
				transition: filter 200ms ease-in;
			}
		}

		&[open] summary::after {
			transform: rotate(180deg);
		}

		> div {
			position: absolute;
			top: 2.5em;
			left: 0;
			display: none;
			flex-direction: column;
			z-index: 1;
			padding: 10px 5px;
			box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
			width: 100%;
			border-radius: 8px;
			background-image: url("/img/ui/background-2.jpg");
			background-image: image-set(
				url("/img/ui/background-2.avif") type("image/avif"),
				url("/img/ui/background-2.jpg") type("image/jpeg")
			);
			background-size: 800px;
			background-repeat: repeat;
			opacity: 0;
			transform: translateY(-4px);
			transition: opacity 200ms ease, transform 200ms ease, display 200ms allow-discrete;
		}

		&[open] > div {
			display: flex;
			opacity: 1;
			transform: translateY(0);

			@starting-style {
				opacity: 0;
				transform: translateY(-4px);
			}
		}
	}

	.logo {
		a { padding: 0; }

		img {
			display: block;
			width: auto;
			max-height: 64px;
		}
	}

	.menu-toggle {
		display: none;
		flex-direction: column;
		background: none;
		border: none;
		cursor: pointer;
		margin-inline-start: 16px;

		span {
			width: 25px;
			height: 3px;
			background: var(--color-yellow);
			margin: 3px 0;
			transition: all .3s ease-in-out;
		}

		&.open {
			span:nth-child(1) {
				transform: rotate(45deg) translate(5px, 5px);
			}
			span:nth-child(2) {
				opacity: 0;
			}
			span:nth-child(3) {
				transform: rotate(-45deg) translate(7px, -6px);
			}
		}
	}

	/* Button overrides in menu */
	.btn {
		margin-inline-start: 8px;

		.front {
			padding: 8px 16px 10px
		}
	}
}

@media (max-width: 1024px) {
	#menu {
		display: grid;
		grid-template-areas:
			"left    empty   right"
			"bottom1 bottom1 bottom1"
			"bottom2 bottom2 bottom2";

		.logo {
			grid-area: left;
		}

		.main-nav {
			display: flex;
			flex-direction: column;
			overflow: hidden;
			max-height: 0;
			opacity: 0;
			transform: translateY(-8px);
			pointer-events: none;
			transition: max-height 320ms ease, opacity 220ms ease, transform 320ms ease;
		}

		.main-nav { grid-area: bottom1; }

		.menu-toggle {
			grid-area: right;
			display: flex;
		}

		.dropdown {
			padding-block-start: 16px;
			margin-block-end: -16px;
			padding-inline-start: 0;

			summary { display: none; }
		}

		.dropdown > div {
			position: static;
			box-shadow: none;
			background: transparent;
			padding-inline: 0;
		}

		.btn {
			margin-block-start: 8px;
		}

		&:has(.menu-toggle.open) {
			.main-nav {
				max-height: 520px;
				opacity: 1;
				transform: translateY(0);
				pointer-events: auto;
			}
			.account {
				max-height: 220px;
				opacity: 1;
				transform: translateY(0);
				pointer-events: auto;
			}
		}
	}
}

/* --- Gallery --- */

gallery-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 32px;
}

gallery-card {
	display: block;
	position: relative;
	border: 4px solid var(--color-green-dark);
	border-radius: 8px;
	overflow: hidden;
	z-index: 0;
	transition: border-color 250ms ease-in, filter 250ms ease-in;

	&:hover {
		border-color: var(--color-yellow);
		filter: brightness(1.2);
	}

	> a {
		display: block;
		height: 100%;
		font-weight: inherit;

		h2,
		p {
			transition: color 200ms ease-in;
		}

		p {
			color: var(--color-green);
		}
	}

	&::before {
		content: "";
		background-image: url("/img/ui/background-3.jpg");
		background-image: image-set(
			url("/img/ui/background-3.avif") type("image/avif"),
			url("/img/ui/background-3.jpg") type("image/jpeg")
		);
		background-size: 1600px;
		background-repeat: repeat;
		position: absolute;
		inset: 0;
		filter: brightness(0.6);
		z-index: -1;
	}

	img { aspect-ratio: 3 / 2; object-fit: cover; }

	div {
		padding: 16px;
	}

	h2 {
		margin-block: 0;
	}

	p {
		margin-block: 12px 0;
	}

	p:last-child {
		margin-block-end: 0;
	}
}

gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	margin: 32px 0;

	a {
		position: relative;
		display: block;
		overflow: hidden;
		border-radius: 8px;
		aspect-ratio: 4 / 3;
		cursor: pointer;
		filter: brightness(1);
		transition: all 300ms ease-out;

		&:hover {
			filter: brightness(0.85) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
			transform: scale(1.02);
		}

		&:active {
			transform: scale(0.98);
		}

		picture {
			width: 100%;
			height: 100%;
		}

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

/* --- Hero --- */

hero-illustration {
	--parallax-overscan: 1.08;
	width: 100%;
	display: grid;
	place-items: stretch;
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	transform-origin: center;
	will-change: transform;

	picture {
		grid-area: 1 / 1;
		display: block;
		transform: scale(var(--parallax-overscan));
		transform-origin: center;
		will-change: transform;
	}

	picture img {
		display: block;
	}

	@media (prefers-reduced-motion: no-preference) {
		picture:nth-of-type(3) img {
			animation: sliding 10s ease-in-out infinite alternate;
		}

		picture:nth-of-type(4) img {
			animation: bobbing 3s ease-in-out infinite;
		}
	}

	.hero-gyro-prompt {
		grid-area: 1 / 1;
		align-self: end;
		justify-self: center;
		margin: 1rem;
		padding: 0.7rem 1rem;
		border: 0;
		border-radius: 999px;
		background: rgba(22, 22, 22, 0.76);
		color: #fff;
		font: inherit;
		font-weight: 700;
		letter-spacing: 0.01em;
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
		cursor: pointer;
		z-index: 2;
	}
	
	.hero-gyro-prompt:disabled {
		opacity: 0.7;
		cursor: default;
	}
}

@media (max-width: 1024px) {
	hero-illustration {
		--parallax-overscan: 1.2;
		border-radius: 0;
		margin-inline: calc(var(--padding-main-column) / -2);
		width: calc(100% + var(--padding-main-column));
		aspect-ratio: 5 / 3;
	}

	hero-illustration picture {
		width: 100%;
		height: 100%;
	}

	hero-illustration picture img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}
}

@media (max-width: 640px) {
	hero-illustration {
		aspect-ratio: 4 / 3;
	}
}


/* --- Animations --- */

@keyframes bobbing {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-2%); }
}

@keyframes sliding {
	0% { transform: translateX(0); }
	100% { transform: translateX(10%); }
}

/* --- Utilities --- */

.visually-hidden {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.centered {
	text-align: center;
}

.centered-block {
	display: block;
	width: fit-content;
	margin-inline: auto;
}

.rounded {
	border-radius: 8px;
}

.flexed {
	display: flex;
	flex-direction: var(--flexed-direction, row);
	align-items: center;
	justify-content: var(--flexed-content, center);
	gap: var(--flexed-gap, 8px);
}

.banner-strip {
	background-image: url("/img/ui/background-1.jpg");
	background-image: image-set(
		url("/img/ui/background-1.avif") type("image/avif"),
		url("/img/ui/background-1.jpg") type("image/jpeg")
	);
	background-size: 800px;
	background-repeat: repeat;
	height: 64px;
}

.link-with-icon {
	display: flex;
	align-items: center;
	gap: 8px;

	a {
		display: flex;
		align-items: center;
	}

	svg {
		width: 1.2em;
		height: 1.2em;
	}
}

.rotate-90 { transform: rotate(90deg); }
.rotate-180 { transform: rotate(180deg); }

.powered-by {
	font-size: 0.75rem;
	text-align: right;
}

.mt-0 { margin-block-start: 0; }
.mb-0 { margin-block-end: 0; }
.mt-16 { margin-block-start: 16px; }
.mb-16 { margin-block-end: 16px; }
.mt-32 { margin-block-start: 32px; }
.mb-32 { margin-block-end: 32px; }
.mt-48 { margin-block-start: 48px; }
.mb-48 { margin-block-end: 48px; }
.mt-64 { margin-block-start: 64px; }
.mb-64 { margin-block-end: 64px; }

/* --- PhotoSwipe --- */

.pswp__img {
	object-fit: contain !important;
}

.pswp__zoom-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* --- Newsletter Archive --- */

.newsletter-archive {
	margin-block: 2rem;
}

.newsletter-entry {
	margin-block-end: 32px;

	time {
		display: block;
		font-size: 0.8rem;
		color: color-mix(in oklch, var(--color-green) 90%, black 10%);
	}

	time + p {
		margin-block: 0.25rem 0.5rem;
	}

	.newsletter-summary {
		margin-block: 0 16px;
	}

	.icon {
		display: flex;
		align-items: center;
		margin-inline: auto;
		width: 3rem;
		height: 3rem;
	}
}

