/* ==========================================================================
   Peace Culture Foundation — concept rebuild (/demo_5)
   A calm, grounded, trilingual nonprofit design system.
   Palette drawn from the foundation's own logo: deep teal + warm ochre,
   grounded with linen and a terracotta call-to-action.
   This file is self-contained and shares nothing with the other PlainPages
   demos — it is its own visual language.
   ========================================================================== */

/* ----------------------------------------------------------------- Tokens */
:root {
  /* Surfaces & ink */
  --bg:          #f6f1e8;   /* warm linen page */
  --surface:     #ffffff;
  --surface-2:   #fbf6ee;   /* faint warm panel */
  --surface-3:   #f0e9db;   /* inset / hover */
  --ink:         #1f2e2c;   /* deep teal-charcoal text */
  --ink-soft:    #4f615d;   /* muted body */
  --ink-faint:   #76837f;   /* captions, meta */
  --line:        #e4dcce;   /* warm hairline */
  --line-strong: #d3c8b4;

  /* Brand */
  --teal:        #1c5a5f;   /* primary brand — calm, trust */
  --teal-deep:   #143f44;
  --teal-700:    #18494e;
  --teal-tint:   #e4eeed;   /* soft teal wash */
  --teal-tint-2: #d2e3e1;
  --clay:        #bd5e39;   /* terracotta — warmth, action */
  --clay-deep:   #a04d2c;
  --clay-tint:   #f6e2d6;
  --sage:        #6f8f70;   /* secondary, living */
  --sage-tint:   #e6ecdf;
  --gold:        #c1903f;   /* ochre accent from logo, used sparingly */

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--serif);
  --font-body: var(--sans);

  /* Rhythm */
  --maxw: 1140px;
  --gut: clamp(1.1rem, 4vw, 2.2rem);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 40, 38, .05), 0 2px 8px rgba(20, 40, 38, .04);
  --shadow:    0 6px 22px rgba(20, 45, 42, .09);
  --shadow-lg: 0 18px 48px rgba(20, 45, 42, .14);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ------------------------------------------------------------- Languages */
/* Thai needs more vertical room; Chinese a touch of tracking + leading.   */
:root[data-lang="th"] {
  --font-head: "Noto Sans Thai", var(--sans);
  --font-body: "Noto Sans Thai", var(--sans);
}
:root[data-lang="zh"] {
  --font-head: "Noto Sans SC", var(--sans);
  --font-body: "Noto Sans SC", var(--sans);
}
:root[data-lang="th"] body { line-height: 1.85; }
:root[data-lang="zh"] body { line-height: 1.95; letter-spacing: .01em; }
:root[data-lang="th"] h1, :root[data-lang="th"] h2,
:root[data-lang="th"] h3, :root[data-lang="th"] .hero__title { line-height: 1.4; }
:root[data-lang="zh"] h1, :root[data-lang="zh"] h2,
:root[data-lang="zh"] h3, :root[data-lang="zh"] .hero__title { line-height: 1.45; letter-spacing: .02em; }
/* The serif is Latin-only; never let it fall back oddly on CJK/Thai pages */
:root[data-lang="th"] .hero__title, :root[data-lang="zh"] .hero__title { font-weight: 600; }

/* --------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
[id] { scroll-margin-top: 92px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

p, li, a, span, h1, h2, h3, h4 { overflow-wrap: anywhere; }

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration-color: color-mix(in srgb, var(--teal) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; cursor: pointer; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; line-height: 1.12; color: var(--ink); letter-spacing: -.012em; }
h2 { font-size: clamp(1.6rem, 1rem + 2.4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, .9rem + 1.1vw, 1.45rem); font-weight: 600; }
p { color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }

:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ----------------------------------------------------------- Utilities */
.wrap { width: min(100% - 2 * var(--gut), var(--maxw)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gut), 760px); margin-inline: auto; }
.section { padding-block: clamp(3rem, 2rem + 5vw, 5.5rem); }
.section--tight { padding-block: clamp(2.2rem, 1.6rem + 3vw, 3.5rem); }
.center { text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--teal); color: #fff; padding: .7rem 1.1rem; border-radius: 10px;
  font-weight: 600; box-shadow: var(--shadow);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Dialogue eyebrow — echoes the two speech bubbles in the PCF logo */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--sans);
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: .9rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 13px; flex: none;
  background:
    radial-gradient(circle at 6px 6px, var(--teal) 0 4.5px, transparent 5px),
    radial-gradient(circle at 16px 8px, var(--gold) 0 4px, transparent 4.5px);
}
.eyebrow--on-dark { color: #cfe3e1; }
.eyebrow--on-dark::before {
  background:
    radial-gradient(circle at 6px 6px, #e6f0ef 0 4.5px, transparent 5px),
    radial-gradient(circle at 16px 8px, var(--gold) 0 4px, transparent 4.5px);
}

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: .98rem; line-height: 1;
  padding: .85rem 1.4rem; border-radius: 100px; border: 1.5px solid transparent;
  text-decoration: none; transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--clay); color: #fff; box-shadow: 0 6px 16px rgba(189, 94, 57, .26); }
.btn--primary:hover { background: var(--clay-deep); box-shadow: 0 10px 22px rgba(189, 94, 57, .32); }
.btn--teal { background: var(--teal); color: #fff; box-shadow: 0 6px 16px rgba(28, 90, 95, .22); }
.btn--teal:hover { background: var(--teal-deep); }
.btn--ghost { background: transparent; color: var(--teal); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--teal); background: var(--surface); }
.btn--on-dark { background: #fff; color: var(--teal-deep); }
.btn--on-dark:hover { background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.btn--ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost-dark:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--block { width: 100%; }
.btn svg { width: 1.05em; height: 1.05em; }

/* Quiet inline "read more" link with arrow */
.arrow-link {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 600;
  text-decoration: none; color: var(--teal);
}
.arrow-link span.ar { transition: transform .2s var(--ease); }
.arrow-link:hover span.ar { transform: translateX(4px); }

/* ============================================================== HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 14px rgba(20, 45, 42, .05);
}
.header__bar { display: flex; align-items: center; gap: clamp(.55rem, 1.2vw, 1rem); min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink);
  flex: 0 1 230px; min-width: 0; max-width: 240px;
}
.brand img { width: 34px; height: 34px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand__name {
  font-family: var(--serif); font-weight: 600; font-size: .98rem; color: var(--teal-deep); letter-spacing: -.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal;
}
.brand__sub {
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal;
}
:root[data-lang="th"] .brand__name, :root[data-lang="zh"] .brand__name { font-family: var(--font-head); }

.primary-nav { margin-left: auto; flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
.primary-nav ul { display: flex; align-items: center; gap: .05rem; flex-wrap: nowrap; }
.primary-nav a {
  display: inline-flex; align-items: center; position: relative; text-decoration: none; color: var(--ink-soft);
  font-weight: 500; font-size: .89rem; padding: .45rem .56rem; border-radius: 8px;
  transition: color .15s var(--ease), background .15s var(--ease);
  white-space: nowrap; overflow-wrap: normal;
}
.primary-nav a:hover { color: var(--teal-deep); background: var(--surface-3); }
.primary-nav a[aria-current="page"] { color: var(--teal-deep); font-weight: 600; }
.primary-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 2px;
  background: color-mix(in srgb, var(--clay) 72%, transparent); border-radius: 2px;
}

/* Programs disclosure */
.has-dd { position: relative; }
.dd-trigger {
  display: inline-flex; align-items: center; gap: .3rem; font-family: var(--sans);
  border: 0; background: transparent; color: var(--ink-soft);
  font-weight: 500; font-size: .89rem; padding: .45rem .56rem; border-radius: 8px;
  transition: color .15s var(--ease), background .15s var(--ease);
  white-space: nowrap; overflow-wrap: normal;
}
.dd-trigger:hover { color: var(--teal-deep); background: var(--surface-3); }
.dd-trigger svg { width: 13px; height: 13px; flex: none; transition: transform .2s var(--ease); }
.has-dd.open .dd-trigger svg { transform: rotate(180deg); }
.has-dd.open .dd-trigger, .dd-trigger[aria-current="page"] { color: var(--teal-deep); font-weight: 600; }
.dd-panel {
  position: absolute; top: calc(100% + 10px); left: 0;
  transform: translateY(6px);
  width: min(320px, calc(100vw - 2rem)); background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: .55rem;
  opacity: 0; visibility: hidden; transition: opacity .18s var(--ease), transform .18s var(--ease); z-index: 110;
}
.has-dd.open .dd-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dd-panel ul { display: grid; gap: 2px; }
.dd-panel a { display: block; padding: .68rem .78rem; border-radius: 9px; text-decoration: none; }
.dd-panel a:hover { background: var(--surface-3); }
.dd-panel a[aria-current="page"] { background: var(--teal-tint); box-shadow: inset 3px 0 0 var(--teal); }
.dd-t { display: block; font-weight: 600; color: var(--teal-deep); font-size: .95rem; overflow-wrap: normal; }
.dd-d { display: block; font-size: .8rem; color: var(--ink-faint); margin-top: 1px; }

.header__actions { display: flex; align-items: center; gap: .45rem; flex: none; }

/* Language switcher (segmented) */
.lang {
  display: inline-flex; background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 100px; padding: 2px; gap: 1px;
}
.lang button {
  border: 0; background: transparent; color: var(--ink-soft);
  font-size: .74rem; font-weight: 600; padding: .28rem .48rem; border-radius: 100px;
  line-height: 1; transition: background .15s var(--ease), color .15s var(--ease);
  white-space: nowrap; overflow-wrap: normal;
}
.lang button[aria-pressed="true"] { background: var(--teal); color: #fff; }
.lang button:hover:not([aria-pressed="true"]) { color: var(--teal-deep); }

.header-donate { padding: .64rem 1rem; font-size: .88rem; box-shadow: none; }
.header-donate:hover { box-shadow: 0 7px 18px rgba(189, 94, 57, .22); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong);
  background: var(--surface); border-radius: 11px; align-items: center; justify-content: center;
  color: var(--teal-deep);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-open { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: block; }

/* Mobile menu panel */
.m-menu {
  position: fixed; inset: 0 0 0 auto; width: min(90vw, 390px); z-index: 130;
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .32s var(--ease);
  display: flex; flex-direction: column; padding: 1.05rem 1.1rem 2rem;
  overflow-y: auto; visibility: hidden;
}
.m-menu.is-open { transform: translateX(0); visibility: visible; }
.m-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.m-menu__head .brand__name { font-size: 1rem; }
.m-menu a {
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: 1.08rem;
  padding: .78rem .35rem; border-bottom: 1px solid var(--line);
}
.m-menu a[aria-current="page"] { color: var(--teal); font-weight: 700; }
.m-menu a .chev { color: var(--ink-faint); }
.m-menu .m-menu__subitem {
  justify-content: flex-start; gap: .55rem;
  padding-block: .64rem; padding-left: .95rem; font-size: .98rem; color: var(--ink-soft);
}
.m-menu .m-menu__subitem::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong);
  margin-right: .3rem; flex: none;
}
.m-menu .m-menu__subitem[aria-current="page"]::before { background: var(--teal); }
.m-menu .m-menu__subitem .chev { margin-left: auto; }
.m-menu__cta { margin-top: 1.3rem; display: grid; gap: .6rem; }
.m-menu__lang { margin-top: 1.4rem; }
.m-menu__lang .lang { width: 100%; justify-content: space-between; }
.m-menu__lang .lang button { flex: 1; }
.m-menu__label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin-bottom: .5rem; }
.scrim {
  position: fixed; inset: 0; z-index: 120; background: rgba(20, 36, 34, .42);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease);
  backdrop-filter: blur(2px);
}
.scrim.is-open { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }

