/* =============================================================
 * pupu-landing shared chrome
 * -------------------------------------------------------------
 * Single source of truth for the nav pill, footer, and other
 * chrome that all 24 static HTML pages used to duplicate.
 *
 * Load order in each page:
 *   <link rel="preload" href="/fonts/OPPO-Sans-4.0.woff2" as="font" ...>
 *   <link rel="stylesheet" href="/shared/chrome.css">
 *   <script src="/shared/chrome.js" defer></script>
 *
 * Site-wide unification: nav pill, footer, font, reset, brand
 * colors, selection color are all defined exactly once here.
 * ============================================================= */

/* ===== Font (variable, local, GB2312 subset 2.7MB) ===== */
@font-face {
  font-family: 'OPPO Sans 4.0';
  src: url('/fonts/OPPO-Sans-4.0.woff2') format('woff2-variations'),
       url('/fonts/OPPO-Sans-4.0.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: optional;
}

/* ===== Brand tokens (single source of truth for the static site) =====
   These mirror tailwind.config.js so React pages and static pages
   stay in sync. Keep names stable — they're a contract. */
:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-2: #3a3a3a;
  --color-muted: #8a8a8a;
  --color-brand: #E71219;
  --color-line: #EDE7DE;
  --color-line-2: #E8E2D5;
  /* Brand red at 15% alpha — a soft pink wash that ties the inner
     block (e.g. .contact-card-side, .partner-card-side) to the site
     palette without competing with the copy. Tweak alpha, not hex, to
     change intensity. */
  --color-brand-soft: rgba(231, 18, 25, 0.15);
  --font-display: 'OPPO Sans 4.0', -apple-system, BlinkMacSystemFont,
    'PingFang SC', sans-serif;
  --font-body: 'OPPO Sans 4.0', -apple-system, BlinkMacSystemFont,
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--color-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--color-brand); color: #fff; }

/* ===== Nav pill (mount point) =====
   The nav block is injected by chrome.js into <div id="pupu-nav"
   data-current="...">. We reserve the vertical space so the page
   doesn't jump when JS hydrates. */
#pupu-nav {
  width: 100%;
  padding: 16px 0 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative; /* host for the absolute-positioned logo */
  min-height: 56px; /* pill height + 16px top padding */
}
/* Logo — 站点 logo，绝对定位在左上角，不占 flex 槽位让菜单仍居中 */
#pupu-nav .pupu-nav-logo {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}
#pupu-nav .pupu-nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}
#pupu-nav .pupu-nav-pill {
  border-radius: 50px;
  background: #ffffff;
  border: 1px solid var(--color-line);
  box-shadow: 0 8px 24px rgba(24, 99, 220, 0.05);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
}
#pupu-nav .pupu-nav-link {
  font-size: 10px;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease;
  display: inline-flex;
  align-items: center;
}
#pupu-nav .pupu-nav-link:hover {
  color: var(--color-brand);
  text-decoration: none;
}
/* Hide the link whose pageId matches the current page */
#pupu-nav[data-current] [data-current-page] { display: none; }

/* Responsive sizing — mirrors the React <Nav> component tokens */
@media (min-width: 640px) {
  #pupu-nav .pupu-nav-pill { gap: 20px; }
  #pupu-nav .pupu-nav-link { font-size: 12px; }
}
@media (min-width: 768px) {
  #pupu-nav { padding-left: 24px; padding-right: 24px; }
  #pupu-nav .pupu-nav-logo { left: 24px; }
  #pupu-nav .pupu-nav-logo img { height: 36px; }
  #pupu-nav .pupu-nav-pill { padding: 8px 32px; gap: 40px; }
  #pupu-nav .pupu-nav-link { font-size: 14px; }
}
@media (min-width: 1024px) {
  #pupu-nav { padding-left: 32px; padding-right: 32px; }
  #pupu-nav .pupu-nav-logo { left: 32px; }
  #pupu-nav .pupu-nav-pill { gap: 48px; }
}

/* ===== Footer (mount point) =====
   Pages put <footer class="pupu-footer">…</footer> in their body.
   chrome.js doesn't touch this — only the nav is injected. */
.pupu-footer {
  border-top: 1px solid var(--color-line);
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.6;
}
.pupu-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pupu-footer-inner > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.pupu-footer .sep { margin: 0 4px; color: var(--color-line); }
.pupu-footer a { color: var(--color-muted); text-decoration: none; }
.pupu-footer a:hover { color: var(--color-brand); text-decoration: none; }
.pupu-footer-credit {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 16px;
  text-align: right;
  font-size: 11px;
  color: var(--color-muted);
}
.pupu-footer-credit a {
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pupu-footer-credit a:hover { color: var(--color-brand); }

/* ===== Scroll reveal (mount point) =====
   Pages mark elements with .reveal; chrome.js adds .in on scroll. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =============================================================

/* pupu-landing chrome.css is desktop-only (2026-06-09). */
