/* Shared case study detail — informed by Minto Pyramid (lead with outcome),
   SCQA / PAR storytelling, and B2B challenge → solution → results arcs. */

.cs-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  min-height: min(58vh, 560px);
  display: flex;
  align-items: flex-end;
  padding: 0;
}

.cs-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cs-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.04);
  animation: cs-hero-settle 1.4s ease-out forwards;
}

.cs-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(10, 10, 10, 0.97) 0%, rgba(10, 10, 10, 0.78) 36%, rgba(10, 10, 10, 0.32) 66%, rgba(10, 10, 10, 0.14) 100%),
    radial-gradient(900px 420px at 16% 90%, rgba(217, 181, 69, 0.14), transparent 70%);
}

.cs-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 56px 0 44px;
  max-width: 1100px;
  animation: cs-rise 0.85s ease-out both;
}

.cs-hero .eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 14px;
}

.cs-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 16px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  max-width: 22ch;
}

.cs-hero h1.cs-hero-title {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  max-width: 18ch;
}

.cs-hero .cs-hero-line {
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
  max-width: 48ch;
}

.cs-page p.cs-lorem,
.cs-page .cs-prose .cs-lorem,
.cs-page .cs-solution-item p.cs-lorem,
.cs-page .cs-photo-missing {
  color: #dc2626;
}

.cs-photo-missing {
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 20px;
  text-align: center;
  border: 1px dashed #dc2626;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cs-hero-quote p {
  font-size: 1.05rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--muted);
  margin: 0;
}

.cs-hero-quote footer,
.cs-pullquote footer,
.cs-quote footer {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  width: auto;
  display: block;
  font-style: normal;
}

.cs-hero-quote footer {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

html.pref-high-contrast .cs-hero-media::after {
  background: linear-gradient(to top, rgba(248, 250, 252, 0.96) 0%, rgba(248, 250, 252, 0.7) 45%, rgba(248, 250, 252, 0.2) 100%);
}

.cs-page .breadcrumb {
  margin-bottom: 12px;
}

/* Snapshot: challenge / solution / result at a glance (B2B scan layer) */
.cs-snapshot {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  background: linear-gradient(180deg, rgba(217, 181, 69, 0.05), transparent 70%);
}

.cs-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-snapshot-grid li {
  min-width: 0;
}

.cs-snapshot-kicker {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
}

.cs-snapshot-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text);
}

/* Meta facts */
.cs-facts {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.cs-facts-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-facts-row li {
  min-width: 0;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

.cs-fact-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 5px;
}

.cs-fact-value {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

/* Outcomes / budget band */
.cs-outcomes {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.cs-outcomes h2 {
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  margin: 0 0 16px;
}

.cs-outcomes-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-outcomes-row li {
  min-width: 0;
}

.cs-budget-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 28px 40px;
  align-items: start;
}

.cs-budget-card {
  min-width: 0;
  padding-right: 8px;
}

.cs-budget-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 28ch;
}

.cs-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-left: 2px solid var(--border);
}

.cs-timeline li {
  position: relative;
  padding: 0 0 18px 22px;
}

.cs-timeline li:last-child {
  padding-bottom: 0;
}

.cs-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.cs-timeline-when {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.cs-timeline-what {
  display: block;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--text);
  font-weight: 600;
}

.cs-outcome-value {
  display: block;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1.15;
  margin-bottom: 8px;
}

.cs-outcome-label {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.4;
  max-width: 22ch;
}

/* Sections */
.cs-section {
  padding: 36px 0;
}

.cs-section + .cs-section {
  border-top: 1px solid var(--border);
}

.cs-section h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  margin: 0 0 12px;
  color: var(--text);
}

.cs-section h3 {
  font-size: 1.02rem;
  margin: 18px 0 10px;
  color: var(--accent);
}

.cs-prose {
  max-width: 68ch;
}

.cs-prose p {
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 0.85em;
  color: var(--text);
}

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

.cs-pullquote {
  margin: 22px 0 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent);
  max-width: 58ch;
}

.cs-pullquote p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--text);
}

.cs-pullquote footer {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

.cs-solution-stack {
  display: grid;
  gap: 22px;
  margin-top: 18px;
  max-width: 68ch;
}

.cs-solution-item h3 {
  margin: 0 0 8px;
}

.cs-solution-item h4 {
  margin: 12px 0 6px;
  font-size: 0.95rem;
  color: var(--text);
}

.cs-solution-item p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
}

.cs-solution-item p.cs-lorem {
  color: #dc2626;
}

.cs-story {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
  align-items: start;
}

.cs-story-col {
  min-width: 0;
}

.cs-story-col + .cs-story-col {
  padding-left: 36px;
  border-left: 1px solid var(--border);
}

