/* =========================================================================
   Mareto — Case Studies (listing + article pages)
   Design: "Mareto Case Study — …" (Claude Design, July 2026)
   Page-specific sections only. Shared design system (reset, nav, footer,
   buttons, eyebrow, CTA, animations, variables) lives in styles.css, which
   must be loaded first.

   .cs-*     — listing page (hero, featured story, grid, stats band)
   .csd-*    — article ("case study detail") sections
   .cs-card  — story card: base = article "More stories" size; the listing
               grid (.cs-grid) upsizes it and adds the description line
   ========================================================================= */

a:not(.btn):hover { color: var(--brand-green); } /* .btn text color is owned by the button variants in styles.css */

/* ---------- LISTING: HERO ---------- */
.cs-hero { max-width: 900px; margin: 0 auto; padding: 132px var(--pad-x) 96px; text-align: center; }
.cs-hero__title { margin-top: 30px; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: clamp(42px, 5.4vw, 66px); line-height: 1.08; letter-spacing: -.02em; color: var(--ink-strong); text-wrap: balance; }
.cs-hero__sub { margin: 26px auto 0; max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--body); }

/* ---------- LISTING: FEATURED STORY ---------- */
.cs-featured { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.cs-featured__panel { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; border: 1px solid #e6e8ec; border-radius: 12px; overflow: hidden; background: #fff; }
.cs-featured__media { position: relative; min-height: 440px; background: linear-gradient(160deg, #14432f, #0e3324); display: flex; align-items: flex-end; padding: 30px; }
.cs-featured__slot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.cs-featured__slot span { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.5); }
.cs-featured__tag { position: relative; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 8px 14px; border-radius: 6px; }
.cs-featured__body { padding: 56px 52px; display: flex; flex-direction: column; }
.cs-featured__quote { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: clamp(26px, 2.9vw, 38px); line-height: 1.18; letter-spacing: -.015em; color: var(--ink-strong); text-wrap: pretty; }
.cs-featured__quote::before { content: '\201C'; display: block; font-size: 1.6em; line-height: .5; color: #6bb0f5; margin: 8px 0 18px; }
.cs-featured__author { margin-top: 28px; }
.cs-featured__name { font-weight: 700; font-size: 15px; color: var(--ink-strong); }
.cs-featured__role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cs-featured__stats { margin-top: 34px; padding-top: 28px; border-top: 1px solid #eceef2; display: flex; gap: 40px; flex-wrap: wrap; }
.cs-stat__num { font-family: 'Newsreader', Georgia, serif; font-size: 34px; line-height: 1; letter-spacing: -.01em; color: var(--brand-green); }
.cs-stat__label { font-size: 12px; color: var(--muted-3); margin-top: 6px; font-weight: 500; max-width: 16ch; }
.cs-featured__link { margin-top: 34px; font-weight: 600; font-size: 14px; color: var(--brand-green); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }

/* ---------- LISTING: STORY GRID ---------- */
.cs-grid-wrap { max-width: var(--maxw); margin: 0 auto; padding: 160px var(--pad-x); }
.cs-grid-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 52px; }
.cs-grid-title { margin-top: 22px; font-weight: 500; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.06; letter-spacing: -.03em; color: var(--ink-strong); }
.cs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Listing grid upsizes the base card and adds the description line */
.cs-grid .cs-card__media { height: 176px; }
.cs-grid .cs-card__logo { backdrop-filter: blur(2px); }
.cs-grid .cs-card__body { padding: 24px 24px 26px; }
.cs-grid .cs-card__result { font-size: 18px; text-wrap: pretty; }
.cs-card__desc { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--muted); flex: 1; }
.cs-grid .cs-card__foot { margin-top: 20px; }
.cs-grid .cs-card__metric { font-size: 22px; }
.cs-grid .cs-card__link { letter-spacing: .02em; }

/* ---------- LISTING: STATS BAND ---------- */
.cs-stats-band { background: #0a0e16; }
.cs-stats-band__inner { max-width: var(--maxw); margin: 0 auto; padding: 120px var(--pad-x); text-align: center; }
.cs-stats-band__title { margin-top: 30px; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: clamp(30px, 4vw, 52px); line-height: 1.06; letter-spacing: -.025em; color: #fff; text-wrap: balance; }
.cs-stats-grid { margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.cs-stats-grid__num { font-family: 'Newsreader', Georgia, serif; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.02em; color: #fff; }
.cs-stats-grid__num.blue { color: #6bb0f5; }
.cs-stats-grid__num.mint { color: #46c98a; }
.cs-stats-grid__label { margin-top: 14px; font-size: 13.5px; line-height: 1.5; color: #8b94a1; }

/* ---------- ARTICLE HEAD ---------- */
.csd { max-width: 1140px; margin: 0 auto; padding: 0 var(--pad-x); }
.csd-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 56px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); text-decoration: none; }
.csd-back:hover { color: var(--brand-green); }

.csd-head { max-width: 860px; margin: 40px auto 0; text-align: center; }
.csd-head__tag { display: inline-flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 3px solid #6bb0f5; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-strong); }
.csd-head__title { margin-top: 28px; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.08; letter-spacing: -.02em; color: var(--ink-strong); text-wrap: balance; }
.csd-head__dek { margin: 24px auto 0; max-width: 620px; font-size: 19px; line-height: 1.55; color: var(--body); }

.csd-meta { margin: 40px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; border: 1px solid #e6e8ec; border-radius: 12px; overflow: hidden; max-width: 760px; }
.csd-meta__item { flex: 1; min-width: 150px; padding: 20px 24px; border-right: 1px solid #eceef2; }
.csd-meta__item:last-child { border-right: 0; }
.csd-meta__k { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-3); }
.csd-meta__v { margin-top: 7px; font-size: 15px; font-weight: 600; color: var(--ink-strong); }

.csd-lead { margin: 56px auto 0; height: clamp(320px, 42vw, 560px); border-radius: 12px; background: linear-gradient(160deg, #14432f, #0e3324); display: flex; align-items: center; justify-content: center; }
.csd-lead span { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.5); }

/* ---------- RESULTS AT A GLANCE ---------- */
.csd-results { max-width: 1140px; margin: 0 auto; padding: 0 var(--pad-x); }
.csd-results__grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.csd-result { border: 1px solid #e6e8ec; border-radius: 12px; padding: 32px 30px; background: #faf8f1; }
.csd-result__num { font-family: 'Newsreader', Georgia, serif; font-size: clamp(40px, 5vw, 56px); line-height: 1; letter-spacing: -.02em; color: var(--brand-green); }
.csd-result__label { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------- STORY BODY (sticky section heads) ---------- */
.csd-body { max-width: 1080px; margin: 0 auto; padding: 0 var(--pad-x); }
.csd-section { display: grid; grid-template-columns: 280px 1fr; gap: 60px; align-items: start; padding: 68px 0; border-top: 1px solid #eaecf0; }
.csd-section__head { position: sticky; top: 104px; }
.csd-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-green); }
.csd-h2 { margin-top: 16px; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: clamp(25px, 2.5vw, 33px); line-height: 1.14; letter-spacing: -.02em; color: var(--ink-strong); text-wrap: balance; }
.csd-content > :first-child { margin-top: 0; }
.csd-p { margin-top: 22px; font-size: 17.5px; line-height: 1.72; color: #3f4148; }
.csd-p + .csd-p { margin-top: 20px; }
.csd-p strong { font-weight: 600; color: var(--ink-strong); }

.csd-list { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.csd-list__item { display: flex; gap: 14px; align-items: flex-start; font-size: 16.5px; line-height: 1.6; color: #3f4148; }
.csd-list__dot { flex-shrink: 0; margin-top: 9px; width: 8px; height: 8px; border-radius: 2px; background: #6bb0f5; }

.csd-inline-img { margin: 36px auto 0; height: clamp(260px, 30vw, 380px); border-radius: 12px; background: linear-gradient(160deg, #eef5fe, #e4f0e9); border: 1.5px dashed #cfdce6; display: flex; align-items: center; justify-content: center; }
.csd-inline-img span { font-size: 12.5px; font-weight: 600; color: #7f93b3; }
.csd-caption { margin: 14px auto 0; max-width: 620px; text-align: center; font-size: 13px; color: var(--muted-3); }

/* ---------- PULL QUOTE (dark band) ---------- */
.csd-pull { background: #0a0e16; margin-top: 96px; }
.csd-pull__inner { max-width: 940px; margin: 0 auto; padding: 104px var(--pad-x); text-align: center; }
.csd-pull__q { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: clamp(28px, 3.6vw, 46px); line-height: 1.2; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.csd-pull__q::before { content: '\201C'; display: block; font-size: 1.5em; line-height: .5; color: #6bb0f5; margin: 0 0 20px; }
.csd-pull__author { margin-top: 34px; display: inline-flex; align-items: center; gap: 14px; }
.csd-pull__avatar { width: 48px; height: 48px; border-radius: 99px; background: linear-gradient(135deg,#7cc04a,#4f8ff5); flex-shrink: 0; }
.csd-pull__name { font-weight: 700; font-size: 15px; color: #fff; text-align: left; }
.csd-pull__role { font-size: 13px; color: #8b94a1; margin-top: 2px; text-align: left; }

/* ---------- MORE STORIES ---------- */
.csd-more { max-width: var(--maxw); margin: 0 auto; padding: 160px var(--pad-x) 0; }
.csd-more__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.csd-more__title { font-weight: 500; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.02em; color: var(--ink-strong); }
.csd-more__link { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; text-decoration: none; }
.csd-more__link:hover { color: var(--accent-green); }
.csd-more__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ---------- STORY CARD (listing grid + "More stories") ---------- */
.cs-card { border: 1px solid #e6e8ec; border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.cs-card:hover { box-shadow: 0 26px 54px -30px rgba(20,30,40,.35); transform: translateY(-3px); border-color: #d7dbe0; }
.cs-card__media { height: 150px; position: relative; display: flex; align-items: flex-start; padding: 16px; }
.cs-card__logo { position: relative; font-weight: 700; font-size: 14px; letter-spacing: -.01em; color: #fff; background: rgba(0,0,0,.18); padding: 6px 12px; border-radius: 6px; }
.cs-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.cs-card__result { font-weight: 600; font-size: 17px; line-height: 1.28; letter-spacing: -.015em; color: var(--ink-strong); }
.cs-card__foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.cs-card__metric { font-family: 'Newsreader', Georgia, serif; font-size: 21px; color: var(--brand-green); line-height: 1; }
.cs-card__link { font-size: 12px; font-weight: 700; color: var(--muted-3); }
.cs-card:hover .cs-card__link { color: var(--accent-green); }

@media (max-width: 900px) {
  .cs-featured__panel { grid-template-columns: 1fr; }
  .cs-featured__media { min-height: 260px; }
  .cs-featured__body { padding: 40px 32px; }
  .cs-grid-wrap { padding: 100px var(--pad-x); }
  .cs-grid { grid-template-columns: 1fr 1fr; }
  .cs-stats-grid { grid-template-columns: 1fr 1fr; gap: 40px 28px; }
  .csd-results__grid { grid-template-columns: 1fr; }
  .csd-more__grid { grid-template-columns: 1fr; }
  .csd-section { grid-template-columns: 1fr; gap: 22px; padding: 48px 0; }
  .csd-section__head { position: static; }
}
@media (max-width: 560px) {
  .cs-grid { grid-template-columns: 1fr; }
}
