/* Shared by the hand-written pages under zeikar.dev/iki/: the landing page
   and the comparison page. Each page keeps its own layout in a <style>. */

/* Palette lifted from Iki's first hero character: the navy of
   her sailor collar as the ground, the amber of her irises as the only
   accent. Nothing else gets a color. */
:root {
  --ink: #0f1320;
  --ink-2: #151a2b;
  --rule: #232b45;
  --paper: #e9ebf3;
  --muted: #8b93ae;
  --amber: #e9a23b;

  --sans: "Zen Kaku Gothic New", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.75rem 0;
}

.wordmark {
  font-size: 1.375rem;
  font-weight: 900;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.wordmark .glyph {
  color: var(--amber);
  margin-inline-start: 0.18em;
  font-weight: 500;
}

.masthead nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.masthead nav a {
  text-decoration: none;
  padding-block: 0.15em;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover {
  color: var(--paper);
  border-bottom-color: var(--amber);
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.09;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border-radius: 3px;
  font-size: 0.9688rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  background: var(--amber);
  color: #24170a;
}

.btn-primary:hover {
  background: #f2b258;
}

.btn-secondary {
  border-color: var(--rule);
  color: var(--paper);
}

.btn-secondary:hover {
  border-color: var(--muted);
  background: var(--ink-2);
}

/* ---------- prose sections ---------- */

section.band {
  padding-block: clamp(3rem, 7vw, 5rem);
}

h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.lede {
  margin: 0 0 2.5rem;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1rem;
}

/* A definition list, not a card grid: the term is the subject and the
   description qualifies it, which is exactly the shape of this content. */
.facts {
  margin: 0;
  display: grid;
  gap: 0;
}

.facts > div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0.5rem 2rem;
  padding-block: 1.15rem;
  border-top: 1px solid var(--rule);
}

.facts > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.facts dd {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.facts dd code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--paper);
}

/* ---------- packages ---------- */

.pkgs {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.pkgs th,
.pkgs td {
  padding: 1rem 1.5rem 1rem 0;
  border-top: 1px solid var(--rule);
  vertical-align: baseline;
}

.pkgs tbody tr:last-child td {
  border-bottom: 1px solid var(--rule);
}

.pkgs th {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  border-top: 0;
  padding-top: 0;
}

.pkgs td:first-child {
  font-family: var(--mono);
  font-size: 0.875rem;
  white-space: nowrap;
}

.pkgs td:first-child a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgb(233 162 59 / 0.3);
}

.pkgs td:first-child a:hover {
  border-bottom-color: var(--amber);
}

.pkgs td:last-child {
  color: var(--muted);
}

.install {
  margin: 0 0 2.5rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--paper);
}

.lede a {
  color: var(--paper);
}

.caveat {
  margin: 2.5rem 0 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--rule);
  max-width: 64ch;
  color: var(--muted);
  font-size: 0.9375rem;
}

.caveat a {
  color: var(--paper);
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.readings {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}

.readings b {
  display: block;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--amber);
}

.readings span {
  font-size: 0.875rem;
  color: var(--muted);
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.colophon a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.colophon a:hover {
  color: var(--paper);
  border-bottom-color: var(--muted);
}

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
