/* Universal Core Assistance Styles */

* {
	box-sizing: border-box;
}

html,
code::after {
	font-family: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

html {
	font-size: 17px;
	color: white;
	background-color: #232323;
}

html,
body {
	margin: 0;
	padding: 0;
}

main {
	color: #232323;
	background-color: white;
	overflow: auto;
}

/* General */

img.supplemental {
	float: right;
	margin: .5em 0 .5em 1rem;
}

kbd {
	border-style: solid;
	border-width: 1px 1px 3px;
	border-radius: .25em;
	font-family: inherit;
	padding: .1em .25em;
}

.pull {
	font-size: 1.5em;
	font-style: italic;
	line-height: 1.5;
	color: #117DB2;
}

/* Headers */

header.primary {
	overflow: auto;
	background: url(rays-bg-bottom.svg) bottom center no-repeat #232323;
	background-size: cover;
}

@media (orientation: landscape) {
	header.primary h2 a {
		height: 22vw;
		max-height: 20rem;
		margin: 4rem 0;
	}
	
	body.about header.primary h2 a {
		background-image: url(about-header.svg);
	}

	body.contact header.primary h2 a {
		background-image: url(contact-header.svg);
	}
	
	body.courses header.primary h2 a {
		background-image: url(courses-header.svg);
	}

	body.home header.primary h2 a {
		background-image: url(home-header.svg);
	}

	body.tips header.primary h2 a {
		background-image: url(tips-header.svg);
	}
}

@media (orientation: portrait) {
	header.primary h2 a {
		height: 75vw;
		margin: 0 10vw;
	}
	
	body.about header.primary h2 a {
		background-image: url(about-header-compact.svg);
	}

	body.contact header.primary h2 a {
		background-image: url(contact-header-compact.svg);
	}

	body.courses header.primary h2 a {
		background-image: url(courses-header-compact.svg);
	}

	body.home header.primary h2 a {
		background-image: url(home-header-compact.svg);
	}

	body.tips header.primary h2 a {
		background-image: url(tips-header-compact.svg);
	}
}

header.primary h2 {
	margin: 0;
	padding: 0;
}

header.primary h2 a {
	background-position: center center;
	background-repeat: no-repeat;
	background-size: contain;
	display: block;
	color: white;
	text-indent: -999em;
	overflow: hidden;
	padding: 0;
}

/* Forms */

form input,
form button {
	-webkit-appearance: none;
	border: none;
	margin: 0;
	padding: .25em .5em;
	font-family: inherit;
	font-size: inherit;
}

.universal form,
form.subscribe {
	display: flex;
	align-items: center;
}

.universal form input::-webkit-input-placeholder {
	color: #808080;
	opacity: 1;
}
.universal form input::-moz-placeholder {
	color: #808080;
	opacity: 1;
}
.universal form input:-ms-input-placeholder {
	color: #808080;
	opacity: 1;
}
.universal form input::-ms-input-placeholder {
	color: #808080;
	opacity: 1;
}
.universal form input::placeholder {
	color: #808080;
	opacity: 1;
}

/* Search */

.universal form.search input {
	height: 2em;	
}

.universal form.search input[type="search"] {
	color: white;
	background-color: #424242;
	border-radius: .25em 0 0 .25em;
}

.universal form.search input[type="search"]:focus,
.universal form.subscribe input[type="email"]:focus {
	color: #232323;
	background-color: white;
	outline: none;
}

.universal form.search input[type="submit"] {
	color: white;
	font-weight: bold;
	background-color: #232323;
	border: solid 2px #424242;
	border-radius: 0 .25em .25em 0;
}

.universal form.search input[type="search"]:focus + input[type="submit"],
form.subscribe input[type="email"]:focus,
form.subscribe input[type="email"]:focus + button[type="submit"] {
	border-color: white;
}

.universal form.search input[type="search"]:focus,
.universal form.search input[type="search"]:focus + input[type="submit"],
.universal form.subscribe input[type="email"]:focus,
.universal form.subscribe input[type="email"]:focus + button[type="submit"] {
	box-shadow: 0 0 .5rem white;
}

.universal form.search input[type="submit"]:active {
	color: #232323;
	background-color: white;
}

/* Subscribe */

form.subscribe input[type="email"] {
	min-width: 10em;
	width: 16em;
	border: solid 2px #424242;
	border-radius: .25em 0 0 .25em;	
}

form.subscribe button[type="submit"] {
	color: white;
	background-color: #232323;
	font-weight: bold;
	border: solid 2px #424242;
	border-left-width: 0;
	border-radius: 0 .25em .25em 0;
}

form.subscribe button[type="submit"]:active {
	color: #232323;
	background-color: white;
}

/* Navigation */

nav.universal {
	display: flex;
	position: fixed;
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	width: 100%;
	z-index: 1000;
	color: white;
	background: #232323;
	background: linear-gradient(rgba(35,35,35,.85), rgba(35,35,35,.75));
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

/* Compact */
@media (max-width: 63rem) {
	nav.universal {
		flex-direction: column;
		justify-content: space-evenly;
		align-items: center;
	}

	nav.universal h1 a {
		border-top: solid transparent .5em;
	}
	
	nav.universal ul {
		flex-wrap: wrap;
		justify-content: center;
	}
	
	nav.universal ul li {
		min-height: 2rem;
	}

	nav.universal ul li a {
		font-size: 0.9rem;
		padding: 0 .5em;
	}

	nav.universal ul li form {
		font-size: 0.9rem;
	}

	nav.universal form.search {
		margin: .35em .5em;
	}

	nav.universal form.search input {
		padding: .15em .35em;
	}

	nav.universal form.search input[type="search"] {
		width: 5.5rem;
	}
}

/* Regular */
@media (min-width: 63.1rem) {
	nav.universal {
		flex-direction: row;
		justify-content: space-between;
		align-items: stretch;
	}

	nav.universal ul li a {
		font-size: 1.1rem;
		padding: .5em .75em;
	}

	nav.universal form.search {
		margin: .5em 1em;
	}

	nav.universal form.search input[type="search"] {
		width: 8rem;
	}
}

/* If the viewport is short, don't keep the navigation visible all the time. */
@media (max-height: 40rem) {
	nav.universal {
		position: static;
	}
}

/* Account for the WordPress admin bar. */
body.admin-bar nav.universal {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar nav.universal {
		top: 46px;
	}	
}

nav.universal h1,
nav.universal ul {
	margin: 0;
	padding: 0;
}

nav.universal a {
	color: white;
	text-decoration: none;
}

nav.universal h1 {
	font-size: 1rem;
}

nav.universal h1 a {
	display: block;
	width: 14.5rem;
	height: 100%;
	min-height: 2.5rem;
	background: url('logo.svg') left center no-repeat;
	background-size: contain;
	text-indent: -999em;
	margin-left: 1rem;
	margin-right: 1rem;
	transition: transform .25s ease-in-out;
}

nav.universal h1 a:hover {
	transform: scale(1.05);
}

nav.universal ul {
	list-style: none;
	display: flex;
	align-items: stretch;
}

nav.universal ul li {
	display: flex;
}

nav.universal ul li a {
	display: flex;
	align-items: center;			
}

nav.universal ul li a {
	font-weight: bold;
	position: relative;
}

nav.universal ul li a:hover {
	text-decoration: underline;
}

/* Active Nav */
body.active-nav-tips nav.universal a.tips::after,
body.active-nav-articles nav.universal a.articles::after,
body.active-nav-courses nav.universal a.courses::after,
body.active-nav-consulting nav.universal a.consulting::after,
body.active-nav-about nav.universal a.about::after,
body.active-nav-contact nav.universal a.contact::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: .35em solid transparent;
	border-right: .35em solid transparent;
	border-bottom: .35em solid white;
	filter: drop-shadow(0 0 .25em white);
}

/* Footer */

footer.universal {
	color: white;
	background: url(rays-bg-top.svg) top center no-repeat #232323;
	background-size: cover;
	background-color: #232323;
	line-height: 1.7;
}

footer.universal section,
footer.universal nav {
	padding: 1rem 2rem;
}

footer.universal a:link {
	color: white;
	text-decoration: none;
}

footer.universal a:visited {
	color: white;
}

footer.universal a:hover {
	text-decoration: underline;
}

footer.universal a:active {
	color: #aaf;
}

footer.universal section.subscribe {
	text-align: center;
}

footer.universal section.subscribe h2 {
	font-size: 1.25rem;
}

footer.universal section.subscribe form {
	font-size: 1.25rem;
	justify-content: center;
}

footer.universal section.subscribe h2,
footer.universal section.subscribe form {
	margin: 1rem 0;
}

footer.universal nav {
	text-align: center;
}

footer.universal nav > ul {
	display: inline-block;
	margin-top: 0;
	margin-bottom: 0;
	text-align: left;
	font-weight: bold;
	background: url(logo.svg) top center no-repeat;
	background-size: contain;
	padding-top: 2rem;
}

footer.universal nav ul ul {
	font-weight: normal;
}

footer.universal section.social ul {
	list-style: none;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

footer.universal section.social ul li a {
	display: block;
	width: 40px;
	height: 20px;
	text-indent: -999em;
	overflow: hidden;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: contain;
	opacity: 0.75;
}

footer.universal section.social ul li a:hover {
	opacity: 1;
}

footer.universal section.social ul li a.twitter {
	background-image: url(images/twitter.svg);
}

footer.universal section.social ul li a.dribbble {
	background-image: url(images/dribbble.svg);
}

footer.universal section.social ul li a.medium {
	background-image: url(images/medium.svg);
}

footer.universal section.social ul li a.linkedin {
	background-image: url(images/linkedin.svg);
}

footer.universal section.copyright {
	opacity: .5;
}

footer.universal section.copyright p {
	margin: 0;
	padding: 0;
}

footer.universal {
	text-align: center;
}

footer.universal section.search form {
	justify-content: center;
}
