/**
 * Keybox marketing page. Monochrome: white type on black, with gray
 * for secondary text and hairlines. Type is Fraunces for the promise,
 * Outfit for the instructions, IBM Plex Mono for handles and commands.
 */

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #b3b3b3;
  --line: rgba(255, 255, 255, 0.18);
  --raise: #111;
  color-scheme: dark;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --header: 4.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
}

body :focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  transform: translateY(-160%);
  background: var(--fg);
  color: var(--bg);
  padding: 0.45rem 0.75rem;
  border-radius: 0.4rem;
  z-index: 30;
  text-decoration: none;
  font-weight: 600;
}

.skip:focus {
  transform: none;
}

a {
  color: var(--fg);
}

.wrap {
  width: min(72rem, calc(100% - 3rem));
  margin-inline: auto;
}

h1,
h2,
.promise,
.pitch-line,
.brand {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h1 {
  margin: 0.6rem 0 0.85rem;
  font-size: clamp(2.7rem, 5.6vw, 4.5rem);
  font-weight: 640;
  line-height: 1.04;
}

h2 {
  margin: 0;
  font-size: clamp(2.05rem, 3.6vw, 2.7rem);
  line-height: 1.12;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.25;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

p {
  margin: 0 0 1rem;
}

li p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.4rem;
  height: 1px;
  margin-right: 0.65rem;
  background: var(--fg);
  vertical-align: middle;
}

.promise {
  margin: 0 0 1.15rem;
  max-width: 16em;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  line-height: 1.28;
}

.lede {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.fine {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

kbd {
  display: inline-block;
  margin: 0 0.16rem;
  padding: 0.08em 0.42em 0.12em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 0.35rem;
  background: var(--fg);
  color: var(--bg);
  /* Outfit has no command-key glyphs. system-ui does, on macOS. */
  font-family: system-ui, sans-serif;
  font-size: 0.84em;
  font-weight: 600;
  line-height: 1.35;
  vertical-align: 0.05em;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

#features,
#install,
#use,
#download,
#top {
  scroll-margin-top: var(--header);
}

p code,
li code,
dd code,
figcaption code {
  padding: 0.12em 0.42em 0.16em;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.1);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.92);
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.75rem;
  min-height: var(--header);
  padding-block: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  font-size: 1.45rem;
  text-decoration: none;
}

.mark {
  width: 1.9rem;
  height: 1.9rem;
  display: block;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.35rem;
}

.site-header nav a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-header nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: 3.25rem 4.5rem;
  align-items: center;
  padding: 4.75rem 0 2.25rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.4rem 0 0.9rem;
}

.button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  padding: 0.75rem 1.05rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

.button:hover {
  background: #e8e8e8;
}

.button:focus-visible {
  outline-color: var(--fg);
}

.download-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

.button-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--fg);
  justify-content: center;
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.composer {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: none;
  padding: 1.15rem 1.25rem 1.1rem;
}

.composer-bar,
.composer-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.composer-foot {
  flex-direction: column;
  align-items: stretch;
}

.composer-bar {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.composer-body {
  margin: 1.15rem 0 1.25rem;
  font-size: 1.15rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.secret {
  display: inline;
  padding: 0.05em 0.28em;
  border-radius: 0.35rem;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.92em;
}

.secret[data-state="sealed"] {
  background: transparent;
  color: var(--fg);
  padding: 0;
}

.composer-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

#seal-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: none;
  border: 0;
  border-radius: 0.7rem;
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
}

#seal-demo kbd {
  background: transparent;
  color: var(--bg);
  border-color: rgba(0, 0, 0, 0.35);
}

#seal-demo.is-sealed kbd {
  display: none;
}

.pitch {
  padding: 1.75rem 0 4rem;
}

.pitch-line {
  margin: 0;
  max-width: 18em;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.22;
}

.block {
  border-top: 1px solid var(--line);
  padding: 4.75rem 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  gap: 2.25rem 4rem;
  align-items: start;
}

.split > h2 {
  position: sticky;
  top: calc(var(--header) + 1.25rem);
}

