/*-----------------------------------------------------
CSS RESET
  Josh's Custom CSS Reset: https://www.joshwcomeau.com/css/custom-css-reset/ 
  Thanks Josh :)
-----------------------------------------------------*/
*, *::before, *::after{
  box-sizing: border-box;
}
*{
  margin: 0;
}
@media (prefers-reduced-motion: no-preference){
  html{
    interpolate-size: allow-keywords;
  }
}
body{
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg{
  display: block;
}
input, button, textarea, select{
  font: inherit;
}
p, h1, h2, h3, h4, h5, h6{
  overflow-wrap: break-word;
}
p{
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6{
  text-wrap: balance;
}
#root, #__next{
  isolation: isolate;
}
/*-----------------------------------------------------
END OF CSS RESET 
-----------------------------------------------------*/

/*-----------------------------------------------------
MY STYLING RULES 
-----------------------------------------------------*/
html{

  background-color: #fcfcf1;
}
body, label, ul li{
  font-family: 'Ysabeau Office', Arial, Helvetica, Verdana, sans-serif;
  font-size: 1.125rem;
  font-size: clamp(1.125rem, 1.075rem + 0.25vw, 1.375rem);
}

/*========== HEADER STYLES ==========*/
header{
  padding: 1em 0 0.4em;
  /* overflow-x: hidden;
  background-image: url(visuals/illustrations/dotted-stich.svg);
  background-position: bottom;
  background-size: 300px, 120%, contain;
	background-repeat: repeat-x, repeat, repeat; */
}
header p{
  text-align: center;
}
header ul, header li{
  display: block;
}

/*========== MAIN STYLES ==========*/
main{
  width: 95vw;
  margin: 0 auto;
}
header p, h1, h2, h3, h4, h5, h6{
  font-family: 'Pangolin', Arial, Helvetica, Verdana, sans-serif;
}
h1{
  font-size: 1.875rem;
  font-size: clamp(1.875rem, 1.7rem + 0.8750000000000001vw, 2.75rem);
  padding: 1em 0 0.3em;
}
h2, .toggle{
  font-size: 1.5rem;
  font-size: clamp(1.5rem, 1.425rem + 0.375vw, 1.875rem);
}
h2{
  padding: 0.7em 0 0.3em;
}
h3{
  padding: 0.4em 0 0;
}
h3, nav ul li, .subtoggle{
  font-size: 1.375rem;
  font-size: clamp(1.375rem, 1.3rem + 0.375vw, 1.75rem);
}
h3 a:link, h3 a:visited{
  color:#000000;
  font-weight: 600;
  text-decoration: underline 2px solid;
  text-underline-offset: 3px;
}
h3 a:hover, h3 li a:active, h3 li a:focus{
  text-underline-offset: 7px;
}
h4{
  font-size: 1.25rem;
  font-size: clamp(1.25rem, 1.2rem + 0.25vw, 1.5rem);
}
main{
  padding: 1.5em 0 4em 0;
}
p{
  padding: 0.2em 0 0.3em 0;
}
p a:link, p a:visited{
  color:#000000;
  font-weight: 600;
  text-decoration: none;
}
p a:hover, p li a:active, p li a:focus{
  text-decoration: underline 2px solid;
  text-underline-offset: 5px;
}
/*========== MENU STYLES ==========*/
header p a:link,header p a:visited{
	color: #000000;
	text-decoration: none;
  font-size: 2.5rem;
  font-size: clamp(2.5rem, 2.2rem + 1.5vw, 4rem);
}
nav{
  background-color: rgb(1, 94, 1);
  padding: 0 0 0.5em;
}
nav li a:link, nav li a:visited, nav li a:focus {
	display: block;
	padding-left: 6vw;	
	/* link text */
	color: #fff;
	text-decoration: none;
	font-weight: 550;
	text-align: left;
	/* background colour */
	background-color: transparent;
	-webkit-transition: background-color .2s ease-in-out;  
	-moz-transition: background-color .2s ease-in-out;  
	-o-transition: background-color .2s ease-in-out;  
	transition: background-color .2s ease-in-out;
}
nav li a:hover, nav li a:active{
	color: rgb(1, 94, 1);
  background-color: #fff;
}
/* menu toggle */
#menu-toggle {
	display: none;
}
.toggle {
	display: inline-block;
	width: auto;
	margin: 0;
	position: relative;
	padding-top: 10px;
}
nav .toggle:hover, nav .toggle:active, nav .toggle:focus {
	cursor: pointer;
}
/* show/hide menu */
#menu-toggle + .toggle + ul {
	display: none;
}
#menu-toggle:checked + .toggle + ul {
	display: block;
}
/* 3 lined toggle vis  */
.toggle strong {
	position: absolute;
	display: block;
	width: 80vw;
	top: 4px;
	left: calc(2vw + 42px);
	color: #fff;
}
.toggle:hover strong {
	color:rgb(240, 249, 216);
}
.toggle [class*='line-'] {
	background: #fff;
	display: block;
	border-radius: 3px;
	height: 3px;
	width: 26px;
	margin: 0 0 6px 2vw;
	-webkit-transform: rotate(0deg);
	-moz-transform: rotate(0deg);
	-o-transform: rotate(0deg);
	transform: rotate(0deg);
	-webkit-transition: .2s ease all;
	-moz-transition: .2s ease all;
	-o-transition: .2s ease all;
	transition: .2s ease all;
}
.toggle:hover [class*='line-'] {
	background: rgb(240, 249, 216);
}
/* change the 3 lines to the 'x' */
#menu-toggle:checked + .toggle .line-top {
	-webkit-transform: rotate(45deg);
	-moz-transform: rotate(45deg);
	-o-transform: rotate(45deg);
	transform: rotate(45deg);
	-webkit-transform-origin: 0 0;
	-moz-transform-origin: 0 0;
	-o-transform-origin: 0 0;
	transform-origin: 0 0;
}
#menu-toggle:checked + .toggle .line-mid {
	opacity: 0;
}
#menu-toggle:checked + .toggle .line-bot {
	-webkit-transform: rotate(-45deg);
	-moz-transform: rotate(-45deg);
	-o-transform: rotate(-45deg);
	transform: rotate(-45deg);
	-webkit-transform-origin: 0 90%;
	-moz-transform-origin: 0 90%;
	-o-transform-origin: 0 90%;
	transform-origin: 0 90%;
}
/*========== COLOURS PAGE STYLES ==========*/
details{
  padding: 5px 10px 10px;
  border-radius: 10px;
  margin: 0 0 1em;
}
#red{
  border: 3px solid rgb(215, 2, 2);
  border-radius: 10px;
  background-color: rgba(255, 175, 175, 0.518);
}
#green{
  border: 3px solid rgb(1, 94, 1);
  background-color: rgba(197, 251, 183, 0.518);
}
#blue{
  border: 3px solid rgb(2, 2, 130);
  background-color: rgba(175, 224, 255, 0.518);
}
#white{
  border: 3px solid rgb(214, 214, 214);
  background-color: rgba(240, 239, 239, 0.518);
}
#yellow{
  border: 3px solid rgb(234, 234, 0);
  background-color: rgba(255, 255, 175, 0.518);
}
#black-brown{
  border: 3px solid brown;
  background-color: rgba(233, 192, 152, 0.518);
}

