/* Matapui Insights: directory and article pages. Uses the approved tokens; loads after sections.css.
   Editorial and restrained: cream, ink black, one orange accent. DynaPuff only on the main headlines. */
.insights { padding-top: var(--header-h); background: var(--cream-soft); }
.insights .container { width: min(100% - (var(--gutter) * 2), var(--container)); margin-inline: auto; }

.insights-preview-note {
  margin: 0; padding: .6rem var(--gutter); text-align: center;
  background: var(--ink); color: var(--cream); font-size: var(--fs-small); font-weight: 600;
}

/* ---------- Breadcrumb ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem .6rem; font-size: var(--fs-small); font-weight: 600; color: var(--ink-soft); }
.crumbs li + li::before { content: "/"; margin-right: .6rem; color: rgba(23, 23, 23, .4); }
.crumbs a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.crumbs a:hover { background: var(--peach-soft); }

/* ---------- Directory hero ---------- */
.insights-hero { background: var(--cream); padding: clamp(2rem, 4.5vw, 3.2rem) 0 clamp(2.4rem, 5vw, 3.8rem); }
.insights-hero .eyebrow { margin-top: clamp(1.4rem, 3vw, 2.2rem); }
.insights-title {
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-display);
  line-height: 1.06; letter-spacing: -.01em; margin-top: .5rem; max-width: 14ch; text-wrap: balance;
}
.insights-title span { color: var(--orange); }
.insights-lead { max-width: 38rem; margin-top: 1.1rem; color: var(--ink-soft); }

/* ---------- Topic filter ---------- */
.insights-list { padding: clamp(1.8rem, 4vw, 3rem) 0 clamp(3rem, 7vw, 5.5rem); }
.insights-topics ul { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.insights-topics a {
  display: inline-block; padding: .5rem 1.05rem; border: 2px solid var(--ink); border-radius: var(--radius-pill);
  font-weight: 700; font-size: .92rem; text-decoration: none; color: var(--ink);
  transition: background-color .2s, color .2s;
}
.insights-topics a:hover { background: var(--peach-soft); }
.insights-topics a[aria-current="page"] { background: var(--ink); color: var(--cream); }

/* ---------- Cards ---------- */
.insights-grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.8rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19.5rem), 1fr)); }
.insight-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border-radius: 22px; border: 1px solid rgba(23, 23, 23, .08);
  transition: transform .3s var(--spring-settle), box-shadow .3s var(--ease);
}
.insight-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.insight-card__media { aspect-ratio: 3 / 2; background: var(--peach-soft); overflow: hidden; }
.insight-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.insight-card__body { display: flex; flex-direction: column; gap: .7rem; padding: 1.3rem 1.4rem 1.5rem; flex: 1; }
.insight-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; line-height: 1.22; }
.insight-card__title a { color: var(--ink); text-decoration: none; }
.insight-card__title a::after { content: ""; position: absolute; inset: 0; }      /* the whole card is the link */
.insight-card__title a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.insight-card__excerpt { color: var(--ink-soft); font-size: .98rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.insight-card .insight-meta { margin-top: auto; }
.insight-card:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.insight-card a:focus-visible { outline: none; }

.insight-chip { align-self: flex-start; display: inline-block; padding: .3rem .7rem; border-radius: var(--radius-pill); background: var(--peach-soft); color: var(--ink); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; }
.insight-chip a { color: inherit; text-decoration: none; }
.insight-meta { font-size: var(--fs-small); font-weight: 600; color: var(--ink-soft); }

/* Featured (newest) card on page 1 */
@media (min-width: 900px) {
  .insight-card--featured { grid-column: 1 / -1; flex-direction: row; }
  .insight-card--featured .insight-card__media { flex: 0 0 58%; aspect-ratio: auto; min-height: 21rem; }
  .insight-card--featured .insight-card__body { justify-content: center; padding: clamp(1.8rem, 3.4vw, 3rem); gap: 1rem; }
  .insight-card--featured .insight-card__title { font-size: clamp(1.7rem, 2.7vw, 2.4rem); line-height: 1.15; }
  .insight-card--featured .insight-card__excerpt { font-size: 1.05rem; -webkit-line-clamp: 4; }
  .insight-card--featured .insight-meta { margin-top: .4rem; }
}

/* ---------- Pagination ---------- */
.insights-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem 1.2rem; margin-top: clamp(2rem, 4vw, 3rem); }
.insights-pager ul { display: flex; gap: .4rem; }
.insights-pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 .9rem; border-radius: var(--radius-pill); font-weight: 800; text-decoration: none; color: var(--ink); border: 2px solid transparent; }
.insights-pager ul a:hover, .insights-pager__step:hover { background: var(--peach-soft); }
.insights-pager ul a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.insights-pager__step { border-color: var(--ink) !important; gap: .4rem; }

.insights-empty { max-width: 34rem; padding: clamp(2rem, 5vw, 3.5rem) 0; }
.insights-empty h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-display-md); line-height: 1.1; }
.insights-empty p { margin: .8rem 0 1.4rem; color: var(--ink-soft); }

.insights-back { margin-top: clamp(2rem, 4vw, 3rem); font-weight: 700; }
.insights-back a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.insights-back a:hover { background: var(--peach-soft); }
.insights-back--solo { text-align: center; padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.insights-section-title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-display-md); line-height: 1.1; margin-bottom: clamp(1.2rem, 3vw, 2rem); }

