/* ==========================================
   星云科技官网 - 全局样式
   ========================================== */

:root {
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: #818cf8;
  --color-accent: #22d3ee;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7ff;
  --color-dark: #0f172a;
  --color-dark-alt: #1e293b;
  --color-text: #334155;
  --color-text-light: #94a3b8;
  --color-border: #e2e8f0;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 60px rgba(79, 70, 229, 0.18);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(79, 70, 229, 0.3);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.btn-block {
  width: 100%;
}

.btn-nav {
  padding: 10px 24px;
  font-size: 14px;
}

/* ---------- 导航栏 ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  transition: box-shadow var(--transition), background var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.logo-text {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-accent));
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 55%, #172554 100%);
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.7), transparent 70%);
  top: -120px;
  left: -100px;
  animation: float 9s ease-in-out infinite;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.6), transparent 70%);
  bottom: -140px;
  right: -80px;
  animation: float 11s ease-in-out infinite reverse;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.45), transparent 70%);
  top: 40%;
  left: 55%;
  animation: float 13s ease-in-out infinite;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease both;
}

.hero-title {
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  line-height: 1.2;
  background: linear-gradient(120deg, #ffffff 30%, #a5b4fc 60%, #67e8f9 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
  animation: fadeUp 0.8s ease 0.15s both;
}

.hero-subtitle {
  max-width: 640px;
  margin: 0 auto 40px;
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.8;
  animation: fadeUp 0.8s ease 0.3s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s ease 0.45s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 通用区块 ---------- */

.section {
  padding: 100px 0;
}

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

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 900;
  color: var(--color-dark);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.section-desc {
  color: var(--color-text-light);
  font-size: 16px;
}

.section-head-light .section-tag {
  color: var(--color-accent);
  background: rgba(34, 211, 238, 0.12);
}

.section-head-light .section-title {
  color: #fff;
}

.section-head-light .section-desc {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- 关于我们 ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.about-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #1e1b4b, #172554);
  padding: 24px;
  box-shadow: var(--shadow-md);
  animation: float 8s ease-in-out infinite;
}

.about-card-top {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-a { background: #f87171; }
.dot-b { background: #fbbf24; }
.dot-c { background: #34d399; }

.about-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.bar {
  display: block;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.9), rgba(34, 211, 238, 0.7));
  opacity: 0.85;
}

.bar-wide { width: 95%; }
.bar-mid { width: 72%; }
.bar-narrow { width: 52%; }

.about-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.about-text h3 {
  font-size: 26px;
  color: var(--color-dark);
  margin-bottom: 18px;
  font-weight: 900;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--color-text);
}

.about-points {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.about-points li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--color-dark-alt);
}

.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* ---------- 核心业务 ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.service-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(34, 211, 238, 0.14));
  margin-bottom: 22px;
  position: relative;
}

.service-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 28px 28px;
  background-position: center;
  background-repeat: no-repeat;
}

.service-icon[data-icon="cloud"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z'/%3E%3C/svg%3E");
}

.service-icon[data-icon="ai"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 1 3 3c0 .81-.32 1.55-.84 2.1.52.25.9.63 1.11 1.13.16.35.23.72.23 1.12 0 .36-.06.7-.18 1.02.6.14 1.16.45 1.62.9.46.47.78 1.02.93 1.63.15.58.15 1.17 0 1.75-.1.4-.28.78-.53 1.12.39.48.62 1.05.62 1.68 0 .86-.38 1.63-.99 2.16.34.44.54.99.54 1.59 0 1.66-1.34 3-3 3H8a4 4 0 0 1-4-4c0-1.66 1-3 2.5-3.5C6 10 6 9 6.5 8.5 7 8 8 8 8 7.5 8 6 8 5 9 4s2-2 3-2Z'/%3E%3C/svg%3E");
}

.service-icon[data-icon="data"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m7 14 3-3 3 3 5-6'/%3E%3C/svg%3E");
}

.service-icon[data-icon="security"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

.service-card h3 {
  font-size: 19px;
  color: var(--color-dark);
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.service-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

.service-link:hover {
  color: var(--color-primary-dark);
}

/* ---------- 数据实力 ---------- */

.stats-section {
  background: linear-gradient(160deg, #0f172a, #1e1b4b 60%, #172554);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.stat-item {
  text-align: center;
  padding: 20px;
}

.stat-number {
  display: inline-block;
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  background: linear-gradient(120deg, #a5b4fc, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-suffix {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-accent);
  margin-left: 2px;
}

.stat-item p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
}

/* ---------- 客户案例 ---------- */

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.case-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.case-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.case-card h3 {
  font-size: 18px;
  color: var(--color-dark);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
}

.case-card p {
  font-size: 14px;
  color: var(--color-text-light);
  flex: 1;
}

.case-metric {
  display: inline-block;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--color-border);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
}

/* ---------- 联系我们 ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.contact-info h3 {
  font-size: 22px;
  color: var(--color-dark);
  font-weight: 900;
  margin-bottom: 28px;
}

.contact-info li {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.contact-info li span:last-child {
  color: var(--color-text);
  font-size: 15px;
}

.contact-form {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-dark-alt);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-bg-alt);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  background: #fff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-light);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #ef4444;
}

.form-tip {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  min-height: 22px;
}

.form-tip.success {
  color: #16a34a;
}

.form-tip.error {
  color: #ef4444;
}

/* ---------- 页脚 ---------- */

.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  padding-top: 72px;
  padding-bottom: 48px;
}

.footer-brand p {
  margin-top: 20px;
  font-size: 14px;
  max-width: 360px;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: var(--color-primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* ---------- 滚动显现动画 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(15, 23, 42, 0.98);
    padding: 16px 24px;
    transform: translateY(-130%);
    transition: transform var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .nav-link {
    padding: 14px 0;
    width: 100%;
    text-align: left;
  }

  .nav-link::after {
    display: none;
  }

  .btn-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .section {
    padding: 72px 0;
  }

  .services-grid,
  .cases-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .about-points {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
