/* ========== AI 外贸增长实验室 ========== */
:root {
  --ail-bg: #0a0e1a;
  --ail-bg2: #111827;
  --ail-surface: rgba(255, 255, 255, 0.06);
  --ail-border: rgba(99, 102, 241, 0.25);
  --ail-glow: rgba(99, 102, 241, 0.45);
  --ail-accent: #6366f1;
  --ail-accent2: #8b5cf6;
  --ail-text: #e2e8f0;
  --ail-muted: #94a3b8;
  --ail-radius: 24px;
}

.ail-page { background: var(--ail-bg); color: var(--ail-text); }
.ail-page .page-wrap {
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.12), transparent),
    var(--ail-bg);
}

/* Grid background */
.ail-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, black 0%, transparent 85%);
  pointer-events: none;
}
.ail-flow-light {
  position: absolute;
  width: 60%;
  height: 40%;
  top: -10%;
  left: 20%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  filter: blur(60px);
  animation: ail-pulse 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ail-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Hero */
.ail-hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  min-height: 520px;
}
.ail-hero__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  position: relative;
  z-index: 2;
}
.ail-hero-content { flex: 1; max-width: 580px; }
.ail-hero-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ail-accent2);
  margin-bottom: 16px;
}
.ail-hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 20px;
}
.ail-hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ail-muted);
  margin-bottom: 32px;
}
.ail-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.ail-hero-visual {
  flex-shrink: 0;
  width: min(380px, 42%);
}
.ail-hero-visual svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.35));
  transition: transform 0.25s ease-out;
}
#ail-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.6;
}

/* Buttons */
.ail-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--ail-accent), var(--ail-accent2));
  border: none;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ail-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}
.ail-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ail-text);
  background: transparent;
  border: 1px solid var(--ail-border);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.ail-btn-ghost:hover {
  border-color: var(--ail-glow);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}

/* Section */
.ail-section {
  padding: 72px 0;
  position: relative;
  z-index: 2;
}
/* 区块标题与网格默认可见（不依赖滚动动画） */
.ail-section-head,
.ail-home-head,
.ail-home-intro,
.ail-pills,
.ail-card-grid,
.ail-tools-grid,
.ail-res-grid,
.ail-cta-block {
  opacity: 1 !important;
  transform: none !important;
}
.ail-section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.ail-section-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ail-accent2);
  margin-bottom: 12px;
}
.ail-section-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.ail-section-desc { font-size: 16px; color: var(--ail-muted); line-height: 1.6; }

/* Pills filter */
.ail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
  padding: 0 12px;
}
.ail-filter-pill {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ail-muted);
  background: var(--ail-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
}
.ail-filter-pill:hover,
.ail-filter-pill.active {
  color: #fff;
  border-color: var(--ail-border);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.15);
}

/* Glass cards */
.ail-glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--ail-radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s, border-color 0.4s;
}
.ail-glass-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), transparent 40%, rgba(139, 92, 246, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.ail-glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), 0 0 40px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
}
.ail-glass-card:hover::before { opacity: 1; }

.ail-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  min-height: 120px;
}
.ail-wf-card {
  display: flex;
  flex-direction: column;
}
.ail-wf-card.ail-hidden { display: none !important; }

/* Workflow card */
.ail-wf-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--ail-accent), var(--ail-accent2));
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  transition: box-shadow 0.35s;
}
.ail-glass-card:hover .ail-wf-icon {
  box-shadow: 0 0 32px rgba(99, 102, 241, 0.6);
}
.ail-wf-title { font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 10px; }
.ail-wf-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.ail-wf-title-link:hover { color: #a5b4fc; }
.ail-wf-desc { font-size: 14px; color: var(--ail-muted); line-height: 1.6; margin-bottom: 16px; }
.ail-wf-card-top { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 12px; color: var(--ail-muted); }
.ail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ail-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Home module (light section on index) */
.ail-home-section {
  position: relative;
  padding: 80px 0;
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  overflow: hidden;
}
.ail-home-section .ail-grid-bg { opacity: 0.5; }
.ail-home-head { text-align: center; max-width: 720px; margin: 0 auto 16px; position: relative; z-index: 2; }
.ail-home-head .ail-section-title { color: #fff; }
.ail-home-head .ail-section-desc { color: #cbd5e1; }
.ail-home-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.65;
  position: relative;
  z-index: 2;
}
.ail-home-card {
  animation: ail-float-card 6s ease-in-out infinite;
}
.ail-home-card:nth-child(2) { animation-delay: -1s; }
.ail-home-card:nth-child(3) { animation-delay: -2s; }
.ail-home-card:nth-child(4) { animation-delay: -3s; }
.ail-home-card:nth-child(5) { animation-delay: -4s; }
.ail-home-card:nth-child(6) { animation-delay: -5s; }
@keyframes ail-float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Tools grid */
.ail-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}
.ail-tool-item {
  text-align: center;
  padding: 24px 16px;
  border-radius: 16px;
  background: var(--ail-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s;
}
.ail-tool-item:hover {
  border-color: var(--ail-border);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.2);
  transform: translateY(-4px);
}
.ail-tool-item.ail-hidden { display: none; }
.ail-tool-name { font-size: 14px; font-weight: 600; color: #fff; margin-top: 8px; }
.ail-tool-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.ail-tool-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ail-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.ail-tool-tab.active, .ail-tool-tab:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--ail-border);
}

