/* How it works (plan.md "How it works"): Studio Nine Flowers from a free call to a running system. The header's
   footage with its tracker, the three steps (your part in silver, ours in cyan), the questions and the close. */

/* #top: the florist on her call, full bleed, her face on the left (30 to 45% across); the words and the form box in
   the right column; the tracker (scene hiwline) at the foot on her side */
.hiw-top { position: relative; min-height: min(calc(100svh - var(--header-h)), 960px); background: var(--c-ink); isolation: isolate; scroll-margin-top: var(--header-h); }
.hiw-top__stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--c-ink); scroll-margin-top: var(--header-h); }
.hiw-top__slides { position: absolute; inset: 0; }
/* the kit's header that changes its picture (kit.md), as it gives it */
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; }
[data-kit-scene="rotate"] [data-kit-slide] video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
.hiw-top__slide video, .hiw-top__slide .kit-first { object-position: 50% 40%; }
/* The second clip, the florist and her colleague at the work table: their faces sit at 34-63% across it, so on the
   computer it is drawn larger from its right edge (1.28 times; 1.22 beside the narrower column), both faces left of
   the words and the form box. */
.hiw-top__slide--table video { object-position: 100% 40%; transform: scale(1.28); transform-origin: 100% 35%; }
/* one still grade over the slides: dark toward the words on the right and under the tracker, her face clear */
.hiw-top__stage::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(270deg, rgba(0, 0, 0, .84) 0%, rgba(0, 0, 0, .66) 30%, rgba(0, 0, 0, .2) 46%, rgba(0, 0, 0, 0) 56%), linear-gradient(0deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 32%), linear-gradient(180deg, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, 0) 18%); }
.hiw-top__line { position: absolute; z-index: 4; left: max(var(--gutter), calc((100% - var(--max-w)) / 2)); bottom: clamp(20px, 4.5svh, 44px); width: min(620px, calc(50% - var(--gutter) - 24px)); }
.hiw-top__stop { position: absolute; z-index: 6; right: max(var(--gutter), calc((100% - var(--max-w)) / 2)); top: 18px; }
.hiw-top__in { position: relative; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); align-content: center; row-gap: clamp(16px, 2.6svh, 26px); box-sizing: border-box; min-height: inherit; padding-block: clamp(22px, 4svh, 52px); pointer-events: none; }
.hiw-top__in > * { grid-column: 2; pointer-events: auto; }
.hiw-top__title { margin: 0; font-size: clamp(2.3rem, 1.1rem + 2.7vw, 3.7rem); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.hiw-top__lead { max-width: 500px; margin: clamp(10px, 1.6svh, 16px) 0 0; font-size: var(--fs-lead); line-height: 1.5; color: rgba(246, 251, 253, .9); text-wrap: pretty; }
@media (min-width: 1001px) and (max-height: 820px) {
  .hiw-top__form.formbox { padding: 18px 20px; }
  .hiw-top__form .tile { min-height: 62px; padding-block: 6px; }
  .hiw-top__form .tile__pic { height: 46px; }
  .hiw-top__form .formbox__q { margin-bottom: 10px; }
  .hiw-top__form .formbox__note { margin-top: 10px; }
  .hiw-top__title { font-size: clamp(2.2rem, 1rem + 2.5vw, 3.3rem); }
}
@media (max-width: 1279px) and (min-width: 1001px) { .hiw-top__in { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); } .hiw-top__slide--table video { transform: scale(1.22); } }
@media (max-width: 1000px) {
  .hiw-top { display: flex; flex-direction: column; min-height: 0; }
  .hiw-top__in { display: contents; }
  .hiw-top__words { order: 1; padding: 22px var(--gutter) 20px; }
  .hiw-top__title { font-size: clamp(2rem, 1.2rem + 4vw, 2.9rem); }
  .hiw-top__lead { font-size: 1.04rem; }
  .hiw-top__stage { order: 2; position: relative; inset: auto; height: clamp(524px, 134vw, 660px); }
  .hiw-top__stage::after { background: linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, .55) 100%); }
  .hiw-top__slide video, .hiw-top__slide .kit-first { object-position: 40% 50%; }
  .hiw-top__slide--table video { object-position: 50% 50%; transform: scale(1.1); transform-origin: 50% 100%; } /* the seated florist's face a little higher, clear of the tracker */
  .hiw-top__line { left: 16px; right: 16px; bottom: 16px; width: auto; }
  .hiw-top__stop { top: 14px; right: 14px; }
  .hiw-top__form { order: 3; width: auto; max-width: 560px; margin: 20px var(--gutter) 30px; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .hiw-top__line { right: auto; left: 24px; bottom: 24px; width: 600px; }
  .hiw-top__form { align-self: center; width: calc(100% - 2 * var(--gutter)); margin-inline: 0; }
}

/* #call: step 1, your part: the shop owner at her counter, the two silver cards (scene hiwcall) over the left */
.hiw-call__stage { height: clamp(520px, 46vw, 640px); }
.hiw-call .stage__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 30%; }
.hiw-call__scene { position: absolute; inset: 0; z-index: 2; }
.hiw-call__stop { position: absolute; z-index: 3; top: 14px; right: 14px; }
@media (max-width: 1100px) { .hiw-call .stage__media img { object-position: 70% 30%; } }
@media (max-width: 760px) { .hiw-call__stage { height: 580px; } .hiw-call .stage__media img { object-position: 82% 30%; } }

