/**
 * tpcoder科技 - 官方企业站全局核心样式表
 * Enterprise Software & Cloud Infrastructure Provider
 */

:root {
  /* 品牌色彩系统 */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-glow: rgba(37, 99, 235, 0.25);
  
  --secondary: #0284C7;
  --accent: #06B6D4;
  --accent-green: #10B981;
  --accent-purple: #7C3AED;
  
  /* 中性色系统 */
  --slate-950: #020617;
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50:  #F8FAFC;
  --white:      #FFFFFF;

  /* 功能语义色彩 */
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --bg-main: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-dark: #0F172A;
  --border-color: #E2E8F0;
  --border-dark: #1E293B;

  /* 阴影体系 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.2);

  /* 尺寸与圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --container-max: 1240px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
}

/* 容器与基础排版 */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 60px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.section-badge.dark {
  background-color: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
  border-color: rgba(96, 165, 250, 0.3);
}

.section-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-dark .section-title {
  color: var(--white);
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.section-dark .section-desc {
  color: var(--slate-400);
}

.text-gradient {
  background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-light {
  background: linear-gradient(135deg, #60A5FA 0%, #38BDF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 按钮样式系统 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
  color: var(--white);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--slate-800);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--slate-50);
  border-color: var(--slate-300);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* 顶部导航 Header */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  background-color: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.header-brand {
  display: flex;
  align-items: center;
}

.header-brand img {
  height: 44px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--slate-700);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-contact-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.header-contact-btn:hover {
  background-color: var(--primary);
  color: var(--white);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--slate-800);
}

.mobile-toggle svg {
  width: 26px;
  height: 26px;
}

/* 移动端菜单抽屉 */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 82%;
  max-width: 380px;
  height: 100vh;
  background-color: var(--white);
  z-index: 1001;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  transition: right 0.35s ease;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-link {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slate-800);
  padding: 10px 0;
  border-bottom: 1px solid var(--slate-100);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: var(--primary);
  padding-left: 6px;
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--slate-100);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Hero Section (首页与子页公共) */
.hero {
  position: relative;
  background: radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 15% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
              var(--white);
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  max-width: 620px;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--slate-900);
  margin-bottom: 22px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--slate-600);
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--slate-200);
  padding-top: 24px;
}

.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--slate-600);
  font-weight: 500;
}

.hero-badge-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

/* 子页面通用 Page Header Banner */
.page-header {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: var(--white);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}

.page-header-content {
  position: relative;
  max-width: 800px;
}

.page-header-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
}

.page-header-desc {
  font-size: 1.15rem;
  color: var(--slate-300);
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--slate-400);
  margin-bottom: 16px;
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb-sep {
  color: var(--slate-500);
}

/* 核心服务卡片网格 */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.service-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.service-card-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.service-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--slate-900);
}

.service-card-desc {
  color: var(--slate-600);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag-badge {
  font-size: 0.775rem;
  padding: 4px 10px;
  background-color: var(--slate-100);
  color: var(--slate-600);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  margin-top: auto;
}

.service-card-link:hover {
  gap: 10px;
  color: var(--primary-hover);
}

/* 核心优势卡片 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-box {
  background-color: var(--white);
  padding: 30px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-box:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-box-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-box-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--slate-900);
}

.feature-box-desc {
  font-size: 0.9rem;
  color: var(--slate-500);
  line-height: 1.6;
}

/* CTA 行动号召横幅 */
.cta-banner {
  background: linear-gradient(135deg, #1E3A8A 0%, #0F172A 100%);
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 240px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-banner-content {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.cta-banner-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.cta-banner-desc {
  font-size: 1.1rem;
  color: var(--slate-300);
  margin-bottom: 32px;
  line-height: 1.65;
}

.cta-banner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #93C5FD;
  font-size: 0.95rem;
  margin-top: 20px;
  font-weight: 500;
}

.cta-contact-email a {
  color: #38BDF8;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cta-contact-email a:hover {
  color: var(--white);
}

/* 统一页脚 Footer */
.footer {
  background-color: #0A0F1D;
  color: var(--slate-400);
  padding-top: 80px;
  border-top: 1px solid #1E293B;
  font-size: 0.925rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.2fr 1.4fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid #1E293B;
}

.footer-brand-desc {
  margin: 20px 0 24px;
  line-height: 1.7;
  max-width: 380px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--slate-300);
}

.footer-contact-item svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-contact-item a:hover {
  color: #38BDF8;
}

.footer-col-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background-color: var(--primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--slate-400);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--white);
  transform: translateX(4px);
}

.footer-newsletter-text {
  margin-bottom: 16px;
  line-height: 1.6;
}

.footer-newsletter-box {
  display: flex;
  background-color: #1E293B;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 4px;
}

.footer-newsletter-input {
  background: transparent;
  color: var(--white);
  padding: 8px 12px;
  width: 100%;
  font-size: 0.875rem;
}

.footer-newsletter-input::placeholder {
  color: var(--slate-500);
}

.footer-newsletter-btn {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.footer-newsletter-btn:hover {
  background: var(--primary-hover);
}

.footer-bottom {
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-legal-links a:hover {
  color: var(--slate-300);
}

/* 浮动操作条 (返回顶部与快速在线咨询) */
.float-tools {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 990;
}

.float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--slate-700);
  transition: var(--transition);
  border: 1px solid var(--slate-200);
}

.float-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.float-btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
