/* ═══════════════════════════════════════════════════
   Testimonials — Advance Praise
   Portfolio v3 · 2026
   Horizontal snap strip + left accent bar + initials
   ═══════════════════════════════════════════════════ */

.testimonials {
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, oklch(62% 0.18 35 / 0.055), transparent 70%),
    radial-gradient(ellipse 60% 40% at 15% 100%, oklch(62% 0.18 35 / 0.04), transparent 65%),
    var(--surface-raised);
  padding: clamp(8rem, 16vh, 13rem) 0 clamp(8rem, 16vh, 14rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Section seam — barely there, only a hint at the threshold */
.testimonials::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--border-faint) 45%,
    var(--border-faint) 55%,
    transparent 100%);
  opacity: 0.18;
  pointer-events: none;
}

/* ═══ Header ═══ */
.testimonials__header {
  max-width: 900px;
  margin: 0 auto clamp(4rem, 8vh, 6rem);
  padding: 0 clamp(1.5rem, 5vw, 5rem);
  position: relative;
}

.testimonials__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-faint);
  display: inline-block;
  max-width: 14rem;
  width: 100%;
}

/* Quieter than other section titles (smaller scale) — a coda, not a headline */
.testimonials__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}

.testimonials__title em {
  font-style: italic;
  color: #ffffff;
}

/* ═══════════════════════════════════════════════════
   THREE-UP GRID — all cards visible, no hidden scroll
   ═══════════════════════════════════════════════════ */
.t-praise {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 3rem);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 5rem);
}

/* Hide the horizontal-scroll dots — no longer needed in grid layout */
.testimonials__track {
  display: none;
}

/* ═══ Quote card — equal-width grid cell ═══ */
.t-praise__item {
  position: relative;
  display: flex;
  padding: clamp(1.75rem, 2.5vw, 3rem);
  padding-left: clamp(2.25rem, 3vw, 3.5rem);
  min-height: clamp(360px, 46vh, 520px);
  /* Ghost-card lift — theme-adaptive tint + soft shadow, no frame */
  background: color-mix(in oklch, var(--text-primary) 3%, transparent);
  border-radius: 4px;
  box-shadow:
    0 1px 2px oklch(0% 0 0 / 0.06),
    0 4px 16px oklch(0% 0 0 / 0.12);
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);

  /* Per-chapter accent — same palette as Projects & Journey. Defaults to rust. */
  --_chapter-accent: var(--accent);
}

.t-praise__item[data-chapter="current"]    { --_chapter-accent: var(--accent); }
.t-praise__item[data-chapter="validation"] { --_chapter-accent: oklch(62% 0.06 220); }
.t-praise__item[data-chapter="protocol"]   { --_chapter-accent: oklch(66% 0.07 200); }
.t-praise__item[data-chapter="origin"]     { --_chapter-accent: oklch(68% 0.11 60); }

.t-praise__item:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px oklch(0% 0 0 / 0.08),
    0 12px 32px oklch(0% 0 0 / 0.22);
}

/* ── Left accent bar — neutral whisper, just a card edge marker ── */
.t-praise__bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    var(--border-faint),
    transparent
  );
  border-radius: 2px;
  opacity: 0.5;
  transition: opacity 0.4s ease, width 0.4s var(--ease-out);
}

.t-praise__item:hover .t-praise__bar {
  opacity: 0.8;
  width: 3px;
}

/* ── Quote body ── */
.t-praise__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Initials avatar — takes the chapter tint so each speaker wears their era's color ── */
.t-praise__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in oklch, var(--_chapter-accent) 38%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--_chapter-accent);
  margin-bottom: clamp(1rem, 2vh, 1.5rem);
  flex-shrink: 0;
  transition: border-color 0.4s ease, background 0.4s ease, color 0.4s ease, transform 0.4s var(--ease-out);
}

.t-praise__item:hover .t-praise__avatar {
  border-color: color-mix(in oklch, var(--_chapter-accent) 70%, transparent);
  background: color-mix(in oklch, var(--_chapter-accent) 7%, transparent);
  transform: scale(1.05);
}

/* ── Chapter anchor — small mono eyebrow linking the quote to a chapter ── */
.t-praise__anchor {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: clamp(1rem, 2vh, 1.4rem);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid color-mix(in oklch, var(--border-faint) 40%, transparent);
  align-self: flex-start;
  display: inline-block;
  opacity: 0.55;
}

/* ── The quote — headline pull (the capability/leadership claim) ── */
.t-praise__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0;
  transition: color 0.4s ease;
  text-wrap: pretty;
}

/* ── Supporting body quote — secondary line with a chapter-tinted left rule ── */
.t-praise__body-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0.9rem 0 0;
  padding-left: 0.85rem;
  border-left: 1px solid color-mix(in oklch, var(--_chapter-accent) 28%, transparent);
  transition: color 0.4s ease, border-left-color 0.4s ease;
  text-wrap: pretty;
}

.t-praise__item:hover .t-praise__body-quote {
  color: var(--text-secondary);
  border-left-color: color-mix(in oklch, var(--_chapter-accent) 50%, transparent);
}

/* ── Attribution ── */
.t-praise__attr {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: clamp(1.5rem, 3vh, 2.5rem);
}

.t-praise__name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  font-weight: 500;
}

.t-praise__role {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.t-praise__source {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.15rem;
}

/* ═══════════════════════════════════════════════════
   LEAD QUOTE — slightly heavier weight within the grid
   ═══════════════════════════════════════════════════ */
.t-praise__item--lead .t-praise__bar {
  width: 3px;
  opacity: 0.7;
}

.t-praise__item--lead .t-praise__avatar {
  border-color: color-mix(in oklch, var(--_chapter-accent) 55%, transparent);
}

.t-praise__item--lead .t-praise__quote {
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  color: var(--text-primary);
}

.t-praise__item--lead .t-praise__body-quote {
  font-size: clamp(0.9rem, 1.15vw, 1.05rem);
}

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
  .t-praise {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 1.5rem;
  }
  .t-praise__item {
    min-height: auto;
    padding: 1.5rem;
    padding-left: 1.75rem;
  }
  .t-praise__quote {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  }
  .t-praise__item--lead .t-praise__quote {
    font-size: clamp(1.2rem, 2.4vw, 1.4rem);
  }
}

@media (max-width: 480px) {
  .testimonials {
    padding: 3rem 0 3rem;
  }
  .testimonials__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  .t-praise {
    padding: 0 1.25rem;
  }
  .t-praise__item {
    padding: 1.25rem;
    padding-left: 1.5rem;
  }
  .t-praise__name { font-size: 0.65rem; }
  .t-praise__role { font-size: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .t-praise__item {
    transition: none !important;
  }
}
