/* ============================================================
   Pinax — studio site styles
   Aesthetic: warm, classical, restrained.
   Sibling to Plinth's palette (same fonts, same neutrals);
   accent shifted from terracotta to a muted olive-bronze so the
   two read as related-but-distinct.
   ============================================================ */

:root {
  --bg: #faf8f2;
  --bg-tint: #f2efe6;
  --bg-deep: #ebe6d8;
  --ink: #1f1a14;
  --ink-muted: #5a5247;
  --ink-faint: #8c8478;
  --rule: #ddd7c7;
  --accent: #6f6a3a;
  --accent-dark: #4f4a25;

  --serif: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --content-max: 1100px;
  --reading-max: 720px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout primitives ---------- */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 1.75rem;
}

.reading {
  max-width: var(--reading-max);
}

.muted { color: var(--ink-muted); }
.small { font-size: 0.92rem; }

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

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 1.1rem;
}

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

.wordmark-small { font-size: 1.15rem; }

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 120ms ease, border-color 120ms ease;
}

.nav-link:hover { color: var(--ink); }
.nav-link.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin-block-start: 0;
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-block-end: 0.6em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-block: 2.2em 0.6em;
}

h3 {
  font-size: 1.25rem;
  margin-block: 1.6em 0.4em;
}

p {
  margin-block: 0 1.15em;
}

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

a:hover { color: var(--ink); }

em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05em;
}

/* ---------- Hero + sections ---------- */

.hero {
  padding-block: 5rem 3.5rem;
  border-bottom: 1px solid var(--rule);
}

.hero h1 {
  margin-block-end: 0.4em;
}

.tagline {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 400;
  color: var(--ink-muted);
  max-width: 38ch;
  line-height: 1.4;
}

.section {
  padding-block: 3rem;
}

.section-tint {
  background: var(--bg-tint);
  border-block: 1px solid var(--rule);
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-deep);
  padding-block: 2.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  align-items: start;
}

.footer-heading {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 0 0 0.6rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 0.3rem; }
.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); }

/* ---------- Draft callout (for partner-only spec pages) ---------- */

.callout-draft {
  background: var(--bg-deep);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1.1rem;
  margin: 0 0 2rem;
  font-size: 0.95rem;
  border-radius: 2px;
}

.callout-draft p { margin: 0; color: var(--ink-muted); }
.callout-draft strong { color: var(--ink); }

/* ---------- Reading-flow polish for long spec pages ---------- */

.page .reading h2 {
  margin-top: 2.4em;
  padding-top: 1.2em;
  border-top: 1px solid var(--rule);
}

.page .reading h3 {
  margin-top: 1.8em;
}

.page .reading table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 0.96rem;
}

.page .reading th,
.page .reading td {
  border: 1px solid var(--rule);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.page .reading th {
  background: var(--bg-tint);
  font-weight: 600;
  font-family: var(--sans);
}

.page .reading ul,
.page .reading ol {
  padding-left: 1.4em;
}

.page .reading li { margin-bottom: 0.35em; }

.page .reading code {
  background: var(--bg-tint);
  padding: 0.1em 0.35em;
  border-radius: 2px;
  font-size: 0.9em;
}

/* ---------- Project list ---------- */

.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.02rem;
  line-height: 1.55;
}

.project-list li:last-child {
  border-bottom: none;
}

.project-list strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .nav-container { flex-wrap: wrap; gap: 0.5rem; }
  .site-nav { gap: 1rem; }
  .hero { padding-block: 3.5rem 2.5rem; }
}
