/* ============================================
   瑞思特软件科技 - Design System
   Apple-inspired, minimal, premium
   ============================================ */

/* ---- Variables ---- */
:root {
  --bg: #f5f5f7;
  --bg-alt: #fff;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #aeaeb2;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-light: rgba(0,113,227,0.1);
  --dark-bg: #000;
  --dark-text: #f5f5f7;
  --dark-text-secondary: rgba(255,255,255,0.6);
  --card-bg: #fff;
  --card-border: #d2d2d7;
  --nav-blur: rgba(255,255,255,0.8);
  --nav-blur-dark: rgba(0,0,0,0.85);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 980px;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --ease-spring: cubic-bezier(0.32, 0.94, 0.6, 1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  line-height: 1.6; overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }

/* ---- Navigation ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--nav-blur);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
nav.scrolled {
  box-shadow: 0 1px 12px rgba(0,0,0,0.08);
}
.dark-nav nav { background: var(--nav-blur-dark); border-bottom-color: rgba(255,255,255,0.1); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 52px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  font-weight: 600; font-size: 18px; letter-spacing: -0.3px; transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.8; }
.nav-logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text); font-size: 13px; font-weight: 400;
  transition: color 0.2s; letter-spacing: 0.2px; position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 50%; right: 50%;
  height: 2px; background: var(--accent); border-radius: 2px;
  transition: left 0.3s ease, right 0.3s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { left: 0; right: 0; }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { left: 0; right: 0; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--text);
  border-radius: 2px; transition: 0.3s var(--ease-spring);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero ---- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: center; overflow: hidden;
  padding: 120px 24px 80px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  transform: scale(1.1); transition: transform 0.1s linear;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.6) 100%);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at 30% 50%, rgba(0,113,227,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(90,200,250,0.1) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.hero h1 {
  font-size: clamp(36px, 6vw, 72px); font-weight: 700; letter-spacing: -1.5px;
  line-height: 1.05; margin-bottom: 16px; color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero .gradient-text {
  background: linear-gradient(135deg, #60b0ff, #40d0ff, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p {
  font-size: clamp(16px, 2vw, 24px); color: rgba(255,255,255,0.8);
  max-width: 680px; margin: 0 auto 32px; line-height: 1.5; font-weight: 400;
  text-shadow: 0 1px 10px rgba(0,0,0,0.2);
}
.hero-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.hero-badge {
  padding: 6px 18px; border-radius: var(--radius-full); font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}
.hero-badge:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 30px;
  border-radius: var(--radius-full); font-size: 16px; font-weight: 500;
  text-decoration: none; transition: all 0.3s var(--ease-spring);
  border: none; cursor: pointer; position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(255,255,255,0.15); opacity: 0; transition: opacity 0.3s;
}
.btn:hover::before { opacity: 1; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,113,227,0.35); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.4); }
.btn-outline:hover { border-color: #fff; transform: translateY(-2px); }
.btn-light { background: rgba(255,255,255,0.15); color: #fff; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.2); }
.btn-light:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }

/* ---- Sections ---- */
section { padding: 120px 24px; position: relative; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4.5vw, 52px); font-weight: 700; letter-spacing: -0.5px;
  line-height: 1.1; margin-bottom: 16px;
}
.section-desc {
  font-size: clamp(15px, 1.8vw, 20px); color: var(--text-secondary); max-width: 680px;
  line-height: 1.5;
}
.center { text-align: center; }
.center.mx-auto { margin-left: auto; margin-right: auto; }

/* ---- Section with bg image ---- */
.section-hero {
  min-height: 60vh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  padding: 160px 24px 100px;
}
.section-hero .section-title { color: #fff; }
.section-hero .section-desc { color: rgba(255,255,255,0.8); margin: 0 auto; }
.section-hero .section-label { color: rgba(255,255,255,0.6); }
.section-hero .hero-bg::after {
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%);
}

