/* ==========================================================================
   启序智造 QIXU AI — 基础样式系统
   品牌色：序蓝 #1E3A8A / 序靛 #4F46E5 / 序青 #818CF8 / 启橙 #FF7A1A
   ========================================================================== */

:root {
  /* 品牌色 */
  --navy: #1e3a8a;
  --indigo: #4f46e5;
  --periwinkle: #818cf8;
  --orange: #ff7a1a;

  /* 深色体系 */
  --ink: #070b18;
  --ink-2: #0c1224;
  --ink-3: #121a31;
  --line-dark: rgba(255, 255, 255, 0.1);

  /* 浅色体系 */
  --paper: #ffffff;
  --paper-2: #f6f7fb;
  --paper-3: #eef1f9;
  --text: #0e1526;
  --text-2: #4b5670;
  --text-3: #7b87a1;
  --line: rgba(14, 21, 38, 0.09);
  --line-strong: rgba(14, 21, 38, 0.16);

  /* 渐变 */
  --grad-brand: linear-gradient(120deg, #1e3a8a 0%, #4f46e5 52%, #818cf8 100%);
  --grad-fire: linear-gradient(135deg, #ff9333 0%, #ff7a1a 45%, #f2610a 100%);
  --grad-text: linear-gradient(96deg, #a5b4fc 0%, #ffffff 46%, #ffb27a 100%);

  /* 尺寸 */
  --shell: 1200px;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --header-h: 76px;

  /* 阴影 */
  --shadow-sm: 0 2px 10px rgba(14, 21, 38, 0.05);
  --shadow: 0 18px 50px -22px rgba(14, 21, 38, 0.28);
  --shadow-lg: 0 40px 90px -40px rgba(10, 18, 45, 0.42);
  --shadow-glow: 0 24px 70px -24px rgba(79, 70, 229, 0.55);

  /* 字体 */
  --font-sans: "Alibaba PuHuiTi 3.0", "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Inter", Consolas, "Liberation Mono", monospace;

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== Reset ========== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p, dl, dd, dt, ol, ul, blockquote, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(79, 70, 229, 0.9); color: #fff; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 2000;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ========== 布局 ========== */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.section {
  position: relative;
  padding: clamp(72px, 8.5vw, 132px) 0;
}
.section-light { background: var(--paper); }
.section-tint { background: var(--paper-2); }
.section-dark {
  background: radial-gradient(120% 90% at 80% 0%, #16204a 0%, #0a1024 46%, #070b18 100%);
  color: #fff;
}

/* ========== 标题体系 ========== */
.section-head {
  max-width: 780px;
  margin-bottom: clamp(40px, 5vw, 68px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--indigo);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow-line {
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}
.eyebrow-light { color: var(--periwinkle); }

.section-head h2,
.about-copy h2,
.contact-copy h2 {
  font-size: clamp(30px, 3.7vw, 50px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-desc {
  margin-top: 20px;
  color: var(--text-2);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.85;
  max-width: 680px;
}
.section-dark .section-desc { color: rgba(255, 255, 255, 0.66); }

.br-m { display: block; }

/* ========== 按钮 ========== */
.btn {
  --btn-h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: var(--btn-h);
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), background 0.28s var(--ease), color 0.28s var(--ease), border-color 0.28s var(--ease);
}
.btn .icon { font-size: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad-fire);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(255, 122, 26, 0.75);
}
.btn-primary:hover { box-shadow: 0 18px 38px -12px rgba(255, 122, 26, 0.85); }

.btn-outline {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.4);
}
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); background: rgba(79, 70, 229, 0.06); }

.section-dark .btn-outline,
.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
}
.section-dark .btn-outline:hover,
.hero .btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-ghost {
  color: var(--text-2);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--indigo); background: rgba(79, 70, 229, 0.07); }

.btn-lg { --btn-h: 54px; padding: 0 28px; font-size: 16px; }
.btn-sm { --btn-h: 38px; padding: 0 16px; font-size: 13.5px; }
.btn-block { display: flex; width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: inherit;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.icon-btn .icon { font-size: 18px; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); }

/* ========== 顶栏 ========== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: #fff;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), height 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 11, 24, 0.55), rgba(7, 11, 24, 0));
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.site-header.is-scrolled {
  height: 66px;
  background: rgba(7, 11, 24, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px -20px rgba(0, 0, 0, 0.8);
}
.site-header.is-scrolled::before { opacity: 0; }

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.6);
}
.brand-mark img { width: 30px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: 0.06em; }
.brand-text em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.34em;
  color: var(--periwinkle);
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  margin-left: auto;
}
.main-nav a {
  position: relative;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.76);
  padding: 6px 0;
  transition: color 0.25s var(--ease);
  white-space: nowrap;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}
.main-nav a:hover,
.main-nav a.is-current { color: #fff; }
.main-nav a:hover::after,
.main-nav a.is-current::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.header-actions .btn-ghost { color: rgba(255, 255, 255, 0.8); }
.header-actions .btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  align-items: center;
  justify-content: center;
}
.nav-toggle .icon { font-size: 20px; }

/* ========== 移动抽屉 ========== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}
.drawer.is-open { display: block; }
.drawer-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(88vw, 370px);
  height: 100%;
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #0a1022;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(100%);
  animation: drawer-in 0.4s var(--ease-out) forwards;
  overflow-y: auto;
}
.drawer.is-closing .drawer-panel { animation: drawer-out 0.3s var(--ease) forwards; }
@keyframes drawer-in { to { transform: translateX(0); } }
@keyframes drawer-out { from { transform: translateX(0); } to { transform: translateX(100%); } }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.9);
}
.drawer-nav a .icon { font-size: 16px; color: var(--periwinkle); }
.drawer-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.drawer-foot .btn-outline {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.drawer-foot .btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.drawer-contact {
  margin-top: 6px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
}

/* ========== 滚动入场 ========== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* ========== 无障碍 / 动效降级 ========== */
.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;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ========== 顶栏响应式 ========== */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-ghost span { display: none; }
  .header-actions .btn-ghost { padding: 0 12px; }
}

@media (max-width: 560px) {
  :root { --header-h: 66px; }
  .header-actions .btn-primary { display: none; }
  .brand-text strong { font-size: 15.5px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-mark img { width: 26px; }
  .btn-lg { --btn-h: 50px; padding: 0 22px; font-size: 15px; }
  .section-head { margin-bottom: 34px; }
}
