:root {
	/*
	Font size:
	Increase slightly over usual size.
	Respect user settings by using rem.
	Will be 18px where 16px is typical default.
	*/
	font-size: 1.125rem;

	/*
	Shared properties
	*/
	--min-nav-width: 14rem;
	--gallery-image-width: 7.5rem;
	--border-width: calc(3rem / 16);
	--default-animation: all 300ms ease-in-out;
}

* {
	box-sizing: border-box;
}

html {
	min-inline-size: min-content;
	background-color: rgb(191, 23, 23);
	background-blend-mode: soft-light;
	background-position-x: center;
	background-repeat: repeat-y;
	background-size: cover;
	background-attachment: fixed;
	scrollbar-width: thin;
	scrollbar-color: rgba(191, 0, 0, .75) rgb(63, 0, 0);
}
html.blue {
	background-color: rgb(27, 27, 223);
	scrollbar-color: rgba(0, 0, 223, .75) rgb(0, 0, 74);
}
html.green {
	background-color: rgb(15, 127, 15);
	scrollbar-color: rgba(0, 127, 0, .75) rgb(0, 31, 0);
}
html.orange {
	background-color: rgb(175, 87, 27);
	scrollbar-color: rgba(159, 55, 0, .75) rgb(31, 15, 0);
}
html.purple {
	background-color: rgb(143, 31, 143);
	scrollbar-color: rgba(127, 0, 127, .75) rgb(31, 0, 31);
}
html.chris, html.dave {
	background-position-x: left;
}

body {
	font-size: 1rem;
	font-family: Tahoma, Geneva, Arial, Helvetica, sans-serif;
	color: #ffffff;
	margin: auto;
	padding: 1rem;
	block-size: 100%;
	min-block-size: 100vh;
	max-inline-size: 80rem;
	display: flex;
	align-items: stretch;
	column-gap: 1rem;
}

p {
	margin-block: .5em;
}

h1, .h1 {
	font-size: 2rem;
	font-weight: bold;
}
h2, .h2 {
	font-size: 1.5rem;
	font-weight: bold;
}
h3, .h3 {
	font-size: 1.2rem;
	font-weight: bold;
}
h4, .h4 {
	font-size: 1rem;
	font-weight: bold;
}

h1, h2 {
	margin-block-start: 0;
	margin-block-end: .5em;
}
h3, h4, h5, h6 {
	margin-block-start: .75em;
	margin-block-end: .25em;
}

em {
	font-style: italic;
}
strong {
	font-weight: bolder;
}

a {
	color: #ffffff;
}
a:hover {
	color: #ff0000;
	text-decoration: underline;
}

img[width][height] {
	block-size: auto;
}

nav {
	flex-shrink: 0;
	position: relative;
	inset-block-start: 0;
	inset-inline-end: 0;
	padding: calc(1rem - var(--border-width));
	border: var(--border-width) solid transparent;
	min-inline-size: var(--min-nav-width);
	inline-size: fit-content;
	z-index: 10;
	color: #ffffff;
	font-size: 1.2rem;
	text-align: start;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
	transition: var(--default-animation);
}

nav h1, nav h2 {
	font-size: 1em;
}

#navcontrol {
	--hamburger-item-spacing: calc(1rem / 6);
	display: none;
	flex-direction: column;
	justify-content: space-between;
	align-items: stretch;
	row-gap: var(--hamburger-item-spacing);
	position: absolute;
	inset-block-start: 2rem;
	inset-inline-start: 2rem;
	inline-size: 1.5rem;
	block-size: 1.5rem;
	padding-block: var(--hamburger-item-spacing);
	z-index: 20;
	transition: var(--default-animation);
	cursor: pointer;
}
#navcontrol > div {
	block-size: 100%;
	border-radius: var(--hamburger-item-spacing);
	background-color: #ffffff;
}
#navcontrol > input {
	appearance: none;
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	margin: calc(1rem / 6) 0;
	inline-size: 1.5rem;
	block-size: calc(1.5rem - 1rem/3);
	cursor: pointer;
}
#navcontrol ~ main > .pagetitle:not(:has(h2)),
#navcontrol ~ main > .pagetitle:has(h2) > h2 {
	transition: var(--default-animation);
}

