@import url("../arsenal/motif-window.css");

/* Who we help (src\pages\who-we-help.mjs): the lens window, the wall of trades, the six kinds, how customers choose,
   the chat for every other business, the close. Only the tokens of design\system.css. */

/* ---------- header: motif-window as it stands, its window the logo's lens; the main button and its line in a frosted
   box that reads on the paper and over the pictures ---------- */
/* the stage pins just under the site's header bar (not under it): the whole stage shows, and its wide photos cover it by
   its width, so they stay sharp through the piece's start zoom */
.who-hero .motif-window__stage { top: calc(var(--inset) + 64px); height: calc(100vh - var(--inset) - 64px); height: calc(100svh - var(--inset) - 64px); }
.who-hero__stop { position: absolute; z-index: 6; top: 1rem; right: max(var(--gutter), calc((100% - var(--max-w)) / 2)); }
.who-hero__act { display: grid; justify-items: start; padding: 0.9rem 1.1rem 0.95rem; border-radius: var(--radius-m); background: color-mix(in srgb, var(--c-paper) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--c-line); box-shadow: var(--shadow-m); }
.who-hero__act .ticks { margin-top: 0.7rem; }
.who-hero .motif-window__h { font-weight: 700; }

/* ---------- every kind at once: the wall on the paper's measuring grid (the designed ground) ---------- */
.who-every { padding-block: var(--section-y) calc(var(--section-y) * 0.6);
  background: linear-gradient(color-mix(in srgb, var(--c-ink) 6%, transparent) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, color-mix(in srgb, var(--c-ink) 6%, transparent) 1px, transparent 1px) 0 0 / 56px 56px, var(--c-paper); }
.who-every__head { text-align: center; }
.who-every__head .sec-title { max-width: 22ch; margin-inline: auto; text-wrap: balance; }
.who-every__head .sec-line { margin-inline: auto; }
.who-every__stage { position: relative; margin-top: clamp(0.5rem, 1.5vw, 1.5rem); }
.scene.who-every__wall { display: block; width: 100%; height: 460px; }
.who-every__stop { position: absolute; z-index: 4; top: 0.5rem; right: max(var(--gutter), calc((100% - var(--max-w)) / 2)); }

/* ---------- the six kinds: photo cards, each with its "+1" landing in turn (the kit's sequence), and the way in for
   everyone else as a graphite band under them ---------- */
.who-kinds { padding-top: var(--section-y); }
.who-kinds__head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--space-5); margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 3rem); padding-right: 56px; }
.who-kinds__head .sec-line { grid-column: 2; max-width: 22rem; margin: 0; }
.who-kinds__stop { position: absolute; right: 0; bottom: 0; }
.who-kinds__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 1.6vw, 1.5rem); }
.kcard { display: flex; flex-direction: column; border-radius: var(--radius-l); background: var(--c-paper); border: 1px solid var(--c-line); box-shadow: var(--shadow-s); overflow: hidden; }
.kcard__pic { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-paper-alt); }
.kcard__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); }
.kcard__chip { position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 0.5rem; height: 36px; padding: 0 0.9rem 0 0.35rem; border-radius: 999px; background: var(--c-graphite); color: var(--c-on-ink); font: 600 0.9375rem/1 var(--font-ui); white-space: nowrap; box-shadow: var(--shadow-m);
  opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)) scale(calc(0.86 + 0.14 * var(--kit-in, 1))); }
