/* ═══════════════════════════════════════════════════════════════
   /stories/ — 學員成果總覽頁
   依賴 /shared/theme.css → /shared/t8.css，本檔只補這頁專屬的東西。

   核心約束：每則故事一個 id，網址可以單獨分享（/stories/#leo），
   所以完整內容全部攤開，不做 modal。
   ═══════════════════════════════════════════════════════════════ */

body {
  margin: 0;
  background: var(--t8-paper);
  color: var(--t8-slate);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

/* ─────────────────────────────────────────────
   Hero
   ───────────────────────────────────────────── */

.stories-hero {
  /* nav.js 注入的導覽列固定浮在最上，Hero 要讓出高度 */
  padding-top: clamp(6rem, 12vw, 8.5rem);
}

.stories-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 3.6rem);
  align-items: center;
}

.stories-hero__photo {
  margin: 0;
}

.stories-hero__photo img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.stories-hero__photo figcaption {
  margin-top: 0.7rem;
  font-family: var(--t8-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: rgba(232, 236, 236, 0.55);
  text-align: center;
}

@media (max-width: 860px) {
  .stories-hero__grid {
    grid-template-columns: 1fr;
  }
  .stories-hero__photo {
    order: -1;
  }
}

/* ─────────────────────────────────────────────
   速覽卡牆：一眼掃完誰做了什麼
   ───────────────────────────────────────────── */

.peek-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}

.peek {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.2rem 1.25rem 1.35rem;
  background: var(--t8-paper-2);
  border: 1px solid var(--t8-hairline);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.peek:hover {
  transform: translateY(-3px);
  border-color: rgba(148, 27, 54, 0.35);
  box-shadow: 0 14px 30px rgba(5, 6, 8, 0.1);
}

.peek__face {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.4rem;
}

.peek__name {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.4;
}

.peek__role {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--t8-slate-soft);
}

.peek__system {
  margin-top: 0.4rem;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--t8-red-ink);
}

.peek__span {
  font-family: var(--t8-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--t8-slate-soft);
}

/* ─────────────────────────────────────────────
   完整故事
   ───────────────────────────────────────────── */

.stories-full .t8-shell {
  max-width: 860px;
}

.story {
  /* 從速覽卡跳過來時，別被固定導覽列蓋住標題 */
  scroll-margin-top: 96px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1.6rem;
  background: var(--t8-paper-2);
  border: 1px solid var(--t8-hairline);
  border-radius: 18px;
}

/* 最後一則後面接的是深色 CTA 帶，卡片外距再疊上帶的 padding 會變一大塊留白 */
.story:last-child {
  margin-bottom: 0;
}

.story:target {
  border-color: rgba(148, 27, 54, 0.45);
  box-shadow: 0 0 0 3px rgba(148, 27, 54, 0.1);
}

.story__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.story__face {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.story__who {
  flex: 1 1 12rem;
  min-width: 0;
}

.story__name {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.4;
}

.story__role {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--t8-slate-soft);
}

.story__stars {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--t8-red);
}

.story__share {
  flex: none;
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--t8-slate-soft);
  background: transparent;
  border: 1px solid var(--t8-hairline);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.story__share:hover {
  color: var(--t8-red-ink);
  border-color: rgba(148, 27, 54, 0.4);
  background: rgba(148, 27, 54, 0.05);
}

.story__share.is-copied {
  color: var(--t8-paper-2);
  background: var(--t8-red);
  border-color: var(--t8-red);
}

.story__built {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin: 1.3rem 0 0;
  padding: 0.85rem 1rem;
  background: rgba(24, 167, 162, 0.07);
  border-left: 3px solid var(--t8-teal);
  border-radius: 0 10px 10px 0;
}

.story__built-label {
  font-family: var(--t8-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t8-slate-soft);
}

.story__system {
  font-weight: 700;
  font-size: 1rem;
  color: var(--t8-slate);
}

.story__span {
  font-family: var(--t8-mono);
  font-size: 0.76rem;
  color: var(--t8-slate-soft);
}

.story__pull {
  margin: 1.4rem 0 0;
  padding: 0;
  border: 0;
}

.story__pull p {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 500;
  line-height: 1.75;
  color: var(--t8-slate);
}

.story__body {
  margin-top: 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--t8-hairline);
  font-size: 0.97rem;
  line-height: 1.95;
  color: var(--t8-slate);
}

.story__body > *:first-child {
  margin-top: 0;
}

.story__body > *:last-child {
  margin-bottom: 0;
}

.story__body p {
  margin: 0 0 1rem;
}

.story__body strong {
  font-weight: 700;
}

/* ── 見證內文元件（原掛在首頁 .voice-modal__body，改掛這裡）── */

.story__body .testimonial-highlight {
  background: rgba(148, 27, 54, 0.06);
  border-left: 3px solid var(--t8-red);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  font-weight: 500;
  margin: 16px 0;
}

.story__body .testimonial-app-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  justify-items: center;
  margin-top: 16px;
}

.story__body .testimonial-app-pair figure {
  margin: 0;
  text-align: center;
  max-width: 100%;
}

.story__body .testimonial-app-pair img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(5, 6, 8, 0.14);
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.story__body .testimonial-app-pair figcaption {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--t8-slate-soft);
}

.story__body .testimonial-screenshots {
  margin-top: 20px;
}

.story__body .screenshots-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--t8-slate-soft);
  margin-bottom: 12px;
}

.story__body .screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.story__body .screenshots-grid figure {
  margin: 0;
}

.story__body .screenshots-grid img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(5, 6, 8, 0.1);
  border: 1px solid var(--t8-hairline);
}

.story__body .screenshots-grid figcaption {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--t8-slate-soft);
  text-align: center;
}

.story__body .testimonial-app-shot {
  margin-top: 16px;
  text-align: center;
}

.story__body .testimonial-app-shot img {
  max-width: 320px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(5, 6, 8, 0.14);
}

.story__body .testimonial-app-shot .caption {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--t8-slate-soft);
}

@media (max-width: 640px) {
  .story__body .testimonial-app-pair,
  .story__body .screenshots-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ─────────────────────────────────────────────
   收尾 CTA
   ───────────────────────────────────────────── */

.stories-cta__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}
