/* ==========================================================================
   Kaifong-inspired redesign — shared design system
   Used by: hktcs/index.html (brand accent: teal/coral)
            729paper/index.html (brand accent: orange/amber)
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

/* ---------- Brand tokens ---------- */
:root {
  --ink: #16181d;
  --ink-2: #2b303a;
  --muted: #6d7480;
  --line: #e8e8e6;
  --paper: #ffffff;
  --cream: #fbf8f3;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(20, 20, 25, .06);
  --shadow: 0 18px 50px -18px rgba(20, 20, 25, .22);
  --shadow-lg: 0 40px 90px -30px rgba(20, 20, 25, .32);
  --header-h: 134px;
  --ease: cubic-bezier(.22, .8, .28, 1);
  --maxw: 1180px;

  /* accent defaults (overridden per brand) */
  --brand: #f2622a;
  --brand-dark: #cf4d17;
  --brand-soft: #fff0e8;
  --brand-2: #1f8fd6;
  --brand-3: #57bf4c;
  --accent-ink: #ffffff;
}

/* ---------- Base ---------- */
body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system,
    "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: .02em;
  text-wrap: balance;
}

.container {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section--cream { background: var(--cream); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .9rem 1.75rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.25;
  letter-spacing: .04em;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--btn-bg) 75%, transparent);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); background: var(--brand-dark); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 2px currentColor;
}
body .hero .btn--ghost { --btn-fg: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); color: inherit; }
body .hero .btn--ghost:hover { color: #fff; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--brand-dark); }
.btn--light:hover { background: #fff; --btn-fg: var(--brand-dark); transform: translateY(-3px); }
.btn--sm { padding: .72rem 1.45rem; font-size: .88rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35); background: #fff; }

.nav-inner { display: flex; align-items: center; gap: 2rem; }

.brand { display: inline-flex; align-items: center; gap: .9rem; font-weight: 900; font-size: 1.5rem; letter-spacing: .06em; }
.brand-mark {
  display: block;
  height: 92px;
  width: auto;
  flex: 0 0 auto;
}
.brand small { display: block; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; line-height: 1.45; margin-top: .45rem; }
.brand-name { display: block; line-height: 1.2; letter-spacing: .06em; }

/* the dark 729paper plaque needs a lift so its edge reads on the dark footer */
.site-footer .brand-mark { filter: brightness(1.14); }

.nav-links { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
.nav-links a:not(.btn) {
  position: relative;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--ink-2);
  padding: .3rem 0;
  transition: color .2s var(--ease);
}
.nav-links .nav-cta {
  margin-left: 1rem;
  padding: .95rem 1.7rem;
  font-size: .95rem;
  /* flatter than the in-page buttons: no coloured glow in the white bar */
  box-shadow: 0 3px 10px -6px color-mix(in srgb, var(--brand) 60%, transparent);
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--brand);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--brand); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-links .btn { color: #fff; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border-radius: 12px;
  place-items: center;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* Header scales down with the viewport so the brand never dominates the bar */
@media (max-width: 640px) {
  .nav-toggle { width: 40px; height: 40px; }
  .nav-toggle svg { width: 24px; height: 24px; }
}

@media (max-width: 900px) {
  :root { --header-h: 80px; }
  .brand { font-size: 1.15rem; gap: .65rem; }
  .brand-mark { height: 44px; }
  .brand small { font-size: .48rem; letter-spacing: .11em; margin-top: .25rem; line-height: 1.4; }

  .nav-toggle { display: grid; }
  /* backdrop-filter on the bar breaks the opaque mobile panel, so drop it here */
  .site-header, .site-header.is-stuck { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.5rem 1.75rem;
    background: #fff;
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform .45s var(--ease), opacity .3s var(--ease), visibility .3s;
    margin: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-links a:not(.btn) { padding: .95rem .25rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { margin-top: 1rem; margin-left: 0; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(94vh, 860px);
  display: flex;
  align-items: flex-end;
  padding-top: var(--header-h);
  color: #fff;
  overflow: hidden;
  background: linear-gradient(150deg, #2a2f38, #101216);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 12, 16, .35) 0%, rgba(10, 12, 16, .12) 35%, rgba(10, 12, 16, .78) 100%),
    linear-gradient(90deg, rgba(10, 12, 16, .55) 0%, rgba(10, 12, 16, 0) 65%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(3rem, 8vw, 6rem);
  padding-top: clamp(6rem, 22vw, 12rem);
  max-width: 900px;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .28em;
  padding: .45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(6px);
  margin-bottom: 1.5rem;
}
.hero__eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); }
.hero h1 {
  font-size: clamp(2.1rem, 6.2vw, 4.5rem);
  letter-spacing: .04em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, .38);
  margin-bottom: 1.35rem;
}
.hero h1 em { font-style: normal; color: #ffe6a8; }
.hero h1 em { color: var(--hero-em); }
.hero__lead {
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  max-width: 44ch;
  color: rgba(255, 255, 255, .9);
  margin-bottom: 2.1rem;
  font-weight: 400;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero__badge {
  position: absolute;
  right: max(1.5rem, calc((100vw - var(--maxw)) / 2));
  bottom: clamp(3rem, 8vw, 6rem);
  z-index: 3;
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  max-width: 300px;
}
.hero__badge .num { font-size: 2.3rem; font-weight: 900; color: var(--brand); line-height: 1; letter-spacing: -.01em; }
.hero__badge .num sup { font-size: .5em; top: -.6em; }
.hero__badge .lbl { font-size: .8rem; line-height: 1.5; color: var(--muted); font-weight: 500; }
@media (max-width: 900px) { .hero__badge { display: none; } }

/* ---------- Section heading ---------- */
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem; font-weight: 800;
  letter-spacing: .22em;
  color: var(--brand);
  margin-bottom: .9rem;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--brand); }
.section-head--center .eyebrow::before { display: none; }
.section-head--center .eyebrow { justify-content: center; }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.55rem); line-height: 1.3; }
.section-lead { margin-top: 1rem; color: var(--muted); font-size: 1.02rem; }

/* ---------- Project cards (image top) ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.4vw, 1.9rem);
}
@media (max-width: 700px) { .project-grid { grid-template-columns: 1fr; } }
.project {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, var(--brand-soft), #e9e9e9); }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project:hover .project__media img { transform: scale(1.06); }
.project__index {
  position: absolute; top: .9rem; left: 1.1rem;
  min-width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  padding: 0 .6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .93);
  color: var(--brand-dark);
  font-size: .95rem; font-weight: 900; letter-spacing: .04em;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45);
}
.project__body { padding: 1.5rem 1.6rem 1.75rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.project__body h3 { font-size: 1.22rem; }
.project__body p { color: var(--muted); font-size: .94rem; flex: 1; }
.pill-link {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.15rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: .84rem; font-weight: 700; letter-spacing: .04em;
  transition: gap .3s var(--ease), background .3s var(--ease);
}
.project:hover .pill-link { background: var(--brand-dark); gap: .8rem; }
.pill-link svg { width: 14px; height: 14px; }

/* ---------- Participate cards (image bg + floating panel) ---------- */
.participate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.4vw, 1.9rem);
}
@media (max-width: 1000px) { .participate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .participate-grid { grid-template-columns: 1fr; } }
.participate {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, #333, #111);
  isolation: isolate;
}
.participate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .9s var(--ease); }
.participate::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 12, 16, .05) 25%, rgba(10, 12, 16, .82) 100%);
}
.participate:hover img { transform: scale(1.06); }
.participate__body { padding: 1.6rem; color: #fff; width: 100%; }
.participate__kicker {
  display: inline-block;
  font-size: .74rem; font-weight: 800; letter-spacing: .2em;
  padding: .3rem .8rem; border-radius: 999px;
  background: var(--brand); color: #fff;
  margin-bottom: .85rem;
}
.participate__body h3 { font-size: 1.3rem; margin-bottom: .45rem; }
.participate__body p { font-size: .9rem; color: rgba(255, 255, 255, .82); margin-bottom: 1.1rem; }
.participate .pill-link { background: #fff; color: var(--brand-dark); }
.participate:hover .pill-link { background: #fff; gap: .8rem; }

/* ---------- News / activity cards ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.4vw, 1.8rem);
}
@media (max-width: 1000px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .news-grid { grid-template-columns: 1fr; } }
.news {
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.news:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--brand-soft); }
.news__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.news:hover .news__media img { transform: scale(1.05); }
.news__tag {
  position: absolute; top: .9rem; left: .9rem;
  font-size: .74rem; font-weight: 800; letter-spacing: .1em;
  padding: .3rem .8rem; border-radius: 999px;
  background: #fff; color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}
.news__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.news__date { font-size: .78rem; font-weight: 700; letter-spacing: .16em; color: var(--brand); }
.news__body h3 { font-size: 1.08rem; line-height: 1.5; }
.news__body p { font-size: .9rem; color: var(--muted); flex: 1; }
.news__more { font-size: .86rem; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: .4rem; }
.news:hover .news__more { color: var(--brand); }

/* ---------- Stats band ---------- */
.stats-band {
  position: relative;
  background: var(--brand);
  color: #fff;
  padding: clamp(3rem, 6vw, 5rem) 0;
  overflow: hidden;
}
.stats-band::before,
.stats-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  pointer-events: none;
}
.stats-band::before { width: 420px; height: 420px; top: -180px; right: -90px; }
.stats-band::after { width: 280px; height: 280px; bottom: -160px; left: -60px; }
.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.stat .num {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
}
.stat .num sup { font-size: .45em; top: -.75em; }
.stat .lbl { margin-top: .6rem; font-size: .95rem; font-weight: 600; letter-spacing: .08em; }
.stat .note { margin-top: .45rem; font-size: .82rem; color: rgba(255, 255, 255, .78); }

/* ---------- Video band (chevron) ---------- */
.video-band {
  position: relative;
  background: var(--brand-deep);
  padding: clamp(5rem, 12vw, 9rem) 0;
  clip-path: polygon(0 6%, 50% 0, 100% 6%, 100% 94%, 50% 100%, 0 94%);
  color: #fff;
}

.video-inner { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .video-inner { grid-template-columns: 1fr 1.6fr; gap: 3.5rem; } }
.video-copy h2 { font-size: clamp(1.4rem, 2.7vw, 2.2rem); color: #fff; margin-bottom: 1rem; }
.video-copy p { color: rgba(255, 255, 255, .88); max-width: 40ch; }
.video-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-lg);
  background: #000;
}
.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform .8s var(--ease); }
.video-frame:hover img { transform: scale(1.04); }
.play-btn {
  position: absolute; inset: 0; margin: auto;
  width: 88px; height: 88px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--brand-dark);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .55);
  transition: transform .35s var(--ease);
}
.play-btn:hover { transform: scale(1.08); }
.play-btn svg { width: 30px; height: 30px; margin-left: 4px; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(2.25rem, 5vw, 4rem);
  background: linear-gradient(135deg, var(--ink) 0%, #2c3340 100%);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--brand) 70%, transparent), transparent 70%);
}
.cta-band > div { position: relative; max-width: 620px; }
.cta-band .eyebrow { color: #ffd9a0; }
.cta-band .eyebrow { color: var(--cta-eyebrow); }
.cta-band .eyebrow::before { background: currentColor; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: .7rem; }
.cta-band p { color: rgba(255, 255, 255, .78); font-size: .98rem; }
.cta-band .btn { position: relative; }

/* ---------- Contact strip ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width: 1000px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.contact-card:hover { border-color: var(--brand); transform: translateY(-4px); }
.contact-card .ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark);
  margin-bottom: 1rem;
}
.contact-card .ico svg { width: 22px; height: 22px; }
.contact-card h3 { font-size: .95rem; margin-bottom: .35rem; letter-spacing: .06em; }
.contact-card a, .contact-card p { font-size: .95rem; color: var(--muted); font-weight: 500; }
.contact-card a:hover { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { background: #101216; color: rgba(255, 255, 255, .72); padding: clamp(3rem, 6vw, 5rem) 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer .brand small { color: rgba(255, 255, 255, .45); }
.footer-about { font-size: .9rem; line-height: 1.8; max-width: 34ch; margin-bottom: 1.3rem; }
.social-row { display: flex; gap: .6rem; }
.social-row a {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.social-row a:hover { background: var(--brand); transform: translateY(-3px); }
.social-row svg { width: 18px; height: 18px; }
.footer-col h3 { font-size: .82rem; letter-spacing: .2em; color: #fff; margin-bottom: 1.15rem; font-weight: 800; }
.footer-col li { margin-bottom: .65rem; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.newsletter p { font-size: .88rem; margin-bottom: 1rem; }
.newsletter form { display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter input {
  flex: 1 1 130px;
  min-width: 0;
  padding: .7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font: inherit;
  font-size: .88rem;
}
.newsletter input::placeholder { color: rgba(255, 255, 255, .4); }
.newsletter input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.newsletter .btn { padding: .7rem 1.35rem; font-size: .85rem; }
@media (max-width: 560px) {
  .newsletter input { flex: 1 1 100%; }
  .newsletter .btn { flex: 1 1 100%; justify-content: center; }
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 1.5rem 0;
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  font-size: .82rem;
  color: rgba(255, 255, 255, .5);
}
.footer-bottom .legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Reveal on scroll (only when JS is available) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   WordPress: layout chrome, inner pages, entries, comments
   ============================================================ */

body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

.skip-link {
  position: fixed; left: 1rem; top: -100px; z-index: 200;
  padding: .75rem 1.25rem; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 700;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 1rem; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* page wrapper spacing below the fixed header */
.page-main { padding-top: var(--header-h); }

/* --- page hero (inner pages) --- */
.page-hero {
  position: relative;
  background: var(--brand-deep);
  color: #fff;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3.5rem, 9vw, 6rem);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
}
.page-hero .eyebrow { color: rgba(255, 255, 255, .8); }
.page-hero .eyebrow::before { background: currentColor; }
.page-hero h1 { font-size: clamp(1.8rem, 4.4vw, 3rem); }
.page-hero p { color: rgba(255, 255, 255, .82); max-width: 60ch; margin-top: .9rem; }

/* --- generic entry content --- */
.entry-content { max-width: 780px; }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin-top: 2em; }
.entry-content h3 { font-size: 1.2rem; margin-top: 1.6em; }
.entry-content p, .entry-content li { color: var(--ink-2); }
.entry-content ul { list-style: disc; padding-left: 1.4em; }
.entry-content ol { list-style: decimal; padding-left: 1.4em; }
.entry-content a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
  margin: 1.5em 0; padding: 1.1rem 1.4rem;
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: normal;
}
.entry-content img, .entry-content iframe { border-radius: var(--radius); max-width: 100%; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: .82rem; color: var(--muted); text-align: center; margin-top: .5rem; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--cream); font-weight: 700; }

