:root {
  --text: #1d1d1f; --blue: #2563EB; --blue-hover: #1d4ed8; --line: #e3e3e8; --pane: #f5f5f7;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --gap: clamp(12px, 3.2vh, 44px);
  --win-h: min(780px, calc(100vh - 2 * var(--gap)));
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light; color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; background: #eef2f8; }
body { min-height: 100vh; padding: var(--gap); display: grid; place-items: center; letter-spacing: -0.01em; background: linear-gradient(180deg, #f7f9fc 0%, #e9eff8 100%); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.win {
  width: min(1120px, 100%); height: var(--win-h);
  display: grid; grid-template-columns: clamp(210px, 22vw, 250px) 1fr; overflow: hidden; border-radius: 12px; background: var(--pane);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.05), 0 12px 28px rgba(30, 50, 90, 0.08), 0 40px 80px rgba(30, 50, 90, 0.12);
}

/* Sidebar */
.sidebar {
  display: flex; flex-direction: column; min-height: 0; padding: 16px 10px 14px; border-right: 1px solid #dcdce1;
  background: rgba(236, 236, 241, 0.9); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
}
.logo { display: block; margin: clamp(6px, 1.6vh, 14px) 6px clamp(12px, 2.6vh, 22px); }
.logo svg { display: block; height: 44px; width: auto; max-width: 100%; }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar nav a { display: flex; align-items: center; gap: 9px; height: clamp(28px, 4.4vh, 32px); padding: 0 8px; border-radius: 7px; font-size: 14px; color: var(--text); }
.sidebar nav a:hover { text-decoration: none; background: rgba(0, 0, 0, 0.05); }
.sidebar nav a[aria-current="page"], .sidebar nav a.on { background: rgba(37, 99, 235, 0.14); font-weight: 600; }
.sidebar nav a.sub { padding-left: 30px; font-size: 13px; }
.ic { width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.ic svg { width: 15px; height: 15px; }
.sub .ic { width: 18px; height: 18px; }
.sub .ic svg { width: 16px; height: 13px; }
.copy { margin-top: auto; padding: 0 8px; font-size: 11px; }
.copy a { margin-left: 6px; }

/* Pane */
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; container-type: inline-size; background: #ffffff; }
.pane-bar { flex: none; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 clamp(20px, 3vw, 36px); border-bottom: 1px solid var(--line); background: rgba(250, 250, 252, 0.85); }
.title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.back { font-size: 24px; line-height: 1; padding: 0 6px 3px; border-radius: 6px; color: var(--text); }
.back:hover { background: rgba(0, 0, 0, 0.05); text-decoration: none; }
.pane-body { flex: 1; min-height: 0; }
[hidden] { display: none !important; }
h1 { font-weight: 600; letter-spacing: -0.032em; line-height: 1.07; }
.sub { font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.meta { font-weight: 600; }
.more::after { content: "\203A"; margin-left: 4px; }
.mark.sm { width: 18px; height: 15px; flex: none; }
.pill { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 980px; background: var(--blue); color: #ffffff; font-size: 13px; }
.pill:hover { background: var(--blue-hover); text-decoration: none; }
.pill.lg { height: 38px; padding: 0 20px; font-size: 15px; }
.ctas { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 15px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Contact form */
.form { width: 100%; max-width: 560px; margin-top: clamp(14px, 3.2vh, 32px); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.8vh, 14px) 14px; }
.f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f.full { grid-column: 1 / -1; }
.f > span { font-size: 13px; font-weight: 600; }
.f input, .f textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--text); background: #ffffff; border: 1px solid #c9c9cf; border-radius: 8px;
  height: clamp(30px, 5vh, 34px); padding: 0 10px; outline: none; box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.f textarea { height: clamp(64px, 14vh, 120px); padding: 7px 10px; line-height: 1.4; resize: none; }
.f input:focus, .f textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3); }
.f [aria-invalid="true"] { border-color: #d70015; }
.f [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(215, 0, 21, 0.22); }
.err { font-style: normal; font-size: 12px; color: #d70015; }
.err:empty { display: none; }
.actions { margin-top: clamp(12px, 2.4vh, 22px); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
button.pill { border: 0; font: inherit; font-size: 14px; height: 32px; padding: 0 20px; cursor: pointer; }
.form > .err { margin-top: 12px; font-size: 13px; }
.sent { margin-top: clamp(14px, 3.2vh, 32px); outline: none; }
.sent h2 { font-size: clamp(20px, 3.6vh, 26px); font-weight: 600; letter-spacing: -0.02em; }
.sent p { margin-top: 6px; font-size: 15px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* J1: Finder */
.home { display: grid; grid-template-columns: 1.5fr 1fr; align-items: center; gap: 4cqi; padding: 0 clamp(28px, 6cqi, 72px); }
.home h1 { font-size: clamp(28px, min(5.6cqi, 7.2vh), 60px); }
.home .sub { margin-top: 1.8vh; font-size: clamp(17px, min(2.6cqi, 3.2vh), 26px); }
.home .body { margin-top: 2.4vh; font-size: clamp(15px, min(2cqi, 2.5vh), 20px); line-height: 1.45; }
.home .ctas { margin-top: 3.6vh; }
.art { display: grid; place-items: center; }
.art .mark { width: min(100%, 30vh, 250px); height: auto; }

.page { padding: clamp(24px, 6vh, 64px) clamp(28px, 6cqi, 72px); }
.page h1 { font-size: clamp(30px, 6.4vh, 48px); }
.page .sub { margin-top: 1vh; font-size: clamp(16px, 2.6vh, 21px); font-weight: 400; }
.legal { overflow-y: auto; }
.legal > p:not(.sub) { max-width: 640px; margin-top: 8px; font-size: 15px; line-height: 1.5; }
.legal .sub + p { margin-top: clamp(14px, 3.2vh, 32px); }
.legal h2 { margin-top: clamp(16px, 3vh, 26px); font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }

.finder { display: grid; }
.preview { min-width: 0; min-height: 0; overflow-y: auto; padding: clamp(14px, 2.4vh, 28px) clamp(20px, 3vw, 40px); background: #fafafc; }
.pv { display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 16px); max-width: 1100px; }
.pv-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pv h3 { font-size: clamp(20px, 3.2vh, 26px); font-weight: 700; letter-spacing: -0.02em; }
.pv-top { display: flex; flex-direction: column; gap: 2px; }
.pv-status { font-size: 14px; }
/* Every hero is the same height on the content's left edge, as tall as the no-scroll budget allows; its width follows the media. */
.pv-art { --hh: calc((var(--win-h) - 52px) * 0.4); position: relative; display: flex; align-self: flex-start; height: var(--hh); max-width: 100%; transition: transform 0.15s; }
.pv-art > * { height: 100%; }
.pv-art .shot { display: block; width: auto; max-width: 100%; height: 100%; border-radius: 8px; }
.pv-art:has(.flow) { align-self: stretch; }
/* The panel and its sidebar item for the hash are right on first paint (preview.js sets data-p before paint). */
:root:is([data-p="timelines"], [data-p="campaign-bot"], [data-p="creator-payouts"]) .pv[data-panel="volumeugc"] { display: none !important; }
:root[data-p="timelines"] .pv[data-panel="timelines"], :root[data-p="campaign-bot"] .pv[data-panel="campaign-bot"], :root[data-p="creator-payouts"] .pv[data-panel="creator-payouts"] { display: flex !important; }
:root:is(:not([data-p]), [data-p="volumeugc"]) .sidebar:has(~ .pane [data-panel]) a[data-p="volumeugc"],
:root[data-p="timelines"] .sidebar:has(~ .pane [data-panel]) a[data-p="timelines"],
:root[data-p="campaign-bot"] .sidebar:has(~ .pane [data-panel]) a[data-p="campaign-bot"],
:root[data-p="creator-payouts"] .sidebar:has(~ .pane [data-panel]) a[data-p="creator-payouts"] { background: rgba(37, 99, 235, 0.14); font-weight: 600; }
.sidebar:has(~ .pane [data-panel]) nav a[href="/work"] { background: none; font-weight: 400; }

/* Client diagrams, pure CSS on one grid shared by every diagram: column 1 centered at --c1, column 3 centered half a
   glyph past where "Who it's for" starts, the folder halfway between those centers, the main row at the hero's middle.
   Glyph widths are their viewBox ratios at the shared --gh height, so every connector keeps --clr from the real edges. */
.flow {
  --gh: 48px; --lab: 18px; --clr: 14px; --c1: 60px;
  --c2: calc(50% + var(--col-gap) / 2); --c3: calc(var(--c2) + var(--gh) * 26 / 56); --fc: calc((var(--c1) + var(--c3)) / 2);
  --y: 50%; --dy: min(calc((75% - var(--gh)) / 2), calc(50% - var(--gh) / 2 - var(--lab) - 28px)); --foot: calc(var(--y) + var(--gh) / 2 + 10px + var(--lab));
  --w-fold: calc(var(--gh) * 116 / 84); --w-tr: calc(var(--gh) * 120 / 56); --w-docs: calc(var(--gh) * 62 / 74);
  --w-flag: calc(var(--gh) * 44 / 56); --w-dol: calc(var(--gh) * 32 / 62); --w-per: calc(var(--gh) * 52 / 56);
  position: relative; width: 100%; height: 100%;
}
.fn { position: absolute; left: var(--x); top: calc(var(--yy) - var(--gh) / 2); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; line-height: var(--lab); white-space: nowrap; }
.fn.side { left: calc(var(--x) - var(--w) / 2); transform: none; flex-direction: row; gap: 12px; }
.fn .gl { display: block; flex: none; width: auto; height: var(--gh); }
.fn .bl { color: #60A5FA; }
.n-bot { --x: var(--fc); --yy: var(--y); }
.ar { position: absolute; left: calc(var(--a) + var(--clr)); top: var(--ay); width: calc(var(--b) - var(--a) - 2 * var(--clr)); height: 2px; margin-top: -1px; border-radius: 1px; background: #60A5FA; }
.ar::before, .ar::after { content: ""; position: absolute; right: 0; top: 0; width: 10px; height: 2px; border-radius: 1px; background: #60A5FA; transform-origin: calc(100% - 1px) 50%; transform: rotate(40deg); }
.ar::after { transform: rotate(-40deg); }
.tip { left: calc(var(--tx) - 2px); top: var(--ty); width: 2px; transform-origin: calc(100% - 1px) 50%; }
.tip.down { transform: rotate(90deg); }
.tip.up { transform: rotate(-90deg); }
.cv { position: absolute; left: var(--cl); top: var(--ct); width: var(--cw); height: var(--ch); overflow: visible; }
.flow-cp .n-docs { --x: var(--c1); --yy: var(--y); }
.flow-cp .n-up, .flow-cp .n-down { --x: var(--c3); --w: var(--w-per); --yy: calc(var(--y) - var(--dy)); }
.flow-cp .n-down { --yy: calc(var(--y) + var(--dy)); }
.flow-cp .a1 { --a: calc(var(--c1) + var(--w-docs) / 2); --b: calc(var(--fc) - var(--w-fold) / 2); --ay: var(--y); }
.flow-cp .k1 { --cl: calc(var(--fc) + var(--w-fold) / 2 + var(--clr)); --cw: calc(var(--c3) - var(--w-per) / 2 - var(--clr) - var(--cl)); --ct: calc(var(--y) - var(--dy)); --ch: calc(2 * var(--dy)); }
.flow-cp .tip { --tx: calc(var(--c3) - var(--w-per) / 2 - var(--clr)); --ty: calc(var(--y) - var(--dy)); }
.flow-cp .t2 { --ty: calc(var(--y) + var(--dy)); }
.flow-cb .n-pay { --x: var(--c3); --yy: var(--y); }
.flow-cb .n-flag { --x: var(--c1); --yy: calc(var(--y) - var(--dy)); }
.flow-cb .n-creators { --x: var(--c1); --yy: calc(var(--y) + var(--dy)); }
.flow-cb .cv { --cw: calc(var(--fc) - var(--w-fold) / 2 - var(--clr) - var(--cl)); --ch: var(--dy); }
.flow-cb .k1 { --cl: calc(var(--c1) + var(--w-flag) / 2 + var(--clr)); --ct: calc(var(--y) - var(--dy)); }
.flow-cb .k2 { --cl: calc(var(--c1) + var(--w-tr) / 2 + var(--clr)); --ct: var(--y); }
.flow-cb .t1 { --tx: calc(var(--fc) - var(--w-fold) / 2 - var(--clr)); --ty: var(--y); }
.flow-cb .a1 { --a: calc(var(--fc) + var(--w-fold) / 2); --b: calc(var(--c3) - var(--w-dol) / 2); --ay: var(--y); }

/* Timelines: three vertical clips side by side, each looping its own show cut. */
.fan { --pw: calc(var(--hh) * 9 / 16); position: relative; display: flex; gap: 3px; }
.fan .ph { flex: none; width: var(--pw); height: 100%; border-radius: 6px; overflow: hidden; background: #1d1d1f; }
.fan video { display: block; width: 100%; height: 100%; object-fit: cover; }

.pv { --col-gap: clamp(20px, 4vw, 48px); }
.pv-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--col-gap); }
.pv h4 { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.pv p, .pv li { margin-top: 2px; font-size: clamp(13px, 1.9vh, 15px); line-height: 1.4; }
.built { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.8vh, 16px) clamp(24px, 4vw, 48px); margin-top: 10px; }
.built li { display: grid; grid-template-columns: 20px 1fr; align-content: start; gap: 1px 12px; margin-top: 0; }
.built b { font-weight: 600; }
.built svg { grid-row: 1 / 3; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.built span { grid-column: 2; }

.pv-art:has(.shot-link:hover) { transform: translateY(-2px); }

.alt-email { margin-top: clamp(14px, 2.6vh, 24px); padding-top: clamp(12px, 2.2vh, 18px); border-top: 1px solid var(--line); font-size: 14px; }

@media (max-width: 734px) {
  body { padding: 0; display: block; background: #ffffff; }
  .win { display: block; height: auto; min-height: 100vh; border-radius: 0; box-shadow: none; }
  .sidebar { position: sticky; top: 0; z-index: 5; padding: 12px 14px 10px; border-right: 0; border-bottom: 1px solid #dcdce1; }
  .copy, .sidebar nav a.sub { display: none; }
  .logo { margin: 0 0 10px; }
  .logo svg { height: 28px; }
  .sidebar nav { flex-direction: row; gap: 4px; }
  .sidebar nav a { flex: 1; justify-content: center; height: 32px; }
  .pane-bar { height: 44px; padding: 0 14px; }
  .fields { grid-template-columns: 1fr; }
  .f input { height: 40px; font-size: 16px; }
  .f textarea { height: 120px; font-size: 16px; }
  .home { grid-template-columns: 1fr; gap: 28px; padding: 32px 18px 40px; }
  .home h1 { font-size: 34px; }
  .home .sub { margin-top: 12px; font-size: 20px; }
  .home .body { margin-top: 14px; font-size: 17px; }
  .home .ctas { margin-top: 24px; }
  .art { justify-items: start; }
  .art .mark { width: 120px; }
  .page { padding: 28px 18px 40px; }
  .page h1 { font-size: 32px; }
  .finder { display: block; }
  .preview { padding: 20px 18px 40px; }
  .pv-art { align-self: stretch; height: auto; }
  .pv-art:has(.flow) { height: 280px; }
  .flow { --gh: 36px; --c2: calc(100% - 90px); }
  .pv-art > *, .pv-art .shot { width: 100%; height: auto; }
  .pv-art:has(.fan) { --hh: min(280px, calc((100vw - 96px) * 16 / 27)); height: var(--hh); }
  .pv-art .fan { width: auto; height: 100%; }
  .sidebar nav { flex-wrap: wrap; }
  .sidebar nav:has(a.sub.on) a.sub { display: flex; flex: 1 1 40%; justify-content: flex-start; height: 30px; padding-left: 8px; }
  .pv-cols, .built { grid-template-columns: 1fr; }
  .pv-cols > div + div { margin-top: 14px; }
}

/* Cross-page navigations: the window frame and sidebar hold still, only the content pane crossfades. */
@view-transition { navigation: auto; }
.win { view-transition-name: win; }
.sidebar { view-transition-name: sidebar; }
.pane-body { view-transition-name: pane; }
::view-transition-group(*) { animation-duration: 0.15s; }
::view-transition-group(win), ::view-transition-group(sidebar), ::view-transition-old(win), ::view-transition-new(win), ::view-transition-new(sidebar) { animation: none; }
::view-transition-old(sidebar) { display: none; }
