/* HeartWork Creative: case study pages (/work/...)
   Gallery, story layout and the larger-view lightbox. Loaded after site.css.
   The short color names below point at the shared brand tokens. */
.cs-page{--ivory:var(--hwc-ivory);--slate:var(--hwc-slate);--aubergine:var(--hwc-aubergine);--sand:var(--hwc-sand);--teal:var(--hwc-teal);--teal-dark:var(--hwc-teal-hover);--teal-on-sand:#355C5A;--teal-on-dark:#87A9A7;--font-head:var(--font-display)}
.cs-page .cs-feedback h2,.cs-page .cs-feedback blockquote{color:var(--hwc-ivory)}
.cs-page .cs-cta .rule-divider{margin-bottom:28px}
  .cs-page section { padding: 80px 0; }
  .cs-page .cs-hero { padding: 40px 0 56px; }
  .back-link { display: block; font-size: 0.95rem; font-weight: 600; color: var(--teal); margin-bottom: 28px; }
  .back-link:hover { color: var(--teal-dark); }
  .cs-hero-grid { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; }
  @media (min-width: 860px) { .cs-hero-grid { grid-template-columns: 1.25fr 1fr; gap: 64px; } }
  .cs-hero h1 { font-size: clamp(2.05rem, 4.4vw, 3.1rem); text-wrap: balance; margin-bottom: 14px; }
  .cs-by { font-weight: 600; color: var(--teal); margin-bottom: 22px; }
  .cs-lead { font-family: var(--font-head); font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.4; color: var(--aubergine); text-wrap: balance; }
  .cs-cover { background: var(--sand); border-radius: 8px; padding: 24px; display: flex; align-items: center; justify-content: center; height: 420px; }
  .cs-cover { gap: 18px; }
  .cs-cover img { flex: 0 1 auto; min-width: 0; width: auto; height: auto; max-width: 100%; max-height: 100%; box-shadow: 0 10px 24px rgba(47,52,65,0.28); }
  .cs-cover img:not(:only-child) { max-width: calc(50% - 9px); }
  .cs-group-title { font-size: 1.45rem; color: var(--aubergine); margin: 8px 0 18px; }
  .cs-fig-grid { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 44px; }
  .cs-fig-grid:last-child { margin-bottom: 0; }
  @media (min-width: 720px) { .cs-fig-grid { grid-template-columns: 1fr 1fr; } }
  .cs-fig { margin: 0; }
  .cs-fig img { width: 100%; height: auto; display: block; box-shadow: 0 8px 22px rgba(47,52,65,0.18); }
  .cs-spreads-wide .container { max-width: 1440px; }
  .cs-book + .cs-book { margin-top: 56px; padding-top: 44px; border-top: 1px solid rgba(47,52,65,0.25); }
  .cs-fig-link { display: block; cursor: zoom-in; }
  .cs-fig-link:focus-visible { outline: 3px solid var(--aubergine); outline-offset: 3px; }
  dialog.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: none; background: rgba(23,26,33,0.96); color: var(--ivory); }
  dialog.lb::backdrop { background: rgba(23,26,33,0.96); }
  .lb-inner { display: grid; width: 100%; height: 100%; padding: 14px; gap: 10px; grid-template-columns: 56px minmax(0, 1fr) 56px; grid-template-rows: auto minmax(0, 1fr); }
  .lb-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .lb-caption { font-size: 0.95rem; font-weight: 500; }
  .lb-stage { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
  .lb-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
  .lb-btn { background: transparent; color: var(--ivory); border: 1px solid rgba(245,241,232,0.45); border-radius: 4px; font: 600 1.3rem/1 var(--font-body); width: 48px; height: 48px; cursor: pointer; align-self: center; justify-self: center; }
  .lb-btn:hover { background: rgba(245,241,232,0.14); }
  .lb-btn:focus-visible { outline: 2px solid var(--ivory); outline-offset: 2px; }
  .lb-btn[disabled] { visibility: hidden; }
  @media (max-width: 719px) {
    .lb-inner { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
    .lb-stage { grid-column: 1 / -1; grid-row: 2; }
    .lb-prev { grid-column: 1; grid-row: 3; }
    .lb-next { grid-column: 2; grid-row: 3; }
  }
  .cs-fig figcaption { font-size: 0.88rem; font-weight: 500; margin-top: 9px; }
  .img-slot {
    width: 100%; min-height: 240px; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; text-align: center;
    padding: 20px; border: 2px dashed rgba(47,52,65,0.35); border-radius: 4px; font-size: 0.9rem; line-height: 1.45;
  }
  .img-slot strong { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }
  .cs-story { background: var(--ivory); border-top: 1px solid rgba(47,52,65,0.12); }
  .cs-story-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
  @media (min-width: 900px) { .cs-story-grid { grid-template-columns: 1fr 2.3fr; gap: 56px; } }
  .cs-facts { list-style: none; font-size: 0.93rem; border-top: 3px solid var(--aubergine); padding-top: 18px; align-self: start; }
  .cs-facts li { margin-bottom: 14px; }
  .cs-facts strong { display: block; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
  .cs-block { margin-bottom: 38px; }
  .cs-block:last-child { margin-bottom: 0; }
  .inline-link { color: var(--teal); font-weight: 600; }
  .inline-link:hover { color: var(--teal-dark); }
  .cs-feedback .fb-intro { max-width: 860px; margin-bottom: 18px; }
  @media (min-width: 720px) { .cs-fig.single { width: 50%; } }
  .cs-block h2 { font-size: 1.5rem; color: var(--aubergine); margin-bottom: 12px; text-wrap: balance; }
  .cs-block p { font-size: 1.04rem; margin-bottom: 14px; }
  .ed-note { background: rgba(111,62,99,0.1); border-left: 3px solid var(--aubergine); border-radius: 3px; padding: 10px 14px; font-size: 0.88rem !important; font-weight: 500; }
  .ed-note strong { color: var(--aubergine); }
  .cs-spreads { background: var(--sand); }
  .cs-spreads h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 28px; }
  .cs-spread-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
  @media (min-width: 760px) { .cs-spread-grid { grid-template-columns: repeat(3, 1fr); } }
  .cs-spread { background: var(--ivory); border-radius: 6px; padding: 14px; }
  .cs-feedback { background: var(--slate); color: var(--ivory); }
  .cs-feedback .eyebrow { color: var(--sand); }
  .cs-feedback h2 { color: var(--ivory); font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 22px; }
  .cs-feedback blockquote { font-family: var(--font-head); font-size: 1.16rem; line-height: 1.7; max-width: 860px; }
  .cs-feedback .review-by { color: var(--sand); font-weight: 600; font-size: 0.95rem; margin-top: 20px; }
  .cs-cta { background: var(--ivory); text-align: center; }
  .cs-cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: 14px; text-wrap: balance; }
  .cs-cta p { max-width: 620px; margin: 0 auto 24px; }
  .cs-cta-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 26px; }
  .cs-cta-links .text-link { font-weight: 600; color: var(--teal); }
  @media (max-width: 600px) {
    .cs-page section { padding: 60px 0; }
    .cs-page .cs-hero { padding: 44px 0 44px; }
    .cs-cover { height: 320px; padding: 18px; }
  }
