/* b1: section 2 pains (.pains__*) and section 3 slider (.cmp*, .cmpx__*).
   Seb language from tokens.css: 2px olive-deep outlines, dithered offset shadows, speech bubbles, back.out springs. */

/* ===================== 2 Pains: "Be honest. Which one is you?" =====================
   Seven pain lines in big grey type. A tap lights the line lime (the band sweeps in behind the still words) and it stays lit;
   our fix opens under it. The pirate reacts with poses only. */
.pains__in { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 40px 48px; align-items: start; }
.pains__head { margin-bottom: clamp(32px, 4vw, 52px); }
.pains__head .b { margin-top: 12px; }
.pains__item { border-top: 1px solid rgba(42, 54, 0, .2); }
.pains__item:last-child { border-bottom: 1px solid rgba(42, 54, 0, .2); }
.pains__line { display: block; width: 100%; margin: 0; padding: 16px 0 18px; border: 0; background: none; color: #85827a; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color 300ms ease; }
.pains__words { padding: 0 .06em; background: linear-gradient(var(--lime), var(--lime)) 0 90% / 0% 44% no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 650ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .pains__item:not(.is-lit) .pains__line:hover { color: #5d5b53; }
  .pains__item:not(.is-lit) .pains__line:hover .pains__words { background-size: 100% 8%; }
}
.pains__line:active { color: var(--ink); }
.pains__line:focus-visible { outline: 3px solid var(--olive); outline-offset: 4px; }
.pains__item.is-lit .pains__line { color: var(--olive-deep); }
.pains__item.is-lit .pains__words { background-size: 100% 44%; text-shadow: 0 0 28px rgba(194, 245, 66, .55); }
.pains__fix { position: relative; max-width: 56ch; margin: -4px 0 0; padding: 0 0 22px 22px; color: var(--olive-deep); }
.pains__fix::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 26px; width: 5px; border-radius: 3px; background: var(--lime); box-shadow: 0 0 0 1.5px var(--olive-deep); transform-origin: 50% 0; }
.pains__fix strong { font-weight: 600; }
.pains--js .pains__item:not(.is-open) .pains__fix { display: none; }
.pains--js .pains__item.is-open .pains__fix::before { animation: pains-bar 520ms var(--ease) both; }
@keyframes pains-bar { from { scale: 1 0; } }
.pains__sum { margin-top: 32px; }
.pains__n { display: inline-block; margin-right: 6px; padding: 2px 12px; border-radius: 999px; background: var(--lime); box-shadow: inset 0 0 0 2px var(--olive-deep); color: var(--olive-deep); font-variant-numeric: tabular-nums; }
.pains__cta { margin-top: 22px; }
.pains__side { position: sticky; top: calc(var(--top-h) + 40px); display: flex; justify-content: center; }
.pains__slot { height: 380px; width: 210px; display: flex; justify-content: center; }
@media (max-width: 900px) {
  .pains__in { grid-template-columns: 1fr; position: relative; }
  .pains__side { position: absolute; top: -8px; right: var(--gut); }
  .pains__slot { height: 150px; width: 70px; }
  .pains__head { padding-right: 78px; }
}
@media (prefers-reduced-motion: reduce) { .pains__words { transition: none; } .pains--js .pains__item.is-open .pains__fix::before { animation: none; } }

/* ===================== 3 Slider: "Alone: hardly seen. With us: 1,150,183." ===================== */
.cmpx { overflow-x: clip; }
.cmpx .sec__head { position: relative; z-index: 1; grid-template-columns: 1fr; gap: 14px; }
.cmpx__stage { position: relative; padding: 0 96px; margin-top: 64px; }
.cmp { position: relative; margin: 0; border-radius: var(--r); isolation: isolate; user-select: none; -webkit-user-select: none; }

/* the feed ocean behind the panel, full width: grey fog and unseen posts on the left, the same sea lit on the right.
   The split follows the handle: 50% of the world is the panel centre, --pw is the panel width (set by b1.js). */
.cmp__world { position: absolute; top: -110px; bottom: -110px; left: calc(50% - 50vw); width: 100vw; overflow: hidden; z-index: -2; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 26%, #000 74%, transparent); mask-image: linear-gradient(transparent, #000 26%, #000 74%, transparent); }
.cmp__fog { position: absolute; inset: 0; background: linear-gradient(180deg, #ebe8df, #e2dfd5); }
.cmp__world--bp { clip-path: inset(0 0 0 calc(50% + (var(--xf) - .5) * var(--pw))); }
.cmp__world--bp { background: var(--paper); }
.cmp__light { position: absolute; inset: 0; background: radial-gradient(46% 62% at 72% 48%, rgba(194, 245, 66, .55), rgba(194, 245, 66, .14) 58%, rgba(194, 245, 66, 0) 84%); opacity: .3; }
.cmp__world--bp::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% + (var(--xf) - .5) * var(--pw)); width: 3px; background: linear-gradient(transparent, var(--lime) 30%, var(--lime) 70%, transparent); }
.cmp__sea { position: absolute; inset: 0; }
/* a post on the feed ocean: a LinkedIn post mock-up (avatar, name lines, picture, text line) */
.cmp__ghost { position: absolute; width: var(--w, 96px); aspect-ratio: 4 / 5; border-radius: 10px; rotate: var(--r, 0deg);
  background:
    radial-gradient(circle at 15px 15px, var(--c2) 7px, transparent 7.5px),
    linear-gradient(var(--c2), var(--c2)) 30px 10px / 46% 5px no-repeat,
    linear-gradient(var(--c2), var(--c2)) 30px 19px / 28% 4px no-repeat,
    linear-gradient(var(--c3), var(--c3)) 8px 32px / calc(100% - 16px) calc(100% - 56px) no-repeat,
    linear-gradient(var(--c2), var(--c2)) 8px calc(100% - 15px) / 66% 4px no-repeat,
    var(--c1); }
.cmp__world--alone .cmp__ghost { --c1: #e2dfd5; --c2: #c9c6ba; --c3: #d4d1c5; opacity: .82; box-shadow: 0 10px 18px -14px rgba(40, 40, 30, .4); }
.cmp__world--bp .cmp__ghost { --c1: var(--paper); --c2: #a9bd6b; --c3: var(--lime-soft); box-shadow: inset 0 0 0 2px var(--olive-deep), 0 0 0 4px rgba(194, 245, 66, .55), 0 0 34px 6px rgba(194, 245, 66, .55); }

.cmp__shadow { position: absolute; inset: 0; translate: 8px 8px; border-radius: var(--r); z-index: -1; }
.cmp__pf { position: relative; border-radius: var(--r); overflow: hidden; padding: 0 0 22px; box-shadow: inset 0 0 0 2px var(--olive-deep); }
.cmp__pf--alone { background: var(--grey-1); color: #5f5d55; }
.cmp__pf--bp { position: absolute; inset: 0; background: var(--cream); color: var(--ink); clip-path: inset(0 0 0 var(--x)); }
.cmp__cover { position: relative; height: 112px; }
.cmp__pf--alone .cmp__cover { background: var(--grey-2); }
.cmp__pf--bp .cmp__cover { background: var(--lime); }
.cmp__coverline { position: absolute; inset: 14px 0 0; width: 100%; height: calc(100% - 14px); }
.cmp__coverline path { fill: none; stroke: var(--olive-deep); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: .45; }
.cmp__tag { position: absolute; top: 16px; padding: 6px 14px; border-radius: 999px; font-weight: 600; }
.cmp__pf--alone .cmp__tag { left: 18px; background: var(--grey-1); color: #55534b; }
.cmp__pf--bp .cmp__tag { right: 18px; background: var(--paper); color: var(--olive-deep); box-shadow: inset 0 0 0 2px var(--olive-deep); }
.cmp__half { position: relative; width: 50%; min-height: 236px; margin-top: -48px; padding: 0 28px; }
.cmp__pf--bp .cmp__half { margin-left: 50%; padding-left: 34px; }
.cmp__avatar { position: relative; display: block; width: 100px; height: 100px; border-radius: 50%; object-fit: cover; }
.cmp__pf--alone .cmp__avatar { box-shadow: 0 0 0 5px var(--grey-1); }
.cmp__pf--alone .cmp__avatar svg { width: 100%; height: 100%; border-radius: 50%; background: var(--grey-2); }
.cmp__pf--bp .cmp__avatar { box-shadow: 0 0 0 5px var(--paper), 0 0 0 7px var(--olive-deep); }
.cmp__name { margin-top: 14px; line-height: 1.35; }
.cmp__name strong { font-weight: 600; color: var(--ink); }
.cmp__pf--alone .cmp__name strong { color: #55534b; }
.cmp__big { margin-top: 18px; }
.cmp__num, .cmp__num.num, .cmpx__fact .num { font-variant-numeric: proportional-nums; white-space: nowrap; }
.cmp__pf--alone .cmp__big { color: #85827a; }
.cmp__pf--bp .cmp__big { color: var(--olive); }
.cmp__note { margin-top: 6px; max-width: 26ch; }
.cmp__chart { display: block; width: calc(100% - 56px); height: 124px; margin: 8px 28px 0; }
.cmp__area { fill: var(--lime-soft); }
.cmp__line { fill: none; stroke: var(--olive); stroke-width: 3.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.cmp__posts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 16px 28px 0; }
.cmp__posts li { aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; }
.cmp__posts img { width: 100%; height: 100%; object-fit: cover; }
.cmp__empty { display: grid; place-items: center; border: 2px dashed var(--grey-3); color: #85827a; }

/* the handle */
.cmp__handle { position: absolute; top: 0; bottom: 0; left: var(--x); z-index: 3; width: 56px; translate: -50% 0; cursor: ew-resize; touch-action: pan-y; outline: none; }
.cmp__bar { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; translate: -50% 0; background: var(--olive-deep); }
.cmp__knob { position: absolute; left: 50%; top: 74%; width: 60px; height: 60px; translate: -50% -50%; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--olive-deep); box-shadow: inset 0 0 0 2px var(--olive-deep); isolation: isolate; transition: scale 220ms var(--spring); }
.cmp__knob svg { position: relative; width: 26px; height: 26px; }
.cmp__knobshadow { position: absolute; inset: 0; z-index: -1; border-radius: 50%; translate: 4px 4px; }
@media (hover: hover) and (pointer: fine) { .cmp__handle:hover .cmp__knob { scale: 1.1; } }
.cmp__handle.is-drag .cmp__knob { scale: .92; }
.cmp__handle:focus-visible .cmp__knob { outline: 3px solid var(--olive); outline-offset: 4px; }

/* the pirate points at the knob */
.cmpx__guide { position: absolute; left: calc(var(--gut) * -1 + 4px); bottom: -14px; z-index: 4; width: 150px; height: 270px; pointer-events: none; }
.cmpx__slot { width: 150px; height: 270px; display: flex; justify-content: center; }

/* the call to action, then Olivier's whole case folded behind one tap */
.cmpx__cta { margin-top: clamp(64px, 7vw, 96px); }
.cmpx__more { margin-top: 28px; border-top: 2px solid var(--olive-deep); border-bottom: 2px solid var(--olive-deep); }
.cmpx__more summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 12px 4px; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.cmpx__more summary::-webkit-details-marker { display: none; }
.cmpx__plus { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--lime); box-shadow: inset 0 0 0 2px var(--olive-deep), 3px 3px 0 0 var(--olive-deep); transition: rotate 300ms var(--spring), translate 200ms var(--spring); }
.cmpx__plus::before, .cmpx__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2.5px; translate: -50% -50%; border-radius: 2px; background: var(--olive-deep); }
.cmpx__plus::after { rotate: 90deg; }
.cmpx__more[open] .cmpx__plus { rotate: 45deg; }
@media (hover: hover) and (pointer: fine) { .cmpx__more summary:hover .cmpx__plus { translate: -2px -2px; } }
.cmpx__more summary:active .cmpx__plus { translate: 2px 2px; }
.cmpx__case { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); gap: 40px 72px; align-items: center; padding: 20px 0 40px; }
.cmpx__shot { position: relative; display: block; width: 100%; max-width: 400px; justify-self: center; border-radius: 20px; isolation: isolate; rotate: -2deg; transition: translate 300ms var(--spring), rotate 300ms var(--spring); }
.cmpx__shot img { width: 100%; height: auto; border-radius: 20px; border: 2px solid var(--olive-deep); background: #fff; }
.cmpx__shotshadow { position: absolute; inset: 0; z-index: -1; border-radius: 20px; translate: 10px 10px; transition: translate 300ms var(--spring); }
@media (hover: hover) and (pointer: fine) { .cmpx__shot:hover { rotate: 0deg; translate: -3px -3px; } .cmpx__shot:hover .cmpx__shotshadow { translate: 14px 14px; } }
.cmpx__shot:active { translate: 1px 1px; }
.cmpx__facts { margin: 18px 0 0; }
.cmpx__fact { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 14px 0; border-top: 1px solid var(--olive-deep); }
.cmpx__fact:last-child { border-bottom: 1px solid var(--olive-deep); }
.cmpx__fact dt { max-width: 32ch; color: var(--muted); }
.cmpx__fact dd { margin: 0; color: var(--olive); white-space: nowrap; }
.cmpx__link { display: inline-block; margin-top: 16px; }

@media (min-width: 1101px) {
  .cmp { display: grid; min-height: clamp(520px, 64vh, 600px); }
  .cmp__pf { height: 100%; padding: 0; }
  .cmp__cover { height: 92px; }
  .cmp__pf--bp { z-index: 2; }
  .cmp__pf--alone .cmp__tag { left: 150px; }
  .cmp__half { position: absolute; top: 44px; left: 0; width: 330px; min-height: 0; margin: 0; padding: 0 0 0 32px; }
  .cmp__pf--alone .cmp__half { width: 290px; }
  .cmp__pf--bp .cmp__half { left: 50%; margin: 0; padding-left: 36px; }
  .cmp__avatar { width: 96px; height: 96px; }
  /* the posts: a fanned stack of 3 per half, like prints on a desk */
  .cmp__posts { position: absolute; inset: 0; display: block; padding: 0; pointer-events: none; }
  .cmp__posts li { position: absolute; top: 112px; width: 104px; height: 130px; aspect-ratio: auto; pointer-events: auto; box-shadow: 0 14px 26px -14px rgba(42, 54, 0, .6); transition: translate 300ms var(--spring), rotate 300ms var(--spring); }
  .cmp__pf--bp .cmp__posts li { background: var(--paper); }
  .cmp__posts li:nth-child(1) { left: calc(50% - 226px); rotate: -7deg; }
  .cmp__posts li:nth-child(2) { left: calc(50% - 170px); rotate: 1deg; top: 100px; z-index: 1; }
  .cmp__posts li:nth-child(3) { left: calc(50% - 114px); rotate: 7deg; }
  .cmp__posts li:nth-child(4) { left: calc(100% - 232px); rotate: -7deg; }
  .cmp__posts li:nth-child(5) { left: calc(100% - 176px); rotate: 1deg; top: 100px; z-index: 1; }
  .cmp__posts li:nth-child(6) { left: calc(100% - 120px); rotate: 7deg; }
  .cmp__pf--bp .cmp__posts li:hover { translate: 0 -10px; rotate: 0deg; z-index: 2; }
  .cmp__pf--alone .cmp__posts li { box-shadow: none; background: var(--grey-1); }
  .cmp__chart { position: absolute; left: 28px; bottom: 26px; width: calc(100% - 56px); height: 36%; margin: 0; }
  .cmp__line { stroke-width: 5; }
  .cmp__knob { top: 80%; width: 66px; height: 66px; }
}
@media (max-width: 1100px) {
  .cmpx__stage { padding: 0 12px; }
  .cmpx__guide { position: relative; left: auto; bottom: auto; width: auto; height: 210px; margin-top: 30px; display: flex; justify-content: flex-end; align-items: flex-end; }
  .cmpx__slot { width: 112px; height: 210px; }
    .cmpx__case { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cmpx__stage { padding: 0 2px; margin-top: 56px; }
  .cmp__world { top: -70px; bottom: -70px; }
  .cmp__cover { height: 76px; }
  .cmp__tag { top: 10px; padding: 4px 10px; }
  .cmp__pf--alone .cmp__tag { left: 10px; }
  .cmp__pf--bp .cmp__tag { right: 10px; }
  .cmp__half { min-height: 250px; margin-top: -30px; padding: 0 12px; }
  .cmp__pf--bp .cmp__half { padding-left: 16px; }
  .cmp__avatar { width: 60px; height: 60px; }
  .cmp__name { margin-top: 10px; }
  .cmp__big { margin-top: 12px; }
  .cmp__chart { width: calc(100% - 24px); height: 70px; margin: 8px 12px 0; }
  .cmp__posts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 12px 0; }
  .cmp__posts li:nth-child(n+5) { display: none; }
  .cmp__pf { padding-bottom: 44px; }
  .cmp__knob { top: auto; bottom: -30px; translate: -50% 0; }
  .cmpx__guide { height: 188px; margin-top: 34px; }
  .cmpx__slot { width: 100px; height: 188px; }
    .cmpx__shot { max-width: 320px; }
  .cmpx__fact { flex-direction: column; gap: 2px; }
  .cmpx__fact dd { order: -1; }
}

/* round 3 rule G: no empty band over 120 px. Sections 2 and 3 meet with a tighter join than the default rhythm. */
.pains { padding-bottom: clamp(48px, 5vw, 64px); }
.cmpx { padding-top: clamp(48px, 5vw, 64px); padding-bottom: clamp(48px, 5vw, 64px); }
