/* =========================================================
   Yi-Num · Landing Page
   东方玄学 × 现代科技 · Luxury / refined
   ========================================================= */

:root {
  --paper:        #F3F1E5;
  --paper-2:      #FBF9F1;
  --ink:          #14140F;
  --ink-soft:     #5C5B52;
  --ink-mute:     #8A887E;
  --gold:         #B08D57;
  --gold-bright:  #C9A227;
  --azure:        #16324F;

  --font-sans: "PingFang SC", "Noto Sans SC", "Source Han Sans SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Cormorant Garamond", "Songti SC", Georgia, serif;

  --shell: 1200px;
  --bleed: clamp(0px, 3.2vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

/* ---------- atmosphere layers ---------- */
.halo {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(58% 44% at 80% 6%,  rgba(201, 162, 39, 0.14), transparent 68%),
    radial-gradient(52% 40% at 4% 92%,  rgba(22, 50, 79, 0.08),  transparent 70%),
    radial-gradient(40% 30% at 50% 50%, rgba(255, 255, 255, 0.5), transparent 72%);
}

.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: 0.038; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header, main, .site-footer { position: relative; z-index: 1; }

/* ---------- shell ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 80;
  padding: 20px 0;
  transition: padding .4s var(--ease), background .4s var(--ease),
              border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  padding: 11px 0;
  background: rgba(243, 241, 229, 0.72);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  border-bottom-color: rgba(20, 20, 15, 0.07);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex; align-items: center; gap: .68rem;
  text-decoration: none;
}

.brand-mark {
  display: block; width: 38px; height: 38px; flex: none;
  transition: transform .6s var(--ease);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand:hover .brand-mark { transform: rotate(-12deg); }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  color: var(--ink);
}

/* ---------- header actions group ---------- */
.header-actions {
  display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.8rem);
}

/* ---------- 语言切换（与登录页一致） ---------- */
.lang { position: relative; }

.lang-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  height: 40px; padding: 0 .8rem;
  background: transparent;
  border: 1px solid rgba(20, 20, 15, .12);
  border-radius: 999px;
  font-family: inherit; font-size: .82rem; letter-spacing: .04em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.lang-btn svg { width: 16px; height: 16px; flex: none; }
.lang-btn:hover { color: var(--ink); border-color: rgba(20, 20, 15, .26); background: rgba(255, 255, 255, .5); }
.lang-btn:focus-visible { outline: 2px solid rgba(176, 141, 87, .7); outline-offset: 2px; }

.lang-caret { transition: transform .3s var(--ease); }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 190px; margin: 0; padding: .35rem;
  list-style: none;
  background: var(--paper-2);
  border: 1px solid rgba(20, 20, 15, .09);
  border-radius: 14px;
  box-shadow: 0 26px 46px -24px rgba(20, 20, 15, .45);
  animation: menuIn .22s var(--ease) both;
}
.lang-menu[hidden] { display: none; }

.lang-opt {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  width: 100%; padding: .6rem .7rem;
  background: transparent; border: 0; border-radius: 10px;
  font-family: inherit; font-size: .87rem; text-align: left;
  color: var(--ink-soft); cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang-opt:hover { background: rgba(20, 20, 15, .05); color: var(--ink); }
.lang-opt[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.lang-opt .check { width: 15px; height: 15px; flex: none; color: var(--gold); opacity: 0; }
.lang-opt[aria-selected="true"] .check { opacity: 1; }

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.6rem, 7vw, 4.2rem);
  align-items: center;
  padding-top: clamp(2.2rem, 7vh, 4.5rem);
  padding-bottom: clamp(3.2rem, 9vh, 6rem);
}

/* 主标题 / 副标题 / 按钮 / Slogan 均居中对齐（需求 2、3） */
.hero-copy {
  max-width: 34rem;
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0 0 1.4rem;
  font-size: .74rem; letter-spacing: .34em;
  color: var(--ink-mute);
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 0 rgba(201, 162, 39, .6);
  animation: pulse 2.8s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(201, 162, 39, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(201, 162, 39, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0); }
}