/* --- post meta / cards list --- */
.entry-header { margin-bottom: 1.6rem; }
.entry-meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  font-size: .82rem; letter-spacing: .06em; color: var(--muted);
  margin-bottom: .7rem;
}
.entry-meta a { color: var(--brand-dark); font-weight: 700; }
.entry-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.3; }
.entry-thumb { margin: 0 0 2rem; }
.entry-thumb img { width: 100%; border-radius: var(--radius-lg); }

.post-list { display: grid; gap: clamp(1.1rem, 2.4vw, 1.8rem); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .post-list { grid-template-columns: 1fr; } }

.post-card { display: flex; flex-direction: column; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--brand-soft); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.post-card__body h2, .post-card__body h3 { font-size: 1.08rem; line-height: 1.5; }
.post-card__body p { font-size: .9rem; color: var(--muted); flex: 1; }
.post-card__meta { font-size: .78rem; font-weight: 700; letter-spacing: .14em; color: var(--brand); }

/* --- pagination --- */
.pagination { margin-top: clamp(2rem, 4vw, 3rem); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 0; }
.pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .8rem;
  border-radius: 999px; border: 1px solid var(--line);
  font-size: .9rem; font-weight: 700; color: var(--ink-2);
  transition: all .25s var(--ease);
}
.pagination .page-numbers:hover { border-color: var(--brand); color: var(--brand); }
.pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* --- comments --- */
.comments-area { margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); padding-top: 2rem; }
.comments-title { font-size: 1.3rem; margin-bottom: 1.5rem; }
.comment-list { display: grid; gap: 1.25rem; margin-bottom: 2rem; }
.comment-list .comment { padding: 1.25rem 1.4rem; border-radius: var(--radius); background: var(--cream); }
.comment-list .children { list-style: none; margin: 1.25rem 0 0; padding-left: 1.5rem; display: grid; gap: 1.25rem; }
.comment-author { font-weight: 700; }
.comment-metadata { font-size: .8rem; color: var(--muted); margin-bottom: .6rem; }
.comment-form { display: grid; gap: 1rem; }
.comment-form label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .35rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: .8rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); font: inherit; font-size: .95rem; background: #fff;
}
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.comment-form .submit, .comment-form input[type="submit"] {
  justify-self: start; padding: .85rem 1.9rem; border-radius: 999px; border: 0;
  background: var(--brand); color: #fff; font-weight: 700; letter-spacing: .04em; cursor: pointer;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.comment-form .submit:hover, .comment-form input[type="submit"]:hover { background: var(--brand-dark); transform: translateY(-2px); }

/* --- search form --- */
.search-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-form label { flex: 1 1 100%; font-size: .85rem; font-weight: 700; }
.search-form input[type="search"] {
  flex: 1 1 200px; padding: .8rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line); font: inherit; font-size: .95rem;
}
.search-form input[type="search"]:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.search-form .search-submit {
  padding: .8rem 1.6rem; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 700; cursor: pointer;
}

