/* ============================================================
   JUE 珏 — Base layout & components
   ============================================================ */

/* ---- Header / Nav ---- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: linear-gradient(to bottom, rgba(12,10,8,0.86), rgba(12,10,8,0));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease-lux), border-color 0.5s var(--ease-lux);
}
.site-nav.scrolled { background: rgba(12,10,8,0.92); border-bottom-color: var(--line-soft); }
.nav-inner {
  width: 100%; max-width: 84rem; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.brand { display: inline-flex; align-items: baseline; gap: 0.7rem; }
.brand-mark { font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0.12em; color: var(--gold-soft); }
.brand-sub { font-family: var(--zh); font-size: 0.72rem; letter-spacing: 0.4em; color: var(--muted-2); }
.nav-links { display: flex; align-items: center; gap: 2.4rem; }
.nav-links a {
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted); transition: color 0.4s var(--ease-lux);
  position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0%;
  background: var(--gold); transition: width 0.5s var(--ease-lux);
}
.nav-links a:hover { color: var(--gold-soft); }
.nav-links a:hover::after { width: 100%; }
.nav-audio { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--gold); }

/* ---- Hero (home / boards / product) ---- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-bottom: clamp(3rem, 9vh, 6rem);
  overflow: hidden;
}
.hero-media {
  position: absolute; top:0;right:0;bottom:0;left:0; z-index: 0;
  overflow: hidden;
}
.hero-media .ken {
  position: absolute; top:-12%;right:-12%;bottom:-12%;left:-12%;
  background-size: cover; background-position: center;
  animation: kenburns 26s var(--ease-slow) infinite alternate;
  will-change: transform;
}
.hero-vignette {
  position: absolute; top:0;right:0;bottom:0;left:0; z-index: 1;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(12,10,8,0) 38%),
    radial-gradient(120% 90% at 70% 20%, rgba(12,10,8,0) 0%, rgba(12,10,8,0.55) 100%);
}
.hero-copy { position: relative; z-index: 2; width: 100%; }
.hero-copy .eyebrow { margin-bottom: 1.4rem; }
.hero-copy .display { margin: 0 0 1.6rem; }
.hero-copy .lead { margin-bottom: 2.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: center; }

.hero-scroll-hint {
  position: absolute; z-index: 2; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  color: var(--muted-2); font-size: var(--fs-micro); letter-spacing: 0.3em; text-transform: uppercase;
}
.hero-scroll-hint .line {
  width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent);
  animation: drip 2.4s var(--ease-slow) infinite;
}

/* ---- Section headers ---- */
.sec-head { margin-bottom: clamp(2.5rem, 6vh, 4.5rem); max-width: 52rem; }
.sec-head .eyebrow { margin-bottom: 1.2rem; }
.sec-head .h2 { margin-bottom: 1.1rem; }
.sec-head .prose { margin-top: 0.4rem; }

/* ---- Board tiles ("What do you seek?") ---- */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.board-tile {
  position: relative;
  background: var(--bg);
  padding: 2rem;
  padding: clamp(2rem, 4vw, 3.2rem);
  min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.9rem;
  overflow: hidden;
  transition: background 0.7s var(--ease-lux);
}
.board-tile::before {
  content: "";
  position: absolute; top:0;right:0;bottom:0;left:0;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(201,168,108,0.10), transparent 55%),
    radial-gradient(120% 90% at 0% 100%, rgba(157,185,165,0.08), transparent 55%);
  opacity: 0; transition: opacity 0.7s var(--ease-lux);
}
.board-tile:hover { background: var(--bg-2); }
.board-tile:hover::before { opacity: 1; }
.board-tile .num { position: absolute; top: 1.6rem; left: 2rem; }
.board-tile .zh { font-family: var(--zh); font-size: 0.9rem; letter-spacing: 0.5em; color: var(--gold); }
.board-tile .h3 { transition: transform 0.7s var(--ease-lux); }
.board-tile:hover .h3 { transform: translateX(6px); }
.board-tile p { color: var(--muted); font-size: var(--fs-small); max-width: 20rem; }
.board-tile .link-arrow { margin-top: 0.6rem; }

