/* ==========================================================================
   蓝河科技 · 设计系统 base.css
   顺序：变量 → 重置 → 排版 → 布局骨架 → 按钮 → 头部 → 页脚 → 表单 → 动效
   ========================================================================== */

/* 1. 设计变量 ------------------------------------------------------------- */
:root {
  /* 色彩 */
  --ink: #0A1626;
  --ink-2: #132238;
  --slate: #55677E;
  --slate-2: #8290A4;
  --line: #E5E9F0;
  --line-2: #EFF2F7;
  --paper: #FFFFFF;
  --paper-2: #F7F9FC;
  --paper-3: #EDF1F6;
  --brand: #1B5BC4;
  --brand-2: #0E3D8F;
  --brand-3: #3B86FF;
  --brand-soft: #EAF1FC;
  --cyan: #57D3C6;
  --night: #071120;
  --night-2: #0B1A2D;

  /* 形状与阴影 */
  --radius: 12px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(10, 22, 38, .05);
  --shadow-md: 0 20px 46px -24px rgba(10, 22, 38, .30);
  --shadow-lg: 0 44px 96px -44px rgba(10, 22, 38, .46);

  /* 节奏 */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(72px, 8.4vw, 128px);
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* 字体 */
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC",
          "HarmonyOS Sans SC", "Source Han Sans SC", "Hiragino Sans GB",
          "Microsoft YaHei", sans-serif;
  --font-num: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* 2. 重置 ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
address { font-style: normal; }
h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: -.015em;
}
::selection { background: rgba(27, 91, 196, .16); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brand-3);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 22px;
  background: #fff;
  color: var(--ink);
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 0; }

/* 3. 布局骨架 ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(56px, 6vw, 88px); }
.section--paper { background: var(--paper-2); }
.section--hairline { border-top: 1px solid var(--line); }

/* 深色区块 */
.theme-dark {
  background: var(--night);
  color: rgba(255, 255, 255, .66);
  position: relative;
  overflow: hidden;
}
.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4 { color: #fff; }
.theme-dark .eyebrow { color: var(--cyan); }

/* 区块标题组 */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .82fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(38px, 4.6vw, 62px);
}
.section-head__aside { padding-bottom: 6px; }
.section-head__aside p { font-size: 15.5px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .19em;
  text-transform: uppercase;
  line-height: 1;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .75;
}

.section-title {
  font-size: clamp(27px, 3.3vw, 42px);
  line-height: 1.24;
  letter-spacing: -.022em;
  font-weight: 600;
  text-wrap: balance;
}
.section-title em {
  font-style: normal;
  color: var(--brand);
}
.theme-dark .section-title em { color: var(--cyan); }

.lead {
  font-size: clamp(16px, 1.4vw, 17.5px);
  line-height: 1.82;
  color: var(--slate);
}
.theme-dark .lead { color: rgba(255, 255, 255, .62); }

.mono-num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* 4. 按钮与文字链接 ------------------------------------------------------ */
.btn {
  --btn-h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .38s var(--ease), color .38s var(--ease),
              border-color .38s var(--ease), transform .38s var(--ease),
              box-shadow .38s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform .38s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.985); }