.kcard__chip b { display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 0.45rem; border-radius: 999px; background: var(--c-brand); color: var(--c-on-brand); font: 600 0.8125rem/1 var(--font-mono); }
.kcard__chip--tl { top: 0.85rem; left: 0.85rem; transform-origin: 0 0; }
.kcard__chip--tr { top: 0.85rem; right: 0.85rem; transform-origin: 100% 0; }
.kcard__chip--bl { bottom: 0.85rem; left: 0.85rem; transform-origin: 0 100%; }
.kcard__chip--br { bottom: 0.85rem; right: 0.85rem; transform-origin: 100% 100%; }
.kcard__body { display: grid; gap: 0.35rem; padding: 1.15rem 1.25rem 1.3rem; }
.kcard__name { margin: 0; font: 600 1.3rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.kcard__fields { margin: 0; font: 500 0.8125rem/1.45 var(--font-mono); color: var(--c-brand-text); }
.kcard__line { margin: 0.2rem 0 0; color: var(--c-ink-soft); }
.kcard--more { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 0.4rem clamp(0.5rem, 2vw, 1.5rem); background: var(--c-graphite); border-color: var(--c-graphite); color: var(--c-on-ink);
  background-image: linear-gradient(var(--c-ink-line) 1px, transparent 1px), linear-gradient(90deg, var(--c-ink-line) 1px, transparent 1px); background-size: 56px 56px; }
.kcard--more .kcard__name { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); color: var(--c-on-ink); }
.kcard--more .kcard__line { color: var(--c-on-ink-soft); font-size: var(--fs-body); }
.kcard__go { display: grid; justify-items: end; padding: 1.2rem 0.75rem; }
.kcard__go .ticks { color: var(--c-on-ink-soft); }
.kcard__go .ticks li::before { background: var(--c-brand-on-ink); }

/* ---------- how they choose: three-buyers on the graphite card with the measuring grid ---------- */
.who-buy { padding: var(--section-y) var(--inset) 0; }
.who-buy__card { position: relative; max-width: calc(var(--max-w) + 2 * var(--inset)); margin-inline: auto; padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--gutter) clamp(2.5rem, 1.5rem + 3vw, 4rem); border-radius: var(--radius-l); color: var(--c-on-ink);
  background: radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--c-brand) 10%, transparent), transparent 70%), linear-gradient(var(--c-ink-line) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, var(--c-ink-line) 1px, transparent 1px) 0 0 / 56px 56px, var(--c-graphite); }
.who-buy__head { max-width: 40rem; margin: 0 auto clamp(2rem, 1.4rem + 2vw, 3rem); text-align: center; }
.who-buy__head .sec-title { color: var(--c-on-ink); }
.who-buy__head .sec-line { color: var(--c-on-ink-soft); margin-inline: auto; }
.who-buy__stage { position: relative; max-width: 1100px; margin-inline: auto; }
.scene.who-buy__scene { display: block; height: 460px; background: none; }
.who-buy__stop { position: absolute; z-index: 2; top: -3.4rem; right: 0; }

/* ---------- any other business: the words at the left, the groomer at the right, the chat in glass over the wall
   above the tub (her face and the dog's clear at the right and the foot) ---------- */
.who-any { padding-top: var(--section-y); }
.who-any__in { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: center; }
.who-any__go { margin-top: 1.6rem; }
.who-any__frame { position: relative; height: 600px; border-radius: var(--radius-l); overflow: hidden; background: var(--c-graphite); box-shadow: var(--shadow-l); }
.who-any__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 50%; }
.who-any__stop { position: absolute; z-index: 3; top: 1rem; right: 1rem; }
.who-any__chat { position: absolute; z-index: 2; left: 1.25rem; top: 1.25rem; width: min(280px, 44%); padding: 0.85rem 0.85rem 1rem; border-radius: var(--radius-l); background: color-mix(in srgb, var(--c-paper) 30%, transparent); border: 1px solid color-mix(in srgb, var(--c-paper) 55%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: var(--shadow-l); }
.who-any__head { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.15rem 0.7rem; margin-bottom: 0.7rem; border-bottom: 1px solid color-mix(in srgb, var(--c-ink) 10%, transparent); }
.who-any__head svg { flex: none; width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--c-graphite); color: var(--c-brand); box-sizing: border-box; }
.who-any__head span { display: grid; line-height: 1.2; }
.who-any__head b { font: 600 0.9375rem/1.2 var(--font-ui); }
.who-any__head small { font-size: 0.8125rem; color: var(--c-ink-soft); }
/* a chat window of fixed height, its newest messages at its foot (the older ones leave at its top, as a phone's chat
   shows them): the card ends above the dog's head */
