/* Who we help: a florist, a family solicitor and a heating engineer each read it as theirs. Tokens of system.css only.
   Every card that stands on a photo on the computer stays at least half on it at every width, below the faces. */

/* Every scene's place: the runtime's own rules make a scene's box relative, so its place here keeps the absolute
   position that gives it its size. */
.street__scene, .buyers__scene { position: absolute !important; inset: 0; }

/* The header: the words centred on paper, three arches like a row of doorways, a booking landing in each in turn */
.who-hero { padding-block: var(--space-5) var(--section-y); overflow-x: clip; }
.who-hero__in { display: grid; justify-items: center; gap: var(--space-5); text-align: center; }
.who-hero__words { display: grid; justify-items: center; gap: var(--space-3); max-width: 52rem; }
.who-hero__line { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem); line-height: 1.5; color: var(--c-ink-soft); text-wrap: pretty; }
.who-hero__go { display: grid; justify-items: center; gap: var(--space-2); margin-top: var(--space-1); }
.who-hero__row { --aw: clamp(200px, 17.4vw, 250px); position: relative; display: grid; grid-template-columns: repeat(3, var(--aw)); justify-content: center; align-items: end; gap: clamp(28px, 2.6vw, 40px); }
.who-hero__sun { position: absolute; z-index: 0; left: 50%; top: calc(var(--aw) * -0.12); width: calc(var(--aw) * 3); max-width: none; translate: -50% 0; opacity: 0.5; pointer-events: none; }
.who-hero__stop { top: 0; right: -60px; }
.who-arch { position: relative; z-index: 1; margin: 0; aspect-ratio: 5 / 7; }
.who-arch--2 { aspect-ratio: 5 / 7.6; }
.who-arch__pic { position: absolute; inset: 0; overflow: hidden; border-radius: 50% 50% var(--radius-m) var(--radius-m) / 35.72% 35.72% var(--radius-m) var(--radius-m); background: var(--c-paper-alt); box-shadow: var(--shadow-l); }
.who-arch--2 .who-arch__pic { border-radius: 50% 50% var(--radius-m) var(--radius-m) / 32.9% 32.9% var(--radius-m) var(--radius-m); }
.who-arch__pic img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.who-arch--1 img { object-position: 76% 50%; }
.who-arch--2 img { object-position: 54% 50%; }
.who-arch--3 img { object-position: 62% 40%; }
.whocard { position: absolute; z-index: 2; left: -12px; right: -12px; bottom: 10px; display: flex; align-items: center; gap: 0.65rem; box-sizing: border-box; margin: 0; padding: 0.7rem 0.8rem; background: var(--c-card); border-radius: 18px; box-shadow: var(--shadow-m); text-align: left; opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 14px)); }
.whocard__tick { flex: none; position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--c-accent); }
.whocard__tick::after { content: ""; position: absolute; left: 10px; top: 10px; width: 13px; height: 7px; border-left: 3px solid var(--c-ink); border-bottom: 3px solid var(--c-ink); transform: rotate(-45deg); }
.whocard__text { display: grid; line-height: 1.3; font-size: var(--fs-small); color: var(--c-ink-soft); }
.whocard__text b { font-size: 1rem; font-weight: 800; color: var(--c-ink); }
.whocard__hum { position: absolute; right: 10px; top: -32px; width: 38px; --hum-off: calc((1 - var(--kit-in, 1)) * 100); }

/* The street: the scene's own sky and pavement fill the part */
.street { padding-top: var(--section-y); }
.street__head { margin-bottom: var(--space-3); }
.street__stage { position: relative; height: 490px; }
.street__stop { top: 16px; right: var(--gutter); }
@media (max-width: 820px) { .street__stop { top: 100px; } }
@media (max-width: 599.98px) { .street__stage { height: 520px; } }

