/* ============================================================
   CASE PANEL — slide-in right overlay
   ============================================================ */
.case-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
}

.case-panel.open {
  pointer-events: auto;
  visibility: visible;
}

.case-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
  cursor: pointer;
}

.case-panel.open .case-panel__backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.case-panel__sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(560px, 100%);
  background: var(--black, #0a0a0a);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  outline: none;
}

.case-panel.open .case-panel__sheet {
  transform: translateX(0);
}

.case-panel__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding: 14px 18px;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0) 100%);
}

.case-panel__close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white, #fff);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.case-panel__close:hover {
  background: var(--yellow, #ffde17);
  color: var(--black, #0a0a0a);
  border-color: var(--yellow, #ffde17);
}

.case-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 4rem 0;
  margin-top: -50px;
}

.case-panel__body:not(:has(.case-panel__hero)) {
  margin-top: 0;
  padding-top: 8px;
}

.case-panel__hero {
  position: relative;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: var(--yellow, #ffde17);
  overflow: hidden;
}

.case-panel__hero-image,
.case-panel__hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}

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

.case-panel__hero .case-panel__metric {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 12px;
  border-radius: 4px;
}

.case-panel__assets {
  display: grid;
  gap: 12px;
  padding: 16px 28px;
  grid-template-columns: 1fr;
}

.case-panel__assets--gallery {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  .case-panel__assets--gallery { grid-template-columns: 1fr; }
}

.case-panel__asset {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  background: #111;
}

.case-panel__initials {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.case-panel__metric {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-align: center;
  color: var(--white, #fff);
}

.case-panel__meta {
  padding: 24px 28px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.case-panel__eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow, #ffde17);
  margin: 0 0 8px 0;
}

.case-panel__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 26px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white, #fff);
  margin: 0 0 10px 0;
}

.case-panel__services {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 12px 0;
}

.case-panel__summary {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.case-panel__content {
  padding: 24px 28px;
}

.case-panel__p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 1em 0;
}

.case-panel__cta-row {
  display: flex;
  gap: 10px;
  padding: 0 28px;
  flex-wrap: wrap;
}

.case-panel__cta {
  background: var(--yellow, #ffde17);
  color: var(--black, #0a0a0a);
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: filter 0.15s;
}
.case-panel__cta:hover { filter: brightness(1.08); }

.case-panel__cta--ghost {
  background: transparent;
  color: var(--white, #fff);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.case-panel__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  filter: none;
}

body.case-panel-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .case-panel__sheet { width: 100%; }
  .case-panel__title { font-size: 24px; }
  .case-panel__hero { height: 160px; }
  .case-panel__initials { font-size: 44px; }
}

/* ------ Insight variant ------ */
.case-panel__hero--insight {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  height: 80px;
  align-items: flex-end;
  padding: 0 28px 12px;
  justify-content: flex-start;
}
.case-panel__eyebrow--hero {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-body);
}
.case-panel__byline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.case-panel__byline-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white, #fff);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
}
.case-panel__byline-name {
  font-size: 13px; font-weight: 600; color: var(--white, #fff);
}
.case-panel__byline-role {
  font-size: 11px; color: rgba(255, 255, 255, 0.55);
}
.case-panel__bullets {
  padding: 0 28px;
  margin-top: 18px;
}
.case-panel__section-title {
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255, 222, 23, 0.85);
  margin: 0 0 8px;
}
.case-panel__bullets ul {
  margin: 0; padding: 0 0 0 18px; color: rgba(255, 255, 255, 0.85);
  font-size: 14px; line-height: 1.65;
}
.case-panel__bullets li { margin-bottom: 6px; }
.case-panel__content--longread :is(h2, h3, h4) {
  color: var(--white, #fff);
  font-family: var(--font-body);
  margin-top: 1.4em; margin-bottom: 0.5em;
}
.case-panel__content--longread h2 { font-size: 22px; }
.case-panel__content--longread h3 { font-size: 18px; }
.case-panel__content--longread blockquote {
  border-left: 3px solid var(--yellow, #ffde17);
  padding: 4px 0 4px 14px;
  margin: 1em 0; color: rgba(255, 255, 255, 0.9); font-style: italic;
}
.case-panel__content--longread ul,
.case-panel__content--longread ol {
  padding-left: 20px; color: rgba(255, 255, 255, 0.85);
  font-size: 14px; line-height: 1.7;
}
.case-panel__linkedin {
  margin: 22px 28px 0;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}
.case-panel__linkedin-body .case-panel__p {
  margin: 0 0 0.8em 0;
  font-size: 13px;
}
.case-panel__tags {
  padding: 16px 28px 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.case-panel__tag {
  font-size: 11px; padding: 3px 8px;
  background: rgba(255, 255, 255, 0.06); border-radius: 999px;
  color: rgba(255, 255, 255, 0.7); letter-spacing: 0.04em;
}
.chat-case-card--insight {
  border-left: 3px solid var(--yellow, #ffde17);
}