ul, menu {
	margin: unset;
	margin-block-end: 1.5em;
	padding: unset;
	font-size: inherit;
	list-style-type: "•";
	list-style-position: inside;
}
ul li, menu li {
	line-height: 1.375em;
	font-size: inherit;
	margin-inline-start: 0;
}

nav > menu > li {
	margin-inline-start: .125em;
}
nav > menu > li > a {
	margin-inline-start: .625em;
}
nav a.activepage {
	color: #999999;
	text-decoration: none;
	cursor: text;
	pointer-events: none;
}

main {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: start;
	align-items: stretch;
	min-inline-size: 18rem;
	padding: calc(1rem - var(--border-width));
	border-width: var(--border-width);
	border-style: solid;
	border-color: rgba(0, 0, 0, 0.75);
	background-color: rgba(63, 0, 0, 0.75);
	opacity: 1;
	transition: var(--default-animation);
}
main img {
	max-inline-size: 100%;
}

/* background colours */
.blue main {
	background-color: rgba(0, 0, 74, 0.75);
}
.green main {
	background-color: rgba(0, 31, 0, 0.75);
}
.orange main {
	background-color: rgba(47, 23, 0, 0.75);
}
.purple main {
	background-color: rgba(31, 0, 31, 0.75);
}

/* home page layout is special */
.home main {
	justify-content: space-evenly;
	text-align: center;
	align-items: stretch;
	background-color: unset;
	border-color: transparent;
}
.home main .banner {
	margin-block: 0;
	font-size: 3rem;
	font-weight: bolder;
	text-shadow: 4px 2px 0px black;
}
.home main .bannertext {
	background-color: black;
	margin-block-end: 1em;
	padding-block: .25em;
	text-wrap: balance;
}
.home main .homemenu {
	display: flex;
	justify-content: space-evenly;
	flex-wrap: wrap;
	gap: 1em;
}
.home main .homemenu a {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: .25em;
}
.home main .homemenu a img {
	min-inline-size: 15rem;
	max-inline-size: 15rem;
}

/* video page */
p.video {
	display: flex;
	justify-content: stretch;
	align-items: stretch;
}
iframe.ytvideo {
	max-block-size: 100%;
	inline-size: 100%;
	aspect-ratio: 16/9;
}

/* background images */
.swellheads {
	background-image: url("bg/bg-swellheads.jpg");
}
.corporate {
	background-image: url("bg/bg-corporate.jpg");
}
.weddings {
	background-image: url("bg/bg-weddings.jpg");
}
.clubs {
	background-image: url("bg/bg-clubs.jpg");
}
.contact {
	background-image: url("bg/bg-contact.jpg");
}
.refcorp {
	background-image: url("bg/bg-refcorp.jpg");
}
.refdoor {
	background-image: url("bg/bg-refdoor.jpg");
}
.reffund {
	background-image: url("bg/bg-reffund.jpg");
}

/* bio background images */
.chris {
	background-image: url("bg/bg-chris.jpg");
}
.dave {
	background-image: url("bg/bg-dave.jpg");
}
.davehireme {
	background-image: url("bg/bg-davehireme.jpg");
}
.davegallery {
	background-image: url("bg/bg-davegallery.jpg");
}
.davemusic {
	background-image: url("bg/bg-davemusic.jpg");
}
.daveshoptalk {
	background-image: url("bg/bg-daveshoptalk.jpg");
}
.john {
	background-image: url("bg/bg-john.jpg");
}
.marco {
	background-image: url("bg/bg-marco.jpg");
}
.peter {
	background-image: url("bg/bg-peter.jpg");
}
.tom {
	background-image: url("bg/bg-tom.jpg");
}
.will {
	background-image: url("bg/bg-will.jpg");
}

span.new {
	font-weight: 800;
	background-color: black;
	color: yellow;
	margin-inline-start: .5em;
	padding-inline: .25em;
	border-radius: .25em;
}

