/* ═══════════════════════════════════════════════════════════
   CASE STUDY TEMPLATE
   Light theme template used by individual customer story pages.
   Load AFTER brand.css + nav-footer.css. Scope with body.case-study-template.
   ═══════════════════════════════════════════════════════════ */

body.case-study-template {
  --cst-bg:           #d4d4d4;
  --cst-card:         #e5e5e5;
  --cst-tag-bg:       #f0f0f0;
  --cst-text:         #171717;
  --cst-text-soft:    #404040;
  --cst-text-muted:   #525252;
  --cst-border:       #171717;
  --cst-border-soft:  rgba(23,23,23,0.18);
  --cst-lime:         #f2ff70;
  --cst-lime-soft:    #ecf684;

  background: var(--cst-bg);
  color: var(--cst-text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: visible;
  /* Osano CMP adds padding-bottom on body; without this, that band shows --cst-bg under the dark footer. */
  padding-bottom: 0 !important;
}

html:has(body.case-study-template) {
  background: #111;
}

/* Do not set global `body.case-study-template a { color: … }` here — it matches
   `.nav-links a` specificity and would override the nav link colors from brand.css. */

/* ── Eyebrow Tag (Figma "Tag" / 12px Eyebrow) ── */
.cst-tag {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  width: fit-content;
  background: var(--cst-tag-bg);
  color: var(--cst-text-soft);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.24px;
  padding: 5px 8px;
  border-radius: 2.25px;
  text-transform: none;
}

/* ════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════ */
.cst-hero {
  position: relative;
  width: 100%;
  min-height: 356px;
  border: 0.5px solid var(--cst-border);
  background:
    linear-gradient(
      92.98deg,
      #d4d4d4 39.86%,
      #d9dcb8 72.97%,
      #e0e890 103.72%,
      #f2ff70 138.24%
    );
  overflow: hidden;
  /* No extra margin-top: body { padding-top: 64px } in brand.css already clears the fixed nav */
}

.cst-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: 80px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  min-height: 356px;
}

.cst-hero-image {
  position: absolute;
  inset: 0;
  left: 54px;
  height: 586px;
  margin-top: -223px;
  margin-bottom: -223px;
  margin-left: -265px;
  margin-right: -265px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.cst-hero-image img {
  position: absolute;
  top: 50%;
  left: 102px;
  transform: translate(-50%, -50%);
  width: 115%;
  height: auto;
  min-height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: right center;
}

.cst-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90.76deg,
      #d4d4d4 0%,
      #d4d4d4 38%,
      rgba(212, 212, 212, 0.92) 55%,
      rgba(212, 212, 212, 0.65) 75%,
      rgba(242, 255, 112, 0.22) 100%
    ),
    linear-gradient(
      92.98deg,
      rgba(212, 212, 212, 0) 39.86%,
      rgba(217, 220, 184, 0.45) 72.97%,
      rgba(224, 232, 144, 0.55) 103.72%,
      rgba(242, 255, 112, 0.65) 138.24%
    );
}

.cst-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 16px;
  color: var(--cst-text);
  text-decoration: none;
  width: fit-content;
}

/* Match hairline strokes on template (0.7px solid var(--cst-border)) */
.cst-back-link-label,
.cst-btn-text-label {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--cst-border);
  text-decoration-thickness: 0.7px;
}

.cst-back-link-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.cst-back-link:hover .cst-back-link-arrow,
.cst-back-link:focus-visible .cst-back-link-arrow {
  transform: translateX(-20px);
}

@media (prefers-reduced-motion: reduce) {
  .cst-back-link-arrow {
    transition: none;
  }
  .cst-back-link:hover .cst-back-link-arrow,
  .cst-back-link:focus-visible .cst-back-link-arrow {
    transform: none;
  }
}

.cst-hero-heading {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
}

.cst-hero-logo {
  display: block;
  width: 71.4px;
  height: 25.5px;
  flex-shrink: 0;
}

/* Per-page: insert <br> in the markup where the headline should break (always two lines). */
.cst-hero-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--cst-text);
}

/* ── Hero variant: DISH (Figma Web 2.0, Dish Heading Banner 619:2020 — same layout pattern as F&B / 680:245) ── */
body.case-study-template .cst-hero--dish.cst-hero {
  background: #d4d4d4;
  border-color: #0a0a0a;
}

/* Grain overlay (“Kognitos Noise” on frame in file) */
body.case-study-template .cst-hero--dish.cst-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.085;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* Match hero section height exactly so there are no vertical gaps in the photo band. */
body.case-study-template .cst-hero--dish .cst-hero-image {
  z-index: 1;
  inset: 0;
  margin: 0;
  max-width: none;
  /* No custom height — inherits hero section height via inset: 0 */
}

body.case-study-template .cst-hero--dish .cst-hero-inner {
  z-index: 5;
}

