/* A customer testimonial (src/server/testimonials/testimonial.ts).
 *
 * Its own file because two kinds of page carry it: home.html links it (and
 * bundles it) and the server-rendered occasion pages link it as
 * /testimonial.css. Each stylesheet defines the tokens used here (--text,
 * --text-secondary, --accent, --border). */

.testimonial {
  margin: 48px auto;
  max-width: 880px;
  display: grid;
  gap: 32px;
  align-items: center;
}

/* Anchored on /testimonials (/testimonials#ed-w): land with a little room
 * above, not flush with the top of the window. */
.testimonial[id] {
  scroll-margin-top: 24px;
}

.testimonial--photo {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.testimonial__photo {
  display: block;
  width: 100%;
  height: auto;
  /* A tall phone portrait would otherwise make the section a screen high;
   * past this it is cropped from the middle. */
  max-height: 480px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 24px 48px -28px rgba(60, 40, 20, 0.45);
}

.testimonial__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.testimonial__quote {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
  font-style: normal;
}

.testimonial__quote p {
  margin: 0 0 0.6em;
}

.testimonial__quote p:last-child {
  margin-bottom: 0;
}

/* Curly quotes around the whole quote, in the accent colour. */
.testimonial__quote p:first-child::before {
  content: "\201C";
  color: var(--accent);
}

.testimonial__quote p:last-child::after {
  content: "\201D";
  color: var(--accent);
}

.testimonial__by {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Styled like the home page's section links (.home-section__link). */
.testimonial .testimonial__more {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 15px;
  font-weight: 600;
}

.testimonial .testimonial__more:hover {
  color: var(--accent-hover);
}

/* Only ever rendered on dev and staging. */
.testimonial__draft {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #211b16;
  background: #fff3b8;
  border-radius: 4px;
  padding: 2px 8px;
}

@media (max-width: 640px) {
  .testimonial {
    margin: 36px auto;
    gap: 22px;
  }

  .testimonial--photo {
    grid-template-columns: 1fr;
  }
}
