/* ==========================================================================
   campleman.co.za — shared stylesheet
   Every page on the site loads this one file. Change it here, it changes
   everywhere. Paths are relative, so pages in subfolders use ../css/style.css
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --card: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --border: #e3e3e6;
  --accent: #0a84ff;
  --accent-fg: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);

  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 980px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #0e0e10;
    --card: #151517;
    --fg: #f5f5f7;
    --muted: #98989d;
    --border: #2a2a2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

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

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

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

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

/* Must win over display rules like .btn's inline-flex */
[hidden] { display: none !important; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* --------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}

.brand {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.brand:hover { text-decoration: none; opacity: 0.7; }

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--fg); text-decoration: none; }

/* ----------------------------------------------------------------- hero -- */

.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(38px, 7vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 18px;
}

.hero p {
  font-size: clamp(18px, 2.4vw, 21px);
  color: var(--muted);
  max-width: 34ch;
  margin: 0 auto;
}

/* --------------------------------------------------------------- section -- */

section { padding: 56px 0; }

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}

h2 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 14px; }
h3 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 8px; }

/* ------------------------------------------------------------- app grid -- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.app-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 14px 34px rgba(0, 0, 0, 0.1);
}

.app-card__name {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.app-card__tagline {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.4;
}
.app-card__badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 9px;
}

/* App icon. Uses a real image when `icon` is set in js/apps.js, otherwise
   falls back to a generated tile with the app's initial. */
.app-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 15px;
  object-fit: cover;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.app-icon--fallback {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  border: 0;
  background: linear-gradient(160deg, var(--tint, #0a84ff), color-mix(in srgb, var(--tint, #0a84ff) 55%, #000));
}

.empty-note {
  color: var(--muted);
  font-size: 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

/* ----------------------------------------------------------------- card -- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.card h2 { font-size: 19px; margin: 0 0 10px; }
.card > :last-child { margin-bottom: 0; }

.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* ------------------------------------------------------------ app header -- */

.app-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 56px 0 8px;
}
.app-hero .app-icon { width: 96px; height: 96px; border-radius: 22px; font-size: 42px; }
.app-hero h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.03em; margin: 0 0 6px; }
.app-hero p { color: var(--muted); margin: 0; font-size: 18px; }

@media (max-width: 520px) {
  .app-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* --------------------------------------------------------------- page top -- */

.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.03em; margin: 0 0 6px; }
.page-head .sub { color: var(--muted); font-size: 16px; }

.crumb {
  font-size: 14px;
  color: var(--muted);
  padding-top: 28px;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }
