/* =========================================================
   嵩序 · 官网 v2
   奶油白 / 衬线大字 / 克制动效
   ========================================================= */

:root {
  --paper: #faf9f5;
  --paper-2: #f2f0e9;
  --ink: #141413;
  --ink-soft: #3a3a37;
  --muted: #7c7a70;
  --accent: #d97757;
  --line: rgba(20, 20, 19, 0.12);
  --line-soft: rgba(20, 20, 19, 0.07);

  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun",
    Georgia, "Times New Roman", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas,
    monospace;

  --pad: clamp(20px, 6vw, 96px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: rgba(217, 119, 87, 0.25);
}

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

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

canvas {
  display: block;
}

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

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- 质感层 ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  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='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 光标 ---------- */

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}
body.cursor-on .cursor-dot {
  opacity: 1;
}
body.cursor-on,
body.cursor-on a,
body.cursor-on button,
body.cursor-on canvas {
  cursor: none;
}

.trail {
  position: fixed;
  inset: 0;
  z-index: 139;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
body.cursor-on .trail {
  opacity: 1;
}

.lens {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 140;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: 50%;
  border: 1px solid rgba(20, 20, 19, 0.16);
  backdrop-filter: invert(1) saturate(1.1);
  -webkit-backdrop-filter: invert(1) saturate(1.1);
  -webkit-mask-image: radial-gradient(circle, #000 58%, rgba(0, 0, 0, 0.85) 80%, transparent 100%);
  mask-image: radial-gradient(circle, #000 58%, rgba(0, 0, 0, 0.85) 80%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s, width 0.4s var(--ease), height 0.4s var(--ease),
    margin 0.4s var(--ease);
  will-change: transform;
}
body.cursor-on .lens {
  opacity: 1;
}
.lens.is-hover {
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
}

/* ---------- 导航 ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: height 0.45s var(--ease), background 0.45s, border-color 0.45s,
    backdrop-filter 0.45s;
}
.nav.scrolled {
  height: 66px;
  background: rgba(250, 249, 245, 0.82);
  border-bottom-color: var(--line-soft);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sprout {
  width: 26px;
  height: 26px;
  color: var(--accent);
  transition: transform 0.5s var(--ease);
}
.brand:hover .sprout {
  transform: translateY(-2px);
}
.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.16em;
  padding-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
  font-size: 14px;
}
.nav-links a {
  position: relative;
  color: var(--ink-soft);
  padding: 4px 0;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}
.nav-contact {
  padding: 8px 20px !important;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper) !important;
  transition: background 0.35s, transform 0.35s var(--ease);
}
.nav-contact::after {
  display: none;
}
.nav-contact:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.nav-toggle span:first-child {
  top: 18px;
}
.nav-toggle span:last-child {
  top: 23px;
}
body.nav-open .nav-toggle span:first-child {
  top: 20.5px;
  transform: rotate(45deg);
}
body.nav-open .nav-toggle span:last-child {
  top: 20.5px;
  transform: rotate(-45deg);
}

/* ---------- 通用 ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex: 0 0 auto;
}

.mono {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.serif-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.35s, color 0.35s, border-color 0.35s,
    transform 0.4s var(--ease);
  will-change: transform;
}
.btn-solid {
  background: var(--ink);
  color: var(--paper);
}
.btn-solid:hover {
  background: var(--accent);
}
.btn-outline {
  border-color: rgba(20, 20, 19, 0.24);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--ink);
  background: rgba(20, 20, 19, 0.04);
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease);
}
.btn:hover .arrow {
  transform: translateY(3px);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}

#fluid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(
      ellipse 44% 40% at 50% 48%,
      rgba(250, 249, 245, 0.72) 0%,
      rgba(250, 249, 245, 0.42) 55%,
      rgba(250, 249, 245, 0) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(250, 249, 245, 0.5) 0%,
      rgba(250, 249, 245, 0) 22%,
      rgba(250, 249, 245, 0) 74%,
      rgba(250, 249, 245, 0.55) 100%
    );
}

.hero-inner {
  position: relative;
  text-align: center;
  padding: 0 24px;
  will-change: transform, opacity;
}

.hero .eyebrow {
  justify-content: center;
  margin-bottom: clamp(20px, 4vh, 36px);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(6rem, 22vw, 17rem);
  line-height: 0.94;
  letter-spacing: 0.04em;
  padding-bottom: 0.06em;
  overflow: hidden;
  display: flex;
  justify-content: center;
  gap: 0.06em;
}
.hero-title .char {
  display: block;
  transform: translateY(105%);
  opacity: 0;
  transition: transform 1.25s var(--ease), opacity 0.9s;
  transition-delay: calc(var(--i) * 140ms + 180ms);
  will-change: transform;
}
.hero-title.in .char {
  transform: none;
  opacity: 1;
}

.hero-sub {
  margin-top: clamp(18px, 3.6vh, 34px);
  font-family: var(--serif);
  font-size: clamp(1rem, 1.7vw, 1.4rem);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(28px, 4.6vh, 46px);
}

.hero-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  pointer-events: none;
}
.hero-scroll {
  color: var(--accent);
  animation: bob 2.6s var(--ease) infinite;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

/* 首屏内容入场 */
.hero .eyebrow,
.hero-sub,
.hero-actions {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 1.1s var(--ease) forwards;
}
.hero .eyebrow {
  animation-delay: 0.15s;
}
.hero-sub {
  animation-delay: 0.55s;
}
.hero-actions {
  animation-delay: 0.7s;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 宣言 ---------- */

.creed {
  position: relative;
  height: 230vh;
  background: var(--paper);
}
.creed-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
}
.creed-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}
.creed .eyebrow {
  margin-bottom: clamp(24px, 5vh, 48px);
}
.creed-text {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 4.2vw, 3.5rem);
  line-height: 1.42;
  letter-spacing: 0.01em;
  max-width: 24em;
}
.creed-line {
  display: block;
}
.creed-char {
  color: rgba(20, 20, 19, 0.14);
  transition: color 0.55s ease;
}
.creed-char.on {
  color: var(--ink);
}

/* ---------- 手艺 ---------- */

.craft {
  position: relative;
  height: 300vh;
  background: var(--paper);
}
.craft-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
#space {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.craft-head {
  position: absolute;
  top: 96px;
  left: var(--pad);
  z-index: 2;
}
.craft-captions {
  position: absolute;
  left: var(--pad);
  top: 50%;
  z-index: 2;
  width: min(760px, 78vw);
}
.cap {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(calc(-50% + 28px));
  opacity: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  line-height: 1.22;
  letter-spacing: 0.01em;
  transition: opacity 0.8s var(--ease), transform 1s var(--ease);
  pointer-events: none;
}
.cap em {
  font-style: normal;
  color: var(--accent);
}
.cap.active {
  opacity: 1;
  transform: translateY(-50%);
}
.craft-hint {
  position: absolute;
  right: var(--pad);
  bottom: 40px;
  z-index: 2;
}