/* ================================================================ HERO */
.hero { position: relative; padding-block: clamp(2.4rem, 1.5rem + 5vw, 5rem); }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
}
.hero__title {
  font-family: var(--font-head); font-weight: 400;
  font-size: clamp(2.3rem, 1.3rem + 4.4vw, 3.85rem); line-height: 1.04;
  letter-spacing: -.02em; color: var(--teal-deep); margin-bottom: 1.1rem;
}
.hero__title em { font-style: italic; color: var(--clay); }
.hero__lead { font-size: clamp(1.05rem, .98rem + .4vw, 1.22rem); color: var(--ink-soft); max-width: 34ch; margin-bottom: 1.7rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__media { position: relative; }
.hero__media img {
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.hero__badge {
  position: absolute; left: -10px; bottom: -18px; background: var(--surface);
  border-radius: var(--radius); padding: .85rem 1.1rem; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .7rem; max-width: 78%;
  border: 1px solid var(--line);
}
.hero__badge .dot { width: 38px; height: 38px; border-radius: 50%; background: var(--sage-tint); display: grid; place-items: center; flex: none; color: var(--sage); }
.hero__badge .dot svg { width: 20px; height: 20px; }
.hero__badge b { display: block; font-size: .95rem; color: var(--ink); }
.hero__badge span { font-size: .82rem; color: var(--ink-faint); }

/* Trust strip under hero */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.trust__row { display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; align-items: center; padding-block: 1.1rem; }
.trust__label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.trust__items { display: flex; flex-wrap: wrap; gap: .9rem 1.6rem; }
.trust__item { display: inline-flex; align-items: center; gap: .5rem; font-size: .92rem; color: var(--ink-soft); font-weight: 500; }
.trust__item svg { width: 18px; height: 18px; color: var(--sage); flex: none; }

/* ====================================================== SECTION HEADER */
.sec-head { max-width: 60ch; margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.sec-head.center { margin-inline: auto; }
.sec-head p.lead { font-size: 1.1rem; color: var(--ink-soft); margin-top: .6rem; }

/* ======================================================= FOCUS / PREVIEW */
.preview-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(3, 1fr);
}
.card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-3); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 1.25rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card__kicker { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--clay); margin-bottom: .5rem; }
.card h3 { margin-bottom: .45rem; color: var(--teal-deep); }
.card p { font-size: .96rem; margin-bottom: 1rem; }
.card .arrow-link { margin-top: auto; font-size: .92rem; }

