/* ==========================================================
   Case study detail pages
   Shared layout and surfaces for individual case-study pages.
   The listing pages are intentionally excluded and do not use
   body.case-study-detail.
   ========================================================== */

body.case-study-detail,
body.case-study-detail[data-site-section]:not(.svc-parent-page):not(.home):not([data-site-section="home"]):not([data-page-bg]){
  margin:0;
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  font-family:var(--body-font);
  color:var(--darker-azure);
  line-height:1.55;
  background:
    url("../public/DBWebBackgrounds/bg-waves-6-gradient.png") top center / cover no-repeat fixed,
    #001a28;
}
body.case-study-detail > .site-footer{ margin-top:auto; }

.cs-detail-container{
  max-width:1240px;
  margin:0 auto;
  padding:0 32px;
}

/* ---- Hero ---- */
.cs-detail-hero{ padding:52px 0 0; }
.cs-detail-crumbs{
  font-family:var(--display);
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#7A8DA0;
  margin-bottom:26px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:9px;
}
.cs-detail-crumbs a{
  color:var(--body);
  text-decoration:none;
}
.cs-detail-crumbs a:hover{ color:var(--vivid-azure); }
.cs-detail-crumbs .sep{ opacity:.45; }
.cs-detail-crumbs .here{ color:var(--vivid-azure); }

.cs-detail-banner,
.cs-detail-panel{
  background:linear-gradient(180deg, rgba(255,255,255,.78) 0%, rgba(255,255,255,.58) 100%);
  border:1px solid rgba(255,255,255,.58);
  border-radius:14px;
  -webkit-backdrop-filter:blur(18px) saturate(145%);
  backdrop-filter:blur(18px) saturate(145%);
  box-shadow:0 1px 0 rgba(255,255,255,.72) inset, 0 24px 52px -28px rgba(0,42,64,.36);
  color:var(--darker-azure);
  transition:transform .22s, box-shadow .22s, border-color .22s, background .22s;
  position:relative;
  overflow:hidden;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .cs-detail-banner,
  .cs-detail-panel{
    background:#fff;
    border-color:rgba(0,138,252,.16);
  }
}
.cs-detail-banner > *,
.cs-detail-panel > *{
  position:relative;
  z-index:1;
}
.cs-detail-banner::before,
.cs-detail-panel::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 48%),
    radial-gradient(80% 70% at 0% 0%, rgba(0,138,252,.12), transparent 72%);
}
.cs-detail-banner:hover,
.cs-detail-panel:hover{
  transform:translateY(-3px);
  border-color:rgba(0,138,252,.55);
  background:linear-gradient(180deg, rgba(255,255,255,.84) 0%, rgba(255,255,255,.64) 100%);
  box-shadow:0 1px 0 rgba(255,255,255,.78) inset, 0 28px 58px -28px rgba(0,42,64,.42);
}

.cs-detail-banner{
  width:100%;
  padding:30px 46px 30px 36px;
}
.cs-detail-banner h1{
  font-family:var(--display);
  font-weight:800;
  font-size:clamp(34px, 4vw, 50px);
  line-height:1;
  letter-spacing:-.01em;
  text-transform:uppercase;
  color:var(--ink);
  margin:0;
}
.cs-detail-hero-rule{
  height:1px;
  margin:24px 0 0;
  background:linear-gradient(90deg, rgba(0,79,122,.62), rgba(0,42,64,.28) 58%, transparent);
}

/* ---- Content grid ---- */
.cs-detail-content{ padding:24px 0 80px; }
.cs-detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:56px 26px;
  align-items:stretch;
}
.cs-detail-panel{
  padding:26px 26px 22px;
  display:flex;
  flex-direction:column;
}
.cs-detail-panel-head{
  display:flex;
  align-items:center;
  gap:15px;
  margin-bottom:24px;
}
.cs-detail-stat-icon{
  width:48px;
  height:48px;
  border-radius:12px;
  flex-shrink:0;
  background:rgba(0,138,252,.08);
  color:var(--vivid-azure);
  border:1px solid rgba(0,138,252,.58);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.cs-detail-stat-icon svg{
  width:22px;
  height:22px;
}
.cs-detail-stat-icon img{
  width:22px;
  height:22px;
  display:block;
  object-fit:contain;
  filter:brightness(0) saturate(100%) invert(39%) sepia(98%) saturate(2814%) hue-rotate(184deg) brightness(102%) contrast(103%);
}
.cs-detail-glance-plain-icons .cs-detail-stat-icon{
  width:64px;
  height:64px;
  background:transparent;
  border:0;
  border-radius:0;
}
.cs-detail-glance-plain-icons .cs-detail-stat-icon img{
  width:46px;
  height:46px;
}
.cs-detail-title-stack{
  display:flex;
  flex-direction:column;
  gap:9px;
}
.cs-detail-label{
  font-family:var(--display);
  font-weight:700;
  font-size:16.5px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--ink);
  line-height:1;
}
.cs-detail-bar{
  width:40px;
  height:3px;
  border-radius:2px;
  background:transparent;
  display:block;
  position:relative;
  overflow:hidden;
}
.cs-detail-bar::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:var(--dark-azure);
  transform:translateX(-105%);
  transition:transform .42s cubic-bezier(.2,.88,.3,1);
}
.cs-detail-panel:hover .cs-detail-bar::after{
  transform:translateX(0);
}
.cs-detail-panel p{
  color:var(--body);
  font-size:15.5px;
  line-height:1.66;
  margin:0 0 15px;
}
.cs-detail-panel p:last-child{ margin-bottom:0; }

