/* =========================================================
   玄烛 XUAN ZHU · 视觉系统 01
   Tokens, shell, navigation, shared components.
   ========================================================= */

:root {
  --bg: #08070b;
  --bg-soft: #0d0b12;
  --bg-lift: #12101a;
  --surface: rgba(23, 19, 30, 0.72);
  --surface-solid: #15111d;
  --surface-2: rgba(255, 255, 255, 0.045);
  --gold: #c9a86a;
  --gold-light: #ecd9ae;
  --gold-deep: #9c7a43;
  --gold-wash: rgba(201, 168, 106, 0.1);
  --ink: #f2ece1;
  --ink-soft: #d9d0c3;
  --muted: #a79c8f;
  --faint: #776d64;
  --line: rgba(201, 168, 106, 0.17);
  --line-soft: rgba(255, 255, 255, 0.075);
  --rose: #c993a1;
  --jade: #94b3a1;
  --blue: #8fa7c6;
  --amber: #c99c68;
  --plum: #b49ac1;
  --danger: #cf8f8f;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 10px 42px rgba(201, 168, 106, 0.18);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 30px;
  --header-h: 78px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.wechat-thumb {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 300px;
  height: 300px;
  opacity: 0;
  pointer-events: none;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

svg {
  fill: none;
}

::selection {
  background: rgba(201, 168, 106, 0.28);
  color: #fff8e9;
}

:focus-visible {
  outline: 1px solid var(--gold-light);
  outline-offset: 4px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--gold-light);
  color: #14100a;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 300;
  padding: 16px;
  border-radius: 12px;
  background: #221b2b;
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: center;
  font-size: 12px;
}

/* ---------- Ambient background ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -18%, rgba(89, 66, 112, 0.24), transparent 52%),
    radial-gradient(ellipse at 88% 32%, rgba(91, 63, 52, 0.16), transparent 44%),
    linear-gradient(180deg, #09070d 0%, #08070b 42%, #0a080d 100%);
}

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.78;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  will-change: transform;
}

.aurora-a {
  top: -22%;
  left: 4%;
  width: 54vw;
  height: 54vw;
  background: radial-gradient(circle, rgba(84, 56, 110, 0.52), transparent 68%);
  animation: auroraDrift 26s ease-in-out infinite alternate;
}

.aurora-b {
  top: 26%;
  right: -18%;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, rgba(129, 90, 53, 0.28), transparent 70%);
  animation: auroraDrift 32s ease-in-out infinite alternate-reverse;
}

.aurora-c {
  bottom: -28%;
  left: 22%;
  width: 54vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(54, 69, 92, 0.28), transparent 72%);
  animation: auroraDrift 38s ease-in-out infinite alternate;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}

@keyframes auroraDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

/* ---------- Shell / header / footer ---------- */
.site-shell {
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--header-h);
  transition: background 0.45s var(--ease-soft), border-color 0.45s ease, backdrop-filter 0.45s ease;
  border-bottom: 1px solid transparent;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 7, 11, 0.88) 0%, rgba(8, 7, 11, 0.36) 64%, transparent 100%);
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.site-header.is-scrolled {
  background: rgba(9, 7, 13, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line-soft);
}

.site-header.is-scrolled::before {
  opacity: 0;
}

