/* Fast Sound Library - fastsoundlibrary.com
   Dark instrument panel, IBM Plex superfamily, hairline rules.
   Hand written. No framework, no build step. */

/* ---------------------------------------------------------------- tokens */

:root {
  --bg:        #08090b;
  --bg-1:      #0a0c0f;
  --panel:     #0f1418;
  --panel-2:   #131a20;

  --line:      rgba(255, 255, 255, .075);
  --line-2:    rgba(255, 255, 255, .13);
  --line-3:    rgba(255, 255, 255, .22);

  --fg:        #e9eef2;
  --fg-1:      #c2ced7;
  --fg-2:      #94a2ac;
  --fg-3:      #6a7780;
  --fg-4:      #4a555d;

  --accent:    #35c9e2;
  --accent-2:  #7fe3f2;
  --accent-bg: rgba(53, 201, 226, .1);
  --amber:     #f0a63c;
  --pink:      #ff2f96;
  --violet:    #a03cff;

  --font-sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "IBM Plex Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  --shell:   1180px;
  --gutter:  clamp(20px, 4.2vw, 52px);
  --rule:    1px solid var(--line);

  --ease:    cubic-bezier(.16, 1, .3, 1);
  --spring:  cubic-bezier(.22, 1.06, .32, 1);

  --header-h: 57px;
}

/* ------------------------------------------------------------------ base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background: var(--bg);
}

body {
  margin: 0;
  background: transparent;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(53, 201, 226, .26); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

main, .site-footer { position: relative; z-index: 1; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #05262c;
  font: 500 13px/1 var(--font-mono);
}
.skip:focus { left: 12px; top: 12px; }

/* ------------------------------------------------------------ light show */

/* A slow wash of light across the floor of the viewport. Drawn small and
   scaled up, so the blur costs little and the motion stays soft. */
.lightshow {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 48vh;
  min-height: 280px;
  z-index: 0;
  pointer-events: none;
  filter: blur(18px);
  opacity: .62;
}

/* ---------------------------------------------------------- type helpers */

.label {
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.lede {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.35vw, 20.5px);
  line-height: 1.62;
  color: var(--fg-1);
  letter-spacing: -.004em;
}

/* ---------------------------------------------------------------- header */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--pink), var(--violet) 45%, var(--accent));
  will-change: transform;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: var(--rule);
  background: rgba(8, 9, 11, .78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.header-in {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--fg);
  font: 500 12.5px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand:hover { color: var(--fg); }
.brand img { width: 24px; height: 24px; border-radius: 5px; }
.brand span { padding-top: 1px; }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--fg);
  font: 500 12.5px/1 var(--font-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  background: transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.btn:hover { color: var(--fg); border-color: var(--line-3); background: rgba(255, 255, 255, .04); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #04222a;
  height: 46px;
  padding: 0 24px;
  font-size: 13px;
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #04222a; }

.btn-ghost { height: 46px; padding: 0 22px; color: var(--fg-1); }

.header-cta { height: 34px; padding: 0 14px; font-size: 11.5px; }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  padding: clamp(52px, 7vw, 96px) 0 clamp(40px, 5vw, 66px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -340px;
  width: 1400px;
  height: 780px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 50%, rgba(53, 201, 226, .08), transparent 62%);
  pointer-events: none;
}
.hero > * { position: relative; }

.hero-copy { max-width: 830px; }

.hero h1 {
  font-size: clamp(40px, 6.2vw, 74px);
  line-height: 1.0;
  letter-spacing: -.035em;
  margin: 20px 0 0;
}
.hero h1 .sub {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--fg-3);
  margin-top: 20px;
}
.hero .lede { margin-top: 28px; max-width: 68ch; }
.hero-note { margin-top: 18px; max-width: 70ch; color: var(--fg-2); font-size: 15.5px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 38px;
}
.hero-actions .fine {
  font: 400 12.5px/1.5 var(--font-mono);
  color: var(--fg-3);
  letter-spacing: .02em;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  border-top: var(--rule);
  border-bottom: var(--rule);
  margin-top: clamp(40px, 5.5vw, 64px);
}
.facts div {
  padding: 20px 22px 20px 0;
  border-right: var(--rule);
}
.facts div:last-child { border-right: 0; padding-right: 0; }
.facts dt {
  font: 500 10.5px/1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.facts dd {
  margin: 7px 0 0;
  color: var(--fg);
  font-size: 15px;
  letter-spacing: -.01em;
}

/* ------------------------------------------------------------ hero signal */

.signal {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 46px;
  margin: clamp(38px, 5vw, 58px) 0 16px;
  opacity: .9;
}
.signal span {
  flex: 1 1 auto;
  height: 100%;
  transform: scaleY(0);
  background: linear-gradient(180deg, rgba(53, 201, 226, .35), var(--accent) 50%, rgba(53, 201, 226, .35));
  border-radius: .5px;
}

/* ------------------------------------------------------------------ tabs */

.tabs-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 45;
  border-top: var(--rule);
  border-bottom: var(--rule);
  background: rgba(8, 9, 11, .84);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* the strip is a navigation band, so it may run wider than the text column */
.tabs-bar .shell { max-width: 1340px; }

.tabs-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.tabs-scroll::-webkit-scrollbar { display: none; }

/* an end fades only when something is actually scrolled off it */
.tabs-scroll.fade-l.fade-r {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}
.tabs-scroll.fade-l:not(.fade-r) {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 100%);
}
.tabs-scroll.fade-r:not(.fade-l) {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}

