:root {
  --bg: #0b1020;
  --bg-accent: radial-gradient(
    1200px 500px at 20% -10%,
    #1e2a52 0%,
    transparent 55%
  );
  --text: #eaf0ff;
  --muted: #a8b3d1;
  --primary: #5a8bff;
  --primary-hover: #3f74f7;
  --border: #243055;
  --ok: #2dd4bf;
  --header-bg: rgba(11, 16, 32, 0.75);
  --header-border: rgba(36, 48, 85, 0.5);
  --surface: rgba(255, 255, 255, 0.02);
  --surface-strong: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  --cta-bg: linear-gradient(
    145deg,
    rgba(90, 139, 255, 0.18),
    rgba(45, 212, 191, 0.08)
  );
}

[data-theme="light"] {
  --bg: #f4f7ff;
  --bg-accent: radial-gradient(
    1200px 500px at 20% -10%,
    #dce7ff 0%,
    transparent 55%
  );
  --text: #1a2547;
  --muted: #52638f;
  --primary: #2f6bff;
  --primary-hover: #2458d8;
  --border: #ccd9ff;
  --ok: #0ea18d;
  --header-bg: rgba(244, 247, 255, 0.85);
  --header-border: rgba(168, 186, 234, 0.65);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(246, 250, 255, 0.92)
  );
  --cta-bg: linear-gradient(
    145deg,
    rgba(47, 107, 255, 0.18),
    rgba(14, 161, 141, 0.08)
  );
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg-accent), var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.header.header-scrolled {
  border-bottom-color: var(--header-border);
  box-shadow: 0 8px 24px rgba(8, 14, 30, 0.22);
}

[data-theme="light"] .header.header-scrolled {
  box-shadow: 0 8px 24px rgba(53, 77, 140, 0.16);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.nav-brand-text,
.nav-home,
.nav-contact-btn {
  white-space: nowrap;
}

.theme-switch {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.theme-switch-track {
  position: relative;
  width: 68px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #3d4352;
  background: #242730;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: block;
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.theme-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #17191f;
  border: 1px solid #2f3440;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(36px);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.theme-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-switch-track {
  border-color: #c2c5ce;
  background: #ececed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .theme-switch-thumb {
  transform: translateX(0);
  background: #f4f4f5;
  border-color: #d7d8dc;
}

[data-theme="light"] .theme-icon-sun {
  display: block;
}

[data-theme="light"] .theme-icon-moon {
  display: none;
}

.theme-switch:focus-visible .theme-switch-track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 11px 18px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.24);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: #3b4d85;
  background: rgba(255, 255, 255, 0.05);
}

.badge {
  display: inline-block;
  border: 1px solid #2b3b6b;
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 14px;
  background: rgba(90, 139, 255, 0.14);
  color: #bed0ff;
  font-size: 0.85rem;
}

[data-theme="light"] .badge {
  border-color: #9fb5f3;
  color: #214794;
  background: rgba(47, 107, 255, 0.12);
}

.sub {
  margin-top: 18px;
  max-width: 860px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions,
.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 13px;
  background: var(--surface);
  color: #c9d4f6;
  font-size: 0.9rem;
}

[data-theme="light"] .chip {
  color: #305188;
}

.section-title-spaced {
  margin-top: 32px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--surface-strong);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--border) 75%, #6d8ef1 25%);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.provider {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 160px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 16px 42px;
  background: var(--surface);
  color: #c6d2f4;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.provider:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--border) 72%, #6d8ef1 28%);
  box-shadow: 0 8px 20px rgba(15, 22, 46, 0.2);
}

.provider-title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
}

.provider-desc {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.provider-link-icon {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  background: color-mix(in srgb, var(--surface) 86%, transparent 14%);
}

[data-theme="light"] .provider {
  color: #284d8d;
}

[data-theme="light"] .provider:hover {
  box-shadow: 0 8px 20px rgba(58, 84, 149, 0.12);
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  border: 1px solid #2d3f74;
  border-radius: 16px;
  padding: 28px;
  background: var(--cta-bg);
}

[data-theme="light"] .cta-box {
  border-color: #a7c2ff;
}

.cta-box h2 {
  margin: 0;
}

.cta-box p {
  margin: 8px 0 0;
  color: #d3ddfb;
}

[data-theme="light"] .cta-box p {
  color: #334f86;
}

.tag {
  color: var(--ok);
  font-weight: 600;
}

.footer {
  border-top: 1px solid rgba(36, 48, 85, 0.6);
  color: #97a5ce;
  font-size: 0.9rem;
  padding: 24px 0 34px;
}

.back-to-top {
  position: fixed;
  right: max(16px, calc((100vw - 1120px) / 2 + 24px));
  bottom: 22px;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(236, 239, 245, 0.94);
  color: #4f5f86;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(8, 14, 30, 0.18);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease,
    background 0.2s ease;
  z-index: 40;
}

.back-to-top-icon {
  width: 24px;
  height: 24px;
}

.back-to-top-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top:hover {
  transform: translateY(6px);
  background: rgba(244, 247, 255, 0.98);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#services {
  scroll-margin-top: 116px;
}

[data-theme="light"] .footer {
  border-top-color: rgba(168, 186, 234, 0.7);
  color: #556996;
}

[data-theme="light"] .back-to-top {
  box-shadow: 0 10px 18px rgba(53, 77, 140, 0.16);
}

[data-theme="dark"] .back-to-top {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(18, 24, 45, 0.92);
  color: #d8e3ff;
}

[data-theme="dark"] .back-to-top:hover {
  background: rgba(24, 31, 58, 0.96);
}

@media (max-width: 640px) {
  .header .mx-auto {
    min-height: 76px;
    gap: 10px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav-left {
    gap: 12px;
  }

  .nav-brand-text {
    font-size: 1.02rem;
  }

  .nav-home {
    font-size: 0.98rem;
  }

  .nav-actions {
    gap: 8px;
  }

  .nav-contact-btn {
    padding: 10px 12px;
    font-size: 0.98rem;
  }

  .cta-box {
    padding: 22px;
  }

  .back-to-top {
    right: 14px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }
}
