@font-face {
  font-family: "Finger Paint";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/finger-paint-latin-400.woff2") format("woff2");
}

:root {
  --font-display: "Finger Paint", cursive;
  --orange-top: #ff7400;
  --orange-bottom: #fc3e00;
  --divider: 2px solid white;
}

/* ---------- Reset ---------- */

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

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

body {
  color: white;
  background: black;
}

h1,
p {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

ul {
  list-style: none;
}

img,
svg {
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Button ---------- */

.button {
  display: block;
  padding: 0.5rem 2.5rem;
  border-radius: 0.375rem;
  background: white;
  color: black;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.75rem;
  text-align: center;
  transition: transform 200ms ease-in-out;
}

.button:hover {
  transform: scale(1.05);
  text-decoration: underline;
}

/* ---------- Above the fold ---------- */

.fold {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: calc(100vh - 8rem);
  min-height: 40rem;
  max-height: 60rem;
  border-bottom: var(--divider);
  background: linear-gradient(to bottom, var(--orange-top), var(--orange-bottom));
  color: black;
}

/* See https://projects.verou.me/css3patterns/ */
.fold__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.fold__pattern {
  position: fixed;
  inset: 0;
  opacity: 0.1;
  background:
    linear-gradient(45deg, #92baac 45px, transparent 45px) 64px 64px,
    linear-gradient(
      45deg,
      #92baac 45px,
      transparent 45px,
      transparent 91px,
      #e1ebbd 91px,
      #e1ebbd 135px,
      transparent 135px
    ),
    linear-gradient(
      -45deg,
      #92baac 23px,
      transparent 23px,
      transparent 68px,
      #92baac 68px,
      #92baac 113px,
      transparent 113px,
      transparent 158px,
      #92baac 158px
    );
  background-color: #e1ebbd;
  background-size: 128px 128px;
}

.fold__inner {
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 42rem;
}

.fold__titles {
  padding: 2.5rem 1rem 0;
  text-align: center;
  font-family: var(--font-display);
}

.title {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.tagline {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.fold__stage {
  position: relative;
  z-index: 20;
  flex: 1;
  display: flex;
  justify-content: center;
}

.fold__buttons {
  position: relative;
  z-index: 30;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.fold__row {
  display: flex;
  align-items: center;
}

.fold__row--end {
  justify-content: flex-end;
}

.fold__image {
  position: absolute;
  z-index: 20;
  bottom: -2.5rem;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Callout ---------- */

.callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 3rem;
  border-bottom: var(--divider);
  background: linear-gradient(rgb(3 164 82 / 23%), rgb(4 143 63 / 62%));
}

.callout__button {
  position: relative;
  z-index: 30;
  width: 100%;
  max-width: 24rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.callout__button + .callout__button {
  margin-top: 1.5rem;
}

/* ---------- Follow ---------- */

.follow {
  position: relative;
  z-index: 30;
}

.follow__list {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 2.5rem;
}

.follow__list a {
  display: block;
  padding: 0.5rem;
  transition: transform 200ms ease-in-out;
}

.follow__list a:hover {
  transform: scale(1.05);
}

.follow__list svg {
  width: 2.5rem;
  height: 2.5rem;
  fill: white;
}

@media (min-width: 768px) {
  .title {
    font-size: 3.75rem;
    line-height: 1;
  }

  .tagline {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .follow__list {
    padding-block: 4rem;
  }

  .follow__list a {
    padding: 1rem;
  }
}

/* ---------- Letter animations (see the script in index.html) ---------- */

.animated {
  display: inline-block;
}

.animated__word {
  white-space: nowrap;
}

.animated__letter {
  display: inline-block;
}

.animated--scale {
  animation: pulse 5s 3s infinite alternate;
}

.animated__letter--rotate {
  padding-bottom: 0.2em;
  animation: spin 10s ease calc(1s * var(--order, 1)) infinite;
}

.animated__letter--ripple {
  animation: ripple 5s ease calc(5s * var(--order, 1)) infinite;
}

.animated__letter--topple {
  animation: topple 10s ease-in-out 1s infinite;
}

@keyframes pulse {
  0%,
  10%,
  100% {
    transform: scale(1);
  }
  5% {
    transform: scale(1.01);
  }
}

@keyframes spin {
  0%,
  25% {
    transform: rotate(0deg);
  }
  50%,
  100% {
    transform: rotate(1080deg);
  }
}

@keyframes ripple {
  0%,
  10%,
  100% {
    transform: translateY(0);
  }
  5% {
    transform: translateY(-0.05em);
  }
}

@keyframes topple {
  0%,
  3%,
  6%,
  9%,
  32% {
    transform: rotate(0deg) translateY(0);
  }
  1%,
  4%,
  7% {
    transform: rotate(15deg) translateY(0);
  }
  2%,
  5%,
  8% {
    transform: rotate(-15deg) translateY(0);
  }
  12%,
  30% {
    transform: rotate(90deg) translateY(-0.1em) translateX(0.5em);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
