/* This CSS is not very organized or optimized. It just works good enough for its purpose. */

:root {
  --blue-dark: #0578be;
  --blue-light: #82bcde;
  --highlight: #C5283D;
  --grey: #666;
  --grey-light: #DDD;
  font-size: 62.5%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "SourceSans", Arial, Helvetica, sans-serif;
}

html, body {
  background: var(--blue-dark);
  font-size: 2.4rem;
  line-height: 1.5;
}
body {
  overflow-y: scroll;
}

h1, h2, h3, h4 {
  margin-top: 0;
  margin-bottom: 2rem;
  font-weight: normal;
  font-family: ChangaOne;
}
h1 {
  font-size: 4rem;
}
h2 {
  font-size: 3rem;
}
h3 {
  font-size: 2.6rem;
}
h4 {
  font-size: 2.4rem;
}
p, ul, dl {
  margin-bottom: 2rem;
  font-weight: 350;
  font-size: 2.4rem;
  font-variation-settings: "wght" 350;
}
p.mb {
  margin-bottom: 6rem;
}
p.mt {
  margin-top: 6rem;
}

dt, dd {
  display: block;
}
dt {
  font-weight: 500;
  font-variation-settings: "wght" 500;
}
dd {
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: underline;
}
a:hover,
a:focus {
  text-decoration: none;
}
h3 a { 
  font-family: ChangaOne;
}

a.ghost {
  display: inline-block;
  border: 1px solid var(--blue-dark);
  border-radius: 50px;
  padding: 1rem 2rem;
  font-size: 2rem;
  text-decoration: none;
}
a.ghost:hover,
a.ghost:focus {
  background: var(--blue-dark);
  color: white;
}

a.highlight {
  display: inline-block;
  border: 2px solid var(--highlight);
  border-radius: 50px;
  background: var(--highlight);
  padding: 1rem 2rem;
  color: white;
  font-size: 2rem;
  text-decoration: none;
}
a.highlight:hover,
a.highlight:focus {
  outline: 3px solid var(--highlight);
  border: 2px solid white;
}

img {
  display: block;max-width: 100%;
}
figure img {
  margin-bottom: 1rem;
}
figcaption {
  color: var(--grey);
  font-size: 2rem;
}

hr {
  margin: 6rem 0;
  border-top: 1px solid var(--grey-light);
  background-color: white;
  color: var(--grey-light);
}

/* Header */

header {
  display: block;
  margin: 3rem auto;
  padding-top: 5rem;
  max-width: 800px;
}
header a {
  display: inline-block;
  position: relative;
  opacity: 0.5;
  margin: 0 0.25em 0 0.25em;
}
header ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin: 0 auto;
  max-width: 800px;
  list-style: none;
}
header svg {
  width: 3.2rem;
  height: 3.2rem;
}
header svg * {
  stroke: white;
}
header span {
  display: none;
}

header a::after {
  display: block;
  position: absolute;
  bottom: -3.1rem;
  left: 50%;
  transition: border-bottom-width .25s ease-in-out;
  margin-left: -2rem;
  border-right: solid 2rem transparent;
  border-bottom: solid 0em #ffffff;
  border-left: solid 2rem transparent;
  border-bottom-width: 0em;
  content: '';
}
header a.active::after {
  border-bottom-width: 2rem;
}
header a.active,
header a:hover,
header a:focus {
  opacity: 1.0;
}

header a span {
  display: inline-block;
  position: absolute;
  top: -4rem;
  opacity: 0;
  color: #ffffff;
  font-size: 2rem;
  line-height: 2rem;
  -moz-transition: opacity .25s ease-in-out;
  -webkit-transition: opacity .25s ease-in-out;
  -ms-transition: opacity .25s ease-in-out;
  z-index: 2;
  transition: opacity .25s ease-in-out;
  margin-left: calc(-5rem - 16px);
  padding-bottom: 2rem;
  width: 10rem;
  text-align: center;
}
header a:hover span {
  opacity: 1.0;
}


/* Main */
section {
  margin: 0 auto 5rem;
  background: white;
  padding: 6rem;
  max-width: 1000px;
}
section :last-child {
  margin-bottom: 0;
}

section.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  padding: 0;
}

.content {
  padding: 6rem;
}
.centered {
  align-self: center;
  background: var(--blue-light);
  background-size: cover;
  padding: 6rem;
  height: 100%;
}
.landscape {
  display: none;
  margin: 0 auto;
  max-width: 400px;
}
.portrait {
  margin: 0 auto;
  max-height: 400px;
}

h1 img {
  display: inline-block;
  position: relative;
  top: 1.5rem;
  rotate: -10deg;
  margin-left: -3rem;
  height: 6rem;
}

@keyframes jump {
  0%   { top: 1.5rem; }
  88%  { top: 1.5rem; }
  91%  { top: 1.1rem; }
  94%  { top: 1.5rem; }
  97%  { top: 1.1rem; }
  100% { top: 1.5rem; }
}

@media screen and (prefers-reduced-motion: no-preference) {
  h1 img { animation-duration: 6s; animation-iteration-count: infinite; animation-name: jump; } 
}

/* Footer */
footer {
  margin: 10rem auto 3rem;
  padding: 0 3rem;
  max-width: 860px;
  color: white;
}
footer p {
  display: inline;
  font-size: 1.8rem;
}
footer p:after {
  margin: 0 1rem;
  content: '|';
}
footer p:last-child:after {
  display: none;
}

/* With JavaScript */
.js section {
  display: none;
}
.js section.active {
  display: block;
}
.js section.grid.active {
  display: grid;
}

/* Responsiveness */
@media (max-width: 1040px) {
  section { margin: 0 2rem 5rem; }
}

@media (max-width: 900px) {
  section.grid { grid-template-columns: 1fr; }
  .landscape { display: block; }
  .portrait { display: none; }
  .centered { padding: 3rem; height: auto; }
}

@media (max-width: 600px) {
  header { display: none; }
  section { display: block !important; margin: 0 0 3rem; padding: 3rem; }
  .content { padding: 3rem; }
}