/* ===================================================================
   Cert Verifi — product showcase (join page, sits between the Free
   trial block and Buy a credit bundle).

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

   Everything is namespaced .cv-showcase / .cvs-* so it cannot collide
   with site.css or join.css. The global `* { box-sizing: border-box }`
   in site.css is relied on rather than repeated here.
   =================================================================== */

.cv-showcase {
  /* Sits inside .join-blocks between two .join-block cards. Written to
     survive either a flex column or a grid container. */
  grid-column: 1 / -1;
  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;
}

/* The same foil bloom the apex hero uses, so this reads as part of the
   site rather than a bolted-on block. */
.cv-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;
}

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

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

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

.cv-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: 22ch;
  margin: 0 0 14px;
}

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

.cvs-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 ---------- */

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

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

.cvs-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;
}

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

/* matches the focus convention in site.css / we-verifi-brand.css */
.cvs-panel:focus-visible .cvs-frame {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

.cvs-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 --cvs-zoom on
   an individual panel to reframe it. */
.cvs-frame img {
  display: block;
  width: calc(100% * var(--cvs-zoom, 1.8));
  max-width: none;
  height: auto;
}

/* softens the crop edge so the preview reads as "there is more below" */
.cvs-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;
}

/* the same lift .product-card uses */
.cvs-panel:hover .cvs-frame,
.cvs-panel:focus-visible .cvs-frame {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(20, 22, 28, 0.08);
  border-color: var(--indigo);
}

.cvs-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;
}

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

/* touch devices never hover — keep the affordance visible */
@media (hover: none) { .cvs-expand { opacity: 1; } }

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

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

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

/* Which tier actually gets this screen. Trial and bundle plans do not
   get the template builder, so the panels have to say so. Same shape as
   .badge--soon in we-verifi-brand.css. */
.cvs-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;
}

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

.cv-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;
}

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

/* ---------- lightbox ----------
   Native <dialog>.showModal() renders in the top layer, so it clears the
   sticky .site-header (z-index 100) without needing a z-index of its own. */

.cvs-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);
}

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

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

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

.cvs-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;
}

.cvs-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);
}

.cvs-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;
}

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

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

.cvs-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;
}

.cvs-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;
}

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

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

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

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

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

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

  /* A desktop screenshot cannot be legible at 390px wide, so let it
     overflow and be panned rather than shrinking it into illegibility. */
  .cvs-viewport { max-height: 60vh; justify-content: flex-start; }
  .cvs-lightbox img { width: 900px; max-width: none; max-height: none; border-radius: 8px; }
  .cvs-hint { display: block; }
}

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

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

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