/* ---------- 玩一下 ---------- */

.play {
  position: relative;
  padding: clamp(90px, 14vh, 150px) 0 clamp(40px, 6vh, 70px);
  background: var(--paper);
}
.play-head {
  padding: 0 var(--pad);
  max-width: 1180px;
  margin: 0 auto clamp(30px, 5vh, 56px);
}
.play-head .eyebrow {
  margin-bottom: 22px;
}
.play-hint {
  margin-top: 18px;
}
.play-stage {
  position: relative;
  width: 100%;
  height: 62vh;
  min-height: 380px;
  max-height: 640px;
}
#dust {
  width: 100%;
  height: 100%;
}

/* ---------- 联系 ---------- */

.contact {
  position: relative;
  padding: clamp(100px, 16vh, 180px) 0 clamp(80px, 12vh, 130px);
  border-top: 1px solid var(--line-soft);
  background: var(--paper-2);
}
.contact-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.contact .eyebrow {
  margin-bottom: 26px;
}
.contact .serif-title {
  font-size: clamp(3rem, 8vw, 7rem);
}
.contact-links {
  margin-top: clamp(40px, 7vh, 72px);
  border-top: 1px solid var(--line);
  max-width: 880px;
}
.contact-links a {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 40px);
  padding: 20px 2px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  transition: color 0.35s, padding-left 0.5s var(--ease);
}
.contact-links a span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
  width: 44px;
  flex: 0 0 auto;
  text-transform: uppercase;
}
.contact-links a:hover {
  color: var(--accent);
  padding-left: 14px;
}

