:root {
  --orange: #e35a0f;
  --orange-deep: #b8410a;
  --orange-soft: #ff7a29;
  --gold: #f4b43c;
  --gold-soft: #fcd77a;
  --ink: #2a2622;
  --text: #3d3833;
  --muted: #7b736b;
  --line: #ece6dd;
  --soft: #faf6ef;
  --cream: #fbf8f2;
  --white: #ffffff;
  --shadow: 0 18px 48px -22px rgba(80, 45, 12, 0.35);
  --shadow-sm: 0 8px 24px -14px rgba(80, 45, 12, 0.28);
  --max: 1180px;
  --radius: 16px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(244, 180, 60, 0.10), transparent 60%),
    radial-gradient(1000px 520px at -10% 8%, rgba(227, 90, 15, 0.06), transparent 55%),
    var(--white);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .brand strong {
  font-family: "Noto Serif TC", "Songti TC", "Noto Sans TC", serif;
  letter-spacing: 0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- Top accent + header ---------- */
.topbar {
  height: 4px;
  background: linear-gradient(90deg, var(--orange-deep), var(--orange), var(--gold));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-soft), var(--orange-deep));
  border-radius: 14px;
  box-shadow: 0 10px 22px -10px rgba(227, 90, 15, 0.7);
  font-family: "Noto Serif TC", serif;
  font-weight: 800;
  font-size: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 16px;
  font-weight: 500;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  transition: width 0.3s ease;
}

.site-nav a:hover {
  color: var(--orange);
}

.site-nav a:hover::after {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 96px 0;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/images/hero.png") center 22% / cover no-repeat;
  transform: scale(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(28, 18, 8, 0.86) 0%, rgba(40, 22, 6, 0.62) 45%, rgba(30, 18, 8, 0.30) 100%),
    linear-gradient(0deg, rgba(20, 12, 4, 0.55), transparent 55%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 780px;
}

.hero-image {
  display: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 8px 18px;
  border: 1px solid rgba(252, 215, 122, 0.5);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.hero-copy h1 {
  margin: 0 0 24px;
  color: var(--white);
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.2;
  font-weight: 700;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

.hero-copy h1 .accent {
  color: var(--gold-soft);
}

.hero-copy p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 21px);
}

.lead {
  max-width: 820px;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 30px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-soft), var(--orange-deep));
  box-shadow: 0 16px 30px -14px rgba(227, 90, 15, 0.75);
}

.button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 38px -14px rgba(227, 90, 15, 0.85);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary:hover {
  background: var(--white);
  color: var(--orange-deep);
  transform: translateY(-3px);
}

.band .button.secondary,
.page-head .button.secondary,
.intro-section .button.secondary {
  color: var(--orange-deep);
  border-color: var(--orange);
  background: transparent;
}

.band .button.secondary:hover,
.page-head .button.secondary:hover {
  background: var(--orange);
  color: var(--white);
}

/* ---------- Sections ---------- */
.band {
  padding: 88px 0;
  background: linear-gradient(180deg, var(--cream), var(--soft));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title {
  margin: 0 auto 46px;
  text-align: center;
}

.section-title h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.section-title .kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--orange);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.section-title span.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 220px;
  margin: 20px auto 0;
}

.section-title span.rule::before,
.section-title span.rule::after {
  content: "";
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.section-title span.rule::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-title span.rule i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  transform: rotate(45deg);
}

/* ---------- Latest news ---------- */
.latest-news,
.center {
  text-align: center;
}

.latest-news {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 40px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.latest-news p {
  margin: 0 0 26px;
  font-size: clamp(19px, 2.4vw, 24px);
  color: var(--ink);
  font-family: "Noto Serif TC", serif;
}

/* ---------- Intro ---------- */
.intro-section,
.gallery-preview,
.pdf-section {
  padding: 88px 0;
}

.lead.center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.vision-line {
  display: inline-block;
  margin: 0 auto 40px;
  padding: 8px 22px;
  border-radius: 999px;
  background: rgba(244, 180, 60, 0.16);
  color: var(--orange-deep);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.vision-wrap {
  text-align: center;
}

/* ---------- Grids / cards ---------- */
.ministry-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.ministry-grid article {
  position: relative;
  min-height: 240px;
  padding: 40px 32px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ministry-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.ministry-grid article:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.ministry-grid article:hover::before {
  transform: scaleX(1);
}

.ministry-grid .num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(244, 180, 60, 0.18);
  color: var(--orange-deep);
  font-family: "Noto Serif TC", serif;
  font-size: 24px;
  font-weight: 800;
}

.ministry-grid h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 22px;
}

.ministry-grid p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Prayletters ---------- */
.pray-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pray-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.pray-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.pray-card a {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 28px 26px;
}

.pray-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
}