/*
 * Photo wrapper: right 55% of hero (45% left = ~648px at 1440px ≈ Figma's 649px column).
 * inset: 0 pins it to the image layer edges, guaranteeing no top/right/bottom gaps.
 * background matches hero fill so any contain letterboxing on the left is invisible.
 */
body.case-study-template .cst-hero--dish .cst-hero-dish-photo {
  position: absolute;
  left: 45%;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  background: #d4d4d4;
}

body.case-study-template .cst-hero--dish .cst-hero-dish-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: right top;
  /* Scale down so the full dish is visible and smaller; origin: right top keeps right/top edges flush. */
  transform: scale(0.77) translateY(-4%);
  transform-origin: right top;
  backface-visibility: hidden;
}

body.case-study-template .cst-hero--dish .cst-hero-image::after {
  background: none;
}

body.case-study-template .cst-hero--dish .cst-back-link {
  color: #171717;
}

body.case-study-template .cst-hero--dish .cst-back-link-label {
  text-decoration-color: #171717;
}

body.case-study-template .cst-hero--dish .cst-hero-heading {
  gap: 22px;
  max-width: 670px;
}

/* Figma dish_Logo 632:54232 — SVG export dish-logo-figma.svg */
body.case-study-template .cst-hero--dish .cst-hero-logo {
  width: 66.113px;
  height: 23.898px;
  object-fit: contain;
  display: block;
}

body.case-study-template .cst-hero--dish .cst-hero-title {
  max-width: 670px;
  letter-spacing: -1.32px;
  line-height: 48.4px;
  color: #171717;
}

/* ── Hero variant: TTX (Figma Web 2.0, node 632:54246) ── */
body.case-study-template .cst-hero--ttx.cst-hero {
  background: #d4d4d4;
  border-color: #0a0a0a;
}

/* Grain overlay (“Kognitos Noise” on frame in file) */
body.case-study-template .cst-hero--ttx.cst-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.085;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

body.case-study-template .cst-hero--ttx .cst-hero-image {
  z-index: 1;
}

body.case-study-template .cst-hero--ttx .cst-hero-inner {
  z-index: 5;
}

/*
 * TTX hero train: fluid width (fills photo frame to viewport edge — no gray gap);
 * vertical crop from browser tuning (top + fixed height).
 */
body.case-study-template .cst-hero--ttx .cst-hero-ttx-photo {
  position: absolute;
  z-index: 1;
  left: 26.5px;
  right: 0;
  top: -291.5px;
  width: auto;
  height: 982.602px;
  max-width: none;
  pointer-events: none;
}

body.case-study-template .cst-hero--ttx .cst-hero-ttx-photo-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

body.case-study-template .cst-hero--ttx .cst-hero-ttx-photo-inner img {
  position: absolute;
  top: 469px;
  left: -113px;
  right: auto;
  width: 2059px;
  height: 515px;
  max-width: none;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: 58% center;
  transform: none;
}

body.case-study-template .cst-hero--ttx .cst-hero-image::after {
  z-index: 2;
  background: linear-gradient(
    90.76deg,
    #d4d4d4 28.06%,
    rgba(212, 212, 212, 0.793) 51.52%,
    rgba(212, 212, 212, 0.556) 62.75%,
    rgba(242, 255, 112, 0) 93.73%
  );
}

/* Figma 632:54248 — arrow plain, label underlined (match DISH) */
body.case-study-template .cst-hero--ttx .cst-back-link {
  color: #171717;
  text-decoration: none;
}

body.case-study-template .cst-hero--ttx .cst-back-link-label {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #171717;
  text-decoration-thickness: 0.7px;
}

body.case-study-template .cst-hero--ttx .cst-hero-heading {
  gap: 22px;
  max-width: min(705px, 100%);
}

body.case-study-template .cst-hero--ttx .cst-hero-logo {
  width: 74.77px;
  height: 30.6px;
  object-fit: contain;
}

body.case-study-template .cst-hero--ttx .cst-hero-title {
  max-width: 705px;
  letter-spacing: -1.32px;
  line-height: 48.4px;
  color: #171717;
}

/* Lock headline to two lines at authored break (avoid wrapping inside line 1).
   Only above 1024px — below that the title is 36px and usually fits without nowrap;
   nowrap at tablet widths can overflow the padded hero. */
@media (min-width: 1025px) {
  body.case-study-template .cst-hero--ttx .cst-hero-title-line {
    white-space: nowrap;
  }

  body.case-study-template .cst-hero--century .cst-hero-title-line {
    white-space: nowrap;
  }
}

/* ── Hero variant: CENTURY (Figma Web 2.0, node 632:54214) ── */
body.case-study-template .cst-hero--century.cst-hero {
  background: #d4d4d4;
  border-color: #0a0a0a;
}

/* Grain overlay (“Kognitos Noise” on frame in file) */
body.case-study-template .cst-hero--century.cst-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.085;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

body.case-study-template .cst-hero--century .cst-hero-image {
  z-index: 1;
}

