:root {
  --paper: #f7f3eb;
  --ink: #0b0b0b;
  --ink2: #4a4a4a;
  --ink3: #767676;
  --line: #dcdcdc;
  --night: #101a2e;
  --night2: #1a2740;
  --night-ink: #f4f2ed;
  --night-ink2: #9ba6bc;
  --night-ink3: #7b89a3;
  --night-line: #2a3752;
  --gold: #c8a24a;
  --pad: 32px;
  --max: 1080px;
  --measure: 640px;
  --mincho: "FZFW-ZhuZiGuDianS-SMC--GB1-0", "Songti SC", "STSong", "Noto Serif SC", serif;
  --kaishu: "FZYUSNKSS--GB1-0", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --kai: "FZZHUYMXKS--GB1-0", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

.eb {
  margin: 0;
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--ink3);
  font-weight: 400;
}

.kai {
  font-family: var(--kai);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink2);
}

.mincho {
  font-family: var(--mincho);
  font-weight: 400;
}

.wrap {
  width: min(var(--max), calc(100% - 2 * var(--pad)));
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 52px;
  padding: 0 var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.brand {
  font-family: var(--mincho);
  font-size: 20px;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px 22px;
}

.top nav a {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--ink3);
}

.top nav a:hover,
.top nav a[aria-current="page"] {
  color: var(--ink);
}

.hero {
  padding: 72px 0 80px;
  border-bottom: 1px solid var(--ink);
}

.hero h1 {
  margin: 14px 0 0;
  font-family: var(--mincho);
  font-size: clamp(72px, 14vw, 118px);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: 0.04em;
}

.marquee {
  border-bottom: 1px solid var(--ink);
  padding: 36px 0;
}

.marquee-window {
  overflow: hidden;
  width: min(calc(100% - 2 * var(--pad)), 600px);
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 14%,
    #000 86%,
    transparent
  );
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 12s linear infinite;
}

.marquee-set {
  display: flex;
  gap: 28px;
  padding-right: 28px;
}

.ios-icon {
  --s: 68px;
  width: var(--s);
  height: var(--s);
  flex: none;
  background: #f3eee6;
  /* HIG：圆角约为边长的 22.37%；不支持 mask 时退回普通圆角 */
  border-radius: calc(var(--s) * 0.2237);
  overflow: hidden;
}

.ios-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

@supports (mask-image: none) or (-webkit-mask-image: none) {
  .ios-icon {
    overflow: visible;
    border-radius: 0;
    /* iOS 连续圆角（squircle，n≈5） */
    -webkit-mask-image: url("../assets/ios-icon-mask.svg");
    mask-image: url("../assets/ios-icon-mask.svg");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }

  .marquee-set[aria-hidden="true"] {
    display: none;
  }

  .marquee-window {
    width: max-content;
    max-width: calc(100% - 2 * var(--pad));
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 64px;
}

.section h2 {
  margin: 12px 0 0;
  font-family: var(--mincho);
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.intro {
  margin: 28px 0 0;
}

.night {
  background: var(--night);
  color: var(--night-ink);
  border-bottom: 1px solid var(--night-line);
}

.night .eb {
  color: var(--night-ink3);
}

.night .kai {
  color: var(--night-ink2);
}

.legal,
.measure {
  max-width: var(--measure);
}

.legal h2 {
  font-size: 38px;
}

.legal h3 {
  margin: 36px 0 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--ink3);
}

.legal p,
.legal li {
  color: var(--ink2);
  font-size: 15px;
  line-height: 1.75;
}

.legal ul {
  margin: 0;
  padding-left: 1.2em;
}

.legal a {
  border-bottom: 1px solid var(--ink);
}

.entity {
  padding-bottom: 88px;
}

.entity .kai {
  margin-top: 18px;
  max-width: 36em;
}

.section.end {
  border-bottom: 0;
}

.rows {
  margin-top: 40px;
  border-top: 1px solid var(--ink);
}

.row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.row dt {
  margin: 0;
  letter-spacing: 0.12em;
  color: var(--ink3);
}

.row dd a {
  border-bottom: 1px solid var(--ink);
}

.foot {
  padding: 22px var(--pad) 36px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--ink);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--ink3);
}

.foot a:hover {
  color: var(--ink);
}

