/* ==========================================================================
   09 · TESTIMONIALS  —  "Kind words. Real people."
   Three paper sheets, set like plates in an art book: a wide lead sheet with
   the quote in display type, two narrower companions on staggered baselines,
   the last one climbing into the chrysanthemum plate. Initials are stamped
   like hanko across the top edge of each sheet.
   ========================================================================== */

.testimonials {
  --testimonials-pad-x: clamp(1.5rem, 2.3vw, 2.75rem);
  --testimonials-disc: clamp(3.5rem, 4.2vw, 4.4rem);
  position: relative;
  overflow-x: clip;
  padding-block: clamp(5rem, 9vw, 9.5rem) clamp(5.5rem, 10vw, 11rem);
}
.testimonials__defs { position: absolute; }
.testimonials__inner { position: relative; z-index: var(--z-content); }

/* ---- decorative layers --------------------------------------------------- */
.testimonials__plate {
  position: absolute; z-index: 0; pointer-events: none;
  top: clamp(-7rem, -5vw, -2rem); right: clamp(-9rem, -6vw, -2rem);
  width: clamp(26rem, 50vw, 56rem);
  opacity: .2;
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 58% 42%, #000 46%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 60% at 58% 42%, #000 46%, transparent 100%);
}
.testimonials__plate.is-missing { display: none; }
.testimonials__plate-img { width: 100%; height: auto; filter: sepia(.55) contrast(1.05); }

.testimonials__ghost {
  left: clamp(-3rem, -1vw, 0rem); bottom: clamp(-5rem, -4vw, -1rem);
  font-size: clamp(15rem, 34vw, 40rem);
}

/* ---- header -------------------------------------------------------------- */
.testimonials__head { position: relative; max-width: 46rem; }
.testimonials__label { margin-bottom: clamp(1.1rem, 1.6vw, 1.75rem); }
.testimonials__title { font-size: clamp(2.7rem, 6vw, 6.25rem); line-height: .98; }
.testimonials__intro { margin-top: clamp(1.4rem, 2vw, 2.1rem); max-width: 27em; }

/* ---- the sheets ---------------------------------------------------------- */
.testimonials__list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 1.8vw, 2rem);
  row-gap: clamp(3.5rem, 5vw, 5rem);
  align-items: start;
  margin-top: clamp(4.25rem, 6.5vw, 7rem);
}
.testimonials__item { position: relative; grid-column: span 4; }

.testimonials__panel {
  display: grid; gap: clamp(1.25rem, 1.7vw, 1.9rem);
  padding: calc(var(--testimonials-disc) * .5 + clamp(1.5rem, 2vw, 2.25rem)) var(--testimonials-pad-x) clamp(1.4rem, 1.9vw, 2.1rem);
}
/* fine inner keyline: the sheet reads as a printed plate, not a UI card */
.testimonials__panel::before {
  content: ""; position: absolute; inset: .45rem; pointer-events: none;
  border: 1px solid var(--line); border-radius: 2px; opacity: .7;
}

/* stamped initial, straddling the top edge of the sheet */
.testimonials__initial {
  position: absolute; z-index: 1; left: var(--testimonials-pad-x); top: 0;
  width: var(--testimonials-disc); height: var(--testimonials-disc); margin-top: calc(var(--testimonials-disc) * -.5);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--vermillion-deep); color: var(--cream);
  font-family: var(--font-display); font-weight: 500; font-size: calc(var(--testimonials-disc) * .42); line-height: 1;
  box-shadow: inset 0 0 0 1.5px rgba(248, 245, 239, .22), 0 0 0 .4rem var(--cream);
  filter: url(#testimonials-rough);
}
.testimonials__no {
  position: absolute; z-index: 1; right: var(--testimonials-pad-x); top: clamp(1.1rem, 1.5vw, 1.6rem);
  font-family: var(--font-display); font-style: italic; font-size: .95rem; letter-spacing: .01em; color: var(--ink-60);
}

.testimonials__mark { width: clamp(1.9rem, 2.4vw, 2.5rem); color: var(--vermillion); }
.testimonials__quote p { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-80); text-wrap: pretty; hanging-punctuation: first; }

