/* setup color pallet */
:root{/* dark mode */
  --bg-main: #110905;
  --bg-sub1: #1e130d;
  --bg-sub2: #1a1512;
  --bg-nav: #272f27;
  --nav-button: #8ea68e;
  --nav-hover-focus: #272f27;
  --nav-hover-focus-b: #8ea68e;
  --nav-hover-t: #8ea68e;
  --nav-focus-t: #cfe5cf;
  --nav-text: #030403;
  --text-heading: #cfe5cf;
  --text-body: #cfe5cf;
  --color-accent: #526a53;
}
.light-img{
	display: none;
  visibility: hidden;
}

@media(prefers-color-scheme: light){/* light mode */
  :root{/* dark mode */
    --bg-main: #e7c6b3;
    --bg-sub1: #dab5a0;
    --bg-sub2: #ccb9af;
    --bg-nav: #8ea68e;
    --nav-button: #272f27;
    --nav-hover-focus: #8ea68e;
    --nav-hover-focus-b: #272f27;
    --nav-hover-t: #272f27;
    --nav-focus-t: #030403;
    --nav-text: #cfe5cf;
    --text-heading: #030403;
    --text-body: #030403;
    --color-accent: #526a53;
	}
  .light-img{
    display: inline;
    visibility: visible;
	}
  .dark-img{
    display: none;
    visibility: hidden;
	}
}

body{/* globle stuff goes in the body */
	background-color: var(--bg-main);
  color: var(--text-body);
  font-family: "Merriweather", system-ui;
  font-weight: 400;
  font-style: normal;
}

/* nav menu */
#banner{
  background-color: var(--bg-nav);
  color: var(--text-heading);
  margin: 0;
  padding: 0.5em;
  
  &>#skip-button{
    position: fixed;
    top: 0;
    left: 0; 
    height: 0;
    overflow: clip;
    background-color: white;
    border-radius: 0px 0px 20px 0px;
    &:focus{
      height: auto;
      padding: 10px;
      margin: 0.2em;
    }
    &:link, &:visited{
    	color: black;
    } 
  }
	&>h1{/* page title */
    line-height: 0.8em;
  }
  &>nav>#inner-links{
    margin: 1em 0em 0em 0em;
    &>a, &>a:link, &>a:visited{
    	background-color: var(--nav-button);
      color: var(--nav-text);
      text-decoration: none;
      padding: 0.5em;
      &>img{
      	height: 0.6em;
        margin: 0 0.1em;
      }
    }
    &>.dorpdown{
      position: absolute;
    	height: 0;
      max-height: 66vh;
      overflow: clip;
      background-color: var(--nav-button);
      & li, & ol{
        list-style-position: inside;
      	margin: 0;
        padding: 0.2em;
        color: var(--nav-text);
        &>a:link, &>a:visited{
        	text-decoration: none;
          color: var(--nav-text);
        }
      }
      & li{
        &:hover, &:focus-within{
          background-color: var(--nav-hover-focus);
          color: var(--nav-hover-t);
          &>a:link, &>a:visited{
        		color: var(--nav-hover-t);
        	}
        }
        &:focus-within{
          color: var(--nav-focus-t);
        	&>a:link, &>a:visited{
        		color: var(--nav-focus-t);
            text-decoration: underline;
        	}
        }
      }
    }
    &:focus-within>.dorpdown{
    	height: auto;
      overflow: show;
    }
    &:focus-within>a>img{
    	transform: rotate(-90deg);
    }
  }
  
  
	&>nav>#outer-links{/* links menu */
  	display: flex;
    flex-flow: row wrap;
    justify-content: right;
    align-content: start;
		&>a{/* menu tab */
      padding: 0.5em;
      margin: 0.1em;
      background-color: var(--nav-button);
      border-radius: 10px;
      border: solid 4px var(--nav-button);
      &:hover, &:focus{
      	background-color: var(--nav-hover-focus);
        border-radius: 5px;
        &:link, &:visited{
        	color: var(--nav-hover-t);
        }
      }
      &:focus{
      	border: dashed	4px;
        &:link, &:visited{
        	color: var(--nav-focus-t);
        }
      }
      &:link, &:visited{
      	color: var(--nav-text);
        text-decoration: none;
      }
    }
  }
}