/* ---- Philosophy / editorial split ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split .zh-seal {
  font-family: var(--zh); font-size: clamp(2rem, 5vw, 4rem); letter-spacing: 0.4em;
  color: transparent; -webkit-text-stroke: 1px var(--gold-dim);
  opacity: 0.9; line-height: 1.2;
}
.split .right .lead { margin: 1.4rem 0 1.2rem; }

/* ---- Featured pieces ---- */
.pieces-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.piece-card {
  display: block; position: relative;
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  transition: transform 0.8s var(--ease-lux), border-color 0.8s var(--ease-lux), box-shadow 0.8s var(--ease-lux);
}
.piece-card:hover { transform: translateY(-6px); border-color: var(--line); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8); }
.piece-media { position: relative; min-height: 16rem; aspect-ratio: 4 / 5; overflow: hidden; }
.piece-media .ph { position: absolute; top:0;right:0;bottom:0;left:0; }
.piece-card .meta { padding: 1.6rem 1.6rem 1.9rem; }
.piece-card .meta .eyebrow { margin-bottom: 0.7rem; }
.piece-card .meta .h3 { margin-bottom: 0.5rem; }
.piece-card .meta p { color: var(--muted); font-size: var(--fs-small); }
.piece-card .meta .zh { display: block; margin-top: 0.8rem; }

/* ---- Placeholder media (direction-quality) ---- */
.ph { position: relative; background: var(--bg-3); }
.ph-jade {
  background:
    radial-gradient(90% 60% at 30% 20%, rgba(183,208,191,0.5), rgba(63,92,74,0.28) 45%, rgba(12,10,8,0) 75%),
    radial-gradient(70% 70% at 80% 70%, var(--aurora-g1), transparent 60%),
    linear-gradient(150deg, var(--bg-3), var(--bg-2) 55%, var(--bg));
}
.ph-jade::after {
  content: "";
  position: absolute; top:0;right:0;bottom:0;left:0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.14), transparent),
    radial-gradient(1.5px 1.5px at 55% 60%, rgba(255,255,255,0.10), transparent),
    radial-gradient(2px 2px at 75% 25%, rgba(255,255,255,0.08), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.12), transparent),
    radial-gradient(2px 2px at 85% 75%, rgba(255,255,255,0.07), transparent);
  background-size: 220px 220px;
  mix-blend-mode: screen;
  opacity: 0.7;
}
.ph-veins { position: absolute; top:-20%;right:-20%;bottom:-20%;left:-20%; opacity: 0.5; mix-blend-mode: screen; }
.ph-label {
  position: absolute; left: 1rem; bottom: 1rem;
  font-size: var(--fs-micro); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted-2);
  border: 1px dashed var(--line-soft); padding: 0.4rem 0.7rem;
  background: rgba(12,10,8,0.5);
}

/* ============================================================
   Ask / divination page
   ============================================================ */
.ask-wrap { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: var(--nav-h); }
.ask-step { text-align: center; }
.ask-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 2.4rem; }
.ask-choice {
  border: 1px solid var(--line); padding: 0.9rem 1.5rem;
  font-size: var(--fs-small); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  transition: all 0.5s var(--ease-lux);
}
.ask-choice:hover, .ask-choice.on { border-color: var(--gold); color: var(--gold-soft); background: rgba(201,168,108,0.07); }
.oracle {
  min-height: 46vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  text-align: center; padding: var(--space-4) 0;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.9s var(--ease-lux), transform 0.9s var(--ease-lux);
}
.oracle.in { opacity: 1; transform: none; }
.oracle .o-line {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--gold-soft); max-width: 40rem; line-height: 1.4;
}
.oracle .o-zh { font-family: var(--zh); font-size: 1.1rem; letter-spacing: 0.3em; color: var(--muted); }
.oracle .o-ref { margin-top: 1.2rem; }

/* ============================================================
   Product story page
   ============================================================ */
.story-hero { min-height: 100vh; min-height: 100svh; position: relative; display: flex; align-items: flex-end; padding-bottom: 4rem; }
.story-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.2rem; }

.chapter { padding: clamp(5rem, 16vh, 12rem) 0; position: relative; }
.chapter-alt { background: var(--bg-2); }
.chapter-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.chapter-grid.rev { grid-template-columns: 1.1fr 1fr; }
.chapter-kicker { font-size: var(--fs-micro); letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.9rem; }
.chapter-kicker .zh { font-family: var(--zh); color: var(--gold); }
.chapter .h2 { margin: 0.8rem 0 1.2rem; }
.chapter .prose { font-size: 1.02rem; }
.chapter-media { position: relative; min-height: 12rem; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line-soft); }
.chapter-media .ph-label { left: auto; right: 1rem; }

