/* ============================================================
   五大服务能力 · 左侧切换 + 主题联动（对齐 guochao-archive/services.html）
   ============================================================ */

.services-paper {
  position: relative;
  overflow: hidden;
  --paper-a: rgba(56, 189, 248, .2);
  --paper-b: rgba(45, 212, 191, .12);
  --paper-c: rgba(100, 116, 139, .16);
  background:
    radial-gradient(ellipse 72% 58% at 98% -8%, var(--paper-a), transparent 56%),
    radial-gradient(ellipse 58% 48% at -6% 108%, var(--paper-b), transparent 52%),
    radial-gradient(ellipse 42% 36% at 72% 88%, var(--paper-c), transparent 55%),
    radial-gradient(ellipse 34% 28% at 18% 18%, rgba(226, 232, 240, .55), transparent 60%),
    linear-gradient(168deg, #dce5ef 0%, #e7eef6 32%, #edf2f7 58%, #e3ecf5 100%) !important;
  transition: background .55s ease;
}
.services-paper[data-theme="app"] {
  --paper-a: rgba(14, 165, 233, .28) !important;
  --paper-b: rgba(56, 189, 248, .16) !important;
  --paper-c: rgba(2, 132, 199, .12) !important;
}
.services-paper[data-theme="agent"] {
  --paper-a: rgba(244, 63, 94, .2) !important;
  --paper-b: rgba(251, 113, 133, .14) !important;
  --paper-c: rgba(225, 29, 72, .1) !important;
}
.services-paper[data-theme="llm"] {
  --paper-a: rgba(20, 184, 166, .24) !important;
  --paper-b: rgba(45, 212, 191, .16) !important;
  --paper-c: rgba(13, 148, 136, .12) !important;
}
.services-paper[data-theme="safety"] {
  --paper-a: rgba(59, 130, 246, .26) !important;
  --paper-b: rgba(96, 165, 250, .16) !important;
  --paper-c: rgba(29, 78, 216, .12) !important;
}
.services-paper[data-theme="train"] {
  --paper-a: rgba(245, 158, 11, .22) !important;
  --paper-b: rgba(251, 191, 36, .14) !important;
  --paper-c: rgba(217, 119, 6, .1) !important;
}
.services-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .09) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 20%, transparent 78%);
  opacity: .85;
}
.services-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 35%, rgba(148, 163, 184, .14) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 28%, transparent 72%, rgba(226, 232, 240, .35));
}
.services-paper > .container {
  position: relative;
  z-index: 1;
}

.services-paper-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 8px;
}
.services-paper-head .eyebrow {
  font-size: 11px !important;
  letter-spacing: .16em !important;
  color: #4f46e5 !important;
  font-weight: 700 !important;
  margin-bottom: 10px;
}
.services-paper-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem) !important;
  line-height: 1.4 !important;
  letter-spacing: -.02em !important;
  margin: 0 !important;
  max-width: 28em;
  color: #12182b;
}
.services-paper-head > p {
  font-size: .95rem !important;
  line-height: 1.7 !important;
  color: #64748b !important;
  max-width: 18em;
  margin: 0;
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .services-paper-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .services-paper-head > p { max-width: none; }
}

