/* ==========================================================================
   Dfly Inc — client case study detail pages (16 October 2026)
   Layout after the client's reference: light hero with visual, KPI tiles,
   About the Client, Campaign Objectives, numbered strategy, What We
   Delivered, results funnel, optional creatives / testimonial, more case
   studies. Rendered by tools/build-case-studies.js. Loaded only on the
   client case study pages (case-studies/<client>-<service>.html).
   ========================================================================== */

/* --- Shared section header ------------------------------------------------ */
.cc-section {
  padding-block: 72px;
}

.cc-head {
  max-width: 760px;
  margin-bottom: 32px;
}

.cc-head h2 {
  font-size: 32px;
  line-height: 1.25;
}

.cc-head p {
  margin-top: 12px;
  font-size: 16px;
  line-height: 28px;
  color: var(--color-text);
}

.cc-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
}

/* --- Hero (light) --------------------------------------------------------- */
.cc-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 64px;
  background: linear-gradient(120deg, #fff7f1 0%, #ffffff 48%, #f3f5fb 100%);
}

.cc-hero::after {
  content: "";
  position: absolute;
  top: -160px;
  right: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(235, 101, 31, 0.12), transparent);
  pointer-events: none;
}

.cc-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.cc-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
}

.cc-back:hover {
  color: var(--color-primary-dark);
}

.cc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 14px 6px 6px;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--color-primary-darker);
  background-color: var(--color-primary-tint);
  border-radius: 999px;
}

.cc-kicker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--color-white);
  background-color: var(--color-primary-dark);
  border-radius: 50%;
}

.cc-kicker-icon .icon {
  width: 15px;
  height: 15px;
}

.cc-hero h1 {
  margin-top: 18px;
  font-size: clamp(32px, 3.4vw, 50px);
  line-height: 1.15;
  color: var(--color-navy);
}

.cc-client-line {
  margin-top: 12px;
  font-size: 18px;
  line-height: 28px;
  color: var(--color-text-muted);
}

.cc-client-line strong {
  color: var(--color-primary-dark);
}

.cc-lead {
  max-width: 560px;
  margin-top: 14px;
  font-size: 16px;
  line-height: 28px;
  color: var(--color-text);
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cc-hero-visual {
  position: relative;
  padding: 16px;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.06);
  border-radius: 24px;
  box-shadow: 0 40px 80px -40px rgba(11, 18, 32, 0.35);
}

.cc-hero-visual > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.cc-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.06);
  border-radius: 14px;
  box-shadow: 0 18px 36px -18px rgba(11, 18, 32, 0.4);
}

.cc-float--a {
  bottom: -22px;
  left: -22px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.cc-float--b {
  top: -18px;
  right: -14px;
}

.cc-float-value {
  font-size: 26px;
  font-weight: var(--fw-bold);
  line-height: 1.15;
  color: var(--color-primary-dark);
}

.cc-float-label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 18px;
  color: var(--color-text-muted);
}

.cc-float-label strong {
  font-size: 14px;
  color: var(--color-navy);
}

.cc-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: var(--fw-bold);
  color: var(--color-white);
  background-color: var(--color-navy);
  border-radius: 9px;
}

.cc-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: var(--color-white);
}

.cc-logo--lg {
  width: 72px;
  height: 72px;
  font-size: 22px;
  border-radius: 16px;
}

/* --- KPI tiles ------------------------------------------------------------ */
.cc-kpis {
  position: relative;
  z-index: 2;
  margin-top: 12px;
}

.cc-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cc-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 20px 18px;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-radius: 16px;
  box-shadow: 0 14px 34px -24px rgba(11, 18, 32, 0.35);
}

.cc-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  color: var(--color-primary-dark);
  background-color: var(--color-primary-tint);
  border-radius: 11px;
}

.cc-kpi-icon .icon {
  width: 20px;
  height: 20px;
}

.cc-kpi-value {
  font-size: 28px;
  font-weight: var(--fw-bold);
  line-height: 1.15;
  color: var(--color-navy);
}

.cc-kpi-label {
  font-size: 13.5px;
  line-height: 19px;
  color: var(--color-text-muted);
}

.cc-kpi.is-derived .cc-kpi-icon {
  color: var(--color-navy);
  background-color: var(--color-bg-alt);
}

/* --- About the client ------------------------------------------------------ */
.cc-about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 32px;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-radius: 20px;
}

.cc-about-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.cc-about-brand strong {
  margin-top: 8px;
  font-size: 20px;
  color: var(--color-navy);
}

.cc-about-brand > span:last-child {
  font-size: 14px;
  color: var(--color-text-muted);
}

.cc-about-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.cc-about-facts div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.cc-about-facts div:last-child {
  border-bottom: 0;
}

.cc-about-facts dt {
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
}

.cc-about-facts dd {
  margin: 0;
  font-size: 14px;
  color: var(--color-text);
}

