/* Product screenshots beside the feature panels (stages 1–4) + lightbox.
   Loaded after home.css; uses its tokens. */

.stage.has-shot { gap: clamp(28px, 4vw, 64px); }
.stage.has-shot .panel { flex: 0 1 460px; }
.stage.has-shot .panel.left { margin-right: 0; }
.stage.has-shot .panel.right { margin-left: 0; }

.shot {
  position: relative;
  flex: 1 1 0; min-width: 0; max-width: 680px;
  margin: 0;
  opacity: 0; transform: translateY(40px);
  transition: opacity .8s ease .12s, transform .8s ease .12s;
}
.shot.in { opacity: 1; transform: none; }
/* Screenshot on the left (panel on the right) keeps clear of nothing; on the right it
   must clear the section rail. */
.stage.has-shot .panel.left + .shot { margin-right: clamp(24px, 7vw, 110px); }

.shot-open {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; cursor: zoom-in;
  position: relative;
}
.shot-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 14px; }

/* Desktop screenshot in a light browser frame */
.shot-desk-frame {
  display: block;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--panel-border);
  background: #f6f8fb;
  box-shadow: var(--panel-shadow), 0 0 0 1px rgba(0, 0, 0, .04);
  transition: transform .35s ease, box-shadow .35s ease;
}
.shot-desk-frame::before {
  content: ""; display: block; height: 22px;
  background:
    radial-gradient(circle at 14px 11px, #ff5f57 4px, transparent 4.5px),
    radial-gradient(circle at 28px 11px, #febc2e 4px, transparent 4.5px),
    radial-gradient(circle at 42px 11px, #28c840 4px, transparent 4.5px),
    #e9edf3;
  border-bottom: 1px solid #dde3ea;
}
.shot-desk-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1440 / 900; background: #f6f8fb; }
@media (hover: hover) {
  .shot-open:hover .shot-desk-frame { transform: translateY(-4px); }
}

/* Phone screenshot overlapping the lower corner */
.shot-phone-frame {
  position: absolute; right: -18px; bottom: -34px; width: 26%; max-width: 170px;
  border-radius: 22px; overflow: hidden;
  border: 5px solid #111722; background: #111722;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.shot-phone-frame img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; background: #f6f8fb; border-radius: 16px; }
.shot.has-phone { padding-bottom: 34px; }

.shot figcaption {
  margin-top: 14px; font-size: 13px; color: var(--lead); line-height: 1.5;
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 6px 12px; border-radius: 99px;
  background: var(--chip-bg); border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.shot.has-phone figcaption { max-width: 70%; }
.shot figcaption::before {
  content: ""; flex: none; width: 14px; height: 14px; opacity: .8;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- tablets / phones: stack the screenshot under the panel ---------- */
@media (max-width: 1080px) {
  .stage.has-shot { flex-direction: column; align-items: stretch; justify-content: center; }
  .stage.has-shot .panel { flex: none; max-width: 560px; }
  .stage.has-shot .panel.left { margin: 0 auto 0 0; }
  .stage.has-shot .panel.right { margin: 0 clamp(24px, 9vw, 130px) 0 auto; }
  .stage.has-shot .shot { order: 2; flex: none; width: 100%; max-width: 640px; margin: 0 auto; }
  .stage.has-shot .panel.left + .shot { margin-right: auto; }
}
@media (max-width: 720px) {
  .stage.has-shot .panel.left, .stage.has-shot .panel.right { margin: 0 20px 0 0; max-width: none; }
  .stage.has-shot .shot { width: auto; margin: 0 20px 0 0; }
  .shot-desk-frame { border-radius: 9px; }
  .shot-desk-frame::before { height: 14px; background-size: auto; background:
    radial-gradient(circle at 9px 7px, #ff5f57 2.5px, transparent 3px),
    radial-gradient(circle at 18px 7px, #febc2e 2.5px, transparent 3px),
    radial-gradient(circle at 27px 7px, #28c840 2.5px, transparent 3px),
    #e9edf3; }
  .shot-phone-frame { right: -8px; bottom: -26px; border-width: 3px; border-radius: 14px; }
  .shot-phone-frame img { border-radius: 11px; }
  .shot figcaption { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .shot { transition: none; } .shot-desk-frame { transition: none; } }
body.motion-paused .shot { transition: none; }

/* ---------- lightbox ---------- */
.shot-dialog {
  width: min(1240px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 24px);
  padding: 0; border: 1px solid var(--panel-border); border-radius: 16px;
  background: var(--dialog-bg); color: var(--text); font-family: var(--font);
  box-shadow: var(--panel-shadow); overflow: hidden;
}
.shot-dialog[open] { display: flex; flex-direction: column; }
.shot-dialog::backdrop { background: rgba(3, 6, 12, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sd-frame { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; background: #f6f8fb; }
.sd-img { display: block; max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto; }
.shot-dialog.is-phone { width: min(440px, calc(100vw - 32px)); }
.shot-dialog.is-phone .sd-frame { padding: 16px; background: #111722; }
.shot-dialog.is-phone .sd-img { border-radius: 18px; max-height: calc(100dvh - 150px); }
.sd-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--panel-border); }
.sd-text { flex: 1; min-width: 0; text-align: center; }
.sd-cap { margin: 0; color: var(--text); font-size: 14px; line-height: 1.45; }
.sd-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.sd-nav, .sd-close {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--panel-border); border-radius: 50%;
  background: var(--inset); color: var(--text); cursor: pointer; padding: 0;
}
.sd-nav:hover, .sd-close:hover { background: var(--chip-on); }
.sd-close { position: absolute; top: 10px; right: 10px; background: rgba(14, 23, 38, .66); color: #fff; border-color: transparent; }
.sd-nav:focus-visible, .sd-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
