.case-detail-page {
  --detail-bg: #11110f;
  --detail-panel: #1a1a17;
  --detail-panel-strong: #20201c;
  --detail-text: #f0f0e8;
  --detail-muted: #9c9a8e;
  --detail-dim: #68685f;
  --detail-line: rgba(240, 240, 232, .14);
  --detail-accent: #a6e100;
  --detail-accent-soft: rgba(166, 225, 0, .13);
  overflow-x: hidden;
}

.case-detail-page main.case-detail-main { overflow: visible; }

.case-detail-page .cases-header {
  background: linear-gradient(180deg, rgba(20,20,18,.72), rgba(20,20,18,.54));
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  border-bottom-color: rgba(244,243,236,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.035) inset, 0 18px 48px rgba(0,0,0,.18);
}

.case-detail {
  overflow: hidden;
  background: #141412;
}

.case-detail-page .container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 32px;
}

.case-detail-hero {
  position: relative;
  width: 100%;
  margin: 0;
  min-height: clamp(620px, 78vh, 760px);
  padding: 84px 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 0;
}

.case-detail-kicker,
.detail-section-label {
  font-family: var(--cases-mono);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.case-detail-kicker {
  margin: 0 0 24px;
  color: var(--detail-accent);
  font-size: 12.5px;
  letter-spacing: .08em;
  line-height: 1.3;
}

.detail-section-label { display: flex; align-items: baseline; gap: 8px; margin-bottom: 24px; color: var(--detail-accent); font-size: 12.5px; line-height: 1.3; }
.detail-section-label { letter-spacing: .08em; }
.detail-section-label span:first-child { color: var(--detail-accent); }
.detail-section-label span:last-child { color: var(--detail-accent); }

.case-detail-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--detail-text);
  font-family: var(--cases-display);
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.04;
}

.case-detail-hero h1 span { color: var(--detail-accent); }

.case-detail-hero-image { position: absolute; inset: 0; z-index: 0; margin: 0; }
.case-detail-hero-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.case-detail-hero::before { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(10,10,8,.84) 0%, rgba(10,10,8,.62) 36%, rgba(10,10,8,.18) 76%), linear-gradient(0deg, rgba(10,10,8,.7) 0%, transparent 46%); content: ''; }
.case-detail-hero-copy { position: relative; z-index: 3; }

.case-detail-lede {
  max-width: 620px;
  margin: 34px 0 0;
  color: rgba(240,240,232,.88);
  font-size: 18px;
  line-height: 1.6;
}

