/* marketing-results.html and results-<slug>.html, page-only rules (tools/build-results.py writes the pages). Shared
   tokens, nav, menu, cover grammar, buttons, the ledger's .plate grammar, the review wall and the audit band are
   main.css; this file carries the Results chapters. js/results.js only reads the chart. */

/* 01 · COVER (index): cost per lead falling while the leads each month rise, on a dotted plate on the right of the frame.
   CSS keyframes only: the line draws, the bars grow in turn, the end point rings; the sheet drifts. Phones centre it
   behind the H1 at lower opacity; reduced motion shows it finished and still. */
.cover--results,.cover--study{background:#070707}
.cover__fall{position:absolute;top:50%;right:5vw;width:min(56vw,860px);height:auto;transform:translateY(-52%);overflow:visible;animation:fallShow 1.8s var(--ease) .1s both}
.fall__drift{animation:fallDrift 60s var(--io) infinite alternate;transform-origin:580px 500px}
.fall__line{stroke-dasharray:1;stroke-dashoffset:1;animation:fallDraw 2.8s var(--io) .5s forwards}
.fall__area{opacity:0;animation:fallFade 1.6s var(--ease) 2.4s forwards}
.fall__bar{transform-box:fill-box;transform-origin:50% 100%;transform:scaleY(0);animation:fallGrow .9s var(--ease) forwards;animation-delay:calc(.6s + var(--i) * 90ms)}
.fall__dot{opacity:0;animation:fallFade .6s var(--ease) 3.1s forwards}
.fall__ring{opacity:0;animation:fallRing 4.2s var(--io) 3.3s infinite}
@keyframes fallShow{from{opacity:0;transform:translateY(-50%) scale(.97)}to{opacity:1;transform:translateY(-52%)}}
@keyframes fallDrift{from{transform:translate(0,0) scale(1)}to{transform:translate(-14px,10px) scale(1.03)}}
@keyframes fallDraw{to{stroke-dashoffset:0}}
@keyframes fallFade{to{opacity:1}}
@keyframes fallGrow{to{transform:scaleY(1)}}
@keyframes fallRing{0%{transform:scale(.5);opacity:.9}100%{transform:scale(4.4);opacity:0}}
.cover--results .cover__wash{background:linear-gradient(180deg,rgba(7,7,7,.55) 0%,rgba(7,7,7,.05) 26%,rgba(7,7,7,.05) 50%,rgba(7,7,7,.94) 100%),linear-gradient(90deg,rgba(7,7,7,.96) 0%,rgba(7,7,7,.7) 34%,rgba(7,7,7,.12) 58%,rgba(7,7,7,0) 74%)}

/* 01 · COVER (study): the capture of the client's live page on the right, under a heavy wash; or, where there is no
   capture, the client's mark set large and faint. */
.cover__shot{position:absolute;bottom:0;right:0;width:62%;height:84%;object-fit:cover;object-position:left top;opacity:.34;filter:saturate(.7);-webkit-mask-image:linear-gradient(180deg,transparent 0,#000 30%);mask-image:linear-gradient(180deg,transparent 0,#000 30%)}
.cover__markplate{position:absolute;top:50%;right:6vw;width:min(46vw,640px);transform:translateY(-55%);display:flex;align-items:center;justify-content:center;aspect-ratio:16/10;border:1px solid rgba(217,207,184,.16);border-radius:28px;background:radial-gradient(circle at 50% 45%,rgba(227,186,28,.12),rgba(227,186,28,0) 60%)}
.cover__markplate img{width:62%;height:auto;max-height:50%;object-fit:contain;opacity:.5}
.cover--study .cover__wash{background:linear-gradient(180deg,rgba(7,7,7,.6) 0%,rgba(7,7,7,.1) 26%,rgba(7,7,7,.1) 50%,rgba(7,7,7,.95) 100%),linear-gradient(90deg,rgba(7,7,7,.98) 0%,rgba(7,7,7,.8) 36%,rgba(7,7,7,.25) 62%,rgba(7,7,7,.1) 80%)}
@media (max-width:900px){
  .cover__fall{right:-6vw;top:38%;width:116vw;opacity:.5;transform:translateY(-50%)}
  .fall__key{display:none}
  .cover--results .cover__wash,.cover--study .cover__wash{background:linear-gradient(180deg,rgba(7,7,7,.6) 0%,rgba(7,7,7,.15) 24%,rgba(7,7,7,.55) 52%,rgba(7,7,7,1) 72%)}
  .cover__shot{top:0;bottom:auto;width:100%;height:44%;opacity:.18;-webkit-mask-image:linear-gradient(180deg,#000 0,#000 35%,transparent 100%);mask-image:linear-gradient(180deg,#000 0,#000 35%,transparent 100%)}
  .cover__markplate{top:30%;right:50%;transform:translate(50%,-50%);width:78vw}
}
@media (prefers-reduced-motion:reduce){
  .cover__fall,.fall__drift,.fall__ring{animation:none}
  .fall__line{animation:none;stroke-dashoffset:0}
  .fall__area,.fall__dot{animation:none;opacity:1}
  .fall__bar{animation:none;transform:none}
}

/* 02 · THE STUDIES (index): the ledger's plates, stacked on paper; a plate with no capture shows the client's mark on ink. */
.studies{position:relative;background:var(--paper);padding:var(--section) 0;border-top:1px solid var(--line)}
.studies__head{display:grid;grid-template-columns:1.2fr .8fr;gap:40px;align-items:end;margin-bottom:clamp(36px,5vw,64px)}
.studies__head .h2--xl{max-width:none;margin-bottom:0}
/* Two across, the shot or mark stacked above the body (Jack, note 64, 28 Oct). The source and link sit at the foot so a row lines up. */
.studies__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(20px,2.4vw,32px)}
.studies .plate{flex:none;width:100%;grid-template-columns:1fr;grid-template-rows:auto 1fr}
.studies .plate__media{min-height:0;aspect-ratio:16/9}
.studies .plate__body{justify-content:flex-start}
.studies .plate__num{font-size:clamp(26px,2.1vw,34px)}
.studies .study__src{margin-top:auto;padding-top:12px}
@media (min-width:1025px){
  /* An odd last card spans the row in the ledger's side-by-side plate, so the grid never ends on an empty cell. */
  .studies__list > .study:last-child:nth-child(odd){grid-column:1/-1;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);grid-template-rows:none}
  .studies__list > .study:last-child:nth-child(odd) .plate__media{aspect-ratio:auto;min-height:clamp(320px,30vw,420px)}
}
.studies .study.is-linked{cursor:pointer}
.studies .study.is-linked:hover .study__link{gap:16px}
.study:not(.study--mark) .plate__title{padding-right:min(34%,170px)}
.plate__media--mark{background:var(--ink);display:flex;align-items:center;justify-content:center}
.plate__media--mark::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 50%,rgba(227,186,28,.14),rgba(227,186,28,0) 62%)}
.plate__media img.plate__mark{position:relative;inset:auto;width:min(58%,340px);height:auto;max-height:170px;object-fit:contain;opacity:.92}
.study__src{font-size:12.5px;line-height:1.5;color:var(--muted);margin-top:12px}
.study__link{display:inline-flex;align-items:center;gap:10px;min-height:44px;margin-top:14px;align-self:flex-start;font-weight:600;font-size:15px;color:var(--ink);border-bottom:1.5px solid var(--gold);transition:gap .3s var(--ease)}
.study__link svg{width:12px;height:12px;stroke:var(--gold-text);stroke-width:1.6;fill:none}
.study__link:hover,.study__link:focus-visible{gap:16px}
@media (max-width:1024px){
  .studies__head{grid-template-columns:1fr;gap:16px}
  .studies__list{grid-template-columns:1fr}
}

/* 02 · THE STORY (study): the four paragraphs on the left, the figures in a dark column that sticks under the nav. */
.story{position:relative;background:var(--paper);padding:var(--section) 0;border-top:1px solid var(--line)}
.story__grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,420px);gap:clamp(36px,6vw,110px);align-items:start}
.story__copy .h2{max-width:16ch;margin-bottom:clamp(28px,3.4vw,48px)}
.story__block{padding:clamp(22px,2.4vw,32px) 0;border-top:1px solid var(--line);display:grid;grid-template-columns:minmax(140px,200px) minmax(0,1fr);gap:clamp(16px,3vw,48px)}
.story__h{font-weight:700;font-size:13px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-text);padding-top:4px}
.story__block p{font-size:clamp(16px,1.25vw,18px);line-height:1.65;color:var(--body);max-width:62ch}
.figs{position:sticky;top:calc(var(--nav-h) + 24px);background:var(--ink);color:#fff;border-radius:24px;padding:clamp(24px,2.6vw,36px)}
.figs__title{font-weight:600;font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--gold);margin-bottom:8px}
.figs__list li{display:flex;flex-direction:column;gap:6px;padding:20px 0;border-bottom:1px solid var(--line-d)}
.figs__list li:last-child{border-bottom:0}
.figs__num{font-weight:800;font-size:clamp(34px,3.2vw,48px);letter-spacing:-.035em;line-height:1;color:var(--gold-bright);white-space:nowrap}
.figs__label{font-size:15px;line-height:1.4;color:rgba(255,255,255,.88)}
.figs__src{font-size:12px;line-height:1.45;color:rgba(255,255,255,.6)}
.figs__note{font-size:12.5px;line-height:1.5;color:rgba(255,255,255,.6);padding-top:16px;border-top:1px solid var(--line-d)}
.figs__note:empty{display:none}
@media (max-width:1024px){
  .story__grid{grid-template-columns:1fr}
  .figs{position:relative;top:auto}
}
@media (max-width:640px){
  .story__block{grid-template-columns:1fr;gap:8px}
}

