/* stanleyhks.com — shared stylesheet. No framework, no build step. */

:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #1a1a18;
  --text-muted: #6b6b66;
  --border: #e4e4e0;
  --accent: #2b6cb0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 12px rgba(0, 0, 0, .05);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .06), 0 12px 28px rgba(0, 0, 0, .09);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16161a;
    --surface: #1e1e24;
    --text: #ececef;
    --text-muted: #9a9aa4;
    --border: #2e2e36;
    --accent: #7ab3ea;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .35);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .5);
  }
}

:root[data-theme="dark"] {
  --bg: #16161a;
  --surface: #1e1e24;
  --text: #ececef;
  --text-muted: #9a9aa4;
  --border: #2e2e36;
  --accent: #7ab3ea;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .35);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .5);
}

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

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

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- masthead ---- */

.masthead {
  text-align: center;
  padding: 72px 0 12px;
}

.masthead h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.masthead .role {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.masthead .contact {
  margin: 4px 0 0;
  font-size: 0.95rem;
}

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

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  padding: 44px 0 64px;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}

@media (hover: hover) {
  .app:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
}

.app-icon {
  width: 128px;
  height: 128px;
  border-radius: 26px;
  object-fit: cover;
}

.app h2 {
  margin: 20px 0 6px;
  font-size: 1.15rem;
  font-weight: 620;
}

.app p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  flex: 1 0 auto;
}

/* ---- store badges ---- */

.badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
}

.badges img {
  display: block;
  width: 148px;
  height: auto;
}

.badges a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---- single-app hero (kpptest.html, bloki.html) ---- */

.hero {
  text-align: center;
  padding: 84px 0 64px;
}

.hero img.logo {
  width: 160px;
  height: 160px;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 28px 0 6px;
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.hero .tagline {
  margin: 0 0 30px;
  color: var(--text-muted);
}

.hero .badges { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; }

.hero .qr { width: 180px; margin-top: 36px; border-radius: 10px; }

/* ---- prose (privacy policies, 404) ---- */

.prose {
  padding: 56px 0 72px;
  max-width: 720px;
  margin: 0 auto;
}

.prose h1, .prose h2 { letter-spacing: -0.015em; }
.prose h2 { font-size: 1.6rem; margin: 0 0 1.2em; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer a { color: var(--text-muted); }
.site-footer nav { margin-bottom: 8px; }
.site-footer nav a { margin: 0 9px; white-space: nowrap; }

@media (max-width: 520px) {
  .masthead { padding-top: 52px; }
  .hero { padding-top: 56px; }
  body { font-size: 16px; }
}
