/* ===== Variables ===== */
:root {
  --blue-deep:    #0F2B5C;
  --blue-primary: #276EF1;
  --blue-mid:     #5E93F4;
  --blue-light:   #B8D4FE;
  --amber-accent: #F59E0B;
  --text-dark:    #0A1628;
  --text-mid:     #475569;
  --text-light:   #94A3B8;
  --bg-light:     #F8FAFC;
  --bg-warm:      #FDF8F0;
  --white:        #FFFFFF;

  --font-stack: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
  --nav-height: 68px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-stack);
  color: var(--text-dark);
  line-height: 1.75;
  background: var(--white);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

/* ===== Layout ===== */
.section { padding: 120px 24px; }
.section-white { background: var(--white); }
.section-gray  { background: linear-gradient(180deg, var(--bg-light) 0%, #F4F7FB 100%); }
.container { max-width: var(--max-width); margin: 0 auto; }

.section:last-of-type { padding-bottom: 100px; }

/* ===== Section Titles ===== */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
  padding-bottom: 24px;
  position: relative;
  letter-spacing: -0.01em;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-mid), transparent);
  border-radius: 2px;
  transition: width 0.6s var(--ease-out-expo);
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 760px;
  line-height: 1.8;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 3px rgba(10,22,40,0.04), 0 4px 16px rgba(10,22,40,0.06);
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.5px;
}
.nav-menu { display: flex; gap: 28px; align-items: center; }
.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--blue-primary); }

/* Hamburger toggle (hidden on desktop) */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle-label span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Hero ===== */
.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  padding: 100px 24px 56px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #EDF2FB 0%, #E2EBFA 30%, #F8FAFC 70%, #fff 100%);
}
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(39,110,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39,110,241,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-bg-glow {
  position: absolute;
  top: -30%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(39,110,241,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  position: relative;
  gap: 40px;
}
.hero-text { flex: 1; max-width: 540px; }
.hero-tag {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--blue-primary);
  background: rgba(39,110,241,0.08);
  margin-bottom: 16px;
}
.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.25;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.7;
}

.hero-deco {
  width: 32px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-light));
  border-radius: 2px;
  margin-top: 6px;
}
.hero-visual { flex: 1; display: flex; justify-content: center; }

/* Network graph */
.network-graph {
  position: relative;
  width: 260px; height: 240px;
}
.network-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.node {
  position: absolute;
  width: 10px; height: 10px;
  background: var(--blue-primary);
  border-radius: 50%;
  z-index: 1;
}
.node-1 { top: 12px;  left: 125px; }
.node-2 { top: 98px; left: 47px;  }
.node-3 { top: 98px; left: 203px; }
.node-4 { top: 218px; left: 125px; }
.node-5 { display: none; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
}
.scroll-indicator span {
  display: block;
  width: 20px; height: 32px;
  border: 2px solid var(--blue-light);
  border-radius: 10px;
  position: relative;
}
.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 8px;
  background: var(--blue-mid);
  border-radius: 2px;
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50%      { transform: translateX(-50%) translateY(8px); opacity: 0.3; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-primary), #1B5CD6);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(39,110,241,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1B5CD6, #1648B0);
  box-shadow: 0 4px 16px rgba(39,110,241,0.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--blue-primary);
  border: 2px solid var(--blue-primary);
}
.btn-outline:hover {
  background: var(--blue-primary);
  color: var(--white);
}

/* ===== Tags ===== */
.tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  justify-content: center;
}
.tag {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--blue-primary);
  background: rgba(39,110,241,0.06);
  border: 1px solid rgba(39,110,241,0.10);
  transition: background 0.25s, border-color 0.25s;
}
.tag:hover {
  background: rgba(39,110,241,0.10);
  border-color: rgba(39,110,241,0.20);
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.card {
  position: relative;
  background: linear-gradient(135deg, var(--white) 0%, #FDFDFE 100%);
  border-radius: 12px;
  padding: 36px 28px 32px;
  border-top: 3px solid var(--blue-primary);
  box-shadow:
    0 1px 2px rgba(15,43,92,0.04),
    0 4px 8px rgba(15,43,92,0.04),
    0 8px 16px rgba(15,43,92,0.02);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 4px 8px rgba(39,110,241,0.06),
    0 12px 24px rgba(39,110,241,0.08),
    0 24px 48px rgba(39,110,241,0.04);
}
.card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 11px;
  border: 1px solid rgba(57,125,233,0.06);
  pointer-events: none;
}
.card-icon { margin-bottom: 20px; }
.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}
.card-text {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.75;
}

