/* ==========================================================================
   Insights (round 3): index, four category pages, Related Insights, article pages.
   Tyler 9/25: restore the round-1 layout (her hero wall with tabs; 3-column
   photo cards: 3:2 photo, category label, title, one-line excerpt, Read More;
   View All per section), a photo on EVERY card, In the Media by year.
   Palette = round 4 (R4-C): dark hero, then light grey (#F2F1EF, white cards)
   and charcoal (dark cards) sections alternating. No tan.
   ========================================================================== */

/* ---------- hero (her wall, ported in round 1) ---------- */
.insights-hero { position: relative; overflow: hidden; background: var(--bg); min-height: 600px; display: flex; align-items: center; }
.insights-hero::before { content: ""; position: absolute; right: -120px; top: 50%; width: 760px; height: 760px; transform: translateY(-50%);
  background: radial-gradient(circle, rgba(240, 96, 58, .22), rgba(35, 30, 29, 0) 65%); pointer-events: none; }
.ih-txt { position: relative; z-index: 2; padding: 64px 0 64px var(--gutter); max-width: calc(640px + var(--gutter)); }
.ih-eb { font: 700 14px/1.4 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
  opacity: 0; animation: ih-up .8s ease-out .1s forwards; }
.insights-hero h1 { font: 400 clamp(62px, 6.7vw, 96px)/.94 var(--display); color: var(--cream); margin: 0 0 20px; text-transform: uppercase;
  opacity: 0; animation: ih-up .8s ease-out .25s forwards; }
.insights-hero h1 span { color: var(--accent); }
.ih-sub { font: 400 19px/1.6 var(--body); color: var(--text); margin: 0 0 30px; max-width: 540px; opacity: 0; animation: ih-up .8s ease-out .4s forwards; }
.ih-tabs { display: flex; flex-wrap: wrap; gap: 10px; opacity: 0; animation: ih-up .8s ease-out .55s forwards; }
/* Tabs jump to their section (anchor links) and the current one is highlighted (p-insights.js sets aria-current). */
.ih-tab { display: inline-flex; align-items: center; font: 700 13px/1 var(--body); color: var(--text); text-decoration: none;
  border: 1.5px solid #4a413d; border-radius: 30px; min-height: 44px; padding: 9px 17px; transition: border-color .2s, color .2s, background .2s; }
.ih-tab:hover { border-color: var(--cream); color: var(--cream); }
.ih-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ih-tab[aria-current="true"] { background: var(--cream); border-color: var(--cream); color: #1C1817; }
@keyframes ih-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.ih-wall { position: absolute; right: 90px; top: 0; height: 100%; display: flex; gap: 22px; transform: rotate(-6deg);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); }
.ih-col { width: 260px; display: flex; flex-direction: column; gap: 22px; animation: ih-scroll 38s linear infinite; }
.ih-set { display: flex; flex-direction: column; gap: 22px; }
.ih-col.down { animation-direction: reverse; margin-top: -140px; }
.ih-wall:hover .ih-col, .ih-wall:focus-within .ih-col { animation-play-state: paused; }
@keyframes ih-scroll { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 11px)); } }
.ih-card { position: relative; display: block; flex: none; height: 300px; border-radius: 18px; overflow: hidden; text-decoration: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4); outline: 1px solid rgba(243, 236, 220, .12); background: var(--bg-card); }
.ih-card.s { height: 230px; }
.ih-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.ih-card:hover img, .ih-card:focus-visible img { transform: scale(1.05); }
.ih-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(35, 30, 29, .94) 10%, rgba(35, 30, 29, .15) 62%, rgba(35, 30, 29, 0)); }
.ih-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ih-b { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; }
.ih-k { display: inline-block; font: 700 10px/1 var(--body); letter-spacing: .16em; color: #1C1817; background: var(--cream);
  padding: 5px 9px; border-radius: 20px; margin-bottom: 8px; }
.ih-t { font: 700 16px/1.3 var(--body); color: var(--cream); }