#player {
	width: 100%;
	margin-block: .5em;
}

.grid {
	inline-size: 100%;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(max-content, 14rem));
	column-gap: 1rem;
	line-height: 1.5em;
}

/* sub menu for dave's pages */
.davemenu {
	align-self: center;
	display: flex;
	justify-content: stretch;
	align-items: center;
	gap: 0;
	margin-block: 0;
	padding: 0;
	list-style: none;
}
.davemenu a {
	padding: .25em .5em;
	font-size: .8rem;
	font-weight: bolder;
	text-transform: lowercase;
	text-decoration: none;
	white-space: nowrap;
}
.davemenu a.blue {
	background-color: rgb(0, 0, 223);

}
.davemenu a.green {
	background-color: rgb(0, 127, 0);
}
.davemenu a.orange {
	background-color: rgb(175, 63, 0);
}
.davemenu a.purple {
	background-color: rgb(127, 0, 127);
}
.davemenu a:hover {
	color: #ffffff;
	background-color: #ff0000;
}

.davepage {
	align-self: start;
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	gap: 1em;
	justify-content: start;
	align-items: start;
	font-size: 1.25rem;
}
.davepage > a {
	display: flex;
	column-gap: 1rem;
	align-items: center;
}
.davepage > a > img {
	min-inline-size: 10rem;
	max-inline-size: 10rem;
	border: 1px solid #000000;
}
.davepage > a > span {
	text-wrap: balance;
}

.flexlinewrap {
	display: flex;
	justify-content: start;
	flex-wrap: wrap;
	gap: 1em;
}
.flexlinewrap img {
	max-inline-size: 100%;
}

.music button, .gallery button {
	appearance: none;
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	color: #ffffff;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	text-align: start;
	vertical-align: baseline;
	text-decoration: none;
}
.music button:hover, .music button:focus,
.gallery button:hover, .gallery button:focus {
	color: #ff0000;
}

/* image gallery */
.gallery {
	display: flex;
	justify-content: start;
	align-items: start;
	flex-wrap: wrap;
	gap: 1rem;
}
.gallery > button, .gallery > div > button:first-of-type, .gallery > a {
	inline-size: var(--gallery-image-width);
	text-align: center;
	text-decoration: none;
}
.gallery button > img, .gallery > a > img {
	border: 1px solid #000000;
	block-size: auto;
	inline-size: 100%;
}
.gallery button > span, .gallery > a > span {
	text-wrap: balance;
}
.gallery button:hover > img, .gallery > a:hover > img {
	border-color: #ff0000;
}

/* image gallery as a grid */
.gallery.inline {
	margin-block: .5rem;
	display: grid;
	grid-template-columns: auto;
	justify-items: start;
	align-items: start;
	column-gap: 2rem;
}
@media screen and (min-width: 720px) and (max-width: 971px) {
	#navcontrol:has(input:not(:checked)) ~ main .gallery.inline {
		grid-template-columns: auto auto;
	}
}
@media screen and (min-width: 972px) {
	.gallery.inline {
		grid-template-columns: auto auto;
	}
}
@media screen and (min-width: 1440px) {
	.gallery.inline {
		grid-template-columns: auto auto auto;
	}
}
.gallery.inline > button, .gallery.inline > div > button:first-of-type, .gallery.inline > a {
	display: flex;
	align-content: start;
	column-gap: .5rem;
	inline-size: auto;
}
.gallery.inline > div {
	display: flex;
	flex-direction: column;
	row-gap: .25em;
}
.gallery.inline > button > img, .gallery.inline > div > button:first-of-type > img, .gallery.inline > a > img {
	align-self: start;
	min-inline-size: var(--gallery-image-width);
	max-inline-size: var(--gallery-image-width);
}
.gallery.inline button > span, .gallery.inline > a > span {
	align-self: start;
	text-align: start;
}

audio.tinyplayer {
	inline-size: 100%;
	margin-block-start: .25em;
}

