/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* start of styling */
/* = = = = GENERAL = = = =  */
body {
    box-sizing: border-box;
	background-color: #fff;
	color: #000;
    font-family: 'Palanquin', 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 1.3em;
    line-height: 1.3;
}
/* setting width and max-width for containers, various elements */
header, main, h2, main p, main ul, main ol, figure img, iframe, figcaption, footer div  {
	width: 80%;
	max-width: 1000px;
}

/* TYPOGRAPHY */
h1, h2 {
	font-family: 'Hammersmith One', 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
	font-weight: 600;
	color: #159096;
}

h1 {
	font-size: clamp(2.5em, 8vw, 4em);
}

h2 {
	font-size: clamp(1.5em, 6vw, 2.5em);
}

/* GENERAL LINKS */
/* styling the <a> and adding a transition speed */
a:link, a:visited {
	color: #f17a2a;
	-webkit-transition: all .3s ease-in-out;
	-moz-transition: all .3s ease-in-out;
	-o-transition: all .3s ease-in-out;
	transition: all .3s ease-in-out;
}
	
a:hover {
	color: #159096;
}
	
a:active, a:focus {
	color: #f19e2a;
}

/* = = = = HEADER = = = =  */
header {
	margin: 0 auto;
}

/* clickable header image/home link */
header > a {
	display: block;
	margin: 1em auto 0;
	width: 80%;
	max-width: 450px;
	content:url(images/full-logo.svg);
}

/* HEADER NAV */
/* Adapted from Luke Embrey’s article on hamburger menus: https://alvarotrigo.com/blog/hamburger-menu-css/
Example CodePen: https://codepen.io/alvarotrigo/pen/yLzaPVJ */

/* hiding the home link logo on narrow view */
nav[aria-label="Primary"] > a {
	display: none;
}

/* hide the checkbox */
nav[aria-label="Primary"] input {
	opacity: 0;
}

/* creating the hamburger */
nav[aria-label="Primary"] input:checked + label > span {
	transform: rotate(45deg);
}

nav[aria-label="Primary"] input:checked + label > span::before {
	top: 0;
	transform: rotate(0deg);
}

nav[aria-label="Primary"] input:checked + label > span::after {
	top: 0;
	transform: rotate(90deg);
}

/* positioning the ul when checkbox is checked */
nav[aria-label="Primary"] input:checked ~ ul {
	left: 0;
}

/* positioning and styling the hamburger/'X' */
nav[aria-label="Primary"] label {
	position: fixed;
	top: 40px;
	left: 20px;
	width: 26px;
	height: 26px;
	cursor: pointer;
	z-index: 2;
}

nav[aria-label="Primary"] label > span,
nav[aria-label="Primary"] label > span::before,
nav[aria-label="Primary"] label > span::after {
	display: block;
	position: absolute;
	width: 100%;
	height: 4px;
	background-color: #f17a2a;
	transition-duration: .3s;
}


nav[aria-label="Primary"] label > span::before {
	content: '';
	top: -8px;
}

nav[aria-label="Primary"] label > span::after {
	content: '';
	top: 8px;
}

/* the nav ul & the 'box' around the nav ul */
nav[aria-label="Primary"] ul {
	display: block;
	position: fixed;
	top: 0;
	left: -100%;
	width: 40%;
	height: 30%;
	margin: 0;
	padding: 80px 0;
	list-style: none;
	background-color: #fff;
	box-shadow: 2px 2px 6px rgba(0, 0, 0, .4);
	transition-duration: .3s;
	z-index: 1;
}

/* the nav links */
nav[aria-label="Primary"] ul li a:link, nav[aria-label="Primary"] ul li a:visited {
	display: block;
	font-size: 1.2em;
	padding: 12px 24px;
	font-weight: 600;
	text-decoration: none;
	transition-duration: .3s;
}

nav[aria-label="Primary"] ul li a:hover {
	text-decoration: underline;
}
 
/* = = = = MAIN = = = =  */
main {
	margin: 0 auto;
}

h1 {
	text-align: center;
	margin: 0.5em auto 0; 
}

h2 {
	margin: 1.6em auto 0;
}

main p {
	margin: 1em auto 0;
}

/* main imgs and YT embed alignment */
figure img, iframe {
	display: block;
	height: auto;
}

figure {
	margin: 1em auto 0;
}

figure img {
	margin: 0 auto;
}

figcaption {
	margin: 0.5em auto;
}

/* YT embed */
iframe {
	aspect-ratio: 16 / 9;
	margin: 1.6em auto 0;
}

/* masking the main tutorial image */
figure img {
	-webkit-mask-image: url(images/mask.svg);
	-moz-mask-image: url(images/mask.svg);
	mask-image: url(images/mask.svg);
	-webkit-mask-size: cover;
	-moz-mask-size: cover;
	mask-size: cover;
	-webkit-mask-repeat: no-repeat;
	-moz-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-moz-mask-position: center;
	mask-position: center;
}

/* materials list */
main ul {
	width: 65%;
	margin: 1em auto 0;
	padding: 0.8em;
	border: 2px solid #159096;
	border-radius: 10px;
	box-shadow: 0.1em 0.1em 0.2em #2db3c1;
}

