/* =========================================================================
   HYBRID SHOT: a real product screenshot under live HTML callouts.
   Markup: components.js hybridShot() / hsStepper(); data: build-template.mjs.
   Loaded only by pages that hold a graphic ([slug]/page.tsx).

   - The image sits in a crop viewport (.hs-view, aspect-ratio from the crop);
     --iw/--il/--it place it inside. Below 768px the phone crop (--miw…) wins.
   - Callouts are one ordered list (.hs-notes): on a wide screen each sits on
     the image next to its point (--px/--py) with a dot and a short leader; on
     a phone they stack under the image as a numbered list, and numbers mark
     the points on the image instead.
   - Revealed one after another when the figure scrolls in (.hs.in, chrome.js
     adds .in to every .reveal). Nothing moves under prefers-reduced-motion.
   ========================================================================= */

.hs { margin: 0; position: relative; width: 100%; justify-self: stretch; --hs-r: 14px; }
.hs-stage { position: relative; }

/* brand glow behind the frame */
.hs-glow {
  position: absolute; z-index: 0; inset: 10% -4% -6% 6%; border-radius: 48px; pointer-events: none;
  background:
    radial-gradient(60% 60% at 20% 30%, rgba(59,130,246,0.55), transparent 70%),
    radial-gradient(55% 55% at 80% 70%, rgba(139,92,246,0.45), transparent 70%),
    radial-gradient(45% 45% at 70% 20%, rgba(6,182,212,0.40), transparent 70%);
  filter: blur(42px); opacity: 0.7;
}
[data-theme="light"] .hs-glow { opacity: 0.45; }

/* .hs-frame is a plain wrapper (the callouts are positioned against it); the
   visible frame is the image's own box, so a phone's stacked callouts sit
   under the picture, not inside it */
.hs-frame { position: relative; z-index: 1; }
.hs-view {
  position: relative; aspect-ratio: var(--arpx);
  border-radius: var(--hs-r); background: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.05);
}
[data-theme="light"] .hs-view {
  border-color: rgba(11,15,26,0.10);
  box-shadow: 0 40px 80px -44px rgba(30,58,138,0.55), 0 2px 6px rgba(30,58,138,0.06);
}
.hs-clip { position: absolute; inset: 0; overflow: hidden; border-radius: var(--hs-r); }
.hs-clip picture { display: contents; }
/* .hs .hs-img outranks the site's .t-frame img (width/height 100%, cover) */
.hs .hs-img {
  position: absolute; z-index: auto; display: block; max-width: none; height: auto; object-fit: fill;
  border-radius: 0; box-shadow: none;
  width: var(--iw); left: var(--il); top: var(--it);
}

/* "Demo data" corner tag: the people in every screenshot are invented */
.hs-tag {
  position: absolute; z-index: 2; right: 10px; top: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em; line-height: 1;
  padding: 5px 8px; border-radius: 999px;
  color: #2B3344; background: rgba(255,255,255,0.88); border: 1px solid rgba(11,15,26,0.10);
}

/* the hero runs off the right edge, and some screenshots have their callouts top
   right: there the tag sits bottom left */
.hs--hero .hs-tag, .hs-tag.hs-tag--bl { right: auto; top: auto; left: 12px; bottom: 12px; }
/* top-left, for a screen whose top-right corner holds words (the reminder text) */
.hs-tag.hs-tag--tl { right: auto; left: 12px; }

/* the element a callout points at */
.hs-hit {
  position: absolute; z-index: 2; pointer-events: none;
  left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.95), 0 0 0 7px rgba(59,130,246,0.18);
  opacity: 0; transition: opacity .45s ease; transition-delay: calc(var(--i) * 220ms + 260ms);
}
.hs-hit--quiet { box-shadow: none; }
.hs-hit::after { content: none; }
.hs.in .hs-hit { opacity: 1; }

