:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --text: #1c1b19;
  --muted: #5f5c55;
  --accent: #1f5fbf;
  --border: #e3e0d8;
  --max: 70ch;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --text: #ecebe7;
    --muted: #a8a49b;
    --accent: #7fb0ff;
    --border: #2e2c29;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.site-header, main, .site-footer {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 600; color: var(--text); text-decoration: none; }

main { padding-block: 2rem 3rem; }

.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
}

h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); margin-top: 0; }

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

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

/* --- catalog --- */
:root { --max: 72rem; --card: #ffffff; }
@media (prefers-color-scheme: dark) { :root { --card: #1d1c1a; } }

.brand { display: inline-flex; align-items: center; gap: .5rem; }
.intro { color: var(--muted); margin: 0 0 2rem; max-width: 60ch; }

.catalog {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.card:hover, .card:focus-within { border-color: var(--accent); transform: translateY(-2px); }
.shot { display: block; aspect-ratio: 12 / 7; border-bottom: 1px solid var(--border); background: #fff; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card-body { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card-body p { margin: 0; }
.card h2 { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1.35rem; }
.card h2 a { color: var(--text); text-decoration: none; }
/* whole card is clickable through the title link */
.card h2 a::after { content: ""; position: absolute; inset: 0; }
.app-icon { width: 48px; height: 48px; border-radius: 11px; }
.tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
/* tool links sit above the card-wide link */
.tools a {
  position: relative; z-index: 1;
  display: inline-block; padding: .15rem .6rem;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: .9rem; text-decoration: none;
}
.tools a:hover { border-color: var(--accent); }
.host { margin-top: auto !important; color: var(--muted); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover, .card:focus-within { transform: none; } }
