:root {
  --color-bg: #c0cbdc;
  --color-fg: #262b44;
  --color-module: #5a6988;
  --color-blockquote-bg: #8b9bb4;
  --color-blockquote-border: #5a6988;
  --color-border: #8b9bb4;
  --color-link: #3a4466;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #262b44;
    --color-fg: #c0cbdc;
    --color-blockquote-bg: #3a4466;
    --color-blockquote-border: #5a6988;
    --color-border: #3a4466;
    --color-link: #c0cbdc;
  }
}

body {
  font-family: system-ui, sans-serif;
  font-weight: normal;
  font-size: 1.5rem;
  margin-bottom: 5rem;
  background: var(--color-bg);
  color: var(--color-fg);
}

a {
  color: var(--color-link);
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

header h1 {
  margin-bottom: 0;
}

header p {
  margin-top: 0;
}

main {
  margin: 3%;
  max-width: 900px;
  margin: 0 auto;
}

.module {
  background: var(--color-module);
  border: 1px solid var(--color-border);
  margin: 3% auto;
  max-width: 900px;
}

.module > h2 {
  padding: 1rem;
  margin: 0 0 0.5rem 0;
}

.module > p {
  padding: 0 1rem;
}

.stripes {
  position: relative;
  height: 400px;
  background: var(--color-module);
  overflow: hidden;
}

.stripes-bg {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    black,
    black 10px,
    white 10px,
    white 20px
  );
}

.rect-wrapper {
  position: absolute;
  display: table;
  width: 100%;
  height: 30px;
}

.rect-wrapper-yellow {
  top: 60px;
}

.rect-wrapper-blue {
  top: 260px;
}

.rect-innerwrapper {
  display: table-cell;
  vertical-align: middle;
}

.rect {
  position: relative;
  width: 60px;
  height: 30px;
  animation: backandforth 20s linear 0s infinite;
}

.rect-yellow {
  background: yellow;
}

.rect-blue {
  background: blue;
}

#opacity-slider {
  width: 300px;
}

@media (prefers-reduced-motion: reduce) {
  .rect {
    animation-play-state: paused;
  }
}

@keyframes backandforth {
  0% {
    left: 0;
  }
  50% {
    left: calc(100% - 60px);
  }
  100% {
    left: 0;
  }
}

blockquote {
  background: var(--color-blockquote-bg);
  border-left: 10px solid var(--color-blockquote-border);
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  quotes: "\201C" "\201D" "\2018" "\2019";
}