.header-inner {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(201, 168, 106, 0.18));
  transition: transform 0.6s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-12deg);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-type {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-type strong {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.brand-type small {
  margin-top: 5px;
  font-family: var(--sans);
  font-size: 6.5px;
  letter-spacing: 0.32em;
  color: var(--gold);
  opacity: 0.84;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.top-nav-link {
  position: relative;
  padding: 8px 0;
  font-size: 12px;
  letter-spacing: 0.13em;
  color: var(--muted);
  transition: color 0.3s ease;
}

.top-nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.top-nav-link:hover,
.top-nav-link.is-active {
  color: var(--gold-light);
}

.top-nav-link.is-active::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.header-note {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--faint);
  white-space: nowrap;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  background: rgba(201, 168, 106, 0.04);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.header-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease);
}

.header-cta:hover {
  border-color: rgba(201, 168, 106, 0.42);
  background: rgba(201, 168, 106, 0.1);
  transform: translateY(-1px);
}

.header-cta:hover svg {
  transform: translateX(3px);
}

main {
  padding-top: var(--header-h);
  min-height: 70vh;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: viewIn 0.72s var(--ease) both;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 110px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(10, 8, 14, 0.2), rgba(7, 6, 10, 0.8));
}

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 58px 28px 44px;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1.1fr;
  gap: 50px;
}

.footer-brand p {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-label {
  display: block;
  margin-bottom: 5px;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--gold);
  text-transform: uppercase;
}

.footer-links a {
  font-size: 12px;
  color: var(--muted);
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-note p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--faint);
}

.footer-bottom {
  max-width: 1220px;
  margin: 0 auto;
  padding: 18px 28px 26px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* ---------- Mobile tabbar ---------- */
.tabbar {
  display: none;
  position: fixed;
  z-index: 70;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(66px + env(safe-area-inset-bottom, 0px));
  padding: 0 8px env(safe-area-inset-bottom, 0px);
  align-items: stretch;
  justify-content: space-around;
  background: rgba(10, 8, 14, 0.88);
  border-top: 1px solid rgba(201, 168, 106, 0.14);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
}

.tabbar::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 0;
  right: 0;
  height: 22px;
  background: linear-gradient(0deg, rgba(8, 7, 11, 0.7), transparent);
  pointer-events: none;
}

.tab-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 52px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.tab-icon {
  position: relative;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease);
}

.tab-icon svg {
  width: 21px;
  height: 21px;
}

.tab-item.is-active {
  color: var(--gold-light);
}

.tab-item.is-active .tab-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 9px rgba(201, 168, 106, 0.34));
}

.tab-item.is-active .tab-icon::after {
  content: "";
  position: absolute;
  bottom: -7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- Shared components ---------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

.container-narrow {
  max-width: 880px;
}

.section {
  margin-top: clamp(76px, 9vw, 124px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--gold);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.section-head h2 {
  margin-top: 14px;
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 330px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}

.muted { color: var(--muted); }
.gold { color: var(--gold-light); }
.serif { font-family: var(--serif); }

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.glass {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.012) 55%, rgba(201, 168, 106, 0.025));
  border: 1px solid var(--line-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(115deg, #f0e0bb 0%, #d3b27b 42%, #b58b51 100%);
  color: #171108;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(201, 168, 106, 0.19), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(201, 168, 106, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-primary:hover::after {
  left: 130%;
}

.btn-primary:active {
  transform: translateY(0) scale(0.985);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.024);
}

.btn-ghost:hover {
  border-color: rgba(201, 168, 106, 0.42);
  background: rgba(201, 168, 106, 0.06);
  color: var(--gold-light);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  min-height: 56px;
  padding: 17px 30px;
  font-size: 13px;
}

.btn[disabled] {
  opacity: 0.42;
  pointer-events: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold);
  transition: color 0.25s ease, gap 0.3s var(--ease);
}

.link-arrow svg {
  width: 15px;
  height: 15px;
}

.link-arrow:hover {
  color: var(--gold-light);
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  background: rgba(201, 168, 106, 0.05);
  white-space: nowrap;
}

.pill-dot::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.pill-rose { color: var(--rose); border-color: rgba(201, 147, 161, 0.22); background: rgba(201, 147, 161, 0.06); }
.pill-jade { color: var(--jade); border-color: rgba(148, 179, 161, 0.22); background: rgba(148, 179, 161, 0.06); }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 24px;
}

.section-label-row span:first-child {
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.section-label-row span:last-child {
  font-size: 10px;
  color: var(--faint);
}