/* --- 404 --- */
.error-404 { text-align: center; padding: clamp(3rem, 9vw, 7rem) 0; }
.error-404 .code { font-size: clamp(4rem, 14vw, 9rem); font-weight: 900; line-height: 1; color: var(--brand); letter-spacing: -.03em; }
.error-404 p { color: var(--muted); max-width: 46ch; margin: 1rem auto 2rem; }

/* --- footer widgets --- */
.footer-col .widget { margin-bottom: 1.75rem; }
.footer-col .widget:last-child { margin-bottom: 0; }
.footer-col .widget-title, .footer-col .widgettitle, .footer-col h2 { font-size: .82rem; letter-spacing: .2em; color: #fff; margin-bottom: 1.15rem; font-weight: 800; }
.footer-col ul li { margin-bottom: .65rem; font-size: .9rem; }
.footer-col ul li a:hover { color: #fff; }

/* --- Elementor alignment helpers --- */
.elementor-widget-heading .elementor-heading-title { margin: 0; }
.hero .elementor-widget-button { display: inline-block; margin-right: .9rem; }
.hero .elementor-button, .btn-elementor .elementor-button {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .95rem 1.75rem; border-radius: 999px; border: 0;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: .04em;
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.hero .elementor-button:hover, .btn-elementor .elementor-button:hover { background: var(--brand-dark); transform: translateY(-3px); }
.hero .elementor-button-text { color: inherit; }

/* ============================================================
   Elementor glue — lets native widgets reproduce this design
   ============================================================ */

.elementor .hero > .elementor-container { width: 100%; align-items: flex-end; }
.hero .elementor-widget-heading .elementor-heading-title { color: #fff; margin: 0; }
.hero .hero__eyebrow .elementor-heading-title { font-size: .8rem; font-weight: 700; letter-spacing: .28em; }
.hero .elementor-widget-button { display: inline-block; margin-right: .9rem; }
.hero .elementor-button, .kaifang-card .elementor-button {
	background: var(--brand); color: #fff; border-radius: 999px;
	padding: .95rem 1.75rem; font-size: .95rem; font-weight: 700; letter-spacing: .04em;
	transition: transform .3s var(--ease), background .3s var(--ease);
}
.hero .elementor-button:hover { background: var(--brand-dark); transform: translateY(-3px); }
.hero .kaifang-ghost .elementor-button { background: transparent; box-shadow: inset 0 0 0 2px #fff; }
.hero .kaifang-ghost .elementor-button:hover { background: rgba(255, 255, 255, .14); }

.kaifang-row > .elementor-container { gap: clamp(1.1rem, 2.4vw, 1.9rem); }
.kaifang-row { margin-bottom: clamp(1.1rem, 2.4vw, 1.9rem); }
.section-head.elementor-section { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head--center.elementor-section { margin-inline: auto; text-align: center; }
.section-head .elementor-heading-title { margin: 0; }
.section-head .eyebrow .elementor-heading-title { font-size: .82rem; font-weight: 800; letter-spacing: .22em; color: var(--brand); }
.section-head .section-title .elementor-heading-title { font-size: clamp(1.6rem, 3.4vw, 2.55rem); line-height: 1.3; font-weight: 900; }
.section-head .elementor-widget-text-editor p { margin: 1rem 0 0; color: var(--muted); }

.kaifang-card {
	background: #fff; border-radius: var(--radius-lg); overflow: hidden;
	box-shadow: var(--shadow-sm); transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.kaifang-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.kaifang-card > .elementor-widget-wrap { padding: 0; }
.kaifang-card .elementor-widget-image { margin: 0; }
.kaifang-card .elementor-widget-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; border-radius: 0; }
.kaifang-card .elementor-widget-heading { padding: 1.4rem 1.6rem 0; }
.kaifang-card .elementor-widget-text-editor { padding: .7rem 1.6rem 0; }
.kaifang-card .elementor-widget-button { padding: 1.1rem 1.6rem 1.7rem; }
.kaifang-card h3 { font-size: 1.22rem; line-height: 1.35; margin: 0; font-weight: 900; }
.kaifang-card .elementor-widget-text-editor p { margin: 0; color: var(--muted); font-size: .94rem; }
.kaifang-card .elementor-button { padding: .55rem 1.15rem; font-size: .84rem; }
.kaifang-card .news__tag .elementor-heading-title,
.kaifang-card .participate__kicker .elementor-heading-title {
	display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .1em;
	padding: .3rem .8rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
}
.kaifang-card .news__date .elementor-heading-title { font-size: .78rem; font-weight: 700; letter-spacing: .16em; color: var(--brand); }

.stats-band > .elementor-container { position: relative; }
.stats-band .stat { text-align: center; }
.stats-band .stat .num .elementor-heading-title { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 900; line-height: 1; color: #fff; }
.stats-band .stat .lbl .elementor-heading-title { font-size: .95rem; font-weight: 600; letter-spacing: .08em; color: #fff; margin-top: .6rem; }
.stats-band .stat .elementor-widget-text-editor p { color: rgba(255, 255, 255, .78); font-size: .82rem; margin: .45rem 0 0; }

.video-band .video-copy .elementor-heading-title { color: #fff; }
.video-band .video-copy h2.elementor-heading-title { font-size: clamp(1.4rem, 2.7vw, 2.2rem); }
.video-band .video-copy .elementor-widget-text-editor p { color: rgba(255, 255, 255, .88); }
.video-band .video-frame img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

.cta-band > .elementor-container { align-items: center; }
.cta-band .elementor-heading-title { color: #fff; }
.cta-band .elementor-widget-text-editor p { color: rgba(255, 255, 255, .78); }
.cta-band .elementor-button { background: #fff; color: var(--brand-dark); border-radius: 999px; padding: .95rem 1.75rem; font-weight: 700; }

.contact-card { padding: 1.75rem 1.5rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.contact-card .ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 1rem; }
.contact-card .ico svg { width: 22px; height: 22px; }
.contact-card h3 { font-size: .95rem; margin: 0 0 .35rem; letter-spacing: .06em; }
.contact-card p, .contact-card a { font-size: .95rem; color: var(--muted); font-weight: 500; margin: 0; }

/* ============================================================
   WordPress menu wrapper (wp_nav_menu output)
   ============================================================ */
.nav-links > ul { display: flex; align-items: center; gap: 1.5rem; margin: 0; }
.nav-links > ul > li { display: block; margin: 0; }
.nav-links > ul > li > a { display: inline-block; }
.nav-links > ul .current-menu-item > a,
.nav-links > ul .current_page_item > a { color: var(--brand); }
@media (max-width: 900px) {
	.nav-links > ul { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-links > ul > li > a { display: block; }
}
