:root {
  --border-radius: 0.25rem;

  --color-borders: hsl(212, 71%, 96%);
  --color-brand-primary: hsl(279, 42%, 42%);
  --color-brand-secondary: hsl(8, 86%, 70%);
  --color-brand-accent: hsl(37, 85%, 87%);

  --color-copy: hsl(215, 25%, 27%);
  --color-copy-light: hsl(213, 19%, 37%);

  --font-stack: "General Sans", -apple-system, BlinkMacSystemFont, avenir next,
    avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial,
    sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-size: 16px;
}
h1,
h2,
h3,
h4 {
  flex: 0 1 100%;
  margin: 1rem 0;
  font-size: clamp(
    var(--fluid-type-minimum, 1rem),
    calc(1rem + var(--fluid-type-preferred, 3vw)),
    var(--fluid-type-maximum, 1.5rem)
  );
}
h1 {
  --fluid-type-minimum: 2.5rem;
  --fluid-type-maximum: 3.5rem;
  --fluid-type-preferred: 3.5vw;
  line-height: 1.1;
  max-width: 32ch;
  font-weight: 600;
}
h2 {
  --fluid-type-minimum: 2rem;
  --fluid-type-maximum: 2.5rem;
  --fluid-type-preferred: 2vw;
  color: var(--color-brand-primary);
  max-width: 40ch;
  font-weight: 400;
}
h3 {
  --fluid-type-minimum: 1.25rem;
  --fluid-type-maximum: 1.5rem;
  --fluid-type-preferred: 1.5vw;
  max-width: 56ch;
  font-weight: 400;
}
h4 {
  --fluid-type-minimum: 1.125rem;
  --fluid-type-maximum: 1.25rem;
  --fluid-type-preferred: 1.25vw;
  max-width: 56ch;
  font-weight: 400;
}
h1 small,
h2 small {
  color: var(--color-brand-secondary);
  font-size: 0.64em;
  font-weight: 400;
  display: block;
  line-height: 1.2rem auto;
}
ul,
ol,
li {
  margin: 0;
  padding: 0;
  width: 100%;
}
li {
  margin: 0.5rem 1rem;
}
p {
  margin: 2rem auto;
  max-width: 64ch;
}
button {
  font: inherit;
}
img {
  display: block;
  max-height: 400px;
  margin: 2rem auto 4rem;
}
em {
  color: var(--color-brand-primary);
}
.arrow {
  min-height: 56px;
  max-height: 80px;
}
body {
  color: var(--color-copy);
  font-family: var(--font-stack);
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: optimizeSpeed;

  > header,
  > main,
  > footer {
    margin: 0 auto 1rem;
    max-width: 80rem;
    padding: 2rem;
  }

  > header,
  > footer {
    display: flex;
    align-items: center;

    svg {
      margin-right: 1rem;
    }
  }

  > header {
    justify-content: space-between;

    .call-to-action {
      margin: 0 0 0 auto;
    }
  }

  > main {
    article {
      > * {
        margin: 2rem auto;
        padding: 0;
      }

      > header {
        text-align: center;

        h1,
        h2,
        h3 {
          margin: 1rem auto;
        }
      }

      section {
        padding: 4rem 1rem;
        margin: 2rem auto;

        header {
          text-align: center;

          img {
            &.rotate {
              transform: rotate(90deg);
            }
          }
        }

        h2,
        h3,
        h4 {
          margin: 1rem auto;
        }

        h2 {
          small {
            color: var(--color-brand-secondary);
            display: block;
            font-weight: 400;
          }
        }

        &.grid {
          max-width: 1200px;
          margin: 2rem auto;

          & > div {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 2rem;

            p {
              font-size: 1.125rem;
              margin: 1rem 0;
              text-align: left;
              width: 100%;
            }

            img {
              max-width: 480px;
            }
          }
        }
      }

      img[alt="BOING"] {
        width: 80%;
        max-width: 640px;
      }
    }
  }

  > footer {
    border-top: 1px solid var(--color-brand-background);
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
#logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  max-width: 320px;

  svg {
    height: auto;

    &#mark {
      height: 56px;
      width: 56px;
    }

    &#word {
      height: 48px;
      width: 160px;
    }
  }

  em {
    font-style: normal;
  }
}
.call-to-action {
  button {
    background: var(--color-brand-secondary);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.25rem;
    font-weight: 500;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    margin: 2rem auto 1rem auto;

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    &:active {
      transform: translateY(0);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
  }
  small {
    display: block;
    text-align: center;
  }
}
@media (max-width: 767px) {
  body > header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  body > header .call-to-action {
    margin: 1rem auto 0;
  }
}
@media (min-width: 767px) {
  .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}
