/* ============================================================
   cx-showcase — Featured testimonial + logo grid (hover style)
   Vanilla port of hover-testimonial-card.tsx
   ============================================================ */

.cx-showcase {
  --cx-sc-accent: 251, 191, 36;          /* yellow-400 amber */
  --cx-sc-card-bg: var(--cx-card, #fff);
  --cx-sc-line: var(--cx-line, #e0e5e9);
  --cx-sc-ink: var(--cx-ink, #021521);
  --cx-sc-mute: var(--cx-ink-soft, #47555d);

  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---------- Featured hero card ---------- */

.cx-showcase__hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--cx-sc-line);
  background: var(--cx-sc-card-bg);
  box-shadow:
    0 1px 2px rgba(2,21,33, .04),
    0 14px 36px -18px rgba(2,21,33, .14);
  cursor: pointer;
  transition: border-color .55s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
  isolation: isolate;
}

.cx-showcase__hero:hover {
  border-color: rgba(var(--cx-sc-accent), .55);
  transform: translateY(-2px);
}

.cx-showcase__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(2,21,33, .08) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
  z-index: 0;
}

.cx-showcase__hero:hover::before { opacity: .35; }

.cx-showcase__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(540px circle at var(--mx,50%) var(--my,50%), rgba(var(--cx-sc-accent), .15), transparent 42%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
  z-index: 1;
}

.cx-showcase__hero:hover .cx-showcase__glow { opacity: 1; }

.cx-showcase__hero-inner {
  position: relative;
  z-index: 2;
  padding: 44px 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 320px;
}

@media (min-width: 720px) {
  .cx-showcase__hero-inner { padding: 56px 56px 44px; min-height: 360px; }
}

.cx-showcase__quote {
  margin: 0;
  font-size: clamp(1.25rem, 2vw + .4rem, 1.95rem);
  line-height: 1.4;
  letter-spacing: -.012em;
  font-weight: 500;
  color: var(--cx-sc-ink);
  text-align: left;
  font-style: italic;
  transition: opacity .45s ease, filter .45s ease, transform .45s ease;
}

.cx-showcase__quote::before { content: "“"; margin-right: 2px; color: rgba(28,164,175,.55); font-weight: 800; font-style: normal; }
.cx-showcase__quote::after  { content: "”"; margin-left: 2px;  color: rgba(28,164,175,.55); font-weight: 800; font-style: normal; }

.cx-showcase__hero.is-animating .cx-showcase__quote,
.cx-showcase__hero.is-animating .cx-showcase__author {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(8px);
}

.cx-showcase__author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  transition: opacity .45s ease, filter .45s ease, transform .45s ease;
  flex-wrap: wrap;
}

.cx-showcase__person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cx-showcase__avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--cx-bg-soft, #f9fbfc);
  border: 2px solid rgba(28,164,175,.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .3s ease;
}

.cx-showcase__hero:hover .cx-showcase__avatar {
  border-color: rgba(var(--cx-sc-accent), .42);
}

.cx-showcase__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.cx-showcase__author-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cx-showcase__author-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cx-sc-ink);
  letter-spacing: -.01em;
}

.cx-showcase__author-role {
  font-size: 12.5px;
  color: var(--cx-sc-mute);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cx-showcase__company {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: .65;
  transition: opacity .3s ease;
}

.cx-showcase__hero:hover .cx-showcase__company { opacity: 1; }

.cx-showcase__company img {
  height: 28px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.cx-showcase__cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--cx-blue, #00828c);
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.cx-showcase__cta::after {
  content: "→";
  transition: transform .25s ease;
}

.cx-showcase__hero:hover .cx-showcase__cta::after { transform: translateX(4px); }

/* ---------- Logo grid (the "avatars") ---------- */

.cx-showcase__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

@media (min-width: 540px) { .cx-showcase__grid { grid-template-columns: repeat(8, 1fr); gap: 12px; } }
@media (min-width: 900px) { .cx-showcase__grid { grid-template-columns: repeat(11, 1fr); gap: 14px; } }

.cx-showcase__logo-btn {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--cx-sc-card-bg);
  border: 1px solid var(--cx-sc-line);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), border-color .25s ease, box-shadow .3s ease, z-index .01s;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.cx-showcase__logo-btn:hover {
  transform: scale(1.12);
  border-color: rgba(var(--cx-sc-accent), .5);
  box-shadow: 0 8px 22px -8px rgba(var(--cx-sc-accent), .35);
  z-index: 10;
}

.cx-showcase__logo-btn:focus-visible {
  outline: 2px solid var(--cx-blue, #00828c);
  outline-offset: 3px;
}

.cx-showcase__logo-btn[data-active="true"] {
  transform: scale(1.1);
  border-color: rgba(var(--cx-sc-accent), 1);
  box-shadow: 0 10px 26px -8px rgba(var(--cx-sc-accent), .45);
  z-index: 10;
}

.cx-showcase__logo-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cx-showcase__logo-btn .cx-showcase__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--cx-sc-ink);
  color: #fff;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 20;
  font-weight: 600;
}

.cx-showcase__logo-btn:hover .cx-showcase__tooltip,
.cx-showcase__logo-btn:focus-visible .cx-showcase__tooltip { opacity: 1; }

/* ---------- Dark mode ---------- */

html[data-theme="dark"] .cx-showcase {
  --cx-sc-card-bg: var(--cx-bg-soft, #0a1e2a);
  --cx-sc-line: var(--cx-line, #1c3542);
  --cx-sc-ink: var(--cx-ink, #f1f4f6);
  --cx-sc-mute: var(--cx-mute, #aab2b8);
}

html[data-theme="dark"] .cx-showcase__hero {
  box-shadow:
    0 1px 2px rgba(0,0,0,.4),
    0 14px 36px -18px rgba(0,0,0,.6);
}

html[data-theme="dark"] .cx-showcase__hero::before {
  background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px);
}

html[data-theme="dark"] .cx-showcase__avatar { background: var(--cx-bg-mute, #0e2632); }
html[data-theme="dark"] .cx-showcase__logo-btn img { filter: brightness(.95); }
html[data-theme="dark"] .cx-showcase__tooltip { background: #0e2632; color: #f1f4f6; border: 1px solid #1c3542; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .cx-showcase__hero,
  .cx-showcase__logo-btn,
  .cx-showcase__quote,
  .cx-showcase__author { transition: opacity .15s ease; transform: none !important; }
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  .cx-showcase__hero-inner { padding: 32px 26px 28px; gap: 22px; }
  .cx-showcase__quote { font-size: 1.1rem; line-height: 1.5; }
  .cx-showcase__author { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cx-showcase__avatar { width: 48px; height: 48px; border-radius: 12px; }
}
