/* ============================================================================
   ELM Strategy — shared styles for the content pages
   (/services, /about, /case-studies, /notes)

   The homepage at / is the spreadsheet app and carries its own inline styles.
   These pages are the plain, scrollable, crawlable version of the same brand.
   Tokens are copied from website/index.html so the two stay in sync.
   ========================================================================= */

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

:root {
  --bg: #FBFAF7;
  --bg-2: #F1EDE1;
  --bg-3: #FEFDFA;
  --ink: #0E0D0B;
  --ink-2: #5F5A51;
  --ink-3: #9A9385;
  --grid: #E5E0D3;
  --grid-strong: #D0CAB8;
  --accent: #E65EE8;        /* the one accent pink, used everywhere */
  --accent-soft: rgba(230,94,232,0.14);
  --accent-2: #1F8A7A;      /* teal, labels and confirmations */
  --accent-3: var(--accent); /* one pink everywhere: links, small type and stats */
  --accent-4: #7048D4;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans);
  font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

a { color: inherit; }
a.link { color: var(--accent-3); text-decoration: underline; text-decoration-color: rgba(230,94,232,0.45); text-underline-offset: 3px; }
a.link:hover { text-decoration-color: var(--accent-3); }

.mono { font-family: var(--mono); }

/* ------------------------------------------------------------- buttons --- */
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  padding: 14px 22px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  border-radius: 3px; cursor: pointer; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--grid-strong); }
.btn.ghost:hover { border-color: var(--ink); }

/* -------------------------------------------------------------- header --- */
header.site { padding: 20px 0; border-bottom: 1px solid var(--grid); background: var(--bg-2); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
header.site .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
header.site .brand img { height: 24px; width: auto; }
header.site nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
header.site nav a {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-2); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
header.site nav a:hover { color: var(--ink); }
header.site nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------ page head --- */
.page-head { padding: 68px 0 0; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; color: var(--accent-2);
  letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent-2); }
h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(31px, 4.4vw, 47px); line-height: 1.1; letter-spacing: -0.03em;
  max-width: 18ch;
}
h1 i { font-style: italic; color: var(--accent); }
.lede { font-size: 19px; line-height: 1.65; color: var(--ink-2); max-width: 56ch; margin-top: 22px; }
.lede b { color: var(--ink); font-weight: 600; }
.page-head .ctas { display: flex; gap: 12px; align-items: center; margin-top: 30px; flex-wrap: wrap; }

/* ---------------------------------------------------------- section head --- */
.section-head { padding: 68px 0 0; }
.section-head .ref {
  font-family: var(--mono); font-size: 10px;
  color: var(--accent-3); letter-spacing: 0.11em; margin-bottom: 14px; text-transform: uppercase;
}
h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(25px, 3.6vw, 34px);
  line-height: 1.14; letter-spacing: -0.025em; max-width: 24ch;
}
h2 i { font-style: italic; color: var(--accent); }
h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; letter-spacing: -0.015em; }
.dek { font-size: 15.5px; color: var(--ink-2); margin-top: 14px; max-width: 60ch; }

/* --------------------------------------------------------------- prose --- */
.prose { max-width: 68ch; }
.prose p { margin-top: 18px; font-size: 16.5px; line-height: 1.72; color: var(--ink); }
.prose p.sub { color: var(--ink-2); }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 34px; font-size: 19px; }
.prose ul, .prose ol { margin-top: 18px; padding-left: 0; list-style: none; }
.prose ul li, .prose ol li {
  position: relative; padding-left: 22px; margin-top: 10px; line-height: 1.6; font-size: 15.5px;
}
.prose ul li::before { content: '·'; position: absolute; left: 6px; color: var(--accent-3); font-weight: 700; }
.prose ol { counter-reset: n; }
.prose ol li { padding-left: 30px; }
.prose ol li::before {
  counter-increment: n; content: counter(n); position: absolute; left: 0; top: 1px;
  font-family: var(--mono); font-size: 11px; color: var(--accent-3);
}
.prose b, .prose strong { font-weight: 600; }
.prose blockquote {
  margin-top: 26px; padding: 20px 24px; background: var(--bg-2);
  border-left: 2px solid var(--accent); border-radius: 0 4px 4px 0;
}
.prose blockquote p { margin-top: 0; font-family: var(--serif); font-size: 18px; line-height: 1.5; }
.prose blockquote p + p { margin-top: 12px; }

/* --------------------------------------------------------------- steps --- */
.steps { margin-top: 34px; border-top: 1px solid var(--grid); }
.step { display: grid; grid-template-columns: 62px 1fr; gap: 22px; padding: 30px 0; border-bottom: 1px solid var(--grid); }
.step .num {
  font-family: var(--mono); font-size: 26px; font-weight: 700;
  color: var(--accent-soft); line-height: 1; -webkit-text-stroke: 0;
}
.step .num span { color: var(--accent-3); }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: 15px; line-height: 1.62; max-width: 62ch; }
.step .deliverable {
  margin-top: 14px; font-family: var(--mono); font-size: 11.5px;
  line-height: 1.55; color: var(--ink); background: rgba(31,138,122,0.09);
  border-radius: 3px; padding: 9px 12px; display: inline-block; max-width: 62ch;
}
.step .deliverable b { color: var(--accent-2); font-weight: 500; letter-spacing: 0.04em; }