body.case-study-template .cst-hero--century .cst-hero-inner {
  z-index: 5;
}

/*
 * Figma 632:54215 — raw photo in a 1651×982.6 frame, offset -43.5 / -291.5;
 * inner image crop: left 533px, top -66px, w 120.87%, h 135.41%.
 * Stretch past fixed Figma width: left + right + width:auto fills the hero so wide
 * viewports do not show #d4d4d4 on the right.
 */
body.case-study-template .cst-hero--century .cst-hero-century-photo {
  position: absolute;
  z-index: 1;
  left: -43.5px;
  right: 0;
  top: -291.5px;
  width: auto;
  height: 982.602px;
  max-width: none;
  pointer-events: none;
}

body.case-study-template .cst-hero--century .cst-hero-century-photo-crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

body.case-study-template .cst-hero--century .cst-hero-century-photo-crop img {
  position: absolute;
  top: -66px;
  left: 533px;
  width: 120.87%;
  height: 135.41%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  transform: none;
}

/* Gradient layer from file (over photo, under noise) */
body.case-study-template .cst-hero--century .cst-hero-image::after {
  z-index: 2;
  background: linear-gradient(
    90.76deg,
    #d4d4d4 28.06%,
    rgba(212, 212, 212, 0.793) 51.52%,
    rgba(212, 212, 212, 0.556) 62.75%,
    rgba(242, 255, 112, 0) 93.73%
  );
}

body.case-study-template .cst-hero--century .cst-back-link {
  color: #171717;
}

body.case-study-template .cst-hero--century .cst-back-link-label {
  text-decoration-color: #171717;
}

body.case-study-template .cst-hero--century .cst-hero-heading {
  gap: 22px;
  max-width: 683px;
}

body.case-study-template .cst-hero--century .cst-hero-logo {
  width: 133.45px;
  height: auto;
}

body.case-study-template .cst-hero--century .cst-hero-title {
  max-width: 683px;
  letter-spacing: -1.32px;
  line-height: 48.4px;
}

/* ── Hero variant: F&B (Figma Web 2.0, node 680:245 — F50 Heading Banner) ── */
body.case-study-template .cst-hero--fnb.cst-hero {
  background: #d4d4d4;
  border-color: #0a0a0a;
}

/* Grain overlay (“Kognitos Noise” on frame in file) */
body.case-study-template .cst-hero--fnb.cst-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.085;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

body.case-study-template .cst-hero--fnb .cst-hero-image {
  z-index: 1;
  height: 609px;
}

body.case-study-template .cst-hero--fnb .cst-hero-inner {
  z-index: 5;
}

/*
 * Photo from Figma export (dining scene, warm light on the right).
 * Assets: fnb-hero-bg.png (1600×900), fnb-hero-bg@2x.png (2880×1620) via srcset.
 */
body.case-study-template .cst-hero--fnb .cst-hero-image img {
  left: 545px;
  top: 220px;
  bottom: 0;
  transform: translateZ(0);
  width: 1435px;
  height: 100%;
  min-height: 0;
  max-width: none;
  object-fit: cover;
  object-position: 72% 42%;
  backface-visibility: hidden;
}

/* Fade-to-gray + lime tail — Dev Mode gradient on node 680:261 (banner image) */
body.case-study-template .cst-hero--fnb .cst-hero-image::after {
  z-index: 3;
  background: linear-gradient(
    89.70686560848573deg,
    #d4d4d4 51.03%,
    rgba(212, 212, 212, 0.793) 59.399%,
    rgba(212, 212, 212, 0.556) 66.267%,
    rgba(242, 255, 112, 0) 93.951%
  );
}

body.case-study-template .cst-hero--fnb .cst-back-link {
  color: #171717;
}

body.case-study-template .cst-hero--fnb .cst-back-link-label {
  text-decoration-color: #171717;
}

body.case-study-template .cst-hero--fnb .cst-hero-heading {
  gap: 22px;
  max-width: 601px;
}

body.case-study-template .cst-hero--fnb .cst-hero-logo {
  width: 112.182px;
  height: 19.245px;
  object-fit: contain;
  display: block;
}

body.case-study-template .cst-hero--fnb .cst-hero-title {
  max-width: 601px;
  letter-spacing: -1.32px;
  line-height: 48.4px;
  color: #171717;
}

/* ── Hero variant: EOS (Figma Web 2.0, node 633:143 — photo + fade + noise) ── */
body.case-study-template .cst-hero--eos.cst-hero {
  background: #d4d4d4;
  border-color: #0a0a0a;
}

/* Grain overlay (“Kognitos Noise” in file) */
body.case-study-template .cst-hero--eos.cst-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.085;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

body.case-study-template .cst-hero--eos .cst-hero-image {
  z-index: 1;
}

body.case-study-template .cst-hero--eos .cst-hero-inner {
  z-index: 5;
  justify-content: center;
  gap: 30px;
}

