/* case-study-clean-machines.css
   Public Display of Appreciation: Clean Machines (WO PDA-CS-001).
   Uses the existing PDA tokens (colors_and_type.css via site.css). Scoped to .cm-*. */

.cm-wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.cm-narrow { max-width: 720px; }

.cm-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 20px; color: var(--pda-teal); text-underline-offset: 4px; }
.cm-results-source { margin: 16px 0 0; font-size: 14px; line-height: 1.6; color: var(--fg-3); max-width: 72ch; }

/* Hero */
.cm-hero { padding: 110px 0 40px; }
.cm-hero h1 {
  font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 58px); line-height: 1.06;
  letter-spacing: -.02em; font-weight: 600; margin: 18px 0 20px;
}
.cm-hero-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cm-hero h1 { max-width: 920px; text-wrap: balance; margin: 0 0 22px; }
.cm-hero { overflow-x: clip; }
/* Hero text paints above the logo glow, which reaches under the headline. */
.cm-hero-center > :not(.cm-logo) { position: relative; z-index: 1; }
.cm-logo {
  --w: clamp(128px, 15vw, 172px);
  position: relative; isolation: isolate; line-height: 0;
  margin: calc(var(--w) * .62) 0 40px;
}
.cm-logo img { display: block; width: var(--w); height: auto; }
/* Deeper teal glow centered on the washer graphic (about a third of the way down the logo), with an eased falloff:
   no flat core, no visible edge. Sized so the wordmark below still sits in the strong part of the glow. */
.cm-logo::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: calc(var(--w) * .33); width: calc(var(--w) * 2.9); height: calc(var(--w) * 2.5);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side,
    rgba(31, 165, 139, 1) 0%, rgba(31, 165, 139, .99) 14%, rgba(31, 165, 139, .97) 26%,
    rgba(31, 165, 139, .92) 37%, rgba(31, 165, 139, .84) 47%, rgba(31, 165, 139, .72) 56%,
    rgba(31, 165, 139, .57) 65%, rgba(31, 165, 139, .41) 73%, rgba(31, 165, 139, .26) 81%,
    rgba(31, 165, 139, .14) 88%, rgba(31, 165, 139, .05) 95%, rgba(31, 165, 139, 0) 100%);
}
.cm-lead { font-size: 19px; line-height: 1.6; color: var(--fg-2); margin: 0 0 16px; max-width: 600px; text-wrap: balance; }
.cm-hero .cm-hero-line {
  font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; font-weight: 600; margin: 0 0 30px;
  background: var(--pda-gradient-aurora); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.cm-hero .cm-actions { justify-content: center; }
.cm-hero .cm-shot { margin-top: 48px; width: 100%; max-width: 860px; }
.cm-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.cm-shot { margin: 0; }
.cm-frame {
  border: 1px solid var(--border-2); border-radius: 14px; overflow: hidden; background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.cm-frame img { display: block; width: 100%; height: auto; filter: brightness(.75); }
.cm-shot .cm-frame img { filter: brightness(.85); }


/* Story sections */
.cm-section { padding: 72px 0; border-top: 1px solid var(--border-1); }
.cm-section h2 {
  font-size: clamp(28px, 3.2vw, 42px); line-height: 1.1; letter-spacing: -.02em; font-weight: 700;
  margin: 0 0 24px; max-width: 760px;
}
.cm-section p { font-size: 18px; line-height: 1.7; color: var(--fg-2); margin: 0 0 18px; max-width: 680px; }
.cm-section p.cm-pull {
  font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3;
  color: var(--fg-1); margin-top: 28px; max-width: 640px;
}

/* Results */
.cm-stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 56px 0 0; }
.cm-stat { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 14px; padding: 22px 20px; }
.cm-stat-num {
  display: block; font-family: var(--font-display); font-size: clamp(34px, 4vw, 52px); line-height: 1;
  font-weight: 600; letter-spacing: -.02em;
  color: var(--pda-teal);
}
.cm-stat-lbl { display: block; margin-top: 10px; font-size: 16px; font-weight: 600; color: var(--fg-1); }
.cm-stat-sub { display: block; margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--fg-3); }
.cm-stat-word { font-size: clamp(30px, 3.4vw, 44px); }

