/* ============================================================
   通玄 TONGXUAN · 首页 home.css
   ============================================================ */

/* ================= 主视觉 ================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, #22305a 0%, transparent 60%),
    linear-gradient(180deg, #101a34 0%, var(--ink-900) 46%, var(--ink-950) 100%);
}
.hero-stars { position: absolute; inset: 0; z-index: 0; }

/* 月亮 */
.hero-moon {
  position: absolute;
  top: 12%; right: 12%;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fdf8e8 0%, #f0e3bd 45%, #d8c48e 100%);
  box-shadow:
    0 0 40px 12px rgba(240, 227, 189, 0.28),
    0 0 130px 50px rgba(240, 227, 189, 0.12);
  animation: moonBreath 7s ease-in-out infinite alternate;
  z-index: 1;
}
@keyframes moonBreath {
  from { box-shadow: 0 0 40px 12px rgba(240,227,189,0.24), 0 0 120px 44px rgba(240,227,189,0.10); }
  to   { box-shadow: 0 0 52px 16px rgba(240,227,189,0.34), 0 0 150px 60px rgba(240,227,189,0.16); }
}

/* 飘浮星曜文字 */
.hero-glyphs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-glyphs span {
  position: absolute;
  left: var(--gx); top: var(--gy);
  font-family: var(--font-serif);
  font-size: var(--gs);
  color: rgba(212, 175, 106, 0.16);
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
  animation: glyphFloat var(--gd) ease-in-out var(--gdelay) infinite alternate;
}
@keyframes glyphFloat {
  from { transform: translate3d(0, 0, 0); opacity: 0.55; }
  50%  { opacity: 1; }
  to   { transform: translate3d(14px, -26px, 0); opacity: 0.4; }
}