/*========== TERMS STYLES ==========*/
.search-container{
  padding: 0 0 10px 0;
}
#searchbar{
  margin: 10px;
  padding: 10px;
  border: 3px solid #648901;
  border-radius: 5px;
  width: 80%;
  box-sizing: border-box;
}
#terms-list{
  list-style: none;
  padding: 0 0.5em;
  margin: 0;
}
summary{
  font-weight: 550;
}
summary:hover, summary:active, summary:focus {
	cursor: pointer;
	transition: 0.5s ease-in-out; /* makes for a smoother transition between colours */
}
summary::marker{
  content: '+ ';
  /* content: url(visuals/illustrations/plus.svg); */
}
details[open] summary::marker{
  content: '- ';
  /* content: url(visuals/illustrations/minus.svg); */
}
/*========== LINK STYLES ==========*/
li a:link, li a:visited{
  color:#000000;
  text-decoration: none;
}
li a:hover, li a:active, li a:focus{
  text-decoration: underline 2px #000;
  text-underline-offset: 4px;
}
/*========== IMAGES STYLES ==========*/
img{
  width: 400px;
  height: auto;

}
header p img{
  display: inline;
  max-width: 300px;
  height: auto;
}

/* Image flip style */
.card{
  width: 90vw;
  height: 800px;
  position: relative;
  margin: 0.5em 0 2em;
  transition: opacity 1s;
  border-image-slice: 18 18 18 18;
  border-image-width: 6px;
  border-image-outset: 6px;
  border-image-repeat: round round;
  border-image-source: url("visuals/illustrations/button-border.svg"); 
}
.image{
	border-radius: 10%;
	overflow: hidden;
	width: 300px;
	height: 350px;
	position: relative;
}
.image img{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: auto;
}
.card-face{
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  color: #333;
  background: #fadac092;
  background-size: 500% 500%;
  animation: Gradient 15s ease infinite;
  transition: transform 1s;
}
.front{
  transform: rotateY(0deg);
}
.back{
  transform: rotateY(180deg);
}
.card.is-flipped .front{
  transform: rotateY(-180deg);
}
.card.is-flipped .back{
  transform: rotateY(0deg);
  padding: 10px 5px 5px;
}
.card.is-flipped .back p:first-of-type{
  padding-top: 2.4em;
}
.card.is-flipped .back p{
  padding: 0 10px 0.5em;
}
.name{
  text-align: center;
  font-size: 2rem;
  font-size: clamp(2rem, 1.9rem + 0.5vw, 2.5rem);
}
.close-btn{
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.close-btn img{
  width: 30px; 
  height: auto
}
.more-info{
  padding: 10px 20px;
  background-color: #015e01;
  color: #fff;
  font-size: 1.4em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
  /* border-image-slice: 13 13 13 13;
  border-image-width: 4px;
  border-image-outset: 4px;
  border-image-repeat: repeat repeat;
  border-image-source: url("visuals/illustrations/button-border.svg");  */
}
.more-info:hover{
  font-weight: 650; 
  color: rgb(242, 248, 227);
}
/*========== FOOTER STYLES ==========*/
footer{
  width: 100vw;
  overflow-x: hidden;
  color: #fff;
  background-color: #015e01;
  /* background-image: url(visuals/illustrations/dotted-stich.svg);
  background-size: 300px, 120%;
	background-repeat: repeat-x, repeat; */
  padding: 1em;
}
footer p{
  text-align: center;
  padding: 0.5em 0;
}

footer p a:link, footer p a:visited{
  color:#fff;
  text-decoration: underline 2px #fff;
}
footer p a:hover, footer p a:active, footer p a:focus{
  text-underline-offset: 4px;
}
/*========== RESPONSIVE STYLES ==========*/
@media (min-width: 520px) {
  nav ul {
		width: 100%;
		max-width: 60em;
		margin: 0 auto;
		text-align: center;
	}
	nav ul li {
		display: inline;
	}
	nav ul li a:link {
		margin: 0;
    padding: 5px;
		display: inline-block;
		text-align: center;
		position: relative;
	}
	nav li a:hover, nav li a:focus {
		background-color: #fff;
	}
	nav li a:active, nav li a:focus {
		background-color: transparent;
	}
  /* show/hide menu */	
	#menu-toggle + .toggle + ul, #menu-toggle:checked + .toggle + ul {
		display: block;
	}	
	#menu-toggle + .toggle, #menu-toggle:checked + .toggle {
		display: none;
	}	
}
@media(min-width: 600px){
  .card{
    width: 80vw;
    height: 750px;
  }
  /* show/hide menu */	
	#menu-toggle + .toggle + ul  li, #menu-toggle:checked + .toggle + ul li {
		display: inline-block;
    padding: 0.5em;
    /*position center*/
	}	
}
@media(min-width: 800px){
  #history{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
    "p p p p img"
    "p p p p img"
    "p p p p img";
  }
  #history p{
    grid-area: p;
  }
  #history img{
    grid-area: img;
    padding: 0 0 0 1.5em;
  }
  #guide{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
    "p p img img img";
  }
  #history p, #guide p{
    grid-area: p;
  }
  #history img, #guide img{
    grid-area: img;
    padding: 0 0 0 1.5em;
  }
  .card{
    width: 70vw;
    height: 650px;
    border-image-width: 4px;
  }
  #terms-list{
    width: 80%;
  }
  #colours{
    width: 70%;
  }
}
@media(min-width: 1080px) {
  main{
    width: 90vw;
  }
  .card{
    width: 60vw;
    height: 580px;
  }
}
@media(min-width: 1300px) {
  main{
    width: 80vw;
  }
  .card{
    width: 65vw;
    height: 530px;
  }
}
@media(min-width: 1450px){
  main{
    width: 70vw;
  }
}