/* 服务能力：每项独立色系 + 切换动效 */
.services-tabs-wrap {
  --svc-accent: #0284c7;
  --svc-accent-2: #38bdf8;
  --svc-soft: rgba(2, 132, 199, .14);
  --svc-glow: rgba(14, 165, 233, .28);
  --svc-ink: #0369a1;
  display: grid;
  grid-template-columns: minmax(240px, 280px) 1fr;
  gap: 0;
  border: 1px solid color-mix(in srgb, var(--svc-accent) 26%, rgba(255, 255, 255, .55));
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .42) 45%, rgba(241, 245, 249, .55)),
    linear-gradient(145deg, #e8eef6, #eef3f8);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .75) inset,
    0 28px 64px rgba(15, 23, 42, .1),
    0 8px 20px color-mix(in srgb, var(--svc-accent) 12%, transparent);
  margin-top: 36px;
  align-items: stretch;
  transition: border-color .45s ease, box-shadow .45s ease;
}
.services-tabs-wrap[data-theme="app"] {
  --svc-accent: #0284c7; --svc-accent-2: #38bdf8; --svc-soft: rgba(2, 132, 199, .14); --svc-glow: rgba(14, 165, 233, .3); --svc-ink: #0369a1;
}
.services-tabs-wrap[data-theme="agent"] {
  --svc-accent: #e11d48; --svc-accent-2: #fb7185; --svc-soft: rgba(225, 29, 72, .12); --svc-glow: rgba(244, 63, 94, .28); --svc-ink: #be123c;
}
.services-tabs-wrap[data-theme="llm"] {
  --svc-accent: #0d9488; --svc-accent-2: #2dd4bf; --svc-soft: rgba(13, 148, 136, .14); --svc-glow: rgba(20, 184, 166, .28); --svc-ink: #0f766e;
}
.services-tabs-wrap[data-theme="safety"] {
  --svc-accent: #1d4ed8; --svc-accent-2: #60a5fa; --svc-soft: rgba(29, 78, 216, .14); --svc-glow: rgba(59, 130, 246, .3); --svc-ink: #1e40af;
}
.services-tabs-wrap[data-theme="train"] {
  --svc-accent: #d97706; --svc-accent-2: #fbbf24; --svc-soft: rgba(217, 119, 6, .14); --svc-glow: rgba(245, 158, 11, .3); --svc-ink: #b45309;
}
.services-tab-btn[data-theme="app"] { --tab-c: #0284c7; --tab-c2: #38bdf8; --tab-soft: rgba(2, 132, 199, .12); }
.services-tab-btn[data-theme="agent"] { --tab-c: #e11d48; --tab-c2: #fb7185; --tab-soft: rgba(225, 29, 72, .1); }
.services-tab-btn[data-theme="llm"] { --tab-c: #0d9488; --tab-c2: #2dd4bf; --tab-soft: rgba(13, 148, 136, .12); }
.services-tab-btn[data-theme="safety"] { --tab-c: #1d4ed8; --tab-c2: #60a5fa; --tab-soft: rgba(29, 78, 216, .12); }
.services-tab-btn[data-theme="train"] { --tab-c: #d97706; --tab-c2: #fbbf24; --tab-soft: rgba(217, 119, 6, .12); }

.services-tab-nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(241, 245, 249, .35)),
    linear-gradient(165deg, rgba(226, 232, 240, .55), rgba(203, 213, 225, .28));
  border-right: 1px solid rgba(148, 163, 184, .28);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .45);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: stretch;
  align-self: stretch;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  padding: 28px 18px;
  gap: 12px;
}
.services-tab-btn {
  --tab-c: #64748b;
  --tab-c2: #94a3b8;
  --tab-soft: rgba(148, 163, 184, .12);
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 0;
  width: 100%;
  padding: 16px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .28s ease, color .28s ease, border-color .28s ease, box-shadow .28s ease, transform .28s ease;
  text-align: center;
  overflow: hidden;
}
.services-tab-btn:hover {
  background: var(--tab-soft);
  color: var(--tab-c);
  transform: translateX(3px);
}
.services-tab-btn.active {
  background: rgba(255, 255, 255, .98);
  color: var(--tab-c);
  border-color: color-mix(in srgb, var(--tab-c) 32%, transparent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--tab-c) 18%, transparent);
  transform: translateX(0) scale(1.02);
}
.services-tab-btn::before {
  content: "";
  position: absolute;
  left: 10px; top: 22%; bottom: 22%;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--tab-c), var(--tab-c2));
  opacity: 0;
  transform: scaleY(.4);
  transition: opacity .28s ease, transform .28s ease;
}
.services-tab-btn.active::before {
  opacity: 1;
  transform: scaleY(1);
}
.services-tab-btn::after {
  content: "";
  position: absolute;
  left: 18%; right: 18%; bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tab-c), var(--tab-c2));
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
}
.services-tabs-wrap.is-autoplaying .services-tab-btn.active::after {
  opacity: 1;
  animation: svcTabProgress var(--svc-auto-ms, 4s) linear forwards;
}
@keyframes svcTabProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.services-tab-btn small {
  display: block;
  width: 100%;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
  color: inherit;
  opacity: .7;
  text-align: center;
}
.services-tab-btn .tab-name {
  display: block;
  width: 100%;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .02em;
  text-align: center;
}
.services-tab-btn .tab-hint {
  display: block;
  width: 100%;
  font-size: .72rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.4;
  text-align: center;
  transition: color .28s ease;
}
.services-tab-btn.active .tab-hint { color: color-mix(in srgb, var(--tab-c) 72%, #94a3b8); }

.services-tab-content {
  padding: 40px 40px 44px;
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(ellipse 68% 58% at 102% -4%, var(--svc-glow), transparent 58%),
    radial-gradient(ellipse 52% 46% at -4% 104%, var(--svc-soft), transparent 52%),
    radial-gradient(ellipse 40% 32% at 55% 45%, rgba(255, 255, 255, .45), transparent 65%),
    linear-gradient(155deg, #e2eaf3 0%, #ebf1f7 38%, #e6eef6 72%, #dde8f2 100%);
  transition: background .5s ease;
}
.services-tab-content::before {
  content: "";
  position: absolute;
  inset: auto -12% -28% auto;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--svc-glow), transparent 68%);
  pointer-events: none;
  animation: svcGlowDrift 7s ease-in-out infinite;
}
@keyframes svcGlowDrift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: .7; }
  50% { transform: translate(-28px, -18px) scale(1.12); opacity: 1; }
}
.services-tab-panel {
  display: none;
  width: 100%;
  position: relative;
  z-index: 1;
}
.services-tab-panel.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: svcPanelIn .48s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes svcPanelIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
.svc-panel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.svc-panel__meta small {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--svc-accent);
  display: block;
  margin-bottom: 8px;
}
.svc-panel__meta h3 {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 900;
  margin: 0 0 8px;
  color: #12182b;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.svc-panel__meta .slogan {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.45;
  background: linear-gradient(115deg, var(--svc-accent), var(--svc-accent-2) 55%, var(--svc-ink));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.services-tab-panel.active .svc-panel__meta small { animation: svcRise .45s .05s both; }
.services-tab-panel.active .svc-panel__meta h3 { animation: svcRise .45s .1s both; }
.services-tab-panel.active .svc-panel__meta .slogan {
  animation: svcRise .45s .16s both, svcSloganShift 4.2s ease-in-out .6s infinite;
}
@keyframes svcSloganShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes svcRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.svc-panel__icon {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--svc-accent-2) 28%, #fff), color-mix(in srgb, var(--svc-accent) 18%, #fff));
  color: var(--svc-accent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--svc-accent) 22%, transparent);
}
.services-tab-panel.active .svc-panel__icon {
  animation: svcIconIn .55s .12s both, svcIconFloat 3.4s ease-in-out .8s infinite;
}
.svc-panel__icon svg { width: 30px; height: 30px; }
@keyframes svcIconIn {
  from { opacity: 0; transform: scale(.7) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes svcIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.svc-panel__desc {
  color: #475569;
  line-height: 1.85;
  font-size: .98rem;
  max-width: 38rem;
  margin: 0 0 22px;
}
.services-tab-panel.active .svc-panel__desc { animation: svcRise .45s .2s both; }
.svc-panel__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.svc-panel__points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid color-mix(in srgb, var(--svc-accent) 22%, transparent);
  color: #1e293b;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.55;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(70, 84, 120, .06);
  opacity: 0;
  transform: translateX(-12px);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.services-tab-panel.active .svc-panel__points li {
  animation: svcPointIn .5s cubic-bezier(.16, 1, .3, 1) forwards;
}
.services-tab-panel.active .svc-panel__points li:nth-child(1) { animation-delay: .26s; }
.services-tab-panel.active .svc-panel__points li:nth-child(2) { animation-delay: .36s; }
.services-tab-panel.active .svc-panel__points li:nth-child(3) { animation-delay: .46s; }
@keyframes svcPointIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}
.svc-panel__points li:hover {
  transform: translateX(4px);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--svc-accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--svc-accent) 38%, transparent);
}
.svc-panel__points li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px; height: 8px;
  margin-top: .45em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--svc-accent), var(--svc-accent-2));
  box-shadow: 0 0 0 4px var(--svc-soft);
}

