/* ============================================================
   JACQUARD — Blog
   Sits on home.css (nav, footer, type helpers, res-card) and the
   design-system tokens. Adds the article reading surface.
   ============================================================ */

/* ---- Index ---- */
.blog-index { padding-top: 140px; }
.blog-index .sec-head { max-width: 640px; margin-bottom: 48px; }
.blog-index .sec-head h1 { font-size: clamp(40px, 5.4vw, 72px); margin: 14px 0 18px; }
.blog-index .sec-head p { color: var(--cream-2); margin: 0; }
.blog-index .eyebrow a { color: inherit; text-decoration: none; }
.blog-index .eyebrow a:hover { color: var(--pink); }
.blog-card-desc {
  display: block;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cream-3);
  margin-top: 8px;
}

/* ---- Article ---- */
.post { padding: 140px 0 96px; }
.post-wrap { max-width: 720px; }
.post-head .eyebrow a { color: inherit; text-decoration: none; }
.post-head .eyebrow a:hover { color: var(--pink); }
.post-title { font-size: clamp(36px, 4.6vw, 58px); margin: 16px 0 18px; }
.post-meta {
  font-family: var(--f-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-3);
  margin: 0 0 36px;
}
.post-meta a { color: var(--cream-2); text-decoration: underline; text-underline-offset: 2px; }
.post-meta a:hover { color: var(--pink); }

/* ---- Resources filter bar (category chips + article topics) ---- */
.blog-filters { margin: 0 0 30px; }
.blog-filters[hidden] { display: none; }
.bf-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.bf-row + .bf-row { margin-top: 12px; }
.bf-label {
  font-family: var(--f-label);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-3);
  margin-right: 4px;
}
.bf-chip {
  font-family: var(--f-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cream-2);
  background: transparent;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease);
}
.bf-chip:hover:not(:disabled) { border-color: var(--cream); color: var(--cream); }
.bf-chip:disabled { opacity: 0.35; cursor: default; }
.bf-chip.on {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #240016;
}
.bf-topics .bf-chip { font-size: 12.5px; padding: 6px 13px; }
.bf-topics.is-off .bf-label { color: var(--cream-4); }
.bf-topics.is-off .bf-chip.on { background: transparent; border-color: var(--hair-2); color: var(--cream-2); }
.bf-empty { margin: 18px 0 0; font-size: 15px; color: var(--cream-3); }
.res-card[hidden] { display: none; }

/* ---- Post header (chip · date · title · read time · author · share)
   The header band spans the full site container (.wrap); body copy
   lives in the narrower .post-wrap column below it. */
.post-head { margin-bottom: 44px; }
.post-head.has-media {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
}
.ph-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hair);
  border-radius: 14px;
}
/* Layered header collage with the Array backdrop. Sits behind the
   text planes (header copy + article column) and ignores the pointer,
   so bleeding layers can never cover copy or block clicks. */
.ph-collage {
  position: relative;
  aspect-ratio: 0.92;
  margin-right: -32px; /* bleed into the container gutter, like live */
  pointer-events: none;
  z-index: 1;
}
.post-head .ph-copy { position: relative; z-index: 2; }
.post .post-wrap { position: relative; z-index: 2; }
@media (max-width: 860px) {
  .ph-collage { margin-right: 0; }
}
/* The Array fans out from the top-right corner of the page across the
   whole header band (full-bleed backdrop behind the header content). */
.post-head-wrap { position: relative; }
.post-head-array {
  position: absolute;
  top: -130px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: calc(100% + 130px);
  pointer-events: none;
  z-index: -1;
}
.ph-collage .ph-layer {
  position: absolute;
  width: auto;
  border: 0;
  border-radius: 0;
  will-change: transform;
}
/* nth-of-type counts per element type, so these index the <img> layers
   directly (the canvas backdrop is a different type) */
/* The composition layers are pre-padded transparent squares from the
   live site; render them oversized so the artwork inside reads large,
   letting the transparent padding bleed past the box. */
