/* shared.css — common styles for case study + process pages
   Anchored on Variant A's editorial direction (Iowan/Charter serif, paper bg,
   tile-cyan accent to match home page). Pages are static HTML. */

:root {
  --bg: #FBFAF6;
  --paper: #FFFEFB;
  --ink: #0E1B22;
  --ink-soft: #2A3942;
  --ink-faint: #5A6770;
  --rule: #DCE3E6;
  --rule-soft: #E8EDF0;
  --mute: #889098;
  --accent: #1FB7B0;
  --accent-soft: #2DCCC4;
  --accent-tint: #E5F5F4;
  --serif: "Iowan Old Style", "Charter", "Lora", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
}

::selection { background: rgba(31, 183, 176, 0.22); color: var(--ink); }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 1.5px; }

.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* ── Top nav (consistent with home wordmark) ─────────────────── */
.topnav {
  padding: 32px 24px 0;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}
.topnav .wm { display: flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 500; font-size: 16px; letter-spacing: -0.005em; color: var(--ink); text-decoration: none; }
.topnav .wm .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.topnav .wm .suffix { color: var(--ink-faint); font-weight: 400; }
.topnav .back { color: var(--ink-faint); text-decoration: none; font-size: 13px; }
.topnav .back:hover { color: var(--accent); }
.topnav .cs-nav { display: flex; align-items: center; gap: 12px; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.topnav .cs-link { color: var(--ink-faint); text-decoration: none; opacity: 0.75; transition: opacity 0.15s, color 0.15s; }
.topnav .cs-link:hover { opacity: 1; color: var(--accent); }
.topnav .cs-link.active { color: var(--ink); opacity: 1; }
.topnav .cs-sep { color: var(--ink-faint); opacity: 0.4; }

/* ── Article header ─────────────────────────────────────────── */
.article-head { padding: 80px 0 48px; border-bottom: 1px solid var(--rule); margin-bottom: 56px; }
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .num { color: var(--mute); font-variant-numeric: tabular-nums; }
.article-title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin-bottom: 24px;
  max-width: 720px;
}
.article-deck {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 40px;
  font-weight: 400;
}
.article-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  font-family: var(--sans);
  font-size: 13px;
}
.article-meta .lbl {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 4px;
}
.article-meta .val { color: var(--ink-soft); }

/* ── Section heading ────────────────────────────────────────── */
.h2 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.2;
  margin: 64px 0 20px;
}
.h2 .sect-num {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 32px 0 12px;
}
.p {
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 18px;
  max-width: 640px;
}
.p strong { color: var(--ink); font-weight: 600; }
.p em { font-style: italic; color: var(--ink); }

/* ── Pull-quote ─────────────────────────────────────────────── */
.pullquote {
  font-size: 24px;
  line-height: 1.4;
  font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 32px 0;
  max-width: 600px;
  letter-spacing: -0.005em;
}

/* ── Artifact card (excerpts: scope doc, plan, etc.) ────────── */
.artifact {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  margin: 32px 0;
  overflow: hidden;
  position: relative;
}
.artifact .corner {
  position: absolute; top: -1px; left: -1px; width: 16px; height: 16px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}
.artifact-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  background: rgba(244, 236, 226, 0.4);
}
.artifact-head .filename { color: var(--ink); font-weight: 500; }
.artifact-head .tag { font-size: 10.5px; letter-spacing: 0.06em; color: var(--mute); }
.artifact-body {
  padding: 24px 28px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  white-space: pre-wrap;
  overflow-x: auto;
}
.artifact-body .cmt { color: var(--mute); }
.artifact-body .em { color: var(--accent); font-weight: 600; }
.artifact-body .h { color: var(--ink); font-weight: 600; }

/* ── Stats row ──────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin: 32px 0;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat .num {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.stat .lbl {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.4;
}

/* ── Screenshot placeholder ─────────────────────────────────── */
.screenshot {
  margin: 32px 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper);
}
.screenshot-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #F1ECE3;
  border-bottom: 1px solid var(--rule);
}
.screenshot-chrome .dot { width: 10px; height: 10px; border-radius: 50%; background: #D9D2C5; }
.screenshot-chrome .url {
  flex: 1;
  margin: 0 12px;
  background: var(--bg);
  border-radius: 4px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
}
.screenshot-body {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  min-height: 280px;
  position: relative;
}
.screenshot-caption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 12px;
  font-style: italic;
}

/* ── Footer ─────────────────────────────────────────────────── */
.article-foot {
  margin: 96px 0 64px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--mute);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  letter-spacing: 0.04em;
}
.article-foot a { color: var(--accent); }

/* ── Process timeline (used on /how-i-work) ─────────────────── */
.timeline {
  margin: 48px 0;
  padding: 0;
  list-style: none;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--rule);
}
.timeline li {
  position: relative;
  padding-left: 44px;
  padding-bottom: 36px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline .marker {
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.timeline .step-name {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.timeline .step-h {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.008em;
  margin-bottom: 10px;
  line-height: 1.25;
}
.timeline .step-p {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.timeline .step-meta {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 4px;
}
.timeline .step-meta .lbl { color: var(--mute); margin-right: 6px; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ── CTA box ───────────────────────────────────────────────── */
.cta {
  background: var(--accent-tint);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 28px 32px;
  margin: 64px 0 32px;
  border-radius: 4px;
}
.cta h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.cta p {
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 0;
}
.cta a { font-weight: 500; }

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  padding: 11px 20px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-top: 16px;
  transition: background 0.15s;
}
.cta-btn:hover { background: var(--accent-soft); }

/* ── Case-study: a small "spec table" component ──────────────── */
.spec-table {
  width: 100%;
  margin: 24px 0 32px;
  border-top: 1px solid var(--rule);
  border-collapse: collapse;
}
.spec-table tr { border-bottom: 1px solid var(--rule-soft); }
.spec-table td {
  padding: 14px 0;
  font-size: 16px;
  vertical-align: top;
  line-height: 1.5;
}
.spec-table td:first-child {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  width: 200px;
  padding-right: 24px;
  padding-top: 17px;
}
.spec-table td:last-child { color: var(--ink-soft); }

@media (max-width: 640px) {
  .article-title { font-size: 32px; }
  .article-deck { font-size: 18px; }
  .h2 { font-size: 24px; }
  .pullquote { font-size: 20px; padding-left: 16px; }
  .spec-table td:first-child { width: auto; display: block; padding-bottom: 4px; padding-top: 14px; }
  .spec-table td:last-child { display: block; padding-top: 0; padding-bottom: 14px; }
  .spec-table tr { display: block; }
  .topnav { padding-top: 20px; }
}