.btn--primary { background: var(--ink); color: #fff; box-shadow: 0 12px 28px -16px rgba(10, 22, 38, .8); }
.btn--primary:hover { background: var(--brand); box-shadow: 0 16px 34px -16px rgba(27, 91, 196, .7); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: rgba(255, 255, 255, .88); }

.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.theme-dark .btn--ghost { border-color: rgba(255, 255, 255, .24); color: #fff; }
.theme-dark .btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--sm { --btn-h: 42px; padding: 0 18px; font-size: 13.5px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: color .3s var(--ease);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform .38s var(--ease); }
.link-arrow:hover { color: var(--brand); }
.link-arrow:hover svg { transform: translateX(4px); }
.theme-dark .link-arrow { color: rgba(255, 255, 255, .9); }
.theme-dark .link-arrow:hover { color: var(--cyan); }

/* 5. 头部导航 ------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  border-bottom: 1px solid transparent;
  transition: background .45s var(--ease), border-color .45s var(--ease),
              backdrop-filter .45s var(--ease);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 84px;
  transition: height .45s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(7, 17, 32, .84);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border-bottom-color: rgba(255, 255, 255, .09);
}
.site-header.is-scrolled .header-inner { height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  box-shadow: 0 10px 24px -10px rgba(59, 134, 255, .8);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.brand:hover .brand-mark { transform: translateY(-1px) rotate(-3deg); box-shadow: 0 14px 30px -10px rgba(59, 134, 255, .9); }
.brand-mark svg { width: 100%; height: 100%; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-size: 17px; font-weight: 600; letter-spacing: .08em; }
.brand-text em {
  margin-top: 5px;
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: .15em;
  color: rgba(255, 255, 255, .42);
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative;
  padding: 10px 13px;
  border-radius: 6px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, .70);
  transition: color .3s var(--ease);
}
.nav-link:hover { color: #fff; }
.nav-link[data-current] { color: #fff; }
.nav-link[data-current]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 1px;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-3), var(--cyan));
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-left: 16px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #fff;
  transition: background .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease);
}
.nav-cta svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.nav-cta:hover { background: #fff; color: var(--ink); border-color: #fff; }
.nav-cta:hover svg { transform: translateX(3px); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform .38s var(--ease), top .38s var(--ease), opacity .3s;
}
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-open .nav-toggle span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }
body.nav-open { overflow: hidden; }

/* 6. 页脚 ---------------------------------------------------------------- */
.site-footer {
  background: #050D18;
  color: rgba(255, 255, 255, .58);
  padding-top: clamp(56px, 7vw, 92px);
  font-size: 14px;
}
.site-footer::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: clamp(48px, 6vw, 76px);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px);
  padding-bottom: clamp(44px, 5vw, 68px);
}
.footer-brand .brand--footer .brand-mark { width: 34px; height: 34px; box-shadow: none; }
.footer-desc {
  margin-top: 22px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .48);
}
.footer-contact { margin-top: 26px; display: grid; gap: 12px; }
.footer-contact li { display: flex; gap: 12px; align-items: baseline; font-size: 13.5px; }
.footer-contact span { flex: none; width: 62px; color: rgba(255, 255, 255, .34); }
.footer-contact a:hover { color: #fff; }
.footer-contact address { color: rgba(255, 255, 255, .62); }

.footer-col h3 {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.footer-col ul { display: grid; gap: 13px; }
.footer-col a {
  position: relative;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .52);
  transition: color .3s var(--ease);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 24px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 12.5px;
  color: rgba(255, 255, 255, .38);
}
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.footer-legal a:hover { color: #fff; }

/* 7. 表单 ---------------------------------------------------------------- */
.field { display: grid; gap: 9px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: .01em;
}
.field label .req { color: var(--brand); margin-left: 3px; }
.input,
.textarea,
.select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.input::placeholder,
.textarea::placeholder { color: var(--slate-2); opacity: .8; }
.input:hover,
.textarea:hover,
.select:hover { border-color: #CFD7E3; }
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 91, 196, .12);
}
.textarea { min-height: 138px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5' fill='none' stroke='%2355677E' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.field-hint { font-size: 12px; color: var(--slate-2); }

/* 8. 动效 ---------------------------------------------------------------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .95s var(--ease), transform .95s var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* 9. 响应式 -------------------------------------------------------------- */
@media (max-width: 1080px) {
  .nav-link { padding: 10px 10px; font-size: 14px; }
  .nav-cta { padding: 0 14px; }
}

@media (max-width: 980px) {
  .nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 96px 28px 48px;
    background: rgba(7, 17, 32, .97);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav-link {
    width: 100%;
    padding: 15px 0;
    text-align: center;
    font-size: 21px;
    letter-spacing: .02em;
  }
  .nav-link[data-current]::after { left: 50%; right: auto; width: 22px; transform: translateX(-50%); bottom: 6px; }
  .nav-cta {
    width: 100%;
    justify-content: center;
    height: 50px;
    margin: 26px 0 0;
    font-size: 15px;
  }
  .nav-toggle { display: block; }
  .header-inner { height: 72px; }
  .site-header.is-scrolled .header-inner { height: 64px; }

  .section-head { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .section-head__aside { padding-bottom: 0; }

  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 15px; line-height: 1.75; }
  .brand-text strong { font-size: 15.5px; }
  .brand-text em { font-size: 7px; letter-spacing: .14em; }
  .brand-mark { width: 32px; height: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-legal { gap: 16px; flex-wrap: wrap; }
  .btn { --btn-h: 48px; padding: 0 20px; font-size: 14.5px; }
}
