/* =====================================================
   In Between Letters · ibl.css
   專案客製樣式（顏色 token / 信封 / 紙紋 / 三頁專屬 layout）
   ===================================================== */

/* ---------- color tokens (棕米白 + 墨綠點綴) ---------- */
:root {
  --bg:          #faf6ef;   /* 暖米白 */
  --bg-card:     #ffffff;   /* 卡片 / 信封紙白 */
  --soft:        #f0e9dd;   /* badge soft 底 */
  --text:        #3d342a;   /* 內文（深咖啡棕，非全黑） */
  --text-light:  #7a6a5a;   /* 副資訊 */
  --muted:       #a89784;   /* placeholder、提示 */
  --accent:      #a6754c;   /* 暖棕（主按鈕） */
  --accent-deep: #6b4a2f;   /* 深咖啡（hover/強調） */
  --bloom:       #5a6f3e;   /* 墨綠點綴 */
  --border:      #e0d4c0;   /* 卡片 / 信封邊 */
}

/* ---------- 紙紋背景 (全 site) ---------- */
body {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/></svg>");
}

/* =====================================================
   ARCHIVE PAGE
   ===================================================== */

.archive-top {
  background-image:
    linear-gradient(rgba(255, 253, 248, 0.55), rgba(255, 253, 248, 0.55)),
    url('../moods/background2.png');
  background-size: cover; background-position: center; background-repeat: no-repeat;
  min-height: calc(100vh - 70px);   /* 滿版第一螢幕 */
  display: flex; flex-direction: column; justify-content: center;
  margin-bottom: 64px;
}
@media (max-width: 640px) { .archive-top { min-height: calc(100vh - 56px); } }

.archive-hero {
  text-align: center; padding: 40px 24px 56px;
  max-width: 880px; margin: 0 auto;
}
.archive-hero h1 {
  font-size: 60px; line-height: 1.35; letter-spacing: 0.04em;
  color: var(--accent-deep); font-weight: 300;
  margin-bottom: 16px;
}
.archive-hero .sub {
  font-family: 'JFLatte', sans-serif; font-size: 17px; letter-spacing: 0.08em;
  color: var(--text-light); line-height: 2;
}
@media (max-width: 640px) {
  .archive-hero { padding: 24px 32px 16px; }
  .archive-hero h1 { font-size: 42px; line-height: 1.25; }
  .archive-hero h1 .en, .archive-hero h1 .zh { display: block; }
  .archive-hero h1 .sep { display: none; }
}

.intro-block {
  max-width: 480px; margin: 0 auto; padding: 56px 24px 40px;
  text-align: center;
}
.intro-block p {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 15px; line-height: 2.2; letter-spacing: 0.06em;
  color: var(--text); margin-bottom: 1.4em;
}
@media (max-width: 640px) { .intro-block { padding: 56px 32px 40px; } }

.seasons-grid {
  max-width: 880px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
}
@media (max-width: 640px) { .seasons-grid { grid-template-columns: 1fr; } }

/* envelope card (archive 季卡) */
.envelope {
  position: relative; aspect-ratio: 16 / 10;
  background: var(--bg-card);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23p)' opacity='0.08'/></svg>");
  border: 1px solid var(--border); border-radius: 6px;
  padding: 32px 28px; cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}
.envelope:hover {
  transform: translateY(-3px); border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(106, 74, 47, 0.10);
}
.envelope .flap {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 32%;
  pointer-events: none;
  color: var(--border);
  z-index: 1;
}
.envelope .stamp {
  position: absolute; top: 16px; left: 16px;
  border: 1.5px solid var(--bloom); color: var(--bloom);
  padding: 4px 10px; border-radius: 4px;
  font-family: 'JFLatte', sans-serif; font-size: 10px; letter-spacing: 0.18em;
  transform: rotate(-8deg);
  background: var(--bg-card);
  z-index: 2;
}
.envelope .topic {
  font-family: 'ChenYuluoyan', serif; font-size: 30px; letter-spacing: 0.04em;
  color: var(--accent-deep); margin-bottom: 14px; line-height: 1.3;
}
@media (max-width: 640px) { .envelope .topic { font-size: 26px; } }
.envelope .divider {
  width: 40px; height: 1px; background: var(--border); margin: 0 auto 12px;
}
.envelope .meta {
  font-family: 'JFLatte', sans-serif; font-size: 12px; letter-spacing: 0.10em;
  color: var(--text-light);
}
.envelope .meta .dot { color: var(--muted); margin: 0 8px; }