.ph-collage .ph-layer:nth-of-type(1) { top: -8%; right: -12%; width: 128%; z-index: 2; }
.ph-collage .ph-layer:nth-of-type(2) { bottom: -2%; left: -20%; width: 92%; z-index: 3; }
.ph-collage .ph-layer:nth-of-type(3) { bottom: -8%; right: -4%; width: 78%; z-index: 4; }
.post-chip { margin: 0 0 14px; }
.post-chip a {
  display: inline-block;
  font-family: var(--f-label);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
  background: rgba(255, 230, 97, 0.12);
  border-radius: 4px;
  padding: 4px 10px;
  text-decoration: none;
}
.post-chip a:hover { background: rgba(255, 230, 97, 0.22); }
.post-date, .post-readtime {
  font-family: var(--f-label);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-3);
  margin: 0;
}
.post-head .post-title { margin: 14px 0 16px; }
.ph-label {
  font-family: var(--f-label);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-4);
}
.post-byline { display: flex; flex-direction: column; gap: 4px; margin: 26px 0 0; }
.post-byline a { color: var(--cream); text-decoration: none; font-family: var(--f-sans); font-size: 15px; font-weight: 600; }
.post-byline a:hover { color: var(--pink); }
.post-share { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; }
.post-share a {
  width: 30px; height: 30px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--cream-2);
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.post-share a:hover { border-color: var(--cream); color: var(--cream); }
@media (max-width: 860px) {
  .post-head.has-media { grid-template-columns: 1fr; gap: 26px; }
  .ph-media { order: -1; }
}

/* ---- In-body content blocks brought over from the live site ------- */
/* Section-divider ornament: the "machine type" icon drawn on hr */
.post-body hr {
  border: 0;
  width: 31px;
  height: 12px;
  margin: 44px 0 36px;
  background: var(--cream-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 31 12'%3E%3Cpath stroke='%23000' stroke-width='1.09' d='M.55.55H30v10.91H.55zm.54 10.36 28.36-9.82'/%3E%3C/svg%3E") no-repeat left center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 31 12'%3E%3Cpath stroke='%23000' stroke-width='1.09' d='M.55.55H30v10.91H.55zm.54 10.36 28.36-9.82'/%3E%3C/svg%3E") no-repeat left center / contain;
}
/* Highlighted phrases */
.post-body mark {
  background: var(--yellow);
  color: #240016;
  padding: 0 4px;
  border-radius: 3px;
}
/* Chip-labelled callout panels ("The benefit" boxes) */
.post-callout {
  background: rgba(255, 230, 97, 0.07);
  border: 1px solid rgba(255, 230, 97, 0.25);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 26px 0;
}
.post-callout .pc-label {
  display: block;
  font-family: var(--f-label);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 10px;
}
.post-callout p { margin: 0; color: var(--cream-2); }
.post-callout p + p { margin-top: 10px; }

/* Customer-story stat tiles */
.post-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 30px 0;
}
.post-stat {
  background: var(--page-panel);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-stat .ps-n {
  font-family: var(--f-display);
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: -0.02em;
  color: var(--cream);
}
.post-stat .ps-l { font-size: 14px; line-height: 1.5; color: var(--cream-2); }

/* ---- Related content (under each post) --------------------------- */
.post-related {
  margin-top: 72px;
  padding-top: 52px;
  border-top: 1px solid var(--hair);
}
.pr-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.pr-head h2 { font-size: clamp(28px, 3.4vw, 42px); margin: 0; }

/* Podcast episode player + in-body video embeds + show links */
.post-video, .post-embed {
  aspect-ratio: 16 / 9;
  margin: 0 0 40px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
  background: var(--page-panel);
}
/* In-body embeds break out of the 720px column to the full site
   container width (matching the header band). */
.post-body .post-embed {
  width: calc(min(100vw, var(--maxw)) - 64px);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 34px 0;
}
.post-video iframe, .post-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.pod-subscribe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 34px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--hair);
}
.pod-subscribe-label {
  font-family: var(--f-label);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-3);
}
.pod-subscribe a {
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--cream-2);
  text-decoration: none;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  padding: 7px 16px;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.pod-subscribe a:hover { border-color: var(--cream); color: var(--cream); }

/* The quotable answer block — written to be lifted verbatim by AI. */
.post-tldr {
  background: var(--page-panel);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 0 0 40px;
}
.post-tldr .pt-eyb {
  font-family: var(--f-label);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 8px;
}
.post-tldr .pt-body {
  font-family: var(--f-display);
  font-size: 19px;
  line-height: 1.5;
  color: var(--cream);
  margin: 0;
}