/* 03 · MONTH BY MONTH (study): one series on a white card; a 2px gold-deep line (3:1 on white), a 10% wash under it,
   labels at the first and last months only; the crosshair and tooltip are js/results.js, the table is the same data. */
.months{position:relative;background:var(--paper-2);padding:var(--section) 0;border-top:1px solid var(--line)}
.months__head{margin-bottom:clamp(28px,3.4vw,44px)}
.months__head .h2{max-width:18ch;margin-bottom:16px}
.months__sub{max-width:60ch;color:var(--muted);font-size:16px}
.chart{position:relative;background:#fff;border:1px solid var(--line);border-radius:24px;padding:clamp(16px,2.4vw,32px) clamp(12px,2vw,28px) clamp(14px,2vw,24px)}
.chart__svg{display:block;width:100%;height:auto;overflow:visible;outline:none}
.chart__svg:focus-visible{box-shadow:0 0 0 3px var(--gold);border-radius:12px}
.chart__grid path{stroke:#EDE7DA;stroke-width:1}
.chart__axis text{font-family:var(--font);font-size:13px;fill:var(--muted)}
.chart__area{fill:rgba(227,186,28,.1)}
.chart__line{fill:none;stroke:var(--gold-deep);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.chart__mark{fill:var(--gold-deep);stroke:#fff;stroke-width:2}
.chart__val{font-family:var(--font);font-size:14px;font-weight:600;fill:var(--ink)}
.chart__cross{stroke:var(--ink);stroke-opacity:.28;stroke-width:1;opacity:0}
.chart__hot{fill:var(--gold-deep);stroke:#fff;stroke-width:2;opacity:0}
.chart.is-hot .chart__cross,.chart.is-hot .chart__hot{opacity:1}
.chart__tip{position:absolute;top:0;left:0;pointer-events:none;background:var(--ink);color:#fff;border-radius:12px;padding:10px 14px;font-size:13px;line-height:1.4;white-space:nowrap;opacity:0;transform:translate(-50%,-110%);transition:opacity .15s}
.chart.is-hot .chart__tip{opacity:1}
.chart__tip b{display:block;font-size:17px;font-weight:700;color:var(--gold-bright)}
.chart__tip span{color:rgba(255,255,255,.75)}
.chart__cap{font-size:12.5px;color:var(--muted);margin-top:14px}
.chart__table{margin-top:10px;font-size:14px}
.chart__table summary{cursor:pointer;min-height:44px;display:inline-flex;align-items:center;font-weight:600;color:var(--ink)}
.chart__table table{width:100%;border-collapse:collapse;margin-top:8px;font-variant-numeric:tabular-nums}
.chart__table th,.chart__table td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line)}
.chart__table thead th{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}

/* 04 · IN THEIR WORDS (study, when a quote is cleared). */
.say{position:relative;background:var(--ink);color:#fff;padding:var(--section) 0}
.say__q p{font-weight:700;font-size:clamp(26px,3.2vw,46px);line-height:1.2;letter-spacing:-.025em;max-width:28ch;text-wrap:balance}
.say__q p::before{content:"\201C"}.say__q p::after{content:"\201D"}
.say__q footer{margin-top:28px;font-size:16px;color:rgba(255,255,255,.8)}
.say__q footer strong{color:var(--gold)}
.say__q footer span{display:block;font-size:13px;color:rgba(255,255,255,.55);margin-top:4px}

/* 05 · MORE RESULTS (study): three cards and the index. */
.more{position:relative;background:var(--paper);padding:var(--section) 0;border-top:1px solid var(--line)}
.more__head{display:flex;justify-content:space-between;align-items:end;gap:24px;flex-wrap:wrap;margin-bottom:clamp(28px,3.4vw,44px)}
.more__head .h2{margin-bottom:0}
.more__list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(14px,1.8vw,24px)}
.more__card a{display:flex;flex-direction:column;gap:10px;height:100%;padding:clamp(22px,2.2vw,30px);background:#fff;border:1px solid var(--line);border-radius:22px;transition:transform .4s var(--ease),box-shadow .4s var(--ease)}
.more__card a:hover,.more__card a:focus-visible{transform:translateY(-4px);box-shadow:0 26px 60px -36px rgba(31,24,8,.35)}
.more__logo{height:34px;display:flex;align-items:center;margin-bottom:8px}
.more__logo img{height:100%;width:auto;max-width:170px;object-fit:contain;object-position:left}
.more__tag{font-weight:600;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-text)}
.more__name{font-weight:800;font-size:22px;letter-spacing:-.025em;line-height:1.1}
.more__fig{font-size:14px;color:var(--muted)}
.more__fig b{display:block;font-weight:800;font-size:30px;letter-spacing:-.03em;color:var(--ink)}
.more__card em{margin-top:auto;padding-top:10px;display:inline-flex;align-items:center;gap:8px;font-style:normal;font-weight:600;font-size:14px}
.more__card em svg{width:11px;height:11px;stroke:var(--gold-text);stroke-width:1.6;fill:none}
@media (max-width:1024px){.more__list{grid-template-columns:1fr 1fr}}
@media (max-width:640px){.more__list{grid-template-columns:1fr}}
/* The chart's text sits in a 1000-unit viewBox; at phone width that scales by about a third, so the type is set larger in viewBox units to land near 10-12px */
.chart__grid path,.chart__line,.chart__cross{vector-effect:non-scaling-stroke}
@media (max-width:640px){.chart__axis text{font-size:32px}.chart__val{font-size:36px}.chart__xminor{display:none}.chart__mark{r:14px}.chart__hot{r:18px}}
