/* ===========================
   心缘堂 · 企业官网 · 全局样式
   =========================== */

/* Google Fonts removed — using system fonts */

/* ---------- CSS 变量 ---------- */
:root {
  --gold:       #C9A84C;
  --gold-light: #E8CB7A;
  --gold-dark:  #A07830;
  --ink:        #1A1208;
  --ink-soft:   #3D2E12;
  --bg:         #FDFAF4;
  --bg-warm:    #F5EDD8;
  --bg-section: #F9F4E8;
  --text:       #2C2010;
  --text-muted: #7A6A50;
  --white:      #FFFFFF;
  --border:     #DDD0B0;
  --shadow:     rgba(160, 120, 48, 0.15);
  --font-serif: 'PingFang SC', 'STSong', '宋体', 'Noto Serif SC', serif;
  --font-sans:  'PingFang SC', 'Microsoft YaHei', 'Heiti SC', 'Noto Sans SC', sans-serif;
  --radius:     4px;
  --transition: 0.35s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- 通用工具类 ---------- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  letter-spacing: .12em;
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: .06em;
  margin-bottom: 56px;
}
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.section-divider span {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
}
.section-divider i {
  font-style: normal;
  color: var(--gold);
  font-size: 1.1rem;
}
.btn {
  display: inline-block;
  padding: 13px 38px;
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: .1em;
  cursor: pointer;
  transition: var(--transition);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
  border: 1.5px solid var(--gold);
}
.btn-gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

/* =============================
   导航栏
   ============================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(253, 250, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 4px 24px var(--shadow);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.navbar__logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.navbar__logo-main {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .15em;
}
.navbar__logo-main span { color: var(--gold); }
.navbar__logo-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: .2em;
  margin-top: 2px;
}
.navbar__nav {
  display: flex;
  gap: 0;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.navbar__nav a {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--ink-soft);
  letter-spacing: .05em;
  padding: 4px 14px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.navbar__nav a:hover,
.navbar__nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.navbar__cta {
  display: flex;
  align-items: center;
}
/* 导航登录按钮 */
.btn-login-nav {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.25s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-login-nav:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.navbar__hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  transition: var(--transition);
}

/* =============================
   页脚
   ============================= */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .15em;
  margin-bottom: 6px;
}
.footer__brand-name span { color: var(--gold); }
.footer__brand-en {
  font-size: 0.7rem;
  letter-spacing: .2em;
  color: var(--gold-light);
  margin-bottom: 20px;
}
.footer__desc {
  font-size: 0.88rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.55);
  max-width: 300px;
}
.footer__col-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--white);
  letter-spacing: .1em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gold-dark);
}
.footer__links li { margin-bottom: 10px; }
.footer__links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.footer__links a:hover { color: var(--gold-light); padding-left: 4px; }
.footer__contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  align-items: flex-start;
}
.footer__contact-item .icon {
  color: var(--gold);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.footer__bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: .06em;
}
.footer__bottom span { color: var(--gold); }

/* =============================
   页面 Hero 通用 (子页面)
   ============================= */
.page-hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--ink) 0%, #2C1E08 60%, #4A3018 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A84C' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero__tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: .25em;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.page-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: .15em;
  margin-bottom: 16px;
}
.page-hero__title span { color: var(--gold); }
.page-hero__desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin: 0 auto;
  letter-spacing: .05em;
}
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}
.breadcrumb a { color: var(--gold-light); transition: var(--transition); }
.breadcrumb a:hover { color: var(--gold); }

/* =============================
   神秘特效 — 全局动画类
   ============================= */

