:root {
  --bg-base: #f5f5f7;
  --bg-surface: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --accent-color: #0066cc;
  --success-color: #34a853;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-base: #000000;
  --bg-surface: #111113;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --accent-color: #2997ff;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.5;
  transition: background-color 0.4s ease, color 0.4s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 102, 204, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(52, 168, 83, 0.03) 0%, transparent 40%);
  pointer-events: none;
}
[data-theme="dark"] .ambient-glow {
  background:
    radial-gradient(circle at 15% 20%, rgba(41, 151, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(41, 151, 255, 0.04) 0%, transparent 40%);
}

/* Nav */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  height: 68px;
  border-radius: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 0 24px;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.logo-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 100px;
  padding: 2.5px;
  overflow: hidden;
  text-decoration: none;
  transform: translateZ(0);
}
.logo-wrapper::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, #4285f4 0%, #ea4335 25%, #fbbc05 50%, #34a853 75%, #4285f4 100%);
  animation: spin-border 4s linear infinite;
  z-index: 0;
  transform-origin: center;
}
.logo-inner {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  padding: 6px 12px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 0;
  line-height: 0;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  transition: background 0.4s ease, color 0.4s ease;
}
.logo-img {
  height: 42px;
  width: auto;
  max-width: min(260px, 42vw);
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
@keyframes spin-border {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.nav-center { display: flex; gap: 24px; align-items: center; }
.nav-center a {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.nav-center a:hover,
.nav-center a.active { opacity: 1; color: var(--accent-color); }
.nav-controls { display: flex; align-items: center; gap: 10px; }
.control-btn {
  cursor: pointer;
  color: var(--text-primary);
  font-size: 16px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(128, 128, 128, 0.1);
  border: 0;
}
.control-btn:hover { opacity: 1; color: var(--accent-color); }
.menu-toggle {
  display: none;
  font-size: 20px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 10px;
  background: transparent;
  border: 0;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 20px 60px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 24px;
  max-width: 16em;
}
[data-theme="dark"] .hero h1 {
  background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(15px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 48px;
  line-height: 1.7;
}
.btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.3s ease, background 0.3s ease;
}
.btn-primary {
  background: var(--text-primary);
  color: var(--bg-base);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
  color: var(--bg-base);
}
.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
}
.btn-secondary:hover { transform: translateY(-2px); }

/* Sections */
.section {
  padding: 90px 20px;
  max-width: 1240px;
  margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
  font-weight: 600;
}
.section-header p { color: var(--text-secondary); font-size: 17px; }

.glass-panel {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.4s ease;
}
[data-theme="dark"] .glass-panel { box-shadow: none; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.about-content h3 {
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: 600;
}
.about-content p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.8;
}
.about-content strong { color: var(--text-primary); font-weight: 600; }

.visual-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  min-height: 320px;
  position: relative;
  background:
    radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.35), transparent 36%),
    linear-gradient(145deg, #0b3d7a, #0066cc 55%, #5aa7ff);
}
.visual-card.alt {
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.28), transparent 35%),
    linear-gradient(160deg, #123866, #1e6ae1 50%, #34a853);
}
.visual-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.35;
}
.visual-card .caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(7, 17, 31, 0.55);
  color: #fff;
  backdrop-filter: blur(10px);
}
.visual-card .caption strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}
.visual-card .caption span {
  font-size: 13px;
  color: rgba(226, 236, 250, 0.85);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}
.stat-item { padding: 24px; }
.stat-num {
  font-size: 34px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 8px;
}
.stat-label { font-size: 14px; color: var(--text-secondary); }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.adv-card {
  padding: 40px 30px;
  text-align: center;
}
.adv-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .adv-card:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}
.adv-icon {
  font-size: 36px;
  color: var(--accent-color);
  margin-bottom: 18px;
}
.adv-card h4 { font-size: 20px; margin-bottom: 12px; }
.adv-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

.page-hero {
  padding: 140px 20px 40px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.page-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  margin-bottom: 16px;
}
.page-hero p {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
}

.info-table {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
}
.info-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 14px;
}
.info-row:last-child { border-bottom: 0; }
.info-row b { color: var(--text-secondary); font-weight: 500; }

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
}
.contact-panel,
.contact-form {
  padding: 28px;
}
.contact-panel h3,
.contact-form h3 {
  font-size: 22px;
  margin: 12px 0 16px;
}
.contact-panel p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 10px;
  line-height: 1.7;
}
.contact-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--bg-base);
  color: var(--text-primary);
  font: inherit;
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(0, 102, 204, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}
.form-note {
  margin-top: 12px;
  min-height: 1.4em;
  color: var(--accent-color);
  font-size: 13px;
}

/* Footer */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 36px 20px;
  background: var(--bg-surface);
  margin-top: 60px;
}
.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 16px;
  max-width: 320px;
  line-height: 1.8;
}
.footer-links h4 {
  font-size: 16px;
  margin-bottom: 24px;
}
.footer-links a,
.footer-links p {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.footer-links a:hover { color: var(--accent-color); }
.copyright {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 0;
  border-top: none;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}
.copyright a { color: var(--text-secondary); }
.copyright a:hover { color: var(--accent-color); }

/* Float tools */
.float-tools {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--accent-color);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  font-size: 18px;
  transition: transform 0.2s ease;
}
.float-btn:hover { transform: translateY(-2px); }
.float-btn.primary {
  background: var(--success-color);
  color: #fff;
  border-color: transparent;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

@media (max-width: 992px) {
  .about-grid { grid-template-columns: 1fr; }
  .nav-center { gap: 14px; }
  .nav-center a { font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .navbar { top: 12px; height: 60px; padding: 0 12px 0 14px; }
  .logo-inner span { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-center {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: all 0.25s ease;
  }
  [data-theme="dark"] .nav-center {
    background: rgba(17, 17, 19, 0.95);
  }
  .nav-center.active {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .nav-center a {
    font-size: 16px;
    padding: 10px;
    display: block;
    width: 100%;
  }
  .menu-toggle { display: block; }
  .btn-group { flex-direction: column; width: min(100%, 320px); }
  .btn { width: 100%; }
  .about-grid { direction: ltr !important; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
  .float-tools { right: 12px; bottom: 16px; }
}

.logo-inner > span { display: none; }

@media (max-width: 768px) {
  /* logo mobile */
  .logo-img { height: 34px; max-width: 180px; }
  .logo-inner { padding: 4px 10px; }
}
