/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #c9a96e;
  --gold-light: #e8d5a8;
  --dark: #0a0a0f;
  --dark-2: #12121a;
  --dark-3: #1a1a28;
  --text: #e8e6e3;
  --text-muted: #9a9a9a;
  --nav-scrolled-bg: rgba(10, 10, 15, 0.92);
  --nav-shadow: rgba(0,0,0,0.3);
  --card-border: rgba(201,169,110,0.1);
  --card-border-hover: rgba(201,169,110,0.25);
  --divider: rgba(255,255,255,0.05);
  --icp-color: rgba(255,255,255,0.25);
  --serif: 'Noto Serif SC', 'SimSun', serif;
  --sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

[data-theme="light"] {
  --gold: #8b6914;
  --gold-light: #6b5010;
  --dark: #f5f2ed;
  --dark-2: #eae6df;
  --dark-3: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --nav-scrolled-bg: rgba(245, 242, 237, 0.95);
  --nav-shadow: rgba(0,0,0,0.06);
  --card-border: rgba(139,105,20,0.12);
  --card-border-hover: rgba(139,105,20,0.3);
  --divider: rgba(0,0,0,0.06);
  --icp-color: rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--dark);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: var(--nav-scrolled-bg);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: 0 1px 30px var(--nav-shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
}

.logo-icon {
  font-size: 1.2rem;
  opacity: 0.7;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.3s;
  letter-spacing: 0.5px;
}

.nav-links a:hover { color: var(--gold); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(201,169,110,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(201,169,110,0.04) 0%, transparent 60%),
    var(--dark);
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle 8s infinite;
}

@keyframes float-particle {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 0.6; }
  80% { opacity: 0.2; }
  100% { opacity: 0; transform: translateY(-200px); }
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 2;
}

.hero-sub {
  font-size: 0.85rem;
  letter-spacing: 6px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 28px;
  font-weight: 300;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 28px;
  color: var(--text);
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 48px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-block;
  padding: 14px 48px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 3px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: -1;
}

.btn-primary:hover {
  color: var(--dark);
}

.btn-primary:hover::before {
  transform: scaleX(1);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-line 2s infinite;
}

@keyframes scroll-line {
  0% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.5; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ===== Sections Common ===== */
.section {
  padding: 120px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-tag {
  font-size: 0.75rem;
  letter-spacing: 6px;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
  font-weight: 300;
}

.section-title {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.section-line {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto;
}

/* ===== About ===== */
.about { background: var(--dark-2); }

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.about-card {
  background: var(--dark-3);
  border: 1px solid var(--card-border);
  padding: 48px 36px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.about-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
}

.about-card:hover::after { opacity: 1; }

.about-icon {
  font-size: 2rem;
  margin-bottom: 24px;
}

.about-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--gold-light);
}

.about-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.9;
}

/* ===== Services ===== */
.services { background: var(--dark); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--dark-2);
  border: 1px solid var(--card-border);
  padding: 48px 36px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-border-hover);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-num {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(201,169,110,0.08);
  position: absolute;
  top: 16px;
  right: 24px;
  line-height: 1;
}

.service-icon {
  font-size: 2.2rem;
  margin-bottom: 24px;
}

.service-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--gold-light);
}

.service-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.9;
}

[data-theme="light"] .service-num {
  color: rgba(139,105,20,0.06);
}

/* ===== Vision (Dark) ===== */
.dark-section {
  background: var(--dark);
  position: relative;
}

.dark-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(201,169,110,0.15), transparent);
}

.section-header.light .section-title { color: var(--text); }

.vision-content {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.vision-item {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 36px 0;
  border-bottom: 1px solid var(--divider);
}

.vision-item:last-child { border-bottom: none; }

.vision-num {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 900;
  color: rgba(201,169,110,0.2);
  line-height: 1;
  flex-shrink: 0;
  min-width: 60px;
}

.vision-text h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.vision-text p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.9;
}

/* ===== Team ===== */
.team { background: var(--dark-2); }

.team-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.team-badge {
  display: inline-block;
  margin-bottom: 36px;
}

.team-badge span {
  display: inline-block;
  padding: 8px 28px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 4px;
}

.team-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 20px;
}

.team-desc strong {
  color: var(--gold-light);
  font-weight: 600;
}

.team-desc.last {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}

/* ===== Contact ===== */
.contact { background: var(--dark); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 700px;
  margin: 0 auto;
}

.contact-card {
  background: var(--dark-2);
  border: 1px solid var(--card-border);
  padding: 48px 36px;
  text-align: center;
  transition: all 0.4s ease;
}

.contact-card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.contact-card h4 {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--divider);
  background: var(--dark);
}

.footer-inner {
  text-align: center;
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.icp a {
  font-size: 0.75rem;
  color: var(--icp-color);
  transition: color 0.3s;
}

.icp a:hover { color: var(--gold); }

/* ===== Theme Toggle ===== */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--card-border);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--gold);
  background: rgba(201,169,110,0.08);
}

.theme-icon {
  position: absolute;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

.theme-icon.sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: var(--gold);
}

.theme-icon.moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
  color: var(--gold);
}

[data-theme="light"] .theme-icon.sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="light"] .theme-icon.moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Light theme overrides */
[data-theme="light"] .hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(139,105,20,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(139,105,20,0.03) 0%, transparent 60%),
    var(--dark);
}

[data-theme="light"] .particle {
  background: var(--gold);
}

[data-theme="light"] .dark-section::before {
  background: linear-gradient(to bottom, transparent, rgba(139,105,20,0.1), transparent);
}

[data-theme="light"] .about-card::after {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

[data-theme="light"] .vision-num {
  color: rgba(139,105,20,0.15);
}

[data-theme="light"] .scroll-hint span {
  background: linear-gradient(to bottom, var(--gold), transparent);
}

/* Theme transition */
body, .navbar, .about-card, .service-card, .contact-card, .hero-bg,
.section-title, .hero-title, .btn-primary, .footer {
  transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* ===== Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-right { gap: 0; }

  .hero-title { font-size: 2rem; }
  .hero-desc { font-size: 0.9rem; }
  .hero-desc br { display: none; }

  .section { padding: 80px 0; }
  .section-title { font-size: 1.7rem; }

  .about-grid { grid-template-columns: 1fr; }
  .about-card { padding: 36px 28px; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 36px 28px; }

  .vision-item { flex-direction: column; gap: 12px; }
  .vision-num { font-size: 1.8rem; }

  .contact-grid { grid-template-columns: 1fr; }
}
