@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700&family=Open+Sans:wght@500;600&display=swap');

:root {
	--nav-height: calc(1rem + 64px);

	--primary-colour-lighter: rgb(43, 194, 218);
	--primary-colour: rgb(35, 157, 175);
	--primary-colour-darker: rgb(50, 130, 145);
	--grey: rgb(230, 230, 230);
	--grey2: rgb(100, 100, 100);
	--nav-colour: rgb(42, 42, 44);
	--link-colour: rgb(14, 117, 221);

	font-family: Arial, Helvetica, sans-serif;
	scroll-behavior: smooth;
	overflow: scroll;
}

body,
main {
	min-height: 100vh;
}

body {
	height: 100%;
	overflow: hidden;
}

body > nav {
	position: fixed;
	top: 0vw;
	width: 100vw;
	height: var(--nav-height);
	display: flex;
	align-items: center;
	font-size: 1.2em;
	z-index: 1;
	transition: background-color 250ms ease-out;
	animation: none;
}

body > nav.transparent {
	background: none;
}

body > nav.coloured {
	background: var(--nav-colour);
}

@media not (prefers-reduced-motion) {
	body > nav.coloured {
		transition: none;
		animation: 280ms ease-in-out 0s alternate slide-down;
	}

	@keyframes slide-down {
		from {
		  transform: translateY(calc(var(--nav-height) * -1));
		}
		to {
		  transform: translateY(0);
		}
	}
}

/* Not applied to the image itself as that causes the anchor to misalign itself. */
body > nav > :first-child {
	margin-left: 12px;
}

img.logo {
	width: calc(1rem + 786px / 10);
	height: auto;
	vertical-align: middle;
	border-radius: 0;
}

.nav-menu {
	display: none;
	position: fixed;
	top: var(--nav-height);
	margin: 0;
	padding: 0;
	width: 100vw;
	flex-direction: column;
	justify-content: space-evenly;
	height: 40%;
	background: var(--nav-colour);
	list-style: none;
	text-align: center;
}

@media (orientation: landscape) and (max-height: 480px) and (max-width: 1024px) {
	.nav-menu {
		height: calc(100vh - var(--nav-height));
	}
}

.nav-menu > a {
	display: block;
}

.nav-menu > a:any-link {
	color: white;
}

.nav-menu > a:hover {
	color: rgb(170, 170, 170);
}

.nav-menu > a > li {
	display: inline-block;
	text-decoration: none;
	text-decoration: none;
	font-family: "Nunito", sans-serif;
	font-size: .82em;
	letter-spacing: .5px;
}

#nav-menu-toggle {
	display: none;
}

label[for="nav-menu-toggle"] {
	font-size: 2em;
	color: white;
	cursor: pointer;
	user-select: none;
	transition: all 0.15s ease-in-out;
	line-height: 0.9;
}

#nav-menu-toggle:checked ~ .nav-menu {
	display: flex;
}

.nav-toggle-container {
	margin-left: auto;
	margin-right: 20px;
	width: 2em;
	height: 2em;
	display: flex;
	align-content: center;
	justify-content: center;
}

@media (min-width: 1024px) {
	img.logo {
		width: calc(1rem + 786px / 8);
	}

	label[for="nav-menu-toggle"] {
		display: none;
	}

	.nav-menu,
	#nav-menu-toggle:checked ~ .nav-menu {
		display: block;
		position: static;
		margin-right: 10px;
		background: none;
		text-align: end;
		border: none;
	}

	.nav-menu > a {
		display: inline-block;
		padding-left: 11px;
		padding-right: 11px;
	}
}

