/* ============================================================
   Product mockups — real 1:1 screenshots of each product site
   inside a macOS-style browser frame. Light/dark screenshot
   pairs swap with the site theme. Files: assets/img/shots/.
   ============================================================ */

.mockup {
  container-type: inline-size;
  position: relative;
  width: 100%;
}

/* Ambient brand glow behind the frame (static blur — computed once) */
.mockup::before {
  content: "";
  position: absolute;
  inset: 12% -5% -8%;
  background: var(--gradient-brand);
  filter: blur(60px);
  opacity: 0.14;
  z-index: 0;
  pointer-events: none;
}

[data-theme="dark"] .mockup::before { opacity: 0.22; }

/* Pointer-tilt wrapper (separate from scroll-driven .mockup-shell transforms) */
.mockup-tilt {
  transform-style: preserve-3d;
  will-change: transform;
}

.mock-frame {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box,
    linear-gradient(135deg, rgb(43 146 222 / 0.45), var(--border-strong) 40%, rgb(13 176 142 / 0.45)) border-box;
  box-shadow: var(--shadow-mockup);
  overflow: hidden;
  font-size: clamp(7.5px, 1.55cqi, 14px);
  line-height: 1.45;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Glare sweep on hover (desktop fine pointer only) */
.mock-glare {
  position: absolute;
  inset: -25%;
  z-index: 3;
  background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / 0.14) 50%, transparent 62%);
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 64rem) and (pointer: fine) {
  .mockup-tilt:hover .mock-glare {
    opacity: 1;
    transform: translateX(120%);
    transition: transform 900ms ease, opacity 200ms ease;
  }
}

/* ---------- Browser chrome ---------- */

.mock-topbar {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.9em 1.2em;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.mock-dots {
  display: flex;
  gap: 0.5em;
  flex: none;
}

.mock-dots i {
  width: 0.85em;
  height: 0.85em;
  border-radius: 50%;
  background: #f6655a;
}
.mock-dots i:nth-child(2) { background: #f8bc36; }
.mock-dots i:nth-child(3) { background: #43c645; }

.mock-url {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  max-width: 60%;
  margin-inline: auto;
  padding: 0.45em 1.2em;
  border-radius: var(--radius-full);
  background: var(--surface-1);
  border: 1px solid var(--border);
  font-size: 0.95em;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.mock-url svg {
  width: 0.9em;
  height: 0.9em;
  color: var(--accent);
  flex: none;
}

/* ---------- Screenshot (light/dark pair) ---------- */

.mock-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: var(--surface-2);
}

.mock-shot--dark { display: none; }
[data-theme="dark"] .mock-shot--light { display: none; }
[data-theme="dark"] .mock-shot--dark { display: block; }

@container (max-width: 540px) {
  .mock-url { max-width: 100%; }
}