/* ---- At a glance ---- */
.cs-detail-glance{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:26px 14px;
}
.cs-detail-stat{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:13px;
}
.cs-detail-stat-label{
  font-family:var(--display);
  font-weight:600;
  font-size:14.5px;
  color:var(--ink);
  line-height:1.25;
}

/* ---- Testimonial / note ---- */
.cs-detail-quote-mark{
  font-family:var(--display);
  font-weight:800;
  font-size:64px;
  line-height:.6;
  color:var(--vivid-azure);
  opacity:.45;
  margin:2px 0 6px;
}
.cs-detail-quote-mark.close{
  text-align:right;
  margin:6px 0 2px;
}
.cs-detail-quote{
  color:var(--body);
  font-style:italic;
  font-size:16.5px;
  line-height:1.72;
  margin:0 0 16px;
}
.cs-detail-quote-divider{
  border:0;
  border-top:1px solid rgba(0,79,122,.38);
  margin:22px 0;
}
.cs-detail-quote-foot{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}
.cs-detail-logo{
  display:flex;
  align-items:center;
  justify-content:center;
}
.cs-detail-logo img{
  max-height:48px;
  width:auto;
  display:block;
}
.cs-detail-attr{
  text-align:right;
  line-height:1.45;
}
.cs-detail-name{
  font-family:var(--display);
  font-weight:700;
  color:var(--ink);
  font-size:15px;
}
.cs-detail-role,
.cs-detail-org{
  color:var(--ink);
  font-size:13.5px;
}
.cs-detail-panel--logo-only{
  align-items:center;
  justify-content:center;
}
.cs-detail-panel--logo-only .cs-detail-logo img{
  max-height:72px;
}
.cs-detail-panel--logo-only .cs-detail-logo--lg img{
  max-height:112px;
}

/* ---- Shared gradient surface (At a Glance / Testimonial / Background / Performance) ---- */
.cs-detail-panel.cs-detail-panel--gradient-head,
.cs-detail-panel.cs-detail-panel--bare{
  background:
    linear-gradient(135deg,
      rgba(255,255,255,.82) 0%,
      rgba(255,255,255,.55) 62%,
      rgba(255,255,255,.10) 100%),
    linear-gradient(135deg,
      rgba(0,138,252,.24) 0%,
      rgba(80,170,255,.14) 55%,
      rgba(150,200,255,.18) 100%);
  border:0;
  border-radius:14px;
  box-shadow:0 24px 52px -28px rgba(0,42,64,.36);
  -webkit-backdrop-filter:blur(18px) saturate(145%);
  backdrop-filter:blur(18px) saturate(145%);
  isolation:isolate;
}
.cs-detail-panel.cs-detail-panel--gradient-head::before,
.cs-detail-panel.cs-detail-panel--bare::before{
  content:none;
}
.cs-detail-panel.cs-detail-panel--gradient-head:hover,
.cs-detail-panel.cs-detail-panel--bare:hover{
  transform:translateY(-3px);
  background:
    linear-gradient(135deg,
      rgba(255,255,255,.82) 0%,
      rgba(255,255,255,.55) 62%,
      rgba(255,255,255,.10) 100%),
    linear-gradient(135deg,
      rgba(0,138,252,.24) 0%,
      rgba(80,170,255,.14) 55%,
      rgba(150,200,255,.18) 100%);
  border:0;
  box-shadow:0 24px 52px -28px rgba(0,42,64,.36);
}

/* ---- Logo-only panel: no card/background behind the logo ---- */
.cs-detail-panel.cs-detail-panel--logo-only,
.cs-detail-panel.cs-detail-panel--logo-only:hover{
  background:none;
  border:0;
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  transform:none;
}
.cs-detail-panel.cs-detail-panel--logo-only::before{
  content:none;
}

/* ---- Gradient header variant (At a Glance / Testimonial) ---- */
.cs-detail-panel--gradient-head{
  padding:0 26px 26px;
}
.cs-detail-gradient-head{
  position:relative;
  margin:0 -26px 22px;
  padding:14px 26px 14px;
  border-radius:14px 14px 0 0;
  overflow:hidden;
}
.cs-detail-gradient-head::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, var(--vivid-azure) 0%, var(--vivid-azure) 10%, rgba(0,138,252,.45) 40%, rgba(0,138,252,.10) 70%, rgba(0,138,252,0) 88%);
  z-index:0;
  pointer-events:none;
}
.cs-detail-gradient-label{
  position:relative;
  z-index:1;
  font-family:var(--display);
  font-weight:700;
  font-size:16.5px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#fff;
  line-height:1;
}

/* ---- Bare panel variant (Background / Performance & Outcome) ---- */
.cs-detail-panel.cs-detail-panel--bare{
  padding:22px 26px 24px;
}
.cs-detail-panel--bare p{ color:var(--ink); }
.cs-detail-panel--bare .cs-detail-panel-head{
  min-height:60.5px;
  align-items:center;
  margin-bottom:14px;
}

@media (max-width:900px){
  .cs-detail-grid{ grid-template-columns:1fr; }
}
@media (max-width:520px){
  .cs-detail-container{ padding:0 22px; }
  .cs-detail-banner{ padding:26px 28px; }
  .cs-detail-glance{ grid-template-columns:repeat(2, 1fr); }
  .cs-detail-quote-foot{
    flex-direction:column;
    align-items:flex-start;
  }
  .cs-detail-attr{ text-align:left; }
}
