@font-face {
  font-family: "TITLE";
  src: url("../font/BebasNeue-Regular.ttf");
}

@font-face {
  font-family: "TEXT";
  src: url("../font/StackSansText-VariableFont_wght.ttf");
}

:root {
  --drop-shadow: -0.1rem 0.1rem 0.3rem #000;
}

:target {
  scroll-margin-block: 3rem;
}

html {
  font-family: "TEXT", "sans-serif";
  text-shadow: var(--drop-shadow);
  font-size: 100%;
  height: 100%;
  scroll-padding-top: 3rem;
}

body,
::backdrop {
  background-color: #0000d6;
  background-image: linear-gradient(#0000d6 70%, #000090);
  background-attachment: fixed;
  color: #fff;
}

html.no-scroll {
  overflow: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-size: 2rem;
  font-weight: 200;

  @media (max-width: 1439px) {
    font-size: 1.3rem;
  }
}

html:fullscreen #wrapper {
  max-width: none;
}

img,
svg {
  filter: drop-shadow(var(--drop-shadow));
}

svg text {
  text-shadow: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "TITLE", "Impact", "sans-serif";
  margin: 1rem 0;
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: 0.1rem;

  @media (max-width: 1439px) {
    font-size: 2rem;
    line-height: 1;
    letter-spacing: 0;
  }
}

h1 {
  position: relative;
  z-index: 1;
  font-size: 6rem;
  margin-top: 0;
  margin-bottom: 4rem;
  text-wrap: balance;

  @media (max-width: 1439px) {
    font-size: 3.2rem;
    margin-bottom: 2rem;
  }
}

h2 {
  color: #fd5;
  font-size: 4.2rem;

  @media (max-width: 1439px) {
    font-size: 2.5rem;
  }
}

h3 {
  font-size: 3.2rem;

  @media (max-width: 1439px) {
    font-size: 2rem;
  }
}

p {
  margin-top: 0;
  line-height: 1.35;
}

b,
strong {
  font-weight: 700;
}

a {
  color: #fff;
  text-underline-offset: 0.3rem;
  transition:
    100ms text-underline-offset,
    300ms background-color;
}

a:hover,
a:focus {
  background-color: #fff3;
  text-underline-offset: 0.5rem;
}

a:active {
  background-color: #fff5;
}

li {
  margin-bottom: 1rem;
}

[hidden] {
  display: none !important;
}

.italics {
  font-style: italic;
}

#skip {
  position: absolute;
  z-index: 999;
  top: 0;
  left: 0;
  background-color: #00002ff0;
  color: #fff;
  padding: 1rem 2rem;
  border: 3px solid #fff7;
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 42px 0;
  font-size: 1.3rem;
  translate: 0 -100px;
}

#skip:focus {
  translate: 0 0;
}

#wrapper {
  max-width: 1900px;
  margin: 0 auto;
  padding: 3rem 5rem;

  display: grid;
  grid-template-rows: [header] auto [main] 1fr [footer] auto;

  @media (max-width: 1439px) {
    height: calc(100% - 7rem);
    padding: 1rem 1rem 6rem;
  }
}

#wrapper:fullscreen {
  height: 100%;
  overflow: scroll;
}

footer,
footer p {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  justify-content: space-between;
  align-items: center;

  @media (min-width: 1440px) {
    flex-direction: row;
    justify-content: right;
    gap: 1.6rem;
  }
}

footer {
  width: 100%;
  padding: 0.5rem 0 1rem;
  margin-top: 3rem;
  border-top: 1px solid #fff;

  @media (min-width: 1440px) and (min-height: 768px) {
    position: fixed;
    bottom: 0;
    left: 0;
    width: calc(100% - 10rem);
    height: 3rem;
    padding: 0 5rem 2rem;
    margin: 0;
    border: 0;
  }
}

footer p {
  min-height: 1rem;
  text-align: center;
  font-size: 1rem;
  margin: 0;

  @media (min-width: 1440px) and (min-height: 768px) {
    font-size: 1.3rem;
    height: 3rem;
  }
}

footer a {
  @media (min-width: 1440px) and (min-height: 768px) {
    padding: 0.5rem;
  }
}

footer img,
footer svg {
  @media (min-width: 1440px) and (min-height: 768px) {
    max-height: 5rem;
  }
}

main {
  min-height: 100%;
}

main:focus {
  outline: none;
}

/*
  If blur is applied to main or .content, the right part shrinks, weird.
  So instead I am blurring individual tags instead...
*/
main[inert] h1,
main[inert] h2,
main[inert] img,
main[inert] svg,
main[inert] li,
main[inert] figure,
main[inert] p,
main[inert] a {
  filter: blur(2px);
}