/*
 * Node 633:144: frame left 477.98px on a 1440-wide artboard → 33.19%.
 * (Using 39.4% was wrong and shifted the photo too far right around ~950px wide.)
 */
body.case-study-template .cst-hero--eos .cst-hero-image-eos-stack {
  position: absolute;
  left: clamp(72px, 33.19%, 478px);
  right: 0;
  top: -183px;
  height: min(578.829px, 165%);
  pointer-events: none;
}

body.case-study-template .cst-hero--eos .cst-hero-image-eos-photo {
  position: absolute;
  left: 994px;
  top: 535px;
  width: 947px;
  height: 446px;
  max-width: none;
  object-fit: cover;
  object-position: 56% 42%;
}

body.case-study-template .cst-hero--eos .cst-hero-image::after {
  z-index: 3;
  background: linear-gradient(
    90.76deg,
    #d4d4d4 48%,
    rgba(212, 212, 212, 0.793) 62%,
    rgba(212, 212, 212, 0.556) 82%,
    rgba(242, 255, 112, 0) 100%
  );
}

body.case-study-template .cst-hero--eos .cst-back-link {
  color: #171717;
}

body.case-study-template .cst-hero--eos .cst-back-link-label {
  text-decoration-color: #171717;
}

body.case-study-template .cst-hero--eos .cst-hero-heading {
  gap: 22px;
  max-width: min(634px, 100%);
}

body.case-study-template .cst-hero--eos .cst-hero-logo {
  width: 66.765px;
  height: 25.033px;
  object-fit: contain;
  display: block;
}

body.case-study-template .cst-hero--eos .cst-hero-title {
  max-width: 634px;
  letter-spacing: -1.32px;
  line-height: 48.4px;
  color: #171717;
}

@media (max-width: 900px) {
  body.case-study-template .cst-hero--eos .cst-hero-image-eos-stack {
    left: 0;
    right: 0;
    top: 0;
    height: 100%;
    min-height: 100%;
  }

  body.case-study-template .cst-hero--eos .cst-hero-image-eos-photo {
    object-position: 62% 40%;
  }
}

/* ── Hero variant: NORCO (Figma Web 2.0, node 632:54288 — photo + DISH-style fade) ── */
body.case-study-template .cst-hero--norco.cst-hero {
  background: #d4d4d4;
  border-color: #0a0a0a;
}

body.case-study-template .cst-hero--norco .cst-hero-image img {
  left: 354px;
  right: auto;
  top: 50%;
  transform: translate(0, -50%);
  width: min(1651px, 185vw);
  height: auto;
  min-height: 132%;
  max-width: none;
  object-fit: cover;
  object-position: 72% center;
}

body.case-study-template .cst-hero--norco .cst-hero-image::after {
  background: linear-gradient(
    90.76deg,
    #d4d4d4 28.06%,
    rgba(212, 212, 212, 0.793) 51.52%,
    rgba(212, 212, 212, 0.556) 62.75%,
    rgba(242, 255, 112, 0) 93.73%
  );
}

body.case-study-template .cst-hero--norco .cst-back-link {
  color: #0a0a0a;
}

body.case-study-template .cst-hero--norco .cst-back-link-label {
  text-decoration-color: #0a0a0a;
}

body.case-study-template .cst-hero--norco .cst-hero-heading {
  gap: 22px;
  max-width: 683px;
}

body.case-study-template .cst-hero--norco .cst-hero-logo {
  width: 162.95px;
  height: auto;
  aspect-ratio: 204.667 / 45.2433;
  object-fit: contain;
  display: block;
}

body.case-study-template .cst-hero--norco .cst-hero-title {
  max-width: 634px;
  letter-spacing: -1.32px;
  line-height: 48.4px;
}

/* ── Hero variant: NTL (Figma Web 2.0, node 632:54309 — trucks photo, no logo) ── */
body.case-study-template .cst-hero--ntl.cst-hero {
  background: #d4d4d4;
  border-color: #0a0a0a;
}

body.case-study-template .cst-hero--ntl .cst-hero-image img {
  left: auto;
  right: -6%;
  top: 50%;
  transform: translate(0, -50%);
  width: min(1651px, 185vw);
  height: auto;
  min-height: 132%;
  max-width: none;
  object-fit: cover;
  object-position: 82% center;
}

body.case-study-template .cst-hero--ntl .cst-hero-image::after {
  /* Fade pushed right vs legacy stops — wider blend so the photo reads in smoothly at the left */
  background: linear-gradient(
    90.76deg,
    #d4d4d4 0%,
    #d4d4d4 36%,
    rgba(212, 212, 212, 0.9) 48%,
    rgba(212, 212, 212, 0.72) 58%,
    rgba(212, 212, 212, 0.45) 70%,
    rgba(212, 212, 212, 0.22) 82%,
    rgba(242, 255, 112, 0) 100%
  );
}

