/* ==========================================================================
   typography.css — Type System
   FK Grotesk, self-hosted — same faces and loading strategy as the falkor
   reference (Regular + Medium as two families, both weight 400).
   ========================================================================== */

@font-face {
  font-family: "FK Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/FKGrotesk-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "FK Grotesk Medium";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/FKGrotesk-Medium.woff2") format("woff2");
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-ink);
  background-color: var(--color-bg);
  font-optical-sizing: auto;
}

/* ── Headings — FK Grotesk Medium at 400, falkor-style ───────────────── */
h1,
.h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-snug);
  color: var(--color-ink);
}

h2,
.h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 400;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
}

h3,
.h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 400;
  line-height: var(--lh-snug);
}

h4,
.h4 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: var(--lh-snug);
}

h5,
.h5 {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 400;
}

h6,
.h6 {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-muted);
}

/* Bold/strong inside running text maps to the Medium family */
strong, b, .font-medium, .font-semibold, .font-bold {
  font-family: var(--font-display);
  font-weight: 400;
}

/* ── Body copy ────────────────────────────────────────────────────────── */
p {
  max-inline-size: var(--measure);
}

.lead {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--color-ink-soft);
}

.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }

small,
.text-caption {
  font-size: var(--fs-sm);
  color: var(--color-muted);
}

/* ── Eyebrow / kicker ─────────────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-brand);
}

/* ── Links ────────────────────────────────────────────────────────────── */
.prose a,
a.link {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-standard);
}

.prose a:hover,
a.link:hover {
  color: var(--color-brand-700);
  text-decoration-thickness: 2px;
}

/* ── Inline elements ──────────────────────────────────────────────────── */
strong,
b { font-weight: var(--fw-semibold); }

em,
i { font-style: italic; }

mark {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  padding: 0 0.15em;
  border-radius: var(--radius-xs);
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--color-surface-sunken);
  padding: 0.12em 0.4em;
  border-radius: var(--radius-xs);
}

blockquote {
  border-inline-start: 3px solid var(--color-brand);
  padding-inline-start: var(--space-md);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--color-ink-soft);
  font-style: italic;
}

/* ── Prose flow (long-form content: blog, legal) ──────────────────────── */
.prose {
  max-inline-size: var(--measure);
  line-height: var(--lh-relaxed);
}

.prose > * + * {
  margin-block-start: var(--space-md);
}

.prose h2 { margin-block-start: var(--space-xl); }
.prose h3 { margin-block-start: var(--space-lg); }

.prose ul,
.prose ol {
  padding-inline-start: var(--space-lg);
}

.prose li + li {
  margin-block-start: var(--space-2xs);
}

/* ── Utility text alignment/color ─────────────────────────────────────── */
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-brand { color: var(--color-brand); }
.text-muted { color: var(--color-muted); }
.text-gradient {
  background: linear-gradient(120deg, var(--color-brand), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
