/*
 * DKH Cases — PLP + PDP dedicated stylesheet
 * Paper & Ink editorial-page class family
 * White background, black header logo on cases pages
 * Built: 2026-09-22
 */

/* ── CASES PAGE OVERRIDES ────────────────────────────────────────── */
/* Cases pages use editorial-page class: white/paper bg, black logo  */

body.cases-plp,
body.cases-pdp {
  background: #FAFAF7;
  color: #17171B;
}

/* Black logo on cases pages (header is transparent/white) */
body.cases-plp .site-header .identifier img,
body.cases-pdp .site-header .identifier img {
  content: url("/assets/dkh-logo-black.svg");
}

/* ── BRAND MARQUEE ────────────────────────────────────────────────── */
.marquee-section {
  border-top: 1px solid #C9C5BC;
  border-bottom: 1px solid #C9C5BC;
  overflow: hidden;
  position: relative;
  padding: 0;
  background: #FAFAF7;
}

.marquee-eyebrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: #8A867D;
  text-align: center;
  padding: 14px 0 10px;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  text-transform: uppercase;
}

.marquee-track-wrap {
  overflow: hidden;
  padding: 12px 0 16px;
}

.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee-scroll 18s linear infinite;
  will-change: transform;
}

.marquee-section:hover .marquee-track,
.marquee-section:focus-within .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none !important;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 16px 28px;
    padding: 0 24px;
  }
}

.marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  flex-shrink: 0;
}

.marquee-item img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.65);
  transition: filter 0.2s ease;
}

.marquee-item:hover img,
.marquee-item:focus-within img {
  filter: grayscale(0%) opacity(1);
}

/* ── FILTER PILLS ─────────────────────────────────────────────────── */
.filter-section {
  padding: 32px 0 0;
  border-bottom: 1px solid #C9C5BC;
}

.filter-section .page-shell {
  padding-bottom: 24px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-pill {
  display: inline-block;
  border: 1px solid #17171B;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  color: #17171B;
  text-decoration: none;
  cursor: default;
  user-select: none;
  line-height: 1.4;
}

.filter-pill.active {
  background: #17171B;
  color: #FAFAF7;
}

.filter-pill.industry-toggle {
  position: relative;
}

.filter-sub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0 0;
  border-top: 1px dotted #C9C5BC;
}

.filter-sub-pill {
  display: inline-block;
  border: 1px solid #8A867D;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  color: #8A867D;
  cursor: default;
  user-select: none;
}

/* ── FEATURED HERO CASE ───────────────────────────────────────────── */
.featured-hero {
  border-bottom: 1px solid #C9C5BC;
}

.featured-hero .page-shell {
  padding-top: 48px;
  padding-bottom: 48px;
}

.featured-hero-illustration {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #F0EDE6;
  display: block;
  margin-bottom: 28px;
}

.featured-hero-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-meta {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.featured-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.featured-metric .metric-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: #17171B;
  font-family: "Inter", "Noto Sans TC", sans-serif;
}

.featured-metric .metric-label {
  font-size: 11px;
  color: #8A867D;
  letter-spacing: 0.05em;
}

.featured-hero h2 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  margin: 12px 0 8px;
  color: #17171B;
}

.featured-hero .text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #17171B;
  text-decoration: none;
  border-bottom: 1px solid #17171B;
  padding-bottom: 1px;
  margin-top: 12px;
}

/* ── CASE CARDS GRID ──────────────────────────────────────────────── */
.cases-grid-section {
  border-bottom: 1px solid #C9C5BC;
}

.cases-grid-section .page-shell {
  padding-top: 40px;
  padding-bottom: 48px;
}

.cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.case-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #C9C5BC;
  background: #FAFAF7;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.case-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(23,23,27,0.08);
}

.case-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #F0EDE6;
  flex-shrink: 0;
  display: block;
}

.case-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.case-card-body .eyebrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: #8A867D;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: "Inter", sans-serif;
}