/* archive CTA (典型) */
.archive-cta {
  max-width: 720px; margin: 96px auto 0; padding: 32px 24px;
  text-align: center;
}
.archive-cta img.typewriter {
  max-width: 220px; width: 60%;
  margin: 0 auto 32px; opacity: 0.92;
}
.archive-cta p {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 15px; line-height: 2.2; letter-spacing: 0.06em;
  color: var(--text); margin-bottom: 32px;
}
@media (max-width: 640px) {
  .archive-cta img.typewriter { max-width: 180px; margin-bottom: 24px; }
  .archive-cta p { font-size: 15px; line-height: 2; }
}

/* =====================================================
   SEASON PAGE
   ===================================================== */

.season-hero {
  text-align: center; padding: 64px 24px 48px;
  max-width: 720px; margin: 0 auto;
}
.season-hero .stamp-large {
  display: inline-block;
  border: 2px solid var(--bloom); color: var(--bloom);
  padding: 6px 14px; border-radius: 4px;
  font-family: 'JFLatte', sans-serif; font-size: 12px; letter-spacing: 0.18em;
  transform: rotate(-4deg); margin-bottom: 40px;
}
.season-hero .campaign {
  font-family: 'JFLatte', sans-serif; font-size: 17px; letter-spacing: 0.10em;
  color: var(--text-light); margin-bottom: 8px;
}
.season-hero h1 {
  font-size: 64px; line-height: 1.3; letter-spacing: 0.04em;
  color: var(--accent-deep); margin-bottom: 16px;
}
.season-hero h1 + .guests { margin-top: 36px; }
.season-hero .guests {
  display: flex; justify-content: center; gap: 48px; align-items: center;
  flex-wrap: wrap;
}
.guest { text-align: center; }
.guest .avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--soft); border: 1.5px solid var(--border);
  margin: 0 auto 12px; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-family: 'ChenYuluoyan', serif; font-size: 28px; color: var(--accent-deep);
}
.guest .avatar img { width: 100%; height: 100%; object-fit: cover; }
.guest .name {
  font-family: 'JFLatte', sans-serif; font-size: 14px; letter-spacing: 0.08em;
  color: var(--text);
}
.guests .x { font-family: 'ChenYuluoyan', serif; color: var(--muted); font-size: 24px; }
@media (max-width: 640px) {
  .season-hero h1 { font-size: 44px; line-height: 1.2; }
  .season-hero .guests { gap: 24px; }
}

.mini-intro {
  max-width: 600px; margin: 0 auto; padding: 0 24px 56px;
  font-family: 'JFLatte', sans-serif; font-size: 17px; line-height: 2.0;
  letter-spacing: 0.06em; color: var(--text-light); text-align: center;
}

.topic-section {
  max-width: 880px; margin: 0 auto 80px; padding: 0 24px;
}
.topic-section p { max-width: 720px; }
@media (max-width: 640px) { .topic-section { padding: 0 32px; } }
.topic-section h2 {
  display: flex; align-items: center; gap: 20px;
  font-size: 42px; letter-spacing: 0.06em; color: var(--accent-deep);
  margin-bottom: 36px;
}
.topic-section h2::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
@media (max-width: 640px) { .topic-section h2 { font-size: 32px; } }
.topic-section p {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 15px; line-height: 2.2; letter-spacing: 0.06em;
  color: var(--text); margin-bottom: 1.4em;
  text-align: left;
}