.tabs {
  position: relative;
  display: flex;
  gap: 0;
  width: max-content;
  min-width: 100%;
}

.tab {
  position: relative;
  padding: 16px 13px 15px;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.tab:first-child { padding-left: 0; }
.tab:hover { color: var(--fg-1); }
.tab[aria-selected="true"] { color: var(--fg); }

.tab-ink {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(53, 201, 226, .6);
  transform: translateX(0);
  transition:
    transform .46s var(--spring),
    width .58s cubic-bezier(.3, .78, .2, 1);
  pointer-events: none;
}
.no-js .tab-ink { display: none; }

/* ---------------------------------------------------------------- panels */

.panels {
  position: relative;
  padding: clamp(38px, 5vw, 62px) 0 clamp(52px, 7vw, 92px);
  overflow: hidden;
}
.panels-inner { position: relative; }

.js .panels-inner { transition: height .5s var(--ease); }

.panel { position: relative; }
.js .panel { display: none; }
.js .panel.on { display: block; }

.js .panel.on::before {
  content: "";
  position: absolute;
  top: calc(clamp(38px, 5vw, 62px) * -0.5);
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: wipe .8s var(--ease) both;
  pointer-events: none;
}

@keyframes wipe {
  0%   { opacity: 0; transform: translateX(calc(var(--dir, 1) * -55%)) scaleX(.3); }
  30%  { opacity: .85; }
  100% { opacity: 0; transform: translateX(calc(var(--dir, 1) * 55%)) scaleX(1); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translate3d(calc(var(--dir, 1) * 32px), 12px, 0); }
  to   { opacity: 1; transform: none; }
}

@keyframes panelOut {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translate3d(calc(var(--dir, 1) * -24px), 0, 0); }
}

.js .panel.leaving {
  display: block;
  animation: panelOut .16s cubic-bezier(.4, 0, 1, 1) both;
}

.js .panel.on.kinetic > .chapter-grid > div > * {
  animation: panelIn .6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 32ms);
}

/* --------------------------------------------------------------- figures */

figure { margin: 0; }

.fig { margin: clamp(28px, 4vw, 44px) 0 0; }

.fig-frame {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  overflow: hidden;
  background: var(--panel);
}
.js .fig-frame { clip-path: inset(0 0 100% 0); }
.fig-frame img { width: 100%; }
.js .fig-frame img {
  transform: scale(1.035);
  opacity: 0;
}
.reveal .fig-frame {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.05s var(--ease);
}
.reveal .fig-frame img {
  opacity: 1;
  transform: none;
  transition: transform 1.4s var(--ease), opacity .5s linear;
}

figcaption {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  font: 400 12.5px/1.6 var(--font-mono);
  color: var(--fg-3);
  letter-spacing: .01em;
}
figcaption b {
  flex: none;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 11px;
  padding-top: 2px;
}
figcaption span { max-width: 80ch; }

