:root {
  --light-base: rgba(255,255,255,0.9);
  --light-text: #bababa;
  --light-text-hover: #111;

  --dark-base: rgba(38,50,56,0.9);
  --dark-text: #888;
  --dark-text-hover: #eaeaea;

  --bg-transition: 400ms;
}

html, body {
  height: auto;
  height: 100%;
  overflow: hidden;
  font-size: 16px;
}

body {
  font-family: Helvetica, arial, sans;
  background-color: var(--dark-base);
  color: var(--dark-base);
  background-size: cover;
  margin: 0;
  line-height: 1.5;
}

body.ready {
  transition: background-image,background-color var(--bg-transition) ease-in-out;
}

body.dark {
  background-color: var(--light-base);
  color: var(--light-base);
}

.container {
  display: flex;
  height: 100%;
  z-index: 1000;
  position: relative;
}

.container h1 {
  margin: auto;
  font-size: 2rem;
  line-height: 1.4;
  text-align: center;
  font-weight: normal;
  white-space: pre-wrap;
  width: 26em;
  height: 15em;
  border-radius: 1em;
  padding: 0 2em;
  box-sizing: border-box;
  background: var(--light-base);
  display: flex;
}

.container h1 span {
  margin: auto;
}

@media (max-width: 48em) {
  .container h1 {
    font-size: 1.625em;
    width: 18em;
    height: 12em;
  }
}

@media (max-width: 32em) {
  .container h1 {
    font-size: 1.25em;
    width: 80%;
    height: 12em;
  }
}

body.dark .container h1 {
  background: var(--dark-base);
}

body.ready .container h1 {
  transition: color var(--bg-transition) ease-in-out;
}

div.bg {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transition: opacity 1s ease-in;
  background-size: cover;
}

.bg.fade-in {
  opacity: 0;
}

.colors {
  position: absolute;
  display: flex;
  width: 50%;
  left: 25%;
  bottom: 4em;
  height: 120px;
  z-index: 1000;
  box-sizing: border-box;
}

.colors > div {
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  margin: 10px;
}

.controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
}

.controls a {
  display: inline-block;
  margin-left: 1.5rem;
  transition: color 300ms ease-in;
  text-decoration: none;
  color: var(--light-text);
}

.controls a.sources span {
  position: relative;
  top: -0.5rem;
}
