@font-face {
  font-family: "Sora";
  src: url("/fonts/sora.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/* Clacky: glass keycaps lit from below. */
:root {
  --night: #07061a;
  --night-2: #0c0a26;
  --text: #f2f0ff;
  --muted: #aaa6d8;
  --line: rgba(255, 255, 255, .09);
  --glass: rgba(255, 255, 255, .055);
  --cyan: #2fe6ff;
  --violet: #7b5cff;
  --pink: #ff4fd8;
  --rgb: linear-gradient(90deg, var(--cyan), var(--violet) 52%, var(--pink));
  --button: linear-gradient(135deg, #6a48ff, #9a3cff);   /* white text: 5.4:1 */

  --font: "Sora", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --u: 2.7rem; /* one key unit */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  color: var(--text); background: var(--night);
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  padding: 1.25rem var(--gutter) clamp(3.5rem, 8vw, 6.5rem);
  background:
    radial-gradient(60rem 30rem at 18% -10%, rgba(123, 92, 255, .32), transparent 70%),
    radial-gradient(36rem 22rem at 92% 70%, rgba(255, 79, 216, .11), transparent 70%),
    var(--night);
}
.bar { display: flex; align-items: center; justify-content: space-between; max-width: 72rem; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; text-decoration: none; }
.brand img { width: 40px; height: 40px; margin: -4px 0; }
.bar-links { display: flex; gap: 1.75rem; font-size: .95rem; color: var(--muted); }
.bar-links a { text-decoration: none; }
.bar-links a:hover { color: var(--text); }

.hero-grid {
  max-width: 72rem; margin: clamp(3rem, 7vw, 5.5rem) auto 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
h1 {
  font-weight: 700; font-size: clamp(2.7rem, 5.6vw, 4.6rem); line-height: 1.04; letter-spacing: -.045em;
  margin: 0 0 1.4rem; max-width: 12ch; text-wrap: balance;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 33rem; margin: 0 0 2.2rem; }
.fine { font-size: .9rem; color: var(--muted); margin: 1.4rem 0 0; max-width: 30rem; }

.actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.cap {
  display: inline-flex; align-items: center; text-decoration: none;
  font-weight: 600; font-size: 1rem; letter-spacing: -.01em;
  padding: .95rem 1.45rem; border-radius: 14px;
  transition: transform 60ms ease-out, box-shadow 160ms ease-out, background-color 160ms;
}
.cap:active { transform: translateY(2px); }
.cap-primary { background: var(--button); color: #fff; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
.cap-primary:hover { filter: brightness(1.08); }
.cap-glass { background: var(--glass); color: var(--text); border: 1px solid rgba(255, 255, 255, .16); }
.cap-glass:hover { background: rgba(255, 255, 255, .09); }

/* ---------- The playable keyboard ---------- */

.board { display: grid; justify-items: center; gap: 1.2rem; }
.case {
  position: relative; isolation: isolate;
  padding: calc(var(--u) * .32); border-radius: 22px;
  display: grid; gap: calc(var(--u) * .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 30px 60px -30px rgba(0, 0, 0, .8);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
/* The same light spill as the logo: brightens a little with every key. */
.case::after {
  content: ""; position: absolute; z-index: -1; left: 4%; right: 4%; bottom: -40px; height: 80px;
  background: var(--rgb); filter: blur(38px); opacity: .7; border-radius: 50%;
  transition: opacity 420ms ease-out;
}
.case.pulse::after { opacity: 1; transition-duration: 40ms; }

.row { display: flex; gap: calc(var(--u) * .12); }
.indent-1 { padding-left: calc(var(--u) * .3); }
.indent-2 { padding-left: calc(var(--u) * .8); }
.indent-3 { padding-left: calc(var(--u) * 2.3); }

.key {
  --glow: var(--violet);
  width: var(--u); height: var(--u); margin: 0 0 3px; padding: 0;
  border-radius: calc(var(--u) * .2); border: 1px solid rgba(255, 255, 255, .13);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  box-shadow: 0 3px 0 rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .14);
  color: #e7e4ff; font: 500 calc(var(--u) * .3) var(--font);
  cursor: pointer;
  /* fades out after release, like reactive keyboard lighting */
  transition: transform 40ms ease-out, background 520ms ease-out, box-shadow 520ms ease-out, border-color 520ms ease-out, color 520ms;
}
.key.wide { width: calc(var(--u) * 1.5); }
.key.space { width: calc(var(--u) * 5.2); }
.key.accent { background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .07)); }

.key.on, .key:active {
  transform: translateY(2px);
  border-color: color-mix(in srgb, var(--glow) 70%, white);
  background: color-mix(in srgb, var(--glow) 34%, rgba(255, 255, 255, .06));
  box-shadow: 0 1px 0 rgba(0, 0, 0, .55), 0 0 22px -2px var(--glow), inset 0 0 14px color-mix(in srgb, var(--glow) 60%, transparent);
  color: #fff;
  transition-duration: 30ms;
}
.key.near {
  border-color: color-mix(in srgb, var(--glow) 40%, rgba(255, 255, 255, .13));
  box-shadow: 0 3px 0 rgba(0, 0, 0, .55), 0 0 14px -4px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition-duration: 90ms;
}

.switches { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.switch {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 500 .9rem var(--font); color: var(--muted);
  background: var(--glass); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px;
  padding: .55rem 1rem .55rem .75rem; cursor: pointer;
}
.switch:hover { color: var(--text); border-color: rgba(255, 255, 255, .24); }
.switch[aria-pressed="true"] { color: var(--text); border-color: var(--violet); background: rgba(123, 92, 255, .16); }
.stem {
  width: .9rem; height: .9rem;
  clip-path: polygon(35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%, 0 35%, 35% 35%);
}
.switch-kind { color: var(--muted); font-weight: 400; }
.stem-brown { background: #a8714c; }
.stem-blue { background: #3f7dff; }
.stem-cream { background: #efe2c6; }
.hint { margin: 0; font-size: .9rem; color: var(--muted); text-align: center; min-height: 1.6em; }

/* ---------- Sections ---------- */

main { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 40%, var(--night) 100%); }
main section {
  max-width: calc(72rem + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter) 0;
}
h2 { font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.12; letter-spacing: -.035em; margin: 0 0 1rem; max-width: 22ch; text-wrap: balance; }
h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.4; margin: 0 0 .45rem; letter-spacing: -.01em; }
.section-lede { color: var(--muted); margin: 0 0 2.2rem; max-width: 38rem; }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2.5rem 3.5rem; margin-top: 2.75rem;
}
.feature-grid > div { border-top: 1px solid var(--line); padding-top: 1.3rem; }
.feature-grid p { margin: 0; color: var(--muted); max-width: 34rem; }

table { width: 100%; max-width: 46rem; border-collapse: collapse; margin-bottom: 2.4rem; }
th, td { text-align: left; padding: .85rem .8rem; border-bottom: 1px solid var(--line); }
thead th { font-weight: 600; }
tbody th, tfoot th { font-weight: 400; color: var(--muted); }
td { width: 7.5rem; white-space: nowrap; }
td:last-child, thead th:last-child { background: rgba(123, 92, 255, .09); }
thead th:last-child { border-radius: 10px 10px 0 0; color: #c9bcff; }
tfoot th, tfoot td { font-weight: 600; color: var(--text); border-bottom: 0; }
tfoot td:last-child { border-radius: 0 0 10px 10px; }

.included { list-style: none; padding: 0; margin: 0 0 2.4rem; max-width: 40rem; }
.included li { padding: .7rem 0 .7rem 2rem; border-bottom: 1px solid var(--line); position: relative; }
.included li::before {
  content: ""; position: absolute; left: .2rem; top: 1.15rem; width: .8rem; height: .8rem; border-radius: 3px;
  background: var(--rgb);
}

.faq { padding-bottom: clamp(3.5rem, 8vw, 6rem); }
details { max-width: 46rem; border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 1.15rem 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--violet); font-weight: 400; font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 1.3rem; color: var(--muted); }

.foot { background: #05040f; border-top: 1px solid var(--line); color: var(--muted); padding: 2.5rem var(--gutter); font-size: .9rem; }
.foot p { max-width: 72rem; margin: 0 auto .6rem; }
.foot a { color: var(--text); }
.foot-links { display: flex; gap: 1.5rem; padding-top: .6rem; }

/* ---------- Text pages (privacy, terms) ---------- */

.doc-bar { padding: 1.25rem var(--gutter); border-bottom: 1px solid var(--line); }
.doc { max-width: 44rem; margin: 0 auto; padding: 3rem clamp(1.25rem, 4vw, 2rem) 5rem; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: none; }
.doc h2 { font-size: 1.3rem; margin-top: 2.5rem; }
.doc p, .doc li { color: var(--muted); }
.doc a { color: var(--text); }
.doc .updated { font-size: .9rem; }

/* ---------- Small screens ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .board { justify-self: stretch; }
  :root { --u: min(2.9rem, calc((100vw - 2 * var(--gutter)) / 13.4)); }
}
@media (max-width: 560px) {
  .bar-links { display: none; }
  td { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .key, .cap, .case::after { transition: none; }
}

/* Press page */
.doc .actions { margin-top: 1.75rem; }
.listen { display: grid; gap: 1rem; }
.listen figure { margin: 0; }
.listen figcaption { color: var(--text); font-weight: 600; margin-bottom: .4rem; }
.listen audio { width: 100%; }
.shots { display: grid; gap: 1.25rem; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.shots figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }
.facts { display: grid; grid-template-columns: 9rem 1fr; gap: .65rem 1.25rem; margin: 0; }
.facts dt { color: var(--text); font-weight: 600; }
.facts dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; gap: .2rem; }
  .facts dd { margin-bottom: .8rem; }
}
.shots img.shot-panel { width: auto; max-width: min(100%, 366px); border: 0; border-radius: 0; }
.doc video.demo { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #000; }