.fig-pair {
  display: grid;
  gap: clamp(20px, 2.6vw, 30px);
  grid-template-columns: 1fr;
}
@media (min-width: 780px) { .fig-pair { grid-template-columns: 1fr 1fr; } }

.fig-sm { max-width: 420px; }

/* ----------------------------------------------------------- application */

.apps {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: var(--rule);
  margin-top: clamp(26px, 3.4vw, 38px);
}
@media (min-width: 820px) { .apps { grid-template-columns: 1fr 1fr; } }

.app-card {
  background: rgba(10, 12, 15, .72);
  padding: clamp(24px, 3vw, 34px);
}

.app-card .kind {
  font: 500 10.5px/1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.app-card > p { margin-top: 14px; color: var(--fg-2); font-size: 15.5px; }
.app-card ul { margin-top: 22px; border-top: var(--rule); }
.app-card li {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: var(--rule);
  font-size: 14.5px;
  color: var(--fg-1);
}
.app-card li em {
  flex: none;
  width: 88px;
  font: 500 10.5px/1.85 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-style: normal;
}

/* ---------------------------------------------------------- panel layout */

.chapter-grid {
  display: grid;
  gap: clamp(22px, 3vw, 36px);
  grid-template-columns: 1fr;
}
@media (min-width: 940px) {
  .chapter-grid { grid-template-columns: 210px minmax(0, 1fr); gap: clamp(32px, 4vw, 70px); }
}

.chapter-aside .num {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .16em;
  color: var(--accent);
  margin: 0;
}
.chapter-aside .note {
  margin: 18px 0 0;
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.58;
  color: var(--fg-3);
  font-style: italic;
}
.chapter-aside .facts-mini { margin-top: 22px; border-top: var(--rule); }
.chapter-aside .facts-mini li {
  padding: 9px 0;
  border-bottom: var(--rule);
  font: 400 12px/1.5 var(--font-mono);
  color: var(--fg-2);
}

.chapter-body { min-width: 0; }
.chapter-body h2 {
  font-size: clamp(26px, 3.2vw, 39px);
  line-height: 1.1;
  letter-spacing: -.028em;
}
.chapter-body > p { max-width: 70ch; color: var(--fg-2); margin-top: 18px; }
.chapter-body > p.first { margin-top: 22px; color: var(--fg-1); font-size: 17px; }

.chapter-body h3 {
  font-size: 12.5px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 40px 0 0;
}

/* the card headings are product names, so they stay in the sans face even
   though every other h3 inside a panel body is a mono section label */
.chapter-body .app-card h3 {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  text-transform: none;
  color: var(--fg);
  margin: 10px 0 0;
}

/* detail lists */

.detail {
  margin-top: 16px;
  border-top: var(--rule);
  max-width: 74ch;
}
.detail li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px 20px;
  padding: 13px 0;
  border-bottom: var(--rule);
}
@media (min-width: 660px) {
  .detail li { grid-template-columns: 208px minmax(0, 1fr); gap: 0 26px; }
}
.detail .k {
  color: var(--fg);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -.008em;
}
.detail .v {
  margin: 0;
  color: var(--fg-2);
  font-size: 14.5px;
  line-height: 1.6;
}

/* tables */