/* 内容 */
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 120px 24px 200px;
}
.hero-quote {
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.32em;
  color: var(--text-low);
  animation: heroUp 1.2s var(--ease-out) 0.15s both;
}
.hero-title {
  margin-top: 26px;
  font-size: clamp(88px, 16vw, 176px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.08em; text-indent: 0.08em;
  background: linear-gradient(168deg, #f4e3b8 8%, var(--gold-400) 38%, var(--gold-500) 62%, #a8813f 95%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(212, 175, 106, 0.25));
  animation: heroTitle 1.6s var(--ease-out) 0.3s both;
}
@keyframes heroTitle {
  from { opacity: 0; transform: translateY(34px) scale(0.97); filter: drop-shadow(0 6px 30px rgba(212,175,106,0)) blur(6px); }
  to   { opacity: 1; transform: none; filter: drop-shadow(0 6px 30px rgba(212,175,106,0.25)) blur(0); }
}
.hero-en {
  margin-top: 10px;
  font-size: 15px;
  letter-spacing: 0.9em; text-indent: 0.9em;
  color: rgba(212, 175, 106, 0.55);
  animation: heroUp 1.2s var(--ease-out) 0.55s both;
}
.hero-divider { color: var(--gold-600); animation: heroUp 1.2s var(--ease-out) 0.65s both; }
.hero-tagline {
  margin-top: 26px;
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 600;
  letter-spacing: 0.3em; text-indent: 0.3em;
  color: var(--text-hi);
  animation: heroUp 1.2s var(--ease-out) 0.75s both;
}
.hero-sub {
  margin-top: 18px;
  font-size: 15px;
  line-height: 2.15;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  animation: heroUp 1.2s var(--ease-out) 0.9s both;
}
.hero-actions {
  margin-top: 42px;
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  animation: heroUp 1.2s var(--ease-out) 1.05s both;
}
@keyframes heroUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* 山峦 */
.hero-mountains {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: min(46vh, 420px);
  z-index: 2;
  pointer-events: none;
}
.mountain {
  position: absolute;
  left: -2%; right: -2%; bottom: 0;
  width: 104%; height: 100%;
  will-change: transform;
}
.m-far  { opacity: 0.9; }
.m-mid  { opacity: 0.97; }
.hero-mist {
  position: absolute;
  left: 0; right: 0; bottom: 18%;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(150, 170, 210, 0.09), transparent);
  filter: blur(18px);
  animation: mistDrift 26s ease-in-out infinite alternate;
}
@keyframes mistDrift {
  from { transform: translateX(-4%); opacity: 0.7; }
  to   { transform: translateX(4%);  opacity: 1; }
}

/* 卷启滚动提示 */
.hero-scrollcue {
  position: absolute;
  left: 50%; bottom: 34px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: heroUp 1.2s var(--ease-out) 1.5s both;
}
.cue-line {
  width: 1px; height: 52px;
  background: linear-gradient(180deg, transparent, var(--gold-500));
  position: relative;
  overflow: hidden;
}
.cue-line::after {
  content: "";
  position: absolute; left: 0; top: -40%;
  width: 100%; height: 40%;
  background: var(--gold-300);
  animation: cueSlide 2.2s var(--ease-soft) infinite;
}
@keyframes cueSlide {
  0%   { top: -40%; }
  70%, 100% { top: 110%; }
}
.cue-text {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.5em; text-indent: 0.5em;
  color: var(--text-low);
}

.nw { white-space: nowrap; }
@media (max-width: 720px) {
  .hero-moon { top: 5.5%; right: 5%; width: 58px; height: 58px; }
  .hero-quote { font-size: 12px; letter-spacing: 0.16em; line-height: 2.2; padding: 0 8px; }
  .hero-content { padding: 100px 20px 170px; }
  .hero-sub { font-size: 13.5px; letter-spacing: 0.06em; }
  .hero-en { letter-spacing: 0.6em; text-indent: 0.6em; }
}

/* ================= 古籍跑马灯 ================= */
.classics-marquee {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0c1222, #0a0f1e);
  border-top: 1px solid rgba(212, 175, 106, 0.22);
  border-bottom: 1px solid rgba(212, 175, 106, 0.22);
  padding: 20px 0;
  /* 两端淡出 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeMove 44s linear infinite;
}
.classics-marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group {
  display: flex; align-items: center;
  flex-shrink: 0;
  padding-right: 0;
}
.marquee-group span {
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 0.14em;
  color: rgba(212, 175, 106, 0.6);
  white-space: nowrap;
  padding: 0 26px;
  transition: color 0.3s;
}
.marquee-group span:hover { color: var(--gold-300); }
.marquee-group i {
  font-style: normal;
  font-size: 9px;
  color: rgba(212, 175, 106, 0.32);
}
@keyframes marqueeMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ================= 数据 ================= */
.stats-section { padding: 72px 0; border-bottom: 1px solid rgba(44, 42, 36, 0.08); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(44px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(170deg, #8f6f35, #b8914b 55%, #d4af6a);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-num em {
  font-style: normal;
  font-size: 0.42em;
  margin-left: 4px;
}
.stat-label {
  margin-top: 6px;
  font-size: 15px;
  letter-spacing: 0.22em; text-indent: 0.22em;
  color: var(--paper-ink-soft);
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 16px; }
}

/* ================= 功能卡片 ================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 30px 26px 24px;
  background: rgba(250, 247, 239, 0.75);
  border: 1px solid rgba(44, 42, 36, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(44, 42, 36, 0.04);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.45s;
  overflow: hidden;
}
.feature-card::before {          /* 顶部金线，悬停展开 */
  content: "";
  position: absolute; top: 0; left: 50%;
  width: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  transform: translateX(-50%);
  transition: width 0.5s var(--ease-out);
}
.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(184, 145, 75, 0.55);
  box-shadow: 0 18px 42px rgba(120, 96, 50, 0.16);
}
.feature-card:hover::before { width: 100%; }
.card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.card-seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  font-family: var(--font-serif);
  font-size: 26px; font-weight: 700;
  color: var(--gold-400);
  background: linear-gradient(155deg, var(--ink-800), var(--ink-950));
  border: 1px solid rgba(212, 175, 106, 0.4);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(212, 175, 106, 0.18), 0 4px 12px rgba(13, 20, 38, 0.28);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s;
}
.feature-card:hover .card-seal {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: inset 0 1px 0 rgba(212, 175, 106, 0.3), 0 8px 20px rgba(13, 20, 38, 0.35);
}
.seal-cinnabar {
  background: linear-gradient(155deg, var(--cinnabar), var(--cinnabar-deep));
  color: #f8ecd8;
  border-color: rgba(184, 73, 62, 0.5);
}
.feature-card h3 {
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--paper-ink);
}
.feature-card p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--paper-ink-soft);
  flex-grow: 1;
}
.card-more {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: 13.5px;
  letter-spacing: 0.1em;
  color: var(--gold-700);
  display: inline-flex; align-items: center; gap: 6px;
}
.card-more i {
  font-style: normal;
  transition: transform 0.35s var(--ease-out);
}
.feature-card:hover .card-more i { transform: translateX(6px); }