/* Owner testimonial */
.cm-owner { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 36px; }
.cm-portrait {
  width: clamp(132px, 18vw, 184px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--pda-teal); padding: 5px; background: var(--bg-2, #0f1424);
  box-shadow: 0 0 0 1px var(--border-1), 0 18px 44px rgba(0, 0, 0, .5);
}
.cm-owner h2 { margin: 20px 0 0; font-size: 20px; }
.cm-owner h2 span { display: block; margin-top: 4px; font-size: 15px; font-weight: 400; color: var(--fg-3); font-family: var(--font-sans); }
.cm-quote { margin: 0 auto; max-width: 780px; }
.cm-quote blockquote {
  margin: 0; font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 32px); line-height: 1.38;
  color: var(--fg-1); letter-spacing: -.01em;
}
.cm-quote figcaption { margin-top: 24px; font-size: 15px; color: var(--fg-3); }
.cm-quote figcaption strong { display: block; color: var(--fg-1); font-size: 17px; }

/* Invitation */
/* Links inside copy: visible without relying on colour alone */
.cm-section p a:not(.btn), .cm-affil a { color: var(--pda-teal); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .cm-wrap { padding: 0 22px; }
  .cm-hero { padding: 80px 0 24px; }

  .cm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-section { padding: 52px 0; }
  .cm-section p { font-size: 17px; }
  .cm-cta { padding: 28px 22px; }
}
@media (prefers-reduced-motion: no-preference) {
  .cm-stat, .cm-path { transition: transform .25s ease, border-color .25s ease; }
  .cm-stat:hover, .cm-path:hover { transform: translateY(-2px); }
}

/* Visual story: three customer steps, staggered and overlapping */
.cm-story { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; margin: 44px 0 8px; }
.cm-step { margin: 0; position: relative; }
.cm-step .cm-frame { box-shadow: 0 18px 44px rgba(0, 0, 0, .4); }
.cm-step figcaption { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; padding: 0 4px; font-size: 15px; line-height: 1.55; color: var(--fg-2); }
.cm-step figcaption strong { color: var(--fg-1); }
.cm-badge {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
  background: var(--pda-teal); color: var(--fg-on-accent); font-weight: 700; font-size: 14px;
}
.cm-step.s1 { grid-column: 1 / 8; grid-row: 1 / 3; }
.cm-step.s1 figcaption { max-width: calc(100% - 120px); }
.cm-step.s2 { grid-column: 8 / 13; grid-row: 1; margin-top: 36px; }
.cm-step.s3 { grid-column: 7 / 13; grid-row: 2; margin: 28px 0 0 -20px; z-index: 1; }

/* Behind the scenes: lighter band, dashboard with the review card overlapping it */
.cm-band {
  margin: 72px -32px 40px; padding: 44px 44px 52px; border-radius: 20px;
  background: linear-gradient(160deg, #1a2034 0%, #151a2b 100%); border: 1px solid var(--border-2);
}
.cm-band-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--pda-teal); margin: 0 0 24px; font-weight: 600; }
.cm-backstage { position: relative; display: grid; gap: 0; }
.cm-backstage figure { margin: 0; }
.cm-backstage figcaption { margin-top: 22px; padding: 0 4px; font-size: 15px; color: var(--fg-2); }
.cm-ops { width: 100%; }
.cm-review-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; margin-top: 56px; padding: 0 4px; }
.cm-review-copy h4 { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; margin: 0 0 14px; font-weight: 600; }
.cm-review-copy p { font-size: 17px; line-height: 1.65; color: var(--fg-2); margin: 0; }
.cm-review .cm-frame { box-shadow: 0 24px 56px rgba(0, 0, 0, .55); }
.cm-demo { color: var(--fg-3); font-size: 13px; }

@media (max-width: 860px) {
  .cm-story { display: flex; flex-direction: column; gap: 32px; }
  .cm-step.s2, .cm-step.s3 { margin: 0; }
  .cm-step.s1 figcaption { max-width: none; }
  .cm-band { margin: 48px -12px 32px; }
  .cm-review-row { grid-template-columns: 1fr; gap: 28px; margin-top: 40px; }
  .cm-band { padding: 28px 20px 32px; }
}

/* Motion: only when the page script is live and motion is welcome (class set in <head>) */
html.cm-js [data-reveal] { transform: translateY(12px); transition: transform .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }
html.cm-js [data-reveal].is-in { transform: none; }
.cm-frame[data-depth] { will-change: transform; }



