/* ===================================================================
   Project Verifi — product showcase (projects.html).

   Extends we-verifi-brand.css + site.css — load this file third.
   Uses the shared design tokens (--graphite, --cloud, --hairline,
   --muted, --teal, --foil-gradient, --radius, --font-display,
   --font-body, --font-mono) rather than redefining them.

   Direct structural copy of join-showcase.css (Cert Verifi's .cv-showcase
   / .cvs-* block), re-namespaced .pv-showcase / .pvs-* so both can
   exist on the same site without collision. Project Verifi uses the
   teal accent throughout (it's the same accent as Ledger's own app
   shell), swapped in wherever join-showcase.css used indigo.
   =================================================================== */

.pv-showcase {
  width: 100%;
  align-self: stretch;

  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 1px 1px, rgba(20, 22, 28, 0.055) 1px, transparent 0) 0 0 / 28px 28px,
              var(--cloud);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--graphite);
  font-family: var(--font-body);
  padding: clamp(28px, 4vw, 56px) clamp(20px, 3.4vw, 48px);
  margin: clamp(28px, 4vw, 48px) 0;
}

.pv-showcase::before {
  content: '';
  position: absolute;
  top: -220px;
  right: -180px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: var(--foil-gradient);
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

.pv-showcase > * { position: relative; z-index: 1; }

/* ---------- intro ---------- */

.pvs-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
}

.pv-showcase h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw + 1rem, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--graphite);
  max-width: 24ch;
  margin: 0 0 14px;
}

.pv-showcase h2 em { font-style: normal; color: var(--muted); }

.pvs-lede {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 clamp(28px, 3.6vw, 44px);
}

/* ---------- panels ---------- */

.pvs-panels {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 820px) {
  .pvs-panels { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.pvs-panel {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pvs-panel:focus-visible { outline: none; }

.pvs-panel:focus-visible .pvs-frame {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.pvs-frame {
  position: relative;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(20, 22, 28, 0.04);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

/* Zoomed into the top-left of each screen rather than shrunk to fit —
   scaled down to card width the UI is illegible. Override --pvs-zoom on
   an individual panel to reframe it. */
.pvs-frame img {
  display: block;
  width: calc(100% * var(--pvs-zoom, 1.8));
  max-width: none;
  height: auto;
}

.pvs-frame::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 88%);
  pointer-events: none;
}

.pvs-panel:hover .pvs-frame,
.pvs-panel:focus-visible .pvs-frame {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(20, 22, 28, 0.08);
  border-color: var(--teal);
}

.pvs-expand {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.82);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.pvs-panel:hover .pvs-expand,
.pvs-panel:focus-visible .pvs-expand { opacity: 1; }

@media (hover: none) { .pvs-expand { opacity: 1; } }

.pvs-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
}

.pvs-step {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 2px;
  color: var(--teal);
}

.pvs-rule { flex: 1; height: 1px; background: var(--hairline); }

.pvs-tier {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  background: var(--hairline);
  padding: 5px 10px;
  border-radius: 999px;
}

.pvs-tier--enterprise {
  color: var(--indigo);
  background: rgba(91, 95, 239, 0.1);
}

.pv-showcase h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--graphite);
  margin: 0 0 8px;
}

.pvs-panel p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* ---------- lightbox ---------- */

.pvs-lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--cloud);
  font-family: var(--font-body);
}

.pvs-lightbox::backdrop { background: rgba(20, 22, 28, 0.88); }

.pvs-lightbox__shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 56px 16px 20px;
}

.pvs-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 1280px;
  width: 100%;
}

.pvs-viewport {
  width: 100%;
  max-height: 74vh;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 10px;
}

.pvs-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7);
}

.pvs-hint {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.pvs-figure figcaption { text-align: center; max-width: 70ch; }

.pvs-lb-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 6px;
  color: #fff;
}

.pvs-lb-facts {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9AA1B4;
  margin: 0;
  line-height: 1.8;
}

.pvs-lb-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pvs-lb-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

.pvs-lb-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.pvs-lb-close { top: 14px; right: 14px; }
.pvs-lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.pvs-lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .pv-showcase { padding: 28px 20px; }

  .pvs-lb-prev { left: 14px; top: auto; bottom: 16px; transform: none; }
  .pvs-lb-next { right: 14px; top: auto; bottom: 16px; transform: none; }

  .pvs-viewport { max-height: 60vh; justify-content: flex-start; }
  .pvs-lightbox img { width: 900px; max-width: none; max-height: none; border-radius: 8px; }
  .pvs-hint { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .pvs-frame, .pvs-expand { transition: none; }
  .pvs-panel:hover .pvs-frame,
  .pvs-panel:focus-visible .pvs-frame { transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .pvs-lightbox[open] .pvs-lightbox__shell { animation: pvs-pop 0.3s cubic-bezier(0.2, 0.75, 0.3, 1); }

  @keyframes pvs-pop {
    from { opacity: 0; transform: scale(0.955); }
    to   { opacity: 1; transform: none; }
  }
}