body.case-study-template .cst-hero--ntl .cst-back-link {
  color: #0a0a0a;
}

body.case-study-template .cst-hero--ntl .cst-back-link-label {
  text-decoration-color: #0a0a0a;
}

body.case-study-template .cst-hero--ntl .cst-hero-heading {
  gap: 0;
  max-width: 683px;
}

body.case-study-template .cst-hero--ntl .cst-hero-title {
  max-width: 634px;
  letter-spacing: -1.32px;
  line-height: 48.4px;
}

/* ── Hero variant: CIENA (Figma Web 2.0, node 633:125 — telecom towers photo, fade-to-yellow) ── */
body.case-study-template .cst-hero--ciena.cst-hero {
  background: #d4d4d4;
  border-color: #0a0a0a;
}

/*
 * Full-bleed photo layer (same telecom-towers stock photo used by the DISH hero).
 * Anchored right; left side stays solid gray for the heading via the fade-to-yellow gradient on ::after.
 */
body.case-study-template .cst-hero--ciena .cst-hero-image {
  z-index: 1;
  inset: 0;
  margin: 0;
  max-width: none;
  height: 683px;
}

body.case-study-template .cst-hero--ciena .cst-hero-image img {
  left: 126px;
  right: 0;
  top: 1px;
  bottom: 0;
  transform: translateZ(0);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  object-fit: cover;
  object-position: right bottom;
  backface-visibility: hidden;
}

body.case-study-template .cst-hero--ciena .cst-hero-inner {
  z-index: 5;
}

/*
 * Fade overlay: extended vs Figma 633:126 — keeps solid gray longer and stretches the blend
 * toward the right so the photo does not read as a hard vertical cutoff at mid-hero.
 */
body.case-study-template .cst-hero--ciena .cst-hero-image::after {
  z-index: 3;
  background: linear-gradient(
    90.76deg,
    #d4d4d4 0%,
    #d4d4d4 40%,
    rgba(212, 212, 212, 0.88) 54%,
    rgba(212, 212, 212, 0.72) 66%,
    rgba(212, 212, 212, 0.48) 76%,
    rgba(212, 212, 212, 0.22) 86%,
    rgba(242, 255, 112, 0) 100%
  );
}

body.case-study-template .cst-hero--ciena .cst-back-link {
  color: #171717;
  text-decoration: none;
}

body.case-study-template .cst-hero--ciena .cst-back-link-label {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #171717;
  text-decoration-thickness: 0.7px;
}

body.case-study-template .cst-hero--ciena .cst-hero-heading {
  gap: 22px;
  max-width: 634px;
}

body.case-study-template .cst-hero--ciena .cst-hero-logo {
  width: 84.57px;
  height: 26.93px;
  aspect-ratio: 110.553 / 35.197;
  object-fit: contain;
  display: block;
}

body.case-study-template .cst-hero--ciena .cst-hero-title {
  max-width: 634px;
  letter-spacing: -1.32px;
  line-height: 48.4px;
  color: #171717;
}

/* ── Hero variant: JBI (Figma Web 2.0, node 655:44723 — interior photo + lime fade) ── */
body.case-study-template .cst-hero--jbi.cst-hero {
  border-color: #0a0a0a;
}

body.case-study-template .cst-hero--jbi.cst-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.085;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

body.case-study-template .cst-hero--jbi .cst-hero-image {
  z-index: 1;
  inset: 0;
  margin: 0;
  left: 0;
  height: 100%;
  max-width: none;
}

body.case-study-template .cst-hero--jbi .cst-hero-image img {
  left: 227px;
  right: 0;
  top: 0;
  bottom: 0;
  transform: none;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  object-fit: cover;
  object-position: 78% 42%;
  backface-visibility: hidden;
}

body.case-study-template .cst-hero--jbi .cst-hero-inner {
  z-index: 5;
}

body.case-study-template .cst-hero--jbi .cst-hero-image::after {
  z-index: 3;
  background: linear-gradient(
    90.76deg,
    #d4d4d4 28.06%,
    rgba(212, 212, 212, 0.793) 51.52%,
    rgba(212, 212, 212, 0.556) 62.75%,
    rgba(242, 255, 112, 0.16) 93.73%
  );
}

body.case-study-template .cst-hero--jbi .cst-back-link {
  color: #0a0a0a;
}

body.case-study-template .cst-hero--jbi .cst-back-link-label {
  text-decoration-color: #0a0a0a;
}

body.case-study-template .cst-hero--jbi .cst-hero-heading {
  max-width: 611px;
}

body.case-study-template .cst-hero--jbi .cst-hero-logo {
  width: 67.887px;
  height: 24.738px;
  object-fit: contain;
}

body.case-study-template .cst-hero--jbi .cst-hero-title {
  max-width: 611px;
  letter-spacing: -1.32px;
  line-height: 48.4px;
  color: #0a0a0a;
}

