/* arcenkey.com
 *
 * One stylesheet, no build step, no JavaScript, no webfonts. System type
 * stacks keep the site fast and keep every request on our own domain.
 */

:root {
  --ink: #2a2350;
  --ink-soft: #4a4470;
  --muted: #6b6788;
  --violet: #6c5ce7;
  --brass: #f2b43c;
  --brass-text: #9a6a0e;
  --paper: #ffffff;
  --paper-2: #f7f6fb;
  --rule: #e4e2ee;
  --code-bg: #1e1a3a;
  --code-fg: #e9e6f7;
  --code-dim: #9b95c4;

  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Charter, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece9f8;
    --ink-soft: #c9c5df;
    --muted: #9b97b5;
    --violet: #a195ff;
    --brass-text: #f2b43c;
    --paper: #15122a;
    --paper-2: #1d1938;
    --rule: #2e2a4d;
    --code-bg: #0e0c1f;
    --code-fg: #e4e0f5;
    --code-dim: #8d87b8;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--violet); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; }

p { margin: 0 0 1.1em; }
p.lead { font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); max-width: 34em; }
small, .small { font-size: 0.9rem; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

code, kbd, pre {
  font-family: var(--mono);
  font-size: 0.92em;
}
p code, li code, td code, dd code {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.05em 0.35em;
}

/* Layout ------------------------------------------------------------- */

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.prose > * { max-width: 42rem; }

section { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
section.hero { border-top: 0; padding-top: 3.5rem; padding-bottom: 3.5rem; }
section.tinted { background: var(--paper-2); }

.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin: 0 0 0.9rem;
}

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3.5rem;
}
@media (max-width: 760px) { .cols-2 { grid-template-columns: 1fr; gap: 2rem; } }

/* Masthead ----------------------------------------------------------- */

header.masthead {
  border-bottom: 1px solid var(--rule);
}
header.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brand svg { width: 2rem; height: 2rem; display: block; }
.brand .key { color: var(--violet); }

nav.site ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav.site a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
nav.site a:hover { color: var(--ink); }
nav.site a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); }
@media (max-width: 560px) {
  header.masthead .wrap { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  nav.site ul { gap: 1rem; flex-wrap: wrap; }
  nav.site a { font-size: 0.9rem; }
}

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

.hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 3rem;
  align-items: center;
}
.hero-grid > div { min-width: 0; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }

.actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.6rem; }
.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 4px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.btn:hover { background: var(--violet); border-color: var(--violet); color: #fff; text-decoration: none; }
.btn.quiet { background: transparent; color: var(--ink); }
.btn.quiet:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }
@media (prefers-color-scheme: dark) {
  .btn { background: var(--brass); border-color: var(--brass); color: #1e1a3a; }
  .btn:hover { background: #ffc85a; border-color: #ffc85a; color: #1e1a3a; }
  .btn.quiet { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
}

/* Terminal block ----------------------------------------------------- */

pre.term {
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  margin: 0;
  overflow-x: auto;
  line-height: 1.55;
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
pre.term .c { color: var(--code-dim); }
pre.term .p { color: var(--brass); }
pre.term .o { color: var(--code-dim); }

/* Definition list ("what sets it apart") ----------------------------- */

dl.points { margin: 0; }
dl.points > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.5rem 3rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--rule);
}
dl.points > div:first-child { border-top: 0; padding-top: 0; }
dl.points dt {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
dl.points dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 680px) {
  dl.points > div { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* Read-path flow ----------------------------------------------------- */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  margin: 2rem 0 1rem;
}
.flow .node {
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brass);
  background: var(--paper);
  border-radius: 4px;
  padding: 1rem 1.1rem;
}
.flow .node .where {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.flow .node .what {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.flow .node p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.flow .link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 0.6rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: center;
  min-width: 5.5rem;
}
.flow .link::before { content: "\2192"; font-size: 1.6rem; line-height: 1; color: var(--ink-soft); }
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; }
  .flow .link { padding: 0.5rem 0; min-width: 0; }
  .flow .link::before { content: "\2193"; }
}

/* Tables ------------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.75rem 0.65rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
td:first-child { font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
@media (max-width: 640px) { td:first-child { white-space: normal; } }

/* Feature groups ----------------------------------------------------- */

.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 2.5rem; }
.groups h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.groups ul { margin: 0; padding-left: 1.1em; font-size: 0.95rem; color: var(--ink-soft); }
.groups li { margin-bottom: 0.3em; }
@media (max-width: 900px) { .groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .groups { grid-template-columns: 1fr; } }

/* Callout ------------------------------------------------------------ */

.callout {
  border-left: 3px solid var(--brass);
  background: var(--paper-2);
  padding: 1.1rem 1.35rem;
  border-radius: 0 4px 4px 0;
}
.callout h3 { margin-top: 0; }
.callout ul { margin-bottom: 0; }
.callout p:last-child { margin-bottom: 0; }

/* Q and A ------------------------------------------------------------ */

.qa > div { padding: 1.6rem 0; border-top: 1px solid var(--rule); }
.qa > div:first-child { border-top: 0; padding-top: 0; }
.qa h3 { margin-bottom: 0.5rem; }
.qa p:last-child { margin-bottom: 0; }

/* Facts -------------------------------------------------------------- */

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 2rem; margin: 0; }
dl.facts dt { font-weight: 600; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 0.15rem; }
dl.facts dd { margin: 0; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; gap: 0.1rem 0; } dl.facts dd { margin-bottom: 0.8rem; } }

/* Footer ------------------------------------------------------------- */

footer.site {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site .wrap { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site p { margin: 0.3rem 0 0; }
