/* Korbi — one stylesheet, no build step, no external requests.
   Tokens are the app's own, ported from Korbi/Design/Theme.swift so the site and
   the app are the same object seen from two sides. */

:root {
  --desk: #F5F1EB;
  --card: #FFFFFF;
  --ink: #25211D;
  --ink-soft: #736B62;
  --ink-faint: #A9A197;
  --accent: #C96D32;
  --stamp: #AD3D32;
  --on-accent: #FEFCF9;
  --rule: #E5E0D9;

  --measure: 34rem;
  --gap: 1.15rem;
  --radius: 18px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --desk: #131211;
    --card: #272522;
    --ink: #F1EEE9;
    --ink-soft: #A39D95;
    --ink-faint: #6F6A64;
    --accent: #E6985A;
    --stamp: #DA6F60;
    --on-accent: #1D1B19;
    --rule: #3C3935;
  }
}

* { box-sizing: border-box; }

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

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

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* Header ------------------------------------------------------------------ */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0 2rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

header.site nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.95rem;
}

header.site nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

header.site nav a:hover { color: var(--accent); }

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

.hero { padding: 1rem 0 2.5rem; }

.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 0 1.6rem;
}

.badge {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: var(--card);
}

/* Content ----------------------------------------------------------------- */

main { display: block; }

section { padding: 1.75rem 0; }

h2 {
  font-size: 1.4rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.7rem;
  text-wrap: balance;
}

h3 {
  font-size: 1.05rem;
  margin: 1.6rem 0 0.4rem;
}

p, li { max-width: var(--measure); }

p { margin: 0 0 1rem; }

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--gap);
  margin-top: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}

.card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; max-width: none; }

/* The paste example, shown as what it is: text in, rows out. */

.demo {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin-top: 1.25rem;
}

@media (min-width: 40rem) {
  .demo { grid-template-columns: 1fr 1fr; align-items: start; }
}

.demo pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--ink-soft);
  overflow-x: auto;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.rows li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.2rem;
  max-width: none;
  border-bottom: 1px solid var(--rule);
}

.rows li:last-child { border-bottom: 0; }
.rows .aisle { display: block; font-size: 0.82rem; color: var(--ink-faint); }
.rows .qty { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Documents --------------------------------------------------------------- */

.doc h1 { font-size: 1.9rem; letter-spacing: -0.02em; margin: 0 0 0.3rem; }
.doc .updated { color: var(--ink-faint); font-size: 0.9rem; margin-bottom: 2rem; }
.doc h2 { font-size: 1.15rem; margin-top: 2rem; }
.doc address { font-style: normal; color: var(--ink-soft); }

dl { margin: 0; }
dt { font-weight: 600; margin-top: 1.5rem; }
dd { margin: 0.3rem 0 0; color: var(--ink-soft); max-width: var(--measure); }

.note {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}

.note p:last-child { margin-bottom: 0; }

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

footer.site {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  align-items: center;
}

footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { color: var(--accent); }
footer.site .spacer { flex: 1 1 auto; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
