/* 
 * Basic styles and resets
 */

:root {
  --fg-color: #303030;
  --bg-color: #f0f0f0;
  --hl-color: #ffffff;
}

html {
  font-size: min(3vw, 100%);
}

body {
  font-family: Courier, monospace;
  background-color: var(--bg-color);
  color: var(--fg-color);
  line-height: 1.33;
  margin: 0;
  padding: 0;
}

main {
  padding: 12vh 6vw;
  max-width: 80rem;
  margin: auto;
}

figure {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

p {
  max-width: 40rem;
}

h1 {
  border-bottom: 0.25rem solid;
}

figcaption {
  font-size: 0.75em;
}

a {
  color: var(--fg-color);
  text-decoration-thickness: 0.125rem;
  text-underline-offset: 0.25rem;
}
a:hover,
a:focus {
  text-decoration-thickness: 0.25rem;
}
a:active {
  text-underline-offset: 0.125rem;
}

button,
.button {
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  display: inline-block;
  background-color: transparent;
  color: var(--fg-color);
  text-decoration: none;
  border: 0.125rem solid var(--fg-color);
  box-shadow: 0 0.125rem var(--fg-color);
  padding: 0.5em 1em;
  cursor: pointer;
}
button:hover,
.button:hover {
  background-color: var(--hl-color);
}
button:active,
.button:active {
  box-shadow: none;
  transform: translateY(0.125rem);
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: var(--fg-color);
  background-color: var(--hl-color);
  border: 0.125rem solid var(--fg-color);
  padding: 1rem;
  box-sizing: border-box;
  width: 100%;
}

/* Slide animation */
@media screen and (prefers-reduced-motion: no-preference) {
  .slide-up,
  main > * {
    opacity: 1;
    transform: translate(0, 0);
    transition-property: opacity, transform;
    transition-duration: 0.75s;
    transition-timing-function: ease-in-out;
    transition-delay: 1s;

    @starting-style {
      opacity: 0;
      transform: translate(0, 20px);
    }
  }
  h1 {
    transition-delay: 0.1s;
  }
  section.delay {
    transition-delay: 3s;
  }
}