.title {
  margin: 0;
  font-size: clamp(2.4rem, 8.4vw, 4.3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .015em;
  color: var(--ink);
  text-wrap: balance;
  white-space: pre-line;
}

.subtitle {
  margin: 1.4rem auto 0;
  max-width: 32ch;
  font-size: clamp(.94rem, 1vw + .68rem, 1.08rem);
  line-height: 1.95;
  color: var(--ink-soft);
}

/* ---------- CTA ---------- */
.cta {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  width: 100%; max-width: 460px;
  margin: clamp(1.9rem, 4vw, 2.6rem) auto 0;
  padding: 1.15rem 1.6rem;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  font-size: 1.02rem; font-weight: 500;
  letter-spacing: .22em;
  text-decoration: none;
  box-shadow: 0 18px 34px -18px rgba(20, 20, 15, .55);
  transition: transform .38s var(--ease), box-shadow .38s var(--ease), background .38s var(--ease);
}
.cta-label { margin-right: -.22em; }
.cta:hover, .cta:focus-visible {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 26px 46px -18px rgba(20, 20, 15, .6),
              inset 0 0 0 1px rgba(201, 162, 39, .5);
}
.cta:active { transform: translateY(0); }
.cta-arrow { width: 20px; height: 20px; flex: none; transition: transform .38s var(--ease); }
.cta:hover .cta-arrow { transform: translateX(4px); }

/* ---------- slogan ---------- */
.slogan {
  display: flex; align-items: center; justify-content: center;
  gap: .9rem; flex-wrap: wrap;
  margin: 1.7rem 0 0;
  font-size: .78rem; letter-spacing: .34em; color: var(--ink-mute);
}
.slogan-rule {
  width: 34px; height: 1px; flex: none;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.slogan em {
  font-family: var(--font-display); font-style: normal;
  font-size: .95rem; letter-spacing: .18em; color: var(--gold);
}

/* ---------- visual ---------- */
.hero-visual { display: flex; justify-content: center; }

.chart-card {
  position: relative;
  margin: 0;
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  gap: 1.15rem;
  padding: clamp(1.3rem, 3.4vw, 2.3rem);
  background: linear-gradient(158deg, #FBF9F1 0%, #F0ECDE 100%);
  border: 1px solid rgba(20, 20, 15, .07);
  border-radius: 30px;
  box-shadow: 0 50px 90px -60px rgba(20, 20, 15, .5),
              inset 0 1px 0 rgba(255, 255, 255, .75);
}

.corner {
  position: absolute; width: 18px; height: 18px;
  border: 1px solid rgba(176, 141, 87, .5);
}
.corner.tl { top: 16px; left: 16px;  border-right: 0; border-bottom: 0; }
.corner.tr { top: 16px; right: 16px; border-left: 0;  border-bottom: 0; }
.corner.bl { bottom: 16px; left: 16px;  border-right: 0; border-top: 0; }
.corner.br { bottom: 16px; right: 16px; border-left: 0;  border-top: 0; }

.luopan {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: visible;
}

.chart-caption {
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
  justify-content: center;
  font-size: .7rem; letter-spacing: .26em; color: var(--ink-mute);
}
.caption-rule { width: 26px; height: 1px; background: rgba(20, 20, 15, .18); }

/* ---------- luopan internals ---------- */
.luopan .ring { fill: none; stroke: var(--ink); stroke-width: 1.1; }
.luopan .r-16 { stroke-opacity: .18; }
.luopan .r-14 { stroke-opacity: .26; }
.luopan .r-12 { stroke-opacity: .20; }
.luopan .r-10 { stroke-opacity: .14; stroke-width: 1; }
.luopan .r-08 { stroke-opacity: .10; stroke-width: 1; }

.luopan .ticks { stroke: var(--ink); stroke-width: 1.1; stroke-opacity: .38; }
.luopan .trigrams rect { fill: var(--ink); fill-opacity: .8; }

.st-gold  { fill: var(--gold); }
.st-ink   { fill: var(--ink); fill-opacity: .55; }
.st-azure { fill: var(--azure); fill-opacity: .75; }

.luopan .yj { fill: var(--ink); }
.yj-dot-light { fill: var(--paper-2); }
.yj-dot-dark  { fill: var(--ink); }

.spin-slow   { transform-origin: 300px 300px; animation: spin 150s linear infinite; }
.spin-slower { transform-origin: 300px 300px; animation: spin 300s linear infinite; }
.spin-rev    { transform-origin: 300px 300px; animation: spin 200s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid rgba(20, 20, 15, .08);
  padding: 2rem 0 calc(2.2rem + env(safe-area-inset-bottom));
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.footer-slogan {
  margin: 0;
  font-size: .8rem; letter-spacing: .3em; color: var(--ink-mute);
}
.footer-meta {
  margin: 0;
  font-family: var(--font-display);
  font-size: .82rem; letter-spacing: .16em; color: var(--ink-mute);
}

/* 底栏左侧：口号 + 关于我们 组合，左对齐 */
.footer-left {
  display: flex;
  align-items: baseline;
  gap: 1.6rem;
  flex-wrap: wrap;
}
/* 底栏「关于我们」标题链接：字号字体与口号保持一致，跟在口号右侧 */
.footer-about {
  font-family: inherit;
  font-weight: 500;
  font-size: .8rem;
  letter-spacing: .3em;
  color: var(--gold);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color .3s var(--ease);
}
.footer-about::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right .35s var(--ease);
}
.footer-about:hover { color: var(--ink); }
.footer-about:hover::after { right: 0; }

/* =========================================================
   Reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: rise .95s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* =========================================================
   Breakpoints
   ========================================================= */
@media (min-width: 900px) {
}

/* 超小屏：语言按钮仅保留地球图标，避免与品牌/汉堡拥挤 */
@media (max-width: 400px) {
  #langCurrent { display: none; }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.04fr .96fr;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    min-height: calc(100svh - 82px);
    padding-top: clamp(2rem, 6vh, 4rem);
  }
  .hero-copy { max-width: 36rem; }
  .hero-visual {
    justify-content: flex-end;
    margin-right: calc(var(--bleed) * -1);
  }
  .chart-card { max-width: 560px; }
  .luopan { max-width: 500px; transform: scale(1.04); }
}

@media (min-width: 1200px) {
  .brand-mark { width: 42px; height: 42px; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
