/* Hallmark · agents · the office at work: scroll-driven workbenches in depth on white paper, one per agent · tokens from corbel.css · v2.1.0 */
/* Hallmark · pre-emit critique: P4 H4 E5 S4 R4 V4 · weakest: S, four agent scenes share one bench; each bench does different work (a takeoff, a schedule that moves, a draw that fills, concepts that fan) so the rhythm repeats but the picture never does */
/* Hallmark · waive 7b · pure white is pinned by the owner: white for every background is one of the four colours, by request */
/* Hallmark · answered F8 · every agent scene is pinned and driven by --p because the buyer has to watch the work happen; reduced motion or no script lays each bench out finished, at --p 1 */

/* A contractor buying this has to see the work happen, so every agent gets a workbench in depth: paper arrives from the
   back, the agent works it in the middle, the draft lands at the front and waits for a person. The script writes --p
   (0 to 1 through each tall scene). Without .js.motion every scene is a plain section with its bench shown finished. */
.scene { --p: 1; position: relative; }
.js.motion .scene { --p: 0; height: calc(var(--len) * 100vh); }
/* The pin sits under the sticky header, not behind it. */
.js.motion .pin { position: sticky; top: var(--hd); height: calc(100vh - var(--hd)); overflow: hidden; }

/* Hero: the paperwork of a running job, flown through, then sorted to the four agents. */
.field { display: none; }
.js.motion .field { display: block; position: absolute; inset: 0; perspective: 900px; perspective-origin: 50% 46%; }
.fly { position: absolute; left: 50%; top: 46%; width: 210px; padding: var(--space-3) var(--space-4); background: var(--paper); border: 1px solid var(--ink); font: 400 12px/1.4 var(--font-outlier); color: var(--ink-muted); will-change: transform, opacity; }
.fly b { display: block; margin-bottom: var(--space-2); font: 600 14px/1.2 var(--font-body); color: var(--ink); }
.fly i { display: block; height: 5px; margin-top: var(--space-1); background: var(--sky); }
.fly.hot { background: var(--sky); }
.fly.hot i { background: var(--ink); }
.fly i:nth-of-type(2) { width: 72%; }
.fly i:nth-of-type(3) { width: 48%; }
.lane { position: absolute; top: 18%; font: 800 clamp(28px, 3vw, 44px)/1 var(--font-display); font-stretch: 125%; letter-spacing: -0.02em; text-align: center; white-space: nowrap; transform: translateX(-50%); }
.js .lane { opacity: 0; }
.lane span { display: block; margin-top: var(--space-2); font: 500 12px/1.3 var(--font-outlier); color: var(--ink-muted); letter-spacing: 0; }
.hero-copy { display: flex; justify-content: space-between; align-items: end; gap: 40px; padding: clamp(var(--space-16), 12vh, 140px) var(--gutter) clamp(var(--space-12), 9vh, var(--space-24)); }
.js.motion .hero-copy { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; }
/* The headline and lede sit on white so they read over the paper flying behind them. */
.js.motion .a-h1 span, .js.motion .a-lede span { background: var(--paper); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.a-h1 { max-width: 12ch; font: 800 clamp(48px, 6.6vw, 112px)/0.88 var(--font-display); font-stretch: 118%; letter-spacing: -0.035em; overflow-wrap: break-word; min-width: 0; }
.a-lede { margin-top: var(--space-6); max-width: 42ch; font-size: 20px; line-height: 1.5; color: var(--ink-muted); text-wrap: pretty; }
.hero-act { display: grid; justify-items: end; gap: var(--space-4); }
.cue { font: 400 12px/1.4 var(--font-outlier); color: var(--ink-muted); }

/* Agent scenes: the copy on the left, the bench on the right. */
.agent .pin { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); align-items: center; gap: var(--space-6); padding: var(--space-12) var(--gutter); }
.js.motion .agent .pin { padding-block: var(--space-4) var(--space-6); }
.a-copy { position: relative; z-index: 4; }
.a-name { font: 800 clamp(64px, 8.4vw, 152px)/0.8 var(--font-display); font-stretch: 125%; letter-spacing: -0.045em; white-space: nowrap; }
.a-role { margin-top: 20px; font: 500 14px/1.4 var(--font-outlier); color: var(--ink-muted); }
.io { max-width: 460px; margin-top: var(--space-8); border-top: 1px solid var(--line); }
.io li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.45; transition: color 300ms var(--set); }
.io li b { font: 500 12px/1.9 var(--font-outlier); color: var(--ink-muted); transition: color 300ms var(--set); }
.js.motion .io li { color: var(--ink-muted); }
.js.motion .io li.now { color: var(--ink); }
.js.motion .io li { padding-inline: var(--space-2); transition: color 300ms var(--set), background-color 300ms var(--set); }
.js.motion .io li.now { background: var(--sky); }
.js.motion .io li.now b { color: var(--ink); }
.a-cta { display: inline-flex; margin-top: 28px; color: var(--ink); font: 600 15px/1.2 var(--font-body); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; text-decoration-color: var(--sky); transition: text-underline-offset var(--state), text-decoration-color var(--state); }
.a-cta:hover { text-underline-offset: 10px; text-decoration-color: var(--ink); }