.table-wrap { overflow-x: auto; margin-top: 20px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th {
  text-align: left;
  font: 500 10.5px/1.4 var(--font-mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0 22px 10px 0;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
td {
  padding: 11px 22px 11px 0;
  border-bottom: var(--rule);
  color: var(--fg-1);
  vertical-align: top;
}
td:last-child, th:last-child { padding-right: 0; }
tbody tr:hover td { color: var(--fg); background: rgba(255, 255, 255, .017); }
td.k { color: var(--fg); white-space: nowrap; }
td.n { font-family: var(--font-mono); font-size: 13px; color: var(--fg-2); }

code, .code {
  font: 400 13px/1.5 var(--font-mono);
  color: var(--accent-2);
  background: var(--accent-bg);
  padding: 1.5px 6px;
  border-radius: 2px;
  white-space: nowrap;
}
kbd {
  display: inline-block;
  font: 500 12px/1.5 var(--font-mono);
  color: var(--fg);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-bottom-color: rgba(0, 0, 0, .55);
  border-radius: 3px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* ------------------------------------------------------------- callout */

.callout {
  margin-top: 34px;
  padding: 22px 24px;
  background: var(--panel);
  border: var(--rule);
  border-left: 2px solid var(--accent);
  border-radius: 2px;
  max-width: 74ch;
}
.callout p { font-size: 14.5px; color: var(--fg-2); }
.callout strong { color: var(--fg); font-weight: 500; }

.footnote {
  margin-top: 14px;
  font: 400 12.5px/1.65 var(--font-mono);
  color: var(--fg-4);
  max-width: 84ch;
}

/* ------------------------------------------------------- diagram: search */

.demo {
  margin-top: clamp(26px, 3.4vw, 38px);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: var(--panel);
  overflow: hidden;
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: var(--rule);
  background: var(--panel-2);
  font: 400 13.5px/1 var(--font-mono);
}
.demo-bar .q { color: var(--fg); white-space: nowrap; overflow: hidden; }
.demo-bar .caret {
  width: 7px;
  height: 15px;
  background: var(--accent);
  flex: none;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.demo-bar .icon { color: var(--fg-3); flex: none; display: block; }
.demo-bar .count {
  margin-left: auto;
  color: var(--fg-3);
  font-size: 12px;
  white-space: nowrap;
  flex: none;
}
.demo-bar .count b { color: var(--accent); font-weight: 500; font-variant-numeric: tabular-nums; }

.demo-rows { padding: 4px 0; }
.demo-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 58px;
  gap: 12px;
  align-items: center;
  padding: 7px 16px;
  font: 400 12.5px/1.4 var(--font-mono);
  color: var(--fg-2);
  height: 32px;
  overflow: hidden;
  transition: opacity .45s var(--ease), height .5s var(--ease), padding .5s var(--ease), filter .45s var(--ease);
}
.demo-rows li .nm { color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-rows li[data-out="1"] {
  opacity: 0;
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
  filter: blur(2px);
}

/* ------------------------------------------------------ diagram: audition */

.demo-audition { padding: 20px 16px 16px; }
.demo-audition svg { width: 100%; height: auto; display: block; }

.demo-keys {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: var(--rule);
  flex-wrap: wrap;
  align-items: center;
}
.demo-keys kbd { transition: color .25s linear, background-color .25s linear, border-color .25s linear; }
.demo-keys kbd.hit { color: #04222a; background: var(--accent); border-color: var(--accent); }
.demo-keys em {
  font: 400 12px/1.5 var(--font-mono);
  color: var(--fg-3);
  font-style: normal;
  margin-left: 6px;
}

/* ----------------------------------------------------- diagram: spectral */

.demo-spectral { padding: 18px 16px 14px; }
.demo-spectral svg { width: 100%; height: auto; display: block; }
.demo-steps {
  display: flex;
  gap: 26px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: var(--rule);
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--fg-4);
}
.demo-steps span { transition: color .3s linear; }
.demo-steps span.on { color: var(--accent); }

/* -------------------------------------------------------------- closing */

.closing {
  border-top: var(--rule);
  padding: clamp(64px, 8vw, 108px) 0;
}
.closing h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.12;
  max-width: 24ch;
}
.closing p { margin-top: 22px; max-width: 68ch; color: var(--fg-2); }
.closing .hero-actions { margin-top: 34px; }

/* --------------------------------------------------------------- footer */

.site-footer {
  border-top: var(--rule);
  padding: 44px 0 58px;
  background: rgba(8, 9, 11, .55);
}
.footer-in {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 44px;
  align-items: baseline;
  justify-content: space-between;
}
.footer-in p, .footer-in a {
  font: 400 12.5px/1.7 var(--font-mono);
  letter-spacing: .02em;
}
.footer-in p { color: var(--fg-4); margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-links a { color: var(--fg-2); }
.footer-links a:hover { color: var(--accent); }

/* --------------------------------------------------------------- motion */

.js .rise {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity .75s var(--ease) var(--d, 0ms),
    transform .85s var(--ease) var(--d, 0ms);
}
.rise.reveal { opacity: 1; transform: none; }

.word { display: inline-block; }
.js .word {
  opacity: 0;
  transform: translateY(.42em);
  transition:
    opacity .6s var(--ease) var(--d, 0ms),
    transform .78s var(--ease) var(--d, 0ms);
}
.reveal .word { opacity: 1; transform: none; }

/* ------------------------------------------------------------- 404 page */

.center-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 80px 0;
  text-align: center;
}
.center-page h1 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -.035em; }
.center-page p { margin-top: 20px; color: var(--fg-2); max-width: 58ch; margin-left: auto; margin-right: auto; }
.center-page .btn { margin-top: 30px; }

/* ---------------------------------------------------------- policy page */

.policy { padding: clamp(48px, 6vw, 84px) 0 clamp(60px, 8vw, 100px); }
.policy-grid { display: grid; gap: clamp(30px, 4vw, 64px); grid-template-columns: 1fr; }
@media (min-width: 960px) { .policy-grid { grid-template-columns: 214px minmax(0, 1fr); } }

.policy-head { max-width: 76ch; margin-bottom: clamp(34px, 4vw, 52px); }
.policy-head h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; margin: 14px 0 0; }
.policy-head p { margin-top: 18px; color: var(--fg-2); }

.policy-nav { align-self: start; }
@media (min-width: 960px) { .policy-nav { position: sticky; top: calc(var(--header-h) + 32px); } }
.policy-nav ol { margin-top: 14px; border-top: var(--rule); counter-reset: pn; }
.policy-nav li { border-bottom: var(--rule); counter-increment: pn; }
.policy-nav a {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  color: var(--fg-2);
  font-size: 13.5px;
}
.policy-nav a::before {
  content: counter(pn, decimal-leading-zero);
  font: 500 10.5px/1.9 var(--font-mono);
  color: var(--fg-4);
  letter-spacing: .08em;
}
.policy-nav a:hover { color: var(--accent); }

.policy-body section { padding-top: clamp(34px, 4vw, 50px); }
.policy-body section:first-child { padding-top: 0; }
.policy-body h2 {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.2;
  margin: 12px 0 16px;
}
.policy-body h3 {
  font-size: 12.5px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 32px 0 12px;
}
.policy-body p, .policy-body li { color: var(--fg-2); font-size: 15.5px; max-width: 74ch; }
.policy-body .bullets { margin: 0 0 1.05em; }
.policy-body .bullets li {
  padding: 9px 0 9px 20px;
  border-bottom: var(--rule);
  position: relative;
}
.policy-body .bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 18px;
  width: 6px;
  height: 1px;
  background: var(--fg-4);
}
.policy-body .bullets li strong { color: var(--fg); font-weight: 500; }
.policy-body .num {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .16em;
  color: var(--accent);
  margin: 0;
}

.contact-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: var(--rule);
  margin-top: 20px;
}
@media (min-width: 620px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-grid a { display: block; padding: 20px 22px; background: rgba(10, 12, 15, .72); }
.contact-grid a span {
  display: block;
  font: 500 10.5px/1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.contact-grid a strong { display: block; margin-top: 8px; color: var(--fg); font-weight: 500; font-size: 15px; }
.contact-grid a:hover strong { color: var(--accent); }

/* --------------------------------------------------------------- narrow */

@media (max-width: 939px) {
  /* the margin notes lead the section on narrow screens; the mini fact list
     repeats what the body already says, so it stands down */
  .chapter-aside .facts-mini { display: none; }
  .chapter-aside .note { margin-top: 12px; }
}

@media (max-width: 560px) {
  .demo-rows li { grid-template-columns: minmax(0, 1fr) 52px; }
  .demo-rows li span:nth-child(2) { display: none; }
  .demo-bar { font-size: 12px; gap: 8px; }
  .demo-bar .count { font-size: 11px; }
  figcaption { flex-direction: column; gap: 6px; }
  .lightshow { height: 38vh; min-height: 220px; }
}

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise, .js .word { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .fig-frame { clip-path: none !important; transition: none !important; }
  .js .fig-frame img { opacity: 1 !important; transform: none !important; transition: none !important; }
  .signal span { transition: none !important; }
  .demo-bar .caret { animation: none; }
  .js .panels-inner { transition: none !important; }
  .js .panel.on::before { display: none; }
  .js .panel.on.kinetic > .chapter-grid > div > * { animation: none !important; }
  .js .panel.leaving { display: none !important; animation: none !important; }
  .tab-ink { transition: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
