/* ──────────────────────────────────────────────────────────────────────────
   WM Commercial Advisory — Brand & Site System
   Canonical source: 02_Brand_Identity/css/brand.css
   Mirror copy:      09_Website/css/brand.css
   Keep both in sync. Design tokens live in :root below.
   ────────────────────────────────────────────────────────────────────────── */

/* TOKENS ─────────────────────────────────────────────────────────────────── */
:root {
  /* Palette — Decision Ink */
  --ink:       #0B1F3A;   /* Decision Ink — primary */
  --ink-soft:  #1A3052;   /* Hover / pressed states for ink */
  --parchment: #F4EFE7;   /* Primary surface */
  --soft:      #F7F4EE;   /* Quieter surface (cards, swatches) */
  --sage:      #2E7D5A;   /* Plotline Sage — signal accent */
  --sage-deep: #225E43;   /* Darker sage for active states */
  --amber:     #C8923A;   /* Diagnostic Amber — secondary accent */
  --rule:      #BFB8AC;   /* Rule Grey — dividers */
  --body:      #3A3A3A;   /* Reading Grey — body text */
  --body-soft: #6B6B6B;   /* Reduced-emphasis body */

  /* Typography */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono:  'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  /* Scale */
  --container: 1100px;
  --reading:   720px;
  --pad-page-x: clamp(20px, 4vw, 56px);
  --pad-page-y: clamp(48px, 6vw, 96px);

  /* Vertical rhythm */
  --gap-xs: 6px;
  --gap-s:  12px;
  --gap-m:  24px;
  --gap-l:  48px;
  --gap-xl: 96px;
}

/* RESET ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "calt";
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--sage); }
p { margin: 0 0 14px; }
hr { border: none; border-top: 1px solid var(--rule); margin: var(--gap-m) 0; }
button { font: inherit; }

/* TYPE ───────────────────────────────────────────────────────────────────── */
.h-display, .tagline {
  font-family: var(--serif); font-weight: 600;
  color: var(--ink); line-height: 0.98;
  letter-spacing: -0.02em;
  font-size: clamp(54px, 8vw, 92px);
}
h1, .h1 {
  font-family: var(--serif); font-weight: 600;
  color: var(--ink); line-height: 1.1;
  letter-spacing: -0.01em;
  font-size: clamp(36px, 4.5vw, 52px);
  margin: 0 0 16px;
}
h2, .h2 {
  font-family: var(--serif); font-weight: 600;
  color: var(--ink); line-height: 1.15;
  letter-spacing: -0.005em;
  font-size: clamp(26px, 3vw, 34px);
  margin: var(--gap-l) 0 14px;
}
h3, .h3 {
  font-family: var(--sans); font-weight: 600;
  color: var(--ink); font-size: 18px; line-height: 1.4;
  margin: var(--gap-m) 0 8px;
  letter-spacing: -0.005em;
}
.lede {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--body); font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.5; max-width: var(--reading);
}
.caption, .pillar {
  font-family: var(--sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sage);
}
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }

/* LAYOUT ─────────────────────────────────────────────────────────────────── */
.wrap { max-width: var(--container); margin: 0 auto; padding: var(--pad-page-y) var(--pad-page-x); }
.wrap-reading { max-width: var(--reading); margin: 0 auto; padding: var(--pad-page-y) var(--pad-page-x); }
.section { padding: var(--gap-xl) 0; }
.section + .section { border-top: 1px solid var(--rule); }

