/* ==========================================================
   洋代国际官网 · 全站共用样式（深色科技风）
   令牌 / 基础 / 导航 / 按钮 / 页脚 / 通用组件
   ========================================================== */
:root {
  --bg: #060a14;
  --bg-2: #0a1020;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --line: rgba(140, 160, 255, 0.16);
  --line-strong: rgba(140, 160, 255, 0.32);
  --text: #e6ebff;
  --muted: #9aa6c8;
  --dim: #6b7799;
  --cyan: #22d3ee;
  --blue: #4f7cff;
  --violet: #8b5cf6;
  --pink: #ff4d8d;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  --grad-warm: linear-gradient(135deg, #6366f1 0%, #a855f7 55%, #ff4d8d 100%);
  --radius: 18px;
  --maxw: 1180px;
  --sat: env(safe-area-inset-top, 0px);
  --header-h: calc(72px + var(--sat));
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 85% -6%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(760px 480px at 6% 12%, rgba(34, 211, 238, 0.14), transparent 62%),
    radial-gradient(900px 600px at 50% 105%, rgba(168, 85, 247, 0.16), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 网格背景 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 140, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 25%, transparent 78%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
::selection { background: rgba(99, 102, 241, 0.45); color: #fff; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  padding-top: var(--sat);
  background: rgba(6, 10, 20, 0.35);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(6, 10, 20, 0.78);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.site-header .bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.7)); }
.brand-name {
  background: linear-gradient(90deg, #fff, #c7d2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  position: relative;
  padding: 8px 16px;
  font-size: 15px;
  color: var(--muted);
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.site-nav a:hover { color: #fff; background: var(--surface); }
.site-nav a.active { color: #fff; }
.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s, top 0.3s;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.site-header.open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.site-header.open .burger span:nth-child(2) { opacity: 0; }
.site-header.open .burger span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .burger { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    background: rgba(6, 10, 20, 0.985);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .site-header.open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { padding: 14px 16px; font-size: 16px; }
  .site-nav a::after { display: none; }
  .site-header.open { background: rgba(6, 10, 20, 0.96); }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, background 0.25s;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.6); box-shadow: 0 10px 30px rgba(34, 211, 238, 0.18); }
.btn-primary {
  border-color: transparent;
  background: var(--grad);
  box-shadow: 0 10px 34px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover { border-color: transparent; box-shadow: 0 14px 44px rgba(99, 102, 241, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

/* ---------- 通用标题 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}
.section-title {
  margin: 14px 0 0;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 玻璃卡片 ---------- */
.glass {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 40px;
  padding: 64px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(3, 6, 14, 0.7));
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(560px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}
.footer-title {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}
.footer-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.footer-list li { display: flex; gap: 12px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.footer-list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--cyan); }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s, transform 0.2s;
}
.footer-links a::before { content: "›"; color: var(--violet); transition: transform 0.2s; }
.footer-links a:hover { color: #fff; transform: translateX(3px); }
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--dim);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer { padding-top: 48px; }
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(26px, calc(env(safe-area-inset-bottom) + 14px));
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(10, 16, 32, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, box-shadow 0.3s;
}
.to-top svg { width: 20px; height: 20px; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { box-shadow: 0 0 24px rgba(34, 211, 238, 0.4); border-color: var(--cyan); }

/* ---------- 滚动进入动画 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- 触屏设备：取消悬停位移，避免点按后"粘住" ---------- */
@media (hover: none) {
  .btn:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
  .btn-primary:hover { box-shadow: 0 10px 34px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); border-color: transparent; }
  .site-nav a:hover { background: none; }
  .footer-links a:hover { transform: none; }
}
