/* The home page's opening animation (Travis 2026-11-04 to 2026-11-05; prototype and its history in
   the hero-animation notes, preview https://claude.ai/artifact/WGQ7nrZp37omA4QGWHqJHr). Drawn by hero.js into #op-stage.
   Every class starts with h- so the site's own .app, .pol, .row and .hero rules never reach inside. */
.op-stage { container: ha / inline-size; width: 100%; max-width: 1120px; margin-inline: auto;
  --paper: #FAFAFA; --ink: #121821; --muted: #5B6472; --rule: #E3E3E3; --pen: #2446C8; --pen-wash: #EEF1FB;
  --white: #FFFFFF; --wire: #C4CAD3; --line: #E8E8EA; --wash: #F1F1F1; --edge: rgba(18,24,33,.12);
  --enter: cubic-bezier(0.16, 1, 0.3, 1); --move: cubic-bezier(0.65, 0, 0.35, 1);
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shot: 0 1px 2px rgba(18,24,33,.06), 0 10px 28px rgba(18,24,33,.09);
  --tile: 0 8px 20px rgba(18,24,33,.07);
  --win: 0 1px 2px rgba(18,24,33,.05), 0 16px 40px -12px rgba(18,24,33,.14);   /* visual-product.md section 4 */ }
.op-stage *, .op-stage *::before, .op-stage *::after { box-sizing: border-box; }
.op-stage img, .op-stage svg { max-width: none; }
.h-stage { position: relative; height: 560px; background: var(--paper); font-family: var(--sans); letter-spacing: -0.01em; color: var(--ink);
  --cy: 49%; --polw: 340px; --polh: 162px; }
.h-stage > * { position: absolute; }
.h-noanim, .h-noanim *, .h-noanim *::before, .h-noanim *::after, .h-still, .h-still *, .h-still *::before, .h-still *::after { transition: none !important; animation: none !important; }
@keyframes h-shake { 0%, 100% { translate: -50% -50%; } 25% { translate: calc(-50% - 5px) -50%; } 50% { translate: calc(-50% + 4px) -50%; } 75% { translate: calc(-50% - 2px) -50%; } }
@keyframes h-blink { 50% { opacity: 0; } }   /* 530 ms on, 530 ms off, as the live hero's caret */

/* beat 1: a cursor drags four files into the upload panel (Ramp's hero opens the same way). The panel comes in tilted
   and settles flat; the files land, each reads in, and the panel grows into the policy window. */
.h-cap { z-index: 2; left: 50%; top: var(--cy); width: var(--polw); height: 216px; translate: -50% -50%; padding: 0 12px 12px; display: grid; grid-template-rows: 40px 1fr; gap: 0;
  background: var(--white); border: 1px solid var(--edge); border-radius: 8px; box-shadow: var(--win);
  opacity: 0; transform: perspective(800px) rotateX(24deg) rotateZ(-5deg) scale(.9); transform-origin: 50% 80%;
  transition: opacity 480ms var(--enter), transform 960ms var(--enter), height 480ms var(--move); }
.h-cap.is-in { opacity: 1; transform: none; }
.h-lbl { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); line-height: 40px; padding-left: 4px; }
.h-zone { position: relative; border: 1px dashed #C9CED6; border-radius: 4px; display: grid; place-items: center; align-content: center; gap: 6px;
  font-size: 12px; color: var(--muted); transition: border-color 240ms var(--move), background 240ms var(--move); }
.h-zone img { width: 18px; height: 18px; border-radius: 3px; filter: grayscale(1); opacity: .28; }
.h-zone > * { transition: opacity 240ms var(--move); }
.h-zone.is-over { border-color: var(--pen); background: var(--pen-wash); }
.h-zone.is-read { border-color: transparent; background: none; }
.h-zone.is-read > :not(.h-fl) { opacity: 0; }
.h-fl { position: absolute; inset: 6px 0; display: grid; align-content: start; gap: 6px; }
.h-fr { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 4px; font-size: 12.5px; color: var(--ink); opacity: 0; transform: translateY(4px);
  transition: opacity 480ms var(--enter), transform 480ms var(--enter); }
.h-fr.is-in { opacity: 1; transform: none; }
.h-fr span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-fr em { width: 48px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.h-fr em::after { content: ""; display: block; height: 100%; width: 0; background: var(--ink); transition: width 960ms var(--move); }
.h-fr.is-done em::after { width: 100%; }
.h-ft { flex: none; width: 26px; height: 18px; border-radius: 3px; border: 1px solid var(--edge); background: var(--white); font-size: 7.5px; font-weight: 700; letter-spacing: .02em;
  font-style: normal; color: var(--muted); display: grid; place-items: center; }
.h-cap.is-grow { height: var(--polh); }
.h-cap.is-grow > * { opacity: 0; transition: opacity 240ms var(--move); }
.h-cap.is-out { opacity: 0; transition: opacity 240ms var(--move); }

.h-drag { z-index: 4; left: 86%; top: 94%; opacity: 0; transition: left 960ms var(--move), top 960ms var(--move), opacity 240ms var(--move); }
.h-drag.is-in { left: 56%; top: calc(var(--cy) + 8px); opacity: 1; }
.h-drag.is-drop { opacity: 0; transition: opacity 480ms var(--move); }
.h-drag > svg { position: absolute; left: -2px; top: -2px; width: 18px; height: 22px; transition: transform 240ms var(--move); }
.h-drag.is-press > svg { transform: scale(.86); }
.h-drag b { position: absolute; left: 11px; top: 11px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--ink); color: var(--white); font-size: 9px; font-weight: 600;
  display: grid; place-items: center; letter-spacing: 0; }