/* NAVIGATION ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 239, 231, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad-page-x);
}
.nav-brand {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  text-decoration: none; font-size: 15px; letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-brand .dot { color: var(--sage); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a {
  font-family: var(--sans); font-weight: 500; font-size: 14px;
  color: var(--ink); text-decoration: none;
}
.nav-links a.is-current { color: var(--sage); }
.nav-cta {
  padding: 9px 16px; border-radius: 2px; background: var(--ink);
  color: var(--parchment) !important; font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em; transition: background 0.18s ease;
}
.nav-cta:hover { background: var(--sage); color: var(--parchment) !important; }
@media (max-width: 740px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* BUTTONS ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 14px 22px; border-radius: 2px;
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: all 0.18s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--sage); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--parchment); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* HERO ───────────────────────────────────────────────────────────────────── */
.hero { padding: clamp(60px, 8vw, 120px) 0 clamp(60px, 8vw, 120px); }
.hero .tagline em { color: var(--sage); font-style: normal; }
.hero .pitch {
  font-family: var(--sans); font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55; color: var(--body);
  max-width: 680px; margin: 28px 0 36px;
}

/* CALLOUT ────────────────────────────────────────────────────────────────── */
.callout {
  background: var(--soft); border-top: 4px solid var(--ink);
  padding: 28px 32px; margin: var(--gap-m) 0;
}
.callout .callout-title {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  font-size: 20px; margin: 0 0 12px;
}
.callout p { font-size: 16px; line-height: 1.6; }
.callout p:last-child { margin-bottom: 0; }
.callout.amber { border-top-color: var(--amber); background: #FBF6EC; }
.callout.sage  { border-top-color: var(--sage);  background: #EDF3EE; }

/* THREE-COLUMN — Predict / Optimise / Embed ─────────────────────────────── */
.three-col {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
  margin: var(--gap-l) 0;
}
@media (max-width: 820px) { .three-col { grid-template-columns: 1fr; gap: 28px; } }
.col-card { padding-top: 24px; border-top: 2px solid var(--ink); }
.col-card .col-num {
  font-family: var(--mono); font-size: 13px; color: var(--sage);
  letter-spacing: 0.08em; margin-bottom: 8px;
}
.col-card h3 { margin-top: 0; font-size: 22px; font-family: var(--serif); }
.col-card .workstreams {
  list-style: none; padding: 0; margin: 14px 0 0;
}
.col-card .workstreams li {
  padding: 8px 0; border-top: 1px solid var(--rule);
  font-size: 14.5px; color: var(--body);
}
.col-card .workstreams li:first-child { border-top: none; padding-top: 0; }

/* FOUR PROBLEM CARDS ─────────────────────────────────────────────────────── */
.four-up {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin: var(--gap-l) 0;
}
@media (max-width: 980px) { .four-up { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .four-up { grid-template-columns: 1fr; } }
.problem-card {
  background: #fff; border: 1px solid var(--rule);
  padding: 22px 22px 24px; text-decoration: none; color: var(--body);
  display: block; transition: all 0.18s ease;
}
.problem-card:hover { border-color: var(--ink); transform: translateY(-2px); color: var(--body); }
.problem-card .num {
  font-family: var(--mono); font-size: 12px; color: var(--sage);
  letter-spacing: 0.1em; margin-bottom: 8px;
}
.problem-card h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: 19px; color: var(--ink); margin: 0 0 10px; line-height: 1.25;
}
.problem-card p { font-size: 14.5px; line-height: 1.55; margin: 0; }

/* PROOF STRIP ────────────────────────────────────────────────────────────── */
.proof { background: var(--ink); color: var(--parchment); padding: 64px var(--pad-page-x); }
.proof-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px;
  max-width: var(--container); margin: 0 auto;
}
@media (max-width: 820px) { .proof-grid { grid-template-columns: 1fr 1fr; row-gap: 36px; } }
.proof .num {
  font-family: var(--mono); font-weight: 500; font-size: clamp(34px, 3.8vw, 42px);
  color: #fff; line-height: 1.0; margin-bottom: 10px; letter-spacing: -0.01em;
}
.proof .num em { color: var(--sage); font-style: normal; }
.proof .cap { font-size: 13.5px; line-height: 1.55; color: rgba(244,239,231,0.78); }

/* WE / WE-DON'T ──────────────────────────────────────────────────────────── */
.we-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  background: #fff; border: 1px solid var(--rule); padding: 36px;
  margin: var(--gap-l) 0;
}
@media (max-width: 720px) { .we-row { grid-template-columns: 1fr; gap: 28px; padding: 28px; } }
.we-col h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 22px; margin: 0 0 14px; }
.we-col ul { list-style: none; padding: 0; margin: 0; }
.we-col li {
  padding: 12px 0 12px 26px; position: relative;
  font-size: 15.5px; line-height: 1.55; color: var(--body);
  border-top: 1px solid var(--rule);
}
.we-col li:first-child { border-top: none; }
.we-col.do  li::before { content: ""; position: absolute; left: 0; top: 20px; width: 14px; height: 1.5px; background: var(--sage); }
.we-col.dont li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; border: 1.5px solid var(--amber); border-radius: 50%; }