/* ════════════════════════════════════════════
   MAIN GRID  (sidebar + article)
   ════════════════════════════════════════════ */
.cst-main {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 80px 120px 0;
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 47px;
  align-items: start;
}

/* ── SIDEBAR ── */
.cst-sidebar {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 57px;
  padding: 8px 0 47px;
}

.cst-sidebar-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cst-sidebar-block.where .cst-sidebar-block-body {
  border-left: 0.7px solid var(--cst-border);
  padding: 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 16px;
  line-height: 24px;
  color: var(--cst-text);
}

.cst-sidebar-block.metrics .cst-sidebar-block-body {
  border: 0.7px solid var(--cst-border);
  padding: 24px 32px;
  background: linear-gradient(
    135.37deg,
    #d4d4d4 53.30%,
    #f2ff70 134.30%
  );
  display: flex;
  flex-direction: column;
  gap: 31px;
}

.cst-metric .cst-metric-num {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: 0;
  color: var(--cst-text);
  text-transform: capitalize;
}

.cst-metric .cst-metric-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #000;
}

/* ════════════════════════════════════════════
   ARTICLE  (right column)
   ════════════════════════════════════════════ */
.cst-article {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding: 8px 40px 40px 58px;
  border-radius: 4px;
  max-width: 869px;
}

.cst-article-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 627px;
}

/* Mirrors Figma Web 2.0 section (e.g. node 638:1691): 16px tag → column, 32px between title / subsection blocks, 12px h3 → copy. */
.cst-article-section-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.cst-article-subsection {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cst-article-subsection-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cst-article-subsection-copy p + p {
  margin-top: 0;
}

.cst-h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 24px;
  line-height: 28.8px;
  letter-spacing: 0;
  color: var(--cst-text);
  margin: 0;
}

.cst-article p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--cst-text);
  margin: 0;
}

.cst-article p + p {
  margin-top: 16px;
}

.cst-article h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 21.6px;
  color: var(--cst-text);
  margin: 0;
}

/* ── INLINE QUOTE BLOCK ── */
/* Left rule matches .cst-sidebar-block.where .cst-sidebar-block-body and .cst-pdf-card */
.cst-quote {
  display: flex;
  align-items: center;
  margin: 0;
  border-left: 0.7px solid var(--cst-border);
  padding-left: 32px;
}

.cst-quote-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1;
  min-width: 0;
}

.cst-quote blockquote {
  margin: 0;
  width: 569px;
  max-width: 100%;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 21px;
  color: var(--cst-text-soft);
}

.cst-quote-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cst-quote-avatar {
  flex-shrink: 0;
}

.cst-quote-avatar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Letter-monogram variant for quotes without a headshot */
.cst-quote-avatar.cst-quote-avatar--letter {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--cst-text);
  color: var(--cst-lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.cst-quote-meta-text {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 0.24px;
  color: var(--cst-text-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cst-quote-name {
  display: block;
}

.cst-quote-role {
  display: block;
  font-weight: 400;
  color: var(--cst-text-muted);
}

/* ── DELIVERABLES LIST ── */
.cst-deliverables {
  max-width: 627px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-body);
  color: var(--cst-text);
}

.cst-deliverables strong {
  font-weight: 500;
  font-size: 18px;
  line-height: 21.6px;
}

.cst-deliverables ul {
  list-style: disc;
  padding-left: 22px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cst-deliverables li {
  font-size: 16px;
  line-height: 24px;
}

/* ── VIDEO CARD ── */
.cst-video {
  position: relative;
  width: 100%;
  max-width: 627px;
  aspect-ratio: 627 / 343;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.cst-video img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.cst-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(115, 115, 115, 0.4);
  border-radius: 0;
}

.cst-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cst-bg);
  color: var(--cst-text);
  border-radius: 12px;
  width: 76px;
  height: 56px;
  font-family: var(--font-head);
  font-size: 36px;
  line-height: 1;
  z-index: 2;
  transition: transform .25s ease, background .25s ease;
}

.cst-video:hover .cst-video-play {
  transform: translate(-50%, -50%) scale(1.05);
  background: var(--cst-lime);
}

/* ── DISH automation infographic (full-bleed asset, matches template video width) ── */
.cst-dish-flow {
  margin: 0;
  max-width: 627px;
  width: 100%;
}

.cst-dish-flow img {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  border-image: none;
  border-radius: 4px 0 0 4px;
}

/* ── PDF DOWNLOAD CARD ── */
.cst-pdf-card {
  border-left: 0.7px solid var(--cst-border);
  padding: 22px 24px;
  max-width: 627px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
}

.cst-pdf-card-text strong {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 21.6px;
  color: var(--cst-text);
  margin-bottom: 4px;
}

.cst-pdf-card-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--cst-text);
}

.cst-pdf-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--cst-tag-bg);
  border: 1px solid var(--cst-text-soft);
  color: var(--cst-text-soft);
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 16px;
  line-height: 16px;
  padding: 15px 24px 14px;
  border-radius: 2px;
  text-decoration: none;
}