/* --------------------------------------------------------------- cards --- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-3); border: 1px solid var(--grid-strong); border-radius: 12px;
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 10px 30px rgba(14,13,11,0.045);
}
.card .label {
  font-family: var(--mono); font-size: 10px; color: var(--accent-2);
  letter-spacing: 0.09em; text-transform: uppercase;
}
.card h3 { font-size: 18px; line-height: 1.25; }
.card p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
/* gap guarantees clearance; margin-top:auto still pins the proof to the card floor */
.card ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.card ul li { font-size: 13.5px; padding-left: 18px; position: relative; color: var(--ink); line-height: 1.45; }
.card ul li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; font-size: 11px; top: 2px; }
.card .proof {
  margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--grid-strong);
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-2); line-height: 1.5;
}
.card .proof b { color: var(--accent-3); font-weight: 500; }

/* ---------------------------------------------------------- case study --- */
.case {
  border: 1px solid var(--grid-strong); border-radius: 12px; background: var(--bg-3);
  padding: 30px; margin-top: 24px;
}
.case .who {
  font-family: var(--mono); font-size: 10.5px; color: var(--accent-3);
  letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 14px;
}
.case h3 { font-size: 22px; line-height: 1.22; margin-bottom: 6px; max-width: 26ch; }
.case .anon {
  font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px;
  font-family: var(--mono);
}
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--grid); border: 1px solid var(--grid); margin: 22px 0; }
.case-grid > div { background: var(--bg-3); padding: 18px; }
.case-grid dt {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}
.case-grid dd { font-size: 14px; line-height: 1.55; color: var(--ink); }
.results { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.results .stat {
  border: 1px solid var(--grid-strong); border-radius: 6px; padding: 14px 18px; background: var(--bg);
  min-width: 140px; flex: 1;
}
.results .stat .n {
  font-family: var(--mono); font-size: 24px; font-weight: 700;
  color: var(--accent-3); line-height: 1;
}
.results .stat .t { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }

/* ------------------------------------------------------------ post list --- */
.posts { margin-top: 34px; border-top: 1px solid var(--grid); }
.post-row {
  display: grid; grid-template-columns: 108px 1fr; gap: 22px; padding: 26px 0;
  border-bottom: 1px solid var(--grid); text-decoration: none; align-items: baseline;
}
.post-row:hover h3 { color: var(--accent-3); }
.post-row time { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }
.post-row h3 { font-size: 20px; line-height: 1.25; margin-bottom: 8px; max-width: 34ch; }
.post-row p { font-size: 14.5px; color: var(--ink-2); line-height: 1.58; max-width: 62ch; }

/* ----------------------------------------------------------------- faq --- */
.faq { margin-top: 20px; }
.faq-item { border-bottom: 1px solid var(--grid); }
.faq-item summary {
  padding: 20px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 20px; font-size: 16px; font-weight: 500; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--mono); font-size: 18px; color: var(--ink-3); flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; color: var(--accent-3); }
.faq-item .a { padding-bottom: 22px; }
.faq-item .a p { font-size: 15px; color: var(--ink-2); line-height: 1.65; max-width: 64ch; }
.faq-item .a p + p { margin-top: 12px; }

/* ------------------------------------------------------------- callouts --- */
.strip { background: var(--bg-2); border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); padding: 48px 0; margin-top: 68px; }
.strip .wrap { display: grid; grid-template-columns: 104px 1fr; gap: 28px; align-items: start; }
.strip .portrait { width: 104px; height: 104px; border-radius: 50%; overflow: hidden; border: 1px solid var(--grid-strong); }
.strip .portrait img { width: 100%; height: 100%; object-fit: cover; }
.strip h3 { margin-bottom: 12px; font-size: 21px; }
.strip p { font-size: 14.5px; line-height: 1.62; max-width: 64ch; }
.strip p + p { margin-top: 10px; }

.final-cta { background: var(--bg-2); border-top: 1px solid var(--grid); padding: 68px 0; text-align: center; margin-top: 68px; }
.final-cta h2 { max-width: 22ch; margin: 0 auto 16px; }
.final-cta p { color: var(--ink-2); max-width: 50ch; margin: 0 auto 28px; font-size: 15.5px; }

/* -------------------------------------------------------------- footer --- */
footer.site { padding: 34px 0; border-top: 1px solid var(--grid); }
footer.site .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
footer.site .fine { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
footer.site .fine a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--grid-strong); }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------------------------------------------------------- responsive --- */
@media (max-width: 760px) {
  .cards, .cards.two { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .strip .wrap { grid-template-columns: 1fr; }
  .strip .portrait { width: 76px; height: 76px; }
  .post-row { grid-template-columns: 1fr; gap: 8px; }
  /* nav needs a full-width line of its own, otherwise it sizes to max-content
     inside the column flex and pushes the page wider than the viewport */
  header.site .wrap { flex-direction: column; align-items: stretch; gap: 14px; }
  header.site .brand { align-self: flex-start; }
  header.site nav { width: 100%; gap: 14px 18px; }
  footer.site .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .page-head { padding-top: 44px; }
  .step { grid-template-columns: 40px 1fr; gap: 14px; }
  .step .num { font-size: 20px; }
  .case { padding: 22px; }
}

@media print { header.site nav, .final-cta { display: none; } }
