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

:root {
  font-size: 12px;
  --color-text: #191613;
  --color-bg: #f5f1ea;
  --color-link: #191613;
  --color-link-hover: #191613;
  --page-padding: 1.5rem;
}

body {
  margin: 0;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-family: ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
}

body {
  margin: 0;
}

@media (scripting: enabled) {
  .loading {
    &::before,
    &::after {
      content: '';
      position: fixed;
      z-index: 10000;
    }

    &::before {
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: var(--color-bg);
    }

    &::after {
      top: 50%;
      left: 50%;
      width: 100px;
      height: 1px;
      margin: 0 0 0 -50px;
      background: var(--color-link);
      animation: loaderAnim 1.5s ease-in-out infinite alternate forwards;
    }
  }
}

@keyframes loaderAnim {
  0% {
    transform: scaleX(0);
    transform-origin: 0% 50%;
  }

  50% {
    transform: scaleX(1);
    transform-origin: 0% 50%;
  }

  50.1% {
    transform: scaleX(1);
    transform-origin: 100% 50%;
  }

  100% {
    transform: scaleX(0);
    transform-origin: 100% 50%;
  }
}

a {
  text-decoration: none;
  color: var(--color-link);
  outline: none;
  cursor: pointer;

  &:hover {
    text-decoration: underline;
    color: var(--color-link-hover);
  }

  &:focus {
    outline: none;
    background: lightgrey;

    &:not(:focus-visible) {
      background: transparent;
    }

    &:focus-visible {
      outline: 2px solid red;
      background: transparent;
    }
  }
}

.frame {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 22px 34px;
  pointer-events: none;

  .frame__title {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 24px;
    letter-spacing: 0.34em;
    margin: 0;
    pointer-events: auto;
  }

  .frame__links {
    display: flex;
    gap: 24px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8d8477;
    pointer-events: auto;

    span { cursor: pointer; transition: color 0.25s ease; }
    span:hover { color: var(--color-text); }
  }

  .frame__hint {
    font-size: 11px;
    color: #a89e8f;
    letter-spacing: 0.04em;
    margin: 0;
  }

  @media (max-width: 700px) {
    .frame__links, .frame__hint { display: none; }
  }
}

.credit {
  position: fixed;
  left: 34px;
  bottom: 20px;
  z-index: 1000;
  font-size: 10.5px;
  color: #a89e8f;
  pointer-events: auto;

  a { color: #8d8477; }
}

.content {
  padding: var(--page-padding);
  display: flex;
  flex-direction: column;
  width: 100vw;
  position: relative;

  @media screen and (min-width: 53em) {
    min-height: 100vh;
    justify-content: center;
    align-items: center;
  }
}