.case-card-body h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  flex: 1;
}

.case-card-metric {
  font-size: 22px;
  font-weight: 800;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  color: #17171B;
  margin-top: auto;
}

/* ── DISCLOSURE FOOTNOTE ──────────────────────────────────────────── */
.disclosure-section {
  border-bottom: 1px solid #C9C5BC;
}

.disclosure-section .page-shell {
  padding-top: 20px;
  padding-bottom: 20px;
}

.disclosure-text {
  font-size: 11px;
  color: #8A867D;
  line-height: 1.5;
  font-family: "Inter", "Noto Sans TC", sans-serif;
}

/* ── CTA BAND (cases page variant) ───────────────────────────────── */
.cases-cta-band {
  background: #17171B;
  color: #FAFAF7;
}

.cases-cta-band .page-shell {
  padding-top: 56px;
  padding-bottom: 56px;
  text-align: center;
}

.cases-cta-band h2 {
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 700;
  margin-bottom: 24px;
}

.cases-cta-band .solid-cta {
  background: #FAFAF7;
  color: #17171B;
  border: 2px solid #FAFAF7;
}

.cases-cta-band .solid-cta:hover {
  background: transparent;
  color: #FAFAF7;
}

/* ── PDP — PAIN QUOTE HERO ────────────────────────────────────────── */
.pdp-hero {
  border-bottom: 1px solid #C9C5BC;
}

.pdp-hero .page-shell {
  padding-top: 56px;
  padding-bottom: 48px;
}

.pdp-hero h1 {
  font-size: clamp(24px, 4.5vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  quotes: "\300C" "\300D";
}

.pdp-hero h1::before { content: open-quote; }
.pdp-hero h1::after  { content: close-quote; }

/* ── PDP — ILLUSTRATION + TAGS ────────────────────────────────────── */
.pdp-illustration-section {
  border-bottom: 1px solid #C9C5BC;
}

.pdp-illustration-section .page-shell {
  padding-top: 40px;
  padding-bottom: 40px;
}

.pdp-illustration {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #F0EDE6;
  display: block;
  margin-bottom: 20px;
}

.pdp-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdp-tag {
  display: inline-block;
  border: 1px solid #17171B;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 11px;
  color: #17171B;
  font-family: "Inter", "Noto Sans TC", sans-serif;
}

/* ── PDP — CONTEXT / TURN ─────────────────────────────────────────── */
.pdp-context,
.pdp-turn {
  border-bottom: 1px solid #C9C5BC;
}

.pdp-context .page-shell,
.pdp-turn .page-shell {
  padding-top: 48px;
  padding-bottom: 48px;
}

/* ── PDP — THE WORK GALLERY ───────────────────────────────────────── */
.pdp-gallery-section {
  border-bottom: 1px solid #C9C5BC;
}

.pdp-gallery-section .page-shell {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Editorial grid (Layout A) */
.gallery--editorial {
  display: block;
}

.gallery--strip {
  display: none;
}

body.gallery-strip-mode .gallery--editorial {
  display: none;
}

body.gallery-strip-mode .gallery--strip {
  display: block;
}

.gallery-editorial-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.gallery-editorial-main {
  aspect-ratio: 4/3;
  background: #F0EDE6;
  overflow: hidden;
}

.gallery-editorial-pair {
  display: grid;
  gap: 8px;
}

.gallery-editorial-pair-item {
  background: #F0EDE6;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-editorial-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.gallery-editorial-row-item {
  background: #F0EDE6;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-editorial-grid img,
.gallery-editorial-pair-item img,
.gallery-editorial-row-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Horizontal scroll strip (Layout B) */
.gallery-strip-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  margin-top: 16px;
}

.gallery-strip-track::-webkit-scrollbar {
  height: 3px;
}

.gallery-strip-track::-webkit-scrollbar-thumb {
  background: #C9C5BC;
  border-radius: 2px;
}

.gallery-strip-item {
  flex-shrink: 0;
  width: 280px;
  aspect-ratio: 4/3;
  background: #F0EDE6;
  overflow: hidden;
  scroll-snap-align: start;
}

.gallery-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  font-size: 10px;
  color: #8A867D;
  margin-top: 4px;
  font-family: "Inter", "Noto Sans TC", sans-serif;
}

/* ── PDP — EVIDENCE ───────────────────────────────────────────────── */
.pdp-evidence {
  background: #F0EDE6;
  border-top: 1px solid #C9C5BC;
  border-bottom: 1px solid #C9C5BC;
}

.pdp-evidence .page-shell {
  padding-top: 48px;
  padding-bottom: 48px;
}

.evidence-dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #C9C5BC;
  border: 1px solid #C9C5BC;
  margin-top: 24px;
}