.magquote {
	padding-inline: .625em;
	padding-block: .375em;
	border: solid 2px #00cc00;
	background-color: #cccccc;
	color: #003300;
	font-family: "Times New Roman", Times, serif;
	font-weight: bold;
	font-style: italic;
	text-align: center;
	text-wrap: balance;
}
.magquote span {
	padding-left: 1em;
	color: #003300;
	font-weight: normal;
}

.pagetitle {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	column-gap: 1em;
	row-gap: 1em;
	margin-block-start: calc(-1 * var(--border-width));
	margin-block-end: .5rem;
}
.pagetitle > h2 {
	margin-block-end: 0;
}

.quote {
	font-style: italic;
}

/* narrow screens hide nav */
@media screen and (max-width: 1169px) {
	#navcontrol {
		display: flex;
	}

	#navcontrol + nav > h1 {
		margin-inline-start: 2.5rem;
	}

	#navcontrol:has(input:not(:checked)) + nav {
		inset-inline-end: calc(100vw + 1rem);
		margin-inline-end: calc(-1 * var(--min-nav-width) - 1rem);
		max-block-size: calc(100vh - 2rem);
	}
	#navcontrol:has(input:not(:checked)) ~ main > .pagetitle:not(:has(h2)),
	#navcontrol:has(input:not(:checked)) ~ main > .pagetitle:has(h2) > h2 {
		margin-inline-start: 2.5rem;
	}

	nav {
		inline-size: var(--min-nav-width);
		transition-property: inset, margin; /* turn off padding transition */
	}
}

@media screen and (min-width: 540px) {
	.home nav {
		border-color: rgba(0, 0, 0, 0.75);
		background-color: rgba(23, 0, 0, 0.75);
	}

	nav h1 {
		transition: var(--default-animation);
	}
}
@media screen and (max-width: 611px) {
	.home main .banner {
		font-size: 2rem;
	}
}

/* mobile/super narrow screens floating nav */
@media screen and (max-width: 539px) {
	nav {
		position: fixed;
		inset-inline-start: 0;
		block-size: 100vh;
		min-inline-size: unset;
		inline-size: 100vw;
		padding: calc(2rem - var(--border-width));
		background-color: rgb(191, 0, 0);
	}
	.blue nav {
		background-color: rgb(0, 0, 191);
	}
	.green nav {
		background-color: rgb(0, 127, 0);
	}
	.orange nav {
		background-color: rgb(159, 63, 0);
	}
	.purple nav {
		background-color: rgb(127, 0, 127);
	}

	#navcontrol:has(input:not(:checked)) + nav {
		inset-inline-start: -100vw;
		max-block-size: unset;
	}

	body:has(#navcontrol input:checked) {
		/* keeps hamburger from scrolling up */
		overflow-y: hidden;
	}
	#navcontrol:has(input:checked) {
		position: fixed;
	}
	#navcontrol:has(input:checked) ~ main {
		min-inline-size: unset;
		overflow-x: hidden;
	}

	nav > h1,
	.pagetitle:not(:has(h2)),
	.pagetitle:has(h2) > h2 {
		margin-inline-start: 2.5rem;
	}

	.home main .homemenu {
		flex-direction: column;
	}
	.home main .homemenu a img {
		min-inline-size: 12rem;
		max-inline-size: 12rem;
	}

	.gallery {
		--gallery-image-width: 6rem;
	}

	.davepage > a > img {
		min-inline-size: 8rem;
		max-inline-size: 8rem;
	}
}

/* mobile/super narrow screens mobile heights */
@media screen and (max-width: 539px) and (max-height: 899px) {
	.home main .banner {
		/* clearance for hamburger button */
		margin-inline: 2rem;
	}
	.home main .homemenu a img {
		min-inline-size: 9rem;
		max-inline-size: 9rem;
	}
}

/* mobile/super narrow and very short screens to fit home page on screen */
@media screen and (max-width: 539px) and (max-height: 699px) {
	.home main .homemenu a h3 {
		font-size: 1rem;
		margin-block-start: .25em;
		margin-block-end: 0;
	}
}