/* The kinds: the kit's tour, the tabs in a column beside one big photo; one new customer's card on each */
.kinds__tour { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.kinds__tabs { display: grid; gap: 4px; }
.kinds__tab { position: relative; display: grid; gap: 4px; overflow: hidden; padding: 0.85rem 1rem; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; }
.kinds__tab b { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; color: var(--c-brand-dark); }
.kinds__tab span { display: none; font-size: var(--fs-small); line-height: 1.4; color: var(--c-ink-soft); }
.kinds__tab:hover { background: color-mix(in srgb, var(--c-card) 70%, transparent); }
.kinds__tab[aria-selected="true"] { background: var(--c-card); box-shadow: var(--shadow-s); }
.kinds__tab[aria-selected="true"] span { display: block; }
.kinds__fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--c-brand); }
.kinds__tab[aria-selected="true"] .kinds__fill { width: calc(var(--kit-fill, 0) * 100%); }
.kinds__panels { position: relative; }
.kinds__frame { aspect-ratio: 3 / 2; margin: 0; }
.kinds__frame > img { object-position: 50% 40%; }
.kinds__panel--1 .kinds__frame > img { object-position: 40% 30%; }
.kinds__panel--4 .kinds__frame > img { object-position: 50% 30%; }
.kinds__panel--7 .kinds__frame > img { object-position: 45% 30%; }
.kinds__stop { top: 14px; right: 14px; }
.kinds__stop .stop__play { display: none; }
.kinds__stop[aria-pressed="true"] .stop__play { display: inline; }
.kinds__stop[aria-pressed="true"] .stop__pause { display: none; }
.kcard { position: absolute; z-index: 2; bottom: 18px; display: grid; gap: 6px; box-sizing: border-box; width: min(44%, 340px); margin: 0; padding: 0.9rem 1rem 1rem; background: var(--c-card); border-radius: 20px; box-shadow: var(--shadow-l); color: var(--c-ink); text-decoration: none; }
.kcard--l { left: 18px; }
.kcard--r { right: 18px; }
.kcard__head { display: flex; align-items: center; gap: 0.55rem; }
.kcard__head b { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; color: var(--c-brand-dark); }
.kcard__tick { flex: none; position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--c-accent); }
.kcard__tick::after { content: ""; position: absolute; left: 8px; top: 8px; width: 11px; height: 6px; border-left: 2.5px solid var(--c-ink); border-bottom: 2.5px solid var(--c-ink); transform: rotate(-45deg); }
.kcard__text { position: relative; display: block; font-weight: 700; line-height: 1.4; opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)); }
.kcard__hum { position: absolute; right: -8px; top: -62px; width: 38px; --hum-off: calc((1 - var(--kit-in, 1)) * 100); }
.kcard--go { padding-right: 3rem; }
.kcard__arrow { position: absolute; right: -2rem; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: var(--c-brand); }
.kcard__arrow::after { content: ""; position: absolute; left: 8px; top: 10px; width: 8px; height: 8px; border-top: 2.5px solid var(--c-ink); border-right: 2.5px solid var(--c-ink); transform: rotate(45deg); }
.kcard--go:hover { box-shadow: var(--shadow-l), 0 0 0 3px var(--c-brand); }

/* However they buy: three-buyers on Oat */
.buyers__stage { position: relative; max-width: 1100px; height: 470px; margin-inline: auto; }
.buyers__stop { top: -56px; right: 0; }

/* Anyone else: the bike mechanic at work, the chat over the tool wall reading his website */
.anyway__frame { aspect-ratio: 2 / 1; }
.anyway__pic { position: absolute; inset: 0; overflow: hidden; }
.anyway__pic img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 60% 40%; }
.anyway__stop { top: 16px; right: 16px; }
.anyway__chat { position: absolute; z-index: 2; left: 24px; bottom: 24px; display: flex; flex-direction: column; box-sizing: border-box; width: min(40%, 390px); height: min(calc(100% - 48px), 450px); overflow: hidden; background: var(--c-card); border-radius: var(--radius-m); box-shadow: var(--shadow-l); }
/* The chat's own head, then its messages from the top; once they fill it, the newest stays in view and the oldest
   slip away under the head (the auto margin holds them at the top only while there is room) */