.contact-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: clamp(40px, 6vh, 64px);
}
.qr-box {
  display: flex;
  align-items: center;
  gap: 16px;
}
.qr {
  position: relative;
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  border: 1px solid rgba(20, 20, 19, 0.22);
  border-radius: 6px;
  background: repeating-linear-gradient(
    45deg,
    rgba(20, 20, 19, 0.07) 0 5px,
    transparent 5px 10px
  );
}
.qr i {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 1.5px solid rgba(20, 20, 19, 0.45);
  border-radius: 2px;
}
.qr i:nth-child(1) {
  top: 9px;
  left: 9px;
}
.qr i:nth-child(2) {
  top: 9px;
  right: 9px;
}
.qr i:nth-child(3) {
  bottom: 9px;
  left: 9px;
}
.qr i:nth-child(4) {
  bottom: 9px;
  right: 9px;
  border-radius: 50%;
}
.qr-box p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.qr-box small {
  color: var(--muted);
  font-size: 11px;
}
.address {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-soft);
  text-align: right;
}

/* ---------- 页脚 ---------- */

.footer {
  padding: 48px var(--pad) 40px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-sprout {
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-bottom: 8px;
}
.footer p {
  font-size: 13px;
  color: var(--ink-soft);
}
.footer .mono {
  font-size: 10px;
}

/* ---------- 动效开关提示 ---------- */

.motion-tip {
  position: fixed;
  right: var(--pad);
  top: 84px;
  z-index: 300;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.94);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s;
}
.motion-tip:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .creed {
    height: 200vh;
  }
  .craft {
    height: 260vh;
  }
  .hero-foot .mono:nth-child(3) {
    display: none;
  }
}

@media (max-width: 760px) {
  /* 菜单打开时去掉 backdrop-filter，否则它会成为 fixed 子元素的包含块 */
  body.nav-open .nav {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    background: var(--paper);
    font-family: var(--serif);
    font-size: 26px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
  }
  body.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
  }
  .nav-links a::after {
    display: none;
  }
  .nav-contact {
    font-family: var(--sans);
    font-size: 16px;
    padding: 10px 26px !important;
  }
  .nav-toggle {
    display: block;
    z-index: 2;
  }
  .brand {
    z-index: 2;
  }
  .hero-title {
    font-size: clamp(5rem, 26vw, 9rem);
  }
  .craft-captions {
    width: 82vw;
  }
  .cap {
    font-size: clamp(1.8rem, 7.4vw, 2.6rem);
  }
  .craft-hint {
    left: var(--pad);
    right: auto;
  }
  .contact-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .address {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero-foot .mono:nth-child(2) {
    display: none;
  }
  .play-stage {
    height: 54vh;
  }
  .hero-actions .btn {
    padding: 13px 22px;
  }
  .motion-tip {
    right: 14px;
    top: 76px;
    font-size: 10px;
    padding: 6px 12px;
  }
}

/* 触屏隐藏自定义光标与重效果 */
@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .lens,
  .trail {
    display: none !important;
  }
}

/* 降低动效 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-title .char,
  .hero .eyebrow,
  .hero-sub,
  .hero-actions,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