/* 宽卡：横跨两列（占星 / 每日时令） */
.card-wide { grid-column: span 2; }
.card-today {
  font-family: var(--font-sans);
  font-size: 12.5px; font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--gold-700);
  margin-left: 10px;
  vertical-align: 2px;
}
@media (max-width: 640px) {
  .card-wide { grid-column: span 1; }
}

/* 旗舰卡：横跨两列、墨底金字 */
.card-flagship {
  grid-column: span 2;
  background:
    radial-gradient(ellipse 120% 90% at 85% -10%, rgba(212, 175, 106, 0.14), transparent 55%),
    linear-gradient(150deg, var(--ink-800), var(--ink-950) 80%);
  border-color: rgba(212, 175, 106, 0.35);
}
.card-flagship h3 { color: var(--gold-300); font-size: 24px; }
.card-flagship p { color: var(--text-mid); font-size: 14.5px; }
.card-flagship .card-more { color: var(--gold-400); }
.card-flagship:hover { box-shadow: 0 20px 48px rgba(13, 20, 38, 0.5); }

@media (max-width: 1080px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .card-flagship { grid-column: span 1; }
}

/* ================= 四步流程 ================= */
.steps-section {
  padding: 88px 0;
  background-color: var(--paper-200);
  border-top: 1px solid rgba(44, 42, 36, 0.08);
}
.steps-row {
  display: flex; align-items: stretch; justify-content: center;
  gap: 18px;
}
.step {
  flex: 1;
  max-width: 240px;
  text-align: center;
  padding: 8px 10px;
}
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 700;
  color: var(--gold-700);
  border: 1px solid rgba(184, 145, 75, 0.55);
  border-radius: 50%;
  background: rgba(250, 247, 239, 0.6);
  box-shadow: inset 0 0 0 4px var(--paper-200);
  transition: transform 0.4s var(--ease-out), background 0.4s, color 0.4s;
}
.step:hover .step-no {
  transform: rotate(45deg);
  background: var(--gold-500);
  color: #241a08;
}
.step:hover .step-no { transform: none; background: linear-gradient(150deg, var(--gold-400), var(--gold-600)); }
.step h3 {
  margin-top: 16px;
  font-size: 18px;
  letter-spacing: 0.16em;
  color: var(--paper-ink);
}
.step p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--paper-ink-soft);
  line-height: 1.8;
}
.step-link {
  align-self: center;
  width: 56px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 145, 75, 0.7), transparent);
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .steps-row { flex-direction: column; align-items: center; gap: 26px; }
  .step-link { width: 1px; height: 36px; background: linear-gradient(180deg, transparent, rgba(184,145,75,0.7), transparent); }
}

/* ================= AI 四维交互 ================= */
.ai-section {
  position: relative;
  background:
    radial-gradient(ellipse 70% 55% at 20% 0%, rgba(43, 59, 98, 0.5), transparent 60%),
    linear-gradient(180deg, var(--ink-950), var(--ink-900) 55%, var(--ink-950));
  overflow: hidden;
}
.ai-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(212, 175, 106, 0.06) 1px, transparent 1.5px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000, transparent 75%);
  pointer-events: none;
}
.ai-demo {
  position: relative;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 36px;
  align-items: start;
}
.ctrl-group { margin-bottom: 30px; }
.ctrl-label {
  display: block;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.4em;
  color: var(--gold-600);
  margin-bottom: 14px;
}
.ctrl-options { display: grid; gap: 12px; }
.ctrl-btn {
  position: relative;
  text-align: left;
  padding: 16px 20px 14px;
  border: 1px solid rgba(212, 175, 106, 0.2);
  border-radius: var(--radius-md);
  background: rgba(22, 33, 60, 0.4);
  transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.ctrl-btn:hover { transform: translateX(4px); border-color: rgba(212, 175, 106, 0.45); }
.ctrl-btn.active {
  border-color: var(--gold-500);
  background: linear-gradient(140deg, rgba(212, 175, 106, 0.14), rgba(22, 33, 60, 0.55) 60%);
  box-shadow: 0 8px 26px rgba(10, 15, 30, 0.4), inset 0 1px 0 rgba(212, 175, 106, 0.2);
}
.ctrl-btn.active::after {
  content: "◆";
  position: absolute; top: 14px; right: 16px;
  font-size: 10px;
  color: var(--gold-500);
}
.ctrl-en {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.32em;
  color: rgba(212, 175, 106, 0.5);
}
.ctrl-zh {
  display: block;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 19px; font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-hi);
}
.ctrl-btn.active .ctrl-zh { color: var(--gold-300); }
.ctrl-desc {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-low);
  letter-spacing: 0.04em;
}
.ctrl-note {
  font-size: 12.5px;
  color: var(--text-low);
  letter-spacing: 0.06em;
  line-height: 1.9;
}