/* Compact link cards (no image) for secondary previews */
.link-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.link-card {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.link-card .ic {
  width: 48px; height: 48px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: var(--teal-tint); color: var(--teal);
}
.link-card .ic svg { width: 24px; height: 24px; }
.link-card.alt .ic { background: var(--clay-tint); color: var(--clay-deep); }
.link-card.alt2 .ic { background: var(--sage-tint); color: var(--sage); }
.link-card h3 { font-size: 1.1rem; margin-bottom: .25rem; color: var(--teal-deep); }
.link-card p { font-size: .92rem; margin: 0; }

/* ============================================================= IMPACT */
.impact {
  background: linear-gradient(180deg, var(--teal-deep) 0%, var(--teal-700) 100%);
  color: #eaf3f1; position: relative; overflow: hidden;
  border-block: 1px solid rgba(255,255,255,.08);
}
.impact::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.05), transparent 44%, rgba(193,144,63,.09));
  pointer-events: none;
}
.impact .wrap { position: relative; z-index: 1; }
.impact .eyebrow { color: #bfe0db; }
.impact h2 { color: #fff; }
.impact p { color: #cfe0dd; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2rem; }
.stat { padding: 1.2rem 0; border-top: 2px solid rgba(255,255,255,.18); }
.stat b { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); color: #fff; line-height: 1; }
:root[data-lang="th"] .stat b, :root[data-lang="zh"] .stat b { font-family: var(--font-head); }
.stat span { display: block; margin-top: .55rem; font-size: .95rem; color: #c7dcd8; }
.impact__note { margin-top: 1.6rem; font-size: .85rem; color: #9fc1bc; }

/* Renshinkan feature band */
.dojo-band {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.2rem, 1rem + 2vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.dojo-band__media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.dojo-band__body h2 { margin-bottom: .8rem; }
.dojo-band__body p + p { margin-top: .8rem; }
.dojo-band__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }

/* ====================================================== MEDIA ROWS (alt) */
.media-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.4rem);
  align-items: center;
}
.media-row > *, .content-layout > *, .form-grid > *, .give-grid > *, .dojo-band > * { min-width: 0; }
.media-row + .media-row { margin-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.media-row__img img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.media-row.reverse .media-row__img { order: 2; }
.media-row__body h2 { margin-bottom: .9rem; }
.media-row__body p + p { margin-top: .9rem; }
.feature-list { margin-top: 1.3rem; display: grid; gap: .8rem; }
.feature-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--ink-soft); }
.feature-list svg { width: 22px; height: 22px; color: var(--sage); flex: none; margin-top: 1px; }
.feature-list b { color: var(--ink); }

/* ============================================================ CTA BAND */
.cta-band {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  text-align: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--clay), var(--sage));
}
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: #d4e4e1; max-width: 52ch; margin: .8rem auto 1.6rem; position: relative; }
.cta-band__btns { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; position: relative; }

