/* ==========================================================================
   ConsultingByte — Blog Article Stylesheet
   Palette pulled from the Agentic AI coordination infographic:
   cream field, deep teal ink, warm ochre accent.
   ========================================================================== */

:root {
  --bg: #f8f4ec;
  --panel: #ffffff;
  --ink: #17322f;
  --ink-soft: #3d514d;
  --muted: #6b7876;
  --accent: #bd7b3e;
  --accent-soft: #f1e3d1;
  --teal: #2f6f68;
  --teal-soft: #e7f0ee;
  --rule: #e3dcc9;
  --max-w: 760px;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

a { color: var(--teal); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img { max-width: 100%; display: block; }

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.masthead-bar {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.masthead-bar span { display: inline-flex; align-items: center; gap: 6px; }

.masthead-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.masthead-tags {
  display: flex;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.masthead-tags a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.masthead-tags a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Article shell ---------- */

.article {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

h1.title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 20px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.byline strong { color: var(--ink-soft); font-weight: 600; }
.byline .dot { color: var(--rule); }

/* ---------- Hero figure ---------- */

.hero-figure {
  margin: 0 0 48px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #fff;
}

.hero-figure img { width: 100%; height: auto; }

.hero-figure figcaption {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  padding: 12px 18px;
  border-top: 1px solid var(--rule);
  background: var(--panel);
}

/* ---------- Body copy ---------- */

.article p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 17px;
}

.article p:first-of-type {
  font-size: 19px;
  color: var(--ink);
}

.article strong { color: var(--ink); }

.article h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--ink);
  margin: 44px 0 18px;
  line-height: 1.25;
}

.article h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--teal);
  margin: 32px 0 12px;
}

.article ul,
.article ol {
  margin: 0 0 24px;
  padding-left: 22px;
  color: var(--ink-soft);
}

.article li {
  margin-bottom: 8px;
  font-size: 17px;
}

.article em { color: var(--ink); }

/* ---------- Pull callout (echoes the "real design problem" box) ---------- */

.callout {
  background: var(--teal-soft);
  border: 1px solid #d3e6e2;
  border-radius: 12px;
  padding: 26px 28px;
  margin: 8px 0 40px;
  display: flex;
  gap: 18px;
}

.callout .mark {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  display: grid;
  place-items: center;
  color: var(--teal);
  font-family: var(--font-display);
  font-weight: 700;
}

.callout p {
  margin: 0;
  color: var(--ink);
  font-size: 16.5px;
}

.callout strong { color: var(--teal); }

/* ---------- Closing question block ---------- */

.closing {
  margin-top: 48px;
  padding: 30px 0 0;
  border-top: 1px solid var(--rule);
}

.closing .question {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  margin: 0;
}

/* ---------- Tags / footer ---------- */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border: 1px solid #e6d2b3;
  padding: 6px 12px;
  border-radius: 999px;
}

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 40px;
}

.site-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}

.site-footer strong { color: var(--ink-soft); display: block; margin-bottom: 4px; }

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

@media (max-width: 640px) {
  .masthead-bar { justify-content: center; }
  .masthead-tags { display: none; }
  .article { padding: 36px 18px 72px; }
  .callout { flex-direction: column; }
}

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

/* ==========================================================================
   Homepage (one-page site) — sections beyond the article template
   ========================================================================== */

.masthead-main.home-nav {
  align-items: center;
}

.home-nav .masthead-tags a {
  border-bottom: none;
}

.home-nav .masthead-tags a:hover {
  color: var(--accent);
}

.cta-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--teal);
  padding: 9px 18px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.cta-pill:hover { background: #245a54; }

/* ---------- Hero ---------- */

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 24px 56px;
  text-align: left;
}

.hero .eyebrow { justify-content: flex-start; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 24px;
  max-width: 15ch;
}

.hero .lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 32px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  background: #fff;
  padding: 7px 14px;
  border-radius: 999px;
}

.chip.is-accent {
  color: var(--accent);
  border-color: #e6cba3;
  background: var(--accent-soft);
}

/* ---------- Section scaffolding ---------- */

.section {
  max-width: 980px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 40px;
}