/* Full-bleed media break */
.media-bleed { width: 100%; min-height: 14rem; aspect-ratio: 16 / 8; margin: var(--space-4) 0; position: relative; overflow: hidden; border: 1px solid var(--line-soft); }

/* ---- 360 viewer ---- */
.viewer-wrap { position: relative; min-height: 16rem; aspect-ratio: 1 / 1; max-width: 560px; margin: 0 auto; perspective: 1200px; }
.viewer-stage { position: absolute; top:0;right:0;bottom:0;left:0; transform-style: preserve-3d; transition: transform 0.12s linear; will-change: transform; }
.viewer-hint {
  text-align: center; margin-top: 1.4rem;
  font-size: var(--fs-micro); letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted-2);
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
}

/* ---- Gallery strip ---- */
.gallery-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.gallery-strip .ph { min-height: 8rem; aspect-ratio: 1 / 1; }

/* ---- Meaning / finale ---- */
.meaning-quote {
  font-family: var(--serif); font-style: italic;
  font-size: 3.4rem;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem); line-height: 1.35; color: var(--gold-soft);
  max-width: 36rem; margin: 0 auto; text-align: center;
}
.concierge { text-align: center; }
.concierge .zh-seal { margin-bottom: 1.6rem; }

/* ---- Audio toggle ---- */
.audio-toggle {
  position: fixed; z-index: 85; right: 1.4rem; bottom: 1.4rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--line); padding: 0.7rem 1.1rem;
  background: rgba(12,10,8,0.78); backdrop-filter: blur(8px);
  color: var(--muted); font-size: var(--fs-micro); letter-spacing: 0.2em; text-transform: uppercase;
  transition: all 0.5s var(--ease-lux);
}
.audio-toggle:hover, .audio-toggle.on { border-color: var(--gold); color: var(--gold-soft); }
.audio-toggle .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.audio-toggle .eq i { width: 2px; background: var(--gold); height: 30%; transition: height 0.4s var(--ease-lux); }
.audio-toggle.on .eq i { animation: eq 1.1s ease-in-out infinite; }
.audio-toggle.on .eq i:nth-child(1) { animation-delay: 0s; }
.audio-toggle.on .eq i:nth-child(2) { animation-delay: 0.2s; }
.audio-toggle.on .eq i:nth-child(3) { animation-delay: 0.4s; }
.audio-toggle.on .eq i:nth-child(4) { animation-delay: 0.1s; }
.audio-toggle.on .eq i:nth-child(5) { animation-delay: 0.3s; }