.h-chip { position: absolute; left: 12px; top: calc(26px + var(--i) * 25px); display: flex; align-items: center; gap: 4px; translate: calc(var(--i) * 3px) 0;
  transition: transform 480ms var(--move), opacity 240ms var(--move); transition-delay: calc(var(--i) * 40ms); }
.h-chip span { height: 20px; padding: 0 9px; border-radius: 10px; background: var(--pen); color: var(--white); font-size: 11px; font-weight: 500; line-height: 20px; white-space: nowrap; letter-spacing: 0; }
.h-drag.is-drop .h-chip { transform: translate(-50px, calc(-16px - var(--i) * 22px)) scale(.4); opacity: 0; }

/* beat 2: the policy, drawn as a Faythe window at the product's own sizes (visual-product.md). Shown at full size on wide
   screens, not at the 0.8 of visual-website.md section 4: Travis found 0.8 too small to read on 2026-11-05.
   The same label as the upload panel heads it; each rule is a condition row (field chip, operator, value chip) with its
   result mark, as in the product. One inset, 12px, runs down the left edge of every line of text. More rules fade out below. */
.h-pol { z-index: 3; left: 50%; top: calc(var(--cy) - var(--polh) / 2); translate: -50% 0; opacity: 0; transition: opacity 240ms var(--move); }
.h-pol.is-in { opacity: 1; }
.h-win { width: var(--polw); background: var(--white); border: 1px solid var(--edge); border-radius: 8px; box-shadow: var(--win);
  font-size: 12px; line-height: 1.3; letter-spacing: -0.01em; --more: 120px;
  -webkit-mask-image: linear-gradient(#000 calc(100% - var(--more)), transparent); mask-image: linear-gradient(#000 calc(100% - var(--more)), transparent); }
.h-win .h-lbl { display: block; height: 40px; padding: 0 16px; line-height: 40px; border-bottom: 1px solid var(--line); }
.h-win .h-more { height: var(--more); overflow: hidden; }
.h-row { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
  opacity: 0; transform: translateY(6px); transition: opacity 480ms var(--enter), transform 480ms var(--enter); }
.h-row.is-in { opacity: 1; transform: none; }
.h-row i { padding: 3px 8px; border-radius: 4px; background: var(--wash); font-size: 12px; font-weight: 500; font-style: normal; transition: background 240ms var(--move), color 240ms var(--move); }
.h-row s { padding: 0 2px; font-size: 12px; color: var(--muted); text-decoration: none; }
.h-row u { margin-left: auto; padding-left: 16px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; text-decoration: none; }
.h-row u::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.h-row u.h-no { color: var(--muted); }
.h-row u.h-no::before { background: var(--rule); }
.h-row.is-hit i { background: var(--pen-wash); color: var(--pen); }
.h-row.is-hit u::before { animation: h-mark 480ms var(--enter); }
@keyframes h-mark { 40% { scale: 1.35; } }

/* beat 3: vendor apps scatter out; the ones not on the subprocessor list go gray and step back */
.h-v { z-index: 1; left: 50%; top: var(--cy); width: 64px; height: 64px; translate: -50% -50%; border-radius: 16px; background: var(--white); border: 1px solid var(--rule); box-shadow: var(--tile);
  display: grid; place-items: center; opacity: 0; transform: scale(.6);
  transition: left 960ms var(--enter), top 960ms var(--enter), opacity 480ms var(--enter), transform 480ms var(--enter), filter 480ms var(--move); }
.h-v img { width: var(--s, 58%); height: var(--s, 58%); object-fit: contain; }
.h-v.is-in { left: var(--x); top: var(--y); opacity: 1; transform: none; }
.h-v.is-in.is-dim { opacity: .3; filter: grayscale(1); transform: scale(.92); }

/* beat 4: the ask bar and the request lines */
.h-ask { z-index: 3; left: 50%; top: calc(var(--cy) + 214px); width: 420px; height: 48px; translate: -50% -50%; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 14px;
  background: var(--white); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--win); font-size: 14px;
  opacity: 0; transform: translateY(8px); transition: opacity 480ms var(--enter), transform 480ms var(--enter); }
.h-ask.is-in { opacity: 1; transform: none; }
.h-ask.is-shake { animation: h-shake 240ms var(--move); }
.h-ask .h-plus { width: 18px; height: 18px; flex: none; color: var(--muted); }
.h-ask .h-typed { white-space: nowrap; overflow: hidden; min-width: 0; }
.h-ask .h-caret { width: 1.5px; height: 17px; border-radius: 1px; background: var(--ink); flex: none; margin-left: -8px; animation: h-blink 1060ms steps(1) infinite; }
.h-ask.is-key .h-caret { animation: none; }
.h-ask.is-run .h-caret { opacity: 0; animation: none; }
.h-ask .h-send { margin-left: auto; width: 32px; height: 32px; border-radius: 4px; background: var(--ink); color: var(--white); display: grid; place-items: center; flex: none; transition: transform 240ms var(--move), opacity 240ms var(--move); opacity: .35; }
.h-ask .h-send { position: relative; }
.h-ask .h-send svg { width: 16px; height: 16px; transition: opacity 240ms var(--move), scale 240ms var(--move); }
.h-ask .h-send i { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 2px; background: var(--white); opacity: 0; scale: .4;
  transition: opacity 240ms var(--move), scale 240ms var(--move); }
.h-ask.is-run .h-send { opacity: 1; }
.h-ask.is-run .h-send svg { opacity: 0; scale: .4; }
.h-ask.is-run .h-send i { opacity: 1; scale: 1; }
.h-ask.is-typing .h-send { opacity: 1; }
.h-ask .h-send.is-press { transform: scale(.88); }
svg.h-lines { z-index: 2; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
/* A request: the whole line from source to rule to target draws first; then a bright run travels it. Blocked, the run
   stops halfway, springs back 6% and an ink cross appears, as in the live hero (site/opening.js). */
.h-req { opacity: 0; transition: opacity 240ms var(--move); }
.h-req.is-on { opacity: 1; }
.h-req .h-bl { fill: none; stroke: var(--wire); stroke-width: 1.75; stroke-linecap: round; transition: stroke-dashoffset 480ms var(--move); }
.h-req .h-pk, .h-req .h-tl { fill: none; stroke: var(--pen); stroke-width: 2.25; stroke-linecap: round; transition: stroke-dashoffset 480ms var(--move), opacity 240ms var(--move); }
.h-req .h-tl { stroke-width: 1.75; }
.h-req .is-half { transition: stroke-dashoffset 240ms var(--enter), opacity 240ms var(--move); }
.h-req .is-back { transition: stroke-dashoffset 200ms var(--enter), opacity 240ms var(--move); }
.h-req .is-stop { opacity: 0 !important; }
.h-req .h-pt { fill: var(--white); stroke: var(--wire); stroke-width: 1.5; transition: fill 240ms var(--move), stroke 240ms var(--move); }
.h-req .h-pt.is-hot { fill: var(--pen); stroke: var(--pen); }
.h-req .h-x { opacity: 0; transform-box: fill-box; transform-origin: center; scale: .4; transition: opacity 240ms var(--enter), scale 240ms var(--enter); }
.h-req .h-x.is-x { opacity: 1; scale: 1; }
.h-fade { opacity: 0 !important; transition: opacity 480ms var(--move) !important; }

@container ha (max-width: 640px) {
  .h-stage { height: 520px; --cy: 40%; --lane: 26px; }
  .h-drag { scale: .9; }
  .h-drag.is-in { left: 50%; }
  /* phone: the window leaves a 52px lane each side; lines run down those lanes to the rule they use */
  .h-stage { --polw: calc(100% - 104px); }
  .h-pol { width: calc(100% - 104px); }
  .h-stage { --polh: 138px; }
  .h-win { zoom: .85; width: 100%; --more: 80px; }
  .h-cap { height: 196px; }
  .h-fr { font-size: 12px; }
  .h-row u { font-size: 0; gap: 0; }   /* the mark alone; the operator stays so the first two rules read apart */
  .h-v { width: 42px; height: 42px; border-radius: 11px; }
  .h-v.is-in { left: var(--mx); top: var(--my); }
  .h-ask { top: 90%; width: calc(100% - 24px); font-size: 13px; padding-left: 12px; }
  .h-ask .h-plus { display: none; }
}
/* Stage 301 to 330px (a 365 to 394px screen): at 0.85 the first two rules ran past the window's edge, their mark on the line's port. */
@container ha (max-width: 330px) { .h-win { zoom: .78; } }
/* The narrowest phones (stage under 300px, a 320 to 360px screen): narrower lanes and smaller tiles, the window at
   0.64 so the longest rule still fits, and the input across the whole stage so the longest request fits. */
@container ha (max-width: 300px) {
  .h-stage { --lane: 18px; --polw: calc(100% - 72px); --polh: 104px; }
  .h-pol { width: calc(100% - 72px); }
  .h-win { zoom: .64; }
  .h-v { width: 32px; height: 32px; border-radius: 8px; }
  .h-ask { width: 100%; font-size: 11.5px; gap: 8px; padding-left: 10px; }
}
@media (prefers-reduced-motion: reduce) { .h-stage * { transition: none !important; animation: none !important; } }
