/* Kneedeck's site: the app's instrument panel, its placards and its lamps (green = running, amber = the
   one thing to do, cyan = a link), and the paper of its tablet for the long texts. */

@font-face {
  font-family: "Barlow";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Barlow";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Barlow";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-condensed-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "B612 Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/b612-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  --desk: #191c1e;
  --well: #24282a;
  --panel: #3a3f42;
  --panel-raised: #464c50;
  --rule: #555b5f;
  --placard: #ebe8df;
  --placard-dim: #a3a7a2;
  --green: #57d98a;
  --amber: #ffb21a;
  --cyan: #46c1e0;
  --paper: #f8f8f3;
  --paper-rule: #c9d6dc;
  --ink: #1b1f22;
  --fallback: "Segoe UI", system-ui, sans-serif;
  --font-placard: "Barlow Condensed", var(--fallback);
  --font-text: "Barlow", var(--fallback);
  --font-data: "B612 Mono", Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--desk);
  color: var(--placard);
  font: 17px/1.55 var(--font-text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

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

.placard,
h1,
h2,
h3 {
  font-family: var(--font-placard);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

/* The top bar, like the app's title bar. */
.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--desk) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #0008;
}

.bar .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--placard);
  text-decoration: none;
  font: 700 22px/1 var(--font-placard);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand img {
  width: 30px;
  height: 30px;
}

