/* Kapti — kapti.app
 *
 * The palette is the app's own, read out of Assets.xcassets rather than
 * matched by eye: BrandAccent, Ground, Surface, Ink, Chip. Both appearances,
 * because the app has both and a reader arriving from it should not be
 * flashed white.
 *
 * Charter is the app's typeface and ships with macOS and iOS, so a reader on
 * an Apple device — which is every reader this page can have — sees the page
 * set in the same face as their cards. Georgia carries everyone else. */

:root {
  --accent:      #942193;
  --accent-soft: rgba(148, 33, 147, 0.12);
  --ground:      #F4F2F2;
  --surface:     #FFFFFF;
  --ink:         #1A0716;
  --ink-2:       rgba(26, 7, 22, 0.72);
  --ink-3:       rgba(26, 7, 22, 0.55);
  --rule:        #E8DDE7;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent:      #D24FD0;
    --accent-soft: rgba(210, 79, 208, 0.16);
    --ground:      #140510;
    --surface:     #22091F;
    --ink:         #F7F0F5;
    --ink-2:       rgba(247, 240, 245, 0.72);
    --ink-3:       rgba(247, 240, 245, 0.50);
    --rule:        #2E0C2D;
  }
}

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

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

body {
  margin: 0;
  padding: 0 24px 96px;
  background: var(--ground);
  color: var(--ink);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 40rem; margin: 0 auto; }

/* Header ------------------------------------------------------------- */

header.site {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 40px 0 0;
}

header.site img { width: 52px; height: 52px; border-radius: 12px; display: block; }

header.site .name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

header.site .name span { color: var(--ink-3); font-weight: 400; }

/* Type ---------------------------------------------------------------- */

h1 {
  font-size: 2.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 40px 0 8px;
}

h2 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

h2:first-of-type { border-top: 0; padding-top: 0; }

h3 { font-size: 1.05rem; margin: 1.8rem 0 0.35rem; }

p { margin: 0 0 1.1rem; }

.lede { color: var(--ink-2); font-size: 1.1rem; }

.dateline {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 2.5rem;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

ul { padding-left: 1.2em; margin: 0 0 1.1rem; }
li { margin-bottom: 0.4rem; }

strong { font-weight: 700; }

/* The one pulled-out claim ------------------------------------------- */

.claim {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
  margin: 0 0 2.5rem;
}

.claim p { margin: 0; }

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

.mail {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
}

.mail:hover { text-decoration: underline; }

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

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

footer a { color: var(--ink-3); }
footer .spacer { flex: 1; }

/* Home ---------------------------------------------------------------- */

.home { text-align: center; padding-top: 12vh; }
.home img { width: 112px; height: 112px; border-radius: 25px; }
.home h1 { margin-top: 28px; font-size: 2.5rem; }
.home .lede { max-width: 26rem; margin: 0 auto 2.5rem; }

.links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.links a {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 22px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.links a:hover { border-color: var(--accent); color: var(--accent); }

.home footer { justify-content: center; margin-top: 5rem; }

@media (max-width: 480px) {
  body { font-size: 17px; padding: 0 20px 64px; }
  h1 { font-size: 1.9rem; }
  .home { padding-top: 8vh; }
}