/* main body */
#content{
  &>*{  
    background-color: var(--bg-sub1);
    padding: 0.5em;
  }
}

#jump-to-top{
  position: sticky;
  width: 48px;
  height: 48px;
  bottom: 4em;
  left: calc((100% - 1em) - 48px);
  border-radius: 50%;
  background-color: transparent;
  &>img{
    height: 48px;
  }
}

/* catagory */
.catagory{
  max-width: 64em;
  margin: 1em auto;
  &>section{/* container for tiles */
  	display: flex;
    flex-flow: row wrap;
    justify-content: center;
  }
  
  &>#contact-form{
    & #contact-head{
      line-height: 2em;
      & #subject{
      	width: calc(100% - 7em);
      }
      & #email{
      	max-width: calc(100% - 6.3em);
      }
    }
    & #inquiry-body{
    	width: 100%;
    }
    &>button{
    	max-width: 8em;
    }
    & input, & textarea{
    	background-color: var(--bg-sub2);
      color: var(--text-color);
      border: solid 2px var(--color-accent);
    }
    & fieldset{
    	border: solid 2px var(--color-accent);
    }
  }
}

/* tile */
.tile{
  /* self */
  position: relative;
  max-height: 12em;
  max-width: 12em;
  aspect-ratio: 1 / 1;
  border: solid var(--color-accent) 2px;
  margin: 0.5em;
  background-color: var(--bg-sub2);
  
  /* children */
	display: grid;
  grid-template-areas: 	"heading 	heading heading"
    										". 				portal 	date"
    										"link 		link 		link";
  grid-template-columns: 2em 6fr 2em;
  grid-template-rows: 1fr 6fr 1fr;
  text-align: center;
  
  &>.tile-title{
  	grid-area: heading;
    width: 100%;
    background-color: var(--bg-nav);
    margin: 0 auto 0.3em auto;
    padding: 0.5em 0 0.2em 0;
  }
  &>.tile-foot{
  	grid-area: link;
    margin: 0.3em auto 0 auto;
    padding: 0.2em 0 0.5em 0;
    &:link, &:visited{
      color: var(--text-color);
    }
  }
  &>.thumbnail{
  	grid-area: portal;
    background-color: var(--bg-nav);
    border-radius: 5px;
    border: 0px;
    font-size: 0;
    cursor: pointer;
    &>img{
    	max-width: 100%;
    	max-height: 100%;
    	margin: 0 auto;
    }
  }
  &>.date{
  	grid-area: date;
    writing-mode: vertical-rl;
    margin: auto;
  }
  
  &:focus-within, &:hover{/*Animation to make big*/
  	transform: scale(1.1);
  }
}

/* Link frame */
#portal-frame{
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  visibility: hidden;
  display: none;
  background-color: var(--bg-nav);
  max-height: 95%;
  max-width: 95%;
  width: 100%;
  aspect-ratio: 3/4;
  margin: 2.5%;
  
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: 8fr 1fr; 
  grid-template-areas: 	"close 	frame"
    										"link			link";
}
#portal{
  grid-area: frame;
  width: 100%;
  height: 100%;
}
#exit{
  grid-area: close;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 0;
  padding: 0;
  background-color: var(--nav-button);
  border: solid var(--nav-button);
  display: none;
  visibility: hidden;
  &>img{
  	width: 34px;
  }
}
#portal-link{
	grid-area: link;
  text-align: center;
  padding: 1em;
  font-size: 1.5em;
  background-color: var(--nav-button);
  &:link, &:visited{
  	color: var(--nav-text);
  }
}

/* screen size M */
@media(min-width: 64em){
  #banner{
  	position: sticky;
    top: 0;
    left: 0;
    z-index: 1
  }
  #jump-to-top{
  	display: none;
    visibility: hidden;
  }
}
  
/* screen size XL*/
@media(min-width: 128em){
  #content{
  	columns: 2;
  }
}

/* fonts */
/* merryweather */
.merriweather-light {
  font-family: "Merriweather", system-ui;
  font-weight: 300;
  font-style: italic;
}

.merriweather-bold {
  font-family: "Merriweather", system-ui;
  font-weight: 700;
  font-style: italic;
}