.testimonials__meta {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem 1.25rem;
  padding-top: clamp(1rem, 1.4vw, 1.4rem); border-top: 1px solid var(--line);
}
.testimonials__who { display: grid; gap: .45rem; }
.testimonials__name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 1.6vw, 1.6rem); letter-spacing: -.01em; line-height: 1; }
.testimonials__stars { display: inline-flex; gap: .28rem; color: var(--vermillion); padding-bottom: .1rem; }
.testimonials__stars .art { width: .95rem; height: .95rem; color: inherit; }
.testimonials__stars .art > svg { width: 100%; height: 100%; }

/* lead sheet: the quote is set in display type */
.testimonials__item--lead .testimonials__mark { width: clamp(3rem, 4.6vw, 5rem); }
.testimonials__item--lead .testimonials__quote p {
  font-family: var(--font-display); font-weight: 400; color: var(--ink);
  font-size: clamp(1.6rem, 2.35vw, 2.5rem); line-height: 1.2; letter-spacing: -.02em;
}

/* sign-off under the last sheet */
.testimonials__sign {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 1.1rem;
  margin-top: clamp(1.75rem, 2.6vw, 2.75rem); padding-left: var(--testimonials-pad-x);
}
.testimonials__sign-thread { position: relative; display: block; width: 1px; height: 4.5rem; background: var(--line-strong); }
.testimonials__sign-thread::before {
  content: ""; position: absolute; left: 50%; top: -.55rem; width: .55rem; height: .55rem; margin-left: -.275rem;
  border: 1px solid var(--ink-60); border-radius: 50%;
}
.testimonials__seal { font-size: 1.2rem; }
.testimonials__sign-stack { gap: .55em; }
.testimonials__sign-stack .label { font-size: .6rem; }

/* ---- ≥1200: three sheets on staggered baselines --------------------------- */
@media (min-width: 1200px) {
  .testimonials__item:nth-child(1) { grid-column: 1 / span 5; }
  .testimonials__item:nth-child(2) { grid-column: 6 / span 4; margin-top: clamp(4.5rem, 7.5vw, 9rem); }
  .testimonials__item:nth-child(3) { grid-column: 10 / span 3; margin-top: calc(-1 * clamp(4rem, 8vw, 10rem)); }
  .testimonials__item:nth-child(3) .testimonials__panel { --testimonials-pad-x: clamp(1.4rem, 1.7vw, 2rem); }
  .testimonials__item:nth-child(n + 4) { grid-column: span 4; }
}

/* ---- 768–1199: lead + companion, third sheet tucked under with the sign-off -- */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .testimonials__item:nth-child(1) { grid-column: 1 / span 7; }
  .testimonials__item:nth-child(2) { grid-column: 8 / span 5; margin-top: clamp(4rem, 9vw, 7rem); }
  .testimonials__item:nth-child(3) {
    grid-column: 2 / span 10; margin-top: clamp(-3rem, -3vw, -1.5rem);
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); column-gap: clamp(1.5rem, 4vw, 3rem); align-items: end;
  }
  .testimonials__item:nth-child(3) .testimonials__sign { margin: 0 0 1.5rem; padding-left: 0; }
  .testimonials__item:nth-child(n + 4) { grid-column: span 6; }
  .testimonials__plate { width: clamp(28rem, 64vw, 44rem); }
}

/* ---- ≤767: stacked, offsets retained ---------------------------------------- */
@media (max-width: 767.98px) {
  .testimonials { --testimonials-disc: 3.5rem; }
  .testimonials__list { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 3.4rem; margin-top: 4.25rem; }
  .testimonials__item { grid-column: auto; }
  .testimonials__item:nth-child(even) { margin-left: clamp(1.5rem, 10vw, 4rem); }
  .testimonials__item:nth-child(3n) { margin-right: clamp(1.5rem, 10vw, 4rem); }
  .testimonials__item--lead .testimonials__quote p { font-size: clamp(1.55rem, 6.6vw, 2.1rem); }
  .testimonials__plate { top: -1.5rem; right: -42vw; width: 118vw; opacity: .17; }
  .testimonials__ghost { left: auto; right: -12vw; bottom: -2rem; font-size: 78vw; }
  .testimonials__sign { justify-content: start; }
}
@media (max-width: 479.98px) {
  .testimonials__title { font-size: clamp(2.55rem, 12.6vw, 3.4rem); }
}
