/* Master proof library: the looks for every way of showing a case (story cards, video tiles; screenshots later).
   Uses the colour variables of whichever page loads it. */
[data-proof]:not([data-ready]) { min-height: 260px; }
/* the story cards under the hero keep about the room they will need while they load, so the page below does not jump when they arrive */
@media (min-width: 761px) { [data-proof][data-view="cards"]:not([data-ready]) { min-height: 430px; } }
.pf-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: var(--gap, 24px); align-items: stretch; }
.pf-grid > * { min-width: 0; }
.pf-note { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center; margin-top: 18px; text-align: center; }
.pf-ph { color: var(--mute); font-style: italic; border-bottom: 2px dashed var(--mute); }
@media (max-width: 900px) {
  .pf-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 10px max(16px, env(safe-area-inset-left, 0px)) 22px; scroll-padding-inline: 16px; -webkit-overflow-scrolling: touch; }
  .pf-grid > * { flex: 0 0 min(82%, 320px); scroll-snap-align: start; }
}

/* view: cards. A big condition name, "went away", a short story, the person. */
.pf-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; background: var(--card); border: var(--line); border-radius: 26px; box-shadow: var(--sh); padding: 22px 22px 18px; transform: rotate(var(--tilt, 0deg)); }
.pf-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--tone); border-bottom: var(--line); border-radius: 22px 22px 0 0; }
.pf-cond { margin-top: 8px; max-width: 100%; overflow-wrap: anywhere; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; font-size: clamp(34px, 4.2vw, 50px); line-height: 1; text-decoration: line-through; text-decoration-thickness: .075em; text-decoration-color: var(--edge); text-decoration-skip-ink: none; }
.pf-gone { display: inline-flex; align-items: center; gap: 6px; background: var(--tone); border: var(--line); border-radius: 999px; padding: 3px 14px 3px 9px; font-weight: 700; font-size: 15px; transform: rotate(-2deg); box-shadow: var(--sh); }
.pf-gone svg { width: 18px; height: 18px; }
.pf-story { font-size: 16px; line-height: 1.45; }
.pf-watch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
.pf-watch svg { width: 18px; height: 18px; }
.pf-who { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: auto; padding-top: 12px; border-top: 2px dashed var(--edge); }
.pf-face { flex: none; width: 64px; height: 64px; border-radius: 50%; border: 2px dashed var(--edge); background: var(--mint); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--mute); overflow: hidden; }
.pf-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-face.has-img { border-style: solid; }
.pf-who-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-who-t b { font-size: 16px; } .pf-who-t small { font-size: 13px; color: var(--mute); }

/* view: videos. A thumbnail with a play button; a click plays it in place. */
.pf-video { margin: 0; display: flex; flex-direction: column; background: var(--card); border: var(--line); border-radius: 26px; box-shadow: var(--sh); overflow: hidden; }
.pf-vthumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; border-bottom: var(--line); background: repeating-linear-gradient(135deg, var(--leaf) 0 14px, var(--mint) 14px 28px); overflow: hidden; text-decoration: none; }
.pf-vthumb img, .pf-vthumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.pf-play { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; background: var(--sun); border: var(--line); box-shadow: var(--sh); display: grid; place-items: center; }
.pf-play svg { width: 26px; height: 26px; margin-left: 4px; }
.pf-vthumb .chip { position: absolute; left: 12px; top: 12px; z-index: 1; }
.pf-vcap { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 2px; }
.pf-vcap b { font-size: 16px; } .pf-vcap small { font-size: 13px; color: var(--mute); }

/* extras: a headline that is not struck through, the consent tag, empty state */
.pf-cond.keep { text-decoration: none; }
.pf-await { position: absolute; top: 18px; right: 14px; z-index: 2; background: var(--butter); border: 2px dashed var(--edge); border-radius: 999px; padding: 1px 10px; font: 700 12px/1.5 var(--font-body); letter-spacing: .02em; }
.pf-q .pf-await, .pf-sh .pf-await { position: static; display: inline-block; margin-left: 8px; vertical-align: middle; }
.pf-empty { text-align: center; color: var(--mute); font-weight: 500; padding: 24px 0; }

/* view: testimonials. A video with the person's words under it. */
.pf-tmn .pf-vcap { gap: 6px; padding: 16px 18px 18px; flex: 1; }
.pf-q { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; }
.pf-tmn .pf-q { font-size: 15px; }