/* Industry cases */
.ail-case-card {
  padding: 24px;
  border-radius: var(--ail-radius);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 27, 75, 0.6));
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.ail-case-industry {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ail-case-row { font-size: 13px; color: var(--ail-muted); margin-bottom: 8px; }
.ail-case-row strong { color: #a5b4fc; }
.ail-case-result {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 700;
  color: #34d399;
}

/* Resources */
.ail-res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ail-res-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
}
.ail-res-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ail-accent), var(--ail-accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.ail-res-type { font-size: 11px; color: var(--ail-muted); }

/* CTA */
.ail-cta-block {
  text-align: center;
  padding: 64px 32px;
  border-radius: var(--ail-radius);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
  border: 1px solid var(--ail-border);
}

/* 实验室页：强制所有栏目可见（覆盖 style.css 的 data-reveal 隐藏） */
.ail-page main,
.ail-page .ail-section,
.ail-page .ail-section .container,
.ail-page .ail-card-grid,
.ail-page .ail-wf-card,
.ail-page .ail-glass-card,
.ail-page .ail-case-card,
.ail-page .ail-tool-item,
.ail-page .ail-tools-grid,
.ail-page .ail-res-grid,
.ail-page .ail-res-card,
.ail-page [data-reveal] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
.ail-page .ail-card-grid {
  display: grid !important;
}
.ail-page .ail-wf-card.ail-hidden {
  display: none !important;
}
/* 首页实验室模块卡片也始终可见 */
.ail-home-section .ail-glass-card,
.ail-home-section [data-reveal] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* ========== AI 实验室页 Header（深色顶栏，高优先级覆盖 internal-page-header） ========== */
.ail-page .site-header.internal-page-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(5, 8, 25, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.ail-page .site-header.internal-page-header .header-inner {
  height: 64px;
  padding: 0 24px;
}

.ail-page .site-header.internal-page-header .logo-wrap {
  height: auto;
  padding: 0;
  flex-shrink: 0;
  width: auto;
}

.ail-page .site-header.internal-page-header .logo-mark {
  width: auto !important;
  max-width: 180px;
  max-height: 40px !important;
  height: auto !important;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.ail-page .site-header.internal-page-header .nav-main {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  white-space: nowrap;
}

.ail-page .site-header .nav-main a,
.ail-page .site-header .nav-main a:visited,
.ail-page .site-header.internal-page-header .nav-main a,
.ail-page .site-header.internal-page-header .nav-main a:visited {
  color: rgba(255, 255, 255, 0.82) !important;
  text-shadow: none !important;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 0;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.ail-page .site-header .nav-main a:hover,
.ail-page .site-header.internal-page-header .nav-main a:hover {
  color: #ffffff !important;
  transform: translateY(-1px);
}

.ail-page .site-header .nav-main a.active,
.ail-page .site-header.internal-page-header .nav-main a.active {
  color: #ffffff !important;
  font-weight: 600;
}

.ail-page .site-header.internal-page-header .nav-main a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #22d3ee) !important;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.55) !important;
}

.ail-page .site-header.internal-page-header .btn-nav {
  color: #ffffff !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  text-shadow: none !important;
  box-shadow: none !important;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 24px;
}

.ail-page .site-header.internal-page-header .btn-nav:hover {
  color: #ffffff !important;
  background: rgba(99, 102, 241, 0.22) !important;
  border-color: rgba(139, 92, 246, 0.55) !important;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.5), 0 0 36px rgba(139, 92, 246, 0.25) !important;
  transform: translateY(-1px);
}

.ail-page .site-header.internal-page-header .nav-toggle {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1200px) {
  .ail-page .site-header.internal-page-header .nav-main {
    gap: 20px;
  }
  .ail-page .site-header.internal-page-header .nav-main a,
  .ail-page .site-header.internal-page-header .nav-main a:visited {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .ail-page .site-header.internal-page-header .nav-main {
    gap: 0;
  }
  .ail-page .site-header.internal-page-header .logo-mark {
    max-height: 36px !important;
  }
}

/* 覆盖 style.css 末尾 internal-page-header 黑色导航（PC） */
@media (min-width: 769px) {
  .ail-page .site-header.internal-page-header {
    z-index: 999 !important;
    position: sticky !important;
  }

  .ail-page .site-header.internal-page-header .nav-main {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 36px !important;
    white-space: nowrap !important;
  }

  .ail-page .site-header.internal-page-header .nav-main a,
  .ail-page .site-header.internal-page-header .nav-main a:visited {
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .ail-page .site-header.internal-page-header .nav-main a:hover {
    color: #ffffff !important;
  }

  .ail-page .site-header.internal-page-header .nav-main a.active {
    color: #ffffff !important;
    font-weight: 600 !important;
  }

  .ail-page .site-header.internal-page-header .nav-main a.active::after {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #22d3ee) !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.55) !important;
  }

  .ail-page .site-header.internal-page-header .btn-nav {
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    background: transparent !important;
  }
}

@media (max-width: 1024px) {
  .ail-card-grid, .ail-res-grid { grid-template-columns: repeat(2, 1fr); }
  .ail-hero__grid { flex-direction: column; text-align: center; }
  .ail-hero-visual { width: 100%; max-width: 320px; }
  .ail-hero-cta { justify-content: center; }
}
@media (max-width: 640px) {
  .ail-card-grid, .ail-res-grid { grid-template-columns: 1fr; }
  .ail-pills { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ail-flow-light, .ail-home-card { animation: none; }
  .ail-glass-card:hover { transform: none; }
}
