/* Case files: a folder with tabs, a sheet of paper, and exhibits pinned to it. Notes, photos and exhibit labels live in shared.css. */

.cf-head { padding: 124px var(--gutter) 46px; }
.cf-head .label { font-size: .8rem; color: var(--muted); }
.cf-head h1 { margin-top: 14px; font: 400 clamp(4.2rem, 11vw, 10rem)/.88 var(--display); text-transform: uppercase; letter-spacing: .005em; }

/* ---------- Folder, tabs, paper ---------- */
.folder { position: relative; width: min(1500px, calc(100% - 300px)); background: var(--folder); border-radius: 0 20px 20px 0; padding: 44px 46px 56px 0; }
.tabs { position: absolute; top: 20px; bottom: 20px; left: 100%; width: 50px; }
.tabs-in { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 10px; }
.tab { display: flex; align-items: center; justify-content: center; width: 50px; min-height: 160px; padding: 18px 0; border-radius: 0 24px 24px 0; writing-mode: vertical-rl;
  background: var(--c); color: var(--t, var(--cornsilk)); font: 400 1.35rem/1 var(--serif); text-decoration: none; box-shadow: inset 6px 0 10px rgba(0, 0, 0, .18); transition: transform .25s; }
.tab:hover { transform: translateX(4px); }
.tab[aria-current="page"] { box-shadow: none; }
.paper { position: relative; margin-left: 88px; padding: 64px 64px 80px 120px; color: var(--ink); border-radius: 3px; box-shadow: 0 30px 60px rgba(0, 0, 0, .28); background: var(--paper) var(--paper-noise); }
.paper::before { content: ""; position: absolute; top: 90px; bottom: 90px; left: 34px; width: 16px; background: radial-gradient(circle at 8px 8px, var(--folder) 7px, transparent 8px) 0 0 / 16px 230px repeat-y; }
.paper::after { content: ""; position: absolute; top: 0; bottom: 0; left: 84px; width: 1px; background: rgba(40, 54, 24, .22); }

/* ---------- Dossier ---------- */
.dossier { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 70px; align-items: start; }
.meta { margin-top: 44px; font-size: .9rem; line-height: 1.5; }
.meta dt { font-weight: 700; }
.meta dd { margin: 0 0 16px; color: var(--ink-soft); }
.prose { font: 400 1.32rem/1.62 var(--serif); max-width: 36em; }
.prose p + p { margin-top: 1.1em; text-indent: 2em; }
.prose p:first-child::first-letter { float: left; font-size: 5.4em; line-height: .78; margin: .05em .1em 0 0; font-weight: 500; color: var(--pine); }
.prose b { font-weight: 600; }
.honest { margin-top: 18px; font-size: .82rem; color: var(--ink-soft); }
.prose .honest { text-indent: 0; margin-top: 18px; }   /* small print isn't a new paragraph of the story, so no indent */

/* ---------- Exhibits ---------- */


/* ---------- Client E: the ranking that re-sorts as the notes scroll past ---------- */
.scrolly { display: grid; grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr); gap: 48px; }
.story { padding: 12vh 0 22vh; }
.step { min-height: 70vh; display: flex; align-items: center; }
.step .note { opacity: .5; transition: opacity .45s, transform .45s; }
.step.on .note { opacity: 1; transform: rotate(var(--r, -1deg)) translateY(-4px); }
.step .note p { font-size: .95rem; }
.chart-wrap { position: sticky; top: 96px; order: 2; height: calc(100vh - 150px); display: flex; align-items: center; }
.chart { position: relative; overflow: hidden; width: 100%; padding: 28px 28px 22px; background: #fff; border: 1px solid rgba(40, 54, 24, .18); border-radius: 3px; box-shadow: 6px 8px 0 rgba(40, 54, 24, .1); transform: rotate(.5deg); }
.chart-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 20px; }
.chart-title b { font: 400 1.4rem/1.1 var(--display); text-transform: uppercase; color: var(--pine); }
.chart-title span, .chart-note { font-size: .78rem; color: var(--ink-soft); }
.chart-note { margin-top: 16px; }
.rows { position: relative; height: calc(6 * 56px); }
.row { position: absolute; left: 0; right: 0; height: 56px; display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 118px; gap: 14px; align-items: center;
  transform: translateY(calc(var(--i, 0) * 56px)); transition: transform 1.1s cubic-bezier(.65, 0, .35, 1), opacity .6s; }
