/*
 * Shared site footer (layouts/partials/site-footer.html, content in data/footer.yaml).
 *
 * Loaded by the home page, the freelance landing pages, the assessment pages and the
 * blog (legacy Casper theme). Two things shape this file:
 *   - Everything is scoped under .sf and uses px, never rem: the blog theme sets
 *     html { font-size: 10px }, and its element rules must not leak in.
 *   - Colors read the shared design tokens (freelance.css, which flips them in dark
 *     mode) and fall back to the same warm values where that stylesheet is absent
 *     (the blog), so the footer looks the same everywhere.
 */

.sf {
  --sf-bg: var(--color-bg, #fbfaf8);
  --sf-text: var(--color-text, #2a2622);
  --sf-muted: var(--color-text-muted, #6b6259);
  --sf-border: var(--color-border, #e8e3db);
  --sf-accent: var(--color-accent-dark, #9c4e22);

  clear: both;
  margin: 0;
  padding: 56px 0 32px;
  background: var(--sf-bg);
  border-top: 1px solid var(--sf-border);
  color: var(--sf-muted);
  font-family: var(--font-sans, "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.sf *, .sf *::before, .sf *::after { box-sizing: border-box; }

/* Blog only: breathing room between the end of the post and the footer. */
.site-wrapper .sf { margin-top: 64px; }

.sf .sf-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.sf .sf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
}

/* ---------- Brand ---------- */
.sf .sf-name {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-serif, "Merriweather", Georgia, serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sf-text);
}
.sf .sf-logo {
  display: block;
  width: 28px;
  height: 28px;
  max-width: none;
}
.sf .sf-tagline {
  max-width: 34ch;
  margin: 16px 0 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--sf-muted);
  text-wrap: pretty;
}

/* ---------- Link columns ---------- */
.sf .sf-title {
  margin: 4px 0 14px;
  padding: 0;
  font-family: var(--font-sans, "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--sf-text);
}
.sf .sf-links,
.sf .sf-legal {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Explicit sizes: the blog theme shrinks ul/li text on small screens. */
.sf .sf-links,
.sf .sf-links li {
  font-size: 15px;
  line-height: 1.6;
}
.sf .sf-links li {
  margin: 0;
  padding: 0;
  text-wrap: balance;
}
.sf .sf-links li + li { margin-top: 10px; }

/* ---------- Links (override page-level link styles) ---------- */
.sf a {
  color: var(--sf-muted);
  font-weight: 400;
  text-decoration: none;
  transition: color 0.15s ease;
}
.sf a.sf-name { color: var(--sf-text); font-weight: 700; }
.sf a:hover {
  color: var(--sf-accent);
  text-decoration: underline;
  text-decoration-color: var(--sf-accent);
  text-underline-offset: 3px;
}
.sf a:focus-visible {
  outline: 2px solid var(--sf-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Bottom row ---------- */
.sf .sf-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--sf-border);
}
.sf .sf-copy {
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--sf-muted);
}
.sf .sf-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}
.sf .sf-legal li { margin: 0; padding: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .sf { padding: 44px 0 28px; }
  .sf .sf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 32px;
  }
  .sf .sf-brand { grid-column: 1 / -1; }
  .sf .sf-bottom { margin-top: 40px; }
}
