/* ==========================================================================
   牛马宝库 · 全局样式（变量 / 基础重置 / 页面容器 / 顶部品牌 / 页脚 / 提示）
   ========================================================================== */

:root {
  --bg: #e9f1f8;
  --ink: #16222f;
  --ink-soft: #33424f;
  --muted: #9db4c8;
  --accent: #2b8fd6;
  --accent-soft: rgba(111, 189, 242, 0.1);

  --max-width: 1500px;
  --radius-card: 26px;

  --font-sans: "Alibaba PuHuiTi", "MiSans", "HarmonyOS Sans SC", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;

  --grid-gap-y: 30px;
  --grid-gap-x: 12px;
  --body-pad: 44px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(
    1200px 560px at 50% -180px,
    #ffffff 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0) 72%
  );
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   页面容器
   -------------------------------------------------------------------------- */
.page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px 44px;
}

/* --------------------------------------------------------------------------
   顶部品牌
   -------------------------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 120px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   logo：文字层 + 图形层叠放
   .logo-text 是底座，撑出整体宽度；.logo-pic 绝对定位压在上面，
   正好落进文字中间那段留白里，并向上溢出，形成「字包着图」的层次。
   比例取自原合成图（图形高 ≈ 1.94 倍文字高、居中偏左 49%），
   换素材或调大小只改这两个变量即可，其余用 calc 跟着走。
   -------------------------------------------------------------------------- */
.logo-box {
  --logo-text-w: 380px;
  /* 文字层高宽比、图形层与文字层的比例，都取自原合成图，改宽度后其余自动跟着算 */
  --logo-text-h: calc(var(--logo-text-w) * 0.172);
  --logo-pic-w: calc(var(--logo-text-h) * 2.04);
  position: relative;
  display: block;
  width: var(--logo-text-w);
  margin: 0;
  /* 上下内边距 = 图形相对文字上下溢出的量，盒子高度正好等于图形高度 */
  padding: calc(var(--logo-text-h) * 0.71) 0 calc(var(--logo-text-h) * 0.33);
}

.logo-box img {
  user-select: none;
}

.logo-text {
  display: block;
  width: 100%;
  height: auto;
}

.logo-pic {
  position: absolute;
  left: 49.6%; /* 文字中间留白的中心略偏左 */
  top: 0;
  width: var(--logo-pic-w);
  height: var(--logo-pic-w);
  /* 靠 translateX 居中；下面动画里的 translateY 必须带着它一起写 */
  transform: translate(-50%, 0);
}

/* 上下漂浮一轮；由 .is-floating 播放 3 轮（进页面一次、鼠标移入再一次） */
@keyframes logo-float {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -13px);
  }
}

.logo-pic.is-floating {
  animation: logo-float 0.85s ease-in-out 2;
}

.slogan {
  margin: 22px 0 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.8em;
  text-indent: 1.8em;
  color: #2c3c4e;
}
.slogan span{
  font-weight: lighter;
}

.domain {
  margin: 13px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: #b2cce2;
}

/* --------------------------------------------------------------------------
   页脚 / 提示
   -------------------------------------------------------------------------- */
.footer {
  /* 与上方分区同宽，左右边界对齐卡片 */
  margin: 120px 0 0;
  padding: 28px 2px 0;
  /* border-top: 1px solid rgba(120, 160, 196, 0.2); */
  color: var(--muted);
}

.footer-main {
  display: flex;
  align-items: center; /* 右侧链接相对左侧简介区上下居中 */
  justify-content: space-between;
  gap: 26px 40px;
  flex-wrap: wrap;
}

.footer-info {
  flex: 1 1 560px; /* 给足基础宽度，简介不会因为右侧链接变宽而被挤成两行 */
  max-width: 680px;
}

.footer-desc {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: #5b7c96;
}

/* 页脚标识：图形 + 文字合一的横版 logo，点击在新标签页打开首页 */
.footer-logo-link {
  display: block;
  width: max-content; /* 盒子只包住图片，热区不会横铺一整行 */
  margin: 0 0 10px;
  line-height: 0; /* 去掉 inline 基线留出的空隙 */
  border-radius: 6px;
  transition: opacity 0.2s ease;
}

/* 只有轻微的透明度变化，不加底色 */
.footer-logo-link:hover {
  opacity: 0.82;
}

.footer-logo-link:focus-visible {
  outline: 2px solid #7ba7c9;
  outline-offset: 3px;
}

/* 只定高度，宽度按 3.78 的比例自适应 */
.footer-logo {
  display: block;
  width: auto;
  height: 30px;
  user-select: none;
}

.footer-copy {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* 右侧内页链接：纯文字，不用底色 */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 22px;
}

.footer-link {
  padding: 4px 0;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #6f8ea8;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* 悬停只变深文字色，不出现底色 */
.footer-link:hover {
  color: #1f3a4f;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 99;
  max-width: calc(100vw - 40px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(22, 34, 47, 0.92);
  box-shadow: 0 12px 30px -12px rgba(18, 30, 42, 0.6);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   响应式（全局部分）
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  :root {
    --body-pad: 30px;
  }
}

@media (max-width: 960px) {
  .page {
    padding: 0 20px 36px;
  }

  .hero {
    padding-top: 70px;
  }
}

@media (max-width: 720px) {
  :root {
    --body-pad: 18px;
    --grid-gap-y: 22px;
    --grid-gap-x: 6px;
    --radius-card: 20px;
  }

  .logo-box {
    --logo-text-w: 280px;
    --logo-pic-w: 98px;
  }

  .slogan {
    margin-top: 18px;
    font-size: 11px;
    letter-spacing: 1em;
    text-indent: 1em;
  }

  .domain {
    font-size: 11px;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
  }

  .footer {
    margin-top: 52px;
    padding-top: 24px;
  }

  /* 手机端改为上下排列：简介在上，链接按钮在下方左对齐铺开 */
  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* 竖排后 flex-basis 会变成「高度」，这里必须复位，否则简介区会被撑到 560px 高 */
  .footer-info {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .footer-desc {
    font-size: 12.5px;
    line-height: 1.75;
  }

  .footer-logo-link {
    margin-bottom: 8px;
  }

  .footer-logo {
    height: 26px;
  }

  .footer-links {
    justify-content: flex-start;
    gap: 4px 18px;
  }

  .footer-link {
    padding: 4px 0;
    font-size: 12px;
  }
}

@media (max-width: 460px) {
  .page {
    padding: 0 14px 30px;
  }

  .hero {
    padding-top: 34px;
  }

  .logo-box {
    --logo-text-w: 240px;
    --logo-pic-w: 84px;
  }

  .slogan {
    font-size: 10px;
    letter-spacing: 1em;
    text-indent: 1em;
  }

  .toast {
    font-size: 12px;
    padding: 10px 16px;
  }
}

/* 尊重系统的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}