.evidence-dl-cell {
  background: #F0EDE6;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evidence-dl dt {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  color: #17171B;
}

.evidence-dl dd {
  font-size: 11px;
  color: #8A867D;
  letter-spacing: 0.05em;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  text-transform: uppercase;
}

/* 4-cell variant */
.evidence-dl.cells-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 600px) {
  .evidence-dl,
  .evidence-dl.cells-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── PDP — THE POINT ──────────────────────────────────────────────── */
.pdp-point {
  border-bottom: 1px solid #C9C5BC;
}

.pdp-point .page-shell {
  padding-top: 48px;
  padding-bottom: 48px;
}

.pdp-point blockquote {
  font-size: clamp(18px, 3.5vw, 26px);
  font-weight: 700;
  line-height: 1.3;
  quotes: "\300C" "\300D";
  max-width: 680px;
}

.pdp-point blockquote::before { content: open-quote; }
.pdp-point blockquote::after  { content: close-quote; }

/* ── PDP — MORE CASES ─────────────────────────────────────────────── */
.more-cases-section {
  border-bottom: 1px solid #C9C5BC;
}

.more-cases-section .page-shell {
  padding-top: 40px;
  padding-bottom: 40px;
}

.more-cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.more-case-card {
  border: 1px solid #C9C5BC;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.18s;
}

.more-case-card:hover {
  border-color: #17171B;
}

.more-case-card .eyebrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: #8A867D;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: "Inter", sans-serif;
}

.more-case-card h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

/* ── SHARED SECTION UTILITIES ─────────────────────────────────────── */
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: #8A867D;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: "Inter", sans-serif;
  display: block;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 700;
  line-height: 1.25;
}

.prose p {
  font-size: 15px;
  line-height: 1.75;
  color: #17171B;
  margin-bottom: 1em;
  max-width: 680px;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* placeholder styling */
.placeholder-text {
  color: #8A867D;
  font-style: italic;
}

/* ── BREADCRUMB ───────────────────────────────────────────────────── */
.cases-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8A867D;
  margin-bottom: 24px;
  font-family: "Inter", "Noto Sans TC", sans-serif;
}

.cases-breadcrumb a {
  color: #8A867D;
  text-decoration: none;
  border-bottom: 1px solid #C9C5BC;
}

.cases-breadcrumb a:hover {
  color: #17171B;
  border-color: #17171B;
}

.cases-breadcrumb .sep {
  color: #C9C5BC;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cases-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .more-cases-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-editorial-grid {
    grid-template-columns: 1fr;
  }

  .gallery-editorial-row {
    grid-template-columns: 1fr 1fr;
  }

  .featured-hero h2 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .gallery-editorial-row {
    grid-template-columns: 1fr;
  }

  .cases-grid {
    gap: 12px;
  }

  .filter-row {
    gap: 6px;
  }

  .featured-metric .metric-value {
    font-size: 28px;
  }

  .marquee-item img {
    height: 28px;
    max-width: 90px;
  }

  .marquee-item {
    padding: 0 18px;
  }
}

/* Reduced motion exposes each unique client once, not the loop clone. */
@media(prefers-reduced-motion:reduce){.marquee-item[aria-hidden="true"]{display:none}}
