:root {
  --paper: #f2ead8;
  --paper-deep: #e6d8bc;
  --ink: #1b1814;
  --ink-soft: #3a342c;
  --jade: #146864;
  --jade-deep: #0d4f4c;
  --gold: #b8943a;
  --gold-deep: #8a6b24;
  --cinnabar: #9c2e24;
  --cinnabar-deep: #7a201a;
  --roof: #2f7a4d;
  --mist: rgba(242, 234, 216, 0.55);
  --line: rgba(27, 24, 20, 0.12);
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --brush: "Ma Shan Zheng", "Noto Serif SC", cursive;
  --mx: 50vw;
  --my: 30vh;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

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

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

.paper,
.wash,
#petals,
.mist,
.mountains,
.water,
.ink-rail {
  pointer-events: none;
}

.paper {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 500px at var(--mx) var(--my), rgba(184, 148, 58, 0.1), transparent 55%),
    radial-gradient(1200px 700px at 12% 8%, rgba(20, 104, 100, 0.08), transparent 50%),
    linear-gradient(180deg, #f7f1e4 0%, #efe4cb 48%, #e8d7b6 100%);
}

.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(27, 24, 20, 0.03) 3px),
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(27, 24, 20, 0.02) 4px);
}

.wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.35), transparent 22%),
    radial-gradient(circle at 18% 72%, rgba(20, 104, 100, 0.08), transparent 28%);
}

#petals {
  position: fixed;
  inset: 0;
  z-index: 2;
}

.mist {
  position: fixed;
  left: -10%;
  width: 120%;
  height: 28vh;
  z-index: 1;
  filter: blur(18px);
  background: linear-gradient(90deg, transparent, var(--mist), transparent);
}

.mist-a {
  bottom: 18vh;
  animation: drift 28s linear infinite;
}

.mist-b {
  bottom: 8vh;
  opacity: 0.7;
  animation: drift 40s linear infinite reverse;
}

.mountains {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 32vh;
}

.mountains svg {
  width: 100%;
  height: 100%;
}

.mtn {
  animation: rise 1.6s ease both;
}

.mtn-a { fill: #cbb892; }
.mtn-b { fill: #b7a57a; opacity: 0.9; }
.mtn-c { fill: #9e8d68; opacity: 0.7; }

.water {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9vh;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(20, 104, 100, 0.08), rgba(20, 104, 100, 0.18)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.15) 19px, transparent 28px);
  animation: shimmer 8s linear infinite;
  mask-image: linear-gradient(180deg, transparent, #000 40%);
}

.ink-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 18px;
  z-index: 4;
  background-image: linear-gradient(180deg, transparent, rgba(27, 24, 20, 0.18), transparent);
}

.ink-rail.left { left: 0; }
.ink-rail.right { right: 0; }

.brush-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 40;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold), var(--jade));
}

.mast {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 7vw;
  background: rgba(242, 234, 216, 0.55);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.mast.scrolled {
  background: rgba(242, 234, 216, 0.86);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(27, 24, 20, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-seal {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(184, 148, 58, 0.55);
  box-shadow: 0 0 0 4px rgba(184, 148, 58, 0.12);
  animation: pulse-ring 4.5s ease-in-out infinite;
}

.brand-seal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-family: var(--brush);
  font-size: 26px;
  font-weight: 400;
}

.brand-copy em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--jade-deep);
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.nav a {
  position: relative;
  padding-bottom: 4px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.mast-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seal-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}

.seal-btn {
  min-width: 86px;
  padding: 9px 16px;
  background: var(--cinnabar);
  color: #f7f1e4;
  font-family: var(--serif);
  letter-spacing: 0.12em;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  transition: transform 0.25s ease, background 0.25s ease;
}

.seal-btn img,
.btn img,
.step a img,
.social img,
.foot-links img {
  width: 16px;
  height: 16px;
  filter: brightness(0) saturate(100%) invert(86%) sepia(18%) saturate(317%) hue-rotate(359deg);
}

.seal-btn:hover {
  background: var(--cinnabar-deep);
  transform: translateY(-1px);
}

.menu {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  position: relative;
}

.menu span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, top 0.3s ease;
}

.menu span:first-child { top: 16px; }
.menu span:last-child { top: 24px; }
.menu.open span:first-child { top: 20px; transform: rotate(35deg); }
.menu.open span:last-child { top: 20px; transform: rotate(-35deg); }

.hero,
.section,
.foot {
  position: relative;
  z-index: 3;
}

.hero {
  min-height: calc(100vh - 78px);
  padding: 40px 7vw 90px;
  display: flex;
  align-items: center;
}

.moon {
  position: absolute;
  top: 7%;
  right: 11%;
  width: 90px;
  height: 90px;
}

