/* ===== CSS Variables ===== */
:root {
  --color-primary: #1a365d;
  --color-primary-light: #2a4a7f;
  --color-accent: #2563eb;
  --color-accent-light: #3b82f6;
  --color-accent-dark: #1d4ed8;
  --color-white: #ffffff;
  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Hiragino Sans GB", "WenQuanYi Micro Hei", "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 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.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-700);
  background: var(--color-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.6);
}

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

.btn-block {
  width: 100%;
}

/* ===== Section Styles ===== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--color-gray-900);
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--color-gray-500);
  margin-top: 24px;
}

/* ===== Header / Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  padding: 16px 0;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: 10px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--color-white);
  transition: var(--transition);
}

.header.scrolled .logo {
  color: var(--color-primary);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  font-size: 20px;
  color: var(--color-white);
}

.nav-list {
  display: flex;
  gap: 32px;
}

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

.header.scrolled .nav-link {
  color: var(--color-gray-700);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

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

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

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
  color: var(--color-accent);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

.header.scrolled .hamburger span {
  background: var(--color-primary);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0f3b6a 50%, #0a2540 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: var(--color-white);
  animation: floatShape 20s infinite ease-in-out;
}

.shape-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
  animation-delay: 0s;
  animation-duration: 25s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -50px;
  animation-delay: -5s;
  animation-duration: 22s;
}

.shape-3 {
  width: 300px;
  height: 300px;
  top: 40%;
  left: 20%;
  animation-delay: -10s;
  animation-duration: 18s;
}

.shape-4 {
  width: 200px;
  height: 200px;
  top: 20%;
  right: 30%;
  animation-delay: -15s;
  animation-duration: 20s;
}

.shape-5 {
  width: 150px;
  height: 150px;
  bottom: 30%;
  right: 15%;
  animation-delay: -7s;
  animation-duration: 15s;
}

.shape-6 {
  width: 100px;
  height: 100px;
  top: 10%;
  left: 10%;
  animation-delay: -12s;
  animation-duration: 17s;
}

@keyframes floatShape {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  25% {
    transform: translate(40px, -30px) scale(1.1) rotate(5deg);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95) rotate(-3deg);
  }
  75% {
    transform: translate(30px, 40px) scale(1.05) rotate(2deg);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  padding-top: 80px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-title-sub {
  display: block;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  letter-spacing: 4px;
}

.hero-desc {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 700px;
  margin: 0 auto 12px;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-desc-secondary {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

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

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  animation: bounceScroll 2s infinite;
}

.hero-scroll span {
  display: block;
  width: 2px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 1px;
}

.hero-scroll span:first-child {
  opacity: 0.4;
}

.hero-scroll span:last-child {
  opacity: 1;
  height: 12px;
}

@keyframes bounceScroll {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(15px); }
}

/* ===== About Section ===== */
.about {
  background: var(--color-white);
}

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

.about-text p {
  font-size: 16px;
  color: var(--color-gray-600);
  margin-bottom: 20px;
  line-height: 1.9;
  text-indent: 2em;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat-card {
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent-light);
}

.stat-number {
  font-size: 42px;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.2;
}

.stat-suffix {
  display: inline;
  font-size: 28px;
  font-weight: 800;
  color: var(--color-accent);
}

.stat-label {
  font-size: 15px;
  color: var(--color-gray-500);
  margin-top: 8px;
}

/* ===== Services Section ===== */
.services {
  background: var(--color-gray-50);
}

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

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  border: 1px solid var(--color-gray-200);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.service-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--color-accent);
}

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

.service-card-desc {
  font-size: 14px;
  color: var(--color-gray-500);
  line-height: 1.8;
  margin-bottom: 16px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-tags li {
  font-size: 12px;
  padding: 4px 12px;
  background: var(--color-gray-100);
  color: var(--color-gray-600);
  border-radius: 20px;
  transition: var(--transition);
}

.service-card:hover .service-tags li {
  background: #eff6ff;
  color: var(--color-accent);
}

/* ===== Advantages Section ===== */
.advantages {
  background: var(--color-white);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.advantage-card {
  padding: 40px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-200);
  transition: var(--transition);
  position: relative;
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.advantage-card:hover .advantage-number,
.advantage-card:hover .advantage-title,
.advantage-card:hover .advantage-desc {
  color: var(--color-white);
}

.advantage-number {
  font-size: 48px;
  font-weight: 900;
  color: var(--color-accent);
  opacity: 0.15;
  margin-bottom: 8px;
  transition: var(--transition);
}

.advantage-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 12px;
  transition: var(--transition);
}

.advantage-desc {
  font-size: 15px;
  color: var(--color-gray-500);
  line-height: 1.8;
  transition: var(--transition);
}

/* ===== Contact Section ===== */
.contact {
  background: var(--color-gray-50);
}

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

.contact-info h3,
.contact-form h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.contact-label {
  font-size: 13px;
  color: var(--color-gray-400);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-gray-800);
}

/* Form */
.contact-form {
  background: var(--color-white);
  padding: 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

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

.form-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-family: var(--font-sans);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  background: var(--color-gray-50);
  color: var(--color-gray-800);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--color-accent);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: var(--color-gray-400);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-feedback {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

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

.form-feedback.error {
  color: #dc2626;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-gray-900);
  color: var(--color-gray-400);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
}

.footer-links h4,
.footer-services h4,
.footer-contact h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 20px;
}

.footer-links ul,
.footer-services ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  transition: var(--transition);
}

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

.footer-services li {
  font-size: 14px;
}

.footer-contact p {
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--color-gray-800);
}

.footer-bottom p {
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--color-gray-500);
  line-height: 1.7;
}

.footer-icp {
  margin-top: 8px;
}

.footer-icp a {
  font-size: 12px;
  color: var(--color-gray-500);
  transition: var(--transition);
}

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

/* ===== Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }

  /* Mobile nav */
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-white);
    padding: 100px 32px 40px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
  }

  .nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-list li {
    border-bottom: 1px solid var(--color-gray-100);
  }

  .nav-link {
    display: block;
    padding: 16px 0;
    font-size: 17px;
    color: var(--color-gray-700) !important;
  }

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

  /* Mobile overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

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

  .advantages-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 24px 16px;
  }

  .stat-number {
    font-size: 32px;
  }

  .contact-form {
    padding: 28px 20px;
  }

  .hero-title {
    font-size: 32px;
  }
}
