/* Welcome to Tiny Gigantic's CSS styles! */

/* First, we'll reset some things */

html,
body {
	margin: 0;
	min-height: 100vh;
}

/************/
/* Web font */
/************/

@font-face {
	font-family: 'Roboto';
	src: url('fonts/Roboto.woff2') format('woff2'), url('fonts/Roboto.woff') format('woff');
	font-weight: 400;
}

@font-face {
	font-family: 'Roboto';
	src: url('fonts/Roboto Bold.woff2') format('woff2'), url('fonts/Roboto Bold.woff') format('woff');
	font-weight: 700;
}

@font-face {
	font-family: 'Roboto';
	src: url('fonts/Roboto Black.woff2') format('woff2'), url('fonts/Roboto Black.woff') format('woff');
	font-weight: 900;
}

/**************/
/* Typography */
/**************/

html,
body {
	font-family: Roboto, 'Franklin Gothic Medium', Tahoma, sans-serif;
	font-size: 18px;
}
a {
	text-decoration: none;
}
h1,
h2,
h3 {
	font-size: 2rem;
	margin: 0;
}
h2 {
	font-size: 1.5rem;
}
h3 {
	font-size: 1rem;
}
p {
	line-height: 1.5em;
}
h1,
h2 {
	font-weight: 900;
}
li {
	margin-bottom: 1em;
}

/**********/
/* Layout */
/**********/

body,
header,
footer {
	display: flex;
}

body {
	flex: 1;
	flex-direction: column;
}

/* Top header bar */
header {
	padding: 2rem 0;
}
.topbar {
	align-items: flex-end;
	display: flex;
}
#logo {
	flex-shrink: 0;
	width: 4rem;
}
#logo img {
	transition: filter 0.5s ease-in-out 0s;
}
#logo:hover img {
	/*
   * NOTE: we need to use a filter because the SVG is imported as an image.
   * Calculated with: https://codepen.io/sosuke/pen/Pjoqqp
  */
	filter: brightness(0) saturate(100%) invert(32%) sepia(17%) saturate(7497%) hue-rotate(340deg) brightness(103%)
		contrast(112%);
}

/* Inner containers */
.topbar,
.bottombar,
.hero-outer,
.plain {
	margin: auto;
	max-width: 960px;
	width: 100%;
}

/* Hero is a large lead-in at the top */
.hero-outer {
	font-size: 1.5rem;
	padding: 2rem 0;
}
.hero-inner {
	max-width: 600px;
}

/* Columns */
.row {
	display: flex;
}
.row > div {
	flex: 1 1 0;
	margin-right: 4rem;
}
.row > div:last-child {
	margin-right: 0;
}
.row h3 {
	text-align: center;
}

/* Color utilities */
.indigo {
	color: #00006e;
}
.red {
	color: #ff3328;
}
.yellow {
	color: #ffcb00;
}

/* Dark colors */
.dark {
	background-color: #00006e;
	color: white;
}
.dark a,
.dark a:visited {
	color: white;
	font-weight: bold;
}
.dark a:hover {
	color: #ff3328;
	border-bottom: 2px solid #ff3328;
}

/* Light colors */
.light {
	background-color: white;
	color: #00006e;
	/* NOTE: expand light sections to fill extra vertical space */
	flex-grow: 1;
}
.light a {
	color: #00006e;
	font-weight: bold;
}
.light a:hover {
	border-bottom: 2px solid #00006e;
}

/* Plain content area */
.plain {
	padding: 4rem 0;
}
.plain h2 {
	margin-bottom: 4rem;
	position: relative;
	text-align: center;
}
.plain h2:after {
	background-color: #ffcb00;
	bottom: -2rem;
	content: '';
	height: 3px;
	left: 50%;
	margin-left: -50px;
	position: absolute;
	width: 100px;
}

/* Footer bottom bar */
.bottombar {
	display: flex;
	padding: 4rem 0;
}
.copyright {
	margin-left: auto;
}

/********************/
/* Navigation links */
/********************/

nav {
	margin-left: auto;
	text-transform: uppercase;
	white-space: nowrap;
}
nav a {
	margin-left: 2rem;
	position: relative;
	transition: color 0.5s ease-in-out 0s;
}
nav a,
nav a:visited {
	color: #00006e;
}
nav a:hover {
	color: #ff3328;
}
nav a::before {
	background-color: #ff3328;
	bottom: -2px;
	content: '';
	height: 2px;
	left: 0;
	position: absolute;
	transition: width 0.5s ease-in-out 0s;
	visibility: hidden;
	width: 0;
}
nav a:hover::before {
	visibility: visible;
	width: 100%;
}
/* Active link */
nav a.active {
	color: #5945ff;
}
nav a.active::before {
	background-color: #5945ff;
	bottom: -2px;
	content: '';
	height: 2px;
	left: 0;
	position: absolute;
	visibility: visible;
	width: 100%;
}
.dark nav a.active {
	color: #ffcb00;
}
.dark nav a.active::before {
	background-color: #ffcb00;
}

.nav-section {
	align-items: center;
	display: flex;
	padding: 2rem;
}
.nav-button,
.light a.nav-button {
	background-color: #5945ff;
	border-radius: 1rem;
	color: #fff;
	margin: auto;
	padding: 1rem 2rem;
	transition: background-color 1s ease-out;
}
.nav-button:hover,
.light a.nav-button:hover {
	background-color: #ff3328;
	border: 0;
}

/**********************/
/* Corner decorations */
/**********************/

section {
	position: relative;
}

/* Upper left corner yellow squiggle  */
.upper-left-yellow::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 14rem;
	height: 14rem;
	background-image: url('images/1-b.svg'), url('images/1-c.svg'), url('images/1-a.svg');
	background-position: -1rem -6rem, -3rem -8rem, -2rem -7rem;
	background-repeat: no-repeat;
}

/* Lower right corner red squiggle  */
.lower-right-red::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: 0;
	width: 14rem;
	height: 14rem;
	background-image: url('images/2-b.svg'), url('images/2-c.svg'), url('images/2-a.svg');
	background-position: 9rem 13rem, 7rem 11rem, 8rem 12rem;
	background-repeat: no-repeat;
}

.upper-left-blue::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 14rem;
	height: 14rem;
	background-image: url('images/3-b.svg'), url('images/3-c.svg'), url('images/3-a.svg');
	background-position: -6rem -6rem, -8rem -8rem, -7rem -7rem;
	background-repeat: no-repeat;
}

/* Lower right corner yellow squiggle  */
.lower-right-yellow::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: 0;
	width: 14rem;
	height: 14rem;
	background-image: url('images/1-b.svg'), url('images/1-c.svg'), url('images/1-a.svg');
	background-position: 3rem 11rem, 1rem 9rem, 2rem 10rem;
	background-repeat: no-repeat;
}
