/* Băng cassette — the page, its inks and the transport keys.
   Three inks printed flat on paper: a cobalt J-card field, black, and the
   red of the REC light. Unbounded for the printed caps, Shantell Sans for
   everything written on the label by hand. */

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/unbounded-vietnamese.woff2") format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/unbounded-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/unbounded-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Shantell Sans";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/shantell-sans-vietnamese.woff2") format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Shantell Sans";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/shantell-sans-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Shantell Sans";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/shantell-sans-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --cobalt: #2438e8;
  --ink: #131313;
  --paper: #f7f6f2;
  --red: #ff3b2f;
  --print: "Unbounded", "Arial Narrow", sans-serif;
  --hand: "Shantell Sans", "Comic Sans MS", cursive;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --unfold: 900ms;
  --gutter: 12px;
  color-scheme: light;
  scrollbar-color: var(--ink) var(--cobalt);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: clip;
  background: var(--cobalt);
  color: var(--paper);
  font-family: var(--print);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.45;
  caret-color: var(--red);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}

p,
h1,
figure {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* svg inks */
.f-ink {
  fill: var(--ink);
}
.f-paper {
  fill: var(--paper);
}
.f-cobalt {
  fill: var(--cobalt);
}
.f-red {
  fill: var(--red);
}
.s-ink {
  stroke: var(--ink);
}
.s-paper {
  stroke: var(--paper);
}
.s-cobalt {
  stroke: var(--cobalt);
}

/* ---------- transport keys ---------- */
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 44px;
  min-height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font: 800 17px / 1 var(--print);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 120ms var(--ease-out),
    background-color 120ms var(--ease-out);
}
.key:active,
.key.is-down {
  transform: translateY(3px);
}
@media (hover: hover) {
  .key:hover {
    background: #000;
  }
}
.key-icon {
  width: 18px;
  height: 18px;
  flex: none;
}
.key-note {
  font: 700 13px / 1.15 var(--print);
  letter-spacing: 0;
  text-transform: none;
}
.rec-dot {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  background: var(--red);
}
.key[aria-pressed="true"] .rec-dot,
.key--rec.is-live .rec-dot {
  animation: rec-blink 1s steps(2, jump-none) infinite;
}
@keyframes rec-blink {
  50% {
    opacity: 0.25;
  }
}

/* ---------- the docked deck ---------- */
.dock {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(calc(100% - 2 * var(--gutter)), 440px);
  padding: 8px;
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 0 10px 28px rgb(10 14 60 / 0.35);
  transform: translate(-50%, calc(100% + 24px));
  visibility: hidden;
  transition:
    transform 500ms var(--ease-out),
    visibility 0s linear 500ms;
}
body.is-docked .dock {
  transform: translate(-50%, 0);
  visibility: visible;
  transition:
    transform 500ms var(--ease-out),
    visibility 0s;
}
.dock-side {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: 900 12px / 1 var(--print);
}
.dock-window {
  width: 96px;
  height: 32px;
  flex: none;
  margin-left: 4px;
}
.dock .key {
  min-height: 48px;
  background: #262626;
}
.dock .key--rec {
  flex: 1;
  justify-content: flex-start;
  padding: 0 14px;
}
.dock .key--rec .key-note {
  font-size: 13px;
  white-space: nowrap;
}
.key--icon {
  width: 48px;
  padding: 0;
}
.key--icon .icon-pause,
.key--icon[aria-pressed="true"] .icon-play {
  display: none;
}
.key--icon[aria-pressed="true"] .icon-pause {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
  .key[aria-pressed="true"] .rec-dot,
  .key--rec.is-live .rec-dot {
    animation: none;
  }
}