.moon-core,
.moon-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.moon-core {
  background: radial-gradient(circle at 35% 35%, #fffdf6, #efe4c4 60%, #d9c89a);
  box-shadow: 0 0 40px rgba(255, 250, 230, 0.7);
}

.moon-halo {
  transform: scale(1.7);
  background: radial-gradient(circle, rgba(255, 250, 230, 0.35), transparent 68%);
  animation: breathe 6s ease-in-out infinite;
}

.pagoda {
  position: absolute;
  left: 6%;
  bottom: 14%;
  width: 70px;
  height: 120px;
  opacity: 0.22;
  background:
    linear-gradient(var(--cinnabar), var(--cinnabar)) 50% 18% / 18px 18px no-repeat,
    linear-gradient(var(--cinnabar-deep), var(--cinnabar-deep)) 50% 12% / 42px 8px no-repeat,
    linear-gradient(var(--cinnabar-deep), var(--cinnabar-deep)) 50% 38% / 54px 8px no-repeat,
    linear-gradient(var(--cinnabar-deep), var(--cinnabar-deep)) 50% 64% / 66px 8px no-repeat,
    linear-gradient(#5a4030, #5a4030) 50% 88% / 16px 40px no-repeat;
  animation: sway 8s ease-in-out infinite;
}

.v-name,
.v-mark {
  position: absolute;
  writing-mode: vertical-rl;
  font-family: var(--brush);
  letter-spacing: 0.28em;
  opacity: 0.18;
}

.v-name {
  left: 3.5vw;
  top: 18%;
  font-size: 42px;
}

.v-mark {
  right: 3.5vw;
  bottom: 18%;
  font-size: 28px;
  color: var(--jade-deep);
}

.hero-stage {
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--jade-deep);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 18px;
}

.dot {
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.word {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}

.word-zh {
  font-family: var(--brush);
  font-size: clamp(64px, 8vw, 112px);
  line-height: 0.9;
  background: linear-gradient(180deg, #d8b85a 0%, #8a6b24 42%, #1b1814 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ink-in 1.1s ease both;
  text-shadow: none;
  filter: drop-shadow(0 8px 0 rgba(27, 24, 20, 0.04));
}

.word-en {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lead {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.85;
  margin-bottom: 12px;
}

.lead.sub {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.btn {
  padding: 13px 20px;
  font-family: var(--serif);
  font-size: 15px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-cinnabar {
  background: var(--cinnabar);
  color: #f7f1e4;
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
}

.btn-cinnabar:hover {
  background: var(--cinnabar-deep);
  transform: translateY(-2px);
}

.btn-ink {
  background: transparent;
  border-color: rgba(27, 24, 20, 0.28);
  color: var(--ink);
}

.btn-ink img {
  filter: none;
}

.btn-ink:hover {
  border-color: var(--jade);
  transform: translateY(-2px);
}

.btn.slim {
  margin-top: 8px;
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 540px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 244, 0.45);
}

.ca-row span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.ca-row code {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.ca-row button {
  border: 0;
  background: var(--jade);
  color: #f7f1e4;
  padding: 7px 12px;
  font-family: var(--sans);
  cursor: pointer;
}

.hero-gate {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}

.gate-ring {
  width: min(420px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 10px solid rgba(184, 148, 58, 0.55);
  box-shadow:
    0 0 0 1px rgba(27, 24, 20, 0.18),
    0 30px 60px rgba(27, 24, 20, 0.16);
  animation: float 7s ease-in-out infinite;
}

.gate-lattice {
  position: absolute;
  inset: 0;
  background:
    repeating-conic-gradient(from 0deg, transparent 0 8deg, rgba(184, 148, 58, 0.08) 8deg 9deg);
  mix-blend-mode: multiply;
  animation: spin 48s linear infinite;
  z-index: 2;
}

.gate-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.stamp {
  position: absolute;
  font-family: var(--serif);
  color: var(--cinnabar);
  border: 2px solid var(--cinnabar);
  padding: 8px 6px;
  writing-mode: vertical-rl;
  letter-spacing: 0.2em;
  background: rgba(242, 234, 216, 0.72);
  animation: stamp 1.2s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}

.stamp-a {
  top: 8%;
  right: 2%;
  font-size: 18px;
}

.stamp-b {
  bottom: 14%;
  left: 4%;
  font-size: 14px;
  animation-delay: 0.25s;
}

.chip {
  position: absolute;
  padding: 8px 12px;
  border: 1px solid rgba(20, 104, 100, 0.28);
  background: rgba(247, 241, 228, 0.8);
  font-size: 12px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.chip-a {
  top: 18%;
  left: 0;
  animation: float 6s ease-in-out infinite;
}

.chip-b {
  bottom: 18%;
  right: 0;
  animation: float 7s ease-in-out infinite reverse;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.scroll-cue span {
  width: 1px;
  height: 28px;
  background: var(--gold);
  animation: drip 1.8s ease-in-out infinite;
}

.section {
  padding: 110px 7vw;
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.kicker {
  font-family: var(--brush);
  font-size: 28px;
  color: var(--cinnabar);
  margin-bottom: 8px;
}

.title {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700;
  margin-bottom: 14px;
}

.lede,
.body {
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.9;
  color: var(--ink-soft);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.about-copy .lede,
.about-copy .body {
  margin-left: 0;
}

.about-copy .body + .body {
  margin-top: 16px;
}

.about-frame {
  position: relative;
  padding: 18px;
}

.silk {
  overflow: hidden;
  background: #efe6d0;
  box-shadow: inset 0 0 0 1px rgba(184, 148, 58, 0.35);
}

.silk img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: contrast(1.02) saturate(1.05);
}

.corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid var(--gold-deep);
}

.corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.seals {
  list-style: none;
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.seals li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
}

.seals span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--cinnabar);
  color: var(--cinnabar);
  font-family: var(--serif);
  background: rgba(156, 46, 36, 0.05);
}

.seals strong {
  font-family: var(--serif);
  display: block;
  margin-bottom: 4px;
}

.seals p {
  color: var(--ink-soft);
  line-height: 1.7;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.step {
  position: relative;
  padding: 28px 22px 24px;
  background: rgba(255, 252, 244, 0.5);
  border: 1px solid var(--line);
  overflow: hidden;
}

.step::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(184, 148, 58, 0.35);
  pointer-events: none;
}

.step em {
  font-family: var(--serif);
  font-style: normal;
  font-size: 28px;
  color: var(--gold-deep);
  display: block;
  margin-bottom: 14px;
}

.step h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 10px;
}

.step p {
  color: var(--ink-soft);
  line-height: 1.75;
  font-size: 14px;
}

.step a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--jade-deep);
  font-size: 14px;
}

.step a img {
  filter: none;
}

.lacquer {
  border: 12px solid #2a2318;
  box-shadow: 0 24px 50px rgba(27, 24, 20, 0.16);
  background: #f7f1e4;
  height: 640px;
}

.lacquer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.scroll-mount {
  margin: 0 auto 36px;
  padding: 14px;
  background:
    linear-gradient(#8a6b24, #8a6b24) top / 100% 10px no-repeat,
    linear-gradient(#8a6b24, #8a6b24) bottom / 100% 10px no-repeat,
    #efe3c4;
  box-shadow: 0 18px 40px rgba(27, 24, 20, 0.12);
}

.join-banner {
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
}

.socials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.social {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 244, 0.52);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.social img {
  width: 22px;
  height: 22px;
  filter: none;
  margin-bottom: 8px;
}

.social span {
  font-family: var(--serif);
  font-size: 18px;
}

.social small {
  color: var(--ink-soft);
}

.social:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 24px rgba(27, 24, 20, 0.08);
}

.foot {
  padding: 40px 7vw 56px;
  border-top: 1px solid var(--line);
}

.foot-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.foot-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.foot-brand strong {
  font-family: var(--brush);
  font-size: 24px;
  display: block;
}

.foot-brand span,
.foot p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.foot-links {
  display: flex;
  gap: 14px;
}

.foot-links img {
  filter: none;
  width: 18px;
  height: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}

@keyframes drift {
  from { transform: translateX(-8%); }
  to { transform: translateX(8%); }
}

@keyframes shimmer {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 80px 0; }
}

@keyframes rise {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1.55); opacity: 0.7; }
  50% { transform: scale(1.85); opacity: 1; }
}

@keyframes sway {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1.4deg); }
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 4px rgba(184, 148, 58, 0.12); }
  50% { box-shadow: 0 0 0 8px rgba(184, 148, 58, 0.08); }
}

@keyframes ink-in {
  from { letter-spacing: 0.18em; opacity: 0; filter: blur(8px); }
  to { letter-spacing: 0; opacity: 1; filter: none; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes stamp {
  from { transform: scale(1.4) rotate(-8deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes drip {
  0%, 100% { transform: scaleY(0.4); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 980px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(242, 234, 216, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 12px 7vw 20px;
  }

  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
  .menu { display: block; }

  .hero-stage,
  .about-grid,
  .steps,
  .socials {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 24px;
  }

  .hero-gate {
    min-height: 420px;
    order: -1;
  }

  .v-name,
  .v-mark,
  .pagoda {
    display: none;
  }

  .lacquer {
    height: 520px;
  }
}

@media (max-width: 640px) {
  .mast,
  .hero,
  .section,
  .foot {
    padding-left: 20px;
    padding-right: 20px;
  }

  .word-zh {
    font-size: 56px;
  }

  .ca-row {
    flex-wrap: wrap;
  }

  .lacquer {
    height: 420px;
    border-width: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