/* ---- Custom cursor ---- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 120; border-radius: 50%; }
.cursor-dot { width: 5px; height: 5px; background: var(--gold); }
.cursor-ring {
  width: 34px; height: 34px; border: 1px solid rgba(201,168,108,0.6);
  transition: width 0.35s var(--ease-lux), height 0.35s var(--ease-lux), border-color 0.35s var(--ease-lux), opacity 0.35s;
  margin: -17px 0 0 -17px;
}
body.cursor-hover .cursor-ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: var(--gold); background: rgba(201,168,108,0.08); }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---- Footer ---- */
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding: var(--space-4) 0 var(--space-3); }
.footer-grid h4 { font-size: var(--fs-micro); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 1.1rem; font-weight: 600; }
.footer-grid a, .footer-grid span { display: block; color: var(--muted); font-size: var(--fs-small); padding: 0.28rem 0; transition: color 0.4s; }
.footer-grid a:hover { color: var(--gold-soft); }
.footer-bottom { border-top: 1px solid var(--line-soft); padding-top: 1.6rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted-2); font-size: var(--fs-small); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .split, .chapter-grid, .chapter-grid.rev { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { gap: 1.2rem; }
  .nav-links a:not(.nav-audio) { display: none; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Global FX (cursor / veil / ambient / sfx)
   ============================================================ */

/* ---- 会呼吸的极光背景（全站，内容之下，随主题变色） ---- */
#siteAurora {
  position: fixed; top:-18%;right:-18%;bottom:-18%;left:-18%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(44% 36% at 20% 16%, var(--aurora-g1), transparent 62%),
    radial-gradient(48% 42% at 84% 82%, var(--aurora-g2), transparent 64%),
    radial-gradient(64% 58% at 52% 44%, var(--aurora-g3), transparent 72%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  animation: aurora-breathe 38s var(--ease-slow) infinite alternate;
  will-change: transform;
}
@keyframes aurora-breathe {
  from { transform: translate3d(-1.6%, -1.2%, 0) scale(1.03); }
  to   { transform: translate3d(1.8%, 1.4%, 0) scale(1.12); }
}

/* ---- Custom cursor ---- */
.cursor-dot, .cursor-ring { position: fixed; z-index: 400; pointer-events: none; border-radius: 50%; }
.cursor-dot {
  width: 6px; height: 6px; background: var(--gold-soft);
  box-shadow: 0 0 12px rgba(232,214,171,.9);
  transition: width .2s var(--ease-lux), height .2s var(--ease-lux), background .3s;
}
.cursor-ring {
  width: 34px; height: 34px; border: 1px solid rgba(201,168,108,.45);
  transition: width .3s var(--ease-lux), height .3s var(--ease-lux), border-color .3s;
}
body.cursor-hover .cursor-dot { width: 10px; height: 10px; background: var(--gold); }
body.cursor-hover .cursor-ring {
  width: 58px; height: 58px; border-color: rgba(201,168,108,.8);
  box-shadow: 0 0 30px rgba(201,168,108,.25), inset 0 0 20px rgba(201,168,108,.15);
}
.cursor-dot.cursor-down { width: 4px; height: 4px; }
.cursor-trail {
  position: fixed; z-index: 399; width: 4px; height: 4px; border-radius: 50%;
  background: radial-gradient(rgba(232,214,171,.8), rgba(232,214,171,0));
  animation: cursor-trail-fade .7s ease-out forwards; pointer-events: none;
}
@keyframes cursor-trail-fade { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(.2); } }
.cursor-wave {
  position: fixed; z-index: 398; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(201,168,108,.7);
  transform: translate(-50%,-50%);
  animation: cursor-wave .7s ease-out forwards; pointer-events: none;
}
@keyframes cursor-wave { from { opacity: .8; transform: translate(-50%,-50%) scale(.4); } to { opacity: 0; transform: translate(-50%,-50%) scale(2.2); } }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---- Page veil (loading / transition) ----
   默认隐藏（不出现死黑屏），仅仪式/转场时由 JS 加状态类显示 */
.page-veil {
  position: fixed; top:0;right:0;bottom:0;left:0; z-index: 500;
  display: none; align-items: center; justify-content: center;
  background: var(--bg);
  pointer-events: none;
}
.page-veil.veil-live { display: flex; }
.page-veil .pv-ink {
  position: absolute; top:0;right:0;bottom:0;left:0;
  background:
    radial-gradient(70% 60% at 50% 40%, var(--aurora-g1), transparent 62%),
    linear-gradient(180deg, var(--bg-3), var(--bg-2) 55%, var(--bg));
  transform: translateY(100%);
}
.page-veil .pv-gold {
  position: absolute; left: 50%; top: 50%;
  width: 120px; height: 120px; border-radius: 50%;
  border: 1px solid rgba(201,168,108,.35);
  transform: translate(-50%,-50%) scale(.6);
  opacity: 0;
  box-shadow: 0 0 60px rgba(201,168,108,.2);
  background: radial-gradient(circle at 50% 50%, rgba(201,168,108,.08), transparent 68%);
}

/* ---- Ambient dust canvas ---- */
.ambient-canvas { position: fixed; top:0;right:0;bottom:0;left:0; pointer-events: none; }

/* ---- SFX toggle ---- */
.sfx-toggle {
  position: fixed; right: 1.4rem; bottom: 5.4rem; z-index: 90;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(12,10,8,.78);
  color: var(--muted); font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: all .5s var(--ease-lux);
}
.sfx-toggle:hover, .sfx-toggle.on { border-color: var(--gold); color: var(--gold-soft); }

/* ---- 订单状态呼吸灯（gallery） ---- */
.status-track { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.status-track .st {
  font-size: var(--fs-micro); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); padding: .35rem .7rem; border: 1px solid var(--line-soft); border-radius: 99px;
  position: relative; transition: all .5s var(--ease-lux);
}
.status-track .st.on {
  color: var(--gold-soft); border-color: var(--gold);
  box-shadow: 0 0 14px rgba(201,168,108,.3);
}
.status-track .st.on::after {
  content: ""; position: absolute; right: -4px; top: -4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); animation: st-breathe 2.2s ease-in-out infinite;
}
@keyframes st-breathe { 0%,100% { box-shadow: 0 0 0 0 rgba(201,168,108,.6); } 50% { box-shadow: 0 0 0 6px rgba(201,168,108,0); } }