.bench { position: relative; height: 80vh; min-height: 520px; perspective: 1200px; perspective-origin: 40% 30%; }
.rig { position: absolute; left: 50%; top: 50%; width: 760px; height: 560px; margin: -280px 0 0 -380px; transform-style: preserve-3d;
  transform: scale(var(--fit, 1)) rotateX(calc(20deg - var(--p) * 8deg)) rotateY(calc(-24deg + var(--p) * 16deg)) rotateZ(2deg); }
.ly { position: absolute; transform-style: preserve-3d; }
.sheet { padding: var(--space-4) var(--space-4); background: var(--paper); border: 1px solid var(--ink); font-size: 13px; line-height: 1.4; }
.sheet-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-2); padding-bottom: var(--space-2); border-bottom: 1px solid var(--line); font: 600 14px/1.2 var(--font-body); }
.sheet-h span { font: 400 11px/1.2 var(--font-outlier); color: var(--ink-muted); }
.ln { height: 5px; margin-top: var(--space-2); background: var(--sky); }

/* Paper arriving from the back. */
.in { left: 0; width: 250px; top: calc(20px + var(--i) * 96px);
  --k: clamp(0, calc((var(--p) - 0.02 - var(--i) * 0.06) * 4.5), 1);
  --e: calc(var(--k) * var(--k) * (3 - 2 * var(--k)));
  transform: translate3d(calc(-260px + var(--e) * 260px), 0, calc(-1500px + var(--e) * 1260px));
  opacity: calc(var(--e) - clamp(0, (var(--p) - 0.55) * 1.4, 0.5)); }
/* The work in the middle. */
.work { left: 170px; top: 30px; width: 440px; height: 380px; transform: translateZ(-60px); background: var(--paper); border: 2px solid var(--ink);
  --w: clamp(0, calc((var(--p) - 0.2) * 3.2), 1); opacity: calc(0.25 + var(--w) * 0.75); }
.work-h { position: absolute; left: 14px; top: 10px; right: 14px; display: flex; justify-content: space-between; font: 500 11px/1.3 var(--font-outlier); color: var(--ink-muted); }
/* The draft at the front, waiting for a person. */
.out { left: 420px; top: 170px; width: 330px; background: var(--paper); border: 2px solid var(--ink);
  --o: clamp(0, calc((var(--p) - 0.45) * 3.2), 1); --oe: calc(var(--o) * var(--o) * (3 - 2 * var(--o)));
  transform: translate3d(calc(120px - var(--oe) * 120px), calc(60px - var(--oe) * 60px), calc(40px + var(--oe) * 110px)); opacity: var(--oe); }
.orow { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font: 400 12px/1.35 var(--font-outlier);
  --r: clamp(0, calc((var(--p) - 0.55 - var(--i) * 0.05) * 10), 1); opacity: var(--r); transform: translateX(calc((1 - var(--r)) * 18px)); }
.out .stamp { padding: var(--space-1) var(--space-2); font-size: 10px; }
.wait { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: var(--space-3); font: 500 12px/1.3 var(--font-outlier); color: var(--ink-muted);
  --s: clamp(0, calc((var(--p) - 0.82) * 8), 1); opacity: var(--s); }
.wait .stamp { transform: scale(calc(2 - var(--s))) rotate(calc((1 - var(--s)) * -10deg)); }

