/* ============================================================
   直觉网络 · 交互增强层 interaction.css
   ------------------------------------------------------------
   只做光标 / 悬停 / 按下 / 焦点 / 滚动反馈，
   不改任何文案、不改 DOM 结构、不影响 AI 抓取。
   品牌红 #C9271E（rgb(201 39 30)），按下深 #A91F18
   2026-10-30
   ============================================================ */

/* ---------- 1. 点击基线：光标与过渡 ---------- */
a[href],
button,
[role="button"],
summary {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s ease,
              background-color .2s ease,
              border-color .2s ease,
              box-shadow .25s ease,
              transform .2s cubic-bezier(.2, .7, .3, 1),
              opacity .18s ease;
}
button[disabled],
[aria-disabled="true"] { cursor: not-allowed; }

input, select, textarea {
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

/* ---------- 2. 顶栏导航：悬停下划线由左展开 ---------- */
header nav a[href] { position: relative; }
header nav a[href]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 1.5px;
  border-radius: 2px;
  background: #C9271E;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .32s cubic-bezier(.2, .7, .3, 1);
  pointer-events: none;
}
header nav a[href]:hover::after,
header nav a[href]:focus-visible::after,
header nav a[href][aria-current="page"]::after { transform: scaleX(1); }

/* ---------- 3. 按钮：悬停抬起、按下回落 ---------- */
@media (hover: hover) and (pointer: fine) {
  a[class*="bg-brandred"]:hover,
  button[class*="bg-brandred"]:hover {
    transform: translateY(-2px);
    background-color: #A91F18;
    box-shadow: 0 10px 22px -10px rgba(201, 39, 30, .5);
  }
  a[class*="border-ink"]:hover,
  button[class*="border-ink"]:hover {
    transform: translateY(-2px);
    background-color: rgba(28, 27, 26, .045);
    box-shadow: 0 10px 22px -12px rgba(28, 27, 26, .35);
  }
}
a[class*="bg-brandred"]:active,
button[class*="bg-brandred"]:active,
a[class*="border-ink"]:active,
button[class*="border-ink"]:active {
  transform: translateY(0) scale(.985);
  box-shadow: 0 3px 10px -6px rgba(201, 39, 30, .45);
}
/* 其余链接与按钮：按下给一点反馈 */
a[href]:active, button:active { opacity: .82; }

/* ---------- 4. 内容条目：悬停可读态（左侧色条，不位移） ---------- */
@media (hover: hover) and (pointer: fine) {
  article, li.reveal, article.reveal {
    transition: background-color .25s ease, box-shadow .25s ease;
  }
  /* 用 background-image 叠一层极淡底色，而不是替换 background-color：
     深色案例卡（bg-darkcard）悬停时底色不会被刷白，白字始终可读 */
  article:hover, li.reveal:hover, article.reveal:hover {
    background-image: linear-gradient(rgba(201, 39, 30, .035), rgba(201, 39, 30, .035));
    box-shadow: inset 3px 0 0 0 #C9271E;
  }
}

/* ---------- 5. 页脚与正文内联链接 ---------- */
footer a[href]:hover { text-decoration: underline; text-underline-offset: 3px; }
a[href^="tel:"]:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 6. 二维码：悬停描边提示可扫 ---------- */
img[src*="wechat-qr"] {
  transition: box-shadow .25s ease, transform .3s cubic-bezier(.2, .7, .3, 1);
}
img[src*="wechat-qr"]:hover {
  transform: scale(1.02);
  box-shadow: 0 0 0 3px rgba(201, 39, 30, .18);
}

/* ---------- 7. 键盘焦点：清晰但不刺眼 ---------- */
a[href]:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #C9271E;
  outline-offset: 3px;
  border-radius: 3px;
}
/* 表单：焦点用环形阴影，不用 outline，避免与上面的规则打架 */
input:hover, select:hover, textarea:hover { border-color: rgba(201, 39, 30, .45); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #C9271E;
  box-shadow: 0 0 0 3px rgba(201, 39, 30, .12);
}

/* ---------- 8. 锚点滚动：避开吸顶导航 ---------- */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 96px; }

/* ---------- 9. 文字选区 ---------- */
::selection { background: #C9271E; color: #fff; }

/* ---------- 10. 滚动条（桌面） ---------- */
@media (min-width: 768px) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: #F2EFEA; }
  ::-webkit-scrollbar-thumb {
    background: #D7D1C9;
    border: 2px solid #F2EFEA;
    border-radius: 6px;
  }
  ::-webkit-scrollbar-thumb:hover { background: #B6AEA4; }
}

/* ---------- 11. 复制提示气泡 ---------- */
.hx-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(28, 27, 26, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  padding: 11px 18px;
  border-radius: 4px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.hx-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 12. 尊重系统「减少动效」 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a[href], button, [role="button"], article, li, input, select, textarea {
    transition-duration: .01ms !important;
  }
}

/* ---------- 服务下拉（nav-drop） ---------- */
.nav-drop { position: relative; display: flex; align-items: center; }
.nav-drop::after {
  content: ""; width: 5px; height: 5px; margin-left: 5px;
  border-right: 1.2px solid currentColor; border-bottom: 1.2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px); opacity: .5;
  transition: transform .22s ease, opacity .22s ease;
}
.nav-drop:hover::after,
.nav-drop:focus-within::after { transform: rotate(225deg) translate(-1px, -1px); opacity: .95; }

.drop-menu {
  position: absolute; top: calc(100% + 2px); left: -18px; z-index: 70;
  min-width: 188px; padding: 7px 0;
  background: #fff; border: 1px solid #E7E2DA; border-radius: 2px;
  box-shadow: 0 16px 40px rgba(24, 20, 16, .12);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
/* 透明桥接，避免鼠标穿过 2px 缝时菜单闪退 */
.drop-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-drop:hover .drop-menu,
.nav-drop:focus-within .drop-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.drop-menu a {
  display: block; padding: 9px 18px; white-space: nowrap;
  font-size: 13.5px; line-height: 1.4; color: #4A443E; text-decoration: none;
}
.drop-menu a:hover,
.drop-menu a:focus-visible { background: #F7F4EF; color: #C9271E; }

/* 手机抽屉里的二级列表 */
.nav-sub { display: flex; flex-direction: column; margin: 0 0 6px 12px; padding-left: 12px; border-left: 1px solid #E7E2DA; }
.nav-sub a { display: block; padding: 8px 10px; border-radius: 2px; font-size: 14px; color: #7A7570; text-decoration: none; }
.nav-sub a:hover, .nav-sub a:focus-visible { color: #C9271E; background: #F7F4EF; }

/* 锚点滚动给固定头部留位 */
#coop, #process, #method, #trust, #ratio { scroll-margin-top: 92px; }

/* nav-breakpoint-1200 */
/* 9 个导航项（含 GEO 官网建设）+ CTA 在 768–1199px 放不下：链接收进汉堡，保留红色 CTA 按钮 */
@media (min-width:768px) and (max-width:1199.98px){
  header > div{justify-content:flex-start!important;}
  header nav[aria-label="主导航"]{margin-left:auto!important;gap:0!important;}
  header nav[aria-label="主导航"] > a:not([class*="bg-brandred"]),
  header nav[aria-label="主导航"] > .nav-drop{display:none!important;}
  header button:is([aria-label="打开菜单"],[aria-label="关闭菜单"]){display:flex!important;}
  header nav[aria-label="移动端导航"]{display:block!important;}
}