.case-detail-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.case-detail-tags span { padding: 8px 15px; border: 1px solid rgba(166,225,0,.45); border-radius: 999px; background: rgba(166,225,0,.08); color: #d8f58a; font-family: var(--cases-mono); font-size: 12px; line-height: 1; letter-spacing: .1em; text-transform: uppercase; }
.case-detail-hero + .case-detail-section { border-top: 0; }

.case-detail-section {
  padding-block: 68px;
  border-top: 1px solid var(--detail-line);
}

.case-detail-section--split {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 64px;
}

.detail-section-side, .detail-section-body { min-width: 0; }
.detail-section-heading h2 { max-width: 100%; margin: 0; color: var(--detail-text); font-family: var(--cases-display); font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.detail-section-body { padding-top: 0; }
.detail-section-body > p,
.detail-wide-copy p { margin: 0 0 22px; color: var(--detail-muted); font-size: 16.5px; line-height: 1.6; }
.detail-section-body > p:last-of-type { margin-bottom: 0; }

.detail-section-visual {
  position: relative;
  width: 100%;
  margin: 52px auto 0;
  overflow: hidden;
  border: 1px solid var(--detail-line);
  background: var(--detail-panel);
}

.detail-section-visual figcaption { position: absolute; right: 22px; bottom: 18px; left: 22px; color: var(--detail-dim); font-size: 11px; line-height: 1.5; }
.detail-workflow-image {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  margin: 52px auto 0;
  overflow: visible;
  border: 0;
  background: transparent;
}
.detail-workflow-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.detail-workflow-image figcaption {
  position: static;
  margin-top: 12px;
  color: var(--detail-muted);
  text-align: left;
}

.detail-bullet-list { display: grid; gap: 15px; margin: 35px 0 0; padding: 0; list-style: none; }
.detail-bullet-list li { position: relative; padding-left: 20px; color: var(--detail-muted); font-size: 14px; line-height: 1.55; }
.detail-bullet-list li::before { position: absolute; top: .7em; left: 0; width: 8px; height: 1px; background: var(--detail-accent); content: ''; }
.detail-callout { display: grid; grid-template-columns: 92px 1fr; gap: 20px; align-items: center; margin-top: 50px; padding: 24px 0 24px 24px; border-left: 1px solid var(--detail-accent); background: linear-gradient(90deg, rgba(166,225,0,.07), transparent 72%); }
.detail-callout strong { color: var(--detail-accent); font-family: var(--cases-display); font-size: 72px; font-weight: 500; letter-spacing: -.09em; line-height: .8; }
.detail-callout p { margin: 0; color: var(--detail-text); font-size: 14px; line-height: 1.55; }

.case-detail-section--wide { display: block; }
.case-detail-section--wide .detail-section-body { width: 100%; margin-left: 0; padding-top: 46px; }
.detail-wide-copy { max-width: 820px; }
.detail-wide-copy p { margin: 0; }
.detail-wide-copy p + p { margin-top: 20px; }

.detail-results-intro { max-width: 570px; }
.detail-results-intro p {
  margin: 0;
  color: var(--detail-muted);
  font-size: 16.5px;
  line-height: 1.6;
}

.detail-result-metrics {
  display: grid;
  width: 88%;
  grid-template-columns: minmax(0, 65fr) minmax(0, 30fr);
  align-items: center;
  gap: 5%;
  margin: 50px auto 40px;
}
.detail-result-flow,
.detail-result-summary {
  position: relative;
  min-width: 0;
  container-type: inline-size;
}
.detail-result-shape {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.detail-result-rim {
  stroke-width: 1.5;
}
.detail-result-shape path,
.detail-result-shape circle { vector-effect: non-scaling-stroke; }
.detail-result-metric {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  transform: translate(-50%, -50%);
  text-align: center;
}
.detail-result-metric--before { left: 26.351%; width: 38%; }
.detail-result-metric--after { left: 81.757%; width: 30.8%; gap: 8px; }
.detail-result-metric--summary { left: 50%; width: 78%; gap: 18px; }
.detail-result-label {
  color: var(--detail-accent);
  font-family: var(--cases-mono);
  font-size: clamp(10px, 1.8cqw, 12.5px);
  line-height: 1.3;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.detail-result-value {
  color: var(--detail-accent);
  font-family: var(--cases-display);
  font-size: clamp(52px, 16cqw, 116px);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: 1;
}
.detail-result-metric--after .detail-result-value { font-size: clamp(36px, 13cqw, 94px); }
.detail-result-metric--summary .detail-result-value { font-size: clamp(60px, 29cqw, 98px); }
.detail-result-description {
  max-width: 100%;
  color: var(--detail-muted);
  font-family: var(--cases-body);
  font-size: clamp(11px, 2.3cqw, 16px);
  line-height: 1.4;
}
.detail-result-metric--after .detail-result-description { max-width: 88%; }
.detail-result-metric--summary .detail-result-description {
  max-width: 220px;
  font-size: clamp(13px, 4.8cqw, 16px);
}
.detail-result-list { display: grid; max-width: 820px; margin: 0; padding: 0; list-style: none; }.detail-result-list li { display: grid; grid-template-columns: 200px 1fr; gap: 26px; padding: 21px 0; border-bottom: 1px solid rgba(240,240,232,.09); }.detail-result-list strong { color: var(--detail-text); font-family: var(--cases-display); font-size: 17px; font-weight: 500; letter-spacing: -.02em; }.detail-result-list span { color: var(--detail-muted); font-size: 14px; line-height: 1.55; }

.closing-bg {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--detail-bg);
}
.closing-bg::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('/images/hero-background.jpg') center / cover no-repeat;
  opacity: .58;
  pointer-events: none;
  content: '';
}
.closing-bg::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 22% 18%, rgba(166,225,0,.10), transparent 34%),
    linear-gradient(90deg, rgba(20,20,18,.54) 0%, rgba(20,20,18,.34) 46%, rgba(20,20,18,.66) 100%),
    linear-gradient(180deg, #141412 0%, rgba(20,20,18,.10) 18%, rgba(20,20,18,.28) 68%, #141412 100%);
  pointer-events: none;
  content: '';
}
.cta-section { padding: 112px 0; position: relative; overflow: visible; border-top: 1px solid #242420; }
.cta-section.closing-bg { overflow: hidden; }
.cta-section .container, footer .container { position: relative; z-index: 1; }
.cta-inner { position: relative; z-index: 2; max-width: 640px; text-align: left; }
.case-detail-page .kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--detail-accent); font-family: var(--cases-mono); font-size: 12.5px; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
.case-detail-page .kicker::before, .case-detail-page .kicker::after { display: inline-block; width: 18px; height: 18px; flex: none; background-position: center; background-size: contain; background-repeat: no-repeat; content: ''; filter: drop-shadow(0 0 8px rgba(166,225,0,.28)); }
.case-detail-page .kicker::before { background-image: url('/brand/kicker-left.svg'); }
.case-detail-page .kicker::after { background-image: url('/brand/kicker-right.svg'); }
.cta-inner h2 { max-width: 640px; margin: 0 0 16px; color: var(--detail-text); font-family: var(--cases-display); font-size: clamp(32px, 4.4vw, 54px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.cta-inner > p { max-width: 500px; margin: 0 0 40px; color: #9c9a8e; font-size: 17px; line-height: 1.6; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.cta-actions { justify-content: flex-start; }
.btn-primary { position: relative; display: inline-flex; overflow: hidden; align-items: center; gap: 8px; padding: 15px 24px; border-radius: 14px; background: #a6e100; color: #101002; font-size: 15px; font-weight: 600; line-height: 1.5; white-space: nowrap; transition: transform .2s ease, box-shadow .2s ease; }
.btn-primary i { flex: none; color: currentColor; font-size: 17px; line-height: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(166,225,0,.22); }

footer { border-top: none; padding: 64px 0 36px; background: transparent; }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; margin-bottom: 56px; flex-wrap: wrap; }
.footer-brand p { max-width: 280px; margin: 14px 0 0; color: #6c6a60; font-size: 14px; line-height: 1.6; }
.footer-cols { display: flex; gap: 70px; flex-wrap: wrap; }
.footer-col h4 { margin: 0 0 18px; color: #6c6a60; font-family: var(--cases-mono); font-size: 12px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.footer-col a { display: block; margin-bottom: 12px; color: #9c9a8e; font-size: 14.5px; transition: color .2s ease; }
.footer-col a:hover { color: var(--detail-accent); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 28px; border-top: 1px solid #242420; color: #6c6a60; font-size: 13px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .case-detail-hero { min-height: clamp(600px, 75vh, 700px); padding: 70px 0; }
  .case-detail-hero-image img { object-position: center 52%; }
  .case-detail-section { padding-block: 56px; }
  .case-detail-section--split { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 38px; }
  .case-detail-section--wide .detail-section-body { margin-left: 0; }
  .detail-result-list li { grid-template-columns: 170px 1fr; }
}

@media (max-width: 720px) {
  .case-detail-page .container { max-width: 100%; padding-inline: 22px; }
  .case-detail-hero { width: 100%; margin: 0; min-height: clamp(570px, 78svh, 680px); padding: 54px 0 42px; }
  .case-detail-hero-copy { width: 100%; padding: 0; }
  .case-detail-hero::before { background: linear-gradient(90deg, rgba(10,10,8,.88), rgba(10,10,8,.45)), linear-gradient(0deg, rgba(10,10,8,.84), rgba(10,10,8,.16) 58%); }
  .case-detail-kicker { margin-bottom: 19px; }
  .case-detail-lede { margin-top: 28px; font-size: 16px; }
  .case-detail-tags { margin-top: 25px; }
  .case-detail-hero-image img { object-position: 58% 50%; }
  .case-detail-section { padding-block: 44px; }
  .case-detail-section--split { display: block; }
  .detail-section-label { margin-bottom: 19px; }
  .detail-section-body { padding-top: 30px; }
  .detail-section-body > p, .detail-wide-copy p { font-size: 16px; line-height: 1.6; }
  .detail-section-visual { margin-top: 38px; }
  .case-detail-section--wide .detail-section-body { margin-left: 0; padding-top: 30px; }
  .detail-wide-copy { display: block; }.detail-wide-copy p + p { margin-top: 22px; }
  .detail-result-metrics { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 28px; margin: 38px auto 32px; }
  .detail-result-flow { width: 100%; }
  .detail-result-summary { width: 56.32%; max-width: 264px; justify-self: center; }
  .detail-result-metric { gap: 5px; }
  .detail-result-metric--after { gap: 3px; }
  .detail-result-metric--summary { gap: 12px; }
  .detail-result-metric--summary .detail-result-value { font-size: clamp(48px, 29cqw, 86px); }
  .detail-result-list li { display: block; }.detail-result-list span { display: block; margin-top: 7px; }
  .cta-section { padding: 80px 0; }.btn-primary { padding: 14px 16px; font-size: 14px; white-space: normal; text-align: center; justify-content: center; }.footer-top { flex-direction: column; }.footer-cols { gap: 40px; }
}

@media (max-width: 420px) {
  .case-detail-hero { min-height: 560px; padding: 42px 0 34px; }.case-detail-hero-copy { width: 100%; }.case-detail-hero-image img { object-position: 60% 50%; }
  .detail-callout { grid-template-columns: 72px 1fr; gap: 12px; padding-left: 16px; }.detail-callout strong { font-size: 55px; }.detail-callout p { font-size: 13px; }
}

@media (max-width: 360px) {
  .detail-result-metric--after { gap: 2px; }
  .detail-result-metric--after .detail-result-value { font-size: 32px; }
  .detail-result-metric--after .detail-result-description { font-size: 10px; line-height: 1.3; }
}
