/* 元始科技官网 —— 品牌色取自 logo 配色规范：金 #D0B071 / 墨 #403D40
   主题：亮色为默认；[data-theme="dark"] 覆盖为暗色 */

:root {
  --gold: #D0B071;
  --gold-dark: #B8965A;
  --ink: #403D40;
  --black: #000000;

  /* 可主题化变量（亮色） */
  --bg-page: #FAF8F4;
  --bg-alt: #FFFFFF;
  --bg-card: #FFFFFF;
  --heading: #403D40;
  --text: #3A383B;
  --text-body: #555254;
  --text-soft: #6B686A;
  --muted: #8A8789;
  --shadow: 0 12px 40px rgba(64, 61, 64, 0.10);

  /* 导航与首屏（亮色） */
  --nav-fg: rgba(64, 61, 64, 0.85);
  --nav-bg-scrolled: rgba(250, 248, 244, 0.92);
  --nav-line: rgba(208, 176, 113, 0.45);
  --hero-bg: #FAF8F4;
  --hero-title: #403D40;
  --hero-sub: #8A8789;
  --ghost-border: rgba(64, 61, 64, 0.35);
  --ghost-text: #403D40;
  --scroll-border: rgba(64, 61, 64, 0.35);
  --glow: rgba(208, 176, 113, 0.30);
  --menu-bg: rgba(250, 248, 244, 0.97);

  /* 页脚（亮色） */
  --footer-bg: #F3EFE7;
  --footer-name: rgba(64, 61, 64, 0.65);
  --footer-meta: rgba(64, 61, 64, 0.45);

  color-scheme: light;
}

[data-theme="dark"] {
  --bg-page: #0F0F12;
  --bg-alt: #151519;
  --bg-card: #1B1B20;
  --heading: #F0EDE6;
  --text: #D6D3CD;
  --text-body: #C2BFBA;
  --text-soft: #A5A19B;
  --muted: #8F8B85;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

  /* 导航与首屏（暗色） */
  --nav-fg: rgba(255, 255, 255, 0.85);
  --nav-bg-scrolled: rgba(0, 0, 0, 0.92);
  --nav-line: rgba(208, 176, 113, 0.25);
  --hero-bg: #000000;
  --hero-title: #F2EEE6;
  --hero-sub: rgba(255, 255, 255, 0.55);
  --ghost-border: rgba(255, 255, 255, 0.35);
  --ghost-text: #ffffff;
  --scroll-border: rgba(255, 255, 255, 0.35);
  --glow: rgba(208, 176, 113, 0.16);
  --menu-bg: rgba(0, 0, 0, 0.97);

  /* 页脚（暗色） */
  --footer-bg: #000000;
  --footer-name: rgba(255, 255, 255, 0.6);
  --footer-meta: rgba(255, 255, 255, 0.4);

  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:root {
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ===== 顶部导航 ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.nav.scrolled {
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--nav-line);
}

.nav-inner {
  width: min(1100px, 92%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo img { height: 44px; width: auto; }

/* 黑底白字 logo 仅用于深色背景，用 screen 混合消除黑框；亮色主题换墨色透明 logo */
.logo-dark-only { mix-blend-mode: screen; }
.logo-light-only { display: none; }
[data-theme="light"] .logo-light-only { display: block; }
[data-theme="light"] .logo-dark-only { display: none; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links { display: flex; gap: 36px; }

.nav-links a {
  color: var(--nav-fg);
  font-size: 15px;
  letter-spacing: 0.05em;
  transition: color 0.25s;
}

.nav-links a:hover { color: var(--gold); }

/* 主题切换按钮 */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ghost-border);
  background: transparent;
  color: var(--nav-fg);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}

.theme-toggle:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: rotate(15deg);
}

.theme-toggle svg { width: 17px; height: 17px; }

.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--nav-fg);
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== 首屏（跟随主题：亮色米白 / 暗色品牌黑） ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--hero-bg);
  overflow: hidden;
  transition: background 0.35s ease;
}

.hero-glow {
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
  pointer-events: none;
}

.hero-content { position: relative; padding: 120px 20px 80px; }

