:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --paper: #f5f5f7;
  --surface: #ffffff;
  --line: rgba(0, 0, 0, .08);
  --accent: #0071e3;
  --red: #c83f32;
  --green: #2f6b4f;
  --gold: #a36f16;
  --shadow: rgba(0, 0, 0, .08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "LXGW WenKai TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 74px;
  padding: 12px 42px;
  background: rgba(245, 245, 247, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.brand strong,
.site-footer strong {
  display: block;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.brand small,
.site-footer span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

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

.lang-switch {
  display: flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .04);
}

.lang-switch button {
  min-width: 54px;
  height: 32px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background .2s, color .2s, box-shadow .2s;
}

.lang-switch button.is-active {
  color: #f5f5f7;
  background: #1d1d1f;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .14);
}

.lang-switch button:focus-visible {
  outline: 2px solid rgba(0, 113, 227, .42);
  outline-offset: 2px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
  align-items: center;
  gap: 36px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 36px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3 {
  font-family: inherit;
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  color: var(--ink);
  font-size: 56px;
  font-weight: 700;
}

.hero-subtitle {
  max-width: 660px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

.hero-visual {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px var(--shadow);
}

.hero-visual img {
  width: min(270px, 100%);
  height: auto;
}

.project-hero {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 84px 0 58px;
  border-bottom: 1px solid var(--line);
}

.project-hero h1 {
  max-width: 820px;
}

.project-slogan {
  margin-top: 18px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
}

.project-lead {
  max-width: 620px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 19px;
}

.section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 820px;
  margin-bottom: 30px;
}

.section h2 {
  font-size: 36px;
  font-weight: 700;
}

.section-lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.metrics article,
.service-grid article,
.case-grid article,
.impact-list article,
.network-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px var(--shadow);
}

.metrics article {
  padding: 24px;
}

.metrics strong {
  display: block;
  color: var(--red);
  font-family: inherit;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
}

.metrics span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-grid article {
  min-height: 260px;
  padding: 28px;
}

.service-number {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}

.service-grid h3,
.case-grid h3,
.impact-list h3,
.network-card h3 {
  margin-bottom: 14px;
  font-size: 23px;
}

.service-grid p,
.impact-list p,
.network-card p {
  color: var(--muted);
  font-size: 16px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.case-grid article {
  padding: 24px;
}

.case-grid ul {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
  list-style: none;
}

.case-grid li {
  padding-left: 16px;
  border-left: 3px solid rgba(73, 111, 82, .32);
}

.impact-list,
.network-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.impact-list article {
  padding: 26px;
}

.network-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.network-card {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.network-card:hover,
.network-card:focus-visible {
  border-color: rgba(0, 113, 227, .42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .12);
  transform: translateY(-3px);
  outline: none;
}

.network-label,
.network-action {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.network-label {
  margin-bottom: 28px;
}

.network-action {
  margin-top: 24px;
}

.network-action::after {
  content: ">";
  margin-left: 8px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
}

.project-plan {
  border-top: 0;
}

.project-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  min-height: 360px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px var(--shadow);
}

.project-card-featured {
  grid-column: span 2;
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: 25px;
}

.project-card p {
  color: var(--muted);
  font-size: 16px;
}

.project-card p + p {
  margin-top: 16px;
}

.project-card-subtitle {
  margin-bottom: 18px;
  color: var(--accent) !important;
  font-size: 15px !important;
  font-weight: 700;
}

.partner-logo {
  width: min(300px, 56%);
  height: auto;
  object-fit: contain;
}

.impact-gallery-section {
  padding-top: 0;
}

.impact-gallery {
  display: grid;
  grid-template-areas:
    "wide work repair"
    "wide detail team";
  grid-template-columns: 1.15fr .9fr .9fr;
  grid-template-rows: 260px 260px;
  gap: 14px;
}

.impact-photo {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px var(--shadow);
}

.impact-photo:nth-child(1) {
  grid-area: wide;
}

.impact-photo:nth-child(2) {
  grid-area: work;
}

.impact-photo:nth-child(3) {
  grid-area: repair;
}

.impact-photo:nth-child(4) {
  grid-area: detail;
}

.impact-photo:nth-child(5) {
  grid-area: team;
}

.impact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.donation-section {
  padding-top: 0;
}

.donation-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 42px;
  padding: 34px;
  background: #1d1d1f;
  color: #f5f5f7;
  border-radius: 8px;
}

.donation-copy h2 {
  margin-bottom: 18px;
  font-size: 38px;
}

.donation-copy p {
  max-width: 620px;
  color: rgba(245, 245, 247, .76);
  font-size: 18px;
}

.text-link {
  display: inline-block;
  margin-top: 24px;
  color: #7ab7ff;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.qr-card {
  padding: 16px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
}

.qr-card img {
  width: 100%;
  border-radius: 6px;
}

.qr-card figcaption {
  margin-top: 12px;
  color: rgba(245, 245, 247, .74);
  font-size: 14px;
  text-align: center;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  padding: 34px 42px;
  background: #1d1d1f;
  color: #f5f5f7;
}

.site-footer img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.site-footer span {
  color: rgba(245, 245, 247, .72);
}

.footer-email {
  display: inline-block;
  margin-top: 8px;
  color: rgba(245, 245, 247, .9);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.footer-email:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 960px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 14px 24px;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 14px 20px;
    margin-left: 0;
  }

  .lang-switch {
    margin-left: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 42px 0 32px;
  }

  h1 {
    font-size: 46px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .hero-visual {
    min-height: 260px;
  }

  .metrics,
  .case-grid,
  .network-grid,
  .project-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .project-card-featured {
    grid-column: span 2;
  }

  .impact-gallery {
    grid-template-areas:
      "wide wide"
      "work repair"
      "detail team";
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 320px 320px 320px;
  }

  .donation-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand strong {
    font-size: 17px;
  }

  .site-nav {
    display: none;
  }

  .hero,
  .project-hero,
  .section {
    width: min(100% - 32px, 1180px);
  }

  h1 {
    font-size: 38px;
  }

  .section h2 {
    font-size: 29px;
  }

  .project-hero {
    padding: 52px 0 38px;
  }

  .project-slogan {
    font-size: 24px;
  }

  .metrics,
  .case-grid,
  .impact-list,
  .network-grid,
  .project-plan-grid {
    grid-template-columns: 1fr;
  }

  .project-card-featured {
    grid-column: auto;
  }

  .project-card-top {
    display: block;
  }

  .impact-gallery {
    grid-template-areas: none;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .impact-photo,
  .impact-photo:nth-child(1),
  .impact-photo:nth-child(2),
  .impact-photo:nth-child(3),
  .impact-photo:nth-child(4),
  .impact-photo:nth-child(5) {
    grid-area: auto;
  }

  .impact-photo {
    aspect-ratio: 4 / 3;
  }

  .impact-photo-tall {
    aspect-ratio: 3 / 4;
  }

  .partner-logo {
    width: 100%;
    margin-top: 16px;
  }

  .donation-panel {
    padding: 22px;
  }

  .donation-copy h2 {
    font-size: 30px;
  }

  .hero-visual {
    min-height: 220px;
    padding: 18px;
  }

  .metrics article,
  .service-grid article,
  .case-grid article,
  .impact-list article,
  .network-card,
  .project-card {
    padding: 22px;
  }
}