/* view: casepage. The page for one person: video and quote, then before, what we did, after. */
.cp { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 32px); }
.cp-head { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cp-head h1 { font-size: clamp(34px, 5.4vw, 60px); }
.cp-head .pf-who { border-top: 0; padding-top: 0; margin-top: 0; width: auto; }
.cp-head .pf-face { width: 96px; height: 96px; }
.cp-head .pf-who-t b { font-size: 19px; }
.pf-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 4px; align-items: center; }
.pf-flow li { background: var(--butter); border: 2px solid var(--edge); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 15px; line-height: 1.3; }
.pf-flow li + li::before { content: '\2192'; display: inline-block; margin-right: 10px; font-weight: 800; }
.cp-media { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 28px); align-items: start; }
.cp-media .pf-vthumb { border: var(--line); border-radius: 26px; box-shadow: var(--sh); aspect-ratio: 16 / 9; }
.cp-media .pf-q { background: var(--card); border: var(--line); border-radius: 26px; box-shadow: var(--sh); padding: clamp(18px, 3vw, 28px); font-size: clamp(17px, 2vw, 20px); line-height: 1.5; font-weight: 500; }
.cp-media:not(:has(.pf-vthumb)) { grid-template-columns: minmax(0, 1fr); }
.cp-ba { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 26px); align-items: stretch; }
.cp-card { position: relative; display: flex; flex-direction: column; gap: 10px; border: var(--line); border-radius: 28px; box-shadow: var(--sh); padding: clamp(20px, 3vw, 30px); }
.cp-card.before { background: var(--bloom); } .cp-card.mid { background: var(--butter); } .cp-card.after { background: var(--leaf); }
.cp-card h2 { font-size: clamp(18px, 2vw, 22px); letter-spacing: -0.01em; margin-top: 4px; }
.cp-card p { font-size: 16px; line-height: 1.55; }
.cp-tag { align-self: flex-start; background: var(--deep); color: #FFFEF9; border-radius: 8px; padding: 3px 10px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.cp-card .pf-pills li { background: var(--card); }
.cp-card:not(:last-child)::after { content: '\2192'; position: absolute; right: calc(-1 * clamp(14px, 2.4vw, 26px) / 2); top: 50%; transform: translate(50%, -50%); z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; background: var(--card); border: var(--line); border-radius: 50%; font-weight: 800; }
.cp-foot { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.pf-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pf-pills li { border: 2px solid var(--edge); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; }
.pf-ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pf-ticks li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.pf-ticks svg { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--card); border: 2px solid var(--edge); color: var(--edge); }
.pf-q { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; }
@media (max-width: 1000px) {
  .cp-ba { grid-template-columns: minmax(0, 1fr); }
  .cp-card:not(:last-child)::after { content: '\2193'; right: auto; left: 50%; top: auto; bottom: calc(-1 * clamp(14px, 2.4vw, 26px) / 2); transform: translate(-50%, 50%); }
}
@media (max-width: 760px) { .cp-media { grid-template-columns: minmax(0, 1fr); } }

/* the condition name: the line is drawn when the card scrolls into view */
.pf-w { display: inline; }
.pf-js .pf-card { opacity: 0; transform: translateY(28px) rotate(var(--tilt, 0deg)); transition: opacity .6s ease var(--d, 0ms), transform .6s ease var(--d, 0ms); }
.pf-js .pf-card.in { opacity: 1; transform: rotate(var(--tilt, 0deg)); }
.pf-js .pf-cond:not(.keep) { text-decoration: none; }
.pf-js .pf-cond:not(.keep) .pf-w { background: linear-gradient(var(--edge), var(--edge)) no-repeat 0 58% / 0% .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .7s ease calc(var(--d, 0ms) + .35s); }
.pf-js .pf-card.struck .pf-cond:not(.keep) .pf-w { background-size: 100% .08em; }
/* the person comes slightly forward once their condition is crossed out */
.pf-js .pf-card .pf-who { opacity: .5; transform: translateY(8px) scale(.93); transform-origin: left center; transition: opacity .6s ease calc(var(--d, 0ms) + 1s), transform .7s cubic-bezier(.2, .8, .2, 1) calc(var(--d, 0ms) + 1s); }
.pf-js .pf-card.struck .pf-who { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .pf-js .pf-cond .pf-w, .pf-js .pf-who { transition: none !important; } }

/* view: journeys. A slider of before and after, one person to a slide. */
.pf-car { display: flex; flex-direction: column; gap: 14px; }
.pf-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 6px 3px 14px; margin-inline: -3px; overscroll-behavior-x: contain; border-radius: 30px; }
.pf-track::-webkit-scrollbar { display: none; }
.pf-track:focus-visible { outline: 3px solid var(--edge); outline-offset: 4px; }
.pf-slide { position: relative; flex: 0 0 calc((100% - 20px) / 2); scroll-snap-align: none; display: flex; flex-direction: column; align-items: center; gap: 16px; background: var(--card); border: var(--line); border-radius: 28px; box-shadow: var(--sh); padding: 26px clamp(16px, 2.6vw, 28px) 22px; }
.pf-slide .pf-await { top: 14px; right: 14px; }
.pf-sl-who { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pf-sl-who .pf-face { width: 112px; height: 112px; border-style: solid; border-width: 3px; box-shadow: var(--sh); }
.pf-sl-who .pf-face.mono { background: var(--leaf); color: var(--edge); font: 800 44px/1 var(--font-display); }
.pf-sl-who b { font-size: 19px; }
.pf-pair { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; position: relative; flex: 1; }
.pf-pair p { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; border: 2px solid var(--edge); border-radius: 20px; padding: 14px; margin: 0; }
.pf-pair .b { background: var(--bloom); } .pf-pair .a { background: var(--leaf); }
.pf-pair .t { font-family: var(--font-display); font-weight: 800; font-size: clamp(19px, 2vw, 23px); line-height: 1.15; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.pf-pair .t::first-letter { text-transform: uppercase; }
.pf-pair .b::after { content: '\2192'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; background: var(--card); border: 2px solid var(--edge); border-radius: 50%; font-weight: 800; }
.pf-slide .pf-watch { min-height: 44px; }
.pf-ctrl { display: flex; align-items: center; justify-content: center; gap: 10px; }
.pf-ctrl button { width: 44px; height: 44px; display: grid; place-items: center; background: var(--card); color: var(--edge); border: var(--line); border-radius: 50%; box-shadow: var(--sh); cursor: pointer; padding: 0; }
.pf-ctrl button svg { width: 20px; height: 20px; }
.pf-ctrl button:disabled { opacity: .35; cursor: default; }
.pf-ctrl button:focus-visible { outline: 3px solid var(--edge); outline-offset: 3px; }
.pf-ctrl button[hidden] { display: none; }
.pf-pp .i-play { display: none; } .pf-pp.paused .i-play { display: block; } .pf-pp.paused .i-pause { display: none; }
.pf-dots { display: flex; gap: 2px; align-items: center; }
.pf-dots button { width: 28px; height: 44px; background: none; border: 0; box-shadow: none; border-radius: 0; }
.pf-dots i { display: block; width: 10px; height: 10px; margin: auto; border-radius: 50%; border: 2px solid var(--edge); background: var(--card); transition: width .25s ease, background .25s ease; }
.pf-dots .on i { width: 26px; border-radius: 999px; background: var(--edge); }
/* two to a page on a wide screen: only every second slide is a stopping place, so the pages never overlap */
.pf-slide:nth-child(odd) { scroll-snap-align: start; }
@media (max-width: 760px) {
  .pf-slide { scroll-snap-align: start; }
  .pf-track { gap: 14px; scroll-padding-inline: 3px; }
  .pf-slide { flex-basis: 88%; padding-top: 22px; }
  .pf-sl-who .pf-face { width: 96px; height: 96px; }
  .pf-pair { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pf-pair .b::after { content: '\2193'; left: 50%; top: calc(100% + 9px); transform: translate(-50%, -50%); }
  .pf-pair .b { position: relative; }
}
@media (prefers-reduced-motion: reduce) { .pf-dots i { transition: none; } }

/* On a phone the three cards under the hero sit one under the other, so each one is plainly there. */
@media (max-width: 760px) {
  .cases .pf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; overflow: visible; margin-inline: 0; padding: 6px 0 12px; scroll-snap-type: none; }
  .cases .pf-grid > * { flex: none; }
}
