:root {
  --paper: #f4efe6;
  --ink: #2a241c;
  --ink-soft: #6b5f52;
  --ink-faint: #9a8d7e;
  --clay: #d4764e;
  --moss: #5a7a62;
  --sun: #e8b86d;
  --shadow: rgba(42, 36, 28, 0.08);
  --font-display: "ZCOOL XiaoWei", "STKaiti", "KaiTi", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

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

/* 整页一屏，底部永远在视口内 */
.page {
  position: relative;
  height: 100dvh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

/* 有机色块 —— 不是网格，像纸上的水彩 */
.blob {
  position: absolute;
  border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%;
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.blob-a {
  width: min(48vw, 380px);
  height: min(48vw, 380px);
  top: -8%;
  right: -6%;
  background: var(--sun);
  animation: morph 14s ease-in-out infinite;
}

.blob-b {
  width: min(42vw, 320px);
  height: min(42vw, 320px);
  bottom: 5%;
  left: -10%;
  background: #c4d4c0;
  animation: morph 18s ease-in-out infinite reverse;
  animation-delay: -4s;
}

.blob-c {
  width: min(28vw, 200px);
  height: min(28vw, 200px);
  top: 42%;
  left: 55%;
  background: #f0c9b0;
  opacity: 0.4;
  animation: morph 12s ease-in-out infinite;
  animation-delay: -2s;
}

@keyframes morph {
  0%, 100% {
    border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%;
  }
  33% {
    border-radius: 40% 60% 45% 55% / 55% 40% 60% 45%;
  }
  66% {
    border-radius: 55% 45% 40% 60% / 45% 60% 40% 55%;
  }
}

/* 主内容：垂直居中于剩余空间 */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 1.5rem 0.5rem;
  min-height: 0;
}

/* 角落印章感 */
.stamp {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--clay);
  border: 1.5px solid var(--clay);
  border-radius: 4px;
  opacity: 0.55;
  transform: rotate(12deg);
  animation: stamp-in 0.8s 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  user-select: none;
}

@keyframes stamp-in {
  from {
    opacity: 0;
    transform: rotate(12deg) scale(1.6);
  }
  to {
    opacity: 0.55;
    transform: rotate(12deg) scale(1);
  }
}

.hello {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--moss);
  animation: rise 0.7s 0.1s both;
}

.wave {
  display: inline-block;
  color: var(--clay);
  animation: twinkle 2.4s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.5; transform: scale(0.85) rotate(25deg); }
}

.name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 12vw, 5.5rem);
  line-height: 1.15;
  letter-spacing: 0.18em;
  text-indent: 0.18em; /* 光学居中抵消 letter-spacing */
  margin-bottom: 1.1rem;
  color: var(--ink);
}

.name-char {
  display: inline-block;
  animation: char-pop 0.65s calc(0.18s + var(--i) * 0.08s) cubic-bezier(0.34, 1.4, 0.64, 1) both;
  transition: transform 0.25s ease, color 0.25s ease;
  cursor: default;
}

.name-char:hover {
  color: var(--clay);
  transform: translateY(-6px) rotate(var(--tilt, -3deg));
}

.name-char:nth-child(1) { --tilt: -4deg; }
.name-char:nth-child(2) { --tilt: 3deg; }
.name-char:nth-child(3) { --tilt: -2deg; }
.name-char:nth-child(4) { --tilt: 4deg; }

@keyframes char-pop {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(-6deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

.tagline {
  max-width: 22em;
  font-size: clamp(0.92rem, 2.6vw, 1.05rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--ink-soft);
  animation: rise 0.7s 0.45s both;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.75rem;
  animation: rise 0.7s 0.6s both;
}

.chip {
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.45);
  border: 1px dashed rgba(42, 36, 28, 0.18);
  border-radius: 999px;
  transition: transform 0.3s ease, background 0.3s, border-color 0.3s, color 0.3s;
}

.chip:hover {
  transform: translateY(-3px) rotate(-2deg);
  background: rgba(255, 255, 255, 0.75);
  border-style: solid;
  border-color: var(--clay);
  color: var(--clay);
}

.chip-mid:hover {
  transform: translateY(-3px) rotate(2deg);
}

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

/* 备案：贴底，一屏可见 */
.footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  text-align: center;
}

.beian {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.beian a {
  color: var(--ink-faint);
  transition: color 0.2s;
  white-space: nowrap;
}

.beian a:hover {
  color: var(--clay);
}

.sep {
  color: rgba(154, 141, 126, 0.55);
  user-select: none;
}

/* 纸张微噪点质感（纯 CSS，无图） */
.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* 手机 */
@media (max-width: 480px) {
  .stamp {
    width: 2rem;
    height: 2rem;
    font-size: 0.95rem;
  }

  .name {
    letter-spacing: 0.12em;
    text-indent: 0.12em;
  }

  .beian {
    flex-direction: column;
    gap: 0.3rem;
  }

  .sep {
    display: none;
  }

  .blob {
    filter: blur(40px);
    opacity: 0.45;
  }
}

/* 很矮的屏（横屏手机等） */
@media (max-height: 500px) {
  .chips {
    display: none;
  }

  .name {
    font-size: clamp(2.2rem, 10vh, 3.5rem);
    margin-bottom: 0.6rem;
  }

  .tagline {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .hello {
    margin-bottom: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob,
  .wave,
  .stamp,
  .name-char,
  .hello,
  .tagline,
  .chips {
    animation: none !important;
  }

  .name-char,
  .hello,
  .tagline,
  .chips {
    opacity: 1;
    transform: none;
  }
}