.cc-about-goal {
  height: 100%;
  margin: 0;
  padding: 20px;
  font-size: 15px;
  line-height: 25px;
  color: var(--color-text);
  background-color: var(--color-primary-tint);
  border-radius: 14px;
}

/* --- Objectives ------------------------------------------------------------ */
.cc-obj-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.cc-obj {
  padding: 24px 22px;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.06);
  border-radius: 16px;
  box-shadow: 0 14px 34px -24px rgba(11, 18, 32, 0.35);
}

.cc-obj-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  color: var(--color-white);
  background-color: var(--color-primary-dark);
  border-radius: 12px;
}

.cc-obj-icon .icon {
  width: 22px;
  height: 22px;
}

.cc-obj h3,
.cc-step h3 {
  font-size: 17px;
  line-height: 1.3;
  color: var(--color-navy);
}

.cc-obj p,
.cc-step p {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 23px;
  color: var(--color-text-muted);
}

/* --- Strategy steps -------------------------------------------------------- */
.cc-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.cc-steps::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 24px;
  right: calc((100% - 4 * 20px) / 5 - 24px);
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), rgba(235, 101, 31, 0.2));
}

.cc-step {
  position: relative;
}

.cc-step-num {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: var(--fw-bold);
  color: var(--color-white);
  background-color: var(--color-primary-dark);
  border: 4px solid var(--color-white);
  border-radius: 50%;
  box-shadow: 0 10px 20px -10px rgba(200, 80, 15, 0.7);
}

/* --- Delivered ------------------------------------------------------------- */
.cc-built-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cc-built {
  display: flex;
  gap: 16px;
  padding: 22px;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.06);
  border-radius: 16px;
}

.cc-built-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--color-primary-dark);
  background-color: var(--color-primary-tint);
  border-radius: 12px;
}

.cc-built h3 {
  font-size: 17px;
  line-height: 1.3;
  color: var(--color-navy);
}

.cc-built p {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 23px;
  color: var(--color-text-muted);
}

.cc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.cc-tags li {
  padding: 6px 14px;
  font-size: 14px;
  color: var(--color-navy-700);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

/* --- Creatives (only when supplied) ---------------------------------------- */
.cc-creative-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.cc-creative {
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 14px 34px -24px rgba(11, 18, 32, 0.35);
}

.cc-creative img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Performance ----------------------------------------------------------- */
.cc-perf {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}

.cc-perf-card {
  padding: 28px;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-radius: 20px;
}

.cc-funnel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.cc-funnel li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cc-funnel-bar {
  display: flex;
  align-items: center;
  width: var(--w);
  min-width: 120px;
  height: 52px;
  padding: 0 18px;
  background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
  border-radius: 12px;
}

.cc-funnel li:nth-child(2) .cc-funnel-bar {
  background: linear-gradient(90deg, var(--color-navy-700), var(--color-navy-600));
}

.cc-funnel li:nth-child(3) .cc-funnel-bar {
  background: linear-gradient(90deg, #1f8a7a, #2aa892);
}

.cc-funnel-value {
  font-size: 20px;
  font-weight: var(--fw-bold);
  color: var(--color-white);
}

.cc-funnel-label {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
}

.cc-rates {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.cc-rates li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.cc-rates li:last-child {
  border-bottom: 0;
}

.cc-rate-value {
  min-width: 84px;
  font-size: 26px;
  font-weight: var(--fw-bold);
  color: var(--color-primary-dark);
}

.cc-rate-text {
  font-size: 14.5px;
  line-height: 22px;
  color: var(--color-text);
}

.cc-perf-note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 19px;
  color: var(--color-text-muted);
}

/* --- Testimonial (only when supplied) -------------------------------------- */
.cc-quote {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 40px;
  text-align: center;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-radius: 20px;
}

.cc-quote-mark {
  display: inline-flex;
  color: var(--color-primary-dark);
}

.cc-quote blockquote {
  margin: 14px 0 0;
  font-size: 20px;
  line-height: 32px;
  color: var(--color-navy);
}

.cc-quote figcaption {
  display: flex;
  flex-direction: column;
  margin-top: 18px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.cc-quote figcaption strong {
  font-size: 16px;
  color: var(--color-navy);
}

/* --- More case studies ----------------------------------------------------- */
.cc-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.cc-more {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  overflow: hidden;
  color: inherit;
  background-color: var(--color-white);
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-radius: 18px;
  box-shadow: 0 14px 34px -24px rgba(11, 18, 32, 0.35);
  transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
}

.cc-more-media {
  display: block;
  background-color: var(--color-bg-alt);
}

.cc-more-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cc-more-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
}

.cc-more-client {
  font-size: 12px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
}

.cc-more-title {
  font-size: 18px;
  font-weight: var(--fw-bold);
  line-height: 1.3;
  color: var(--color-navy);
}

.cc-more-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.cc-more-stats span {
  display: flex;
  flex-direction: column;
}

.cc-more-stats strong {
  font-size: 15px;
  color: var(--color-navy);
}

.cc-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 14.5px;
  font-weight: var(--fw-semibold);
  color: var(--color-primary-darker);
}

.cc-more-actions {
  margin-top: 28px;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .cc-obj,
  .cc-built {
    transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
  }

  .cc-obj:hover,
  .cc-built:hover,
  .cc-more:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px -22px rgba(11, 18, 32, 0.4);
  }
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 1199px) {
  .cc-about {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  }

  .cc-about-goal {
    grid-column: 1 / -1;
  }

  .cc-obj-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 32px;
  }

  .cc-steps::before {
    display: none;
  }
}

