/* keybe.com: black and white, square, ruled. The public identity of keybe, the same as the
   keybe app's: a pixel shield with a keyhole, heavy uppercase headings, monospace labels,
   2px rules between sections. No accent colour; red only says no. System fonts only. */
:root {
  --bg: #ffffff;
  --fg: #000000;
  --surface: #f3f3f3;
  --soft: #4d4d4d;
  --faint: #8a8a8a;
  --hair: #d2d2d2;
  --bad: #c81e1e;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --fg: #ffffff;
    --surface: #0d0d0d;
    --soft: #b3b3b3;
    --faint: #7d7d7d;
    --hair: #333333;
    --bad: #ff6161;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --fg: #ffffff;
  --surface: #0d0d0d;
  --soft: #b3b3b3;
  --faint: #7d7d7d;
  --hair: #333333;
  --bad: #ff6161;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* A section scrolled to sits right under the header: its rule hides under the header's, never doubled */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 70px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Type */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; margin: 0; line-height: 1.02; }
h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); letter-spacing: -0.03em; line-height: 1; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
h3 { font-size: 1.05rem; letter-spacing: 0.01em; line-height: 1.2; }
p { margin: 0; }
.tag {
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--soft); max-width: 640px; }
.soft { color: var(--soft); }
code, .mono { font-family: var(--mono); font-size: 0.88em; }

/* The mark: keybe's K, in the text colour (black on white, white on black) */
.mark { width: 21px; height: 23px; fill: var(--fg); flex-shrink: 0; }

/* Buttons: square, ruled; the main one filled with the text colour */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font: 800 14px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--fg); color: var(--bg); }
.btn.fill { background: var(--fg); color: var(--bg); }
.btn.fill:hover, .btn.fill:focus-visible { background: var(--bg); color: var(--fg); }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }

/* Header */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 2px solid var(--fg);
}
.bar-inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 26px; letter-spacing: -0.05em; text-decoration: none; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { font: 700 13px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; padding: 6px 0; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.bar .btn { min-height: 40px; padding: 0 16px; font-size: 13px; white-space: nowrap; }
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--fg); background: transparent; color: var(--fg); cursor: pointer;
  font: 700 12px/1 var(--mono);
}
.icon-btn:hover { background: var(--fg); color: var(--bg); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.menu-toggle { display: none; }

/* Sections, ruled */
section { border-bottom: 2px solid var(--fg); }
.block { padding: clamp(72px, 11vw, 140px) 0; }
.hero { padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 8vw, 96px); }
.hero h1 { margin-bottom: 28px; }
.hero .lead { margin-bottom: 40px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .facts-row {
  display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 56px; padding-top: 22px;
  border-top: 1px solid var(--hair);
  font: 600 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft);
}
.hero .facts-row span::before { content: "■ "; color: var(--fg); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 96px); align-items: center; }
.split.phone-right { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.split.phone-left { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.split h2 { margin-bottom: 26px; }
.split .lead { margin-bottom: 30px; }

.facts { list-style: none; margin: 0 0 30px; padding: 0; border-top: 1px solid var(--hair); }
.facts li { padding: 14px 0 14px 30px; border-bottom: 1px solid var(--hair); position: relative; }
.facts li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 10px; height: 10px; background: var(--fg); }

.code {
  margin: 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 2px solid var(--fg);
  font: 13.5px/1.6 var(--mono);
  overflow-x: auto;
  white-space: pre;
}
.code .c { color: var(--faint); }

/* Screenshots: framed by a rule, never rounded */
.shot { margin: 0; border: 2px solid var(--fg); background: var(--surface); }
.shot img { width: 100%; }
.phone { margin: 0 auto; width: min(320px, 100%); border: 2px solid var(--fg); background: #000; }
figcaption { font: 600 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft);
  padding: 10px 12px; border-top: 2px solid var(--fg); background: var(--bg); }
.only-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: block; } :root:not([data-theme="light"]) .only-light { display: none; } }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }

/* Levels table */
.levels-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 44px; }
.levels-head h2 { max-width: 640px; }
.table-wrap { overflow-x: auto; border: 2px solid var(--fg); }
table { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--hair); border-left: 1px solid var(--hair); }
th:first-child, td:first-child { border-left: 0; }
tr:last-child td { border-bottom: 0; }
thead th { font: 800 13px/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid var(--fg); background: var(--surface); }
tbody th { font: 600 12px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); width: 190px; }
.never { color: var(--bad); font-weight: 700; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; border-top: 2px solid var(--fg); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 64px 1fr; gap: 6px 18px; padding: 22px 0; border-bottom: 1px solid var(--hair); }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font: 800 30px/1 var(--mono); }
.steps h3 { margin-top: 2px; }
.steps p { color: var(--soft); }

/* What keybe keeps */
.keeps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--fg); border-left: 2px solid var(--fg); margin-top: 48px; }
.keeps div { padding: 26px 24px 30px; border-right: 2px solid var(--fg); border-bottom: 2px solid var(--fg); }
.keeps h3 { margin-bottom: 12px; }
.keeps p { color: var(--soft); font-size: 15.5px; }
.keeps .not h3::after { content: " · not yet"; color: var(--bad); }
.more { margin-top: 30px; font: 700 13px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }

/* Plans: one sentence and the way to strims.com, where the prices are */
.plans-lead { margin-top: 26px; max-width: 760px; }

/* Closing call */
.cta { text-align: left; }
.cta h2 { max-width: 900px; margin-bottom: 26px; }

/* Long pages: security, privacy */
.page { padding: clamp(64px, 9vw, 110px) 0 clamp(72px, 10vw, 120px); }
.page h1 { margin-bottom: 24px; }
.page .lead { margin-bottom: 56px; }
.doc { max-width: 760px; }
.doc h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 56px 0 18px; padding-top: 22px; border-top: 2px solid var(--fg); }
.doc h3 { margin: 28px 0 8px; }
.doc p, .doc li { color: var(--soft); }
.doc p + p { margin-top: 14px; }
.doc ul { margin: 12px 0 0; padding-left: 22px; list-style: square; }
.doc li { margin: 8px 0; }
.doc strong { color: var(--fg); }

/* Footer */
.foot { padding: 56px 0 64px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot h4 { font: 600 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; margin: 6px 0 16px; color: var(--soft); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 10px; }
.foot a { text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot .soft { margin-top: 14px; max-width: 320px; font-size: 15px; }
.legal { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--hair); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font: 600 12px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }

/* Narrow screens */
@media (max-width: 960px) {
  /* minmax(0, …): a long line of code must not widen the column past the screen */
  .split, .split.phone-right, .split.phone-left { grid-template-columns: minmax(0, 1fr); }
  .split.phone-left .phone { order: 2; }
  .keeps { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1060px) {
  html { scroll-padding-top: 66px; }
  .bar-inner { flex-wrap: wrap; gap: 12px; min-height: 64px; padding-top: 12px; padding-bottom: 12px; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .bar .open-keybe { display: none; }
  .nav { display: none; order: 3; width: 100%; flex-direction: column; gap: 0; margin: 4px 0 0; border-top: 2px solid var(--fg); }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
  .nav .open-keybe-menu { display: block; }
}
@media (min-width: 1061px) { .nav .open-keybe-menu { display: none; } }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .keeps { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 48px 1fr; }
  .steps li::before { font-size: 24px; }
  .actions .btn { flex: 1 1 100%; }
  .brand { font-size: 23px; }
}