/* Section labels: three brand-token hues, one per chapter */
.cm-section p.cm-label {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; max-width: none;
  font-size: 13px; line-height: 1; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lbl);
}
.cm-label::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--lbl); }
.cm-label--problem { --lbl: var(--status-warning); }
.cm-label--solution { --lbl: var(--pda-teal); }
.cm-label--outcome { --lbl: #8A6BE8; }
.cm-section p.cm-note { margin: 28px 0 8px; font-size: 18px; color: var(--fg-1); }
.cm-section p.cm-fine { margin: 0 0 8px; font-size: 14px; color: var(--fg-3); }
.cm-section .cm-cmp + p.cm-note { margin-top: 24px; font-size: 14px; color: var(--fg-3); }

/* Before and After carousels */
.cm-car { margin: 48px 0 0; --cw: clamp(210px, 22vw, 250px); }
.cm-car.after { margin-top: 64px; }
.cm-car-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 28px; margin-bottom: 20px; }
.cm-car-head h3 { font-size: clamp(20px, 2.2vw, 26px); margin: 0 0 6px; font-weight: 700; }
.cm-section p.cm-car-sub { margin: 0; font-size: 16px; color: var(--fg-3); max-width: 600px; text-wrap: balance; }
.cm-section p.cm-tl-total { margin: 0; max-width: none; font-family: var(--font-display); font-size: clamp(34px, 4.2vw, 52px); line-height: 1; color: var(--status-warning); }
.cm-section .cm-car.after p.cm-tl-total { color: var(--pda-teal); }
.cm-tl-total span { font-family: var(--font-sans); font-size: 14px; color: var(--fg-3); margin-left: 6px; }
.cm-car-view {
  position: relative; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 18px 0 22px; border-radius: 16px; border: 1px solid var(--border-1); background: rgba(255, 255, 255, .02);
}
.cm-car-view::-webkit-scrollbar { display: none; }
.cm-car-view:focus-visible { outline: 2px solid var(--pda-teal); outline-offset: 3px; }
.cm-car-view.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.cm-car-view.is-auto { scroll-snap-type: none; }
.cm-car-track { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0 calc(50% - var(--cw) / 2); width: max-content; min-width: 100%; box-sizing: border-box; }
.cm-car-step {
  position: relative; flex: 0 0 var(--cw); scroll-snap-align: center; display: flex; flex-direction: column; gap: 10px;
  padding: 18px 18px 20px; min-height: 176px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--bg-2);
}
.cm-car-step::after { content: ""; position: absolute; top: 36px; left: 100%; width: 18px; height: 2px; background: var(--border-strong); }
.cm-car-step:last-child::after { display: none; }
.cm-car-n {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 700; font-size: 15px;
  background: #c99a2e; color: #1b1405;
}
.cm-car.after .cm-car-n { background: var(--pda-teal); color: var(--fg-on-accent); }
.cm-car-name { font-size: 18px; line-height: 1.25; font-weight: 600; color: var(--fg-1); }
.cm-car-note { font-size: 14px; line-height: 1.45; color: var(--fg-3); }
.cm-car-time {
  width: fit-content; margin-top: auto; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 14px;
  background: var(--pda-teal); color: var(--fg-on-accent);
}
/* Opacity and scale are set per frame by the script from each card's distance to the center. */
.cm-car.is-ready .cm-car-step { will-change: opacity, transform; transition: border-color .5s ease, box-shadow .5s ease; }
.cm-car.is-ready .cm-car-step.is-active { border-color: var(--pda-teal); box-shadow: 0 14px 36px rgba(0, 0, 0, .4); }
.cm-car.before.is-ready .cm-car-step.is-active { border-color: #c99a2e; }
.cm-car-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }
.cm-car-status { min-width: 9em; text-align: center; font-size: 14px; color: var(--fg-3); }
.cm-car-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--bg-2); color: var(--fg-1); border: 1px solid var(--border-strong); font-size: 20px; line-height: 1;
}
.cm-car-btn:hover:not(:disabled) { border-color: var(--pda-teal); color: var(--pda-teal); }
.cm-car-btn:focus-visible { outline: 2px solid var(--pda-teal); outline-offset: 3px; }
.cm-car-btn:disabled { opacity: .35; cursor: default; }
.cm-car-btn[hidden] { display: none; }
.cm-car-play { font-size: 13px; margin-left: 6px; }

/* Customer voice */
.cm-voice { margin: 72px auto 0; max-width: 820px; text-align: center; padding: 40px 0 0; border-top: 1px solid var(--border-2); }
.cm-voice blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 40px); line-height: 1.25; color: var(--fg-1); letter-spacing: -.01em; }
.cm-section .cm-voice blockquote p { margin: 0; font-size: inherit; line-height: inherit; color: inherit; max-width: none; }
.cm-voice figcaption { margin-top: 22px; font-size: 15px; color: var(--fg-3); }
.cm-voice figcaption strong { display: block; color: var(--fg-1); font-size: 17px; }

