/* ============================================
   Case Study Page Template
   Purpose: Social proof + measurable outcome.
   Narrative structure with metrics.
   ============================================ */

/* Dark wrapper — extends behind nav, hero and content card */
.cs-dark-wrap {
  position: relative;
  background:
    url('/img/hero-full-glass.webp') center top / 100% auto no-repeat,
    #0a1628;
  padding-bottom: 3rem;
  margin-top: -52px;
}

/* No ::before overlay needed — darkening baked into image */

/* Liquid Glass nav — Apple-style */
.site-header {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.06) 40%,
      rgba(255, 255, 255, 0.03) 70%,
      rgba(255, 255, 255, 0.10) 100%
    );
  -webkit-backdrop-filter: blur(48px) saturate(200%);
  backdrop-filter: blur(48px) saturate(200%);
  border-top: 0.5px solid rgba(255, 255, 255, 0.45) !important;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    inset 0 -1px 1px rgba(255, 255, 255, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.18);
}

/* Glass dropdown panels */
.site-header .mega-panel,
.site-header .dropdown-panel {
  background:
    linear-gradient(
      180deg,
      rgba(10, 22, 40, 0.92) 0%,
      rgba(10, 22, 40, 0.95) 50%,
      rgba(10, 22, 40, 0.92) 100%
    ) !important;
  -webkit-backdrop-filter: blur(80px) saturate(180%);
  backdrop-filter: blur(80px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 0.5px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(255, 255, 255, 0.03),
    0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Hero — full-bleed image with dark overlay, centered headline */
.cs-hero {
  position: relative;
  z-index: 1;
  color: var(--f3-ink);
}

.cs-hero-overlay {
  display: none;
}

.cs-hero > .f3-wrap {
  position: relative;
  z-index: 1;
  padding: 202px 0 100px;
  text-align: center;
}

/* Content card — solid paper, floating with dark gutters */
.cs-content-panel {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: -80px auto 0;
  background: var(--f3-paper);
  border-radius: 1.25rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  padding-top: 1px; /* margin collapse fix */
  overflow: hidden;
}

/* Breadcrumbs over hero image */
.cs-hero .f3-breadcrumb {
  justify-content: center;
  margin-bottom: 1.25rem;
}

.cs-hero .f3-breadcrumb a {
  color: #fff;
}

.cs-hero .f3-breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.cs-hero .f3-breadcrumb-sep {
  color: rgba(255, 255, 255, 0.7);
  opacity: 1;
}

.cs-hero .f3-breadcrumb-current {
  color: rgba(255, 255, 255, 0.85);
  opacity: 1;
}

.cs-hero-type {
  display: none;
}

.cs-hero-title {
  margin: 0 auto;
  font-family: "Canela", Georgia, serif;
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: #fff;
  max-width: 38ch;
}

/* Intro section — text left, image right */
.cs-intro {
  padding: 60px 0 48px;
}

.cs-intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: start;
}

.cs-intro-text {
  padding-top: 0;
}

.cs-intro-text .cs-phase-title {
  font-size: 2rem;
  margin: 0 0 1.25rem;
}

.cs-intro-body p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--f3-text-soft);
}

.cs-intro-body p:last-child {
  margin-bottom: 0;
}

.cs-intro-image img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  object-fit: cover;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

/* Dashboard metrics panel */
.cs-dashboard {
  background: #0a1628;
  padding: 48px 0;
}

.cs-dashboard-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.cs-dash-metric {
  text-align: center;
  padding: 0 16px;
}

.cs-dash-metric + .cs-dash-metric {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.cs-dash-value {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 2.75rem;
  line-height: 1;
  color: #fff;
  margin-bottom: 0.6rem;
}

.cs-dash-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* Full-width patent-drawing separators */
.cs-separator {
  display: block;
  width: 100%;
  max-width: 1120px;
  height: auto;
  margin: 0 auto;
  padding: 8px 1.5rem;
  box-sizing: border-box;
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

/* Narrative sections */
.cs-phase {
  padding: 56px 0;
}

.cs-phase-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Phase icon — sits left of the title */
.cs-phase-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--f3-text-soft);
}

.cs-phase-title {
  margin: 0;
  font-family: "Canela", Georgia, serif;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--f3-text);
}

/* Override base style.css: body:not(.home) main h2 { margin-top: 2.5rem } */
.cs-content-panel .cs-phase-title {
  margin-top: 0;
}

.cs-phase-body {
  max-width: 65ch;
  padding-left: 52px;
}

.cs-phase-body p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--f3-text-soft);
}

.cs-phase-body p:last-child {
  margin-bottom: 0;
}

/* Pull quote */
.cs-quote {
  padding: 56px 0 64px;
}

.cs-quote-inner {
  padding-left: 1.5rem;
  border-left: 2px solid var(--f3-text);
  max-width: 55ch;
}

.cs-quote-text {
  margin: 0 0 1rem;
  font-family: "Canela", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--f3-text);
  font-style: italic;
}

.cs-quote-attr {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--f3-text-soft);
}

/* Responsive */
@media (max-width: 1024px) {
  .cs-hero > .f3-wrap { padding: 172px 0 100px; }
  .cs-content-panel { margin: -60px 1.5rem 0; }
  .cs-phase { padding: 48px 0; }
  .cs-intro { padding: 48px 0 40px; }
  .cs-quote { padding: 48px 0 56px; }
  .cs-dashboard-inner { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 720px) {
  .cs-hero > .f3-wrap { padding: 132px 0 80px; }
  .cs-content-panel { margin: -48px 1rem 0; border-radius: 1rem; }
  .cs-dark-wrap {
    padding-bottom: 2rem;
    background-size: 300% auto;
    background-position: center top;
  }
  .cs-phase { padding: 40px 0; }
  .cs-intro { padding: 40px 0 32px; }
  .cs-intro-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cs-intro-image { order: -1; }
  .cs-intro-text .cs-phase-title { font-size: 1.5rem; }
  .cs-quote { padding: 40px 0 48px; }
  .cs-phase-body { padding-left: 0; }
  .cs-phase-title { font-size: 1.5rem; }
  .cs-phase-icon { width: 28px; height: 28px; }
  .cs-dashboard { padding: 36px 0; }
  .cs-dashboard-inner { grid-template-columns: 1fr 1fr; }
  .cs-dash-metric + .cs-dash-metric { border-left: none; }
  .cs-dash-metric { padding: 16px; }
  .cs-dash-value { font-size: 2rem; }
}