body > header {
	scroll-margin-top: var(--nav-height);
	box-sizing: border-box;
	background: center / cover no-repeat rgb(0, 0, 0, 0.75);
	background-blend-mode: darken;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.video-container,
body > header {
	width: 100vw;
  	height: 85vh;
	min-height: 410px;
}

.video-container {
	position: absolute;
	top: 0;
	left: 0;
	z-index: -5;
}

.video-container video {
  	object-fit: cover;
	width: 100%;
	height: 100%;
}

header > .content-container {
	padding-top: calc(22vh);
	max-height: 100%;
}

h1 {
	margin: 0 auto;
	font-size: 3em;
	max-width: 30ch;
}

h1.extra-large {
	font-size: 8em;
}

body > header h1 {
	color: white;
}

h2 {
	font-size: 2.25em;
	color: black;
}

h3 {
	margin-bottom: 10px;
	font-size: 1.7em;
	color: black;
}

h2::first-letter,
h3::first-letter {
	border-bottom: 4px solid var(--primary-colour);
}

.contact-method h3::first-letter {
	border-bottom: none;
}

article h1 {
	color: var(--primary-colour);
	max-width: 80%;
	margin: 0;
	padding: 24px 0 0 0;
}

h1,
.subtitle {
	padding: 0 12px;
}

.subtitle {
	color: white;
	font-weight: 600;
	font-size: 1.35em;
	margin: 1rem auto;
	width: fit-content;
	max-width: 48ch;
	letter-spacing: 0.01em;
}

article .subtitle {
	color: var(--primary-colour);
	font-weight: 600;
	font-size: 1.6em;
	margin: 0;
	font-family: Arial, Helvetica, sans-serif;
	padding: 0;
}


@media (min-width: 1024px) {
	article .subtitle {
		font-size: 1.9em;
	}
}

body > nav + main {
	margin-top: var(--nav-height);
}

main {
	margin: 0 auto;
	padding: 0 5vw;
	max-width: 1920px;
}

section {
	scroll-margin-top: calc(var(--nav-height) + 15px);
	margin: 48px 0;
}

p,
a,
li,
figcaption,
address,
label {
	font-family: 'Open Sans', sans-serif;
	line-height: 1.5em;
	font-size: 1.1em;
}

main > p,
section > p {
	max-width: 1180px;
}

a,
a:visited {
	color: var(--link-colour);
}

address > a,
address > a:visited {
	color: black;
	text-decoration: rgb(0, 0, 0, 0.6) underline;
}

img {
	max-width: 100%;
	max-height: calc(100vh - var(--nav-height) - 20px);
}

img,
.service {
	border-radius: 14px;
}

.project-article > header img {
	display: block;
	margin: 15px -3.5vw 0 -3.5vw;
	max-width: 97vw;
}

/* 
	Largest common mobile screen size 3120 x 1440
	At most image will be scaled to 74%.
	Highest size needed is 1440w for portrait and 2309w for landscape.
*/

.project-article picture,
.project-article img {
	display: block;
	width: fit-content;
	height: auto;
}

.project-article > picture,
.project-article > img {
	margin: 24px auto;
}

.project-images-3x3,
.project-images-2x2 {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	margin: 24px 0;
}

.project-images-2x2 + :not(.project-images-2x2, .project-images-3x3),
.project-images-3x3 + :not(.project-images-2x2, .project-images-3x3) {
	margin-top: 48px;
}

.project-article > header + :not(h1, h2, h3) {
	margin-top: 55px;
}

@media (min-width: 1024px),
(orientation: landscape) {
	.project-article {
		margin: 0 8%;
	}

	.project-article > header img {
		margin-left: auto;
		margin-right: auto;
		max-width: 100%;
	}

	.project-article > img,
	.project-article > picture,
	.project-images-3x3 > img,
	.project-images-2x2 > img {
		margin-left: auto;
		margin-right: auto;
	}

	.project-images-3x3,
	.project-images-2x2 {
		display: grid;
	}

	.project-images-3x3 {
		grid-template-columns: 1fr 1fr 1fr;
	}

	.project-images-2x2 {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1280px) {
	.project-article {
		margin: 0 16.5%;
	}
}

.project-article > footer {
	margin-top: 35px;
}

.seperator {
	margin: 60px 0;
}

header + .seperator,
h1 + .seperator,
h2 + .seperator {
	margin-top: 0;
}

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

ul {
	padding-left: 15px;
}

li::marker {
	color: var(--primary-colour);
}

a.button,
input[type="submit"] {
	display: block;
	box-sizing: content-box;
	width: fit-content;
	height: fit-content;
	min-height: 24px;
	color: white;
	background: var(--primary-colour-lighter);
	text-shadow: 0px 1px 2px black;
	padding: 12px 45px;
	text-decoration: none;
	font-size: 1.25rem;
	cursor: pointer;
	transition: all 130ms ease-in-out;
}

a.button {
	margin: 0 auto;
}

a.button:visited {
	color: white;
}

a.button:hover,
input[type="submit"]:hover {
	background: var(--grey2);
	padding-left: 35px;
	padding-right: 35px;
}

#get-estimate {
	color: white;
	font-size: 1em;
	text-transform: uppercase;
	background: white;
	color: black;
	text-shadow: none;
	margin-top: 10%;
}

#get-estimate:hover {
	background-color: rgb(255, 255, 255, 0.25);
	color: white;
	padding-left: 30px;
	padding-right: 30px;
}