.bar nav {
  display: flex;
  align-items: center;
  gap: 4px 18px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bar nav a {
  color: var(--placard-dim);
  text-decoration: none;
  font: 600 15px/1 var(--font-placard);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bar nav a:hover {
  color: var(--placard);
}

.bar nav .lang {
  padding: 5px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

/* The hero: the pitch on the panel, the tablet itself beside it. */
.hero {
  background: radial-gradient(120% 90% at 85% 10%, #2c3134 0%, var(--desk) 60%);
  border-bottom: 1px solid #0008;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 40px;
  padding-block: 64px 72px;
}

.free {
  margin: 0 0 14px;
  color: var(--green);
  font: 600 15px/1 var(--font-placard);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 6.4vw, 76px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.03em;
}

h1 em {
  font-style: normal;
  color: var(--amber);
}

.lead {
  max-width: 34em;
  margin: 22px 0 0;
  color: #d7d4cb;
  font-size: 19px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 30px;
}

.button {
  display: inline-block;
  padding: 14px 24px;
  border: 1px solid #0008;
  border-radius: 6px;
  background: var(--panel-raised);
  color: var(--placard);
  font: 700 18px/1 var(--font-placard);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: inset 0 1px 0 #ffffff1a, 0 2px 0 #0008;
}

.button.primary {
  background: var(--amber);
  color: #241a00;
  box-shadow: inset 0 1px 0 #fff6, 0 2px 0 #7a5400, 0 0 24px #ffb21a33;
}

.button.primary:hover {
  background: #ffc34d;
}

/* Not there yet: an amber lamp, waiting, as in the app. */
.button.soon {
  border-color: #ffb21a88;
  background: transparent;
  color: var(--amber);
  box-shadow: none;
  cursor: default;
}

.note {
  color: var(--placard-dim);
  font-size: 14px;
}

/* The lamps of the app's top bar: each lights up in turn, like a panel coming to life. */
.lights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.lights li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #0009;
  border-radius: 5px;
  background: linear-gradient(#41474a, #33383b);
  box-shadow: inset 0 1px 0 #ffffff12;
  font: 600 13px/1 var(--font-placard);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--placard-dim);
}

.lights li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: light-up 0.5s ease-out both;
}

.lights li:nth-child(2)::before {
  animation-delay: 0.25s;
}
.lights li:nth-child(3)::before {
  animation-delay: 0.5s;
}
.lights li:nth-child(4)::before {
  animation-delay: 0.75s;
}
.lights li:nth-child(5)::before {
  animation-delay: 1s;
}
.lights li:nth-child(6)::before {
  animation-delay: 1.25s;
}
.lights li:nth-child(7)::before {
  animation-delay: 1.5s;
}

/* What comes next: an amber lamp, waiting, as in the app. */
.lights li.soon {
  color: var(--amber);
}

.lights li.soon::before {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.features li.coming {
  border-color: #ffb21a55;
  background: linear-gradient(#3f4142, var(--panel));
}

.features li.coming h3::before {
  background: var(--amber);
}

@keyframes light-up {
  from {
    background: #2b3033;
    box-shadow: none;
  }
}

/* The tablet, tilted a little, as it sits on a knee. */
.tablet {
  margin: 0;
  justify-self: center;
  max-width: 440px;
  transform: rotate(2deg);
  filter: drop-shadow(0 30px 40px #000c);
}

.tablet img {
  display: block;
  border-radius: 14px;
}

/* Sections. */
.section {
  padding-block: 72px;
  border-bottom: 1px solid #0008;
}

.section.alt {
  background: var(--well);
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  line-height: 1;
}

.intro {
  max-width: 44em;
  margin: 0 0 36px;
  color: var(--placard-dim);
}

/* A single sentence: on one line, as long as the screen allows. */
.intro.line {
  max-width: none;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  padding: 18px 18px 20px;
  border: 1px solid #0007;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 #ffffff12;
}

h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h3::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

.features p {
  margin: 0;
  color: #cfccc3;
  font-size: 16px;
}

/* Screenshots, each on its own board. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 380px));
  justify-content: center;
  gap: 32px 56px;
  align-items: start;
}

.shots figure {
  margin: 0;
}

.shots img {
  display: block;
  border-radius: 12px;
  box-shadow: 0 18px 30px #0009;
}

figcaption {
  margin-top: 14px;
  color: var(--placard-dim);
  font-size: 15px;
}

figcaption b {
  display: block;
  color: var(--placard);
  font: 700 16px/1.2 var(--font-placard);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Support: the amounts as the app shows them. */
.support {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.support .card {
  padding: 22px 22px 18px;
  border: 1px solid #0007;
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  background: var(--well);
}

.amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.amount {
  padding: 10px 14px;
  border: 1px solid #0008;
  border-radius: 5px;
  background: var(--panel-raised);
  color: var(--placard-dim);
  font: 600 16px/1 var(--font-placard);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.soon {
  margin: 0 0 12px;
  color: var(--amber);
  font-weight: 600;
}

.small {
  margin: 0;
  color: var(--placard-dim);
  font-size: 14px;
}

.data {
  font-family: var(--font-data);
  font-size: 0.92em;
}

/* Long texts: the legal pages, on the tablet's paper. */
.paper {
  width: min(820px, 100% - 32px);
  margin: 48px auto 72px;
  padding: clamp(24px, 5vw, 56px);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 50px #000a;
}

.paper h1 {
  font-size: clamp(32px, 5vw, 46px);
  color: var(--ink);
}

.paper h2 {
  margin: 34px 0 8px;
  font-size: 22px;
  color: var(--ink);
}

.paper p,
.paper li {
  color: #2a2f33;
}

.paper a {
  color: #0d6f8a;
}

/* The licence page: the key, and the button that copies it. */
.paper .key {
  padding: 14px 16px;
  border: 1px solid #d3d1c7;
  border-radius: 6px;
  background: #f1efe8;
  font: 14px/1.5 var(--font-data);
  overflow-wrap: anywhere;
  user-select: all;
}

button.button {
  cursor: pointer;
}

.paper .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.paper .status {
  min-height: 1.5em;
  color: #2e7a4f;
  font-weight: 600;
}

.paper .updated {
  margin: 10px 0 26px;
  color: #6b7175;
  font: 13px var(--font-data);
}

/* What the page puts forward: the supporter licence offered to module writers. */
.paper .gift {
  margin: 16px 0 8px;
  padding: 12px 16px;
  border-left: 4px solid var(--amber);
  background: #ffb21a26;
  color: var(--ink);
  font-weight: 600;
}

/* The pages for module writers: code, and tables of what each part holds. */
.paper code {
  font: 0.92em Consolas, "Cascadia Mono", monospace;
  overflow-wrap: anywhere;
}

.paper pre {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid #d3d1c7;
  border-radius: 6px;
  background: #f1efe8;
  overflow-x: auto;
}

.paper pre code {
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: normal;
}

.paper table {
  width: 100%;
  margin: 12px 0 16px;
  border-collapse: collapse;
  font-size: 15px;
}

.paper th,
.paper td {
  padding: 8px 10px;
  border-bottom: 1px solid #d3d1c7;
  text-align: left;
  vertical-align: top;
  color: #2a2f33;
}

.paper th {
  font-size: 13px;
  color: #6b7175;
}


/* The account page: signing in on a sheet clipped to the paper, one step at a time; then three tabs. */
.account [hidden] {
  display: none !important;
}

.account .button {
  padding: 10px 16px;
  font-size: 15px;
}

.account button.text {
  padding: 0;
  border: 0;
  background: none;
  color: #0d6f8a;
  font: 15px var(--font-text);
  text-decoration: underline;
  cursor: pointer;
}

.account .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 32px;
  align-items: start;
}

.account .fiche {
  position: relative;
  margin-top: 10px;
  padding: 26px 20px 14px;
  border: 1px solid #d3d1c7;
  border-radius: 6px;
  background: #fff;
}

/* The clip that holds the sheet, as on Kneedeck's tablet. */
.account .fiche::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 96px;
  height: 18px;
  transform: translateX(-50%);
  border: 1px solid #6b7175;
  border-radius: 6px;
  background: linear-gradient(#b4b8bb, #8a8f92);
}

.account .step {
  margin: 0 0 8px;
  color: #6b7175;
  font: 13px Consolas, "Cascadia Mono", monospace;
}

.account label {
  display: block;
  margin-bottom: 6px;
  color: #2a2f33;
}

.account input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #b4b2a9;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 16px var(--font-text);
}

.account .digits {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.account .digits input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: 48px;
  height: 52px;
  padding: 0;
  text-align: center;
  background: #f8f8f3;
  font: 600 24px Consolas, "Cascadia Mono", monospace;
}

.account .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 22px 0 18px;
  border-bottom: 1px solid #c9d6dc;
}

.account .tabs button {
  padding: 0 0 8px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: #6b7175;
  font: 600 17px var(--font-placard);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.account .tabs button[aria-selected="true"] {
  border-bottom-color: var(--amber);
  color: var(--ink);
}

.account .licence {
  margin: 0 0 20px;
}

.account .licence .title {
  margin: 0 0 2px;
  font: 600 18px var(--font-placard);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.account .lamp {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: 1px;
}

.account .lamp.active {
  background: #2e8b57;
}

.account .lamp.waiting {
  background: var(--amber);
}

.account .lamp.off {
  background: #b4b2a9;
}

.account .dim {
  margin: 0 0 8px;
  color: #6b7175;
}

.account .langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

.account .langs span {
  margin-right: 6px;
}

.account .langs button {
  padding: 6px 12px;
  border: 1px solid #b4b2a9;
  border-radius: 5px;
  background: #fff;
  color: #2a2f33;
  font: 15px var(--font-text);
  cursor: pointer;
}

.account .langs button[aria-pressed="true"] {
  border-color: var(--amber);
  background: #ffb21a33;
  color: var(--ink);
  font-weight: 600;
}

.account .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 9px 0;
  border-top: 1px solid #c9d6dc;
}

.account .row span {
  font: 14px Consolas, "Cascadia Mono", monospace;
}

/* The footer. */
footer {
  padding-block: 36px 48px;
  color: var(--placard-dim);
  font-size: 14px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

footer a {
  color: var(--placard-dim);
}

footer a:hover {
  color: var(--placard);
}

@media (max-width: 860px) {
  .hero .wrap,
  .support {
    grid-template-columns: 1fr;
  }

  .tablet {
    max-width: 360px;
    transform: none;
  }

  .bar nav .hide-small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .lights li::before {
    animation: none;
  }
}
