/* 蜂窝科技出海 — design tokens, reset, shared components.
   Light, warm, honeycomb. One typeface (Manrope for Latin + numerals, PingFang SC for Chinese),
   one accent (honey), flat surfaces separated by tone steps. */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113;
}

:root {
  /* colour */
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f5f5f2;
  --surface-3: #edede8;
  --honey-tint: #fbebc7;
  --honey-tint-2: #fdf3dc;
  --ink: #17140e;
  --ink-2: #45403a;
  --muted: #6e685c;
  --honey: #e8a11c;
  --honey-hi: #f2b23e;
  --honey-deep: #96600a;
  --honey-ink: #2a1d03;
  --line: #e7e3d8;

  /* type */
  --font: 'Manrope', 'PingFang SC', 'HarmonyOS Sans SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-30: 1.875rem;
  --fs-36: 2.25rem;
  --fs-48: 3rem;
  --fs-60: 3.75rem;
  --lh-tight: 1.1;
  --lh-body: 1.7;

  /* frame */
  --margin: clamp(1rem, 4vw, 2.5rem);
  --section: 96px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --max: 1180px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 200ms;
  --t-base: 320ms;
  --t-slow: 600ms;
  --t-reveal: 780ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-18);
  line-height: var(--lh-body);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd, fieldset { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
fieldset { border: 0; padding: 0; }
:target { scroll-margin-top: 7rem; }
::selection { background: var(--honey); color: var(--honey-ink); }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; border-radius: 4px; }

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  text-wrap: balance;
  hyphens: none;
}
h1 { font-size: var(--fs-60); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: var(--fs-36); }
h3 { font-size: var(--fs-24); line-height: 1.3; letter-spacing: -0.015em; }
h4 { font-size: var(--fs-20); line-height: 1.35; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
strong, b { font-weight: 700; }
em { font-style: normal; font-weight: 700; }

.lead { font-size: var(--fs-20); line-height: 1.6; color: var(--ink-2); }
.small { font-size: var(--fs-14); line-height: 1.6; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- frame ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--margin); }
.section { padding-block: var(--section); }
.section--tight { padding-block: 64px; }
.section--surface { background: var(--surface-2); }
.section--honey { background: var(--honey-tint); }
.section-head { max-width: 46em; }
.section-head h2 + p { margin-top: 16px; }
.center { text-align: center; margin-inline: auto; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--honey);
  color: var(--honey-ink);
  font-size: var(--fs-16);
  font-weight: 700;
  letter-spacing: 0;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn:hover { background: var(--honey-hi); }
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: var(--fs-14); border-radius: 8px; }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #2c2620; }
.btn--ghost { background: var(--surface); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-3); }
.btn--block { width: 100%; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--honey-deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--honey) 55%, transparent);
  transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease);
}
.link:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ---------- tags, motif ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--honey-tint);
  color: var(--honey-deep);
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.5;
}
.tag--plain { background: var(--surface-2); color: var(--ink-2); }
.hex { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }
.hex-ico { width: 1em; height: 1.12em; clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); background: var(--honey); flex: none; }

.card { background: var(--surface); border-radius: var(--radius-lg); }
.card--sm { border-radius: var(--radius); }

/* ---------- helpers ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 80;
  padding: 10px 16px; border-radius: 8px;
  background: var(--ink); color: #fff; font-weight: 700;
  transform: translateY(-160%); transition: transform var(--t-base) var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(32px); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal] { transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease); }
.js [data-reveal] > [data-stagger] { opacity: 0; transform: translateY(24px); transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease); }
.js [data-reveal].is-in > [data-stagger] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal], .js [data-reveal] > [data-stagger] { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 900px) {
  :root { --section: 64px; --fs-60: 2.75rem; --fs-48: 2.25rem; --fs-36: 1.875rem; --fs-30: 1.5rem; }
  body { font-size: var(--fs-16); }
  h1 { font-size: var(--fs-48); }
  h2 { font-size: var(--fs-30); }
  h3 { font-size: var(--fs-20); }
}
@media (max-width: 560px) {
  :root { --fs-48: 2.125rem; --fs-30: 1.625rem; }
  h1 { font-size: 2.125rem; }
  h2 { font-size: 1.625rem; }
}

/* =====================================================================
   Motion layer (see references/motion.md): tokens, one masked headline,
   one marquee, press/hover feedback, reduced-motion finished states.
   ===================================================================== */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 120ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 640ms;
  --t-open: 1100ms;
  --stagger-line: 90ms;
  --stagger-item: 60ms;
}