/* #report: step 2, ours: the tablet on its white table, drawn large in a portrait stage (the photo in a zoom box),
   the shop's site and the report's marks on its screen (scene hiwreport), the dashboard card over the table */
.hiw-rep__grid { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); align-items: center; column-gap: clamp(36px, 5.5vw, 88px); }
.hiw-rep__stage { position: relative; height: 720px; overflow: clip; scroll-margin-top: calc(var(--header-h) + 16px); }
.hiw-rep__zoom { position: absolute; left: calc(50% - 317px); top: -208px; width: 640px; aspect-ratio: 4128 / 6192; }
.hiw-rep__photo { position: absolute; inset: 0; margin: 0; }
.hiw-rep__photo > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.hiw-rep__photo .screen { box-sizing: border-box; padding: 2px; background: var(--c-white) content-box; }
.hiw-rep__photo .screen > [data-scene] { position: absolute; inset: 0; }
.hiw-rep__over { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hiw-rep__over .hrd { left: calc(50% - 20px); top: 552px; width: 300px; }
.hiw-rep__tab, .hiw-run__tab { position: absolute; z-index: 3; left: 16px; top: 16px; display: flex; align-items: center; gap: 8px; height: 32px; margin: 0; padding: 0 14px; border-radius: var(--radius-pill); background: var(--glass-strong); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); box-shadow: inset 0 1px 0 var(--glass-edge), var(--glow-soft); font: 700 var(--fs-micro)/1 var(--font-ui); color: var(--c-paper); white-space: nowrap; }
.hiw-rep__tab::before, .hiw-run__tab::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-brand); box-shadow: 0 0 8px rgba(2, 228, 255, .7); }
.hiw-rep__stop { position: absolute; z-index: 3; top: 14px; right: 14px; }
@media (max-width: 1100px) {
  .hiw-rep__grid { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .hiw-rep__head { order: -1; }
  .hiw-rep__stage { width: 100%; max-width: 600px; justify-self: center; }
}
@media (max-width: 600px) {
  .hiw-rep__stage { height: 640px; }
  .hiw-rep__zoom { left: calc(50% - 312px); top: -229px; width: 630px; }
  .hiw-rep__over .hrd { left: 16px; right: 16px; top: 548px; width: auto; }
}

/* #run: step 3, ours: the phone held at 45° in its photo, turned upright in a portrait frame (the photo in cqw, turned
   about the phone's centre: 3100, 1862 of 5760x3840), the shop's week on its screen (scene hiwrun) */
.hiw-run__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: center; column-gap: clamp(36px, 6vw, 96px); }
.hiw-run__frame { position: relative; overflow: hidden; container-type: inline-size; width: 100%; aspect-ratio: 1900 / 3300; border-radius: var(--radius-l); background: var(--c-ink-soft); box-shadow: var(--glow-soft), var(--shadow-l); isolation: isolate; scroll-margin-top: calc(var(--header-h) + 16px); }
.hiw-run__pz { position: absolute; left: -113.16cqw; top: -11.16cqw; width: 303.16cqw; aspect-ratio: 3 / 2; transform-origin: 53.82% 48.49%; transform: rotate(-45deg); }
.hiw-run__photo { position: absolute; inset: 0; margin: 0; }
.hiw-run__photo > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.hiw-run__photo .screen { box-sizing: border-box; padding: 2px; background: var(--c-white) content-box; border-radius: 26px; }
.hiw-run__photo .screen > [data-scene] { position: absolute; inset: 0; }
.hiw-run__stop { position: absolute; z-index: 3; top: 14px; right: 14px; }
@media (max-width: 1100px) {
  .hiw-run__grid { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .hiw-run__frame { width: min(100%, 400px); justify-self: center; }
}
@media (max-width: 600px) {
  .hiw-run__frame { width: min(100%, 340px); aspect-ratio: 1500 / 3300; }
  .hiw-run__pz { left: -156.67cqw; top: -14.13cqw; width: 384cqw; }
}

/* #close: a nursery owner potting plants in his greenhouse, the camera still. His face stays at about 72% across in the
   upper half, so the booked call's card stands top left over the greenhouse wall; on the phone the stage turns 4:5
   around him and the card stands at its foot, over the bench, the stop icon alone at the top */
.hiw-close .close__clip video { object-position: 0% 40%; }
.hiw-close .close__card { top: 14px; bottom: auto; left: 14px; right: auto; transform: none; }
@media (min-width: 601px) and (max-width: 1279px) { .hiw-close .close__card { width: min(290px, 62%); } }
@media (max-width: 600px) {
  .hiw-close .close__clip { aspect-ratio: 4 / 5; }
  .hiw-close .close__clip video { object-position: 86% 50%; }
  .hiw-close .close__card { top: auto; bottom: 14px; left: 14px; right: 14px; width: auto; }
}