/* PILLAR TAGS ────────────────────────────────────────────────────────────── */
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  display: inline-block; padding: 5px 11px; border: 1px solid var(--ink);
  background: #fff; color: var(--ink);
  font-family: var(--sans); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none;
}
.tag.is-quant { background: var(--ink); color: var(--parchment); }
.tag-link:hover { background: var(--ink); color: var(--parchment); }

/* WRITING INDEX ─────────────────────────────────────────────────────────── */
.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { border-top: 1px solid var(--rule); padding: 28px 0; }
.article-list li:first-child { border-top: none; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.article-meta time, .article-meta .read-time {
  font-family: var(--mono); font-size: 12px; color: var(--body-soft);
}
.article-list h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; color: var(--ink); margin: 0 0 8px; line-height: 1.2; }
.article-list h3 a { color: var(--ink); text-decoration: none; }
.article-list h3 a:hover { color: var(--sage); }
.article-list .dek { font-size: 16px; line-height: 1.55; color: var(--body); max-width: 720px; margin: 0; }

/* ARTICLE BODY ───────────────────────────────────────────────────────────── */
.article-header { padding: clamp(60px, 6vw, 100px) 0 var(--gap-l); border-bottom: 1px solid var(--rule); }
.article-header h1 { font-size: clamp(34px, 4.5vw, 52px); margin: 12px 0 18px; }
.article-header .dek { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--body); line-height: 1.45; max-width: 720px; }
.article-body { padding: var(--gap-xl) 0; }
.article-body p { font-size: 18px; line-height: 1.7; margin: 0 0 22px; }
.article-body p:first-of-type::first-line { font-weight: 500; }
.article-body h2 { margin-top: var(--gap-l); font-size: 28px; }
.article-body blockquote {
  margin: var(--gap-l) 0; padding: 0 0 0 24px;
  border-left: 3px solid var(--sage);
  font-family: var(--serif); font-style: italic;
  font-size: 22px; color: var(--ink); line-height: 1.45;
}

/* SUBSCRIBE BLOCK ────────────────────────────────────────────────────────── */
.subscribe {
  background: var(--soft); padding: 36px 32px; margin: var(--gap-l) 0;
  border-left: 4px solid var(--sage);
}
.subscribe h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; }
.subscribe p { margin: 0 0 18px; font-size: 15.5px; color: var(--body); max-width: 560px; }
.subscribe form { display: flex; gap: 8px; flex-wrap: wrap; max-width: 560px; }
.subscribe input[type="email"] {
  flex: 1; min-width: 220px;
  padding: 12px 14px; border: 1px solid var(--rule); background: #fff;
  font-family: var(--sans); font-size: 15px; color: var(--ink); border-radius: 2px;
}
.subscribe input[type="email"]:focus { outline: none; border-color: var(--ink); }
.subscribe button { padding: 12px 18px; border: none; }