/* No (orientation: landscape) because these shouldn't apply to tablets. */
@media (max-height: 640px) {
	#get-estimate {
		margin-top: 48px;
	}
}

@media (max-height: 480px) {
	body > header,
	.video-container {
		height: 100vh;
	}

	body > header {
		justify-content: center;
	}

	header > .content-container {
		padding-top: calc(var(--nav-height) / 2);
	}
}

input[type="submit"] {
	margin: 20px auto;
}

a.button,
input {
	border-radius: 32px;
}

textarea {
	border-radius: 20px;
}

input, 
textarea {
	box-sizing: border-box;
	padding: 8px 16px;
}

input:focus, 
textarea:focus {
    outline: 2px solid var(--primary-colour);
}

.footnote {
	font-size: 1em;
	max-width: 45ch;
	line-height: 1;
	margin-left: 16px;
}

.project,
.project:visited {
	color: black;
	text-decoration: none;
}

.project:hover {
	color: rgb(28, 122, 136);
}

.project > figure {
	margin: 30px auto;
}

.project > figure > img {
	display: block;
	margin: 0 auto;
}

.project:hover > figure > img {
	filter: brightness(.7);
	transition: all .1s ease;
}

figcaption {
	font-weight: 600;
	font-size: 1.2em;
	margin: 8px 0;
}

@media (min-width: 1024px),
(orientation: landscape) {
	.portfolio {
		display: grid;
		grid-template-columns: 1fr 1fr 1fr;
		max-width: 1280px;
		column-gap: 25px;
		margin: 0 auto;
	}
}

li {
	line-height: 165%;
}

.page-not-found {
	text-align: center;
}

.page-not-found #get-estimate {
	background: black;
	color: white;
}

.page-not-found > main {
	padding-top: 128px;
}

@media (orientation: landscape) and (max-height: 480px) and (max-width: 1024px) {
	.page-not-found > main {
		padding-top: 16px;
	}
}

.page-not-found .subtitle {
	color: black;
}

.page-not-found .button {
	margin-top: 48px;
}

address {
	font-style: normal;
	color: black;
}

address + p.hours {
	margin: 0px;
	color: black;
}

form {
	display: block;
	margin: 24px auto;
}

label {
	display: block;
	font-family: "Open Sans", sans-serif;
}

input,
textarea,
select,
option {
	display: block;
	margin: 8px 0;
	/* Prevents the input box from overflowing out the form. */
	box-sizing: border-box;
	width: 100%;
	height: 2.2rem;
	background: lightgrey;
	border: none;
	font-family: "Open Sans", sans-serif;
	font-size: 1rem;
	color: black;
}

