/* Headquarters product page (/platform). Builds on headquarters.css + headquarters-xbuild.css tokens (body.hq).
   XBuild ink, yellow and stone fields carry the three jobs Rex does: answer, act, run on a schedule. */
body.hq {
  --pf-card: #FBFAF8; --pf-line: #DBD6CE; --pf-yellow: #FDC23E; --pf-muted: #5B574F;
  --pf-stone: #DBD6CE; --pf-paper: #F0ECE8; --pf-brass: #A57C45; --pf-ink: #0F0F0F;
}

/* ---------- shared ---------- */
body.hq .hq-wrap .pf-kicker { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.8rem; font: 600 .74rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.pf-kicker::before { content: ""; width: 1.8rem; height: 1.5px; background: currentColor; opacity: .6; }
body.hq .hq-wrap .pf-h2 { margin: 0; font: 600 clamp(2.4rem, 4.8vw, 4.4rem)/1.02 var(--sans); letter-spacing: -.035em; text-wrap: balance; }
body.hq .hq-wrap .pf-lead { margin: 2rem 0 0; max-width: 32rem; font: 400 clamp(1.08rem, 1.4vw, 1.28rem)/1.5 var(--sans); opacity: .86; }

/* ---------- hero ---------- */
.pf-hero { padding-block: clamp(8rem, 11vw, 10rem) clamp(4rem, 7vw, 7rem); overflow: hidden; }
.pf-hero .hq-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(3rem, 6.25vw, 5.625rem); justify-items: start; }
.pf-hero__copy { width: 100%; max-width: 1000px; text-align: left; }
body.hq .hq-wrap .pf-hero__eyebrow { margin: 0 0 22px; font: 600 .75rem/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--pf-muted); }
body.hq .hq-wrap .pf-hero__eyebrow::before { content: ""; display: inline-block; width: 1.8rem; height: 1px; margin-right: .65rem; vertical-align: middle; background: var(--pf-brass); }
body.hq .hq-wrap .pf-hero__title { margin: 0; max-width: 22ch; font: 600 clamp(2.35rem, 5.4vw, 5rem)/1.08 var(--sans); letter-spacing: -.035em; text-wrap: balance; color: var(--pf-ink); }
.pf-hero__title .pf-hero__emphasis { display: block; color: var(--pf-brass); text-wrap: balance; }
body.hq .hq-wrap .pf-hero__sub { margin: 26px 0 32px; max-width: 65ch; font: 500 clamp(1.125rem, 1rem + .6vw, 1.45rem)/1.5 var(--sans); color: var(--text-2-paper); }
body.hq .pf-hero__copy :is(h1,p)::after, body.hq .pf-hero__copy :is(h1,.pf-hero__sub)::before { content: none; }
.pf-hero__actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .75rem; align-items: center; }
@media (max-width: 767px) {
  .pf-hero { padding-top: 120px; }
  body.hq .hq-wrap .pf-hero__title { font-size: clamp(2rem, 9vw, 3rem); }
}
.pf-ghost { display: inline-flex; align-items: center; padding: .85rem 1.2rem; border-radius: 999px; border: 1px solid rgba(15,15,15,.25); font: 600 .95rem/1 var(--sans); color: var(--ink); text-decoration: none; }
.pf-ghost:hover { border-color: var(--ink); }
.pf-ghost:focus-visible { outline: 2px solid var(--pf-brass); outline-offset: 3px; }

/* ---------- customer logos (inside the reused ink logo band) ---------- */
.pf-customers { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: clamp(1.8rem, 5vw, 5rem); margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid rgba(240,236,232,.14); }
.pf-customers span { display: block; height: calc(var(--h, 1) * clamp(2.2rem, 3.4vw, 3rem)); aspect-ratio: var(--ar); background: var(--paper); opacity: .9;
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }

/* ---------- the three jobs: big colour fields ---------- */
.pf-field { padding-block: clamp(6.5rem, 12vw, 11.5rem); overflow: hidden; }
.pf-field .hq-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(3rem, 8vw, 8.5rem); align-items: center; }
.pf-field--flip .hq-wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.pf-field--flip .pf-field__copy { order: 2; }
.pf-field--ink { background: var(--pf-ink); color: var(--pf-paper); }
.pf-field--yellow { background: var(--pf-yellow); color: var(--pf-ink); }
.pf-field--stone { background: var(--pf-stone); color: var(--pf-ink); }
.pf-points { list-style: none; margin: 2.6rem 0 0; padding: 2rem 0 0; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); display: grid; gap: 1.1rem; }
.pf-points li { display: flex; gap: .8rem; align-items: baseline; font: 500 1.06rem/1.4 var(--sans); }
.pf-points li::before { content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 2px; background: currentColor; transform: translateY(-.1rem) rotate(45deg); opacity: .8; }
.pf-field--ink .pf-points li::before { background: var(--pf-yellow); opacity: 1; }


