/* ============================================================
   广州弈通信息科技有限公司官网 —— 自定义样式
   设计语言：渐变玻璃质感（Glassmorphism + Aurora Gradient）
   本文件为纯手写样式，不经过 Tailwind 编译。
   ============================================================ */

html {
  scroll-behavior: smooth;
}

/* ============================================================
   Aurora 背景 —— 整站统一的浅色极光底
   ============================================================ */
body {
  position: relative;
  background-color: #f3f1fb;
  background-image:
    radial-gradient(40rem 32rem at 6% -6%, rgba(109, 94, 252, 0.22), transparent 60%),
    radial-gradient(34rem 30rem at 100% 2%, rgba(236, 72, 153, 0.16), transparent 62%),
    radial-gradient(38rem 32rem at 52% 104%, rgba(56, 189, 248, 0.16), transparent 60%);
  background-attachment: fixed;
}

/* 缓慢漂浮的极光光斑，叠在背景之上、内容之下 */
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  top: -18vh;
  left: 50%;
  width: 70vw;
  height: 70vw;
  max-width: 1100px;
  max-height: 1100px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(168, 85, 247, 0.20), transparent),
    radial-gradient(closest-side, rgba(56, 189, 248, 0.16), transparent);
  filter: blur(40px);
  pointer-events: none;
  animation: aurora-drift 22s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  0%   { transform: translateX(-58%) translateY(0) scale(1); }
  100% { transform: translateX(-42%) translateY(8vh) scale(1.12); }
}

/* ============================================================
   玻璃材质
   ============================================================ */
.glass-card {
  background: rgba(255, 255, 255, 0.60);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  backdrop-filter: blur(20px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 44px -16px rgba(73, 52, 168, 0.26);
}

/* 深色玻璃面板 —— 用于制造层次对比 */
.glass-dark {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(31, 27, 64, 0.92), rgba(15, 13, 38, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(28rem 20rem at 12% 8%, rgba(109, 94, 252, 0.38), transparent 60%),
    radial-gradient(26rem 20rem at 92% 96%, rgba(236, 72, 153, 0.26), transparent 62%);
  pointer-events: none;
}
.glass-dark > * { position: relative; }

/* 悬浮玻璃导航 */
.glass-nav {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 34px -14px rgba(73, 52, 168, 0.30);
}

/* 导航滚动后：胶囊更贴顶、阴影更沉 */
#navbar.nav-scrolled {
  padding-top: 0.5rem;
}
#navbar.nav-scrolled .glass-nav {
  box-shadow: 0 16px 42px -14px rgba(73, 52, 168, 0.44);
}

/* ============================================================
   渐变填充
   ============================================================ */
.text-gradient {
  background: linear-gradient(108deg, #6d5efc 0%, #a855f7 46%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-primary {
  background: linear-gradient(118deg, #6d5efc 0%, #a855f7 52%, #ec4899 100%);
  box-shadow:
    0 14px 30px -10px rgba(109, 94, 252, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}
.btn-primary:hover {
  box-shadow:
    0 20px 42px -10px rgba(109, 94, 252, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* 渐变描边卡片 —— 伪元素绘制 1px 渐变边 */
.gradient-ring {
  position: relative;
  isolation: isolate;
}
.gradient-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(135deg, #6d5efc, #ec4899 70%, transparent);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.gradient-ring:hover::after { opacity: 1; }

/* 渐变图标底座 */
.icon-grad {
  background: linear-gradient(135deg, #6d5efc, #a855f7);
  box-shadow: 0 10px 22px -8px rgba(109, 94, 252, 0.6);
}

/* ============================================================
   视差
   ============================================================ */
[data-parallax] {
  will-change: transform;
}

/* ============================================================
   滚动进入动画
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.985);
  transition:
    opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.reveal[data-delay='1'] { transition-delay: 0.08s; }
.reveal[data-delay='2'] { transition-delay: 0.16s; }
.reveal[data-delay='3'] { transition-delay: 0.24s; }
.reveal[data-delay='4'] { transition-delay: 0.32s; }
.reveal[data-delay='5'] { transition-delay: 0.40s; }

/* ============================================================
   卡片悬浮
   ============================================================ */
.lift {
  transition:
    transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 64px -20px rgba(73, 52, 168, 0.42);
}

/* ============================================================
   滚动指示器
   ============================================================ */
.scroll-hint {
  animation: scroll-bob 2.4s ease-in-out infinite;
}
@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); opacity: 0.65; }
  50% { transform: translateY(7px); opacity: 1; }
}

/* ============================================================
   连接动画线（拓扑装饰）
   ============================================================ */
.flow-line {
  stroke-dasharray: 6 9;
  animation: flow 1.6s linear infinite;
}
@keyframes flow {
  to { stroke-dashoffset: -30; }
}

/* 拓扑节点呼吸 */
.pulse-node {
  transform-origin: center;
  animation: pulse 3.2s ease-in-out infinite;
}
.pulse-node:nth-child(2) { animation-delay: 0.4s; }
.pulse-node:nth-child(3) { animation-delay: 0.8s; }
.pulse-node:nth-child(4) { animation-delay: 1.2s; }
.pulse-node:nth-child(5) { animation-delay: 1.6s; }
.pulse-node:nth-child(6) { animation-delay: 2.0s; }
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ============================================================
   表单聚焦
   ============================================================ */
.field {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(231, 228, 243, 0.9);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.field:focus {
  border-color: #6d5efc;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.14);
}

/* ============================================================
   自定义滚动条
   ============================================================ */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(#a99dff, #d49bf0);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(#8b7bff, #c47ee8);
  background-clip: content-box;
}

/* ============================================================
   无障碍：尊重系统减少动效设置
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .lift:hover { transform: none; }
  [data-parallax] { transform: none !important; }
  .scroll-hint, .flow-line, .pulse-node, body::before { animation: none; }
}
