/* ============================================================
   TESTIMONIALS — components/testimonials.css
   Customer stories for the product pages.
   Only real, verified, verbatim quotes (coffeecup.com/users).

   Editorial layout: one featured story on a dark card running full
   width, the others in two columns below. Each story leads with a
   pull quote — a literal excerpt of the quote, aria-hidden because
   the full quote below carries the same phrase, marked — then the
   verbatim quote and the author. A chip with the real app icon only
   when the quote names the product.
   Static: nothing moves, and the cards are not links, so there is
   no hover state that would suggest one.
   ============================================================ */

.tst {
  padding: var(--sp-8) var(--sp-3);
  background: var(--surface);
}
/* Same content width as .container (max-width minus its 24px gutters),
   so the cards line up with the sections above and below */
.tst-inner {
  max-width: calc(var(--max-w) - 2 * 24px);
  margin: 0 auto;
}

/* ── Header: text on the left, the section's only link on the right ── */
.tst-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
  margin-bottom: var(--sp-5);
}
.tst-head-text { max-width: 620px; }
.tst-eyebrow {
  display: inline-block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--primary-on-light);
}
.tst-title {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: var(--fw-strong);
  letter-spacing: var(--tr-h2);
  line-height: 1.1;
  color: var(--text-primary);
  text-wrap: balance;
}
.tst-sub {
  margin-top: var(--sp-2);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-secondary);
}
.tst-head-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 44px;
  font-weight: var(--fw-medium);
  color: var(--primary-on-light);
  text-decoration: underline;
  text-decoration-color: rgba(189, 50, 0, 0.35);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--transition);
}
.tst-head-link svg { transition: transform var(--transition); }
.tst-head-link:hover { text-decoration-color: currentColor; }
@media (hover: hover) and (pointer: fine) { .tst-head-link:hover svg { transform: translateX(2px); } }

/* ── Bento: the featured story runs full width, the rest in two columns ── */
.tst-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}

/* ── Story card ── */
.tst-story {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 32px;
  border: 1px solid rgba(33, 26, 20, 0.08);
  border-radius: 24px;
  background: #FCFCF7;
}
.tst-pull {
  font-size: 22px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tr-h3);
  line-height: 1.3;
  color: var(--text-primary);
  text-wrap: balance;
}
.tst-quote { margin: 0; }
.tst-quote p {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: #57524B;                /* 7:1 on the card */
}
.tst-quote p + p { margin-top: 0.75em; }

/* Highlighted phrase (the pull quote): marker-pen underline, doesn't
   change the background colour */
.tst-hl {
  padding: 0 1px;
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  background: linear-gradient(transparent 60%, rgba(255, 90, 31, 0.2) 60%, rgba(255, 90, 31, 0.2) 92%, transparent 92%);
}

.tst-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(33, 26, 20, 0.08);
}
/* --av: a -solid token (white ≥ 4.5:1) */
.tst-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--av, var(--primary-solid));
  color: #fff;
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
}
.tst-who {
  display: flex;
  flex-direction: column;
}
.tst-name {
  font-size: var(--fs-small);
  font-style: normal;           /* Nohemi has no italic */
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}
.tst-role {
  font-size: var(--fs-meta);
  color: var(--text-secondary);
}

/* Product named in the quote: real app icon + name */
.tst-app {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-pill);
  background: rgba(33, 26, 20, 0.05);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  white-space: nowrap;
}
.tst-app img { width: 20px; height: 20px; border-radius: 50%; }

/* ── Featured story: dark card, larger pull quote ──
   Two columns: pull quote over the author on the left, the full quote
   on the right behind a hairline. DOM order stays pull → quote → author. */
.tst-story--feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-areas: "pull quote" "author quote";
  grid-template-rows: 1fr auto;
  gap: 40px var(--sp-6);
  padding: 56px;
  border-color: rgba(255, 255, 255, 0.06);
  /* Warm glow behind the pull quote (decorative) */
  background:
    radial-gradient(70% 90% at 12% 0%, rgba(255, 90, 31, 0.2), rgba(255, 90, 31, 0.06) 45%, transparent 75%),
    var(--dark-bg);
}
.tst-story--feature .tst-pull {
  grid-area: pull;
  max-width: 13ch;
  font-size: clamp(32px, 3.4vw, 46px);
  font-weight: var(--fw-strong);
  letter-spacing: var(--tr-h2);
  line-height: 1.08;
  color: var(--text-on-dark);
}
/* Longer excerpts (> 44 characters) step down so they stay in 3–4 lines */
.tst-story--feature .tst-pull--long {
  max-width: none;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.15;
}
.tst-story--feature .tst-quote {
  grid-area: quote;
  align-self: center;
  padding-left: var(--sp-6);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.tst-story--feature .tst-quote p {
  font-size: var(--fs-lead);
  color: var(--text-muted-on-dark);
}
.tst-story--feature .tst-hl {
  color: var(--text-on-dark);
  background: linear-gradient(transparent 62%, rgba(255, 90, 31, 0.4) 62%, rgba(255, 90, 31, 0.4) 92%, transparent 92%);
}
.tst-story--feature .tst-author { grid-area: author; padding-top: 0; border-top: 0; }
.tst-story--feature .tst-name { color: var(--text-on-dark); }
.tst-story--feature .tst-role { color: var(--text-muted-on-dark); }
.tst-story--feature .tst-app { background: rgba(255, 255, 255, 0.08); color: var(--text-on-dark); }

@media (max-width: 1000px) {
  .tst-story--feature {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "pull" "quote" "author";
    grid-template-rows: auto;
    gap: 28px;
    padding: 48px;
  }
  .tst-story--feature .tst-quote { padding-left: 0; border-left: 0; }
  .tst-story--feature .tst-author { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
}
@media (max-width: 700px) {
  .tst { padding: var(--sp-7) var(--sp-3); }   /* same 24px gutter as .container */
  .tst-head { flex-direction: column; align-items: flex-start; }
  .tst-bento { grid-template-columns: minmax(0, 1fr); }
  .tst-story { padding: 24px; border-radius: 20px; }
  .tst-story--feature { padding: 32px 24px 24px; }
  .tst-pull { font-size: 20px; }
  .tst-app { margin-left: 56px; }   /* under the name, past the avatar */
}
@media (forced-colors: active) {
  .tst-app { border: 1px solid CanvasText; }
}