@media (max-width: 860px) {
  .services-tabs-wrap { grid-template-columns: 1fr; }
  .services-tab-nav {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, .22);
    height: auto;
    min-height: 0;
    padding: 10px 8px 12px;
    gap: 8px;
    justify-content: flex-start;
  }
  .services-tab-btn {
    flex: 0 0 auto;
    min-width: 140px;
    min-height: 0;
    padding: 12px 14px;
    border-radius: 14px;
  }
  .services-tab-btn:hover,
  .services-tab-btn.active { transform: none; }
  .services-tab-btn::before { display: none; }
  .services-tab-btn .tab-name { font-size: .95rem; }
  .services-tab-btn .tab-hint { display: none; }
  .services-tab-content { padding: 24px 20px; }
  .services-tab-panel.active { justify-content: flex-start; }
  .svc-panel__icon { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .services-tabs-wrap.is-autoplaying .services-tab-btn.active::after,
  .services-tab-content::before,
  .services-tab-panel.active,
  .services-tab-panel.active .svc-panel__meta small,
  .services-tab-panel.active .svc-panel__meta h3,
  .services-tab-panel.active .svc-panel__meta .slogan,
  .services-tab-panel.active .svc-panel__icon,
  .services-tab-panel.active .svc-panel__desc,
  .services-tab-panel.active .svc-panel__points li {
    animation: none !important;
  }
  .svc-panel__points li { opacity: 1; transform: none; }
  .services-tab-btn:hover { transform: none; }
}
