/* ==========================================================================
   OBAIBO — Design System
   科技洁净风 · 蓝主绿辅 · 克制动效
   零框架，纯 CSS 变量。改任何设计只动 :root。
   ========================================================================== */

:root {
  /* --- Brand palette --- */
  --blue-50:  #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;   /* primary */
  --blue-700: #1D4ED8;   /* primary hover */
  --green-50: #ECFDF5;
  --green-400:#34D399;
  --green-500:#10B981;   /* accent / success */
  --green-600:#059669;

  /* --- Ink / neutrals --- */
  --ink-900: #0F172A;    /* deep navy — dark sections, headings */
  --ink-800: #1E293B;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;    /* muted text */
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;    /* borders */
  --ink-100: #F1F5F9;
  --paper:   #FFFFFF;
  --mist:    #F8FAFC;    /* light page bg */

  /* --- Type --- */
  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* --- Radius / shadow / motion --- */
  --radius:    14px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 10px 30px -12px rgba(15,23,42,.18);
  --shadow-lg: 0 24px 60px -20px rgba(15,23,42,.28);
  --shadow-blue: 0 12px 28px -10px rgba(37,99,235,.45);
  --ring: 0 0 0 4px rgba(37,99,235,.16);
  --ease: cubic-bezier(.16,.84,.44,1);

  /* --- Layout --- */
  --container: 1200px;
  --gap: 24px;
  --header-h: 68px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink-700);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html:lang(zh) body { line-height: 1.75; }   /* 中文更透气 */

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-900); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
.h-display { font-size: clamp(2.4rem, 5vw, 4rem); }
h1, .h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2, .h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3, .h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-600); }
.muted { color: var(--ink-500); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--blue-600);
}
.text-grad {
  background: linear-gradient(100deg, var(--blue-600), var(--green-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--ink-900); color: var(--ink-300); }
.section--dark h2, .section--dark h3, .section--dark .h1, .section--dark .h2 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 14px; }

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  white-space: nowrap; will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-blue); }
.btn--primary:hover { background: var(--blue-700); }
.btn--dark { background: var(--ink-900); color: #fff; }
.btn--dark:hover { background: var(--ink-800); }
.btn--ghost { background: transparent; color: var(--ink-800); box-shadow: inset 0 0 0 1.5px var(--ink-200); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--blue-600); color: var(--blue-700); }
.btn--light { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); }
.btn--light:hover { background: rgba(255,255,255,.18); }
.btn--lg { padding: 16px 28px; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--paper); border: 1px solid var(--ink-200);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-100); }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-600); margin-bottom: 18px;
}
.card__icon svg { width: 24px; height: 24px; }
.card--dark { background: var(--ink-800); border-color: rgba(255,255,255,.08); color: var(--ink-300); box-shadow: none; }
.card--dark h3 { color: #fff; }
.card--dark .card__icon { background: rgba(37,99,235,.16); color: var(--blue-400); }

/* --------------------------------------------------------------------------
   Pills / badges
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 6px 13px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--blue-50); color: var(--blue-700);
}
.pill--green { background: var(--green-50); color: var(--green-600); }
.pill--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--live { background: rgba(16,185,129,.14); color: var(--green-500); }
.pill--live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); animation: pulse-dot 1.8s var(--ease) infinite; }

/* --------------------------------------------------------------------------
   Stat row
   -------------------------------------------------------------------------- */
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--ink-900); letter-spacing: -.02em; line-height: 1; }
.stat__label { margin-top: 8px; font-size: .9rem; color: var(--ink-500); }
.section--dark .stat__num { color: #fff; }
.section--dark .stat__label { color: var(--ink-300); }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255,255,255,.8); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--ink-200); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; height: 100%; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; color: var(--ink-900); letter-spacing: -.01em; }
.brand__mark { width: 30px; height: 30px; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav__link { padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: .95rem; color: var(--ink-600); transition: color .2s, background .2s; }
.nav__link:hover { color: var(--ink-900); background: var(--ink-100); }
.nav__link.is-active { color: var(--blue-700); }
.nav__spacer { margin-left: auto; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--ink-600); box-shadow: inset 0 0 0 1.5px var(--ink-200); transition: box-shadow .2s, color .2s; }
.lang-switch:hover { color: var(--blue-700); box-shadow: inset 0 0 0 1.5px var(--blue-600); }
.nav__toggle { display: none; width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center; color: var(--ink-800); }
.nav__toggle svg { width: 24px; height: 24px; }

@media (max-width: 940px) {
  .nav__links { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); padding: 16px; border-bottom: 1px solid var(--ink-200); box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; margin: 0; }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__link { padding: 12px 14px; font-size: 1rem; }
  .nav__toggle { display: inline-flex; }
  .nav__cta-desktop { display: none; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink-900); color: var(--ink-300); padding-block: 64px 32px; }
.site-footer a { color: var(--ink-300); transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-body); }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-500); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { display: grid; gap: 7px; }
.field > label { font-size: .88rem; font-weight: 600; color: var(--ink-700); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--paper); border: 1.5px solid var(--ink-200); transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue-600); box-shadow: var(--ring); }
.input::placeholder { color: var(--ink-300); }

/* --------------------------------------------------------------------------
   Reveal on scroll (克制：淡入 + 轻微上移)
   -------------------------------------------------------------------------- */
/* 渐进增强：无 JS 时内容默认可见（.reveal 无效）；仅 html.js 下才启用滚动淡入 */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
[data-reveal-stagger] > * { transition-delay: calc(var(--i, 0) * 70ms); }

@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.6); opacity: 0; } }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-sm { gap: 10px; } .gap-md { gap: 16px; } .gap-lg { gap: 24px; }
.wrap { flex-wrap: wrap; }
.mt-sm { margin-top: 12px; } .mt-md { margin-top: 24px; } .mt-lg { margin-top: 40px; }
.divider { height: 1px; background: var(--ink-200); border: 0; }
.hide { display: none !important; }
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Reduced motion — 尊重系统偏好，关掉一切非必要动效
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