.hero-logo {
  width: min(420px, 78vw);
  margin: 0 auto 28px;
}

.hero-logo.logo-dark-only {
  mix-blend-mode: screen; /* 黑底 logo 融入深色背景 */
}

.hero-slogan {
  color: var(--hero-title);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: 0.14em;
  transition: color 0.35s ease;
}

.hero-dot { color: var(--gold); margin: 0 0.35em; }

.hero-sub {
  margin-top: 14px;
  color: var(--hero-sub);
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: 0.12em;
  transition: color 0.35s ease;
}

.hero-actions {
  margin-top: 44px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 34px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 0.06em;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
}

.btn-gold {
  background: var(--gold);
  color: var(--black);
  font-weight: 600;
}

.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(208, 176, 113, 0.35);
}

.btn-ghost {
  border: 1px solid var(--ghost-border);
  color: var(--ghost-text);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-ghost:hover { color: var(--gold); }

.hero-scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--scroll-border);
  border-radius: 14px;
  display: flex;
  justify-content: center;
}

.hero-scroll span {
  width: 3px;
  height: 9px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--gold);
  animation: drop 1.8s ease-in-out infinite;
}

@keyframes drop {
  0%   { transform: translateY(0);   opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0; }
}

/* ===== 通用区块 ===== */
.section {
  padding: 96px 0;
  background: var(--bg-page);
  transition: background 0.35s ease;
}

.section-tag {
  color: var(--gold-dark);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-tag.center { text-align: center; }

.section-title {
  color: var(--heading);
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: 0.04em;
  margin-bottom: 48px;
}

.section-title.center { text-align: center; }

/* ===== 关于我们 ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.about-text h2 {
  color: var(--heading);
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 22px;
  letter-spacing: 0.03em;
}

.about-text p { margin-bottom: 14px; color: var(--text-body); }

.about-points {
  list-style: none;
  margin-top: 18px;
}

.about-points li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--text-body);
}

.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.9;
}

.about-visual img {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.stats {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
  transition: background 0.35s ease;
}

.stat strong {
  display: block;
  color: var(--heading);
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: 0.04em;
}

.stat span {
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: 0.08em;
}

/* ===== 业务范围 ===== */
.section-business { background: var(--bg-alt); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-page);
  border-radius: var(--radius);
  padding: 34px 28px;
  border: 1px solid transparent;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, background 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(208, 176, 113, 0.55);
}

.card-num {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.18em;
  margin-bottom: 14px;
}

.card h3 {
  color: var(--heading);
  font-size: 19px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.card p { font-size: 14.5px; color: var(--text-soft); }

/* ===== 联系我们 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: background 0.35s ease;
}

.contact-item h4 {
  color: var(--gold-dark);
  font-size: 15px;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}

[data-theme="dark"] .contact-item h4 { color: var(--gold); }

.contact-item p { color: var(--text); font-size: 15px; }

.contact-item small { color: var(--muted); font-size: 12.5px; }

/* ===== 页脚（跟随主题：亮色配原色 logo / 暗色黑底白字） ===== */
.footer {
  background: var(--footer-bg);
  padding: 56px 0 40px;
  text-align: center;
  transition: background 0.35s ease;
}

.footer-logo {
  width: 150px;
  margin: 0 auto 18px;
}

.footer-name {
  color: var(--footer-name);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  transition: color 0.35s ease;
}

.footer-meta {
  margin-top: 10px;
  color: var(--footer-meta);
  font-size: 12.5px;
  transition: color 0.35s ease;
}

.footer-meta a { color: var(--footer-meta); transition: color 0.25s; }
.footer-meta a:hover { color: var(--gold); }
.footer-sep { margin: 0 8px; }

/* ===== 进场动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-visual { order: -1; }
  .about-visual img { max-width: 300px; }
  .cards, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .section { padding: 68px 0; }
  .cards, .contact-grid, .stats { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .nav-right { gap: 12px; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--menu-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav-links.open { max-height: 240px; }

  .nav-links a {
    display: block;
    padding: 15px 6vw;
    border-top: 1px solid var(--ghost-border);
  }

  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