/* FORM ───────────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 16px; max-width: 540px; margin: var(--gap-m) 0; }
.field label { display: block; font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--rule); background: #fff;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  border-radius: 2px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { min-height: 120px; resize: vertical; }

/* FOOTER ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--soft); border-top: 1px solid var(--rule);
  padding: var(--gap-xl) var(--pad-page-x) var(--gap-l);
}
.site-footer .inner {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 56px;
}
@media (max-width: 820px) { .site-footer .inner { grid-template-columns: 1fr; gap: 36px; } }
.site-footer .brand-line { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 18px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 12px; }
.site-footer .tagline-small { font-family: var(--serif); font-style: italic; color: var(--sage); font-size: 18px; margin: 0 0 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 5px 0; }
.site-footer ul a { color: var(--body); font-size: 14px; text-decoration: none; }
.site-footer ul a:hover { color: var(--ink); }
.site-footer .meta { margin-top: var(--gap-l); padding-top: var(--gap-m); border-top: 1px solid var(--rule); display: flex; justify-content: space-between; font-size: 12.5px; color: var(--body-soft); flex-wrap: wrap; gap: 12px; max-width: var(--container); margin-left: auto; margin-right: auto; }

/* SIGNATURE PORTRAIT (placeholder block until photo replaces) ────────────── */
.portrait-block {
  background: var(--soft);
  border: 1px solid var(--rule);
  aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; color: var(--body-soft); letter-spacing: 0.1em;
}

/* RECENT WRITING ─────────────────────────────────────────────────────────── */
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: var(--gap-m) 0; }
@media (max-width: 820px) { .recent-grid { grid-template-columns: 1fr; gap: 24px; } }
.recent-grid .card { display: block; text-decoration: none; color: var(--body); border-top: 1px solid var(--ink); padding-top: 18px; }
.recent-grid .card h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 19px; line-height: 1.3; margin: 8px 0 8px; }
.recent-grid .card:hover h3 { color: var(--sage); }
.recent-grid .card .dek { font-size: 14.5px; line-height: 1.5; color: var(--body); margin: 0; }

/* LADDER (engagement model) ─────────────────────────────────────────────── */
.ladder { list-style: none; padding: 0; margin: var(--gap-m) 0; counter-reset: rung; }
.ladder li {
  position: relative; padding: 20px 0 20px 56px; border-top: 1px solid var(--rule);
  counter-increment: rung;
}
.ladder li:first-child { border-top: none; }
.ladder li::before {
  content: counter(rung);
  position: absolute; left: 0; top: 22px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--parchment);
  font-family: var(--mono); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.ladder .rung-title { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 17px; margin: 0 0 4px; }
.ladder .rung-meta { font-family: var(--mono); font-size: 12px; color: var(--sage); letter-spacing: 0.08em; margin-bottom: 8px; }
.ladder .rung-body { font-size: 15px; line-height: 1.55; margin: 0; }

/* SWATCH (brand guidelines) ─────────────────────────────────────────────── */
.swatch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .swatch-grid { grid-template-columns: 1fr 1fr; } }
.swatch { background: #fff; border: 1px solid var(--rule); }
.swatch .chip { height: 120px; }
.swatch .meta { padding: 18px 20px 20px; }
.swatch .name { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 18px; margin: 0 0 4px; }
.swatch .hex { font-family: var(--mono); color: var(--body); font-size: 13px; margin-bottom: 8px; }
.swatch .use { font-size: 13.5px; color: var(--body); line-height: 1.5; }

/* TYPE SPEC TABLE (brand guidelines) ─────────────────────────────────────── */
.type-block { background: #fff; border: 1px solid var(--rule); padding: 28px 32px; }
.type-row { padding: 22px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 220px 1fr; align-items: baseline; gap: 32px; }
.type-row:first-child { border-top: none; padding-top: 0; }
.type-row .role { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.type-row .role small { display: block; font-family: var(--mono); font-size: 11px; color: var(--body-soft); margin-top: 6px; text-transform: none; font-weight: 400; letter-spacing: 0.04em; }
@media (max-width: 720px) { .type-row { grid-template-columns: 1fr; gap: 8px; } }

/* SECTION LABEL ──────────────────────────────────────────────────────────── */
.section-label { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sage); margin-bottom: 14px; }