@media (max-width: 991px) {
  .cc-section {
    padding-block: 56px;
  }

  .cc-hero-grid,
  .cc-perf,
  .cc-more-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-hero-visual {
    max-width: 600px;
    margin: 12px 22px 0;
  }

  .cc-built-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-creative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .cc-hero {
    padding: 32px 0 48px;
  }

  .cc-head h2 {
    font-size: 26px;
  }

  .cc-hero-visual {
    margin: 12px 8px 0;
  }

  .cc-float--a {
    left: -8px;
  }

  .cc-float--b {
    right: -6px;
  }

  .cc-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cc-kpi {
    padding: 16px;
  }

  .cc-kpi-value {
    font-size: 23px;
  }

  .cc-about {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px;
  }

  .cc-about-facts div {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .cc-obj-grid,
  .cc-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-perf-card {
    padding: 22px 18px;
  }

  .cc-funnel-bar {
    min-width: 96px;
    height: 46px;
    padding: 0 12px;
  }

  .cc-funnel-value {
    font-size: 17px;
  }

  .cc-funnel-label {
    flex-shrink: 1;
    font-size: 13px;
  }

  .cc-more {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-more-media img {
    aspect-ratio: 16 / 9;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-obj,
  .cc-built,
  .cc-more {
    transition: none;
  }

  .cc-obj:hover,
  .cc-built:hover,
  .cc-more:hover {
    transform: none;
  }
}

/* --- Client logos on case study cards (19 October 2026) -----------------------------------
   The card image area is plain white with the client's logo centred on it,
   whole (object-fit: contain, never cropped). --logo-max (set inline by
   tools/build-case-studies.js) stops small logos being enlarged past 1.3×
   their pixel size, so they stay sharp. */
.ccs-media--logo,
.cc-more-media--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border-bottom: 1px solid rgba(23, 26, 44, 0.07);
}

.ccs-media--logo .ccs-badge {
  border: 1px solid rgba(23, 26, 44, 0.08);
  box-shadow: 0 4px 12px -8px rgba(11, 18, 32, 0.35);
}

.cs-logo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70%;
  height: 62%;
  margin-top: 10px;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-logo-stage--square,
.cs-logo-stage--circle {
  width: auto;
  height: 72%;
  aspect-ratio: 1;
}

.ccs-media--logo .cs-logo-stage img,
.cc-more-media--logo .cs-logo-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, var(--logo-max, 100%));
  max-height: 100%;
  object-fit: contain;
  transform: none;
  image-rendering: auto;
}

/* Square and round logos fill their tile (still whole: the tile is square). */
.cs-logo-stage--square img,
.cs-logo-stage--circle img {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.cs-logo-stage--circle img {
  border-radius: 50%;
}

@media (hover: hover) and (pointer: fine) {
  .ccs-card:hover .cs-logo-stage,
  .cc-more:hover .cs-logo-stage {
    transform: scale(1.05);
  }
}

/* Small badges next to the client name: the logo on white. */
.ccs-logo--img,
.cc-logo--img {
  padding: 3px;
  background-color: #fff;
  border: 1px solid rgba(23, 26, 44, 0.1);
}

.ccs-logo--circle,
.cc-logo--circle {
  padding: 0;
  border-radius: 50%;
}

.ccs-logo--circle img,
.cc-logo--circle img {
  border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
  .cs-logo-stage {
    transition: none;
  }
}

/* The card-hover zoom is for illustrations; logos lift with their tile instead. */
.ccs-card:hover .ccs-media--logo img,
.cc-more:hover .cc-more-media--logo img {
  transform: none;
}

/* Wide logos get a wide badge so they stay readable. */
.cc-logo--wide {
  width: auto;
  padding: 4px 8px;
}

.cc-logo--wide img {
  width: auto;
  max-width: 110px;
  height: 100%;
}

.cc-logo--lg.cc-logo--wide {
  padding: 8px 14px;
}

.cc-logo--lg.cc-logo--wide img {
  max-width: 170px;
}

/* "More case studies": white logo panel beside the text, divided by a thin line. */
.cc-more-media--logo {
  min-height: 200px;
  border-right: 1px solid rgba(23, 26, 44, 0.07);
  border-bottom: 0;
}

.cc-more-media--logo .cs-logo-stage img {
  aspect-ratio: auto;
}

@media (max-width: 575px) {
  .cc-more-media--logo {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 26, 44, 0.07);
  }
}
