/* ==========================================================
   global.css — Base typography & WP layout resets
   Always loaded on every page.
   ========================================================== */

/* ── Base font size (1rem = 18px, matching production) ──── */
html {
  font-size: 112.5%;
}

/* ── Google Fonts typography ─────────────────────────────── */
body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Noto Serif TC", Georgia, serif;
}

/* ── Remove default block gap between header/main/footer ─── */
/*
 * WordPress injects gap via TWO mechanisms:
 *   1. flexbox gap on .wp-site-blocks
 *   2. margin-block-start on each child after the first
 * Both must be zeroed. Also clear any root padding that
 * useRootPaddingAwareAlignments may inject on .wp-site-blocks.
 */
.wp-site-blocks {
  gap: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Header bottom: no margin leaking below the sticky bar */
header.wp-block-template-part {
  margin-block-end: 0 !important;
}

/* Footer top: no gap between main content and footer */
footer.wp-block-template-part {
  margin-block-start: 0 !important;
}

/* Main top: no margin pushing content away from the header */
.wp-site-blocks > main {
  margin-block-start: 0 !important;
}

/* Zero WP block gap between patterns inside main */
main.wp-block-group {
  --wp--style--block-gap: 0;
}

main.wp-block-group > * {
  margin-block-start: 0 !important;
}

/* ── Responsive heading sizes ─────────────────────────────── */
@media (max-width: 768px) {
  h1.wp-block-heading {
    font-size: clamp(2rem, 8vw, 3rem) !important;
  }

  h2.wp-block-heading {
    font-size: 1.5rem !important;
  }
}
