/* ==========================================================================
   TECHIE ZEST — clients.css
   "Client stories" social-proof section as a PREMIUM 3-up rotating carousel.
   Editorial, not a generic slider: three client-story cards visible on desktop,
   a sliding window that rotates one card at a time and loops infinitely.
   Thin navy lines, emerald accent, gold hairline, Plus Jakarta Sans.
   Scoped under .cw-*. No token/global changes. WordPress-friendly.
   ========================================================================== */

/* ---- Section head ---------------------------------------------------- */
.cw__head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(var(--space-lg), 1rem + 4vw, var(--space-3xl));
  align-items: end;
  margin-bottom: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
}
.cw__title {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: var(--tracking-tight);
  margin: var(--space-md) 0 var(--space-md);
}
.cw__title .accent { color: var(--emerald); }
.cw__lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-soft);
  max-width: 54ch;
}

/* Right column of the head: partnership note + carousel arrows */
.cw__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  padding-left: clamp(0px, 0.5rem + 1vw, var(--space-lg));
  border-left: 1px solid var(--line);
}
.cw__partner-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-2xs);
}
.cw__partner-head {
  font-size: var(--step-1);
  font-weight: var(--weight-bold);
  color: var(--navy-ink);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2xs);
}
.cw__partner-note {
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--text-soft);
  max-width: 34ch;
}

/* ---- Head arrows (shared arrow style used top + nowhere else) -------- */
.cw-nav { display: inline-flex; gap: var(--space-2xs); }
.cw-arrow {
  width: 46px; height: 46px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--white); color: var(--navy);
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.cw-arrow:hover { border-color: var(--emerald); color: var(--emerald); }
.cw-arrow:active { transform: scale(.95); }
.cw-arrow:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* ---- Carousel shell -------------------------------------------------- */
.cw-carousel { position: relative; }
.cw-viewport {
  overflow: hidden;
  /* small negative side padding trick avoided — cards clip cleanly to edge */
}

/* Track: single horizontal flex row holding all cards + edge clones.
   Height auto-equalises to the tallest card (all cards live in one row),
   so paging never causes a vertical jump. JS drives translateX in px. */
.cw-track {
  --per: 3;
  --cw-gap: clamp(1rem, 0.5rem + 1.4vw, 1.75rem);
  display: flex;
  align-items: stretch;
  gap: var(--cw-gap);
  transition: transform var(--dur-slow) var(--ease);
  will-change: transform;
  touch-action: pan-y; /* let vertical page scroll pass through; we handle X */
}
.cw-carousel[data-dragging="true"] .cw-track { transition: none; }

/* ---- Card ------------------------------------------------------------ */
.cw-card {
  flex: 0 0 calc((100% - (var(--per) - 1) * var(--cw-gap)) / var(--per));
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.5rem, 1.1rem + 1vw, 2rem);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* Center (featured) card — subtly stronger, never larger */
.cw-card--featured {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.cw-card--featured .cw-card__name { color: var(--navy-ink); }

/* Card head: portrait + a small, restrained quote glyph */
.cw-card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.cw-card__portrait {
  flex: none;
  width: clamp(72px, 4vw + 48px, 96px);
  height: clamp(72px, 4vw + 48px, 96px);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.cw-card__portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.cw-card__mark {
  flex: none;
  color: var(--emerald);
  opacity: .18;
  margin-top: -2px;
}

/* Meta label above the quote (small uppercase mono) */
.cw-card__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-xs);
}
.cw-card__count { color: var(--gold); letter-spacing: .08em; }

/* Testimonial */
.cw-card__quote {
  font-size: var(--step-0);
  line-height: 1.6;
  letter-spacing: var(--tracking-flat);
  color: var(--text);
  margin: 0 0 var(--space-md);
}
/* short gold rule under the quote — a brand detail, not decoration */
.cw-card__rule {
  width: 40px; height: 2px;
  background: var(--gold);
  margin-bottom: var(--space-md);
}

/* Identity block sits at the bottom of every (equal-height) card */
.cw-card__id { margin-top: auto; }
.cw-card__name {
  font-size: var(--step-1);
  font-weight: var(--weight-bold);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  color: var(--navy);
  margin-bottom: var(--space-3xs);
}
.cw-card__project {
  font-size: var(--step-0);
  color: var(--text-soft);
  margin-bottom: var(--space-sm);
}
.cw-card__service {
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: var(--space-3xs) var(--space-xs);
  margin-bottom: var(--space-md);
}
.cw-card__service::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald); flex: none;
}
.cw-card__link {
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  font-size: var(--step--1); font-weight: var(--weight-semi);
  color: var(--emerald);
}
.cw-card__link svg { transition: transform var(--dur) var(--ease); }
.cw-card__link:hover { color: var(--emerald-deep); }
.cw-card__link:hover svg { transform: translateX(4px); }

/* ---- Dots ------------------------------------------------------------ */
.cw-dots {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-2xs);
  margin-top: clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem);
}
.cw-dot {
  --d: 9px;
  width: var(--d); height: var(--d);
  padding: 6px; /* larger tap target */
  background: none; border: 0; cursor: pointer;
  position: relative; box-sizing: content-box;
  border-radius: 50%;
}
.cw-dot::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: var(--d); height: var(--d); border-radius: 50%;
  background: var(--line-strong);
  transition: background var(--dur) var(--ease), width var(--dur) var(--ease);
}
.cw-dot:hover::before { background: var(--text-faint); }
.cw-dot[aria-current="true"]::before {
  background: var(--emerald);
  width: 26px; border-radius: var(--radius-pill);
}
.cw-dot:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ---- Section footer -------------------------------------------------- */
.cw__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); flex-wrap: wrap;
  margin-top: clamp(2rem, 1.4rem + 2vw, 3rem);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}
.cw__foot-meta {
  display: flex; align-items: center; gap: var(--space-md);
}
.cw-facepile { display: inline-flex; }
.cw-facepile img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; object-position: center 20%;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}
.cw-facepile img + img { margin-left: -12px; }
.cw__foot-copy {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: .03em;
  color: var(--text-faint);
}

/* ---- No-JS fallback: static readable grid (controls stay hidden) ----- */
.cw-carousel:not([data-enhanced="true"]) .cw-track { flex-wrap: wrap; }
.cw-carousel:not([data-enhanced="true"]) .cw-card { --per: 3; }
.cw-dots:empty { display: none; } /* dots are injected by JS; hidden until then */

/* ---- Responsive: 3 → 2 → 1 ------------------------------------------- */
@media (max-width: 991px) {
  .cw__head { grid-template-columns: 1fr; align-items: start; gap: var(--space-lg); }
  .cw__aside {
    flex-direction: row; align-items: center; justify-content: space-between;
    width: 100%; border-left: 0; padding-left: 0;
    padding-top: var(--space-md); border-top: 1px solid var(--line);
  }
  .cw__partner { flex: 1 1 auto; }
  .cw-track { --per: 2; }
  .cw-carousel:not([data-enhanced="true"]) .cw-card { --per: 2; }
}
@media (max-width: 767px) {
  .cw-track { --per: 1; }
  .cw-carousel:not([data-enhanced="true"]) .cw-card { --per: 1; }
  .cw__partner-note { display: none; } /* keep head compact on phones */
  .cw__foot { justify-content: center; text-align: center; }
}
@media (max-width: 420px) {
  .cw__foot-copy { display: none; }
}

/* ---- Motion respect -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .cw-track { transition: none; }
  .cw-card, .cw-card__link svg, .cw-arrow, .cw-dot::before { transition: none; }
}