/* ---------- Article ---------- */
.insight-col { width: min(100% - (var(--gutter) * 2), 44rem); margin-inline: auto; }
.insight-hero { background: var(--cream); padding: clamp(2rem, 4.5vw, 3.2rem) 0 clamp(2rem, 4vw, 3rem); }
.insight-hero .insight-chip { margin-top: clamp(1.4rem, 3vw, 2rem); }
.insight-title {
  font-family: var(--font-heading); font-weight: 700; font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.12; letter-spacing: -.005em; margin-top: 1rem; text-wrap: balance; overflow-wrap: break-word;
}
.insight-dek { margin-top: 1.1rem; color: var(--ink-soft); }
.insight-hero .insight-meta { margin-top: 1.4rem; }
.insight-author { color: var(--ink); font-weight: 800; }

.insight-figure { width: min(100% - (var(--gutter) * 2), 60rem); margin: clamp(-1.4rem, -2vw, -1rem) auto 0; position: relative; }
.insight-figure__img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 24px; box-shadow: var(--shadow-soft); }
.insight-figure figcaption { margin-top: .7rem; font-size: var(--fs-small); color: var(--ink-soft); text-align: center; }

.insight-prose { padding: clamp(2rem, 5vw, 3.2rem) 0 clamp(1.5rem, 3vw, 2rem); font-size: 1.1rem; line-height: 1.8; color: var(--ink-soft); overflow-wrap: anywhere; }
.insight-prose > * + * { margin-top: 1.25rem; }
.insight-prose strong { color: var(--ink); font-weight: 700; }
.insight-prose h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.2; color: var(--ink); margin-top: clamp(2.4rem, 5vw, 3.2rem); scroll-margin-top: calc(var(--header-h) + 16px); }
.insight-prose h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.25; color: var(--ink); margin-top: 2rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.insight-prose h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-top: 1.6rem; }
.insight-prose a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.insight-prose a:hover { background: var(--peach-soft); }
.insight-prose ul, .insight-prose ol { display: grid; gap: .55rem; }
.insight-prose ul { list-style: none; padding: 0; }
.insight-prose ul li { position: relative; padding-left: 1.5rem; }
.insight-prose ul li::before { content: ""; position: absolute; left: .2rem; top: .8em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--orange); }
.insight-prose ol { list-style: decimal; padding-left: 1.5rem; }
.insight-prose ol li::marker { color: var(--orange-deep); font-weight: 800; }
.insight-prose blockquote { margin-inline: 0; padding: .3rem 0 .3rem 1.3rem; border-left: 4px solid var(--orange); font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.45; color: var(--ink); }
.insight-prose blockquote cite { display: block; margin-top: .6rem; font-family: var(--font-body); font-size: .9rem; font-style: normal; font-weight: 600; color: var(--ink-soft); }
.insight-prose img, .insight-prose video, .insight-prose iframe { max-width: 100%; height: auto; border-radius: 14px; }
.insight-prose figure { margin-inline: 0; }
.insight-prose figcaption { margin-top: .6rem; font-size: var(--fs-small); color: var(--ink-soft); }
.insight-prose hr { border: 0; height: 1px; background: rgba(23, 23, 23, .15); margin-block: 2.2rem; }
.insight-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.insight-prose th, .insight-prose td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid rgba(23, 23, 23, .12); }
.insight-prose pre, .insight-prose code { font-size: .92em; }
.insight-prose pre { overflow-x: auto; padding: 1rem 1.2rem; background: var(--white); border-radius: 12px; }
.insight-prose .alignwide, .insight-prose .alignfull { width: 100%; }  /* the reading column is fixed; wide blocks stay inside it */
.insight-prose .wp-block-button__link { font-family: var(--font-body); font-weight: 800; background: var(--orange); color: var(--ink); border-radius: var(--radius-pill); padding: .9rem 1.5rem; text-decoration: none; }

.insight-foot { padding-bottom: clamp(2.2rem, 5vw, 3.2rem); }
.insight-byline { padding-top: 1.6rem; border-top: 1px solid rgba(23, 23, 23, .15); }
.insight-byline__name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); margin-top: .2rem; }
.insight-byline__org { color: var(--ink-soft); font-size: .98rem; margin-top: .2rem; }

/* ---------- Article call to action ---------- */
.insight-cta { padding: 0 0 clamp(2.4rem, 5vw, 4rem); }
.insight-cta__box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.6rem 2.4rem;
  padding: clamp(1.8rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3.2rem);
  background: var(--ink); color: var(--cream); border-radius: 28px;
}
.insight-cta__box .eyebrow { color: var(--peach); }
.insight-cta__box h2 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.12; color: var(--cream); margin-top: .35rem; }
.insight-cta__box p:not(.eyebrow) { margin-top: .7rem; max-width: 32rem; color: rgba(255, 240, 217, .88); }
.insight-cta__box .btn-row { margin-top: 0; }
.btn--outline-light { background: transparent; color: var(--cream); border-color: rgba(255, 240, 217, .7); }
.btn--outline-light:hover { background: var(--cream); color: var(--ink); }

@media (max-width: 599px) {
  .insight-card__body { padding: 1.15rem 1.15rem 1.3rem; }
  .insights-pager { justify-content: space-between; }
  .insights-pager ul { order: 3; width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .insight-card, .insight-card:hover { transition: none; transform: none; }
}