/* Monthly Conversions: two bordered columns on one shared scale (0 to 9) */
.cm-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 12px; }
.cm-cmp-col { border: 1px solid var(--border-2); border-radius: 18px; padding: 28px 28px 24px; background: var(--bg-2); }
.cm-cmp-col.after { border-color: rgba(32, 200, 162, .6); background: linear-gradient(160deg, rgba(32, 200, 162, .12), rgba(30, 130, 210, .1)), var(--bg-2); }
.cm-cmp-col h3 { margin: 0; font-size: 24px; font-weight: 700; }
.cm-cmp-col.after h3 { color: var(--pda-teal); }
.cm-section .cm-cmp-period { margin: 4px 0 28px; font-size: 14px; color: var(--fg-3); }
.cm-cmp-chart { padding-top: 34px; display: flex; justify-content: space-around; gap: 24px; }
.cm-vcol { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 1; }
.cm-vtrack { position: relative; height: 200px; width: 100%; max-width: 120px; display: flex; align-items: flex-end; border-bottom: 2px solid var(--border-strong); }
.cm-vbar { position: relative; display: block; width: 100%; height: var(--h); border-radius: 10px 10px 0 0; background: #3b4670; }
.cm-cmp-col.after .cm-vbar.inq { background: linear-gradient(180deg, #4FA0DA, #1E82D2); }
.cm-cmp-col.after .cm-vbar.cust { background: linear-gradient(180deg, #4be0bd, #20C8A2); }
.cm-val { position: absolute; left: 0; right: 0; bottom: 100%; padding-bottom: 6px; text-align: center; font-weight: 700; font-size: 22px; color: var(--fg-1); }
.cm-vlbl { font-size: 15px; color: var(--fg-2); text-align: center; }

/* Invitation */
.cm-meet { text-align: center; padding-bottom: 24px; }
.cm-meet h2, .cm-meet p { margin-left: auto; margin-right: auto; }
.cm-divider { border: 0; height: 2px; border-radius: 2px; margin: 96px auto; max-width: 720px; background: var(--pda-gradient-aurora); opacity: .75; }
.cm-cta { margin: 0 auto 40px; max-width: 900px; padding: 48px 40px; border-radius: 18px; border: 1px solid var(--border-2); background: var(--pda-gradient-aurora-soft); text-align: center; }
.cm-cta h3 { text-wrap: balance; font-family: var(--font-display); font-size: clamp(24px, 2.8vw, 34px); line-height: 1.15; margin: 0 0 14px; font-weight: 600; }
.cm-meet .cm-cta p { margin-bottom: 22px; }
.cm-cta .cm-actions { justify-content: center; }
.cm-meet p.cm-affil { margin: 0 auto 32px; font-size: 13px; color: var(--fg-3); }

/* Screenshot lightbox */
.cm-zoom { all: unset; display: block; position: relative; cursor: zoom-in; width: 100%; }
.cm-zoom:focus-visible { outline: 3px solid var(--pda-teal); outline-offset: -3px; }
.cm-zoom-tag {
  display: block; padding: 9px 14px; font-size: 13px; font-weight: 600; text-align: right; letter-spacing: .02em;
  background: #151b2d; color: var(--fg-1); border-top: 1px solid var(--border-2);
}
.cm-zoom:hover .cm-zoom-tag { color: var(--pda-teal); }
.cm-lb { border: 0; padding: 52px 0 0; background: transparent; max-width: 96vw; max-height: 96dvh; overflow: visible; }
.cm-lb::backdrop { background: rgba(6, 9, 16, .88); }
.cm-lb img { display: block; max-width: min(96vw, 1400px); max-height: calc(96dvh - 60px); width: auto; height: auto; border-radius: 10px; background: #fff; }
.cm-lb-close {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 24px; line-height: 1;
  background: var(--bg-2); color: #fff; border: 1px solid var(--border-strong);
}
.cm-lb-close:focus-visible { outline: 2px solid var(--pda-teal); outline-offset: 3px; }
html.cm-lb-open { overflow: hidden; }

@media (max-width: 860px) {
  .cm-hero h1 { font-size: clamp(28px, 7.4vw, 40px); }
  .cm-car { --cw: min(58vw, 240px); }
  .cm-cmp { grid-template-columns: 1fr; }
  .cm-cmp-col { padding: 22px 20px; }
  .cm-vtrack { height: 160px; }
  .cm-divider { margin: 72px auto; }
  .cm-voice { margin-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-car.is-ready .cm-car-step { transition: none; }
  html.cm-js [data-reveal] { transform: none; transition: none; }
  .cm-frame[data-depth] { transform: none !important; }
}

@media (max-width: 480px) {
  .cm-stats { grid-template-columns: 1fr; }
  .cm-cta { padding: 28px 22px; }
}

/* The section's paragraph rule must not flatten the owner's quotation. */
.cm-section .cm-quote blockquote p { font: inherit; color: inherit; max-width: none; margin: 0; }
