@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/EBGaramond-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/EBGaramond-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

* {
  padding: 0;
  margin: 0;
  list-style-type: none;
  box-sizing: border-box;
}

html {
  font-family: EB Garamond, serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: rgb(26, 26, 26);
}

body {
  padding: 4rem;
  font-size: 24px;
  line-height: 1.33;
}

h1, h2, h3, h4, h5 {
  font-size: inherit;
  font-weight: inherit;
}

h1 {
  font-size: 24px;
  font-variant-caps: small-caps;
  font-feature-settings: "smcp" 1;

  &.sc {
    font-variant-caps: all-small-caps;
    font-feature-settings: "smcp" 1, "c2sc" 1;
  }
}

@media (width <= 48rem) {
  body {
    padding: 2rem;
    font-size: 20px;
  }

  h1 {
    font-size: 20px;
  }
}

a {
  color: inherit;
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.2s ease;

  &:hover {
    opacity: 0.4;
  }
}

button {
  outline: none;
  border: none;
  border-radius: 0;
  background-color: rgba(0,0,0,0.05);
  padding: 2px 4px;
  cursor: pointer;
  font-size: inherit;
}

.swatch {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.5em;
  vertical-align: baseline;
}

nav {
  margin-top: 2rem;
  display: flex;
  gap: 0.5rem;
}

nav .swatch {
  margin-right: 0;
}

nav a.current {
  opacity: 0;
}

div {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  /* width: 100%; */
  max-width: 26rem;
  font-size: 16px;
  line-height: 1.5;
  padding: 1rem;
  background-color: rgba(0,0,0,0.05);

  p {
    text-wrap: balance;
  }

  a {
    text-decoration: underline;
  }
}

article {
  margin: 2rem 0;

  p {
    line-height: 1.5;
  }

  .line {
    display: block;
    padding-left: 1.5em;
    text-indent: -1.5em;
  }
}

footer {
  margin-top: 2rem;

  p {
    font-size: 14px;
    letter-spacing: 0.02em;
    opacity: 0.4;
  }
}

ul {
  li {
    margin-bottom: 0.5rem;
  }
}

@media (width <= 48rem) {
  nav {
    justify-content: space-between;

    .swatch {
      width: 0.8em;
      height: 0.8em;
    }
  }

  div {
    width: 100%;
  }
}