.gongan {
  display: inline;
}

.gongan img {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.35em;
  vertical-align: -0.12em;
}

.doc .hero {
  padding: 48px 0 40px;
}

.doc .hero h1 {
  font-size: clamp(44px, 10vw, 72px);
}

@media (max-width: 800px) {
  :root {
    --pad: 22px;
  }

  .hero-grid,
  .row {
    grid-template-columns: 1fr;
  }

  .ios-icon {
    --s: 56px;
  }

  .marquee {
    padding: 28px 0;
  }

  .marquee-window {
    width: min(calc(100% - 2 * var(--pad)), 360px);
  }

  .marquee-set {
    gap: 22px;
    padding-right: 22px;
  }

  .top {
    height: auto;
    min-height: 52px;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-wrap: wrap;
  }

  .top nav {
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 10px 16px;
    padding-top: 8px;
  }

  .top nav a {
    letter-spacing: 0.12em;
  }
}

@media print {
  .top,
  .foot,
  .marquee,
  .grain,
  .smoke {
    display: none;
  }

  .hero,
  .section {
    border: 0;
    padding: 12px 0;
  }

  body {
    font-size: 12px;
  }
}

/* —— 介绍页氛围 —— */
.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.home .top {
  background: rgba(247, 243, 235, 0.82);
  border-bottom-color: rgba(11, 11, 11, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home .top.brand-only {
  justify-content: flex-start;
}

.home .foot {
  position: relative;
  z-index: 2;
  border-top-color: rgba(11, 11, 11, 0.12);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.smoke {
  pointer-events: none;
  position: fixed;
  left: 50%;
  bottom: 8%;
  z-index: 0;
  width: min(90vw, 720px);
  height: 78vh;
  transform: translateX(-50%);
  overflow: hidden;
}

.smoke svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  fill: none;
}

.smoke path {
  fill: none;
  fill-opacity: 0;
  stroke: #8a8376;
  stroke-linecap: round;
}

.wisp {
  opacity: 0.22;
  transform-box: view-box;
  transform-origin: 50% 100%;
}

.wisp.a {
  animation: wisp-a 22s ease-in-out infinite;
}

.wisp.b {
  opacity: 0.14;
  animation: wisp-b 28s ease-in-out infinite;
}

.wisp.c {
  opacity: 0.12;
  animation: wisp-c 25s ease-in-out infinite;
}

@keyframes wisp-a {
  0%,
  100% {
    transform: translate3d(0, 16px, 0);
    opacity: 0.1;
  }
  40% {
    transform: translate3d(28px, -44px, 0);
    opacity: 0.3;
  }
  70% {
    transform: translate3d(-16px, -58px, 0);
    opacity: 0.18;
  }
}

@keyframes wisp-b {
  0%,
  100% {
    transform: translate3d(6px, 8px, 0);
    opacity: 0.07;
  }
  45% {
    transform: translate3d(-34px, -56px, 0);
    opacity: 0.22;
  }
  75% {
    transform: translate3d(18px, -32px, 0);
    opacity: 0.14;
  }
}

@keyframes wisp-c {
  0%,
  100% {
    transform: translate3d(-8px, 12px, 0);
    opacity: 0.07;
  }
  35% {
    transform: translate3d(22px, -38px, 0);
    opacity: 0.2;
  }
  68% {
    transform: translate3d(-26px, -50px, 0);
    opacity: 0.12;
  }
}

.home main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
}

.stage {
  width: 100%;
  padding: 48px 0 72px;
}

.home .marquee {
  border-bottom: 0;
  padding: 0;
}

.home .marquee-window {
  width: min(calc(100% - 2 * var(--pad)), 640px);
}

.home .ios-icon {
  --s: 76px;
  background: #efe9dc;
}

.home .intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 56px auto 0;
  padding: 0 var(--pad);
  font-size: clamp(11px, 3.5vw, 20px);
  line-height: 1.9;
  color: var(--ink);
}

.home .intro span {
  white-space: nowrap;
}

@media (max-width: 800px) {
  .home .ios-icon {
    --s: 60px;
  }

  .home .intro {
    margin-top: 40px;
    padding: 0 12px;
  }

  .stage {
    padding: 28px 0 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wisp {
    animation: none;
  }
}
