/* ============================================
   Shared Styles - 开元探索科技官网
   ============================================ */

/* ============================================
   CSS Reset & Base
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #2D2440;
  background: #FFFFFF;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color 0.3s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================
   Design Tokens
   ============================================ */
:root {
  --purple-900: #1A0E2E;
  --purple-800: #2D1B4E;
  --purple-700: #3D2A5C;
  --purple-600: #5D4087;
  --purple-500: #7B5EA7;
  --purple-400: #9B80C4;
  --purple-300: #B8A0D8;
  --purple-200: #D4C4EB;
  --purple-100: #EDE6F7;
  --purple-50:  #F8F6FB;
  --gold-500:   #F8EE4F;
  --gold-400:   #FAF16A;
  --gold-600:   #E8D83A;
  --gold-100:   #FDFCE8;
  --text-primary: #2D2440;
  --text-secondary: #5A5170;
  --text-muted: #8A819C;
  --text-on-dark: #E8E0F0;
  --white: #FFFFFF;
  --border-light: #E8E0F0;
  --shadow-sm: 0 1px 3px rgba(93, 64, 135, 0.08);
  --shadow-md: 0 4px 16px rgba(93, 64, 135, 0.10);
  --shadow-lg: 0 8px 32px rgba(93, 64, 135, 0.12);
  --shadow-xl: 0 16px 48px rgba(93, 64, 135, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* ============================================
   Utility
   ============================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-600);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple-600);
  border-radius: 1px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 20px;
}
.section-desc {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 640px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold-500);
  color: var(--purple-800);
  box-shadow: 0 4px 16px rgba(248, 238, 79, 0.3);
}
.btn-primary:hover {
  background: var(--gold-400);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(248, 238, 79, 0.4);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}
.btn-purple {
  background: var(--purple-600);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(93, 64, 135, 0.25);
}
.btn-purple:hover {
  background: var(--purple-700);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(93, 64, 135, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--purple-600);
  border: 1.5px solid var(--purple-200);
}
.btn-ghost:hover {
  background: var(--purple-50);
  border-color: var(--purple-400);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: all 0.35s ease;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 rgba(93, 64, 135, 0.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  transition: color 0.35s;
}
.nav.scrolled .nav-brand { color: var(--text-primary); }
.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--purple-600);
  border-radius: 1px;
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--white); }
.nav-links a.active::after { width: 100%; }
.nav.scrolled .nav-links a { color: var(--text-secondary); }
.nav.scrolled .nav-links a:hover { color: var(--purple-600); }
.nav.scrolled .nav-links a.active { color: var(--purple-600); }
.nav-cta {
  padding: 10px 24px !important;
  font-size: 14px !important;
}
.nav.scrolled .btn-outline {
  color: var(--purple-600) !important;
  border-color: var(--purple-200) !important;
}
.nav.scrolled .btn-outline:hover {
  background: var(--purple-50) !important;
  border-color: var(--purple-400) !important;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav.scrolled .nav-toggle span { background: var(--text-primary); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 14, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
  font-size: 20px;
  font-weight: 500;
  color: var(--white);
  opacity: 0.85;
  transition: opacity 0.3s;
}
.mobile-menu a:hover { opacity: 1; }

/* ============================================
   Page Header (Sub Pages)
   ============================================ */
.page-header {
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--purple-900) 0%, var(--purple-700) 40%, var(--purple-600) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.page-header-orb-1 { width: 300px; height: 300px; background: var(--gold-500); top: -80px; right: -60px; }
.page-header-orb-2 { width: 200px; height: 200px; background: var(--purple-300); bottom: -40px; left: -40px; }
.page-header h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}
.page-header p {
  font-size: 16px;
  color: var(--text-on-dark);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
  position: relative;
  z-index: 2;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--purple-900);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
}
.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  transition: color 0.3s;
}
.footer-links a:hover { color: rgba(255,255,255,0.8); }
.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-copyright {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}
.footer-icp {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

/* ============================================
   Scroll Reveal Animation
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}
