/* ── QuantumNest blog stylesheet ───────────────────────────────────────────
   Shared by every post under /insights/. Match the editorial typography of
   the main site so a post never feels like a different website. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; background: #F8FAFF; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #0F172A;
  line-height: 1.75;
  position: relative;
  overflow-x: hidden;
}

/* ── Ambient background (very subtle, for visual continuity with main site) */
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: linear-gradient(180deg, #F8FAFF 0%, #F0F4FF 100%);
}
.ambient::before, .ambient::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35;
}
.ambient::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #C7D2FE 0%, transparent 70%);
  top: -150px; left: -100px;
}
.ambient::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #A5F3FC 0%, transparent 70%);
  top: 40%; right: -120px;
}
body > * { position: relative; z-index: 1; }

/* ── Top nav bar ───────────────────────────────────────────────────────── */
.topbar {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #E0E7FF;
  padding: 16px 32px;
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar a.home { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #0F172A; }
.topbar a.home img { height: 40px; width: auto; display: block; }
.topbar a.home .sub {
  font-size: .58rem; color: #64748B; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; border-left: 1px solid #C7D2FE; padding-left: 10px; line-height: 1.3;
}
.topbar nav { display: flex; gap: 4px; align-items: center; }
.topbar nav a {
  font-size: .85rem; font-weight: 500; color: #475569; text-decoration: none;
  padding: 8px 14px; border-radius: 8px; transition: background .2s, color .2s;
}
.topbar nav a:hover { background: #EEF2FF; color: #4338CA; }
.topbar nav a.cta { background: #4338CA; color: white; font-weight: 600; padding: 9px 18px; }
.topbar nav a.cta:hover { background: #6366F1; color: white; }
@media (max-width: 720px) {
  .topbar nav a:not(.cta) { display: none; }
}

/* ── Article shell ─────────────────────────────────────────────────────── */
article.post {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 32px 32px;
}
@media (max-width: 600px) {
  article.post { padding: 48px 22px 24px; }
}

/* ── Header ────────────────────────────────────────────────────────────── */
.post-header { margin-bottom: 40px; }
.post-header .eyebrow {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #4338CA; background: #EEF2FF; padding: 5px 13px; border-radius: 100px;
  margin-bottom: 22px;
}
.post-header h1 {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.12;
  margin-bottom: 22px;
  color: #0F172A;
}
.post-header h1 em {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #4338CA;
  letter-spacing: -.005em;
}
.byline {
  display: flex; align-items: center; gap: 10px;
  font-size: .88rem; color: #64748B; flex-wrap: wrap;
}
.byline strong { color: #0F172A; font-weight: 600; }
.byline .dot { width: 3px; height: 3px; border-radius: 50%; background: #CBD5E1; display: inline-block; }

/* ── Hero figure ───────────────────────────────────────────────────────── */
.hero-figure {
  margin: 0 0 56px;
  border-radius: 18px;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid #E0E7FF;
  box-shadow: 0 8px 32px rgba(67,56,202,.08);
}
.hero-figure svg { display: block; width: 100%; height: auto; }
.hero-figure figcaption {
  font-size: .82rem; color: #64748B; padding: 14px 22px;
  border-top: 1px solid #E0E7FF; background: #F8FAFF;
}

/* ── Body typography ───────────────────────────────────────────────────── */
.post-body { font-size: 1.08rem; line-height: 1.78; color: #1E293B; }
.post-body p { margin-bottom: 22px; text-align: justify; hyphens: none; -webkit-hyphens: none; }
.post-body p.lead {
  font-size: 1.22rem; line-height: 1.65; color: #0F172A; margin-bottom: 32px;
  text-align: left;
}
.post-body p.drop-cap::first-letter {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-style: normal; font-size: 3.6em; line-height: .85;
  float: left; padding: .05em .1em 0 0; color: #4338CA; font-weight: 400;
}

.post-body h2 {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 1.6rem; font-weight: 700; letter-spacing: -.025em;
  margin: 48px 0 18px; color: #0F172A; line-height: 1.25;
}
.post-body h3 {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 1.18rem; font-weight: 700; letter-spacing: -.015em;
  margin: 32px 0 12px; color: #0F172A;
}

.post-body ul, .post-body ol { margin: 0 0 24px 22px; }
.post-body li { margin-bottom: 8px; color: #1E293B; }
.post-body ul li::marker { color: #4338CA; }

.post-body strong { font-weight: 600; color: #0F172A; }
.post-body a { color: #4338CA; text-decoration: underline; text-decoration-color: #C7D2FE; text-underline-offset: 3px; }
.post-body a:hover { text-decoration-color: #4338CA; }

.post-body code {
  font-family: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
  font-size: .9em; background: #EEF2FF; color: #4338CA;
  padding: 2px 7px; border-radius: 5px;
}

/* ── Pull quote ─────────────────────────────────────────────────────── */
.post-body blockquote {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-style: normal; font-weight: 400;
  font-size: 1.55rem; line-height: 1.4; color: #0F172A;
  border-left: 3px solid #4338CA;
  padding: 8px 0 8px 28px;
  margin: 36px 0;
  letter-spacing: -.005em;
}
.post-body blockquote cite {
  display: block; font-family: 'DM Sans', sans-serif;
  font-style: normal; font-size: .85rem; color: #64748B;
  margin-top: 14px; font-weight: 500;
}

/* ── Inline figures and diagrams ──────────────────────────────────────── */
.post-body figure.inline {
  margin: 36px 0;
  border-radius: 14px;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid #E0E7FF;
}
.post-body figure.inline svg { display: block; width: 100%; height: auto; padding: 24px; }
.post-body figure.inline figcaption {
  font-size: .82rem; color: #64748B; padding: 12px 22px;
  border-top: 1px solid #E0E7FF; background: #F8FAFF;
}

/* ── Callout boxes ────────────────────────────────────────────────────── */
.post-body .callout {
  margin: 32px 0; padding: 20px 24px;
  border-radius: 12px; border-left: 3px solid #4338CA;
  background: rgba(238,242,255,.6);
}
.post-body .callout strong { display: block; margin-bottom: 6px; color: #4338CA; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.post-body .callout p:last-child { margin-bottom: 0; }

/* ── Post footer CTA ──────────────────────────────────────────────────── */
.post-footer {
  margin-top: 64px; padding: 36px 40px;
  border-radius: 18px;
  background: linear-gradient(135deg, #3730A3, #4338CA 60%, #0070D2);
  color: white; text-align: center;
}
.post-footer h3 {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 10px; color: white;
}
.post-footer p { font-size: .98rem; opacity: .85; margin-bottom: 22px; max-width: 480px; margin-left: auto; margin-right: auto; }
.post-footer a.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; color: #0F172A; text-decoration: none;
  padding: 13px 26px; border-radius: 10px; font-weight: 700; font-size: .95rem;
  transition: transform .2s, box-shadow .2s;
}
.post-footer a.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* ── Related insights ─────────────────────────────────────────────────── */
.related {
  max-width: 1080px; margin: 0 auto; padding: 80px 32px 24px;
}
.related h3 {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #64748B; margin-bottom: 24px;
}
.related-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.related-grid a.card {
  display: block; background: white; padding: 24px 22px;
  border-radius: 14px; border: 1px solid #E0E7FF;
  text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.related-grid a.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(67,56,202,.12); border-color: #C7D2FE; }
.related-grid a.card .rtag { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #4338CA; }
.related-grid a.card .rtitle {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 1.18rem; line-height: 1.25; color: #0F172A;
  margin: 8px 0 8px;
}
.related-grid a.card .rmeta { font-size: .78rem; color: #94A3B8; }
@media (max-width: 880px) { .related-grid { grid-template-columns: 1fr; } }

/* ── Site footer ──────────────────────────────────────────────────────── */
footer.minimal {
  background: #0B1220; color: rgba(255,255,255,.55);
  padding: 36px 32px; text-align: center;
  margin-top: 64px;
}
footer.minimal a { color: rgba(255,255,255,.75); text-decoration: none; font-weight: 500; }
footer.minimal a:hover { color: white; }
footer.minimal .row { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; font-size: .85rem; }
footer.minimal .copy { font-size: .8rem; opacity: .7; }

/* ── Accessibility ────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid #4338CA; outline-offset: 3px; border-radius: 6px; }
::selection { background: #E0E7FF; color: #3730A3; }


/* ── CATEGORY THEMES ───────────────────────────────────────────────────
   Each category sets a small palette of custom properties. The rules below
   reference these, so a single class on <body> retints the whole page. */
body {
  --theme-primary: #4338CA;
  --theme-secondary: #0070D2;
  --theme-accent: #22D3EE;
  --theme-primary-soft: #EEF2FF;
  --theme-bg-grad-1: #C7D2FE;
  --theme-bg-grad-2: #A5F3FC;
  --theme-cta-from: #3730A3;
  --theme-cta-mid: #4338CA;
  --theme-cta-to: #0070D2;
}
body.theme-salesforce {
  /* defaults above */
}
body.theme-engineering {
  --theme-primary: #6D28D9;
  --theme-secondary: #DB2777;
  --theme-accent: #A855F7;
  --theme-primary-soft: #F5F3FF;
  --theme-bg-grad-1: #DDD6FE;
  --theme-bg-grad-2: #FBCFE8;
  --theme-cta-from: #4C1D95;
  --theme-cta-mid: #6D28D9;
  --theme-cta-to: #DB2777;
}
body.theme-architecture {
  --theme-primary: #0F766E;
  --theme-secondary: #059669;
  --theme-accent: #14B8A6;
  --theme-primary-soft: #ECFDF5;
  --theme-bg-grad-1: #99F6E4;
  --theme-bg-grad-2: #BBF7D0;
  --theme-cta-from: #134E4A;
  --theme-cta-mid: #0F766E;
  --theme-cta-to: #059669;
}
body.theme-delivery {
  --theme-primary: #C2410C;
  --theme-secondary: #B45309;
  --theme-accent: #F59E0B;
  --theme-primary-soft: #FFF7ED;
  --theme-bg-grad-1: #FED7AA;
  --theme-bg-grad-2: #FDE68A;
  --theme-cta-from: #9A3412;
  --theme-cta-mid: #C2410C;
  --theme-cta-to: #B45309;
}
body.theme-ai {
  --theme-primary: #BE185D;
  --theme-secondary: #7C3AED;
  --theme-accent: #F472B6;
  --theme-primary-soft: #FDF2F8;
  --theme-bg-grad-1: #FBCFE8;
  --theme-bg-grad-2: #DDD6FE;
  --theme-cta-from: #831843;
  --theme-cta-mid: #BE185D;
  --theme-cta-to: #7C3AED;
}

/* Ambient backdrop honours the theme palette. */
.ambient::before { background: radial-gradient(circle, var(--theme-bg-grad-1) 0%, transparent 70%) !important; }
.ambient::after  { background: radial-gradient(circle, var(--theme-bg-grad-2) 0%, transparent 70%) !important; }

/* Eyebrow, top-nav CTA, h1 italic accent, drop cap, lists, links, focus */
.post-header .eyebrow { color: var(--theme-primary) !important; background: var(--theme-primary-soft) !important; }
.post-header h1 em    { color: var(--theme-primary) !important; }
.post-body p.drop-cap::first-letter { color: var(--theme-primary) !important; }
.post-body ul li::marker { color: var(--theme-primary) !important; }
.post-body a { color: var(--theme-primary) !important; text-decoration-color: var(--theme-bg-grad-1) !important; }
.post-body a:hover { text-decoration-color: var(--theme-primary) !important; }
.post-body code { background: var(--theme-primary-soft) !important; color: var(--theme-primary) !important; }
.post-body blockquote { border-left-color: var(--theme-primary) !important; }
.post-body .callout { border-left-color: var(--theme-primary) !important; background: var(--theme-primary-soft) !important; }
.post-body .callout strong { color: var(--theme-primary) !important; }
.post-footer { background: linear-gradient(135deg, var(--theme-cta-from), var(--theme-cta-mid) 60%, var(--theme-cta-to)) !important; }
.related-grid a.card:hover { border-color: var(--theme-bg-grad-1) !important; box-shadow: 0 10px 30px rgba(0,0,0,.08) !important; }
.related-grid a.card .rtag { color: var(--theme-primary) !important; }
.topbar nav a:hover { background: var(--theme-primary-soft) !important; color: var(--theme-primary) !important; }
.topbar nav a.cta { background: var(--theme-primary) !important; }
.topbar nav a.cta:hover { background: var(--theme-secondary) !important; }
:focus-visible { outline-color: var(--theme-primary) !important; }
::selection { background: var(--theme-bg-grad-1) !important; color: var(--theme-cta-from) !important; }