.section-head .eyebrow { margin-bottom: 14px; }

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.2;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 16.5px;
  margin: 0;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--rule);
  max-width: 980px;
  margin: 0 auto;
}

.section.tinted {
  background: #f2ece0;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.section.tinted > .section-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Thesis ---------- */

.thesis {
  max-width: 720px;
}

.thesis p {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.thesis p:first-child { color: var(--ink); font-size: 20px; }

/* ---------- Pillars grid ---------- */

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.pillar-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px 22px;
}

.pillar-card .pillar-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--teal-soft);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--teal);
}

.pillar-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}

.pillar-card p {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

/* ---------- Latency stack diagram ---------- */

.stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.stack-row {
  display: grid;
  grid-template-columns: 64px 1fr 2fr;
  align-items: center;
  background: #fff;
  padding: 16px 20px;
  gap: 18px;
  position: relative;
}

.stack-row + .stack-row { border-top: 1px dashed var(--rule); }

.stack-row .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  border: 1px solid #e6cba3;
  background: var(--accent-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.stack-row .label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
}

.stack-row .desc {
  font-size: 14px;
  color: var(--muted);
}

.stack-row.is-outcome {
  background: var(--teal-soft);
}

.stack-row.is-outcome .num {
  color: var(--teal);
  border-color: #bcdad4;
  background: #fff;
}

.stack-row.is-outcome .label { color: var(--teal); }

/* ---------- Approach steps (genuinely sequential — numbered) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.step {
  padding: 26px 22px;
  position: relative;
}

.step + .step { border-left: 1px solid var(--rule); }

.step .step-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  display: block;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
}

.step p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.step-arrow {
  position: absolute;
  right: -11px;
  top: 26px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 12px;
  z-index: 2;
}

/* ---------- Frameworks ---------- */

.frameworks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.framework-card {
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.framework-card .fw-mark {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ink);
  color: #f8f4ec;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
}

.framework-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.framework-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Insights teaser ---------- */

.insight-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

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

.insight-card .thumb {
  background: var(--teal-soft);
}

.insight-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.insight-card .copy {
  padding: 26px 26px 26px 0;
}

.insight-card .copy .eyebrow { margin-bottom: 10px; }

.insight-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.25;
}

.insight-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 16px;
  line-height: 1.65;
}

.insight-card .read-more {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
}

/* ---------- Contact form ---------- */

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-intro h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--ink);
  margin: 0 0 14px;
  line-height: 1.2;
}

.contact-intro p {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 22px;
  max-width: 42ch;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.contact-detail .dot-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 30px;
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}

.field.required label::after {
  content: " *";
  color: var(--accent);
}

.form-submit {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--teal);
  border: none;
  padding: 14px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
  justify-self: start;
}

.form-submit:hover { background: #245a54; }
.form-submit:disabled { background: var(--muted); cursor: not-allowed; }

.form-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.form-status {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  display: none;
}

.form-status.is-visible { display: block; }
.form-status.is-success { background: var(--teal-soft); color: var(--teal); }
.form-status.is-error { background: #fbe7e2; color: #a03a25; }

@media (max-width: 860px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Final CTA ---------- */

.final-cta {
  text-align: left;
  background: var(--ink);
  border-radius: 16px;
  padding: 48px 44px;
  color: #f8f4ec;
}

.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 14px;
  color: #fff;
}

.final-cta p {
  color: #cfe0dc;
  font-size: 15.5px;
  max-width: 56ch;
  margin: 0 0 24px;
}

.final-cta .cta-pill {
  background: var(--accent);
  color: #221a10;
  font-weight: 600;
}

.final-cta .cta-pill:hover { background: #cf9152; }

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

@media (max-width: 860px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step + .step { border-left: none; border-top: 1px solid var(--rule); }
  .step-arrow { display: none; }
  .frameworks-grid { grid-template-columns: 1fr; }
  .insight-card { grid-template-columns: 1fr; }
  .insight-card .thumb { height: 200px; }
  .insight-card .copy { padding: 22px; }
}

@media (max-width: 600px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .final-cta { padding: 34px 24px; }
}
