/* klvl.io — plain CSS, system fonts only, no external requests.
   Monochrome: black, white and greys only. App icons are the only colour on the page. */

:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #525252;      /* 7.8:1 on bg */
  --rule: #d4d4d4;       /* hairlines, decorative */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --max: 64rem;
}

/* Dark mode = inverted */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --text: #fafafa;
    --muted: #a3a3a3;    /* 8.4:1 on bg */
    --rule: #333333;
  }
}

/* ---------- Base ---------- */

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

h1, h2, h3, p, ul { margin: 0; }

img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

ul[role="list"] { list-style: none; padding: 0; }

/* Visually hidden, still read by screen readers */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 40rem) {
  .wrap { padding-inline: 2.5rem; }
}

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

.hero { padding-block: clamp(4rem, 14vw, 9rem) clamp(4rem, 12vw, 8rem); }

.wordmark {
  font-size: clamp(7rem, 48vw, 22rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.04em;
  margin-left: -0.04em; /* optical: align the k's stem with the text below */
}

.tagline {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  font-size: clamp(1.25rem, 3.2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.hero-small { padding-block: 4rem 3rem; }
.hero-small .wordmark { font-size: clamp(4rem, 20vw, 7rem); }

/* ---------- Sections: label left, content right on wide screens ---------- */

.section {
  padding-block: 1.25rem 4rem;
  border-top: 1px solid var(--text);
}

.section-title {
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (min-width: 48rem) {
  .section {
    display: grid;
    grid-template-columns: 12rem 1fr;
    gap: 2rem;
  }
  .section-title { margin-bottom: 0; padding-top: 0.25rem; }
}

/* ---------- App list (reusable pattern, one row per app) ---------- */

.app {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
}

.app + .app {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.app-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 22.5%; /* iOS-like corner */
}

@media (min-width: 40rem) {
  .app { gap: 1.75rem; }
  .app-icon { width: 5rem; height: 5rem; }
}

.app-name {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.app-pitch {
  margin-top: 0.5rem;
  max-width: 34rem;
  color: var(--muted);
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  font-weight: 550;
}

/* Outline button; inverts on hover. Never a coloured fill. */
.btn {
  display: inline-block;
  padding: 0.5625rem 1.125rem;
  border: 1.5px solid var(--text);
  line-height: 1.4;
  text-decoration: none;
}
.btn:hover {
  background: var(--text);
  color: var(--bg);
}

.store-badge { display: inline-block; margin-top: 1rem; }

/* ---------- Contact ---------- */

.contact { color: var(--muted); }

.contact a {
  color: var(--text);
  font-size: 1.1875rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

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

.site-footer {
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer p {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

/* ---------- 404 ---------- */

.notfound { padding-bottom: 5rem; }

.notfound-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.notfound p { margin-top: 0.75rem; color: var(--muted); }
.notfound .app-links { margin-top: 1.75rem; }
