@font-face {
  font-family: "Fira Code";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./assets/fonts/fira-code-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fira Code";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./assets/fonts/fira-code-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./assets/fonts/karla-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./assets/fonts/karla-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-background: #1c1c1c;
  --color-primary-rgb: 128 184 255;
  --color-primary: #80b8ff;
  --color-text: #ffffff;
  --color-text-muted: #d9d9d9;
  --font-heading: "Fira Code", monospace;
  --font-body: "Karla", sans-serif;
  --content-width: 1248px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 4px;
  background-color: var(--color-primary);
  color: var(--color-background);
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding-inline: 24px;
  border: 1px solid var(--color-text);
  border-radius: 100px;
  overflow: hidden;
  font-size: 18px;
  line-height: 22px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 100ms ease-out, color 100ms ease-out;
}

.button__text {
  color: inherit;
  transition: transform 100ms ease-out;
}

.button__text--clone {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translate(0, -50%);
}

.button:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transition-duration: 1s;
}

.button:hover:not(:disabled) .button__text:not(.button__text--clone) {
  animation: button-text-exit 1s ease-out forwards;
}

.button:hover:not(:disabled) .button__text--clone {
  animation: button-text-loop 3s ease-out 1s infinite;
}

@keyframes button-text-exit {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-200%);
  }
}

@keyframes button-text-loop {
  from {
    left: 100%;
    transform: translate(0, -50%);
  }

  to {
    left: 0;
    transform: translate(-100%, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .button {
    transition-duration: 100ms !important;
  }

  .button:hover:not(:disabled) {
    transition-duration: 1s !important;
  }

  .button:hover:not(:disabled) .button__text:not(.button__text--clone) {
    animation: button-text-exit 1s ease-out forwards !important;
  }

  .button:hover:not(:disabled) .button__text--clone {
    animation: button-text-loop 3s ease-out 1s infinite !important;
  }
}