/* help with colouring list counters by LockedDown SEO article - https://www.lockedownseo.com/ordered-list-ol-different-color-for-numbers/ */
main ul:first-of-type li {
	list-style: none; 
	position: relative;
	margin-top: 1em;
}

main ul li::before {
  color: #159096; 
  content: "\2022";
  left: -32px;
  position: absolute;
  text-align: right;
  width: 26px;
}

/* steps */
ol {
	margin: 1em auto 0;
}

ol li {
	counter-increment: list;
	list-style-type: none;
	position: relative; 
	margin-top: 1em;
}

ol li:before {
	color: #159096;
	content: counter(list) ".";
	left: -32px;
	position: absolute;
	text-align: right;
	width: 26px;
  }

/* getting rid of the extra top margin on first list items */
main ul li:first-of-type, ol li:first-of-type  {
	margin-top: 0;
}

/* = = = = FOOTER = = = =  */
footer {
	border-top: 2px solid #f17a2a;
	margin-top: 1.6em;
}

footer div {
	margin: 1em auto;
}

footer ul, form, footer p, div > a {
	text-align: center;
}

footer ul, footer form {
	margin-top: 1em;
}

/* social media icons */
footer ul:first-of-type li {
	display: inline-block;
}

footer ul:first-of-type li a img {
	width: 60%;
}

/* search form */
form input:first-of-type {
	border-color: #f17a2a;
	border-radius: 10px;
	font-size: 0.7em;
	height: 4vh;
	padding: 0.2em;
}

/* search button */
form input:nth-of-type(2) {
	color: #fff;
	background-color: #f17a2a;
	border-radius: 10px;
	font-size: 1em;
	padding: 0.2em;
	-webkit-transition: all .3s ease-in-out;
	-moz-transition: all .3s ease-in-out;
	-o-transition: all .3s ease-in-out;
	transition: all .3s ease-in-out;
}

/* button hover */
form input:nth-of-type(2):hover {
	color: #f17a2a;
	background-color: #fff;
	box-shadow: 2px 2px 2px 2px #159096;
}

/* sitemap and accessibility statement */
footer ul:nth-of-type(2) li:link, footer ul:nth-of-type(2) li:visited  {
	font-size: 0.8em;
}

footer ul:nth-of-type(2) li:nth-of-type(2) {
	margin-top: 0.5em;
}

/* back to top link */
footer div > a:link, footer div > a:visited {
	display: block;
	margin: 1.5em 0;
} 

/* copyright */
footer p {
	font-size: 0.8em;
	color: #fff;
	background-color: #159096;
	padding: 0.5em;
}

/* = = = = MEDIA QUERIES = = = =  */
@media (min-width: 800px) {
	/* PRIMARY NAV */
	/* hide the hamburger menu */
	nav[aria-label="Primary"] label {
		display: none;
	}

	/* awesome flex nav tutorial from Freshman Tech https://freshman.tech/flexbox-navbar/ */
	nav[aria-label="Primary"] {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 1em;
	}

	/* if the hamburger has been clicked, the nav items appear in wide view */
    nav[aria-label="Primary"] input:checked ~ ul {
		position: relative;
		display: flex;
		justify-content: flex-end;
		width: 100%;
        align-items: center;
		box-shadow: none;
		padding: 0;
    }

	/* logo home nav link */
	nav[aria-label="Primary"] > a {
		display: block;
		content: url(images/logo-icon.svg);
		width: 15%;
	}
	
	/* KEEP SAFE IF FLEX EXPERIMENTS FAIL, MOVE HOME LINK BACK INTO NAV LINKS */
	/* if the hamburger has been clicked, the nav items appear in wide view */
    /* nav[aria-label="Primary"] input:checked ~ ul {
		position: relative;
		width: 100%;
        display: flex;
		justify-content: flex-end;
        align-items: center;
		box-shadow: none;
		padding: 0;
    } */

	/* the following is not working: if the hamburger has not been clicked, the nav items appear in wide view */
	/* nav[aria-label="Primary"] input:empty ~ ul {
		position: relative;
		width: 100%;
        display: flex;
		justify-content: flex-end;
        align-items: center;
		box-shadow: none;
		padding: 0;
    } */

	/* making the first nav item an image link */
	/* nav[aria-label="Primary"] ul li:first-of-type a {
		position: absolute;
		top: -25px;
		left: 5px;
		content: url(images/logo-icon.svg);
		width: 10%;
	} */

	/* MAIN FIGURE IMAGE AND CAPTION REPOSITIONING */
	main figure {
		display: flex;
		align-items: center;
		gap: 1.5em;
		width: 80%;
		margin: 0 auto;
	}

	/* FOOTER */
	/* making the elements in the footer div container flex elements - row */
	footer div {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
}

@media (min-width: 960px) {
	/* BACKGROUND RESIN BLOBS (top & bottom of page */
	/* Lovely resin blob Illustrator tutorial by hikeart - https://www.youtube.com/watch?v=IO-NgO2Ov20 */
	body {
		background-image: url(images/blobs.svg), url(images/blobs-bottom.svg);
  		background-position: 95% 5%, 2% 90%;
  		background-repeat: no-repeat, no-repeat;
		background-size: 200px, 130px;
	}

	/* hide the nav bg colour so it doesn't interfere with bg resin blobs image */
	nav[aria-label="Primary"] ul {
		background-color: transparent;
	}
}
