/* Goodstuff Studio — site styles */

:root {
  color-scheme: light dark;

  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #171614;
  --muted: #6b6862;
  --faint: #97938c;
  --border: #e7e3dc;
  --accent: #a8481c;
  --accent-soft: #fbefe7;

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Iowan Old Style, "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 66ch;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131211;
    --surface: #1b1a18;
    --text: #edeae4;
    --muted: #9a968e;
    --faint: #7c786f;
    --border: #2c2a27;
    --accent: #e8874c;
    --accent-soft: #2a1d14;
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- layout ---------- */

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 3rem;
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

main {
  padding-bottom: 4rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  color: var(--faint);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: 2.25rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.375rem;
  margin: 2.75rem 0 0.75rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol {
  max-width: var(--measure);
}

p {
  margin: 0 0 1.1rem;
}

ul,
ol {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

strong {
  font-weight: 600;
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: var(--measure);
}

.meta {
  font-size: 0.875rem;
  color: var(--faint);
  margin: 0 0 2.5rem;
}

.meta span + span::before {
  content: "·";
  margin: 0 0.5rem;
}

/* ---------- components ---------- */

.card-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  max-width: var(--measure);
}

.card-list li {
  margin: 0 0 0.75rem;
}

.card {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}

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

.card strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.0625rem;
}

.card span {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}

.callout p:last-child {
  margin-bottom: 0;
}

table {
  width: 100%;
  max-width: var(--measure);
  border-collapse: collapse;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-scroll {
  overflow-x: auto;
  max-width: var(--measure);
  -webkit-overflow-scrolling: touch;
}

/* Below ~34rem the table would squish instead of scrolling. Give it a floor
   so .table-scroll actually scrolls and the Notes column stays readable. */
.table-scroll table {
  min-width: 34rem;
}

/* ---------- a11y ---------- */

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
}

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

/* ---------- print ---------- */

@media print {
  .site-nav,
  .site-footer,
  .skip {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  a {
    color: #000;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }
}
