/*CONSTANTS*/
:root{
	--top-padding: 20px;
	--header-height: 3.5rem;
	--footer-height: 3rem;
	--main-height: calc(100vh - var(--header-height) - var(--footer-height));
	--fake-black: #19100E;
	--red-ink: #822;
	font-family: "Domine";
}

/*MEDIA-QUERIES*/
@media only screen and (max-width: 360px) {
	:root{
		font-size: calc((100vw - 310px) / 25 + 14px)
	}
}

@media only screen and (min-width: 500px) {
	header h1{
		text-align: center;
	}
}

/*ANIMATIONS*/
@-moz-keyframes bugfix{from{padding-right:1px}to{padding-right:0}}

/*STYLING RULES*/

/*All*/
body{margin: 0;}

a{
	color: inherit;
	text-decoration: none;
}

::-moz-selection {background: #FFF4}
::selection {background: #FFF4}

svg{
	width: 100%;
	height: 100%;
}

/*Header*/
header{
	display: flex;
	position: fixed;
	top: 0;
	background-color: gray;
	width: 100%;
	height: var(--header-height);
	background-image: url(/img/paper.jpg);
	box-shadow: 0 2px 2px 2px rgba(0,0,0,0.5);
	z-index: 2;
}

header h1{
	margin: 0;
	font-size: 2.5em;
	font-family: "Fredericka the Great";
	flex: 1;
	white-space: nowrap;
}

/*Menu*/
nav{
	height: calc(100vh - var(--header-height) - var(--footer-height));
	box-sizing: border-box;
	overflow-x: scroll;
	position: absolute;
	padding: 1em calc(1em + 10px) 1em 1em;
	font-size: 1.5em;
	width: 12em;
	color: white;
	top: var(--header-height);
	z-index: 2;
	box-shadow: inset 0px 12px 2px -8px rgba(0,0,0,0.5), 6px 0px 2px -2px rgba(0,0,0,0.5);
	background-image: linear-gradient(270deg, black 0%,#FFF0 20%,#FFF2 80%, #FFF0 100%), url(/img/midRock.jpg);
	background-size: 10px 100%, auto;
	background-repeat: no-repeat, repeat;
	background-position: top right, top left;
	transform: translateX(calc(-100% - 4px));
	visibility: hidden;
	transition: transform 0.5s ease-out,
				visibility 0s linear 0.5s;
	overflow: hidden;
}

nav.opened{
	visibility: visible;
	transform: translateX(0);
	transition: transform 0.5s ease-out,
				visibility 0s linear;
}

nav a{
	display: block;
	padding-bottom: 0.3em;
}

nav .submenu{
	padding-left: 0.8em;
	font-size: 0.85em;
}

/*Hamburger*/
.hamburger{
	padding: 5px;
	font-size: 0;
	display: inline-block;
	cursor: pointer;
	transition-property: opacity, filter;
	transition-duration: 0.15s;
	transition-timing-function: linear;
	overflow: visible;
}

.hamburger-box{
	top: 15%;
	width: 40px;
	height: 26px;
	display: inline-block;
	position: relative;
}

.hamburger-inner{
	display: block;
	top: 50%;
	margin-top: -2px;
}

.hamburger-inner,.hamburger-inner::before,.hamburger-inner::after{
	width: 40px;
	height: 5px;
	background-color: var(--fake-black);
	border-radius: 5px;
	position: absolute;
	transition-property: transform;
	transition-duration: 0.15s;
	transition-timing-function: ease;
}

.hamburger-inner::before, .hamburger-inner::after{
	content: "";
	display: block;
}

.hamburger-inner::before{top: -10px}
.hamburger-inner::after{bottom: -10px}


.hamburger--collapse .hamburger-inner{
	top: auto;
	bottom: 0;
	transition-duration: 0.13s;
	transition-delay: 0.13s;
	transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
.hamburger--collapse .hamburger-inner::after{
	top: -20px;
	transition: top 0.2s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1), opacity 0.1s linear;
}

.hamburger--collapse .hamburger-inner::before{transition: top 0.12s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1), transform 0.13s cubic-bezier(0.55, 0.055, 0.675, 0.19)}

.hamburger--collapse.active .hamburger-inner{
	transform: translate3d(0, -10px, 0) rotate(-45deg);
	transition-delay: 0.22s;
	transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}

.hamburger--collapse.active .hamburger-inner::after{
	top: 0;
	opacity: 0;
	transition: top 0.2s cubic-bezier(0.33333, 0, 0.66667, 0.33333), opacity 0.1s 0.22s linear;
}

.hamburger--collapse.active .hamburger-inner::before{
	top: 0;
	transform: rotate(-90deg);
	transition: top 0.1s 0.16s cubic-bezier(0.33333, 0, 0.66667, 0.33333), transform 0.13s 0.25s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/*Main*/
main{
	margin-top: var(--header-height);
	margin-bottom: var(--footer-height);
	background-image: url("/img/lightRock.jpg");
	background-attachment: fixed;
	min-height: var(--main-height);
	padding: 0.01px 0; /*Making sure margins dont overlap*/
}

main .main-tint{
	pointer-events: none;
	background-color: transparent;
	width: 100vw;
	height: 100vh;
	position: fixed;
	transition: background-color 0.5s ease-in-out;
	z-index: 1;
}

main .main-tint.active{
	pointer-events: auto;
	background-color: #000A;
}

/*Footer*/
footer{
	box-shadow: 0 -2px 2px 0 rgba(0,0,0,0.25);
	position: fixed;
	bottom: 0;
	width: 100%;
	height: var(--footer-height);
	display: flex;
	background-image: linear-gradient(black 0%,#FFF0 20%,#FFF2 80%, #FFF0 100%), url(/img/darkRock.jpg);
	background-size: 100% 10px, auto;
	background-repeat: no-repeat, repeat;
	transition: height 0.5s cubic-bezier(.22,.61,.36,1);
	box-sizing: border-box;
	z-index: 2;
	color: white;
}

footer.opened{height: 8em}

footer .footer-content{
	flex: 1;
	padding-top: 10px;
}

footer .expand-footer{
	width: var(--footer-height);
	height: var(--footer-height);
	transition: transform 0.5s ease-out;
	transform-origin: center;
}

footer.opened .expand-footer{transform: translateY(1.9em) rotate(180deg)}
footer .expand-footer svg{fill: white}

footer .name-display{
	font-family: "Fredericka the Great";
	font-size: 2em;
	text-align: center;
	transition: font-size 0.5s ease-out;
}

footer.opened .name-display{font-size: 3.75em}
footer .copyright{text-align: center}


/*Animated underlines*/
.anim-underline{
	position: relative;
	text-decoration: none;
	display: inline-block;
}

.anim-underline:before{
	content: "";
	position: absolute;
	width: 100%;
	min-height: 2px;
	height: 0.1em;
	bottom: 0.3em;
	left: 0;
	visibility: hidden;
	transform: scaleX(0);
	transition: all 0.3s ease-in-out 0s;
	background-color: var(--fake-black);
}

.no-touch .anim-underline:hover:before{
	visibility: visible;
	transform: scaleX(1);
}

.main-sheet{
	background-image: url("/img/paper2.jpg");
	padding: 0 1em 1em 1em;
	left: 0;
	right: 0;
	margin: auto;
	color: var(--fake-black);
	cursor: default;
	min-height: calc(var(--main-height) - 1em);
	position: relative;
	display: flex;
	flex-direction: column;
}

.main-sheet h2{
	margin: 0;
	padding: 0.4em 0 0 1.5em;
	text-indent: -1.5em;
	font-family: MedievalSharp;
}

.main-sheet h2::first-letter{
	font-size: 200%;
	color: var(--red-ink);
	letter-spacing: -0.07em;
}

.main-sheet a{
	color: var(--red-ink);
	text-decoration: underline;
}

table{border-collapse: collapse}

@media only screen and (min-width: 700px) {
	.main-sheet{
		margin-top: 2em;
		margin-bottom: 1em;
		border-radius: 1em;
		max-width: 1000px;
		width: 70vw;
		box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.75);
		min-height: calc(var(--main-height) - 4em);
	}
}

button{
	border: 5px solid;
	border-color: #A04A39 #66231D #3B1311 #652317;
	background: radial-gradient(#A92320 5%, #752423 90%, #BE321B 100%);
	border-radius: 5px;
	padding: 2px 10px 0px 10px;
	font-family: MedievalSharp;
	font-size: 20px;
	color: white;
	cursor: pointer;
	margin: 2px 0px 2px 0px;
	transition: box-shadow 0.3s ease-in-out 0s;
}

button:hover{
	box-shadow: 1px 2px 4px 0px #000000AA;
}

button:active{
	border-color: #721B12 #3C0A09 #1D0400 #3F070A;
	background: radial-gradient(#4F0D0E 5%, #460C0B 90%, #4F0D0E 100%);
}

button:disabled{
	box-shadow: none;
	cursor: default;
	border-color: #9B6E66 #663E3C #382120 #603933;
	background: radial-gradient(#A55251 5%, #704343 90%, #BA6153 100%);

}

.left-arrow, .right-arrow{
	height: 30px;
	width: 30px;
	padding: 0;
}

.left-arrow:after{
	content: "";
	display: block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 7.5px 13.0px 7.5px 0;
	margin: auto;
	border-color: transparent #ffffff transparent transparent;
}

.right-arrow:after{
	content: "";
	display: block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width:  7.5px 0 7.5px 13.0px;
	margin: auto;
	border-color: transparent transparent transparent #ffffff;
}

.button-selection span{
	min-width: 2em;
	display: inline-block;
	color: var(--red-ink);
	font-weight: bolder;
	text-align: center;
}

.button-selection{
	display: inline-block;
}

a.anchor{
	display: block;
	position: relative;
	top: calc(-1 * var(--header-height) - 2.5em);
	visibility: hidden;
}

#rule-navigation{
	display: flex;
	bottom: 1em;
	width: 100%;
	margin-top: auto;
	padding-top: 2em;
}

#rule-navigation>*{
	display: inline-block;
	flex: 1;
	text-align: center;
	padding: 0 0.3em;
}

#rule-navigation .rule-icon{
	width: 5em;
	height: 5em;
	flex: 1;
	display: inline-block;
	/*background-image: url("/img/lightRock.jpg");*/
	border-radius: 5%;
	box-shadow: inset 2px 2px 5px 1px rgba(0,0,0,0.75);
}

#rule-navigation>a>p{
	max-width: 100%;
	hyphens: auto;
}


#rule-navigation a path{fill: white}
#rule-navigation span path.red{fill: var(--red-ink);}

#rule-navigation .optional{display: none}
@media only screen and (min-width: 500px) {
	#rule-navigation .optional{display: block}
}