/* ---------- masked headline (the page's signature move) ---------- */
.mask-line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.mask-line > span {
  display: block;
  will-change: transform;
}
.js .mask-line > span {
  transform: translateY(114%);
  transition: transform 900ms var(--ease-expo);
  transition-delay: calc(var(--i, 0) * var(--stagger-line) + 80ms);
}
.js.is-ready .mask-line > span { transform: none; }

/* ---------- marquee (one per page, pausable) ---------- */
.marquee { overflow: hidden; position: relative; }
.marquee__track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- under the hand ---------- */
.btn { transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease, border-color var(--t-hover) ease; }
.btn:active { transform: translateY(1px) scale(0.995); }
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity var(--t-reveal) var(--ease-expo), transform var(--t-reveal) var(--ease-expo); }
.js [data-reveal] > [data-stagger] { opacity: 0; transform: translateY(18px); transition: opacity 520ms var(--ease-expo), transform 520ms var(--ease-expo); }
.js [data-reveal].is-in > [data-stagger] { opacity: 1; transform: none; }
.js [data-reveal].is-in > [data-stagger]:nth-child(2) { transition-delay: 70ms; }
.js [data-reveal].is-in > [data-stagger]:nth-child(3) { transition-delay: 140ms; }
.js [data-reveal].is-in > [data-stagger]:nth-child(4) { transition-delay: 210ms; }
.js [data-reveal].is-in > [data-stagger]:nth-child(5) { transition-delay: 280ms; }
.js [data-reveal].is-in > [data-stagger]:nth-child(n + 6) { transition-delay: 340ms; }

/* ---------- accent themes ---------- */
html[data-accent='blue'] {
  --honey: #2563eb;
  --honey-hi: #4b82f6;
  --honey-deep: #1746a3;
  --honey-tint: #dbe8fe;
  --honey-tint-2: #eef5ff;
  --honey-ink: #ffffff;
}
html[data-accent='jade'] {
  --honey: #0e8a6a;
  --honey-hi: #2fa886;
  --honey-deep: #0a6249;
  --honey-tint: #d0efe5;
  --honey-tint-2: #e9f8f2;
  --honey-ink: #ffffff;
}

/* ---------- dark scheme (opt-in, warm charcoal, never pure black) ---------- */
html[data-scheme='dark'] {
  color-scheme: dark;
  --bg: #17130d;
  --surface: #201a13;
  --surface-2: #28221a;
  --surface-3: #322a21;
  --ink: #f7f3e8;
  --ink-2: #ddd6c7;
  --muted: #a89f8d;
  --line: #3a332a;
  --honey-deep: #f3b64a;
  --honey-hi: #f7c76a;
  --honey-tint: #3b2b0d;
  --honey-tint-2: #251d0d;
  --honey-ink: #1a1204;
}
html[data-scheme='dark'][data-accent='blue'] { --honey: #4b82f6; --honey-hi: #6fa0ff; --honey-deep: #a9c6ff; --honey-tint: #122444; --honey-tint-2: #0d1a30; --honey-ink: #08152b; }
html[data-scheme='dark'][data-accent='jade'] { --honey: #2fa886; --honey-hi: #54c4a4; --honey-deep: #8fdec9; --honey-tint: #0f3128; --honey-tint-2: #0a241d; --honey-ink: #04150f; }

/* colour changes between themes should glide, not snap */
body, .topbar, .hero__panel, .card, .industry, .price-card, .faq__item, .cta__card, .ui, .footer, .mobile-menu { transition: background-color var(--t-ui) ease, color var(--t-ui) ease, border-color var(--t-ui) ease; }

/* ---------- reduced motion: finished states only ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .mask-line > span { transform: none !important; transition: none !important; }
  .marquee__track { animation: none !important; }
  .hero__panel { animation: none !important; }
  .ui-rank__chart polyline:last-of-type { stroke-dashoffset: 0 !important; animation: none !important; }
}