input[type="hidden"][name="_gotcha"] {
	display: none;
}

option[value=""],
select:invalid {
	color: rgb(70, 70, 70);
}

select:invalid {
	font-size: 0.84em;
}

@media (min-width: 384px) {
	select:invalid {
		font-size: 0.9em;
	}
}

textarea {
	resize: vertical;
	min-height: 12em;
}

@media (min-width: 1024px) {
	select:invalid {
		font-size: 0.96em;
	}

	#contact > .content-container {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 50px;
	}

	form {
		margin: 0 auto;
	}
}

.services-container {
	display: flex;
	width: fit-content;
	flex-direction: column;
	margin: 32px auto;
}

.services-container,
.services-panel {
	max-width: 720px;
}

.services-panel {
	margin: 64px auto;
}

.services-container img {
	width: 100%;
	height: fit-content;
}

.service {
	background: var(--grey);
	width: 100%;
	box-sizing: border-box;
	padding: 8px 20px;
	margin: 32px 0;
}

.service p {
	font-size: 1.05em;
	margin: 1em 0;
}

.service > p:first-child {
	font-size: 1.65em;
	font-weight: bolder;
	margin: 8px 0;
	text-transform: uppercase;
	text-align: center;	
	line-height: 1.2em;
}

@media (min-width: 1280px) and (min-height: 720px) {
	.services-container {
		flex-direction: row;
	}

	.services-container,
	.services-panel {
		max-width: 90%;
		margin: 80px auto;
	}

	.services-container img {
		width: 100%;
		margin: auto 0 auto 24px;
	}

	.services-container:nth-child(odd) {
		flex-direction: row-reverse;
	}

	.services-container:nth-child(odd) img {
		margin: auto 24px auto 0;
	}

	.service {
		margin: 0;
		max-width: 400px;
	}
	
	.services-2x2 {
		display: grid;
		width: 100%;
		gap: 24px;
		grid: auto-flow / 1fr 1fr;
	}

	.services-panel {
		display: flex;
		width: 100%;
		margin: 0 auto;
		gap: 24px;
		justify-content: center;
	}
}

.estimate-link {
	margin-top: 4%;
	margin-bottom: 4.5%;
}

.emph {
	max-width: 100%;
	margin: 30px 0;
	font-size: 1.3em;
	font-weight: 600;
	text-align: center;
}

.social-logo {
	width: calc(1rem + 16px);
	vertical-align: middle;
	margin: 4px 7px 4px 0;
	border-radius: 0;
}

.social-link {	
	display: inline;
	vertical-align: middle;
}

body > footer .logo-container {
	text-align: center;
	justify-content: space-between;
	display: flex;
	flex-direction: column;
}

body > footer .logo {
	width: calc(1rem + 570px / 6);
	margin-top: 4px;
}

footer .slogan {
	margin: 0;
}

.socials-container > a {
	display: block;
}

body > footer p:first-child:not(.copyright-notice) {
	font-size: 1.05em;
	margin-bottom: 4px;
	color: var(--grey2)
}

.address-container > div {
	margin-bottom: 8px;
}

body > footer address,
body > footer a:any-link,
body > footer p {
	color: inherit;
	font-size: inherit;
	margin: 0;
}

body > footer {
	margin-top: 35px;
	width: 100vw;
	padding: 20px 48px 4px 48px;
	box-sizing: border-box;
	background: var(--nav-colour);
	color: rgb(120, 120, 120);
	font-size: 1rem;
}

footer .copyright-notice {
	font-size: 0.9rem;
	margin: auto 0 0 0;
	color: var(--grey2);
}

.hidden {
	display: none;
}

.link-container * {
	text-align: center;
}

.link-container > div {
	margin: 16px 0;
}

@media (min-width: 800px) {
	body > footer {
		display: flex;
		justify-content: space-between;
	}

	.link-container {
		display: flex;
		gap: 64px;
	}

	.link-container * {
		text-align: start;
	}
}