/* the callouts */
.hs-notes { list-style: none; margin: 0; padding: 0; }
.hs-note { position: absolute; z-index: 3; left: var(--px); top: var(--py); width: 0; height: 0; }
.hs-dot {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: #2563EB; box-shadow: 0 0 0 3px #fff, 0 0 0 9px rgba(59,130,246,0.25);
  opacity: 0; transform: scale(.4); transition: opacity .35s ease, transform .45s cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--i) * 220ms + 260ms);
}
.hs-card {
  position: absolute; display: flex; gap: 10px; align-items: flex-start;
  width: max-content; max-width: 250px; padding: 11px 14px 12px; border-radius: 14px;
  color: #F5F7FB; text-align: left;
  background: rgba(15,21,37,0.84);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  opacity: 0; transition: opacity .45s ease, translate .55s cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--i) * 220ms + 340ms);
}
[data-theme="light"] .hs-card {
  color: #0B0F1A; background: rgba(255,255,255,0.82);
  border-color: rgba(255,255,255,0.9);
  box-shadow: 0 20px 44px -18px rgba(30,58,138,0.45), 0 0 0 1px rgba(11,15,26,0.06);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hs-card { background: rgba(15,21,37,0.96); }
  [data-theme="light"] .hs-card { background: rgba(255,255,255,0.97); }
}
/* a short leader from the dot to the card */
.hs-card::before {
  content: ""; position: absolute; background: rgba(37,99,235,0.9);
}
.hs-num {
  flex: none; display: none; width: 20px; height: 20px; border-radius: 50%;
  font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center;
  color: #fff; background: #2563EB;
}
.hs-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hs-t { font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
.hs-s { font-size: 12.5px; line-height: 1.35; color: rgba(245,247,251,0.78); }
[data-theme="light"] .hs-s { color: #2B3344; }

/* where the card sits relative to its point */
.hs-note--right .hs-card { left: 22px; top: 0; transform: translateY(-50%); translate: -8px 0; }
.hs-note--right .hs-card::before { left: -16px; top: 50%; width: 14px; height: 2px; }
.hs-note--left .hs-card { right: 22px; top: 0; transform: translateY(-50%); translate: 8px 0; }
.hs-note--left .hs-card::before { right: -16px; top: 50%; width: 14px; height: 2px; }
.hs-note--top .hs-card { left: 0; bottom: 22px; transform: translateX(-50%); translate: 0 8px; }
.hs-note--top .hs-card::before { bottom: -16px; left: 50%; width: 2px; height: 14px; }
.hs-note--bottom .hs-card { left: 0; top: 22px; transform: translateX(-50%); translate: 0 -8px; }
.hs-note--bottom .hs-card::before { top: -16px; left: 50%; width: 2px; height: 14px; }
.hs.in .hs-card { opacity: 1; translate: 0 0; }
.hs.in .hs-dot { opacity: 1; transform: none; }

/* ---- patterns ---- */
/* hero: larger than its column, running off the page's right edge */
.hs--hero .hs-stage { width: 138%; }
.hs--hero .hs-frame { --hs-r: 18px; }
/* card inset (a detail panel's media slot) */
/* .t-frame centres its child (place-items: center), and Chrome now honours that
   in block layout too, which shrinks a block child to fit its content (here: the
   absolutely placed image, i.e. nothing). Reset it, and make the figure fill. */
.t-frame.t-frame--shot { display: block; place-items: normal; height: auto !important; min-height: 0; aspect-ratio: auto !important; background: none; border: 0; box-shadow: none; overflow: visible; padding: 0; border-radius: 0; }
.t-frame.t-frame--shot::before, .t-frame.t-frame--shot::after { content: none; }
.res-detail .t-frame--shot { margin: 6px 0 30px; }
/* an inset frame over the main frame's bottom-right corner */
.hs-frame--inset { position: absolute; z-index: 4; right: -5%; bottom: -10%; width: 40%; --hs-r: 12px; }
.hs-frame--middle-right { bottom: auto; top: 30%; }
.hs-frame--lower-right { bottom: auto; top: 57%; }
.hs-frame--top-right { bottom: auto; top: -8%; }
.hs-frame--inset .hs-card { max-width: 200px; }
/* a phone screen (npm run shots:ios): a dark rim and a phone screen's rounder
   corners; the clip's radius is the rim's inner edge */
.hs-frame--phone { --hs-r: 30px; --hs-rim: 5px; }
.hs-frame--phone .hs-view, [data-theme="light"] .hs-frame--phone .hs-view { border: var(--hs-rim) solid #11151f; background: #11151f; }
.hs-frame--phone .hs-clip { border-radius: calc(var(--hs-r) - var(--hs-rim)); }
/* a phone over the bottom-right corner ends nearly level with the frame: hung
   lower, it covered the heading under the graphic in a resources panel */
@media (min-width: 768px) {
  .hs-frame--inset.hs-frame--phone.hs-frame--bottom-right { bottom: -3%; }
}
/* a feature that holds a screenshot gives it the wider column: the words beside
   it are three sentences, the screen is a table or a chart that has to be read */
@media (min-width: 981px) {
  .t-feature:has(> .t-feature-media .hs) { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: 56px; }
  .t-feature.t-reverse:has(> .t-feature-media .hs) { grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); }
}
/* two frames side by side (the security band) */
.hs-split {
  position: relative; z-index: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px; align-items: start; max-width: 1180px; margin: 64px auto 0; padding: 0 24px; text-align: left;
}

/* ---- stepper ---- */
.hs-stepper { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.hs-steps { display: flex; flex-direction: column; gap: 10px; }
.hs-step {
  position: relative; display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left;
  padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: transparent; color: var(--ink);
  transition: background .25s ease, border-color .25s ease; overflow: hidden;
}
.hs-step:hover { border-color: var(--border-strong); }
.hs-step.is-active { background: var(--card-bg); border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.hs-step:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.hs-step-n {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--ink-3); border: 1px solid var(--border-strong);
}
.hs-step.is-active .hs-step-n { color: #fff; border-color: transparent; background: var(--grad-brand); }
.hs-step-words { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hs-step-words b { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.hs-step-words span { font-size: 14px; line-height: 1.5; color: var(--ink-3); }
/* autoplay progress */
.hs-step-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--grad-brand); }
.hs-stepper.is-playing .hs-step.is-active .hs-step-bar { animation: hsbar var(--hs-step-ms, 6500ms) linear forwards; }
@keyframes hsbar { to { width: 100%; } }
/* every panel occupies the same cell, so the stepper is as tall as its tallest
   step and switching steps never moves the page; a hidden panel is invisible
   (and out of the accessibility tree), not removed from the layout */
.hs-panels { position: relative; display: grid; align-items: start; }
.hs-panel { grid-area: 1 / 1; min-width: 0; }
.hs-panel[hidden] { display: block; visibility: hidden; pointer-events: none; }
.hs-panel .hs { animation: hsin .45s cubic-bezier(.22,1,.36,1); }
@keyframes hsin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* the no-show band under the calculator */
.hs-howband { margin-top: 56px; }
.hs-howband-k { margin: 0 0 18px; }
/* "Live in four steps": the four numbered steps across, the frame under them */
.hs-stepper--how { grid-template-columns: minmax(0, 1fr); gap: 36px; }
.hs-stepper--how .hs-steps { flex-direction: row; }
.hs-stepper--how .hs-step { flex: 1 1 0; flex-direction: column; gap: 10px; padding: 22px 20px; }
.hs-stepper--how .hs-panels { max-width: 980px; width: 100%; margin: 0 auto; }

/* a slot whose screenshot is still to come (preview builds only) */
.hs-frame--pending {
  display: grid; place-items: center; min-height: 260px; border-radius: var(--hs-r);
  border: 1.5px dashed var(--border-strong);
}
.hs-pending { display: flex; flex-direction: column; gap: 6px; max-width: 360px; padding: 24px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.hs-pending-k { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }

/* ---- narrower screens ---- */
@media (max-width: 1180px) {
  .hs--hero .hs-stage { width: 116%; }
}
@media (max-width: 980px) {
  .hs--hero .hs-stage { width: 100%; }
  .hs-stepper { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  /* one column: hybrid.js moves the panel under the active step, and a hidden
     panel takes no room (no tallest-panel gap; a tap moving things is expected) */
  .hs-panels { display: block; margin: 4px 0 10px; }
  .hs-panel[hidden] { display: none; }
  .hs-stepper--how .hs-steps { flex-direction: column; }
  .hs-stepper--how .hs-step { flex-direction: row; padding: 16px 18px; }
  .hs-split { grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: 640px; }
}
/* phone: the phone crop, numbered points, the words stacked under the image */
@media (max-width: 767px) {
  .hs-view { aspect-ratio: var(--marpx); }
  .hs .hs-img { width: var(--miw); left: var(--mil); top: var(--mit); }
  .hs-hit { left: var(--xm); top: var(--ym); width: var(--wm); height: var(--hm); }
  .hs-hit[data-offphone] { display: none; }
  .hs-hit::after {
    content: attr(data-n); position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%;
    font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; color: #fff; background: #2563EB;
    box-shadow: 0 0 0 2px #fff;
  }
  .hs-glow { inset: 6% -2% -4% 2%; filter: blur(30px); }
  .hs-notes { display: flex; flex-direction: column; gap: 8px; padding: 18px 0 2px; }
  .hs-note { position: static; width: auto; height: auto; }
  .hs-dot, .hs-card::before { display: none; }
  /* outranks the .hs-note--{side} .hs-card placement rules */
  .hs-notes .hs-note .hs-card { position: static; transform: none; translate: none; max-width: none; width: auto; }
  .hs-num { display: block; }
  .hs-frame--inset { position: relative; right: auto; bottom: auto; top: auto; width: 82%; margin: 18px 0 0 auto; }
  .hs-frame--inset .hs-card { max-width: none; }
  /* a phone screen stacked under the picture: narrower, and centred like a phone */
  .hs-frame--inset.hs-frame--phone { width: 72%; margin: 18px auto 0; }
  .hs-tag { right: 8px; top: 8px; font-size: 10.5px; }
  /* on a phone the short frame's top-left holds the reply; its bottom-right is empty */
  .hs-tag.hs-tag--tl { left: auto; right: 8px; top: auto; bottom: 8px; }
  .hs-stepper--how .hs-step, .hs-step { padding: 14px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-hit, .hs-dot, .hs-card { transition: none; opacity: 1; translate: 0 0; }
  .hs-dot { transform: none; }
  .hs-panel .hs { animation: none; }
  .hs-stepper.is-playing .hs-step.is-active .hs-step-bar { animation: none; }
}

/* ---- a stepper of phone screens (/organizations/ "mmrCRM for iPhone") ----
   The tabs and the store card share the left column; one phone at a time on
   the right, life-size enough to read. One column below 981px, as every
   stepper: the phone opens under its tab and the store card follows the tabs. */
.hs-side { display: flex; flex-direction: column; min-width: 0; }
@media (min-width: 981px) {
  .hs-stepper--phone { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 64px; align-items: center; }
  .hs-stepper--phone .hs-panels { justify-items: center; }
  .hs-stepper--phone .hs-panel { width: 100%; }
}
/* a phone's "Demo data" tag hangs under the phone, centred: inside the frame it
   sat on the status bar's battery */
.hs--phone .hs-frame--phone > .hs-view > .hs-tag { top: auto; right: auto; left: 50%; bottom: -34px; transform: translateX(-50%); white-space: nowrap; }
.hs--phone .hs-stage { padding-bottom: 34px; }