/* 输出面板：宣纸卷轴 */
.ai-output {
  position: relative;
  background: linear-gradient(175deg, var(--paper-50), var(--paper-100) 70%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 175, 106, 0.5);
  box-shadow:
    0 24px 60px rgba(5, 8, 18, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
  min-height: 460px;
  display: flex; flex-direction: column;
}
.ai-output::before {            /* 纸纹 */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
}
.output-head {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 26px;
  border-bottom: 1px dashed rgba(150, 114, 58, 0.35);
}
.output-seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  font-family: var(--font-serif);
  font-size: 21px; font-weight: 700;
  color: #f8ecd8;
  background: linear-gradient(155deg, var(--cinnabar), var(--cinnabar-deep));
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(150, 53, 44, 0.35);
  transition: transform 0.4s var(--ease-out);
}
.output-meta { display: flex; flex-direction: column; }
.output-name {
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--paper-ink);
}
.output-tags {
  font-size: 12px;
  color: var(--paper-ink-soft);
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.output-dot {
  margin-left: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #48855a;
  box-shadow: 0 0 0 4px rgba(72, 133, 90, 0.18);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(72, 133, 90, 0.2); }
  50%      { box-shadow: 0 0 0 7px rgba(72, 133, 90, 0.06); }
}
.output-body {
  position: relative;
  flex-grow: 1;
  padding: 26px 30px;
  font-size: 15.5px;
  line-height: 2.25;
  letter-spacing: 0.04em;
  color: #3b382f;
}
.output-body p { display: inline; white-space: pre-wrap; }
.output-body .book { color: var(--cinnabar); }
.type-cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: var(--gold-700);
  animation: cursorBlink 0.9s steps(1) infinite;
}
@keyframes cursorBlink { 50% { opacity: 0; } }
.output-foot {
  position: relative;
  padding: 16px 26px 22px;
  border-top: 1px dashed rgba(150, 114, 58, 0.35);
  text-align: right;
}
.output-cta {
  font-family: var(--font-serif);
  font-size: 14.5px;
  letter-spacing: 0.1em;
  color: var(--gold-700);
  transition: color 0.3s, letter-spacing 0.3s;
}
.output-cta:hover { color: var(--cinnabar); }

@media (max-width: 960px) {
  .ai-demo { grid-template-columns: 1fr; }
  .ctrl-options { grid-template-columns: 1fr 1fr; }
  .ai-output { min-height: 420px; }
}
@media (max-width: 560px) {
  .ctrl-options { grid-template-columns: 1fr; }
}

/* ================= 注册 CTA ================= */
.cta-section {
  position: relative;
  text-align: center;
  background:
    radial-gradient(ellipse 65% 70% at 50% 115%, rgba(212, 175, 106, 0.12), transparent 65%),
    linear-gradient(180deg, var(--ink-950), #0b101f);
  overflow: hidden;
  border-top: 1px solid rgba(212, 175, 106, 0.12);
}
.cta-stars { position: absolute; inset: 0; }
.cta-inner { position: relative; }
.cta-title {
  margin-top: 22px;
  font-size: clamp(30px, 4.6vw, 46px);
  letter-spacing: 0.12em;
  color: var(--text-hi);
}
.cta-big {
  font-size: 1.35em;
  padding: 0 4px;
}
.cta-sub {
  margin-top: 16px;
  font-size: 15.5px;
  letter-spacing: 0.18em;
  color: var(--text-mid);
}
.cta-actions {
  margin-top: 40px;
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
}