.cst-pdf-button:hover,
.cst-pdf-button:focus-visible {
  background: var(--cst-text);
  color: #fff;
  border-color: var(--cst-text);
}

.cst-pdf-button:focus-visible {
  outline: 2px solid var(--cst-lime);
  outline-offset: 2px;
}

.cst-pdf-button svg {
  width: 18px;
  height: 18px;
  transform: rotate(-132deg);
}

/* ════════════════════════════════════════════
   CTA BANNER (bottom of page)
   ════════════════════════════════════════════ */
.cst-cta {
  width: 100%;
  padding: 80px 120px 100px;
  max-width: 1440px;
  margin: 0 auto;
}

.cst-cta-card {
  position: relative;
  background: var(--cst-card);
  border: 0.75px solid var(--cst-text);
  min-height: 360px;
  padding: 64px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  overflow: hidden;
}

.cst-cta-text {
  display: flex;
  flex-direction: column;
  gap: 60px;
  max-width: 560px;
  position: relative;
  z-index: 2;
}

.cst-cta-text h2 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 28px;
  line-height: 28.8px;
  letter-spacing: 0;
  color: var(--cst-text);
  margin: 0 0 13px;
  white-space: nowrap;
}

.cst-cta-text p {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  color: var(--cst-text);
  margin: 0;
}

@media (min-width: 1025px) {
  .cst-cta-text p {
    white-space: nowrap;
  }
}

.cst-cta-buttons {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

/* Same cascade primary as homepage hero (.hero-cta--in-hero .btn-lime); reset hero row margins here */
.cst-cta-buttons.hero-cta {
  margin-top: 0;
  margin-bottom: 0;
  justify-content: flex-start;
  gap: 26px;
}

.cst-btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1;
  color: var(--cst-text);
  text-decoration: none;
}

.cst-btn-text .arrow {
  display: inline-block;
  font-size: 13px;
  transition: transform 0.2s ease;
}

.cst-btn-text:hover .arrow,
.cst-btn-text:focus-visible .arrow {
  transform: translateX(20px);
}

@media (prefers-reduced-motion: reduce) {
  .cst-btn-text .arrow {
    transition: none;
  }
  .cst-btn-text:hover .arrow,
  .cst-btn-text:focus-visible .arrow {
    transform: none;
  }
}

.cst-cta-illustration {
  position: absolute;
  top: 50%;
  right: -180px;
  margin-right: -215px;
  transform: translateY(-50%);
  width: 720px;
  height: 720px;
  pointer-events: none;
  z-index: 1;
}

.cst-cta-illustration img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* ════════════════════════════════════════════
   FOOTER OVERRIDES
   The site footer is dark; reset section spacing
   ════════════════════════════════════════════ */
body.case-study-template footer {
  margin-top: 0;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .cst-container { padding: 0 64px; }
  .cst-hero-inner { padding: 64px 64px; }
  .cst-main { padding: 64px 64px 0; gap: 36px; grid-template-columns: 260px minmax(0, 1fr); }
  .cst-cta { padding: 64px 64px 80px; }
}

@media (max-width: 1024px) {
  .cst-hero-inner { padding: 56px 48px; }
  .cst-hero-title { font-size: 36px; }
  body.case-study-template .cst-hero--dish .cst-hero-title,
  body.case-study-template .cst-hero--century .cst-hero-title,
  body.case-study-template .cst-hero--ttx .cst-hero-title,
  body.case-study-template .cst-hero--fnb .cst-hero-title,
  body.case-study-template .cst-hero--eos .cst-hero-title,
  body.case-study-template .cst-hero--norco .cst-hero-title,
  body.case-study-template .cst-hero--ntl .cst-hero-title,
  body.case-study-template .cst-hero--jbi .cst-hero-title {
    letter-spacing: -1.08px;
    line-height: 1.1;
  }
  .cst-main {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 56px 48px 0;
  }
  .cst-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 32px;
    padding: 0 0 32px;
  }
  .cst-sidebar-block { flex: 1 1 280px; }
  .cst-article {
    padding: 24px 0;
    max-width: none;
  }
  .cst-article-section,
  .cst-deliverables,
  .cst-video,
  .cst-dish-flow,
  .cst-pdf-card { max-width: none; }

  .cst-cta { padding: 48px 48px 64px; }
  .cst-cta-card {
    grid-template-columns: 1fr;
    padding: 48px 32px;
  }
  .cst-cta-illustration {
    right: -240px;
    width: 540px;
    height: 540px;
  }
}