/* ===== Clients ===== */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.client-card {
  background: linear-gradient(135deg, rgba(57,125,233,0.03), rgba(57,125,233,0.06));
  border: 1px solid rgba(57,125,233,0.10);
  border-radius: 12px;
  padding: 28px 24px;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.client-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 4px 12px rgba(39,110,241,0.06),
    0 16px 32px rgba(39,110,241,0.04);
}
.client-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-dark);
}
.client-en {
  display: block;
  font-size: 0.8rem;
  color: var(--blue-primary);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.client-card p {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.65;
}
.client-card-wide {
  max-width: 640px;
  margin: 20px auto 0;
  text-align: center;
  padding: 32px 28px;
  background: linear-gradient(135deg, rgba(57,125,233,0.04), rgba(57,125,233,0.08));
  border-color: rgba(57,125,233,0.15);
}

/* ===== Team ===== */
.team-text {
  max-width: 720px;
  margin: 40px auto 0;
  text-align: center;
  position: relative;
}
.team-text::before {
  content: '"';
  display: block;
  font-size: 4rem;
  font-weight: 300;
  color: var(--blue-light);
  line-height: 1;
  margin-bottom: -8px;
}
.team-text p {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.85;
}

/* ===== Contact ===== */
.contact-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.contact-desc {
  font-size: 1.05rem;
  color: var(--text-mid);
  margin-bottom: 20px;
  line-height: 1.7;
}
.contact-email {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--blue-primary);
  padding: 8px 20px;
  border-radius: 8px;
  background: rgba(39,110,241,0.04);
  transition: background 0.3s ease;
}
.contact-email:hover {
  background: rgba(39,110,241,0.08);
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(135deg, #0A1628 0%, #0F2B5C 100%);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94,147,244,0.2), transparent);
}
.footer p {
  position: relative;
  letter-spacing: 0.3px;
}

/* ===== Tablet ===== */
@media (max-width: 1023px) {
  .section { padding: 96px 24px; }
  .hero-text h1 { font-size: 2.4rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .client-card-wide { max-width: 100%; }
}

/* ===== Mobile ===== */
@media (max-width: 767px) {
  .section { padding: 64px 20px; }
  .section-title { font-size: 1.5rem; }
  .section-desc { font-size: 0.95rem; }

  /* Hero */
  .hero-content { flex-direction: column; gap: 32px; text-align: center; }
  .hero-text h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 1rem; }
  .hero-visual { display: none; }

  /* Navbar */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,22,40,0.35);
    z-index: -1;
  }
  .nav-toggle:checked ~ .nav-overlay {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 4px 12px rgba(10,22,40,0.08);
    pointer-events: none;
  }
  .nav-toggle-label { display: flex; }
  .nav-toggle:checked ~ .nav-menu {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Cards */
  .cards,
  .clients-grid {
    grid-template-columns: 1fr;
  }
  .card:hover { transform: none; }

  /* Team */
  .team-text {
    text-align: center;
  }
  .team-text::before {
    font-size: 3rem;
  }

  /* Contact */
  .contact-email { font-size: 1.15rem; word-break: break-all; }
}

/* ===== Animations ===== */
@keyframes nodePulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(39,110,241,0.4); }
  50% { transform: scale(1.15); opacity: 0.9; box-shadow: 0 0 0 8px rgba(39,110,241,0); }
}

@keyframes lineFlow {
  0% { stroke-dashoffset: 200; opacity: 0.3; }
  50% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.3; }
}

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes glowBreath {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.08); opacity: 0.9; }
}

/* ===== Hero Enhancements ===== */
.hero-bg-glow-2 {
  position: absolute;
  bottom: -20%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(94,147,244,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glowBreath 6s ease-in-out infinite;
}

.node {
  animation: nodePulse 3s ease-in-out infinite;
}
.node-1 { animation-delay: 0s; }
.node-2 { animation-delay: 0.6s; }
.node-3 { animation-delay: 1.2s; }
.node-4 { animation-delay: 1.8s; }

.network-lines line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: lineFlow 4s ease-in-out infinite;
}
.network-lines line:nth-child(1) { animation-delay: 0s; }
.network-lines line:nth-child(2) { animation-delay: 0.4s; }
.network-lines line:nth-child(3) { animation-delay: 0.8s; }
.network-lines line:nth-child(4) { animation-delay: 1.2s; }
.network-lines line:nth-child(5) { animation-delay: 1.6s; }
.network-lines line:nth-child(6) { animation-delay: 2.0s; }

.hero-text > * {
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}
.hero-text .hero-tag  { animation-delay: 0.2s; }
.hero-text h1         { animation-delay: 0.4s; }
.hero-text .hero-sub  { animation-delay: 0.6s; }
.hero-text .hero-deco { animation-delay: 0.8s; }

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal-up {
  transform: translateY(40px);
}
.reveal-scale {
  transform: scale(0.96);
}
.reveal-left {
  transform: translateX(-30px);
}
.reveal-right {
  transform: translateX(30px);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