/* ---------- Rex demos: the product components from headquarters-compact.css, floating straight on the field ---------- */
/* the components inherit text colour; on the homepage that's ink, so reset it here or the field colour (cream on
   slate and brick) leaks into any text the markup doesn't colour itself, e.g. the stalled-claim row */
.pf-shot { position: relative; justify-self: center; width: min(100%, 31rem); color: #0F0F0F; }
.pf-shot > .an, .pf-shot > .ax, .pf-shot > .gw, .pf-shot > .cx { box-shadow: 0 50px 90px -30px rgba(0,0,0,.45) !important; }
.pf-shot .gw { min-height: 0; }
/* contrast: the homepage's light-grey status lines sit on a stone backdrop there; on colour fields they need more ink */
.pf-shot .an-work, .pf-shot .an.s2 .an-work, .pf-shot .ax-row, .pf-shot .ax-step, .pf-shot .gw-work, .pf-shot .cx-wh { color: #4A4741 !important; }
.pf-shot .ax-time, .pf-shot .gx-det, .pf-shot .gx-open, .pf-shot .ax-cmeta span:last-child { color: #5B574F !important; }
.pf-shot .an-head { color: #0F0F0F !important; }
/* replay cover: the Rex X fills up yellow while the card resets underneath */
.pf-load { position: absolute; top: 0; left: 0; right: 0; display: grid; place-items: center; border-radius: 16px; background: #FBFAF8; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.pf-shot.is-loading .pf-load { opacity: 1; transition: none; }
.pf-load svg { width: 3.4rem; height: auto; }
.pf-load__base { fill: #E4DFD8; }
.pf-load__fill { fill: var(--pf-yellow); clip-path: inset(100% 0 0 0); }
.pf-shot.is-loading .pf-load__fill { animation: pf-fill .65s cubic-bezier(.6,0,.3,1) forwards; }
@keyframes pf-fill { to { clip-path: inset(0 0 0 0); } }
/* hero: Rex's day, built from the product's project-list rows (.cx-r, .cx-st) */
.pf-hero .pf-shot { width: min(100%, 34rem); }
/* the hero board keeps its original ink theme: same rows and pills, inverted */
.pf-today { position: relative; display: block; min-height: 0; background: var(--pf-ink); border: 0; border-radius: 28px; color: #F4F1EC;
  box-shadow: 0 40px 80px -20px rgba(15,15,15,.3), inset 0 0 0 1px rgba(255,255,255,.05) !important; }
.pf-today::before { content: ""; position: absolute; inset: -30% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(253,194,62,.18), transparent 65%); pointer-events: none; }
.pf-today .cx-list { position: relative; padding: 24px 22px 18px 24px; }
.pf-today .cx-lh span { background: rgba(244,241,236,.12); color: rgba(244,241,236,.75); }
.pf-today .cx-r { grid-template-columns: 34px minmax(0, 1fr) auto auto; padding: 12px 8px; border-top-color: rgba(244,241,236,.08); }
.pf-today .cx-th { border-radius: 10px; background: rgba(244,241,236,.1); padding: 8px; object-fit: contain; }
.pf-today .cx-nm b { white-space: normal; color: #F4F1EC; }
.pf-today .cx-nm span { color: rgba(244,241,236,.55); }
.pf-today .cx-st { background: rgba(244,241,236,.1); color: #F4F1EC; transition: background .3s; }
.pf-today .cx-st--wn { background: rgba(253,194,62,.16); color: var(--pf-paper); }
.pf-today .cx-st--ps { background: rgba(219,214,206,.15); color: var(--pf-paper); }
.pf-today .cx-st--es i, .pf-today .cx-st--wn i { background: var(--pf-yellow); }
.pf-today .cx-st--ps i { background: var(--pf-stone); }
.pf-shot .gx-ok { background: var(--pf-yellow); color: var(--pf-ink); }
.pf-today .cx-v { color: rgba(244,241,236,.8); }

/* ---------- films: "Hear it directly from our users." Tall cover cards; the active one widens and plays ---------- */
.pf-films { --ch: 40rem; padding-block: clamp(6rem, 11vw, 10rem); background: var(--pf-ink); color: #F4F1EC; overflow: hidden; }
.pf-films__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
body.hq .hq-wrap .pf-films__title { margin: 0; max-width: 14ch; font: 500 clamp(3rem, 7vw, 6.4rem)/.98 var(--sans); letter-spacing: -.045em; text-wrap: balance; }
.pf-films__fit { container-type: inline-size; }
.pf-films__fit .pf-films__row { --ch: min(44rem, calc((100cqi - 2 * clamp(.9rem, 1.4vw, 1.25rem)) / 2.12)); }
.pf-films__row { display: flex; gap: clamp(.9rem, 1.4vw, 1.25rem); }
.pf-films__dots { display: none; justify-content: center; gap: .6rem; margin-top: 2rem; }
.pf-films__dots button { width: .55rem; height: .55rem; padding: 0; border: 0; border-radius: 999px; background: rgba(244,241,236,.3); cursor: pointer; transition: width .4s var(--ease), background .4s; }
.pf-films__dots button[aria-current] { width: 2rem; background: #F4F1EC; }
.pf-films__dots button:focus-visible { outline: 2px solid var(--pf-yellow); outline-offset: 3px; }
.pf-vcard { flex: none; width: calc(var(--ch) * .5); display: grid; gap: 1.2rem; align-content: start; scroll-snap-align: center; transition: width .7s var(--ease); }
.pf-vcard.is-active { width: calc(var(--ch) * 1.12); }
.pf-vcard__btn { position: relative; display: block; height: var(--ch); padding: 0; border: 0; border-radius: 22px; overflow: hidden; cursor: pointer; text-align: left; font: inherit;
  background: radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,.16), transparent 55%), var(--field); color: var(--on); isolation: isolate; }
.pf-vcard__btn:focus-visible { outline: 2px solid var(--pf-yellow); outline-offset: 4px; }
/* cover art: watermark X, monogram, the pull quote */
.pf-vcard__art { position: absolute; inset: 0 auto 0 0; width: calc(var(--ch) * .5); display: grid; grid-template-rows: auto 1fr auto; padding: clamp(1.3rem, 2vw, 1.8rem); transition: width .7s var(--ease); }
.pf-vcard.is-active .pf-vcard__art { width: calc(var(--ch) * (1.12 - .5625)); }
.pf-vcard__mark { position: absolute; z-index: -1; right: -38%; bottom: -12%; width: 115%; opacity: .1; fill: currentColor; transition: transform 1.2s var(--ease); }
.pf-vcard.is-active .pf-vcard__mark { transform: rotate(-8deg) scale(1.08); }
.pf-vcard__top { display: flex; align-items: center; gap: .7rem; font: 600 .7rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: pre; }
.pf-vcard__lbl { display: none; }
.pf-vcard.is-active .pf-vcard__lbl { display: inline; }
.pf-vcard__av { flex: none; width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--chip-on); font: 700 .9rem/1 var(--sans); letter-spacing: 0; }
.pf-vcard__quote { align-self: end; margin: 0 0 1.4rem; font: 600 clamp(1.45rem, 2vw, 2rem)/1.12 var(--sans); letter-spacing: -.025em; text-wrap: balance; }
/* play: a true circle with an optically centred triangle; opens into an evenly padded "Watch story" pill */
.pf-vcard__play { --pd: 0px; justify-self: start; display: inline-flex; align-items: center; justify-content: center; height: 3.25rem; min-width: 3.25rem; padding: 0 var(--pd);
  border-radius: 999px; background: var(--pf-ink); color: var(--pf-paper); font: 600 .95rem/1 var(--sans); box-shadow: 0 8px 20px -10px rgba(0,0,0,.45);
  transition: padding .5s var(--ease), transform .3s var(--ease), background .3s; }
.pf-vcard__play::before { content: ""; flex: none; margin-left: .18rem; border-left: .62rem solid currentColor; border-top: .4rem solid transparent; border-bottom: .4rem solid transparent; }
.pf-vcard__play span { max-width: 0; margin-left: 0; overflow: hidden; white-space: nowrap; transition: max-width .5s var(--ease), margin .5s var(--ease); }
.pf-vcard.is-active .pf-vcard__play { --pd: 1.25rem; }
.pf-vcard.is-active .pf-vcard__play::before { margin-left: 0; }
.pf-vcard.is-active .pf-vcard__play span { max-width: 8rem; margin-left: .6rem; }
.pf-vcard__btn:hover .pf-vcard__play { transform: scale(1.04); background: var(--pf-yellow); color: var(--pf-ink); }
/* the film itself, a 9:16 panel on the right of the open card */
.pf-vcard__media { position: absolute; top: 0; right: 0; bottom: 0; width: calc(var(--ch) * .5625); background: #000; opacity: 0; transition: opacity .5s var(--ease); }
.pf-vcard__media img, .pf-vcard__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-vcard.is-active .pf-vcard__media { opacity: 1; }
.pf-vcard__meta { display: grid; gap: .75rem; padding: .3rem .2rem 0; }
.pf-vcard__co { font: 500 clamp(1.3rem, 1.8vw, 1.65rem)/1.15 var(--sans); letter-spacing: -.015em; }
.pf-vcard__title { font: 600 1rem/1.3 var(--sans); color: var(--accent); }
.pf-vcard__who { font: 500 .95rem/1.3 var(--sans); color: rgba(244,241,236,.62); }
.pf-film--yellow { --field: var(--pf-yellow); --on: var(--pf-ink); --chip: var(--pf-ink); --chip-on: var(--pf-paper); --accent: var(--pf-yellow); }
.pf-film--stone { --field: var(--pf-stone); --on: var(--pf-ink); --chip: var(--pf-ink); --chip-on: var(--pf-paper); --accent: var(--pf-yellow); }
.pf-film--paper { --field: var(--pf-paper); --on: var(--pf-ink); --chip: var(--pf-ink); --chip-on: var(--pf-paper); --accent: var(--pf-yellow); }
.pf-lightbox { width: min(92vw, 28rem); max-height: 94vh; padding: 0; border: 0; border-radius: 20px; background: #000; overflow: hidden; }
.pf-lightbox::backdrop { background: rgba(15,15,15,.85); }
.pf-lightbox video { display: block; width: 100%; max-height: calc(94vh - 3.2rem); aspect-ratio: 9 / 16; background: #000; }
.pf-lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .9rem; background: var(--pf-ink); color: var(--paper); font: 500 .85rem/1.3 var(--sans); }
.pf-lightbox__close { padding: .45rem .8rem; border-radius: 999px; border: 1px solid rgba(240,236,232,.3); background: none; color: var(--paper); font: 600 .8rem/1 var(--sans); cursor: pointer; }
.pf-lightbox__close:focus-visible { outline: 2px solid var(--pf-yellow); outline-offset: 2px; }

.pf-film-fallbacks { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 2rem; }
.pf-film-fallbacks a { color: var(--pf-yellow); text-decoration: underline; text-underline-offset: .2em; padding-block: .75rem; }
/* ---------- one big quote on yellow ---------- */
.pf-quote { padding-block: clamp(6.5rem, 12vw, 11rem); background: var(--pf-yellow); color: var(--ink); }
.pf-quote figure { margin: 0 auto; max-width: 62rem; text-align: center; }
.pf-quote blockquote { margin: 0; font: 600 clamp(1.8rem, 3.8vw, 3.3rem)/1.12 var(--sans); letter-spacing: -.03em; text-wrap: balance; }
.pf-quote blockquote p { margin: 0; }
.pf-quote figcaption { margin-top: 2rem; display: inline-flex; align-items: center; gap: .8rem; font: 500 1rem/1.3 var(--sans); }
.pf-quote figcaption b { font-weight: 700; }
.pf-quote__av { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--pf-yellow); font: 700 .85rem/1 var(--sans); }
/* speaker photos in the avatar circles (monogram stays when there is no photo) */
.pf-vcard__av, .pf-quote__av { overflow: hidden; }
.pf-vcard__av img, .pf-quote__av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-vcard__av:has(img) { box-shadow: 0 0 0 2px var(--chip); }
.pf-quote__av:has(img) { width: 3rem; height: 3rem; box-shadow: 0 0 0 2px var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .pf-hero .hq-wrap, .pf-field .hq-wrap, .pf-field--flip .hq-wrap { grid-template-columns: minmax(0, 1fr); }
  .pf-field--flip .pf-field__copy { order: 0; }
}
@media (max-width: 1000px) {
  /* swipe mode: equal cards, the one in view plays full-card; the edge fades until the end, dots track position */
  .pf-films__fit .pf-films__row { --ch: min(36rem, 150vw); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%);
    -webkit-mask: linear-gradient(90deg, #000 calc(100% - 4rem), transparent); mask: linear-gradient(90deg, #000 calc(100% - 4rem), transparent); }
  .pf-films__row::-webkit-scrollbar { display: none; }
  .pf-films__row.at-end { -webkit-mask: none; mask: none; }
  .pf-vcard, .pf-vcard.is-active { width: min(80vw, calc(var(--ch) * .5625)); }
  .pf-vcard__art, .pf-vcard.is-active .pf-vcard__art { width: 100%; }
  .pf-vcard__media, .pf-vcard.is-active .pf-vcard__media { width: 100%; opacity: 0; }
  .pf-vcard.is-playing .pf-vcard__media { opacity: 1; }
  .pf-vcard__play { --pd: 1.25rem; }
  .pf-vcard__play::before { margin-left: 0; }
  .pf-vcard__play span { max-width: 8rem; margin-left: .6rem; }
  .pf-vcard__lbl { display: inline; }
  .pf-films__fit .pf-films__row { padding-bottom: 1rem; }
  .pf-films__dots { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-vcard, .pf-vcard__art, .pf-vcard__mark { transition: none; }
}