/* ========================================================== PAGE HEADER */
.page-hero { background: var(--surface-2); border-bottom: 1px solid var(--line); position: relative; }
.page-hero__inner { padding-block: clamp(1.6rem, 1rem + 3vw, 3rem); max-width: 64ch; }
.page-hero h1 { font-family: var(--font-head); font-weight: 400; font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem); color: var(--teal-deep); letter-spacing: -.02em; margin-bottom: .7rem; }
.page-hero p { font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem); color: var(--ink-soft); }
.page-hero--image { color: #fff; border-bottom: 0; }
.page-hero--image .page-hero__inner { position: relative; z-index: 2; padding-block: clamp(2.6rem, 1.6rem + 5vw, 5rem); }
.page-hero--image h1 { color: #fff; }
.page-hero--image p { color: #e9f1ef; }
.page-hero__bg { position: absolute; inset: 0; overflow: hidden; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(20,63,68,.92) 0%, rgba(20,63,68,.7) 55%, rgba(20,63,68,.45) 100%); }
.page-hero--image .breadcrumb a { color: #cfe3e1; }
.page-hero--image .breadcrumb { color: #bcd4d1; }
.page-hero--image .breadcrumb [aria-current] { color: #fff; }

/* ========================================================= BREADCRUMB */
.breadcrumb { font-size: .85rem; color: var(--ink-faint); margin-bottom: 1.1rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.breadcrumb a { text-decoration: none; color: var(--ink-soft); font-weight: 500; }
.breadcrumb a:hover { color: var(--teal); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }
.breadcrumb .sep { color: var(--line-strong); }

/* ============================================================== PROSE */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.05rem; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; color: var(--teal-deep); }
.prose p { color: var(--ink-soft); }
.prose ul { display: grid; gap: .65rem; margin-top: .3rem; }
.prose ul li { position: relative; padding-left: 1.5rem; color: var(--ink-soft); }
.prose ul li::before { content: ""; position: absolute; left: .1rem; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--clay); }
.prose a { font-weight: 500; }
.prose blockquote {
  border-left: 3px solid var(--clay); padding: .3rem 0 .3rem 1.3rem; margin-block: 1.6rem;
  font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: var(--teal-deep); line-height: 1.45;
}
:root[data-lang="th"] .prose blockquote, :root[data-lang="zh"] .prose blockquote { font-family: var(--font-head); font-style: normal; }
.prose blockquote cite { display: block; margin-top: .7rem; font-family: var(--sans); font-style: normal; font-size: .92rem; color: var(--ink-faint); }

/* Two-column content layout (sidebar) */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(1.8rem, 3vw, 3.5rem); align-items: start; }
.aside-card {
  position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm);
}
.aside-card + .aside-card { margin-top: 1rem; }
.aside-card h3 { font-size: 1.05rem; margin-bottom: .8rem; color: var(--teal-deep); }
.aside-card ul { display: grid; gap: .55rem; }
.aside-card ul a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .95rem; display: flex; justify-content: space-between; gap: .5rem; padding: .3rem 0; }
.aside-card ul a:hover { color: var(--teal); }
.aside-card .meta-row { display: flex; gap: .65rem; align-items: flex-start; font-size: .92rem; color: var(--ink-soft); }
.aside-card .meta-row + .meta-row { margin-top: .8rem; }
.aside-card .meta-row svg { width: 19px; height: 19px; color: var(--teal); flex: none; margin-top: 2px; }

/* Pull / quote panel */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 1rem + 2vw, 2.2rem); box-shadow: var(--shadow-sm);
}
.panel--teal { background: var(--teal-tint); border-color: var(--teal-tint-2); }
.panel--clay { background: var(--clay-tint); border-color: #ecccb9; }
.panel--sage { background: var(--sage-tint); border-color: #d6e0cb; }

/* Definition / step list */
.steps { display: grid; gap: 1rem; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 38px; height: 38px; border-radius: 50%; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-family: var(--sans); font-size: 1rem;
}
.steps h3 { font-size: 1.08rem; margin-bottom: .25rem; color: var(--teal-deep); }
.steps p { font-size: .95rem; margin: 0; }

/* Generic feature tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.tiles--two { grid-template-columns: repeat(2, 1fr); }
.tiles--four { grid-template-columns: repeat(4, 1fr); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.tile .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-tint); color: var(--teal); display: grid; place-items: center; margin-bottom: .9rem; }
.tile .ic svg { width: 23px; height: 23px; }
.tile h3 { font-size: 1.08rem; margin-bottom: .4rem; color: var(--teal-deep); }
.tile p { font-size: .94rem; margin: 0; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface-3); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--ease); }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption { font-size: .82rem; color: var(--ink-faint); padding: .55rem .2rem 0; }

/* Article / media list */
.article-list { display: grid; gap: 1rem; }
.article-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 1.3rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.article-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.article-item img { width: 100%; height: 100%; min-height: 130px; object-fit: cover; }
.article-item__body { padding: 1.2rem 1.4rem 1.2rem 0; }
.article-item .tag { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--clay); }
.article-item h3 { font-size: 1.15rem; margin: .35rem 0 .4rem; color: var(--teal-deep); }
.article-item p { font-size: .93rem; margin: 0; }

/* Blog / Events */
.blog-source-note {
  display: inline-flex; align-items: center; gap: .45rem; flex-wrap: wrap;
  color: var(--ink-faint); font-size: .9rem; margin-top: .95rem;
}
.blog-source-note a { font-weight: 600; text-decoration: none; }
.update-feature {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.update-feature__media { min-height: 100%; background: var(--surface-3); }
.update-feature__media img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.update-feature__body { padding: clamp(1.4rem, 1rem + 2vw, 2.3rem); display: flex; flex-direction: column; justify-content: center; }
.update-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .75rem; }
.update-tag {
  display: inline-flex; align-items: center; border-radius: 100px; padding: .24rem .58rem;
  background: var(--teal-tint); color: var(--teal-deep); font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.update-date { color: var(--ink-faint); font-size: .82rem; font-weight: 600; }
.update-feature h2, .update-card h3, .event-card h3 { color: var(--teal-deep); }
.update-feature p { margin-top: .65rem; }
.update-feature__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.3rem; }
.updates-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.update-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; min-width: 0; box-shadow: var(--shadow-sm);
}
.update-card__media { aspect-ratio: 16 / 10; background: var(--surface-3); overflow: hidden; }
.update-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.update-card:hover .update-card__media img { transform: scale(1.04); }
.update-card__body { padding: 1.05rem 1.1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.update-card p { font-size: .93rem; margin: .45rem 0 1rem; }
.update-card .arrow-link { margin-top: auto; font-size: .9rem; }
.event-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.event-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; min-width: 0; box-shadow: var(--shadow-sm);
}
.event-card p { font-size: .94rem; margin: .5rem 0 1rem; }
.event-card .arrow-link { font-size: .9rem; }