@media (max-width: 900px) {
  .insights-hero { min-height: 0; flex-direction: column; align-items: flex-start; padding: 56px 0 0; }
  .ih-txt { padding: 0 var(--gutter); max-width: none; }
  .ih-wall { position: relative; right: auto; height: 340px; margin: 36px 0 0 24px; transform: rotate(-4deg); }
  .ih-col { width: 180px; }
  .ih-card { height: 220px; }
  .ih-card.s { height: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  .ih-col, .ih-eb, .insights-hero h1, .ih-sub, .ih-tabs { animation: none !important; opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) { html:has(.insights-hero) { scroll-behavior: smooth; } }

/* ---------- index sections (R4-5 / R4-C): light grey and charcoal alternate; three cards + View all each.
   One rhythm: every section gets only the shared --section padding; no merged or doubled gaps. ---------- */
.insights-cat { scroll-margin-top: 80px; }
.insights-cat__head { max-width: 760px; margin-bottom: 40px; }
.insights-cat__head .eyebrow { margin-bottom: 12px; }
.insights-cat__head .display { margin-bottom: 16px; }
.insights-cat__more { margin-top: 32px; }

/* ---------- the card (round-1 card in the round-3 system) ---------- */
.icard-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.icard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 1000px) { .icard-row, .icard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 640px) { .icard-row, .icard-grid { grid-template-columns: 1fr; } }
.icard { position: relative; isolation: isolate; display: flex; flex-direction: column; height: 100%; background: #FFFFFF;
  border: 1px solid #E4E1DE; border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(35, 31, 31, .04), 0 8px 24px rgba(35, 31, 31, .06); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.icard:hover, .icard:focus-within { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(35, 31, 31, .06), 0 16px 36px rgba(35, 31, 31, .12); }
.icard:focus-within { outline: 2px solid #C42B18; outline-offset: 3px; }
.icard__media { aspect-ratio: 3 / 2; overflow: hidden; background: #EDEBEA; border-radius: 14px 14px 0 0; }
.icard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.icard:hover .icard__media img { transform: scale(1.03); }
.icard__body { display: flex; flex-direction: column; flex: 1; padding: 24px 28px 26px; }
.icard__cat { font: 700 11px/1.4 var(--body); letter-spacing: .2em; text-transform: uppercase; color: #C42B18; margin-bottom: 10px; }
.icard__title { font: 600 20px/1.3 var(--body); color: #231F1F; margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.icard--guide .icard__title { display: block; -webkit-line-clamp: unset; overflow: visible; } /* her exact paper titles, never cut */
.icard__link { color: inherit; text-decoration: none; }
.icard__link:focus { outline: none; }
.icard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card is the link */
.icard__excerpt { font-size: 15px; line-height: 1.55; color: #4A4543;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.icard__meta { font-size: 13px; line-height: 1.45; color: #6B6461; margin-top: 12px; }
.icard__pub { font-weight: 700; color: #231F1F; }
.icard__more { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 10px;
  font: 700 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: #C42B18; }
.icard__more:not(:has(.icard__ext))::after { content: "\2192"; font-size: 18px; letter-spacing: 0; transition: transform .2s var(--ease); }
.icard:hover .icard__more::after { transform: translateX(4px); }
.icard__ext { width: 12px; height: 12px; transition: transform .2s var(--ease); }
.icard:hover .icard__ext { transform: translate(2px, -2px); }
@media (max-width: 640px) { .icard__body { padding: 20px 22px 22px; } .icard__title { font-size: 19px; } }

/* ---------- R4-5 the same card on a charcoal section (dark card; text contrast on #2C2422:
   title #F3ECDC 12.9:1, excerpt #D6CCBC 9.6:1, meta #B8AE9F 6.9:1, label/link #F0603A 4.7:1) ---------- */
.insights-cat--dark .icard { background: #2C2422; border-color: rgba(243, 236, 220, .10); box-shadow: 0 12px 32px rgba(0, 0, 0, .28); }
.insights-cat--dark .icard:hover, .insights-cat--dark .icard:focus-within { box-shadow: 0 18px 40px rgba(0, 0, 0, .38); }
.insights-cat--dark .icard:focus-within { outline-color: #F0603A; }
.insights-cat--dark .icard__media { background: #231E1D; }
.insights-cat--dark .icard__cat, .insights-cat--dark .icard__more { color: #F0603A; }
.insights-cat--dark .icard__title, .insights-cat--dark .icard__pub { color: #F3ECDC; }
.insights-cat--dark .icard__excerpt { color: #D6CCBC; }
.insights-cat--dark .icard__meta { color: #B8AE9F; }

/* ---------- Know a Company Making a Difference? (closing block, centred) ---------- */
.feature-box { text-align: center; }
.feature-box .eyebrow { margin-bottom: 12px; }
.feature-box .lead { margin: 16px auto 0; }
.feature-box .btn-row { justify-content: center; margin-top: 32px; }

/* ---------- category pages ---------- */
.insights-archive-hero { padding: clamp(56px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); }
.insights-archive-hero .eyebrow { margin-bottom: 12px; }
.insights-archive-hero .display { margin-bottom: 16px; }
.crumb { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(240, 96, 58, .45); }
.crumb:hover { border-bottom-color: var(--accent); }
.archive-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-bottom: 40px; }
.archive-bar__title { font: 700 13px/1.4 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--cream); margin: 0; }
.pfilters { display: flex; flex-wrap: wrap; gap: 8px; }
.pfilter { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 30px;
  border: 1.5px solid #CFCAC6; background: #FFFFFF; color: #231F1F; font: 700 13px/1 var(--body); cursor: pointer; transition: border-color .2s, background .2s; }
.pfilter:hover { border-color: #231F1F; }
.pfilter:focus-visible { outline: 2px solid #C42B18; outline-offset: 3px; }
.pfilter[aria-pressed="true"] { background: #231F1F; border-color: #231F1F; color: #FFFFFF; }
.pfilter__n { font-weight: 500; opacity: .7; }
/* R5-C: publication filter on charcoal */
.insights-cat--dark .pfilter { background: transparent; border-color: rgba(243, 236, 220, .30); color: #F3ECDC; }
.insights-cat--dark .pfilter:hover { border-color: #F3ECDC; }
.insights-cat--dark .pfilter:focus-visible { outline-color: #F0603A; }
.insights-cat--dark .pfilter[aria-pressed="true"] { background: #F3ECDC; border-color: #F3ECDC; color: #1C1817; }
.loadmore { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 40px; }
.loadmore__status { font-size: 14px; color: var(--muted); margin: 0; }
.loadmore [hidden] { display: none; }
.archive-back { margin-top: 40px; }
html:not(.js) .loadmore { display: none; }
.icard[hidden], .archive-year[hidden] { display: none; }
/* no script: show everything (Load more needs the script) */
html:not(.js) .icard[hidden] { display: flex; }
html:not(.js) .archive-year[hidden] { display: block; }

/* In the Media: grouped by year, newest first */
.archive-year + .archive-year { margin-top: 56px; }
.archive-year__label { display: flex; align-items: baseline; gap: 16px; font: 400 clamp(34px, 3.4vw, 48px)/1 var(--display); color: var(--cream);
  margin: 0 0 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.archive-year__n { font: 700 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- Related Insights on article pages ---------- */
.related__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: 40px; }
.related__head .display { margin: 0; }
.related + .cta-band { border-top: 1px solid var(--line); }

/* ---------- article pages (.article) ---------- */
.article .wrap, .article__head { max-width: calc(860px + 2 * var(--gutter)); }
.article__head { padding-top: clamp(56px, 7vw, 96px); }
.article__title { font: 400 clamp(40px, 5.2vw, 72px)/.98 var(--display); color: var(--cream); text-transform: uppercase; letter-spacing: .005em; margin-top: 4px; overflow-wrap: break-word; }
.article__meta { margin-top: 20px; color: var(--muted); font-size: 15px; }
.article__hero { margin: clamp(32px, 4vw, 48px) 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(243, 236, 220, .08); background: var(--bg-warm); }
.article__hero img { width: 100%; height: auto; }
.article__body { padding: clamp(32px, 4vw, 48px) 0 0; font-size: clamp(17px, 1.2vw, 19px); line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.article__body > * + * { margin-top: 1.15em; }
.article__body h2, .article__body h3, .article__body h4 { font: 700 clamp(21px, 1.7vw, 25px)/1.3 var(--body); color: var(--cream); margin-top: 2em; }
.article__body a { color: var(--cream); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.article__body a:hover { color: var(--accent); }
.article__body ul, .article__body ol { padding-left: 1.3em; }
.article__body li + li { margin-top: .45em; }
.article__body li::marker { color: var(--accent); }
.article__body b, .article__body strong { color: var(--cream); }
.article__body blockquote { margin-left: 0; padding-left: 22px; border-left: 3px solid var(--accent); color: var(--cream); }
.article__inline-img { width: 140px; height: auto; border-radius: 12px; margin: 0 0 12px; }
.article__credit { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.article__credit cite { font-style: normal; color: var(--text); }
.article__credit a { color: var(--accent); text-underline-offset: 3px; }
.article + .related { margin-top: clamp(56px, 7vw, 96px); }