.page {
  opacity: 0;
  animation: appear 1000ms forwards;

  @media (prefers-reduced-motion: reduce) {
    animation: none;
    opacity: 1;
  }
}

.page.category {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 5rem;
}

.content {
  max-width: none;
}

.content:not(.full) {
  @media (min-width: 1440px) and (min-height: 768px) {
    max-width: 54vw;
  }
}

figure {
  text-align: center;
  font-size: 1.3rem;

  @media (max-width: 1439px) {
    font-size: 1rem;
  }
}

.illustration {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5vw;
  padding: 1rem 0 2rem;

  @media (min-width: 1440px) and (min-height: 768px) {
    gap: 10vw;
    padding: 0;
  }
}

.illustration img,
.illustration svg {
  position: relative;
  bottom: -5vh;
  transition: transform 500ms;
  animation: slide 500ms forwards;

  @media (prefers-reduced-motion: reduce) {
    animation: none;
  }
}

.illustration [data-pos] {
  text-align: center;

  @media (min-width: 1440px) and (min-height: 768px) {
    position: fixed;
    z-index: 1;
    right: 5rem;
    width: 30%;
  }
}

.illustration [data-pos] p {
  margin-top: 1rem;
  font-size: 1.3rem;
  text-align: center;
}

.illustration [data-pos] img,
.illustration [data-pos] svg {
  max-height: 10rem;
  max-width: 35vw;
}

.illustration [data-pos] img + img,
.illustration [data-pos] img + svg,
.illustration [data-pos] svg + img,
.illustration [data-pos] svg + svg {
  margin-left: 2rem;

  @media (min-width: 1440px) and (min-height: 768px) {
    margin-top: 2rem;
    margin-left: 0;
  }
}

.illustration [data-pos].controls img,
.illustration [data-pos].controls svg {
  vertical-align: middle;
  image-rendering: pixelated;

  @media (min-width: 1440px) and (min-height: 768px) {
    max-width: 35vw;
  }
}

.illustration [data-pos].screen img,
.illustration [data-pos].screen svg {
  width: 100%;
  max-height: 44vh;
  max-width: 80vw;
  image-rendering: pixelated;

  @media (min-width: 1440px) and (min-height: 768px) {
    max-width: 35vw;
  }
}

.illustration [data-pos="1"] {
  @media (min-width: 1440px) and (min-height: 768px) {
    top: 10vh;
  }
}
.illustration [data-pos="2"] {
  @media (min-width: 1440px) and (min-height: 768px) {
    top: 30vh;
  }
}
.illustration [data-pos="2.5"] {
  @media (min-width: 1440px) and (min-height: 768px) {
    top: 40vh;
  }
}
.illustration [data-pos="3"] {
  @media (min-width: 1440px) and (min-height: 768px) {
    top: 50vh;
  }
}
.illustration [data-pos="4"] {
  @media (min-width: 1440px) and (min-height: 768px) {
    top: 70vh;
  }
}

.box {
  display: inline-block;
  background: #00002ff0;
  color: #fff;
  padding: 1rem 2rem 1.3rem;
  margin: 3rem 0;
  border-radius: 32px;
  font-size: 1.1rem;
  text-shadow: none;

  @media (min-width: 1440px) and (min-height: 768px) {
    font-size: 1.3rem;
  }
}

.box p {
  margin-bottom: 1rem;
}

.box p + .illustration {
  @media (min-width: 1440px) and (min-height: 768px) {
    margin-top: 3rem;
  }
}

.box h2 {
  font-size: 3rem;
  margin-top: -2rem;
  margin-bottom: 0;
}

.box *:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
}

.desktop-only {
  @media (max-width: 1439px) {
    display: none;
  }
}

svg#throw-speed {
  background: #fff;
  border-radius: 21px;
  max-width: 30vw;
}

svg#throw-speed text {
  text-transform: uppercase;
}

svg#throw-speed g[id]:hover,
svg#throw-speed g[id]:focus {
  outline: none;
}
svg#throw-speed g[id]:hover text,
svg#throw-speed g[id]:focus text {
  font-weight: 700;
}

svg#throw-speed g[id]:hover path,
svg#throw-speed g[id]:focus path {
  stroke-width: 0.1rem;
}

@keyframes appear {
  to {
    opacity: 1;
  }
}

@keyframes slide {
  to {
    transform: translateY(-5vh);
  }
}
