/* ==========================================================================
   嘉木科技 JMTech — 全局样式（Tailwind 之外的补充层）
   主色 #0F172A · 电光蓝 #3B82F6 · 高光蓝 #38BDF8
   ========================================================================== */

:root {
  --ink: #0F172A;
  --ink-2: #0B1220;
  --ink-3: #111A2E;
  --line: rgba(148, 163, 184, 0.14);
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --electric: #3B82F6;
  --glow: #38BDF8;
  --violet: #8B5CF6;
  --grad: linear-gradient(135deg, #3B82F6 0%, #38BDF8 50%, #6366F1 100%);
  --grad-soft: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(56, 189, 248, 0.08));
  --shadow-glow: 0 0 60px rgba(59, 130, 246, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background-color: var(--ink);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(139, 92, 246, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(56, 189, 248, 0.10), transparent 55%);
  background-attachment: fixed;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

/* ----------- A11y ----------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  padding: 8px 16px; background: var(--electric); color: #fff; z-index: 9999;
}
.skip-link:focus { left: 16px; top: 16px; border-radius: 6px; }

/* ----------- Hero 网格底纹 ----------- */
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 60% at 50% 40%, #000 30%, transparent 75%);
}

/* tsParticles 容器 */
#tsparticles {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}

/* 渐变文字工具类（Tailwind 难直接定制时备用） */
.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* 玻璃拟态 */
.glass {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

/* 主按钮发光 */
.btn-glow {
  position: relative; isolation: isolate;
  background: var(--grad);
  color: #fff; font-weight: 600;
  padding: 12px 26px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  border: none; cursor: pointer; text-decoration: none;
}
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(56, 189, 248, 0.45); }
.btn-glow:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
  text-decoration: none; cursor: pointer;
  font-weight: 500;
}
.btn-ghost:hover {
  border-color: rgba(59, 130, 246, 0.6);
  color: var(--glow);
  background: rgba(59, 130, 246, 0.06);
}

/* 卡片悬停升起 */
.card-lift { transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.card-lift:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(56, 189, 248, 0.18);
}

/* Masonry — 简单 CSS columns 实现 */
.masonry {
  column-count: 1;
  column-gap: 20px;
}
@media (min-width: 640px) { .masonry { column-count: 2; } }
@media (min-width: 1024px) { .masonry { column-count: 3; } }

.masonry > .masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  display: block;
}

/* 流程时间线连线（仅桌面） */
.process-line {
  display: none;
}
@media (min-width: 1024px) {
  .process-line {
    display: block;
    position: absolute; left: 8%; right: 8%; top: 38px; height: 2px;
    background: linear-gradient(90deg, transparent, #3B82F6, #38BDF8, #8B5CF6, transparent);
    opacity: 0.45; border-radius: 2px; z-index: 0;
  }
}

/* Swiper 主题覆盖（评价轮播） */
.swiper-pagination-bullet {
  background: rgba(148, 163, 184, 0.4) !important;
  opacity: 1 !important;
  width: 8px !important; height: 8px !important;
}
.swiper-pagination-bullet-active {
  background: var(--glow) !important;
  width: 28px !important; border-radius: 999px !important;
  transition: width .3s var(--ease);
}
.swiper-button-next, .swiper-button-prev {
  color: var(--glow) !important;
  width: 44px !important; height: 44px !important;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--line);
  border-radius: 50%;
  backdrop-filter: blur(8px);
}
.swiper-button-next::after, .swiper-button-prev::after {
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* AOS — 默认时长微调 */
[data-aos] { transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important; }

/* IntersectionObserver fallback —— 当 AOS 未加载时也能渐入 */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border-radius: 8px; border: 2px solid var(--ink-2);
}
::-webkit-scrollbar-thumb:hover { background: var(--electric); }

/* 输入框聚焦发光 */
.field-focus:focus {
  outline: none;
  border-color: var(--glow);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

/* 表格行交替 */
.tbl-zebra tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.015);
}
.tbl-zebra tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* 高亮列 */
.tbl-zebra tbody tr td.col-feature,
.tbl-zebra thead tr th.col-feature {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.10), rgba(56, 189, 248, 0.04));
}

/* ============== Quiz 问答漏斗 ============== */
.quiz-opt {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  text-align: left; cursor: pointer;
  font-family: inherit; font-size: 0.875rem; font-weight: 500;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.quiz-opt:hover { border-color: rgba(56, 189, 248, 0.4); background: rgba(15, 23, 42, 0.85); }
.quiz-opt:active { transform: scale(0.98); }

.quiz-opt[aria-pressed="true"] {
  border-color: rgba(56, 189, 248, 0.7);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(56, 189, 248, 0.08));
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5), 0 8px 24px rgba(59, 130, 246, 0.18);
}
.quiz-opt[aria-pressed="true"]::after {
  content: ""; position: absolute; top: 8px; right: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--glow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23051019' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 70% 70%; background-position: center; background-repeat: no-repeat;
}

.quiz-opt__icon { font-size: 1.25rem; line-height: 1; margin-bottom: 2px; }
.quiz-opt__title { display: block; font-weight: 600; color: var(--text); font-size: 0.95rem; }
.quiz-opt__desc { display: block; font-size: 0.72rem; color: var(--text-muted); line-height: 1.35; }
.quiz-opt__hint { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.quiz-opt--compact {
  flex-direction: row; align-items: center; gap: 8px;
  padding: 12px 14px; font-size: 0.85rem; font-weight: 500;
}
.quiz-opt--row {
  flex-direction: row; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px;
}
.quiz-opt--row .quiz-opt__title { font-size: 0.92rem; }

button[data-quiz-prev]:disabled,
button[data-quiz-next]:disabled {
  opacity: 0.4; cursor: not-allowed; pointer-events: none;
}

/* Modal */
[data-quiz-modal] { display: none; }
[data-quiz-modal].is-open { display: flex; animation: quizFade .25s var(--ease); }
[data-quiz-modal].is-open > div:last-child { animation: quizPop .35s var(--ease); }

@keyframes quizFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes quizPop {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body.quiz-modal-open { overflow: hidden; }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal], [data-aos] { opacity: 1 !important; transform: none !important; }
}