.row .name { font-size: .8rem; line-height: 1.25; }
.row .bar { height: 16px; background: rgba(40, 54, 24, .1); border-radius: 2px; overflow: hidden; }
.row .bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--olive); transition: width 1.1s cubic-bezier(.65, 0, .35, 1), background .5s; }
.row .val { text-align: right; font-weight: 600; font-size: .92rem; color: var(--pine); }
.row .val small { display: block; font-weight: 400; font-size: .7rem; color: var(--ink-soft); }
.row.hot .name { font-weight: 700; }
.row.hot .bar i { background: var(--earth); }
.chart[data-step="2"] .row.hot .bar i, .chart[data-step="3"] .row.hot .bar i { background: var(--stamp); }
.chart[data-step="2"] .row.hot .val, .chart[data-step="3"] .row.hot .val { color: var(--stamp); }
.summary { position: absolute; inset: 0; display: grid; align-content: center; gap: 26px; opacity: 0; pointer-events: none; transition: opacity .6s; }
.chart[data-step="4"] .row { opacity: 0; }
.chart[data-step="4"] .summary { opacity: 1; }
.sum-row .lbl { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: .9rem; }
.sum-row .lbl b { font: 400 2.1rem/1 var(--display); color: var(--pine); }
.sum-row .bar { height: 22px; background: rgba(40, 54, 24, .1); border-radius: 3px; overflow: hidden; }
.sum-row .bar i { display: block; height: 100%; width: 0; transition: width 1.2s cubic-bezier(.65, 0, .35, 1) .2s; }
.chart[data-step="4"] .sum-row .bar i { width: var(--w); }
.sum-row.all .bar i { background: #A9A58A; }
.sum-row.live .bar i { background: var(--olive); }
.sum-row.live .lbl b { color: var(--olive); }
.stamp { position: absolute; right: 18px; top: 16px; z-index: 3; padding: 6px 11px; border: 3px solid var(--stamp); border-radius: 6px; color: var(--stamp); mix-blend-mode: multiply;
  font-size: .92rem; font-weight: 700; line-height: 1.1; letter-spacing: .08em; text-transform: uppercase; text-align: center; pointer-events: none;
  opacity: 0; transform: rotate(-9deg) scale(1.6); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; }
.chart[data-step="2"] .stamp, .chart[data-step="3"] .stamp { opacity: .9; transform: rotate(-9deg) scale(1); }
/* The stamp sits beside the title, so it never covers a number */
.chart[data-step="2"] .chart-title, .chart[data-step="3"] .chart-title { padding-right: 150px; }

/* ---------- Client A: reporting window switch, the three statics, and every static against the target ---------- */
[data-period="h"] .ps, [data-period="s"] .ph { display: none !important; }
.period-switch { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 26px; }
.period-switch button { min-height: 42px; padding: 8px 16px; border: 1px solid rgba(40, 54, 24, .35); border-radius: 10px 10px 0 0; background: var(--note-cream); color: var(--ink);
  font: 600 .84rem var(--mono); cursor: pointer; }
.period-switch button[aria-pressed="true"] { background: var(--pine); color: var(--cornsilk); border-color: var(--pine); }
.totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid rgba(40, 54, 24, .35); background: var(--note-cream); }
.totals div { padding: 16px 18px; border-left: 1px solid rgba(40, 54, 24, .2); }
.totals div:first-child { border-left: 0; }
.totals b { display: block; font: 400 2rem/1 var(--display); color: var(--pine); }
.totals div > span { font-size: .78rem; color: var(--ink-soft); }
.screen { margin-top: 18px; font: 400 1.05rem/1.55 var(--serif); }
.statics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 30px; margin-top: 44px; }
.static .photo { --h: 300px; --pos: 50% 18%; }
.static .note { margin: -8px 10px 0 18px; }
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 12px; }
.mini b { display: block; font: 400 1.5rem/1 var(--display); color: var(--pine); }
.mini div > span { font-size: .72rem; color: var(--ink-soft); }
.anon { margin-top: 26px; font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.cpl { margin-top: 36px; padding: 26px 26px 20px; background: #fff; border: 1px solid rgba(40, 54, 24, .18); box-shadow: 6px 8px 0 rgba(40, 54, 24, .1); }
.cpl-rows { position: relative; list-style: none; padding: 0; }
.cpl-rows::after { content: "$40 target"; position: absolute; top: -22px; bottom: 0; left: calc(var(--label) + 12px + (100% - var(--label) - 134px) * .8); border-left: 2px dashed var(--stamp);
  padding-left: 6px; font-size: .72rem; font-weight: 600; color: var(--stamp); }
.cpl-rows { --label: 230px; }
.cpl-rows li { display: grid; grid-template-columns: var(--label) minmax(0, 1fr) 110px; gap: 12px; align-items: center; min-height: 34px; font-size: .8rem; }
.cpl-rows .bar { height: 12px; background: rgba(40, 54, 24, .08); }
.cpl-rows .bar i { display: block; height: 100%; width: 0; background: #A9A58A; transition: width 1.2s cubic-bezier(.65, 0, .35, 1) calc(var(--n, 0) * 90ms); }
.cpl.in .cpl-rows .bar i { width: calc(var(--v) / 50 * 100%); }
.cpl-rows li.pass .bar i { background: var(--olive); }
.cpl-rows li.pass .nm { font-weight: 700; }
.cpl-rows .v { text-align: right; font-weight: 600; }
.cpl-rows .v small { font-weight: 400; color: var(--ink-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: .76rem; color: var(--ink-soft); }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; background: var(--c); }

/* ---------- Client C: from leads to applications ---------- */
.funnel { margin-top: 36px; padding: 28px; background: #fff; border: 1px solid rgba(40, 54, 24, .18); box-shadow: 6px 8px 0 rgba(40, 54, 24, .1); }
.funnel .stage-row + .stage-row { margin-top: 22px; }
.funnel .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: .88rem; }
.funnel .lbl b { font: 400 2.2rem/1 var(--display); color: var(--pine); }
.funnel .bar { height: 26px; background: rgba(40, 54, 24, .08); }
.funnel .bar i { display: block; height: 100%; width: 0; background: var(--c, var(--olive)); transition: width 1.4s cubic-bezier(.65, 0, .35, 1) var(--d, 0s); }
.funnel.in .bar i { width: var(--w); }
.funnel .foot-note { margin-top: 18px; font-size: .8rem; color: var(--ink-soft); }

/* ---------- Client D: two executions of one offer ---------- */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; margin-top: 44px; }
.pair .photo { --h: 380px; --pos: 50% 50%; }
.pair .note { margin: -8px 20px 0 30px; }

/* ---------- Screenshots framed like photos, flat enough to read ---------- */
.shots { display: grid; margin-top: 40px; }
.framed { display: block; padding: 10px; background: var(--pine-deep); box-shadow: 0 16px 30px rgba(40, 54, 24, .25); text-decoration: none; }
.framed img { width: 100%; height: auto; background: #fff; }
.shot-a { width: 92%; transform: rotate(-1.1deg); }
.shot-b { position: relative; width: 88%; margin: -36px 0 0 auto; transform: rotate(.9deg); }
.shot-cap { margin: 14px 0 0 4px; font-size: .8rem; font-weight: 500; color: var(--ink-soft); }
.shot-b + .shot-cap { text-align: right; }

/* ---------- Verdict, next case ---------- */
.verdict { margin-top: 110px; padding: 30px 32px; border: 2px dashed rgba(40, 54, 24, .35); border-radius: 4px; }
.verdict p { margin-top: 12px; font: 400 1.25rem/1.6 var(--serif); max-width: 40em; }
.verdict .btn { margin-top: 20px; }
.keep { display: flex; justify-content: flex-end; margin-top: 70px; }
.keep span { padding: 10px 14px; border-radius: 10px; border-right: 8px solid var(--earth); background: var(--note-cream); color: var(--ink); font-size: .8rem; font-weight: 500; line-height: 1.35; }
.next-band { position: relative; display: block; width: min(1500px, calc(100% - 300px)); margin-top: 60px; padding: 34px 46px 120px; overflow: hidden;
  background: var(--next); color: var(--next-ink, var(--cornsilk)); border-radius: 0 20px 0 0; text-decoration: none; }
.next-band small { font-size: .82rem; font-weight: 600; }
.next-band b { display: block; margin-top: 8px; font: 400 clamp(3rem, 7vw, 6rem)/.9 var(--display); text-transform: uppercase; }
.next-band:hover b { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 3px; }
/* Case files run on (site.js): once the next file has been added below, its band becomes a slim divider,
   and the file's own header carries the big name. Added files start closer to the band. */
.next-band.joined { padding-top: 18px; padding-bottom: 22px; }
.next-band.joined b { display: none; }
.case-run .cf-head { padding-top: 70px; }
.next-card { position: fixed; right: var(--gutter); bottom: 26px; z-index: 35; width: 228px; opacity: 0; transform: translateY(12px); transition: opacity .35s, transform .35s; pointer-events: none; }
body.scrolled .next-card { opacity: 1; transform: none; pointer-events: auto; }
.next-card .nc { display: block; padding: 18px 20px 22px; border-radius: 16px; background: var(--next); color: var(--next-ink, var(--cornsilk)); text-decoration: none; }
.next-card .nc b { display: block; font: 500 1.35rem/1.2 var(--serif); }
.next-card .nc span { display: block; margin-top: 22px; font-size: .8rem; font-weight: 500; line-height: 1.45; }
.next-card .go { display: flex; justify-content: center; align-items: center; margin-top: 10px; min-height: 48px; border-radius: 14px; background: var(--cornsilk); color: var(--pine); font-size: .95rem; font-weight: 600; text-decoration: none; }
.next-card .go:hover { background: #fff; }
.cf-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 60px var(--gutter) 90px; font-size: .8rem; color: var(--muted); }

/* ---------- Tablets and phones ---------- */
@media (max-width: 1150px) {
  .folder, .next-band { width: calc(100% - 64px); }
  .next-card { display: none; }
  .dossier { grid-template-columns: 1fr; gap: 50px; }
  .pinned { max-width: 420px; }
  .statics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .cf-head { padding-top: 100px; }
  .folder { width: 100%; padding: 16px 10px 26px; border-radius: 0; }
  .tabs { position: static; width: auto; margin: 0 0 12px; }
  .tabs-in { position: static; flex-direction: row; overflow-x: auto; }
  .tab { width: auto; min-height: 0; padding: 8px 16px; border-radius: 12px; writing-mode: horizontal-tb; font-size: 1rem; white-space: nowrap; }
  .paper { margin-left: 0; padding: 30px 20px 44px; }
  .paper::before, .paper::after { display: none; }
  .prose { font-size: 1.15rem; }
  .scrolly { grid-template-columns: 1fr; gap: 0; }
  .chart-wrap { top: 64px; z-index: 3; height: auto; order: 0; margin: 0 -20px; padding: 8px 12px 10px; background: var(--paper); }
  .chart { transform: none; padding: 16px; }
  .rows { height: calc(6 * 50px); }
  .row { height: 50px; grid-template-columns: minmax(0, 104px) minmax(0, 1fr) 88px; gap: 10px; transform: translateY(calc(var(--i, 0) * 50px)); }
  .row .name { font-size: .72rem; }
  .row .val { font-size: .82rem; }
  .story { padding: 4vh 0 20vh; }
  .step { min-height: 70vh; align-items: flex-end; }
  .stamp { top: 10px; right: 8px; font-size: .64rem; }
  .chart[data-step="2"] .chart-title, .chart[data-step="3"] .chart-title { padding-right: 118px; }
  .totals { grid-template-columns: 1fr 1fr; }
  .totals div:nth-child(3) { border-left: 0; }
  .totals div:nth-child(n+3) { border-top: 1px solid rgba(40, 54, 24, .2); }
  .statics, .pair { grid-template-columns: 1fr; }
  .cpl { padding: 16px; }
  .cpl-rows { --label: 120px; }
  .cpl-rows li { grid-template-columns: var(--label) minmax(0, 1fr) 76px; font-size: .72rem; }
  .cpl-rows::after { left: calc(var(--label) + 12px + (100% - var(--label) - 100px) * .8); }
  .shot-a, .shot-b { width: 100%; margin: 0; transform: none; }
  .shot-b { margin-top: 24px; }
  .next-band { width: 100%; padding: 26px 20px 80px; border-radius: 0; }
}