.who-any__msgs { display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; height: 268px; overflow: hidden; font-size: 0.9375rem; line-height: 1.35; }
.who-any .msg { max-width: 90%; margin: 0; padding: 8px 11px; border-radius: 14px; opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)); box-sizing: border-box; }
.who-any .msg--in { align-self: flex-start; background: var(--c-paper); border-bottom-left-radius: 5px; box-shadow: var(--shadow-s); }
.who-any .msg--out { align-self: flex-end; background: var(--c-graphite); color: var(--c-on-ink); border-bottom-right-radius: 5px; }
.who-any .msg--chips { display: flex; gap: 6px; align-self: flex-start; padding: 0; background: none; }
.who-any .msg--chips span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-paper); font: 500 0.8125rem/1.3 var(--font-mono); }
.who-any .msg--chips span[data-kit-on] { background: var(--c-graphite); border-color: var(--c-graphite); color: var(--c-on-ink); }
.who-any .msg--typing { display: flex; gap: 4px; align-self: flex-start; padding: 11px 13px; background: var(--c-paper); box-shadow: var(--shadow-s); }
.who-any .msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-ink-soft); }
.who-any .msg--check { display: grid; gap: 7px; width: 90%; }
.who-any .msg__bar { position: relative; display: block; height: 6px; border-radius: 6px; background: var(--c-line); overflow: hidden; }
.who-any .msg__bar::after { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--kit-fill, 0)); background: var(--c-brand-text); border-radius: 6px; }
.who-any .msg--done { display: inline-flex; align-items: center; gap: 0.45rem; align-self: flex-start; background: var(--c-brand); color: var(--c-on-brand); font-weight: 600; border-bottom-left-radius: 5px; }
@media (prefers-reduced-motion: no-preference) {
  .who-any .msg--typing i { animation: who-dot 1s var(--ease-in-out) infinite; }
  .who-any .msg--typing i:nth-child(2) { animation-delay: 0.15s; }
  .who-any .msg--typing i:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes who-dot { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-3px); opacity: 1; } }

@media (max-width: 1023px) {
  .who-kinds__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kcard--more { flex-direction: column; align-items: flex-start; padding: 1.3rem 1.25rem; }
  .kcard__go { justify-items: start; padding: 0.5rem 0 0; }
}
@media (max-width: 899px) {
  .who-any__in { grid-template-columns: 1fr; }
  .who-kinds__head { grid-template-columns: 1fr; padding-right: 52px; }
  .who-kinds__head .sec-line { grid-column: 1; margin-top: 0.6rem; }
  .scene.who-buy__scene { height: auto; min-height: 800px; }
}
@media (max-width: 759px) {
  .scene.who-every__wall { height: 340px; }
  /* the kinds: a sideways row, one card and the edge of the next in view */
  .who-kinds__grid { display: flex; gap: 0.85rem; margin-inline: calc(var(--gutter) * -1); padding: 0.25rem var(--gutter) 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .who-kinds__grid::-webkit-scrollbar { display: none; }
  .kcard { flex: 0 0 84%; scroll-snap-align: start; }
  .kcard--more { flex: 0 0 84%; justify-content: center; }
  /* a tall frame puts her face and the dog's below the wall; the chat is a short window there, its newest messages
     at its foot, as a phone's chat shows them */
  .who-any__frame { height: 740px; }
  .who-any__photo { object-position: 74% 50%; }
  .who-any__chat { left: 0.85rem; right: 0.85rem; top: 0.75rem; width: auto; }
  .who-any__msgs { height: 160px; }
}