.section-lead {
  max-width: 38rem;
  margin-bottom: 1.35rem;
  font-size: 1.2rem;
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.features {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 3rem;
  counter-reset: feature;
}

.features li {
  counter-increment: feature;
  border-top: 1px solid var(--line);
  padding: 1.45rem 0 1.65rem;
}

.features li p {
  color: var(--muted);
  line-height: 1.6;
}

.features h3::before {
  content: counter(feature, decimal-leading-zero);
  display: block;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.needs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0 0 1.5rem;
  list-style: none;
}

.needs li {
  max-width: 100%;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0.35rem;
}

.platforms button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.platforms button[aria-selected="true"] {
  background: var(--fg);
  color: var(--bg);
}

.platform-panel {
  margin-top: 1rem;
}

.platform-panel .steps {
  margin-top: 1.15rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.15rem minmax(0, 1fr);
  column-gap: 1.05rem;
  row-gap: 0.45rem;
  align-items: start;
  padding: 1.4rem 0 1.5rem;
  border-top: 1px solid var(--line);
}

/* The number shares a row with the title. Everything else stays in the
   text column — auto-placement was dropping paragraphs into the number
   column and collapsing the title to zero width. */
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  padding-top: 0.12rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1.25;
}

.steps > li > * {
  grid-column: 2;
  min-width: 0;
}

.steps > li > h3 {
  grid-row: 1;
}

.codebox {
  position: relative;
  margin: 0.35rem 0 0.2rem;
}

.codebox pre.code {
  padding-right: 4.5rem;
}

pre.code {
  margin: 0.45rem 0 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  border-radius: 0.9rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.7;
}

pre.code code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.copy:hover {
  background: rgba(255, 255, 255, 0.08);
}

.subhead {
  margin: 2.35rem 0 0.6rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.transcript {
  margin: 0.55rem 0 0;
  padding: 1.15rem 1.2rem 0.35rem;
  border-radius: 0.9rem;
  background: var(--raise);
  border: 1px solid var(--line);
}

.transcript figcaption {
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.55rem 0 1rem;
}

.meta div {
  padding: 0.95rem 1.05rem 0.9rem;
  border-radius: 0.8rem;
  background: var(--raise);
  border: 1px solid var(--line);
}

.meta dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta dd {
  margin: 0.25rem 0 0;
}

.cmds {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}

.cmds li {
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr);
  gap: 0.35rem 1.5rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}

.cmds li span {
  color: var(--muted);
  line-height: 1.5;
}

.cmds code {
  overflow-wrap: anywhere;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0.3rem 0 0;
  list-style: none;
}

.tools code {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
}

.finale {
  background: var(--bg);
  color: var(--fg);
  border-top: 1px solid var(--line);
}

.finale-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2.25rem 3rem;
  align-items: center;
  padding: 4.75rem 0 2.25rem;
}

.icon-plate {
  width: fit-content;
  padding: 0;
  border-radius: 1.7rem;
  background: var(--bg);
}

.app-icon {
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 1.6rem;
  display: block;
  background: var(--bg);
}

.eyebrow-light {
  color: var(--muted);
}

.finale h2 {
  margin: 0.3rem 0 0.7rem;
}

.section-lead.light,
.fine.light {
  color: var(--muted);
}

.finale .button:focus-visible {
  outline-color: var(--fg);
}

.button-ghost.light {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--fg);
}

.button-ghost.light:hover {
  background: rgba(255, 255, 255, 0.08);
}

.contents {
  margin: 0.4rem 0 1rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.contents li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}

.finale a:not(.button) {
  color: var(--fg);
}

#checksum {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.icon-downloads {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
}

.icon-downloads a {
  font-weight: 600;
}

.finale footer {
  padding: 0.75rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.finale footer p {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

@media (min-width: 860px) {
  .wrap {
    width: min(72rem, calc(100% - 5rem));
  }
}

@media (max-width: 860px) {
  .hero,
  .split,
  .features,
  .finale-inner,
  .cmds li,
  .meta {
    grid-template-columns: 1fr;
  }

  .split > h2 {
    position: static;
  }

  .hero {
    padding-top: 2.75rem;
    gap: 2.25rem;
  }

  .block {
    padding: 3.25rem 0;
  }

  h1 {
    font-size: clamp(2.35rem, 11vw, 3.1rem);
  }

  .app-icon {
    width: 6.5rem;
    height: 6.5rem;
  }

  .icon-plate {
    border-radius: 1.8rem;
  }
}

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