/* ===========================================================
 *  見證如雲 · Testimony page
 *
 *  An OVERLAY on page-mission.css, not a standalone stylesheet.
 *  The testimony page reuses that file's chrome (nav / footer / hero shell)
 *  and its archive-card system (.filter-bar, .chip, .posts, .post,
 *  .quote-post, .empty-state, .closer), so only the differences live here.
 *
 *  Load order is enforced in inc/enqueue.php: page-mission.css is enqueued
 *  as this file's dependency, and on a single testimony
 *  single-mission-post.css sits between the two.
 *
 *  Everything here is namespaced under .tw- (testimony wall) or scoped to a
 *  .tw- ancestor so it can never leak onto the mission pages.
 * =========================================================== */

/* ─────────────────────────────────────────────────────────────
 *  HERO — "a cloud of witnesses"
 *
 *  Replaces the mission hero's photograph with a drifting field of soft
 *  light, which is both the motif and one less external image to load.
 * ───────────────────────────────────────────────────────────── */
.tw-hero .tw-hero-photo {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'><defs><radialGradient id='c'><stop offset='0%25' stop-color='white' stop-opacity='0.85'/><stop offset='100%25' stop-color='white' stop-opacity='0'/></radialGradient></defs><g fill='url(%23c)'><circle cx='150' cy='170' r='120'/><circle cx='340' cy='90' r='70'/><circle cx='520' cy='210' r='150'/><circle cx='760' cy='120' r='90'/><circle cx='960' cy='250' r='130'/><circle cx='1130' cy='110' r='80'/><circle cx='90' cy='460' r='95'/><circle cx='300' cy='560' r='140'/><circle cx='560' cy='470' r='80'/><circle cx='780' cy='600' r='120'/><circle cx='1030' cy='520' r='100'/><circle cx='1180' cy='680' r='110'/><circle cx='430' cy='740' r='85'/><circle cx='660' cy='330' r='60'/></g></svg>");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.16;
  mix-blend-mode: screen;
}

/* A second, slower layer so the field reads as depth rather than wallpaper. */
.tw-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(212, 165, 116, 0.18), transparent 45%),
    radial-gradient(circle at 82% 68%, rgba(200, 214, 229, 0.16), transparent 50%);
}

.tw-hero .scope-foot {
  font-family: var(--serif);
  font-style: italic;
}

/* ─────────────────────────────────────────────────────────────
 *  §01 — the wall
 * ───────────────────────────────────────────────────────────── */
.tw-archive {
  background: var(--paper-2);
}

/* Three across instead of the mission page's two: testimonies are short,
   and a wall should read as a crowd. */
.tw-posts .post {
  grid-column: span 4;
}
.tw-posts .post.featured {
  grid-column: span 12;
}
.tw-posts .post.quote-post {
  grid-column: span 4;
}

.tw-posts .post h3 a {
  color: inherit;
  text-decoration: none;
}

.tw-posts .post .thumb {
  aspect-ratio: 3 / 2;
}

/* The gradient is only a fallback: an inline background-image on the element
   must win, so it is scoped to thumbs that carry no inline style. */
.tw-posts .post .thumb:not([style]) {
  background: linear-gradient(145deg, var(--paper) 0%, var(--warm) 100%);
}

/* ── Pull quote on a card ───────────────────────────────── */
.tw-pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.58;
  color: var(--ink-2);
  margin: 0 0 18px;
  padding-left: 16px;
  border-left: 2px solid var(--gold);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post.featured .tw-pull {
  font-size: 24px;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  margin-bottom: 24px;
}

/* ── Who is speaking ────────────────────────────────────── */
.tw-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.tw-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  color: var(--gold-deep);
  background: var(--warm);
  border: 1px solid rgba(212, 165, 116, 0.45);
}
.tw-person-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tw-person-text b {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.tw-person-text i {
  font-style: normal;
  font-size: 12.5px;
  color: rgba(11, 23, 38, 0.55);
  line-height: 1.4;
  margin-top: 2px;
}

.post.featured .tw-avatar {
  width: 46px;
  height: 46px;
  font-size: 23px;
}

/* ── Quote card: the scripture reference under the quote ── */
.tw-quote-card .tw-verse {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(212, 165, 116, 0.85);
  margin-bottom: 20px;
  position: relative;
}

/* ── Nothing published yet ───────────────────────────────── */
.tw-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 110px 24px;
  color: rgba(11, 23, 38, 0.55);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 20px;
}
.tw-empty .icon {
  font-family: var(--serif);
  font-style: italic;
  font-size: 64px;
  color: var(--gold);
  margin-bottom: 14px;
  line-height: 1;
}
.tw-empty h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.tw-empty p {
  font-size: 14.5px;
  max-width: 460px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────────
 *  Optional editor content between §01 and §02
 * ───────────────────────────────────────────────────────────── */
.tw-intro {
  background: var(--paper-2);
  padding: 0 48px 90px;
}
.tw-intro .entry-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(11, 23, 38, 0.78);
}

/* ─────────────────────────────────────────────────────────────
 *  §02 — 分享你的故事
 *
 *  Same .closer shell, but the mission page's fixed background photo is
 *  swapped for the hero's motif so the page closes on the image it opened on.
 * ───────────────────────────────────────────────────────────── */
.tw-share {
  background:
    radial-gradient(ellipse at 24% 18%, rgba(212, 165, 116, 0.34), transparent 55%),
    radial-gradient(ellipse at 78% 82%, rgba(107, 140, 175, 0.34), transparent 55%),
    linear-gradient(160deg, #13263f 0%, #0b1726 100%);
  background-attachment: scroll;
}
.tw-share::before {
  background: radial-gradient(ellipse at center, transparent 35%, rgba(11, 23, 38, 0.55));
}

/* ─────────────────────────────────────────────────────────────
 *  SINGLE TESTIMONY
 *  (article chrome comes from single-mission-post.css)
 * ───────────────────────────────────────────────────────────── */
.tw-lead-quote {
  margin: 0 0 40px;
  padding: 32px 36px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.tw-lead-quote::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.3), transparent 70%);
  pointer-events: none;
}
.tw-lead-quote .mark {
  display: block;
  font-family: var(--serif);
  font-size: 72px;
  line-height: 0.7;
  color: var(--gold);
  margin-bottom: 10px;
  position: relative;
}
.tw-lead-quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.52;
  margin: 0;
  position: relative;
}
.tw-lead-quote cite {
  display: block;
  margin-top: 18px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  position: relative;
}

/* ─────────────────────────────────────────────────────────────
 *  Responsive
 *
 *  page-mission.css collapses .post to full width at 1100px, which would
 *  leave one testimony per row on a tablet — these put it back to two.
 * ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tw-posts {
    grid-template-columns: repeat(6, 1fr);
  }
  .tw-posts .post,
  .tw-posts .post.quote-post {
    grid-column: span 3;
  }
  .tw-posts .post.featured {
    grid-column: span 6;
  }
  .tw-intro {
    padding: 0 32px 72px;
  }
}

@media (max-width: 860px) {
  .tw-posts .post,
  .tw-posts .post.quote-post,
  .tw-posts .post.featured {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .tw-intro {
    padding: 0 24px 56px;
  }
  .tw-pull,
  .post.featured .tw-pull {
    font-size: 18px;
  }
  .tw-lead-quote {
    padding: 26px 24px;
  }
  .tw-empty {
    padding: 72px 20px;
  }
}
