/* ===== Variables ===== */
:root {
  --bg: #06080f;
  --bg-alt: #0c1019;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8edf5;
  --text-muted: #8b95a8;
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.15);
  --purple: #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.15);
  --gradient: linear-gradient(135deg, #22d3ee 0%, #6366f1 50%, #a78bfa 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
  --font: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --transition: 0.25s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

img { display: block; max-width: 100%; }

.container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* ===== Background ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: rgba(34, 211, 238, 0.12);
}

.bg-glow--2 {
  width: 500px;
  height: 500px;
  top: 40%;
  right: -150px;
  background: rgba(99, 102, 241, 0.1);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(6, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--cyan-dim);
  color: var(--cyan) !important;
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.nav-cta:hover {
  background: rgba(34, 211, 238, 0.25);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}

.hero-inner {
  padding: 80px 0 100px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text--ai {
  background: linear-gradient(135deg, #a78bfa, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.3);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(255,255,255,0.15);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.stat span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== Services ===== */
.service-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.service-tab {
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
}

.service-tab:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
}

.service-tab.active {
  background: var(--cyan-dim);
  border-color: rgba(34, 211, 238, 0.35);
  color: var(--cyan);
}

.service-tab[data-tab="ai"].active {
  background: var(--purple-dim);
  border-color: rgba(167, 139, 250, 0.35);
  color: var(--purple);
}

.service-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.service-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cards {
  display: grid;
  gap: 20px;
}

.cards--3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.card:hover {
  background: var(--surface-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-4px);
}

.card--highlight:hover {
  border-color: rgba(167, 139, 250, 0.3);
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-content strong {
  color: var(--text);
}

.about-list {
  margin-top: 24px;
}

.about-list li {
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tech-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tech-item {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
}

.tech-item:hover {
  border-color: rgba(34, 211, 238, 0.3);
  color: var(--cyan);
}

/* ===== Cases ===== */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.case-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.case-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-4px);
}

.case-card--featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(34,211,238,0.08), rgba(167,139,250,0.08));
  border-color: rgba(167, 139, 250, 0.2);
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}

.tag--ai {
  background: var(--purple-dim);
  color: var(--purple);
}

.case-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.case-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 16px;
}

.case-link {
  font-size: 0.88rem;
  color: var(--cyan);
  font-weight: 500;
  transition: var(--transition);
}

.case-link:hover { opacity: 0.8; }

/* ===== Team ===== */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.team-block {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.team-block h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.team-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.92rem;
}

.team-list li:last-child { border-bottom: none; }

.role { color: var(--text); }

.count {
  color: var(--cyan);
  font-weight: 600;
}

.desc {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Contact ===== */
.contact-section { padding-bottom: 120px; }

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 48px 56px;
  background: linear-gradient(135deg, rgba(34,211,238,0.1), rgba(99,102,241,0.1));
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: calc(var(--radius) + 4px);
}

.contact-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 8px 0 12px;
}

.contact-text p {
  color: var(--text-muted);
  max-width: 420px;
}

.phone-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  text-align: center;
}

.phone-link:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.15);
}

.phone-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.phone-number {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .cards--3,
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-card--featured {
    grid-column: span 2;
  }

  .about-grid,
  .team-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-card {
    flex-direction: column;
    text-align: center;
    padding: 36px 28px;
  }

  .contact-text p { max-width: none; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(6, 8, 15, 0.97);
    backdrop-filter: blur(16px);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
  }

  .nav-links a:hover { background: var(--surface); }

  .cards--3,
  .cases-grid,
  .case-card--featured {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    padding: 20px;
  }

  .section { padding: 72px 0; }
}