@media (max-width: 720px) {
  .cst-hero { min-height: 280px; }
  .cst-hero-inner { padding: 40px 24px; min-height: 280px; gap: 20px; }
  .cst-hero-title { font-size: 28px; line-height: 1.15; }
  .cst-hero-image img { right: -30%; opacity: 0.6; }

  body.case-study-template .cst-hero--norco .cst-hero-image img,
  body.case-study-template .cst-hero--ntl .cst-hero-image img {
    inset: auto;
    left: auto;
    right: -42%;
    top: 50%;
    bottom: auto;
    transform: translate(0, -50%);
    width: 280%;
    min-height: 110%;
    opacity: 1;
    object-position: 72% center;
  }

  body.case-study-template .cst-hero--fnb .cst-hero-image img,
  body.case-study-template .cst-hero--dish .cst-hero-image img,
  body.case-study-template .cst-hero--jbi .cst-hero-image img {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    opacity: 1;
    object-fit: cover;
  }

  body.case-study-template .cst-hero--fnb .cst-hero-image img {
    object-position: 70% 40%;
  }

  body.case-study-template .cst-hero--jbi .cst-hero-image img {
    left: 227px;
    object-position: 82% 38%;
  }

  body.case-study-template .cst-hero--dish .cst-hero-dish-photo {
    left: 0;
  }

  body.case-study-template .cst-hero--century .cst-hero-century-photo {
    left: 0;
    right: auto;
    top: 0;
    width: 100%;
    height: 100%;
  }

  body.case-study-template .cst-hero--century .cst-hero-century-photo-crop img {
    left: auto;
    right: -42%;
    top: 50%;
    transform: translate(0, -50%);
    width: 280%;
    height: auto;
    min-height: 110%;
    max-width: none;
    opacity: 1;
    object-fit: cover;
    object-position: 72% center;
  }

  body.case-study-template .cst-hero--ttx .cst-hero-ttx-photo {
    left: 0;
    right: auto;
    top: 0;
    width: 100%;
    height: 100%;
  }

  body.case-study-template .cst-hero--ttx .cst-hero-ttx-photo-inner img {
    inset: auto;
    left: auto;
    right: -42%;
    top: 50%;
    bottom: auto;
    width: 280%;
    height: auto;
    min-height: 110%;
    transform: translate(0, -50%);
    max-width: none;
    opacity: 1;
    object-fit: cover;
    object-position: 72% center;
  }

  body.case-study-template .cst-hero--eos .cst-hero-image-eos-stack {
    left: 0;
    right: 0;
    top: 0;
    height: 100%;
    min-height: 100%;
  }

  body.case-study-template .cst-hero--eos .cst-hero-image-eos-photo {
    inset: auto;
    left: auto;
    right: -42%;
    top: 50%;
    bottom: auto;
    transform: translate(0, -50%);
    width: 280%;
    height: auto;
    min-height: 110%;
    opacity: 1;
    object-position: 72% center;
  }

  body.case-study-template .cst-hero--dish .cst-hero-title,
  body.case-study-template .cst-hero--century .cst-hero-title,
  body.case-study-template .cst-hero--ttx .cst-hero-title,
  body.case-study-template .cst-hero--fnb .cst-hero-title,
  body.case-study-template .cst-hero--eos .cst-hero-title,
  body.case-study-template .cst-hero--norco .cst-hero-title,
  body.case-study-template .cst-hero--ntl .cst-hero-title,
  body.case-study-template .cst-hero--jbi .cst-hero-title {
    letter-spacing: -0.84px;
    line-height: 1.15;
    max-width: none;
  }

  body.case-study-template .cst-hero--dish .cst-hero-heading,
  body.case-study-template .cst-hero--century .cst-hero-heading,
  body.case-study-template .cst-hero--ttx .cst-hero-heading,
  body.case-study-template .cst-hero--fnb .cst-hero-heading,
  body.case-study-template .cst-hero--eos .cst-hero-heading,
  body.case-study-template .cst-hero--norco .cst-hero-heading,
  body.case-study-template .cst-hero--ntl .cst-hero-heading,
  body.case-study-template .cst-hero--jbi .cst-hero-heading {
    max-width: none;
  }

  .cst-main { padding: 40px 24px 0; }
  .cst-sidebar { gap: 24px; padding: 0 0 24px; }
  .cst-sidebar-block.metrics .cst-sidebar-block-body { padding: 20px 24px; gap: 24px; }
  .cst-sidebar-block.where .cst-sidebar-block-body { padding: 16px 24px; }

  .cst-article { gap: 48px; padding: 8px 0 24px; }

  .cst-quote { padding-left: 20px; }
  .cst-quote-body { gap: 20px; }

  .cst-pdf-card { padding: 20px; gap: 16px; }

  .cst-cta { padding: 32px 24px 56px; }
  .cst-cta-card { padding: 32px 24px; min-height: auto; }
  .cst-cta-text { gap: 32px; }
  .cst-cta-text h2 { font-size: 24px; line-height: 1.2; }
  .cst-cta-text p { font-size: 17px; line-height: 1.4; }
  .cst-cta-illustration {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: 320px;
    margin-top: 8px;
    margin-right: 0;
    opacity: 0.8;
  }
}
