/*
 * fossick.app — mirrors the app's design tokens (theme/tokens.ts): Outfit,
 * Paper/Ink duals, Flint secondary text on light (AA on Paper), Stone on dark.
 * Light is the default; dark follows the system setting.
 *
 * Outfit is SELF-HOSTED (fonts/, SIL OFL — licence alongside), copied from
 * the app's @expo-google-fonts/outfit package, so the site makes no request
 * to Google and the privacy policy needn't list it.
 */
@font-face { font-family: 'Outfit'; font-weight: 300; font-display: swap; src: url('/fonts/Outfit_300Light.ttf') format('truetype'); }
@font-face { font-family: 'Outfit'; font-weight: 400; font-display: swap; src: url('/fonts/Outfit_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Outfit'; font-weight: 500; font-display: swap; src: url('/fonts/Outfit_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'Outfit'; font-weight: 600; font-display: swap; src: url('/fonts/Outfit_600SemiBold.ttf') format('truetype'); }

:root {
  --bg: #F4F1EA;        /* Paper */
  --surface: #FBFAF7;
  --text: #16140F;      /* Ink */
  --text-2: #736D63;    /* Flint — 4.54:1 on Paper */
  --border: rgba(85, 80, 73, 0.25);
  --accent: #16140F;
  --measure: 42rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140F;      /* Ink */
    --surface: rgba(244, 241, 234, 0.05); /* Paper wash on Ink — Stone stays legible on it */
    --text: #F4F1EA;    /* Paper */
    --text-2: #8A847A;  /* Stone — 4.96:1 on Ink */
    --border: rgba(244, 241, 234, 0.18);
    --accent: #F4F1EA;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem 1rem 0.5rem;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.mark { width: 2.25rem; height: 2.25rem; flex: none; }

/* Sentence case exactly as the logo — never all-caps. */
.wordmark {
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-transform: none;
}

/* ── Main ───────────────────────────────────────────────────────────────── */

main {
  flex: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  scroll-margin-top: 1rem;
}

h1 { font-size: 2rem; margin: 0.5rem 0 1rem; }
h1.hero { font-size: clamp(2rem, 7vw, 3rem); margin-top: 2rem; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; font-weight: 500; margin: 1.75rem 0 0.5rem; }

.lede { font-size: 1.2rem; color: var(--text-2); margin: 0 0 1.5rem; }

/* Legal documents: long-form reading. */
.prose p, .prose li { overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.35rem; }
.prose strong { font-weight: 500; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 1rem;
  border-left: 3px solid var(--border);
  color: var(--text-2);
}
.prose code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface);
}

.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.prose table { border-collapse: collapse; width: 100%; min-width: 36rem; font-size: 0.95rem; }
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.prose th { font-weight: 500; }

/* Support page */
.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.email-row .label { color: var(--text-2); font-weight: 500; font-size: 0.9rem; }
.email { font-weight: 500; font-size: 1.15rem; overflow-wrap: anywhere; }

.links { list-style: none; padding: 0; }
.links li + li { margin-top: 0.5rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.9rem;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer nav a { color: var(--text-2); font-weight: 500; text-decoration: none; }
.site-footer nav a:hover,
.site-footer nav a[aria-current='page'] { color: var(--text); text-decoration: underline; }
.site-footer p { margin: 1rem 0 0; }