/* ---- Cards ---- */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 48px;
}
.card {
  background: var(--card-bg); border-radius: var(--radius-lg); padding: 36px 28px;
  box-shadow: var(--shadow-sm); transition: all 0.4s var(--ease-spring);
  border: 1px solid var(--card-border); cursor: default; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), #5ac8fa);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease-spring);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md); display: flex;
  align-items: center; justify-content: center; margin-bottom: 20px; font-size: 24px;
  transition: transform 0.3s ease;
}
.card:hover .card-icon { transform: scale(1.1); }
.card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.3px; }
.card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.card-tag {
  padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 500;
  background: var(--accent-light); color: var(--accent);
}

/* ---- Dark cards ---- */
.dark-section { background: var(--dark-bg); color: var(--dark-text); }
.dark-section .section-desc { color: var(--dark-text-secondary); }
.dark-section .card {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}
.dark-section .card:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.dark-section .card p { color: rgba(255,255,255,0.6); }
.dark-section .card-tag { background: rgba(0,113,227,0.2); color: #5ac8fa; }

/* ---- Features grid ---- */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-top: 48px;
}
.feature-item { text-align: center; padding: 24px 16px; border-radius: var(--radius-md); transition: all 0.3s ease; }
.feature-item:hover { background: rgba(0,113,227,0.03); transform: translateY(-4px); }
.feature-icon { font-size: 40px; margin-bottom: 16px; display: block; }
.feature-item h4 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.feature-item p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.dark-section .feature-item:hover { background: rgba(255,255,255,0.05); }
.dark-section .feature-item p { color: rgba(255,255,255,0.5); }

/* ---- About table ---- */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; align-items: start;
}
.about-info h3 { font-size: 24px; font-weight: 600; margin-bottom: 16px; }
.about-info p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.about-table { width: 100%; border-collapse: collapse; }
.about-table td {
  padding: 12px 0; border-bottom: 1px solid var(--card-border); font-size: 14px; vertical-align: top;
}
.about-table td:first-child { font-weight: 600; width: 140px; color: var(--text-secondary); }
.about-table tr:last-child td { border-bottom: none; }

/* ---- Contact ---- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px;
}
.contact-info-item { margin-bottom: 28px; }
.contact-info-item h4 {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px;
}
.contact-info-item p { font-size: 16px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form input, .contact-form textarea {
  padding: 14px 18px; border: 1.5px solid var(--card-border); border-radius: var(--radius-md);
  font-size: 15px; font-family: inherit; outline: none; transition: all 0.3s;
  background: var(--card-bg); color: var(--text);
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,113,227,0.1);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form button { align-self: flex-start; }

/* ---- Footer ---- */
footer {
  background: var(--dark-bg); color: rgba(255,255,255,0.5); padding: 60px 24px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
footer h5 { color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 16px; letter-spacing: 0.5px; }
footer a {
  color: rgba(255,255,255,0.5); text-decoration: none; font-size: 13px;
  display: block; margin-bottom: 10px; transition: color 0.2s;
}
footer a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; font-size: 13px; flex-wrap: wrap; gap: 12px;
}