.pray-card .read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pray-card .read::after {
  content: "\2192";
  transition: transform 0.25s ease;
}

.pray-card:hover .read::after {
  transform: translateX(5px);
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background: var(--soft);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-grid img:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow);
}

.gallery-grid.large {
  gap: 28px;
}

/* ---------- Contact ---------- */
.contact-section {
  padding-bottom: 96px;
}

.contact-card {
  padding: 52px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.contact-grid {
  text-align: left;
}

.contact-grid > div {
  padding: 22px 24px;
  background: var(--soft);
  border-radius: 14px;
  border-left: 3px solid var(--gold);
}

.contact-grid p,
.site-footer p {
  margin: 0 0 8px;
}

.contact-grid strong {
  color: var(--orange-deep);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 0 40px;
  color: #cfc7bd;
  background: linear-gradient(180deg, #241d16, #1a140e);
}

.site-footer strong {
  color: var(--gold-soft);
  font-family: "Noto Serif TC", serif;
  font-size: 18px;
  letter-spacing: 0.05em;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-note {
  padding-top: 22px;
  color: #8f867c;
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* ---------- Inner page head ---------- */
.page-head {
  position: relative;
  padding: 84px 0 40px;
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% -20%, rgba(244, 180, 60, 0.18), transparent 70%),
    linear-gradient(180deg, var(--cream), var(--soft));
  border-bottom: 1px solid var(--line);
}

.pdf-viewer {
  width: 100%;
  min-height: 84vh;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  box-shadow: var(--shadow-sm);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 14px 24px;
    padding-bottom: 14px;
  }

  .hero {
    min-height: 540px;
    padding: 72px 0;
  }

  .ministry-grid,
  .pray-grid,
  .gallery-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 32px 24px;
  }

  .band,
  .intro-section,
  .gallery-preview {
    padding: 60px 0;
  }
}

@media (max-width: 560px) {
  .gallery-grid,
  .gallery-grid.large {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}


/* ---------- Logo + 中黑體 標題 (added) ---------- */
.brand-logo {
  height: 56px;
  width: auto;
  display: block;
}

.hero-copy h1 {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  font-weight: 900;
  letter-spacing: 0.04em;
}

/* ---------- 禱告信卡片標題 中黑體 (added) ---------- */
.pray-card h2 {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  font-weight: 900;
}

/* ---------- 登入按鈕 (added) ---------- */
.nav-login {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border: 2px solid var(--orange);
  border-radius: 999px;
  color: var(--orange-deep);
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-login:hover {
  background: var(--orange);
  color: var(--white);
}

.nav-login::after {
  display: none !important;
}

/* ---------- PDF.js 內嵌檢視器 (added) ---------- */
.pdfjs-viewer {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.pdfjs-viewer .pdf-page {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 18px;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 10px 26px -16px rgba(80, 45, 12, 0.5);
}

.pdfjs-viewer .pdf-page:last-child {
  margin-bottom: 0;
}

.pdfjs-loading {
  padding: 60px 0;
  color: var(--muted);
}

.pdf-frame {
  width: 100%;
  height: 82vh;
  border: 0;
  border-radius: 8px;
  background: var(--white);
}

/* ---------- 異象與事工方框：hero.png 局部暗色背景 (added) ---------- */
.ministry-grid article {
  background-image:
    linear-gradient(rgba(24, 15, 7, 0.74), rgba(24, 15, 7, 0.86)),
    url("/images/hero.png");
  background-size: 240%;
  background-repeat: no-repeat;
  border-color: rgba(255, 255, 255, 0.12);
}

.ministry-grid article:nth-child(1) { background-position: 12% 38%; }
.ministry-grid article:nth-child(2) { background-position: 50% 45%; }
.ministry-grid article:nth-child(3) { background-position: 88% 38%; }

.ministry-grid article h2 {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.ministry-grid article p {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.ministry-grid .num {
  background: rgba(244, 180, 60, 0.22);
  color: var(--gold-soft);
}

.ministry-gallery {
  margin-top: 44px;
}
