/* The page is a desktop: a calm wallpaper (the one in the Store pictures) with black dot panels on it. */
:root {
  --sky: #e8e4da;
  --sea: #93a9bf;
  --ink: #14151a;
  --panel: #0a0a0b;
  --cream: #fff1da;
  --edge: rgba(255, 255, 255, .16);
  --lift: 0 6px 18px rgba(0, 0, 0, .4);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --sky: #232a38; --sea: #10131b; --ink: #f1eadc; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--sea); }
html, body { overflow-x: clip; }
body {
  min-height: 100vh;
  color: var(--ink);
  font: 400 1.125rem/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(155deg, var(--sky), var(--sea));
}

/* Pip's layer. It only takes the mouse while the cursor is on something of his. */
#cv { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; z-index: 10; pointer-events: none; touch-action: none; }
.unseen, .said { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#kb { left: 0; top: 0; }
#kb:focus, #kb button:focus { outline: none; }

main { width: min(100% - 2.5rem, 62rem); margin: 0 auto; }

.hero {
  min-height: min(92vh, 52rem);
  padding: 8.5rem 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
h1, h2 { width: 100%; line-height: 0; }
h1 canvas, h2 canvas { display: inline-block; max-width: 100%; pointer-events: none; }
h1 { margin-bottom: 2rem; }
.lead { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem); font-weight: 600; line-height: 1.35; max-width: 30ch; text-wrap: balance; }
.aside { margin-top: .9rem; max-width: 46ch; text-wrap: balance; }
.status { margin-top: 2.25rem; font-size: 1rem; max-width: 52ch; text-wrap: balance; }

/* Buttons are drawn as the app draws them: 4px dots, 11 dots tall. */
.keys { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero .keys { justify-content: center; margin-top: 2rem; }
.key {
  border: 0;
  background: var(--panel);
  border-radius: 10px;
  padding: 4px;
  line-height: 0;
  cursor: pointer;
  box-shadow: var(--lift);
  font: inherit;
}
.key canvas { display: block; }
.key:active { transform: translateY(2px); box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
.key:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.scene { display: flex; flex-direction: column; align-items: center; gap: 2.25rem; padding: 4.5rem 0; }
.island { display: block; height: auto; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .35)); }
.island.wide { width: min(100%, 35rem); }
.island.pill { width: min(100%, 25rem); }
.island.tall { width: 6.5rem; flex: none; }
.words { width: min(100%, 35rem); }
.words h2 { margin-bottom: 1rem; }
.beside { flex-direction: row; justify-content: center; align-items: center; gap: 3rem; }
.beside .words { width: min(100%, 31rem); }

.panel {
  margin: 4rem auto;
  max-width: 44rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 30px;
  border: 1px solid var(--edge);
  color: var(--cream);
  /* the unlit dots of the screen */
  background: radial-gradient(circle, rgba(255, 255, 255, .055) 1.3px, transparent 1.6px) 0 0 / 8px 8px, var(--panel);
  box-shadow: var(--lift);
}
.panel h2 { margin-bottom: 1.5rem; }
.panel p + p { margin-top: 1rem; }
.panel .key { box-shadow: none; padding: 0; }
.panel .key:focus-visible { outline-color: var(--cream); }

.tricks > div { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem 1.5rem; padding: .8rem 0; border-top: 1px solid var(--edge); }
.tricks dt { font-weight: 600; }
.tricks dd { color: #c9bfae; }
kbd { font: inherit; font-size: .9em; border: 1px solid var(--edge); border-radius: 6px; padding: 0 .35em; }

footer { padding: 2rem 1.25rem 4rem; text-align: center; font-size: .95rem; }
footer p { max-width: 52ch; margin: 0 auto; text-wrap: balance; }

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .hero { padding-top: 6.5rem; min-height: 0; }
  .scene { padding: 3rem 0; gap: 1.75rem; }
  .beside { flex-direction: column; gap: 1.75rem; }
  .tricks > div { grid-template-columns: 1fr; }
}