/* Taylor: the takeoff. Openings light up as the sweep passes; the one that disagrees with the quote is drawn heavy. */
.takeoff { position: absolute; left: 20px; top: 34px; width: 400px; height: 300px; }
.takeoff .wl { fill: none; stroke: var(--draw); stroke-width: 3; }
.takeoff .thin { fill: none; stroke: var(--draw-faint); stroke-width: 1; }
.takeoff .hit { fill: var(--sky); stroke: var(--ink); stroke-width: 1.5; opacity: clamp(0, calc((var(--p) - 0.24 - var(--j) * 0.035) * 14), 1); }
.takeoff .bad { fill: var(--ink); stroke: var(--ink); stroke-width: 3; }
.takeoff .sweep { stroke: var(--sky); stroke-width: 8; transform: translateX(calc(clamp(0, (var(--p) - 0.22) * 2.6, 1) * 400px)); opacity: calc(1 - clamp(0, (var(--p) - 0.6) * 6, 1)); }
.tally { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; gap: 20px; font: 500 12px/1.3 var(--font-outlier); color: var(--ink-muted); }
.tally b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Sara: the schedule moves when the sub texts. */
.chart { position: absolute; left: 20px; right: 20px; top: 46px; display: grid; gap: var(--space-4); }
.g { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: var(--space-3); align-items: center; font: 400 12px/1.3 var(--font-outlier); color: var(--ink-muted); }
.g span { position: relative; height: 18px; }
.g span i { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 1%); width: calc(var(--w2) * 1%); background: var(--ink); transform-origin: left; transform: scaleX(clamp(0, calc((var(--p) - 0.2 - var(--j) * 0.04) * 8), 1)); }
.g.hot span i { background: var(--sky); border: 2px solid var(--ink); left: calc((var(--a) + clamp(0, (var(--p) - 0.42) * 60, 12)) * 1%); }
.g.dep span i { background: var(--sky); border: 1px dashed var(--ink); left: calc((var(--a) + clamp(0, (var(--p) - 0.46) * 60, 12)) * 1%); }
.today { position: absolute; top: 40px; bottom: 60px; left: calc(102px + 44%); width: 2px; background: var(--ink); opacity: var(--w); }
.text { position: absolute; right: 16px; bottom: 16px; width: 220px; padding: var(--space-3) var(--space-3); background: var(--sky); border: 1px solid var(--ink); font-size: 13px; line-height: 1.4;
  --t: clamp(0, calc((var(--p) - 0.36) * 10), 1); opacity: var(--t); transform: translateY(calc((1 - var(--t)) * 20px)); }
.text small { display: block; margin-bottom: var(--space-1); font: 400 11px/1.3 var(--font-outlier); color: var(--ink-muted); }
.photo { position: relative; height: 70px; margin-top: var(--space-2); background: var(--fill-dim); }
.photo::after { content: ""; position: absolute; left: 12%; right: 30%; bottom: 0; height: 58%; border: 2px solid var(--draw-faint); border-bottom: 0; }

/* Emma: the schedule of values fills with work in place; the held line stays an empty dashed box. */
.sov { position: absolute; left: 20px; right: 20px; top: 46px; }
.sv { display: grid; grid-template-columns: 120px minmax(0, 1fr) 70px; gap: var(--space-3); align-items: center; padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font: 400 12px/1.3 var(--font-outlier); }
.sv span { position: relative; height: 10px; background: var(--line); }
.sv span i { position: absolute; inset: 0 auto 0 0; width: calc(var(--pc) * 1%); background: var(--ink); transform-origin: left; transform: scaleX(clamp(0, calc((var(--p) - 0.22 - var(--j) * 0.05) * 6), 1)); }
.sv.held span { background: none; border: 1.5px dashed var(--ink-muted); }
.sv.held span i { display: none; }
.sv em { font-style: normal; text-align: right; color: var(--ink-muted); }
.waivers { position: absolute; right: 18px; bottom: 16px; display: flex; gap: var(--space-2); }
.waivers div { width: 86px; padding: var(--space-2); background: var(--sky); border: 1px solid var(--ink); font: 400 10px/1.3 var(--font-outlier); color: var(--ink-muted);
  --t: clamp(0, calc((var(--p) - 0.38 - var(--j) * 0.05) * 10), 1); opacity: var(--t); transform: translateY(calc((1 - var(--t)) * -30px)) rotate(calc(var(--j) * 3deg - 2deg)); }

/* Kyle: three concepts, fanned. */
.concept { position: absolute; top: 44px; left: 125px; width: 190px; height: 250px; padding: var(--space-3); background: var(--paper); border: 1px solid var(--ink); transform-origin: bottom center;
  --t: clamp(0, calc((var(--p) - 0.2 - var(--j) * 0.06) * 6), 1);
  transform: translateX(calc(var(--t) * var(--dx) * 1px)) rotate(calc(var(--t) * var(--rot) * 1deg)); }
.concept svg { width: 100%; height: 190px; }
.concept svg * { fill: none; stroke: var(--draw); stroke-width: 2; }
.concept svg .dash { stroke: var(--ink); stroke-dasharray: 6 5; }
.concept p { margin-top: var(--space-2); font: 500 11px/1.3 var(--font-outlier); color: var(--ink-muted); }
.concept.pick { background: var(--sky); border-width: 2px; }

