/* Shared foundation. Independent 1920px desktop and 390px mobile canvases. */
:root {
  --design-unit: calc(100vw / 1920);
  --font-body: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Montserrat", "PingFang SC", "Microsoft YaHei", sans-serif;
  --color-dark: #140700;
  --color-ink: #100601;
  --color-orange: #f55838;
}
html:lang(zh-CN) {
  --font-body: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Montserrat", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html:lang(zh-TW) {
  --font-body: "Manrope", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Montserrat", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
/* Desktop review: Chinese uses the real Noto weights, including Latin text
   inside Chinese headings. Mobile keeps its own established metrics below. */
@media (min-width: 769px) {
  html:lang(zh-CN) {
    --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-display: var(--font-body);
  }
  html:lang(zh-TW) {
    --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    --font-display: var(--font-body);
  }
  html[lang^="zh-"] .section-label { font-weight: 400; }
  html[lang^="zh-"] .section-title { font-weight: 900; }
}
html.fonts-pending body {
  visibility: hidden;
}
/* The SC language label must remain available when the page uses the TC subset. */
[data-language="zhCN"] { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
html.fonts-fallback:lang(en) {
  --font-body: Arial, sans-serif;
  --font-display: Arial, sans-serif;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--color-dark);
  color: white;
  font-family: var(--font-body);
  word-break: normal;
  overflow-wrap: break-word;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
img {
  display: block;
  max-width: 100%;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #ff9000;
  outline-offset: 6px;
}
button,
a,
summary {
  touch-action: manipulation;
}
section {
  scroll-margin-top: calc(145 * var(--design-unit));
}
.site {
  overflow: clip;
}
.section-label {
  font: 500 calc(24 * var(--design-unit)) / 1.2 var(--font-display);
  letter-spacing: calc(3.12 * var(--design-unit));
}
.section-title {
  font: 800 calc(126 * var(--design-unit)) / calc(116 * var(--design-unit))
    var(--font-display);
}
.section-label strong {
  font-weight: 700;
}
.section-label em {
  font-style: normal;
  color: var(--color-orange);
}
.skip-link {
  position: fixed;
  z-index: 100;
  left: 20px;
  top: 0;
  translate: 0 -150%;
  padding: 12px;
  background: #fff;
  color: #140700;
}
.skip-link:focus {
  translate: 0 0;
}
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    transition:
      opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
      translate 0.9s cubic-bezier(0.22, 1, 0.36, 1),
      scale 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
  }
  html.has-js [data-reveal="text"]:not(.is-inview) {
    opacity: 0;
    translate: 0 40px;
  }
  html.has-js [data-reveal="image"]:not(.is-inview) {
    opacity: 0;
    translate: 0 36px;
    scale: 1.06;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
@media (max-width: 768px) {
  :root { --design-unit: 1px; }
  html { font-size: calc(100vw / 3.9); }
  html:lang(zh-TW) {
    --font-body: "Manrope", "Noto Sans SC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    --font-display: "Montserrat", "Noto Sans SC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  }
  body { font-size: .16rem; }
  section { scroll-margin-top: .8rem; }
  .section-label { font-size: .18rem; line-height: 1.2; letter-spacing: .0234rem; font-weight: 400; }
  .section-title { font-size: .46rem; line-height: .55rem; }
  html[lang^="zh-"] .section-title { font-weight: 900; }
  html:lang(zh-CN) .section-title { font-family: "Montserrat", "MAESO Heading SC", sans-serif; }
  html:lang(zh-TW) .section-title { font-family: "Montserrat", "MAESO Heading TC", sans-serif; }
  html.has-js [data-reveal="text"]:not(.is-inview) { translate: 0 .28rem; }
  html.has-js [data-reveal="image"]:not(.is-inview) { translate: 0 .28rem; scale: 1.04; }
}