.ch-head { flex: none; display: flex; align-items: center; gap: 0.65rem; padding: 14px 16px; border-bottom: 1.5px solid var(--c-line); }
.ch-head__mark { flex: none; box-sizing: border-box; width: 36px; height: 36px; padding: 6px; border-radius: 50%; background: var(--c-brand-light); fill: var(--c-brand-dark); }
.ch-head__text { display: grid; line-height: 1.25; }
.ch-head__text b { font-weight: 800; color: var(--c-ink); }
.ch-head__text span { font-size: var(--fs-small); color: var(--c-ink-soft); }
.ch-list { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 14px 16px 16px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px); mask-image: linear-gradient(to bottom, transparent 0, #000 14px); }
.ch-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: auto; }
.ch { position: relative; max-width: 86%; margin: 0; padding: 0.6rem 0.85rem; border-radius: 16px; font-size: var(--fs-small); line-height: 1.4; opacity: calc(var(--kit-in, 1) * (1 - var(--kit-out, 0))); transform: translateY(calc((1 - var(--kit-in, 1)) * 8px)); }
.ch--first { opacity: var(--kit-in, 1); }
.ch--them { align-self: flex-start; background: var(--c-paper-alt); color: var(--c-ink); border-bottom-left-radius: 6px; }
.ch--me { align-self: flex-end; background: var(--c-brand); color: var(--c-on-brand); font-weight: 800; border-bottom-right-radius: 6px; }
.ch p { margin: 0; }
.ch--typing { display: flex; gap: 5px; padding-block: 0.85rem; }
.ch--typing[hidden] { display: none; }
.ch--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-ink-soft); animation: ch-dot 1s ease-in-out infinite; }
.ch--typing i:nth-child(2) { animation-delay: 0.15s; }
.ch--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ch-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ch--typing i { animation: none; } }
.ch__site { display: grid; gap: 2px; margin-top: 8px; padding: 0.55rem 0.7rem; border-radius: 12px; background: var(--c-card); box-shadow: inset 0 0 0 1.5px var(--c-line); }
.ch__site b { font-weight: 800; color: var(--c-brand-dark); }
.ch__site span { color: var(--c-ink-soft); }
.ch__hum { position: absolute; right: -40px; top: -6px; width: 32px; --hum-off: calc((1 - var(--kit-in, 1)) * 100); }

/* The close: the handshake played once, the words narrow enough to keep clear of her face */
.who-close .close__ground video { object-position: 60% 45%; }
.who-close .close__words { max-width: 27rem; }

/* Narrower screens */
@media (max-width: 1100px) {
  .kinds__tour { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: var(--space-3); }
  .kinds__frame { aspect-ratio: 4 / 3; }
  .kcard { width: min(56%, 340px); }
  .anyway__frame { aspect-ratio: 4 / 3; }
  .anyway__chat { width: min(48%, 380px); }
}
@media (max-width: 760px) {
  /* The header: the three arches in a row, the middle one larger; the cards one at a time under them */
  .who-hero__row { --aw: 100%; width: 100%; grid-template-columns: 1fr 1.45fr 1fr; gap: 10px; padding-bottom: 92px; }
  .who-hero__sun { top: -22%; width: 130%; }
  .who-hero__stop { top: auto; bottom: 100px; right: 0; }
  .who-arch, .who-arch--2 { position: static; aspect-ratio: auto; }
  .who-arch__pic { position: relative; inset: auto; aspect-ratio: 5 / 7; }
  .who-arch--2 .who-arch__pic { aspect-ratio: 5 / 7.2; border-radius: 50% 50% var(--radius-m) var(--radius-m) / 34.7% 34.7% var(--radius-m) var(--radius-m); }
  /* one slot for the three: each new booking rises whole from the slot's foot over the one before, and they sink
     back the same way, so two cards' words never show through each other */
  .whocard { left: 0; right: 0; bottom: 0; min-height: 76px; opacity: clamp(0, calc(var(--kit-in, 1) * 6), 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 100%)); clip-path: inset(-44px -30px calc((1 - var(--kit-in, 1)) * (100% + 30px) - 30px) -30px); }
  /* The kinds: the tabs as chips over the photo */
  .kinds__tour { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .kinds__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
  .kinds__tab { padding: 0.55rem 0.9rem; border-radius: 999px; background: var(--c-card); box-shadow: var(--shadow-s); }
  .kinds__tab b { font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 800; color: var(--c-ink); }
  .kinds__tab[aria-selected="true"] { background: var(--c-brand); }
  .kinds__tab[aria-selected="true"] span { display: none; }
  .kinds__frame { aspect-ratio: 4 / 5; }
  .kcard, .kcard--l, .kcard--r { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .kinds__stop { top: 12px; right: 12px; }
  /* However they buy: one column; its stop icon in its top corner, so both fit one view */
  .buyers__stage { height: 800px; }
  .buyers__stop { top: 8px; right: 8px; }
  /* Anyone else: the photo at a set height, the chat over its foot, below his face */
  .anyway__frame { --ph: 300px; --sh: 350px; aspect-ratio: auto; height: calc(var(--ph) + var(--sh) * 0.5); background: var(--c-paper-alt); }
  .anyway__pic { inset: 0 0 auto 0; height: var(--ph); }
  .anyway__pic img { object-position: 64% 30%; }
  .anyway__chat { top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; height: var(--sh); }
  .anyway__stop { top: 12px; right: 12px; }
}
@media (max-width: 640px) {
  .who-close .close__ground video { object-position: 52% 40%; }
}
