:root {
	--offwhite: #e2ddd0;
	--ink: #331c20;
	--brand-red: #cc3524;

	--header-h:
	clamp(14rem, 38.2vh, 38rem);

	--brand-w:
	clamp(10rem, 8.8542vw, 14rem);

	--edge-w:
	clamp(0.75rem, 5.2083vw, 5rem);

	--menu-text-size:
	clamp(0.8rem, 0.95vw + 0.35rem, 1.15rem);

	--menu-top-padding:
	clamp(2rem, 5vw, 5rem);

	--menu-item-spacing:
	clamp(0.8rem, 1.4vw + 0.25rem, 1.4rem);

	--menu-letter-spacing:
	clamp(0.01em, 0.03vw, 0.04em);

	--footer-text-size:
	clamp(0.75rem, 0.85vw + 0.35rem, 1rem);

	--footer-copy-size:
	clamp(1rem, 1.2vw + 0.5rem, 1.4rem);

	--heading-primary-size:
	clamp(1.5rem, 2.2vw + 0.5rem, 3rem);

	--heading-secondary-size:
	clamp(1.15rem, 1.25vw + 0.4rem, 1.8rem);

	--heading-primary-spacing:
	clamp(0.05em, 0.2vw, 0.12em);

	--heading-secondary-spacing:
	clamp(0.04em, 0.15vw, 0.1em);

	--email-text-size:
	clamp(0.8rem, 0.85vw + 0.35rem, 1.1rem);

	--email-letter-spacing:
	clamp(0.01em, 0.08vw, 0.04em);

	--brand-logo-padding:
	clamp(0.75rem, 1.5vw, 2rem);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	background-color: var(--offwhite);
	color: var(--ink);
	font-family: monospace;
}

h1 {
	margin-block: 0.67em;
	color: var(--brand-red);
	text-decoration: overline;
	text-decoration-style: dashed;
	font-size: var(--heading-primary-size);
	letter-spacing: var(--heading-primary-spacing);
	font-weight: normal;
}

h2 {
	margin-block: 0.83em;
	font-size: var(--heading-secondary-size);
	letter-spacing: var(--heading-secondary-spacing);
	font-weight: normal;
}

a[href^="mailto:"] {
	color: var(--brand-red);
	background-color: var(--offwhite);
	font-size: var(--email-text-size);
	letter-spacing: var(--email-letter-spacing);
	text-decoration-line: underline;
	text-decoration-style: double;
	text-underline-offset: 0.05em;
}

/* OUTER FRAME */

.page-wrap {
	display: flex;
	align-items: stretch;
	min-height: 100vh;
}

.page-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.edge-stripe {
	flex: 0 0 var(--edge-w);
}

.header-stripe,
.edge-stripe {
	background-image: url("stripes.svg");
	background-position: center;
	background-size: auto;
	background-repeat: repeat;
}

/* HEADER */

.site-header {
	position: relative;
	display: flex;
	flex: 0 0 var(--header-h);
	min-width: 0;
}

.header-stripe > a[href^="mailto:"] {
	position: absolute;
	z-index: 2;
	right: 0;
	bottom: -0.15em;
	color: var(--brand-red);
	background-color: var(--offwhite);
	font-size: var(--email-text-size);
	letter-spacing: var(--email-letter-spacing);
	line-height: 1;
	text-decoration: none;
}

.header-stripe {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.brand {
	flex: 0 0 var(--brand-w);
	width: var(--brand-w);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	overflow: hidden;
}

.logo-wrap {
	width: 100%;
	padding-inline: var(--brand-logo-padding);
}

.brand .logo-wrap a {
	display: block;
}

.brand .logo-wrap img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

/* BODY */

.gearrepair .content-model {
	padding: 0;
}

.reupholstery .content-model {
	padding: 0;
}

.body-row {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
}

.content-area {
	flex: 1 1 auto;
	display: flex;
	min-width: 0;
}

.content-col {
	flex: 1 1 0;
	min-width: 0;
	padding: clamp(1.5rem, 3vw, 3rem)
			 clamp(1rem, 2.5vw, 2.5rem);
}

.content-model {
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.content-model img {
	display: block;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	object-fit: cover;
	object-position: cover;
}

.content-info {
	border-left: 1px dashed var(--ink);
}

/* DESIGNS */

model-viewer {
	display: block;
	width: 100%;
	height: clamp(800px, 45vw, 31.25rem);
	background-color: var(--offwhite);
}

.hotspot {
	display: block;
	width: 10px;
	height: 10px;
	border-radius: 5px;
	border: none;
	background-color: var(--brand-red);
	box-sizing: border-box;
	pointer-events: none;
}

.hotspot[slot="hotspot-shelf"] {
	--min-hotspot-opacity: 0;
}

.hotspot[slot="hotspot-desk"] {
	--min-hotspot-opacity: 0;
}

.annotation {
	position: absolute;
	transform: translate(10px, 10px);
}

/* This keeps child nodes hidden while the element loads */
:not(:defined)>* {
	display: none;
}

.design-links {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: clamp(0.75rem, 2vw, 3rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.design-links a {
	color: var(--ink);
	text-decoration: none;
	font-size: var(--footer-text-size);
}

.design-links a:hover {
	text-decoration: underline;
}

.licence-content {
	min-width: 0;
	overflow-wrap: anywhere;
}

.licence-content h1,
.licence-content p {
	max-width: 75ch;
}

/* SIDE MENU */

.side-menu {
	flex: 0 0 var(--brand-w);
	width: var(--brand-w);
	padding-top: var(--menu-top-padding);
}

.side-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: center;
}

.side-menu li {
	margin-bottom: var(--menu-item-spacing);
}

.side-menu a {
	color: var(--brand-red);
	text-decoration: overline;
	text-decoration-style: dashed;
	font-size: var(--menu-text-size);
	letter-spacing: var(--menu-letter-spacing);
}

/* FOOTER */

.site-footer {
	display: flex;
	align-items: center;
	border-top: 1px solid var(--ink);
	padding: 0.9em 1rem;
}

.footer-links {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: clamp(0.75rem, 2vw, 3rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-links a {
	color: var(--ink);
	text-decoration: none;
	font-size: var(--footer-text-size);
}

.footer-links a:hover {
	text-decoration: underline;
}

.footer-copy {
	flex: 0 0 clamp(2.5rem, var(--brand-w), 8rem);
	text-align: center;
	font-size: var(--footer-copy-size);
}

/* PORTRAIT MOBILE */

@media (max-width: 600px) and (orientation: portrait) {
	.content-area {
		flex-direction: column;
	}

	.content-info {
		order: 1;
		border-left: 0;
		border-bottom: 1px dashed var(--ink);
	}

	.content-model {
		order: 2;
		min-height: clamp(16rem, 75vw, 24rem);
	}

	.content-model > img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}

	.side-menu {
		flex: 0 0 var(--brand-w);
		width: var(--brand-w);
	}

	.site-header > a[href^="mailto:"] {
		right: 1rem;
		max-width: calc(100% - 2rem);
		overflow-wrap: anywhere;
	}

	model-viewer {
		height: clamp(16rem, 75vw, 24rem);
	}
}
