/* Your pixel typeface, used for the letters and contact pills. To use it
   elsewhere on the site, put  font-family: "DMTO Pixel";  on any text. */
@font-face {
  font-family: "DMTO Pixel";
  src: url("../fonts/DMTOPixel.woff2") format("woff2"),
       url("../fonts/DMTOPixel.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* The playground Contact page (layouts/playground.njk). The physics canvas
   fills the whole window, under the see-through header. */

.page-playground {
  overflow: hidden; /* the page itself never scrolls */
}

.cp {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.cp__canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none; /* dragging a shape must not scroll the page */
}

/* Small intro text, tucked under the header on the left. It sits above the
   canvas but lets every click through. */
.cp__intro {
  position: absolute;
  left: calc(var(--page-inset) + 2rem);
  top: 6.5rem;
  max-width: 22rem;
  font-size: 1.0625rem;
  line-height: 1.2;
  color: var(--color-ink-soft);
  pointer-events: none;
}

.cp__intro p {
  margin: 0 0 1em;
}

.cp__hint {
  position: absolute;
  right: calc(var(--page-inset) + 2rem);
  top: 6.5rem;
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-ink-soft);
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.cp__hint.is-off {
  opacity: 0;
}

.cp__toast {
  position: absolute;
  left: 50%;
  top: 6.5rem;
  transform: translate(-50%, -0.5rem);
  margin: 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: 0.9375rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cp__toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* The plain links. Without JavaScript they are the page; with it they are
   hidden from view but still reachable by keyboard and screen reader, and
   appear when focused. */
.cp__links {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
  font-size: 1.5rem;
  line-height: 1.6;
}

.cp-js .cp__links {
  top: auto;
  bottom: 3.5rem;
  font-size: 1rem;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.cp-js .cp__links:focus-within {
  clip-path: none;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
  border-radius: 0.75rem;
  z-index: 2;
}

@media (max-width: 640px) {
  .cp__hint {
    left: var(--page-inset);
    right: auto;
    top: 11rem;
    font-size: 0.8125rem;
  }

  .cp__intro {
    left: var(--page-inset);
    top: 5rem;
    max-width: 16rem;
    font-size: 0.9375rem;
  }
}


/* ---- The playground at the bottom of every page ---------------------------
   The playground is fixed to the bottom of the window, behind the page. The
   page sits on a white sheet; the empty space after it (.reveal-space) lets
   you scroll on and uncover the playground. --pg-h is how tall the
   playground is; the rest of the window stays showing the end of the page.
   Use a bigger number (up to 100) for a taller playground. */

:root {
  --pg-h: 75vh;
  --pg-h: 75svh;
}

.page-shell--over {
  position: relative;
  z-index: 1;
  background: var(--color-paper, #fff);
  /* A soft shadow along the bottom edge of the page, where it lifts away from
     the playground. Make the numbers bigger or the 0.xx darker for more. */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 14px 28px -10px rgba(0, 0, 0, 0.22);
}

.reveal-space {
  height: var(--pg-h);
  pointer-events: none; /* clicks fall through to the playground below */
}

.cp.cp--reveal {
  inset: auto 0 0 0;
  height: var(--pg-h);
  z-index: 0;
}

/* On touch screens the page must still scroll when you swipe over empty
   space; the script stops scrolling only when a swipe starts on an object. */
.cp--reveal .cp__canvas {
  touch-action: pan-y;
  /* leaves room under the playground for the footer */
  height: calc(100% - var(--footer-h));
}

:root {
  --footer-h: 3.75rem;
}

.cp__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-h);
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  background: var(--color-paper, #fff);
}

.cp__footer .wrap {
  flex: 1;
  align-items: center;
}