/* Resource / download row */
.resource-list { display: grid; gap: .8rem; }
.resource {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.resource:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.resource .ic { width: 42px; height: 42px; border-radius: 11px; background: var(--clay-tint); color: var(--clay-deep); display: grid; place-items: center; flex: none; }
.resource .ic svg { width: 22px; height: 22px; }
.resource b { display: block; color: var(--ink); font-size: 1rem; }
.resource span { font-size: .86rem; color: var(--ink-faint); }
.resource .ar { margin-left: auto; color: var(--ink-faint); }

/* ============================================================ DONATE */
.give-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.6rem, 3vw, 3rem); align-items: start; }
.give-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.2rem); box-shadow: var(--shadow); position: sticky; top: 92px;
}
.give-card h2 { font-size: 1.5rem; margin-bottom: .3rem; }
.bank-line { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px dashed var(--line-strong); }
.bank-line:last-of-type { border-bottom: 0; }
.bank-line .k { color: var(--ink-faint); font-size: .9rem; }
.bank-line .v { font-weight: 700; color: var(--ink); text-align: right; }
.bank-line .v.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .02em; font-size: 1.05rem; }
.copy-btn {
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--teal-deep);
  border-radius: 8px; padding: .2rem .55rem; font-size: .78rem; font-weight: 600; margin-left: .5rem;
}
.copy-btn:hover { border-color: var(--teal); }
.copy-btn.copied { background: var(--sage); color: #fff; border-color: var(--sage); }
.give-note { background: var(--clay-tint); border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 1.2rem; font-size: .92rem; color: var(--clay-deep); display: flex; gap: .65rem; align-items: flex-start; }
.give-note svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }

/* ============================================================== FORM */
.form-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.6rem, 3vw, 3rem); align-items: start; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.05rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field label .req { color: var(--clay); }
.field .hint { font-size: .82rem; color: var(--ink-faint); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: 10px; padding: .75rem .9rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field .err-msg { font-size: .82rem; color: var(--clay-deep); font-weight: 600; display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--clay); background: #fdf6f3; }
.field.has-error .err-msg { display: block; }
.form-note { font-size: .84rem; color: var(--ink-faint); margin-top: .3rem; }

.form-status { border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.2rem; display: none; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.form-status svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.form-status.is-visible { display: flex; }
.form-status.success { background: var(--sage-tint); color: #355c3d; border: 1px solid #cadcc0; }
.form-status.error { background: var(--clay-tint); color: var(--clay-deep); border: 1px solid #ecccb9; }

/* honeypot */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Map */
.map-frame { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--surface-3); }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }

/* contact detail list */
.contact-details { display: grid; gap: 1.1rem; }
.contact-details .row { display: flex; gap: .85rem; align-items: flex-start; }
.contact-details .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-tint); color: var(--teal); display: grid; place-items: center; flex: none; }
.contact-details .ic svg { width: 22px; height: 22px; }
.contact-details b { display: block; color: var(--ink); font-size: .95rem; margin-bottom: .15rem; }
.contact-details p, .contact-details a { font-size: .95rem; color: var(--ink-soft); text-decoration: none; }
.contact-details a:hover { color: var(--teal); text-decoration: underline; }

