/* ============================================================
   壹元网络科技 — 要素色配置（修改此处即可换肤）
   ============================================================ */
:root {
  /* 主色 */
  --color-primary: #00e5ff;
  --color-primary-dim: #00b8d4;
  --color-secondary: #7c4dff;
  --color-accent: #00ffa3;

  /* 背景 */
  --color-bg-deep: #050810;
  --color-bg: #0a0f1a;
  --color-bg-elevated: #111827;
  --color-bg-card: rgba(17, 24, 39, 0.65);

  /* 文字 */
  --color-text: #e8edf5;
  --color-text-muted: #8b9cb8;
  --color-text-dim: #5c6b82;

  /* 边框 / 光效 */
  --color-border: rgba(0, 229, 255, 0.15);
  --color-glow: rgba(0, 229, 255, 0.35);
  --color-glow-purple: rgba(124, 77, 255, 0.25);

  /* 字体 */
  --font-display: "Orbitron", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", system-ui, sans-serif;

  /* 间距 / 圆角 */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --header-h: 72px;
  --container: min(1120px, 92vw);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-deep);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent); }

.container { width: var(--container); margin-inline: auto; }

/* ---- 背景层 ---- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

/* ---- 顶栏 ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(5, 8, 16, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
}

.logo:hover { color: var(--color-text); }

.logo-img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.logo-img.sm {
  width: 32px;
  height: 32px;
}

.logo-text {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 0.25s;
}

.nav a:hover { color: var(--color-text); }
.nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.3s, opacity 0.3s;
}

/* ---- 主内容层级 ---- */
main, .site-footer { position: relative; z-index: 1; }

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  font-size: 0.85rem;
  color: var(--color-primary);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  margin-bottom: 28px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--color-accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  color: var(--color-bg-deep);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dim));
  box-shadow: 0 4px 28px var(--color-glow);
}

.btn-primary:hover { box-shadow: 0 8px 40px var(--color-glow); }

.btn-ghost {
  color: var(--color-primary);
  background: transparent;
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: var(--color-primary);
}

.btn-block { width: 100%; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-secondary);
  margin-left: 2px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-dim);
  margin-top: 4px;
}

/* Hero 视觉圆环 */
.hero-visual {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: min(480px, 45vw);
  aspect-ratio: 1;
  pointer-events: none;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  animation: spin 24s linear infinite;
}

.ring-1 { inset: 5%; animation-duration: 20s; }
.ring-2 { inset: 20%; animation-duration: 28s; animation-direction: reverse; border-color: rgba(124, 77, 255, 0.2); }
.ring-3 { inset: 35%; animation-duration: 16s; }

.orbit-ring::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--color-glow);
}

.core-glow {
  position: absolute;
  inset: 42%;
  background: radial-gradient(circle, var(--color-glow) 0%, transparent 70%);
  border-radius: 50%;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* ---- 通用区块 ---- */
.section {
  padding: 100px 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(0, 229, 255, 0.02), transparent);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-head p { color: var(--color-text-muted); }

/* ---- 卡片 ---- */
.glass {
  background: var(--color-bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.card {
  padding: 32px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), 0 0 40px var(--color-glow-purple);
}

.card-icon {
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.card p { color: var(--color-text-muted); font-size: 0.95rem; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* ---- 业务 ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.service-card {
  padding: 36px 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before { opacity: 1; }

.service-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(0, 229, 255, 0.12);
  display: block;
  margin-bottom: 12px;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.service-card > p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.service-card ul {
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 18px;
  font-size: 0.88rem;
  color: var(--color-text-dim);
  margin-bottom: 8px;
}

.service-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* ---- 技术 ---- */
.tech-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.tech-item {
  padding: 20px 24px;
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
  margin-bottom: 8px;
}

.tech-item:hover,
.tech-item.active {
  background: rgba(0, 229, 255, 0.06);
  border-left-color: var(--color-primary);
}

.tech-item h4 { font-size: 1rem; margin-bottom: 6px; }
.tech-item p { font-size: 0.88rem; color: var(--color-text-muted); }

.tech-panel { padding: 24px; }

.code-window {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
}

.code-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text-dim);
}

.code-bar span:nth-child(1) { background: #ff5f57; }
.code-bar span:nth-child(2) { background: #febc2e; }
.code-bar span:nth-child(3) { background: #28c840; }

.code-bar em {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  font-style: normal;
}

.code-window pre {
  margin: 0;
  padding: 20px;
  background: rgba(5, 8, 16, 0.9);
  overflow-x: auto;
}

.code-window code {
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--color-accent);
}

/* ---- 联系 ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: start;
}

.contact-form {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form label span {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
  background: rgba(5, 8, 16, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}

.contact-form textarea { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  text-align: center;
}

.form-hint.success { color: var(--color-accent); }

.contact-info { display: flex; flex-direction: column; gap: 16px; }

.info-block { padding: 24px; }
.info-block h4 {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.info-block p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.info-block.highlight {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.08);
}

.contact-mail {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-primary);
  word-break: break-all;
}

.contact-mail:hover { color: var(--color-accent); }

.contact-mail-hint {
  font-size: 0.82rem !important;
  color: var(--color-text-dim) !important;
}

.form-hint a { color: var(--color-primary); }
.form-hint a:hover { color: var(--color-accent); }

/* ---- 页脚：两行横排、紧凑贴底 ---- */
.site-footer {
  flex-shrink: 0;
  padding: 10px 0 8px;
  border-top: 1px solid var(--color-border);
  background: rgba(5, 8, 16, 0.92);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  width: 100%;
  line-height: 1.35;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.footer-brand .logo-img.sm {
  width: 28px;
  height: 28px;
}

.footer-copy,
.footer-mail,
.footer-icp,
.footer-ssl {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  white-space: nowrap;
}

.footer-ssl {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
}

.footer-ssl .ssl-icon { color: var(--color-accent); }
.footer-ssl .ssl-domain {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--color-primary);
  letter-spacing: 0.04em;
}

.footer-ssl.insecure .ssl-icon { color: #ff6b6b; }
.footer-ssl.insecure span:nth-child(2) { color: #ff9f9f; }

.footer-mail:hover,
.footer-icp:hover { color: var(--color-primary); }

/* ---- 响应式 ---- */
@media (max-width: 960px) {
  .hero-visual { opacity: 0.35; right: -20%; }
  .tech-layout,
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 16px;
    background: rgba(5, 8, 16, 0.95);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .nav a:last-child { border-bottom: none; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-stats { gap: 24px; }
  .hero-visual { display: none; }
  .footer-row {
    gap: 6px 12px;
  }

  .footer-copy,
  .footer-mail,
  .footer-icp,
  .footer-brand span {
    white-space: normal;
  }
}

/* 入场动画 */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