.cs-story .cs-prose,
.cs-story .cs-solution-stack,
.cs-story .cs-pullquote,
.cs-install-copy .cs-prose,
.cs-install-copy .cs-pullquote {
  max-width: none;
}

.cs-install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px 40px;
  align-items: start;
}

.cs-install-copy h3 {
  margin: 22px 0 8px;
}

.cs-install-photo {
  margin: 0;
}

.cs-install-photo img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cs-gallery-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0 0;
}

.cs-gallery-pair figure {
  margin: 0;
}

.cs-prose ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.cs-prose li {
  margin-bottom: 0.45em;
  font-size: 1rem;
  line-height: 1.5;
}

/* Situation: copy | image */
.cs-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px 40px;
  align-items: center;
}

.cs-feature {
  margin: 0;
}

.cs-feature--inline {
  margin: 0;
}

.cs-feature img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Challenge | Approach duo */
.cs-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  align-items: start;
}

.cs-duo-col {
  min-width: 0;
}

.cs-duo-col + .cs-duo-col {
  padding-left: 36px;
  border-left: 1px solid var(--border);
}

.cs-constraints {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cs-constraints li {
  position: relative;
  padding-left: 16px;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--text);
}

.cs-constraints li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 2px;
  background: var(--accent);
}

.cs-decisions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.cs-decisions li {
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

.cs-decisions strong {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
  font-size: 1rem;
}

.cs-decisions span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.cs-product-list {
  margin: 0;
  padding-left: 1.15em;
}

.cs-product-list li {
  margin-bottom: 0.35em;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--text);
}

.cs-caption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Before / after (BAB visual bridge) */
.cs-ba {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 28px;
}

.cs-ba--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.cs-ba figure {
  margin: 0;
}

.cs-ba-label {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.cs-ba img,
.cs-gallery-item img,
.cs-gallery-pair img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.cs-ba figcaption,
.cs-gallery-item figcaption,
.cs-gallery-wide figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.cs-gallery-wide {
  margin: 0;
}

.cs-gallery-wide img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 12 / 5;
  object-fit: cover;
}

.cs-ba img,
.cs-gallery-item img,
.cs-gallery-wide img,
.cs-gallery-pair img,
.cs-install-photo img,
.cs-feature img {
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Reveal motion for content blocks */
.cs-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.cs-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Closing band: quote (wider) + CTA */
.cs-close {
  padding: 40px 0 52px;
  border-top: 1px solid var(--border);
}

.cs-close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 32px 48px;
  align-items: start;
}

.cs-quote {
  min-width: 0;
}

.cs-quote blockquote {
  margin: 0;
  max-width: none;
  padding-left: 22px;
  border-left: 3px solid var(--accent);
}

.cs-quote p {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  font-style: italic;
  margin: 0 0 14px;
  color: var(--text);
}

.cs-quote p:last-of-type {
  margin-bottom: 18px;
}

.cs-quote footer {
  font-style: normal;
}

.cs-quote-name {
  display: block;
  font-weight: 600;
  color: var(--accent);
}

.cs-quote-role {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 4px;
}

.cs-cta {
  min-width: 0;
  text-align: left;
  padding: 4px 0 0;
  border-left: 1px solid var(--border);
  padding-left: 36px;
}

.cs-cta h2 {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  margin: 0 0 10px;
}

.cs-cta p {
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 32ch;
  font-size: 1.02rem;
  line-height: 1.5;
}

.cs-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.cs-cta-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cs-cta-actions a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cs-cta-actions a.cs-cta-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast, #111);
}

.cs-cta-actions a.cs-cta-primary:hover {
  filter: brightness(1.05);
  color: var(--accent-contrast, #111);
}

@keyframes cs-hero-settle {
  to { transform: scale(1); }
}

@keyframes cs-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-hero-media img,
  .cs-hero-inner,
  .cs-reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .cs-cta-actions a {
    transition: none;
  }
}

@media (max-width: 960px) {
  .cs-hero {
    min-height: min(48vh, 440px);
  }

  .cs-snapshot-grid,
  .cs-outcomes-row,
  .cs-facts-row,
  .cs-budget-row {
    grid-template-columns: 1fr 1fr;
  }

  .cs-split,
  .cs-duo,
  .cs-ba,
  .cs-gallery-pair,
  .cs-story,
  .cs-install-grid,
  .cs-close-grid {
    grid-template-columns: 1fr;
  }

  .cs-duo-col + .cs-duo-col,
  .cs-story-col + .cs-story-col {
    padding-left: 0;
    border-left: none;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }

  .cs-cta {
    border-left: none;
    padding-left: 0;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .cs-hero h1 {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .cs-snapshot-grid,
  .cs-outcomes-row,
  .cs-facts-row,
  .cs-budget-row {
    grid-template-columns: 1fr;
  }

  .cs-hero-inner {
    padding: 44px 0 32px;
  }

  .cs-section {
    padding: 28px 0;
  }
}
