/* ==========================================================
   Homepage (2026 redesign) - pages/homepage.php.
   Colours, .wrap, .btn and .ic come from css/header-footer.css.
   Everything is scoped to .ftn-home so the old main.css globals
   (a colour, h1 inherit, body font...) don't leak in.
   ========================================================== */
.ftn-home { --script: "Cormorant Garamond", Georgia, serif; display: block; background: var(--bg); color: var(--ink); font: 15px/1.7 var(--sans); letter-spacing: .02em; text-align: left; }
.ftn-home *, .ftn-home *::before, .ftn-home *::after { box-sizing: border-box; }
/* :where() = zero specificity, so the section styles below always win */
:where(.ftn-home) a { color: inherit; text-decoration: none; transition: none; }
:where(.ftn-home) :where(h1, h2, p) { margin: 0; font: inherit; }
.ftn-home span:not(.card__bg)::after { content: none; } 

.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 11.5px; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 14px; }
.eyebrow i { width: 24px; height: 1px; background: var(--muted); }

/* ---------- hero: EVERY LIFE MATTERS ---------- */
.hero { position: relative; min-height: 572px; overflow: hidden; background: #f5efe4; }
.hero__img { position: absolute; inset: 0 0 0 40%; background: center/cover no-repeat; }
.hero__img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #f5efe4 0%, rgba(245,239,228,.75) 22%, rgba(245,239,228,0) 55%); }
.hero__in { position: relative; padding-top: 54px; padding-bottom: 90px; }
.ftn-home .hero__title { font: 500 38px/1.55 var(--serif); letter-spacing: .14em; margin: 8px 0 34px; color: var(--ink); }
.hero__title em { font-style: normal; color: var(--gold); }
.hero__lead { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.hero__cta { display: flex; gap: 12px; margin: 34px 0 26px; flex-wrap: wrap; }
.hero__call { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.hero__call .dot { margin: 0 4px; }
.ftn-home .hero__quote { position: absolute; right: max(24px, calc((100% - var(--wrap)) / 2 + 24px)); bottom: 30px; font: italic 19px var(--script); color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.25); }

/* ---------- values strip (under the hero) ---------- */
.strip { background: var(--sand); }
.strip__in { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; align-items: center; min-height: 75px; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.ftn-home .strip__lead { font: 400 14.5px var(--serif); color: var(--ink-2); border-right: 1px solid var(--line); padding-right: 24px; }
.strip__item { display: flex; align-items: center; gap: 14px; color: var(--ink-2); }
.strip__item b { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink); }
.strip__item span { display: block; font-size: 11.5px; }
@media (max-width: 1080px) {
  .strip__in { grid-template-columns: 1fr 1fr; }
  .ftn-home .strip__lead { grid-column: 1 / -1; border: 0; padding: 0; }
}

/* ---------- section heading (eyebrow + title + side text) ---------- */
.sec { padding: 72px 0; }
.sec__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.ftn-home .sec__title { font: 500 26px/1.4 var(--serif); letter-spacing: .1em; color: var(--ink); }
.sec__aside { font-size: 12.5px; color: var(--ink-2); text-align: right; }

/* ---------- services: 4 cards, each links to a page ---------- */
.svc { display: grid; grid-template-columns: 1.95fr 1fr 1fr; grid-template-rows: auto auto; gap: 18px; }
.card { position: relative; display: flex; overflow: hidden; background: var(--sand); color: var(--ink); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(80,60,20,.12); }
.card__title { display: flex; align-items: center; gap: 8px; font: 500 19px var(--serif); letter-spacing: .08em; }
.card__title .ic:last-child { margin-left: auto; width: .7em; }
.card__text { display: block; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.card__img { display: block; background: center/cover no-repeat; }

.card--big { grid-row: span 2; min-height: 402px; flex-direction: column; justify-content: flex-end; background: #dfe3e4; }
.card__bg { position: absolute; inset: 0; background: center/cover no-repeat; }
.card__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(234,223,196,0) 45%, rgba(234,223,196,.85) 100%); }
.card--big .tag { position: absolute; top: 24px; left: 24px; background: #fff; font-size: 11px; padding: 4px 10px; display: inline-flex; gap: 6px; align-items: center; }
.card--big .card__body { position: relative; display: block; padding: 0 26px 28px; }
.card__title--xl { font-size: 30px; }
.card--big .card__text { font-size: 12.5px; }
.circle { position: absolute; right: 24px; top: 0; width: 34px; height: 34px; border: 1px solid var(--ink-2); border-radius: 50%; display: grid; place-items: center; font-size: 13px; }

.card--small { flex-direction: column; }
.card--small .card__img { height: 111px; }
.card--small .card__body { display: block; padding: 18px 16px 20px; }

.card--wide { grid-column: 2 / span 2; min-height: 171px; }
.card--wide .card__body { flex: 1.25; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.card--wide .card__img { flex: 1; }
@media (max-width: 1080px) {
  .svc { grid-template-columns: 1fr 1fr; }
  .card--big { grid-column: 1 / -1; grid-row: auto; }
  .card--wide { grid-column: 1 / -1; }
}

/* ---------- news: newest 3 posts from 最新消息 ---------- */
.sec--news { padding-top: 0; }
.sec--news .wrap::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 46px; } /* divider line, same width as the content */
.more { font-size: 12.5px; display: inline-flex; gap: 10px; align-items: center; color: var(--ink-2); }
.more:hover { color: var(--gold); }
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: 14px; color: var(--ink); }
.post__img { display: block; height: 161px; background: center/cover no-repeat; transition: box-shadow .25s; }
.post:hover .post__img { box-shadow: 0 18px 30px rgba(80,60,20,.18); }
.post__meta { font-size: 11px; color: var(--muted); margin-top: 18px; display: flex; gap: 14px; }
.post__title { display: block; font: 500 17px/1.6 var(--serif); margin-top: 8px; letter-spacing: .05em; flex: 1; }
.post:hover .post__title { color: var(--gold); }
.post__more { font-size: 12px; color: var(--gold); margin-top: 24px; display: flex; justify-content: space-between; opacity: 0; transition: opacity .2s; }
.post:hover .post__more { opacity: 1; }

/* ---------- donation banner (將思念化為祝福), last section ---------- */
.give { position: relative; background: #e9e3cc center/cover no-repeat; }
.give::before { content: ""; position: absolute; inset: 0; background: rgba(245,235,207,.86); } /* cream wash over the photo, measured from the design */
.give__in { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 40px; min-height: 360px; padding-top: 48px; padding-bottom: 48px; } /* same height as the design */
.ftn-home .give__title { font: 600 44px/1.4 var(--serif); letter-spacing: .3em; color: var(--ink); }
.ftn-home .give__script { font: italic 21px var(--script); color: var(--ink-2); margin-top: 8px; }
.give__side { max-width: 320px; font-size: 12.5px; color: var(--ink-2); }
.give__side .btn { margin-top: 18px; }
.btn--red { border-color: var(--red); color: var(--red); background: rgba(255,255,255,.35); }
.btn--red:hover { background: var(--red); color: #fff; }

/* ---------- mobile: matches the mobile design (Forget Thee Not 手機首頁.png, 390px wide) ---------- */
.news__all { display: none; }
@media (max-width: 720px) {
  .ftn-home { font-size: 15px; }
  .eyebrow { flex-wrap: wrap; gap: 8px 12px; font-size: 11px; margin-bottom: 16px; }
  .hero { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
  .hero__in { order: 1; width: 100%; padding-top: 40px; padding-bottom: 42px; } /* width: auto margins in a flex column would shrink it */
  .hero__img { order: 2; position: relative; inset: auto; height: 270px; }
  .hero__img::before { content: none; }
  .ftn-home .hero__title { font-size: 30px; line-height: 1.6; letter-spacing: .04em; margin: 0 0 26px; }
  .hero__lead { font-size: 15px; line-height: 1.95; }
  .hero__cta { flex-direction: column; gap: 16px; margin: 32px 0 30px; }
  .hero__cta .btn { justify-content: space-between; height: 56px; padding: 0 20px; font-size: 16px; }
  .hero__cta .btn .ic { width: 22px; height: 22px; }
  .hero__cta .btn--sand .ic { color: var(--red); }
  .hero__call { font-size: 15px; color: var(--ink); gap: 8px; }
  .hero__call .ic { width: 18px; height: 18px; }
  .ftn-home .hero__quote { order: 3; left: 24px; right: 24px; bottom: 28px; font-size: 21px; text-align: center; }
  .strip__in { grid-template-columns: 1fr; gap: 0; padding-top: 18px; padding-bottom: 28px; }
  .ftn-home .strip__lead { font-size: 18px; padding: 10px 0 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
  .strip__item { gap: 20px; padding: 12px 0; }
  .strip__item b { font-size: 16px; }
  .strip__item span { font-size: 14px; }

  /* section headings */
  .sec { padding: 56px 0; }
  .sec__head { flex-direction: column; align-items: flex-start; gap: 22px; margin-bottom: 26px; }
  .ftn-home .sec__title { font-size: 30px; line-height: 1.55; letter-spacing: .04em; }
  .sec__aside { text-align: left; font-size: 15px; line-height: 2; }

  /* services: all cards stacked, photo on top */
  .svc { grid-template-columns: 1fr; gap: 24px; }
  .card { border-radius: 4px; }
  .card:hover { transform: none; }
  .card--big { min-height: 420px; }
  .card--big .tag { top: 22px; left: 22px; font-size: 12px; padding: 6px 12px; }
  .card--big .card__body { padding: 0 22px 26px; }
  .card__title--xl { font-size: 30px; }
  .card--big .card__text { font-size: 15px; margin-top: 16px; }
  .circle { border: 0; width: auto; height: auto; top: 6px; font-size: 22px; }
  .card__title { font-size: 26px; gap: 10px; }
  .card__title .ic:first-child { width: 18px; height: 18px; }
  .card__title .ic:last-child { width: 22px; }
  .card__text { font-size: 15px; margin-top: 14px; }
  .card--small .card__img { height: 184px; }
  .card--small .card__body { padding: 22px 22px 26px; }
  /* 支援與資源: same layout as the other cards on mobile (photo on top, icon next to the title) */
  .card--wide { flex-direction: column; min-height: 0; }
  .card--wide .card__img { order: -1; flex: none; height: 184px; }
  .card--wide .card__body { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; padding: 22px 22px 26px; }
  .card--wide .card__body > span { display: contents; }
  .card--wide .card__body > .ic { width: 18px; height: 18px; }
  .card--wide .card__text { grid-column: 1 / -1; }

  .sec--news .wrap::before { margin-bottom: 46px; }
  .news { grid-template-columns: 1fr; gap: 40px; }
  .post { padding-bottom: 22px; }
  .post__img { height: 200px; border-radius: 4px; }
  .post__meta { font-size: 14px; margin-top: 18px; }
  .post__title { font-size: 22px; line-height: 1.55; color: var(--gold); margin-top: 10px; }
  .post__more { opacity: 1; color: var(--ink); font-size: 14px; margin-top: 26px; align-items: center; }
  .post__more .ic { width: 20px; height: 20px; }
  .news__all { display: flex; justify-content: flex-end; gap: 12px; margin-top: 34px; font-size: 15px; color: var(--ink); }
  .news__all .ic { width: 18px; height: 18px; }

  /* donation banner */
  .give__in { flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding-top: 56px; padding-bottom: 60px; }
  .ftn-home .give__title { font-size: 32px; letter-spacing: .1em; }
  .ftn-home .give__script { font-size: 24px; line-height: 1.45; margin-top: 18px; }
  .give__side { max-width: none; font-size: 15px; line-height: 1.95; margin-top: 26px; }
  .give__side .btn { display: flex; justify-content: space-between; height: 56px; padding: 0 20px; font-size: 16px; margin-top: 30px; }
  .give__side .btn .ic { width: 22px; height: 22px; }
}

/* ---------- English ---------- */
html[lang="en"] .ftn-home .hero__title { letter-spacing: .03em; font-size: 36px; line-height: 1.35; }
html[lang="en"] .ftn-home .sec__title, html[lang="en"] .card__title { letter-spacing: .02em; }
html[lang="en"] .ftn-home .give__title { letter-spacing: .04em; font-size: 40px; }
@media (max-width: 720px) {
  html[lang="en"] .ftn-home .hero__title { font-size: 28px; }
  html[lang="en"] .ftn-home .give__title { font-size: 28px; }
}