/* ---- Floating Orbs (decorative) ---- */
.orb {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(80px); opacity: 0.4; animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: #0071e3; top: -100px; right: -100px; }
.orb-2 { width: 350px; height: 350px; background: #5856d6; bottom: -50px; left: -80px; animation-delay: -7s; }
.orb-3 { width: 300px; height: 300px; background: #5ac8fa; top: 50%; left: 50%; animation-delay: -14s; }
.dark-section .orb-1 { background: #004a99; }
.dark-section .orb-2 { background: #3634a3; }
.dark-section .orb-3 { background: #0071e3; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -30px) scale(1.1); }
  50% { transform: translate(-20px, 40px) scale(0.9); }
  75% { transform: translate(30px, 20px) scale(1.05); }
}

/* ---- Particle Canvas ---- */
#particleCanvas {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
}

/* ---- Page fade-in on load ---- */
body { animation: pageFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- Stagger children (grid items animate in sequence) ---- */
.fade-up.stagger > *,
.hero-content.stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s var(--ease-spring);
}
.fade-up.visible.stagger > *,
.hero-content.visible.stagger > * {
  opacity: 1;
  transform: translateY(0);
}
.fade-up.visible.stagger > *:nth-child(1) { transition-delay: 0s; }
.fade-up.visible.stagger > *:nth-child(2) { transition-delay: 0.08s; }
.fade-up.visible.stagger > *:nth-child(3) { transition-delay: 0.16s; }
.fade-up.visible.stagger > *:nth-child(4) { transition-delay: 0.24s; }
.fade-up.visible.stagger > *:nth-child(5) { transition-delay: 0.32s; }
.fade-up.visible.stagger > *:nth-child(6) { transition-delay: 0.40s; }
.fade-up.visible.stagger > *:nth-child(7) { transition-delay: 0.48s; }
.fade-up.visible.stagger > *:nth-child(8) { transition-delay: 0.56s; }

/* ---- Animations ---- */
.fade-up { opacity: 0; transform: translateY(40px); transition: all 0.8s var(--ease-spring); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

.scale-in { opacity: 0; transform: scale(0.9); transition: all 0.6s var(--ease-spring); }
.scale-in.visible { opacity: 1; transform: scale(1); }

/* Hero text reveal */
.hero-reveal {
  overflow: hidden; display: inline-block;
}
.hero-reveal > span {
  display: inline-block; transform: translateY(100%);
  animation: revealUp 0.8s var(--ease-spring) forwards;
}
.hero-reveal:nth-child(2) > span { animation-delay: 0.15s; }

@keyframes revealUp {
  to { transform: translateY(0); }
}

/* Typewriter cursor effect */
.typewriter-cursor::after {
  content: '|'; animation: blink 1s step-end infinite; color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }

/* Shimmer loading */
.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  background-size: 200% 100%; animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Gradient border animation for feature cards */
.gradient-border {
  position: relative; border: none !important;
}
.gradient-border::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), #5ac8fa, #5856d6, var(--accent));
  background-size: 300% 300%; z-index: -1;
  animation: gradientRotate 4s ease-in-out infinite;
  opacity: 0; transition: opacity 0.3s;
}
.gradient-border:hover::before { opacity: 1; }
.gradient-border::after {
  content: ''; position: absolute; inset: 1px; border-radius: calc(var(--radius-lg) - 1px);
  background: var(--card-bg); z-index: -1;
}
.dark-section .gradient-border::after { background: rgba(255,255,255,0.06); }
@keyframes gradientRotate { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---- Scroll indicator ---- */
.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: rgba(255,255,255,0.5);
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; animation: fadeInUp 1s ease 1s both;
}
.scroll-dot {
  width: 24px; height: 40px; border: 2px solid rgba(255,255,255,0.3); border-radius: 12px;
  position: relative;
}
.scroll-dot::before {
  content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 8px; background: rgba(255,255,255,0.6); border-radius: 3px;
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot { 0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; } 50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---- Parallax sections ---- */
.parallax-section {
  position: relative; overflow: hidden;
}
.parallax-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-attachment: fixed;
  transform: scale(1.1);
}
.parallax-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.75) 100%);
}
.parallax-content { position: relative; z-index: 1; }

/* ---- Counter number ---- */
.counter-number { font-size: 48px; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 4px; }

/* ---- Back to top ---- */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px); transition: all 0.3s var(--ease-spring);
  pointer-events: none; color: #fff; font-size: 18px;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--accent); transform: translateY(-3px); }

/* ---- Mobile ---- */
@media (max-width: 768px) {
  section { padding: 80px 20px; }
  .nav-links {
    display: none; position: absolute; top: 52px; left: 0; right: 0;
    background: var(--nav-blur); backdrop-filter: blur(20px); flex-direction: column;
    padding: 16px 24px; gap: 16px; border-bottom: 1px solid var(--card-border);
  }
  .nav-links.open { display: flex; }
  .nav-links a::after { display: none; }
  .nav-toggle { display: flex; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 90vh; padding: 100px 20px 60px; }
  .section-hero { min-height: 50vh; padding: 120px 20px 60px; }
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
  .orb { filter: blur(40px); }
  .orb-1 { width: 200px; height: 200px; }
  .orb-2 { width: 180px; height: 180px; }
  .orb-3 { width: 150px; height: 150px; }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-badges { gap: 6px; }
  .hero-badge { font-size: 11px; padding: 4px 12px; }
}