/* 星象画布（所有页面共用） */
#starCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* 八卦背景纹理层 */
.bagua-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Ccircle cx='80' cy='80' r='72' stroke='%23C9A84C' stroke-width='0.5' fill='none' stroke-opacity='0.07'/%3E%3Ccircle cx='80' cy='80' r='52' stroke='%23C9A84C' stroke-width='0.4' fill='none' stroke-opacity='0.05'/%3E%3Ccircle cx='80' cy='80' r='32' stroke='%23C9A84C' stroke-width='0.3' fill='none' stroke-opacity='0.04'/%3E%3Cline x1='80' y1='8' x2='80' y2='152' stroke='%23C9A84C' stroke-width='0.3' stroke-opacity='0.04'/%3E%3Cline x1='8' y1='80' x2='152' y2='80' stroke='%23C9A84C' stroke-width='0.3' stroke-opacity='0.04'/%3E%3Cline x1='28' y1='28' x2='132' y2='132' stroke='%23C9A84C' stroke-width='0.3' stroke-opacity='0.03'/%3E%3Cline x1='132' y1='28' x2='28' y2='132' stroke='%23C9A84C' stroke-width='0.3' stroke-opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* 符文粒子容器 */
.rune-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* 滚动进场 — 雾中渐入（细腻版） */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s cubic-bezier(0.22,1,0.36,1), transform 1s cubic-bezier(0.22,1,0.36,1);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 1s cubic-bezier(0.22,1,0.36,1), transform 1s cubic-bezier(0.22,1,0.36,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 1s cubic-bezier(0.22,1,0.36,1), transform 1s cubic-bezier(0.22,1,0.36,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-up {
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal-up.visible { opacity: 1; transform: translateY(0) scale(1); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* 卡片悬浮金光边框动效 */
.gold-hover {
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s;
}
.gold-hover:hover {
  border-color: rgba(201,168,76,0.5) !important;
  box-shadow: 0 8px 36px rgba(201,168,76,0.15), 0 0 0 1px rgba(201,168,76,0.12);
  transform: translateY(-4px);
}

/* 旋转命盘容器 */
.destiny-disk-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.destiny-disk-wrap canvas {
  width: 100%;
  height: 100%;
}

/* 文字光效 */
.gold-glow-text {
  text-shadow: 0 0 20px rgba(201,168,76,0.4), 0 0 40px rgba(201,168,76,0.15);
}

/* 渐变分隔线 */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-bottom: 28px;
}
.section-divider span {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.4));
}
.section-divider span:last-child {
  background: linear-gradient(90deg, rgba(201,168,76,0.4), transparent);
}
.section-divider i {
  color: var(--gold);
  font-size: 0.9rem;
  font-style: normal;
  animation: pulse-gold 2.5s ease-in-out infinite;
}
@keyframes pulse-gold {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* 数字滚动 */
@keyframes numCount {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================
   响应式
   ============================= */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .navbar__nav { display: none; }
  .navbar__cta .btn { display: none; }
  .navbar__hamburger { display: flex; }
  .navbar__nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px 32px;
    gap: 16px;
  }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* =============================
   全站固定社交悬浮按钮
   ============================= */
.social-float {
  position: fixed;
  right: 20px;
  bottom: 32px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* 展开/收起主按钮 */
.social-float__toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(160,120,48,0.45);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
  position: relative;
  z-index: 2;
}
.social-float__toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(160,120,48,0.55);
}
.social-float__toggle svg {
  width: 22px; height: 22px;
  fill: #fff;
  transition: transform 0.35s ease, opacity 0.25s ease;
}
.social-float__toggle .icon-open  { position: absolute; }
.social-float__toggle .icon-close {
  position: absolute;
  opacity: 0;
  transform: rotate(-90deg);
}
.social-float.open .icon-open  { opacity: 0; transform: rotate(90deg); }
.social-float.open .icon-close { opacity: 1; transform: rotate(0deg); }

/* 各平台按钮列表 */
.social-float__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.social-float.open .social-float__list {
  max-height: 360px;
  opacity: 1;
}

/* 单个平台按钮 */
.social-float__item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}
.social-float__label {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  letter-spacing: .06em;
  padding: 5px 12px;
  border-radius: 100px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.social-float.open .social-float__label {
  opacity: 1;
  transform: translateX(0);
}
/* 各按钮延迟 */
.social-float__item:nth-child(1) .social-float__label { transition-delay: 0.05s; }
.social-float__item:nth-child(2) .social-float__label { transition-delay: 0.10s; }
.social-float__item:nth-child(3) .social-float__label { transition-delay: 0.15s; }
.social-float__item:nth-child(4) .social-float__label { transition-delay: 0.20s; }

.social-float__btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(0,0,0,0.18);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
  flex-shrink: 0;
}
.social-float__btn:hover {
  transform: scale(1.12);
  box-shadow: 0 5px 20px rgba(0,0,0,0.25);
}
.social-float__btn svg {
  width: 22px; height: 22px;
}

/* 各平台品牌色 */
.social-float__btn--whatsapp { background: #25D366; }
.social-float__btn--wechat   { background: #07C160; }
.social-float__btn--telegram  { background: #26A5E4; }
.social-float__btn--line      { background: #00B900; }

/* 移动端稍微小一点 */
@media (max-width: 480px) {
  .social-float {
    right: 14px;
    bottom: 22px;
  }
  .social-float__toggle { width: 46px; height: 46px; }
  .social-float__btn    { width: 40px; height: 40px; }
  .social-float__btn svg { width: 19px; height: 19px; }
  .social-float__label { font-size: 0.72rem; padding: 4px 10px; }
}