/* Customer-story stat band (imported posts) */
.post-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px 32px;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 28px 0;
  margin: 0 0 40px;
}
.post-stats .ps-n {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--cream);
}
.post-stats .ps-up {
  color: var(--gen-coral);
  font-size: 0.6em;
  vertical-align: 0.22em;
  margin-right: 5px;
}
.post-stats .ps-l {
  display: block;
  font-family: var(--f-label);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--cream-3);
  margin-top: 10px;
}

/* Body copy */
.post-body { font-size: 17px; line-height: 1.75; color: var(--cream-2); }
.post-body h2 {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 30px;
  line-height: 1.15;
  color: var(--cream);
  margin: 52px 0 16px;
  text-wrap: balance;
}
.post-body h3 {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 19px;
  color: var(--cream);
  margin: 36px 0 12px;
}
.post-body p { margin: 0 0 20px; }
.post-body a { color: var(--pink); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--cream); }
.post-body strong { color: var(--cream); }
.post-body ul, .post-body ol { padding-left: 24px; margin: 0 0 20px; }
.post-body li { margin-bottom: 8px; }
.post-body blockquote {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--cream);
  border-left: 3px solid var(--pink);
  margin: 32px 0;
  padding: 4px 0 4px 24px;
}
.post-body code {
  font-family: var(--f-data);
  font-size: 0.88em;
  background: var(--page-panel);
  border: 1px solid var(--hair);
  border-radius: 5px;
  padding: 1px 6px;
}
.post-body hr { border: 0; border-top: 1px solid var(--hair); margin: 44px 0; }
.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 28px 0;
}
.post-body iframe, .post-body video { max-width: 100%; }

/* FAQ */
.post-faq { margin-top: 56px; }
.post-faq h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 28px;
  color: var(--cream);
  margin: 0 0 18px;
}
.post-faq details {
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--page-panel);
  padding: 16px 20px;
  margin-bottom: 10px;
}
.post-faq summary {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--cream);
  cursor: pointer;
}
.post-faq details p { margin: 12px 0 0; color: var(--cream-2); line-height: 1.65; }

/* Author */
.post-author { margin-top: 56px; }
.pa-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-top: 1px solid var(--hair);
  padding-top: 28px;
}
.pa-avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--page-panel-2);
  border: 1px solid var(--hair-2);
  color: var(--yellow);
  font-family: var(--f-display);
  font-size: 22px;
  display: grid;
  place-items: center;
}
.pa-name { margin: 2px 0 6px; font-weight: 600; color: var(--cream); font-size: 15px; }
.pa-name a { color: inherit; text-decoration: none; }
.pa-name a:hover { color: var(--pink); }
.pa-name span { color: var(--cream-3); font-weight: 400; }
.pa-bio { margin: 0; font-size: 14px; line-height: 1.6; color: var(--cream-3); }

/* End-of-post demo CTA: reuses the homepage .cta-sec / .cta styles
   (css/home.css) with the Array canvas. */
.post-demo-cta { margin-top: 72px; }

@media (max-width: 720px) {
  .blog-index, .post { padding-top: 110px; }
  .post-body { font-size: 16px; }
}

/* Cookie declaration tables (legal pages): break out of the 720px prose
   column to the site container width; scroll inside on narrow screens. */
.post-body .cookie-table {
  --ctw: min(1136px, calc(100vw - 48px));
  width: var(--ctw);
  margin: 20px calc(50% - var(--ctw) / 2) 40px;
  overflow-x: auto;
}
.post-body .cookie-table table {
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}
.post-body .cookie-table th:nth-child(1) { width: 30%; }
.post-body .cookie-table th:nth-child(2) { width: 15%; }
.post-body .cookie-table th:nth-child(3) { width: 15%; }
.post-body .cookie-table th,
.post-body .cookie-table td {
  text-align: left;
  vertical-align: top;
  padding: 9px 14px;
  border-bottom: 1px solid var(--hair);
}
.post-body .cookie-table th {
  color: var(--cream);
  font-weight: 600;
  border-bottom-color: var(--hair-2);
  white-space: nowrap;
}
.post-body .cookie-table td { color: var(--cream-2); }
.post-body .cookie-table td:first-child { word-break: break-all; }