/* season letter list (信件小卡) */
.letters-grid {
  max-width: 880px; margin: 0 auto 80px; padding: 0 24px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (max-width: 640px) { .letters-grid { grid-template-columns: 1fr; } }

.letter-card {
  position: relative; background: var(--bg-card);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150'><filter id='q'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23q)' opacity='0.06'/></svg>");
  border: 1px solid var(--border); border-radius: 6px;
  padding: 20px 22px; cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; align-items: center; gap: 16px;
}
.letter-card:hover {
  transform: translateY(-2px); border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(106, 74, 47, 0.08);
}
.letter-card .num {
  font-family: 'ChenYuluoyan', serif; font-size: 22px; color: var(--accent);
  line-height: 1; min-width: 36px;
}
.letter-card .meta-col { flex: 1; min-width: 0; }
.letter-card .author-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.letter-card .mini-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--soft); border: 1px solid var(--border);
  overflow: hidden; flex-shrink: 0;
  font-family: 'ChenYuluoyan', serif; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-deep);
}
.letter-card .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.letter-card .author-name {
  font-family: 'JFLatte', sans-serif; font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-light);
}
.letter-card .title {
  font-family: 'JFLatte', sans-serif; font-size: 15px; letter-spacing: 0.02em;
  color: var(--text); line-height: 1.5; margin-bottom: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.letter-card .date {
  font-family: 'JFLatte', sans-serif; font-size: 11px; letter-spacing: 0.10em;
  color: var(--muted);
}

/* event */
.event-block {
  max-width: 640px; margin: 0 auto 80px; padding: 32px;
  background: var(--soft); border: 1px solid var(--border); border-radius: 12px;
  text-align: center;
}
.event-block .label {
  font-family: 'JFLatte', sans-serif; font-size: 11px; letter-spacing: 0.18em;
  color: var(--bloom); margin-bottom: 12px;
}
.event-block h3 {
  font-size: 32px; letter-spacing: 0.04em; color: var(--accent-deep);
  margin-bottom: 20px; line-height: 1.4;
}
@media (max-width: 640px) { .event-block h3 { font-size: 26px; } }
.event-block p {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 15px; line-height: 2.2; letter-spacing: 0.06em;
  color: var(--text); margin-bottom: 24px;
}

/* closure (低顯眼度卡片 + 蝌蚪引號) */
.closure-block {
  max-width: 880px; margin: 0 auto 80px; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
@media (max-width: 640px) { .closure-block { grid-template-columns: 1fr; } }
.closure-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 40px 28px 32px; position: relative;
  text-align: center;
}
.closure-card::before {
  content: '\201C';
  position: absolute; top: 14px; left: 22px;
  font-size: 72px; line-height: 1; font-family: Georgia, serif;
  color: var(--soft); font-weight: 700;
}
.closure-card .who {
  font-family: 'JFLatte', sans-serif; font-size: 11px; letter-spacing: 0.18em;
  color: var(--muted); margin-bottom: 12px; text-transform: uppercase;
}
.closure-card .text {
  font-family: 'JFLatte', sans-serif; font-size: 15px; line-height: 1.95;
  color: var(--text); letter-spacing: 0.04em;
}

/* season subscribe CTA */
.subscribe-cta {
  max-width: 720px; margin: 0 auto 0; padding: 64px 32px 32px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.subscribe-cta img.typewriter {
  max-width: 220px; width: 60%;
  margin: 0 auto 32px; opacity: 0.92;
}
.subscribe-cta p {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 15px; line-height: 2.2; letter-spacing: 0.06em;
  color: var(--text); margin-bottom: 32px;
}
@media (max-width: 640px) {
  .subscribe-cta img.typewriter { max-width: 180px; margin-bottom: 24px; }
  .subscribe-cta p { font-size: 15px; line-height: 2; }
}

/* =====================================================
   LETTER SUB-PAGE
   ===================================================== */

.breadcrumb {
  max-width: 700px; margin: 0 auto; padding: 32px 24px 16px;
  font-family: 'JFLatte', sans-serif; font-size: 13px; letter-spacing: 0.04em;
  color: var(--text-light);
}
.breadcrumb a:hover { color: var(--accent-deep); }

.letter-head {
  max-width: 700px; margin: 0 auto; padding: 24px 24px 56px;
  text-align: center;
}
.letter-head .letter-title {
  font-family: 'ChenYuluoyan', serif; font-size: 64px; line-height: 1.35;
  color: var(--accent-deep); margin-bottom: 28px; letter-spacing: 0.02em;
}
@media (max-width: 640px) {
  .letter-head .letter-title { font-size: 38px; line-height: 1.25; }
  .letter-head { padding: 16px 32px 40px; }
}
.letter-head .meta {
  font-family: 'JFLatte', sans-serif; font-size: 13px; letter-spacing: 0.10em;
  color: var(--text-light);
}
.letter-head .meta .part { display: inline; }
.letter-head .meta .dot { display: inline; margin: 0 6px; color: var(--muted); }
@media (max-width: 640px) {
  .letter-head .meta { line-height: 2; }
  .letter-head .meta .part { display: block; }
  .letter-head .meta .dot { display: none; }
}

.letter-body {
  max-width: 660px; margin: 0 auto; padding: 56px 24px;
  background: rgba(255, 255, 255, 0.55);
}
@media (max-width: 640px) {
  .letter-body { padding: 40px 32px; }
  .letter-body p { font-size: 15px; line-height: 1.95; }
  .letter-body ul li { font-size: 15px; padding-left: 26px; }
  .letter-body ul li::before { font-size: 24px; line-height: 28px; }
  .letter-body blockquote { font-size: 15px; padding-left: 16px; }
}
.letter-body p {
  font-family: 'Noto Sans TC', sans-serif; font-size: 16px; line-height: 2.0;
  color: var(--text); margin-bottom: 1.6em;
}
.letter-body blockquote {
  border-left: 6px solid rgba(90, 111, 62, 0.5);
  padding: 4px 0 4px 20px; margin: 1.8em 0;
}
.letter-body blockquote p {
  font-family: 'Noto Sans TC', sans-serif; font-size: 16px; line-height: 2.0;
  color: rgba(107, 74, 47, 0.78);
}
.letter-body blockquote p:first-child { margin-top: 0; }
.letter-body blockquote p:last-child { margin-bottom: 0; }
.letter-body ul {
  margin: 1.4em 0 1.6em; padding-left: 8px; list-style: none;
}
.letter-body ul li {
  font-family: 'Noto Sans TC', sans-serif; font-size: 16px; line-height: 1.9;
  color: var(--text); margin-bottom: 0.9em;
  position: relative; padding-left: 32px;
}
.letter-body ul li::before {
  content: '•'; position: absolute; left: 0; top: 0;
  color: rgba(90, 111, 62, 0.55);
  font-size: 28px; line-height: 30px;
}
.letter-body strong {
  font-weight: 500;
  color: var(--accent-deep);
}
.letter-body .ornament {
  text-align: center; margin: 2em 0;
  color: var(--muted); letter-spacing: 1em;
}
.letter-body .signature {
  margin-top: 2em; font-family: 'Noto Sans TC', sans-serif; font-size: 16px;
  line-height: 1.8; color: var(--text);
}

.letter-nav {
  max-width: 700px; margin: 56px auto 0; padding: 32px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 16px;
}
.letter-nav a {
  flex: 1; padding: 16px 20px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-card);
  font-family: 'JFLatte', sans-serif; font-size: 13px; letter-spacing: 0.06em;
  color: var(--text-light);
  transition: all 0.2s;
}
.letter-nav a:hover { border-color: var(--accent); color: var(--accent-deep); }
.letter-nav a.prev { text-align: left; }
.letter-nav a.next { text-align: right; }
.letter-nav a.disabled { opacity: 0.3; pointer-events: none; }
.letter-nav .label {
  display: block; font-size: 11px; letter-spacing: 0.14em;
  color: var(--muted); margin-bottom: 6px;
}
