/* ==========================================================================
   OPENX 遨游 — Design System
   base.css : tokens / reset / typography / components / chrome
   ========================================================================== */

:root {
  /* ---- Brand palette ---- */
  --ink:        #0B0C15;
  --ink-1:      #12141F;
  --ink-2:      #1B1E2E;
  --ink-3:      #2A2E44;

  --paper:      #FFFFFF;
  --paper-1:    #F7F8FC;
  --paper-2:    #EFF1F8;

  --brand:      #6E5BFF;
  --brand-deep: #4B37E0;
  --brand-soft: #EEEBFF;
  --cyan:       #00D8B4;
  --cyan-soft:  #E0FBF5;
  --accent:     #FF6B4A;
  --accent-soft:#FFEDE7;
  --gold:       #FFC44D;

  --text:       #14161F;
  --text-2:     #4A4F66;
  --text-3:     #878CA3;
  --line:       #E6E8F2;
  --line-2:     #F0F2F9;

  --grad-brand: linear-gradient(135deg, #7C63FF 0%, #5B45F5 45%, #00D8B4 130%);
  --grad-warm:  linear-gradient(135deg, #FF8A5B 0%, #FF5E7A 100%);
  --grad-aurora: radial-gradient(60% 70% at 18% 10%, rgba(110,91,255,.55), transparent 62%),
                 radial-gradient(50% 60% at 82% 4%, rgba(0,216,180,.34), transparent 60%),
                 radial-gradient(60% 70% at 55% 96%, rgba(255,107,74,.22), transparent 62%);

  /* ---- Shape / depth ---- */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(16,20,40,.05), 0 4px 14px -6px rgba(16,20,40,.10);
  --sh-2: 0 2px 6px rgba(16,20,40,.05), 0 18px 40px -18px rgba(16,20,40,.22);
  --sh-3: 0 40px 90px -40px rgba(24,20,70,.42), 0 8px 24px -12px rgba(16,20,40,.16);
  --sh-brand: 0 16px 40px -16px rgba(110,91,255,.55);

  /* ---- Type ---- */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
          "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, monospace;

  /* ---- Motion ---- */
  --ease: cubic-bezier(.22,1,.36,1);
  --ease-io: cubic-bezier(.4,0,.2,1);

  --nav-h: 68px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, p, figure, blockquote, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
::selection { background: rgba(110,91,255,.22); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(20,24,50,.16);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(20,24,50,.3); background-clip: content-box; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.container-wide { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.section { padding: 108px 0; position: relative; }
.section-sm { padding: 72px 0; }
.stack > * + * { margin-top: var(--gap, 16px); }
.center { text-align: center; }
.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;
}

/* ---------- Typography ---------- */
.display {
  font-size: clamp(2.6rem, 5.4vw, 4.35rem);
  line-height: 1.06;
  letter-spacing: -.035em;
  font-weight: 800;
}
.h2 {
  font-size: clamp(1.85rem, 3.1vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -.028em;
  font-weight: 780;
}
.h3 { font-size: 1.3rem; line-height: 1.4; letter-spacing: -.015em; font-weight: 700; }
.h4 { font-size: 1.05rem; line-height: 1.45; font-weight: 700; letter-spacing: -.01em; }
.lead { font-size: clamp(1.02rem, 1.35vw, 1.16rem); line-height: 1.75; color: var(--text-2); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.muted { color: var(--text-3); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
}
.eyebrow.on-dark { color: #B9AEFF; }

.section-head { max-width: 720px; }
.section-head .h2 { margin-top: 18px; }
.section-head .lead { margin-top: 18px; }
.section-head.center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: .925rem; font-weight: 650; letter-spacing: -.005em;
  background: var(--btn-bg); color: var(--btn-fg);
  white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background .25s var(--ease-io), color .25s var(--ease-io);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary {
  background: var(--grad-brand);
  background-size: 160% 160%;
  box-shadow: var(--sh-brand);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 22px 48px -18px rgba(110,91,255,.72); }

.btn-dark { background: var(--ink); color: #fff; box-shadow: var(--sh-2); }
.btn-dark:hover { background: #191C2B; }

.btn-ghost {
  background: transparent; color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px #CFD3E4; background: var(--paper-1); }

.btn-white { background: #fff; color: var(--ink); box-shadow: var(--sh-2); }
.btn-white:hover { background: #F4F5FB; }

.btn-glass {
  background: rgba(255,255,255,.1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255,255,255,.17); }

.btn-lg { height: 54px; padding: 0 30px; font-size: 1rem; }
.btn-sm { height: 38px; padding: 0 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 650; font-size: .93rem; color: var(--brand);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Tags / chips ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px;
  border-radius: var(--r-pill);
  font-size: .74rem; font-weight: 650; letter-spacing: .01em;
  background: var(--paper-2); color: var(--text-2);
}
.tag-brand { background: var(--brand-soft); color: var(--brand-deep); }
.tag-cyan  { background: var(--cyan-soft); color: #00806C; }
.tag-accent{ background: var(--accent-soft); color: #C0391B; }
.tag-dark  { background: rgba(255,255,255,.12); color: #EDEBFF; }

.chip {
  height: 38px; padding: 0 17px;
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--r-pill);
  font-size: .88rem; font-weight: 600; color: var(--text-2);
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: all .22s var(--ease-io);
}
.chip:hover { color: var(--text); box-shadow: inset 0 0 0 1.5px #CDD1E4; }
.chip[aria-selected="true"] {
  background: var(--ink); color: #fff;
  box-shadow: inset 0 0 0 1.5px var(--ink), 0 8px 20px -10px rgba(11,12,21,.6);
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--sh-3); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), backdrop-filter .4s;
}
.nav-inner {
  width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 34px;
}
.nav.stuck {
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 rgba(20,24,50,.07), 0 12px 32px -24px rgba(20,24,50,.35);
}
.nav.solid {
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 rgba(20,24,50,.07);
}
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-text {
  font-size: 1.06rem; font-weight: 800; letter-spacing: -.02em;
  display: flex; align-items: baseline; gap: 6px;
}
.logo-text b { font-weight: 900; letter-spacing: -.03em; }
.logo-text span { font-size: .78rem; font-weight: 600; color: var(--text-3); letter-spacing: .04em; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-links a {
  position: relative;
  padding: 9px 13px; border-radius: 10px;
  font-size: .9rem; font-weight: 560; color: var(--text-2);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(20,24,50,.05); }
.nav-links a.active { color: var(--text); font-weight: 680; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Dark nav (over hero) */
.nav.on-dark { color: #fff; }
.nav.on-dark .logo-text span { color: rgba(255,255,255,.55); }
.nav.on-dark .nav-links a { color: rgba(255,255,255,.72); }
.nav.on-dark .nav-links a:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav.on-dark .nav-links a.active { color: #fff; }
.nav.on-dark .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); }
.nav.on-dark .btn-ghost:hover { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.36); }
.nav.on-dark .btn-white { background: #fff; color: var(--ink); }
.nav.on-dark.stuck {
  background: rgba(11,12,21,.72);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}

.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 10px; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 89;
  background: rgba(11,12,21,.5);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-io);
}
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer-panel {
  position: absolute; inset: 0 0 0 auto; width: min(360px, 86vw);
  background: #fff; padding: 26px 24px;
  transform: translateX(100%);
  transition: transform .42s var(--ease);
  display: flex; flex-direction: column; gap: 8px;
}
.drawer.open .drawer-panel { transform: none; }
.drawer-panel a {
  padding: 14px 12px; border-radius: 12px;
  font-weight: 620; color: var(--text);
  border-bottom: 1px solid var(--line-2);
}
.drawer-panel a:hover { background: var(--paper-1); }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px;
  background: rgba(9,10,20,.62);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .28s var(--ease-io);
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: var(--r-xl);
  padding: 34px 32px 30px;
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.5);
  transform: translateY(14px) scale(.97);
  transition: transform .4s var(--ease);
}
.modal.open .modal-card { transform: none; }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-3); background: rgba(20,24,50,.05);
}
.modal-close:hover { background: rgba(20,24,50,.1); color: var(--text); }

.field { display: block; margin-top: 14px; }
.field span { display: block; font-size: .8rem; font-weight: 650; color: var(--text-2); margin-bottom: 7px; }
.input {
  width: 100%; height: 46px; padding: 0 14px;
  border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font-size: .94rem;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(110,91,255,.13); }
.input::placeholder { color: #AEB2C4; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed; left: 50%; bottom: 34px; z-index: 300;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: var(--r-pill);
  background: rgba(16,18,30,.94); color: #fff;
  font-size: .88rem; font-weight: 560;
  box-shadow: 0 20px 44px -18px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  animation: toastIn .42s var(--ease) both;
}
.toast.out { animation: toastOut .3s var(--ease-io) forwards; }
.toast svg { width: 16px; height: 16px; color: var(--cyan); flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal[data-d="1"].in { transition-delay: .07s; }
.reveal[data-d="2"].in { transition-delay: .14s; }
.reveal[data-d="3"].in { transition-delay: .21s; }
.reveal[data-d="4"].in { transition-delay: .28s; }
.reveal[data-d="5"].in { transition-delay: .35s; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.66);
  padding: 76px 0 34px;
  position: relative; overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 340px;
  background: radial-gradient(50% 100% at 50% 100%, rgba(110,91,255,.32), transparent 70%);
  pointer-events: none;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px 32px; position: relative;
}
.footer h5 {
  color: #fff; font-size: .82rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; margin: 0 0 16px;
}
.footer-col a { display: block; padding: 6px 0; font-size: .88rem; color: rgba(255,255,255,.6); transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-brand p { margin-top: 16px; font-size: .88rem; line-height: 1.8; max-width: 300px; color: rgba(255,255,255,.55); }
.footer-bottom {
  margin-top: 54px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  font-size: .8rem; color: rgba(255,255,255,.42);
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.7);
  transition: all .25s var(--ease);
}
.footer-social a:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.footer-social svg { width: 16px; height: 16px; }
.footer .logo-text { color: #fff; }
.footer .logo-text span { color: rgba(255,255,255,.42); }

/* ---------- Utility ---------- */
.hr { height: 1px; background: var(--line); border: 0; }
.grid { display: grid; gap: 20px; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.items-center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.relative { position: relative; }
.hide { display: none !important; }

/* Noise overlay for dark sections */
.noise::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-actions .btn-ghost { display: none; }
  .section { padding: 76px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .container-wide { padding: 0 18px; }
  .nav-inner { padding: 0 18px; gap: 12px; }
  .nav-actions .btn { height: 40px; padding: 0 16px; font-size: .85rem; }
  .footer { padding: 56px 0 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
