/* =========================================================================
   co-reviews.css — Founder-reviews carousel (contact.html, left aside)
   Prefix: co-rev-  ·  Single-slide crossfade carousel with prev/next + dots.
   Reuses the site's testimonial visual language (gold-ring avatar, gold SVG
   stars, verified check) and degrades to a static first review without JS.
   ========================================================================= */

.co-rev {
  position: relative;
  margin-top: clamp(20px, 2.4vw, 28px);
  padding: clamp(20px, 2.4vw, 26px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(232, 180, 0, 0.08), transparent 55%),
    linear-gradient(160deg, #122348 0%, #0d1d40 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 48px -34px rgba(0, 0, 0, 0.85);
}

/* ---------- Header: rating badge + arrow nav -------------------------- */
.co-rev__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.co-rev__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.co-rev__badge-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-accent);
}
.co-rev__badge-stars svg { width: 15px; height: 15px; }
.co-rev__badge-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.co-rev__badge-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.co-rev__nav {
  display: inline-flex;
  gap: 8px;
  flex: none;
}
.co-rev__arrow {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 200ms var(--ease-out-soft),
    background 200ms var(--ease-out-soft),
    border-color 200ms var(--ease-out-soft),
    color 200ms var(--ease-out-soft);
}
.co-rev__arrow svg { width: 18px; height: 18px; }
.co-rev__arrow:hover {
  background: rgba(232, 180, 0, 0.14);
  border-color: rgba(232, 180, 0, 0.5);
  color: #fff;
  transform: translateY(-1px);
}
.co-rev__arrow:active { transform: translateY(0) scale(0.96); }
.co-rev__arrow:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Viewport: stacked crossfading slides ----------------------- */
.co-rev__viewport {
  position: relative;
  min-height: clamp(196px, 22vw, 224px);
}
.co-rev__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 260ms var(--ease-out-soft),
    transform 260ms var(--ease-out-soft);
}
.co-rev__slide.is-active {
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.co-rev__stars {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 14px;
  color: var(--color-accent);
}
.co-rev__stars svg { width: 17px; height: 17px; }

.co-rev__text {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.94);
  text-wrap: pretty;
}

.co-rev__person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.co-rev__avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #0d1d40;
  box-shadow:
    0 0 0 2px var(--color-primary),
    0 0 0 3.5px rgba(232, 180, 0, 0.85),
    0 6px 16px -6px rgba(232, 180, 0, 0.45);
}
.co-rev__name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.25;
  color: #fff;
}
.co-rev__verified {
  width: 15px;
  height: 15px;
  color: var(--color-accent);
}
.co-rev__role {
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Footer: dots + counter ------------------------------------- */
.co-rev__dots {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.co-rev__dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.co-rev__dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  transition:
    background 200ms var(--ease-out-soft),
    width 200ms var(--ease-out-soft),
    border-radius 200ms var(--ease-out-soft);
}
.co-rev__dot:hover::before { background: rgba(255, 255, 255, 0.45); }
.co-rev__dot[aria-current="true"]::before {
  width: 18px;
  border-radius: 999px;
  background: var(--color-accent);
}
.co-rev__dot:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-radius: 999px;
}
.co-rev__count {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- Responsive ------------------------------------------------- */
@media (max-width: 880px) {
  .co-rev { padding: 20px 18px; }
  .co-rev__viewport { min-height: clamp(208px, 52vw, 240px); }
}

/* On narrow screens the two arrows crowd the badge — drop the secondary
   label (the stars + "5.0" already carry the signal) to avoid ugly truncation. */
@media (max-width: 460px) {
  .co-rev__badge-label { display: none; }
}

/* ---------- Reduced motion -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .co-rev__slide,
  .co-rev__arrow,
  .co-rev__dot::before { transition: none; }
  .co-rev__slide { transform: none; }
  .co-rev__arrow:hover { transform: none; }
}