/* =============================================================== FOOTER */
.site-footer { background: var(--teal-deep); color: #cfe0dd; margin-top: 0; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding-block: clamp(2.6rem, 2rem + 3vw, 3.6rem); }
.footer__brand .brand__name { color: #fff; }
.footer__brand .brand__sub { color: #9fc1bc; }
.footer__brand img { filter: brightness(0) invert(1); opacity: .92; }
.footer__about { margin-top: 1rem; font-size: .92rem; color: #bcd4d1; max-width: 34ch; }
.footer__social { display: flex; gap: .6rem; margin-top: 1.2rem; }
.footer__social a { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #dcebe8; transition: background .2s var(--ease); }
.footer__social a:hover { background: rgba(255,255,255,.18); color: #fff; }
.footer__social svg { width: 20px; height: 20px; }
.footer__col h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #8fb3ae; margin-bottom: 1rem; font-weight: 700; }
.footer__col ul { display: grid; gap: .6rem; }
.footer__col a { color: #cfe0dd; text-decoration: none; font-size: .95rem; }
.footer__col a:hover { color: #fff; text-decoration: underline; }
.footer__contact p { color: #cfe0dd; font-size: .93rem; }
.footer__contact p + p { margin-top: .6rem; }
.footer__contact a { color: #fff; text-decoration: none; }
.footer__contact a:hover { text-decoration: underline; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.3rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; justify-content: space-between; font-size: .85rem; color: #9fc1bc; }
.footer__bottom .demo-note { color: #7fa6a1; }
.footer__bottom a { color: #cfe0dd; }

/* ====================================================== REVEAL ON SCROLL */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ========================================================== RESPONSIVE */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 560px; }
  .hero__lead { max-width: 52ch; }
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .update-feature { grid-template-columns: 1fr; }
  .update-feature__media img { min-height: 260px; }
  .updates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-list { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles--four { grid-template-columns: repeat(2, 1fr); }
  .dojo-band { grid-template-columns: 1fr; }
  .dojo-band__media { max-width: 560px; }
  .content-layout { grid-template-columns: 1fr; }
  .aside-card { position: static; }
  .give-grid { grid-template-columns: 1fr; }
  .give-card { position: static; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .primary-nav { display: none; }
  .header__actions .lang { display: none; }
  .header__actions .header-donate { display: none; }
  .nav-toggle { display: inline-flex; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 1.8rem 1.5rem; }
  .footer__brand { grid-column: 1 / -1; }
  .media-row { grid-template-columns: 1fr; gap: 1.4rem; }
  .media-row.reverse .media-row__img { order: 0; }
  .media-row__img { max-width: 560px; }
  .stat-row { grid-template-columns: 1fr; gap: 0; }
  .stat { padding: 1rem 0; }
}
@media (max-width: 480px) {
  .header__bar { min-height: 60px; }
  .brand { max-width: calc(100vw - 96px); }
  .brand img { width: 32px; height: 32px; }
  .brand__name { font-size: .92rem; }
  .brand__sub { font-size: .58rem; letter-spacing: .08em; }
  .nav-toggle { width: 40px; height: 40px; border-radius: 10px; }
  .m-menu { width: min(94vw, 380px); }
}
@media (max-width: 640px) {
  .preview-grid { grid-template-columns: 1fr; }
  .updates-grid { grid-template-columns: 1fr; }
  .update-feature__actions .btn { width: 100%; white-space: normal; line-height: 1.2; }
  .link-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .tiles--two, .tiles--four { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .article-item { grid-template-columns: 1fr; }
  .article-item img { aspect-ratio: 16/9; min-height: 0; }
  .article-item__body { padding: 0 1.3rem 1.3rem; }
  .footer__top { grid-template-columns: 1fr; }
  .hero__badge { position: static; max-width: none; margin-top: 1rem; }
  .hero__cta { display: grid; grid-template-columns: 1fr; }
  .hero__cta .btn, .dojo-band__actions .btn { width: 100%; white-space: normal; line-height: 1.2; }
  .trust__row { flex-direction: column; align-items: flex-start; gap: .7rem; }
}
@media (max-width: 380px) {
  .gallery { grid-template-columns: 1fr; }
  .bank-line { flex-direction: column; gap: .2rem; }
  .bank-line .v { text-align: left; }
  .copy-btn { margin-left: .35rem; }
}