/* Section heads for the rest of the page. */
.a-big { font: 800 clamp(40px, 5vw, 80px)/0.92 var(--font-display); font-stretch: 112.5%; letter-spacing: -0.03em; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
.a-sec { padding: clamp(var(--space-24), 14vh, 160px) 0; border-top: 2px solid var(--ink); }

/* The approval desk. With motion, the section pins and scrolling clears it: the draft at the top turns soft blue with the
   brown Needs-you stamp, its Approve button presses, it is marked sent and the next one comes up. Scrolling back undoes
   it. Without motion it is the same desk, cleared by hand. */
.desk-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(var(--space-8), 5vw, 80px); align-items: center; }
.js.motion .desk-scene { height: 460vh; padding: 0; }
.js.motion .desk-pin { position: sticky; top: var(--hd); height: calc(100vh - var(--hd)); display: flex; align-items: center; overflow: hidden; }
.desk-in .cue { margin-top: 20px; }
.d-tally { display: flex; align-items: baseline; gap: var(--space-3); margin-top: var(--space-8); }
.d-tally strong { font: 800 64px/1 var(--font-display); font-stretch: 115%; font-variant-numeric: tabular-nums; }
.d-bar { height: 6px; margin-top: var(--space-4); background: var(--sky); }
.d-bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(var(--cleared, 0)); transition: transform 400ms var(--set); }
.q { display: grid; border: 2px solid var(--ink); }
.qi { padding: var(--space-4) 20px; background: var(--paper); border-bottom: 1px solid var(--ink); transition: opacity 400ms var(--set), background-color 400ms var(--set); }
.qi:last-of-type { border-bottom: 0; }
.qi.active { background: var(--sky); }
.qi-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.qi-top p { font-size: 15px; }
.qi-top b { font: 800 20px/1 var(--font-display); font-stretch: 115%; }
.qi-top span.w { color: var(--ink-muted); }
.qi.active .qi-top span.w { color: var(--ink); }
.qi-d { margin: var(--space-3) 0; padding: var(--space-3); background: var(--paper); border: 1px solid var(--ink); font-size: 14px; line-height: 1.5; }
.qi-act { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.qi-act .btn.pressed { background: var(--ink); color: var(--paper); transform: translateY(1px); }
.qi-res { display: none; font: 500 13px/1.4 var(--font-outlier); }
.qi-end { display: grid; justify-items: start; gap: var(--space-4); padding: var(--space-4) 20px; border-top: 1px solid var(--ink); }
.qi-end[hidden] { display: none; }
.js .qi.done { opacity: 0.6; }
.js .qi.done .qi-act, .js .qi.done .qi-d { display: none; }
.js .qi.done .qi-res { display: block; margin-top: var(--space-2); }
.js .qi:not(.active):not(.done) .qi-d, .js .qi:not(.active):not(.done) .qi-act { display: none; }
.qi-act { display: none; }
.js .qi.active .qi-act { display: flex; }
.cue-st { font: 400 12px/1.4 var(--font-outlier); color: var(--ink-muted); }

/* Proved on our own jobs first: a terms sheet. Three clauses between heavy rules. */
.terms { margin-top: var(--space-12); counter-reset: t; }
.terms li { display: grid; grid-template-columns: 64px minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-6); align-items: baseline; padding: 28px 0; border-top: 2px solid var(--ink); }
.terms li:last-child { border-bottom: 2px solid var(--ink); }
.terms span { font: 500 14px/1 var(--font-outlier); }
.terms b { font: 750 clamp(26px, 2.6vw, 38px)/1.05 var(--font-display); font-stretch: 112.5%; letter-spacing: -0.015em; }
.terms p { font-size: 18px; line-height: 1.5; max-width: 48ch; }

.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); }

@media (max-width: 900px) {
  .hero-copy { flex-direction: column; align-items: start; gap: 20px; }
  .hero-act { justify-items: start; }
  .agent .pin { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0; padding-top: var(--space-4); }
  .a-name { font-size: 64px; }
  .io { margin-top: var(--space-4); }
  .io li { grid-template-columns: 90px minmax(0, 1fr); padding: var(--space-2) 0; font-size: 14px; }
  .js.motion .a-cta { display: none; }
  .bench { height: 48vh; min-height: 300px; }
  .rig { --fit: 0.44; left: 42%; }
  .desk-in, .row2 { grid-template-columns: minmax(0, 1fr); }
  .js.motion .desk-in { gap: var(--space-4); }
  .js.motion .desk-in .a-big { font-size: 34px; }
  .js.motion .desk-in .a-lede, .js.motion .desk-in .cue { display: none; }
  .d-tally { margin-top: var(--space-3); }
  .d-tally strong { font-size: 40px; }
  .terms li { grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-3); }
  .terms p { grid-column: 2; font-size: 16px; }

  /* On a phone the scroll-driven scenes run on a shorter track: the same story in about two thirds of the scrolling. */
  .js.motion .scene { height: calc((var(--len) - 1) * 60vh + 100vh); }
  .js.motion .desk-scene { height: 320vh; }
  /* The desk: a cleared draft folds down to one line, so the draft waiting for you has the room. */
  .qi.done { padding-block: var(--space-2); }
  .qi.done .qi-res { display: none; }
}
