/* Fonts */

@font-face {
  font-family: "Fakt Soft";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url(/fonts/FaktSoftPro-Normal.woff) format("woff");
}

@font-face {
  font-family: "Fakt Soft";
  font-style: normal;
  font-weight: bold;
  font-display: swap;
  src: url(/fonts/FaktSoftPro-SemiBold.woff) format("woff");
}

/* General typography */

html {
  font-family: "Fakt Soft", "Helvetica", sans-serif;
  font-size: 18px;
  color: #333;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: #06a;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.action-link {
  color: #333;
  text-align: center;
  font-size: 0.9em;
}

.action-link:hover,
.action-link:focus {
  text-decoration: none;
}

h1 {
  font-size: 1.8em;
}

h2 {
  font-size: 1.5em;
}

h3 {
  font-size: 1.2em;
}

.swedish-flag {
  width: auto !important;
  margin-left: 0 !important;
  height: 0.6em;
}

/* Homepage typography */

header h1 {
  display: inline;
  font-size: 1.2em;
  font-weight: normal;
}

header p {
  font-size: 1.2em;
  display: inline;
}

section h2 {
  text-align: center;
  margin-top: 0;
}

.highlights li {
  text-align: center;
}

.spelkosmos {
  color: #fff;
}

.spelkosmos .action-link {
  color: #fff;
}

.spelkosmos img {
  vertical-align: middle;
  transform: translate3d(0, 0, 0);
}

/* Homepage responsive typography */

@media (min-width: 32.8em) {

}

/* Subpages typography */

pre code {
  font-family: monaco, Consolas, "Lucida Console", monospace;
  font-size: 0.875em;
}

/* General layout */

body {
  margin: 0 auto;
  max-width: 35em;
}

a {
  /* Disable tap highlighting on touch devices. */
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

a:hover,
a:focus,
button:hover,
button:focus,
input:hover,
input:focus {
  /* Remove browser specified outlines. */
  outline: none;
}

/* Homepage layout */

header {
  background: url('../images/sven.png') no-repeat;
  background-size: 80px;
  background-position: top center;
  border-bottom: solid 2px #d3d3d3;
  padding: calc(80px + 2em) 0 1em 0;
  margin: 2em 1em 0 1em;
}

.extra-copy {
  display: none;
}

section {
  padding: 1em;
  overflow: auto;
}

.action-link {
  background: rgba(0, 0, 0, 0.2);
  border: solid 2px rgba(0, 0, 0, 0);
  display: block;
  padding: 0.2em 1em;
  border-radius: 1em;
  float: right;
  transition: border 0.4s;
}

.action-link:hover,
.action-link:focus {
  border: solid 2px rgba(0, 0, 0, 0.3);
}

.highlights {
  list-style-type: none;
  padding: 0;
  overflow: auto;
}

.highlights li {
  box-sizing: border-box;
  width: 33%;
  float: left;
  padding: 0.1em;
}

.highlights img {
  border: none;
  display: block;
  margin: 0 auto;
  transform: translate3d(0, 0, 0);
}

.highlights a {
  display: block;
}

.spelkosmos {
  background: #00042f;
}

.spelkosmos .action-link {
  background: rgba(255, 255, 255, 0.2);
}

.spelkosmos .action-link:hover,
.spelkosmos .action-link:focus {
  border: solid 2px rgba(255, 255, 255, 0.3);
}

/* Homepage responsive layout */

@media (min-width: 23em) {
  .extra-copy {
    display: inline;
  }
}

@media (min-width: 32.8em) {
  header {
    background-position: top left;
    padding: 0 1em 1em calc(80px + 1.5em);
  }
}

/* Subpages layout */

.archive {
  list-style-type: none;
  padding: 0;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.video-wrapper iframe {
  border: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

video {
  height: auto;
  margin-left: -1em;
  width: calc(100% + 2em);
}

article {
  padding: 0 1em;
}

article img {
  width: calc(100% + 2em);
  margin-left: -1em;
  height: auto;
}

figure {
  margin: 0;
}

pre {
  overflow-x: auto;
}

footer {
  border-top: solid 2px #d3d3d3;
  padding: 1em 0;
  margin: 1em;
}

.search-form {
  display: flex;
  flex-direction: row;
  margin: 1em 0;
}

.search-field, #search-button {
  font-size: 1em;
  border-radius: 4px;
}

.search-field {
  padding: 10px;
  border: solid 2px #d3d3d3;
  color: #333;
  flex-grow: 1;
  overflow: hidden;
}

.search-field:hover,
.search-field:focus {
  border-color: #003c7a;
}

#search-button {
  background: #06a;
  padding: 12px 24px;
  border: none;
  color: #fff;
  flex-shrink: 1;
  margin-left: 0.2em;
}

#search-button:hover,
#search-button:focus {
  background: #003c7a;
}

#search-button:active {
  background: #003c7a;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8);
}

/* Animations */

.attention-seeker {
  animation: rubber-band 1s;
  animation-iteration-count: 1;
}

@keyframes rubber-band {
  from {
    transform: scale3d(1, 1, 1);
  }

  30% {
    transform: scale3d(1.25, 0.75, 1);
  }

  40% {
    transform: scale3d(0.75, 1.25, 1);
  }

  50% {
    transform: scale3d(1.15, 0.85, 1);
  }

  65% {
    transform: scale3d(0.95, 1.05, 1);
  }

  75% {
    transform: scale3d(1.05, 0.95, 1);
  }

  to {
    transform: scale3d(1, 1, 1);
  }
}
