/*
 * Kalozi public site.
 *
 * Deliberately one small stylesheet with no build step and no dependencies: these pages
 * exist so that store reviewers and users find working links, and the worst possible
 * failure mode is a legal page that 500s because a framework upgrade broke. Plain HTML
 * and CSS cannot break.
 *
 * Colours mirror src/theme/tokens.js. They are duplicated rather than imported because
 * this site deploys independently of the app — a shared build step would couple a store
 * blocker to the mobile toolchain.
 */

:root {
  --accent: #c6ff3d;
  --ink: #0b0b0f;
  --canvas: #ffffff;
  --surface: #f6f7f9;
  --text: #0b0b0f;
  --text-secondary: #62636b;
  --border: #e6e8ec;
  --radius: 24px;
  --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0b0b0f;
    --surface: #16171c;
    --text: #f7f8fa;
    --text-secondary: #9a9ba4;
    --border: #262830;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 1.25rem 5rem;
  background: var(--canvas);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
}

/* --- Header ------------------------------------------------------------------------- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  /* Never white on lime — it fails contrast. See CLAUDE.md §1. */
  color: var(--ink);
}

nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

/* --- Typography -------------------------------------------------------------------- */

h1 {
  font-size: clamp(1.875rem, 5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
}

p,
li {
  color: var(--text);
}

.lede,
.updated {
  color: var(--text-secondary);
}

.updated {
  font-size: 0.875rem;
  margin: 0 0 2rem;
}

a {
  color: var(--text);
  text-decoration-color: var(--text-secondary);
  text-underline-offset: 0.15em;
}

ul {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.4rem;
}

code {
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 0.3rem;
  font-size: 0.9em;
}

/* --- Blocks ------------------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

/* Used for the "replace this" notices. Visible on purpose — an unfilled placeholder in a
   legal document must be impossible to miss. */
.todo {
  background: #fff8e1;
  border: 1px solid #f0d68a;
  color: #4a3b00;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

@media (prefers-color-scheme: dark) {
  .todo {
    background: #2a2306;
    border-color: #5c4d10;
    color: #f2e3a8;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9375rem;
}

th,
td {
  text-align: start;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-scroll {
  overflow-x: auto;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  min-height: 44px;
  line-height: 1.5;
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(0.95);
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

footer a {
  color: var(--text-secondary);
}
