/* Screenshots as product windows: a browser frame, a scroll-driven tilt, and decision callouts.
   Pattern sources: Linear/Aceternity "container scroll" (tilt 18deg to flat), Mercury (callouts
   enter with a small rotateX), Apple scroll groups. Everything falls back to a flat, still frame. */

/* ---------- The frame ---------- */
.shot.mock {
  aspect-ratio: auto; padding: 0; overflow: hidden; border-radius: 12px;
  background: var(--bg-card);
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 1px 2px rgb(0 0 0 / 0.06),
    0 12px 24px -8px rgb(0 0 0 / 0.14),
    0 40px 80px -24px rgb(0 0 0 / 0.28);
}
[data-theme="dark"] .shot.mock {
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 1px 0 0 rgb(255 255 255 / 0.06) inset,
    0 20px 40px -12px rgb(0 0 0 / 0.6),
    0 60px 120px -40px rgb(31 59 255 / 0.25);
}
.shot.mock::before { display: none; }
.shot.mock::after { /* soft sheen across the glass */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 2;
  background: linear-gradient(115deg, rgb(255 255 255 / 0.07) 0%, transparent 32%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}
.mock-bar {
  height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 12px;
  background: var(--bg-raise); border-bottom: 1px solid var(--line);
}
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.mock-screen { position: relative; }
.shot.mock .mock-screen img { display: block; width: 100%; height: auto; border-radius: 0; box-shadow: none; }
.duo .shot.mock { aspect-ratio: auto; }
.duo .shot.mock .mock-screen img { height: auto; object-fit: initial; }

/* Home: the window sits on its panel and bleeds off the bottom */
.shot-wrap .mock-card { margin: 0; }
.case:not(.pk-case) .shot-wrap { perspective: 1600px; }
.case:not(.pk-case) .mock-card {
  transform: rotateX(8deg) rotateY(-10deg); transform-origin: 50% 60%;
  transition: transform 0.9s var(--ease);
}
.case:not(.pk-case):hover .mock-card, .case:not(.pk-case):focus-visible .mock-card { transform: none; }
.pk-case .shot-wrap { padding: 18px 0 0 18px; background: radial-gradient(ellipse 70% 80% at 0% 0%, var(--glow), transparent 70%), var(--bg-card); }
.pk-case .shot.mock-card { border-radius: 10px 0 0 0; box-shadow: 0 0 0 1px var(--line-strong), 0 24px 48px -20px rgb(0 0 0 / 0.6); }

/* ---------- Scroll: screens tilt upright as they arrive ---------- */
.cs-shot figure, .feature figure, .duo figure { perspective: 1200px; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .cs-shot .shot.mock {
      animation: mk-hero linear both; animation-timeline: view(); animation-range: entry 0% cover 40%;
      transform-origin: 50% 100%;
    }
    .feature .shot.mock, .duo .shot.mock, .feature .shot {
      animation: mk-rise linear both; animation-timeline: view(); animation-range: entry 5% entry 95%;
      transform-origin: 50% 100%;
    }
  }
}
@keyframes mk-hero {
  from { transform: rotateX(18deg) scale(0.94) translateY(40px); }
  to { transform: none; }
}
@keyframes mk-rise {
  from { transform: rotateX(8deg) scale(0.97) translateY(24px); }
  to { transform: none; }
}

/* ---------- Decision pins and callouts ---------- */
figure.has-pins { position: relative; }
.pin {
  position: absolute; z-index: 3; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0;
  border: 0; background: none; cursor: pointer; display: grid; place-items: center;
  font: 600 12px/1 var(--sans); color: #fff;
}
.pin span {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-deep); box-shadow: 0 0 0 2px #fff, 0 6px 16px rgb(0 0 0 / 0.35);
  transition: transform 0.25s var(--ease);
}
.pin::before { /* pulse, until the first decision is opened */
  content: ""; position: absolute; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-deep); opacity: 0.5; animation: pin-pulse 1.6s var(--ease) infinite;
}
.has-pins.seen .pin::before { animation: none; opacity: 0; }
.pin:hover span, .pin[aria-expanded="true"] span { transform: scale(1.15); }
.pin:focus-visible { outline: none; }
.pin:focus-visible span { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--accent); }
@keyframes pin-pulse { from { transform: scale(1); opacity: 0.5; } to { transform: scale(2.4); opacity: 0; } }

.pin-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 4; }
.pin-line path { fill: none; stroke: var(--accent); stroke-width: 1.5; transition: stroke-dashoffset 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pin-line circle { fill: var(--accent); }

.callout {
  position: absolute; z-index: 5; width: 280px; padding: 12px 16px 14px; border-radius: 12px;
  background: var(--bg-raise); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong), 0 24px 48px -16px rgb(0 0 0 / 0.5);
  opacity: 0; transform: perspective(800px) translateY(4px) rotateX(-10deg); transform-origin: 50% 0;
  transition: opacity 0.22s var(--ease) 0.12s, transform 0.28s var(--ease) 0.12s; pointer-events: none;
}
.callout.open { opacity: 1; transform: none; pointer-events: auto; }
.callout .eyebrow { display: block; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.callout h4 { margin: 8px 0 4px; font-size: 14px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.callout p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.callout nav { display: none; }

/* Touch and small screens: no lines, the decision opens as a card at the bottom */
@media (max-width: 767px), (hover: none) {
  .pin-line { display: none; }
  .callout {
    position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto !important; width: auto;
    padding: 16px 18px 12px; transform: translateY(16px); transition-delay: 0s;
  }
  .callout nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
  .callout nav button {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong);
    background: none; color: var(--ink); font-size: 18px; cursor: pointer;
  }
  .callout nav span { font: 500 12px var(--mono); color: var(--ink-3); }
}
@media (prefers-reduced-motion: reduce) {
  .pin::before { animation: none; }
  .callout, .pin-line path { transition: none; }
}
.pk-case .shot.mock-card { height: auto; min-height: 0; align-self: start; }
@media (min-width: 1100px) { .pk-case .shot-wrap { display: flex; align-items: center; padding: 18px 0 18px 18px; } .pk-case .shot.mock-card { border-radius: 10px 0 0 10px; } }
