/* DialDial 官网：深色「墨色丝绸」。令牌见 docs/website-redesign.md。 */

:root {
  --ink: #07080c;
  --ink-raised: #0e1016;
  --sheen: #c9785f;
  --coral: #ff5a36;
  --fg: #f5f6f8;
  --fg-2: rgba(245, 246, 248, 0.6);
  --fg-3: rgba(245, 246, 248, 0.42);
  --hair: rgba(245, 246, 248, 0.1);
  --gutter: clamp(20px, 7.5vw, 120px);
  --measure: 34em;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2 {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}
h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.18; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--fg-3); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  padding: 8px 14px; border-radius: 8px; background: var(--fg); color: var(--ink); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ 键帽：一小块玻璃 */
.kc {
  display: inline-grid; place-items: center;
  min-width: 1.65em; height: 1.65em; padding: 0 0.42em; margin: 0 0.12em;
  border-radius: 0.42em;
  font: 600 0.82em/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color: var(--fg);
  vertical-align: 0.08em;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 0 0 0.75px rgba(255, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ------------------------------------------------------------ 按钮 */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 26px; border-radius: 24px;
  background: var(--fg); color: var(--ink);
  font-size: 16px; font-weight: 600; text-decoration: none;
  transition: background-color 0.15s ease;
}
.button:hover { background: #fff; }
.button:active { transform: translateY(1px); }

/* ------------------------------------------------------------ 导航 */
.nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  height: 68px; padding: 0 var(--gutter);
  font-size: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; text-decoration: none; }
.nav .brand { margin-right: auto; }
.nav nav { display: flex; gap: 30px; }
.nav nav a { color: var(--fg-2); text-decoration: none; transition: color 0.15s ease; }
.nav nav a:hover { color: var(--fg); }

/* ------------------------------------------------------------ 丝绸 */
.silk { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.silk-fallback {
  background:
    radial-gradient(60% 50% at 38% 55%, rgba(201, 120, 95, 0.32), transparent 70%),
    radial-gradient(40% 40% at 85% 85%, rgba(201, 120, 95, 0.18), transparent 70%),
    var(--ink);
}

/* ------------------------------------------------------------ 首屏 */
.hero {
  position: relative; overflow: hidden;
  min-height: max(640px, 100svh);
  cursor: default;
}
.hero-copy {
  position: absolute; z-index: 3;
  left: var(--gutter); top: 50%; transform: translateY(-52%);
  max-width: 640px;
}
.hero h1 { font-size: clamp(40px, 4.8vw, 68px); line-height: 1.12; }
.lede { margin-top: 26px; font-size: 18px; color: var(--fg-2); max-width: 27em; }
.actions { margin-top: 38px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.soon { color: var(--fg-2); font-size: 15px; }
.fine { margin-top: 18px; font-size: 13px; color: var(--fg-3); line-height: 1.6; }

.dial { position: absolute; z-index: 4; width: 0; height: 0; left: 70%; top: 52%; }
.dial-hint {
  position: absolute; z-index: 3; left: 70%; bottom: 6vh; transform: translateX(-50%);
  font-size: 13px; color: var(--fg-3); white-space: nowrap;
}
.cursor {
  position: absolute; left: 4px; top: -70px; width: 20px; height: 28px; z-index: 6;
  fill: #000; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.hero.is-live .cursor { opacity: 0; }

/* ------------------------------------------------------------ 玻璃 */
.glass {
  position: absolute; border-radius: 50%;
  display: grid; place-items: center;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 0 0 0.75px rgba(255, 255, 255, 0.32),
    inset 1px 1.5px 0 -0.5px rgba(255, 255, 255, 0.75),
    inset -1px -1.5px 0 -0.5px rgba(255, 255, 255, 0.25),
    0 8px 22px rgba(0, 0, 0, 0.18);
}
.bead {
  border: 0; padding: 0; color: var(--fg); cursor: pointer;
  font: inherit;
  transition: translate 0.18s cubic-bezier(0.3, 0.7, 0.4, 1), background-color 0.18s ease;
}
.bead svg { width: 34%; height: 34%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bead.is-on {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 45%),
    rgba(255, 90, 54, 0.72);
}
.bead:focus-visible { outline-offset: 4px; border-radius: 50%; }
.bead.is-fired { animation: fire 0.42s cubic-bezier(0.3, 0.7, 0.4, 1); }
@keyframes fire {
  40% { scale: 1.12; }
  100% { scale: 1; }
}
.hub {
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em; pointer-events: none;
  text-align: center; line-height: 1.3;
}
.hub small { display: block; font-size: 11px; font-weight: 500; color: var(--fg-2); letter-spacing: 0; }

/* 入场：从中心荡出去，一次 */
.dial.is-blooming .glass { animation: bloom 0.52s cubic-bezier(0.25, 0.9, 0.3, 1.15) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
.dial.is-blooming .hub { animation-duration: 0.36s; }
@keyframes bloom {
  from { transform: translate(var(--fx, 0), var(--fy, 0)) scale(0.35); opacity: 0; }
}

/* ------------------------------------------------------------ 段落 */
.band { padding: clamp(96px, 14vw, 180px) var(--gutter) 0; }
.section-head { max-width: var(--measure); }
.section-head p, .split-copy p, .prose p { margin-top: 20px; color: var(--fg-2); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.split-text { align-items: start; }
.split-copy { max-width: 26em; }
.prose { max-width: var(--measure); }
.prose p:first-child { margin-top: 0; }

/* 手势 */
.sketch { margin: 0; }
.sketch-pad {
  display: block; width: 100%; height: auto; aspect-ratio: 480 / 340;
  border-radius: 22px;
  background:
    radial-gradient(80% 70% at 50% 45%, rgba(201, 120, 95, 0.07), transparent 70%),
    var(--ink-raised);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.sketch-ghost { fill: none; stroke: rgba(245, 246, 248, 0.12); stroke-width: 0.35; stroke-dasharray: 0.3 1.4; stroke-linecap: round; }
.sketch-ink {
  fill: none; stroke: url(#inkGradient); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 1.6px rgba(255, 110, 70, 0.55));
}
.sketch-caption { margin-top: 16px; display: flex; gap: 14px; align-items: baseline; font-size: 15px; min-height: 1.75em; }
.sketch-caption b { font-weight: 600; }
.sketch-caption span { color: var(--fg-2); }

.gesture-row {
  margin-top: 48px; display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 28px; border-top: 1px solid var(--hair);
}
.gesture {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px 0 10px; border: 0; border-radius: 20px;
  background: transparent; color: var(--fg-2); font: inherit; font-size: 14px; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gesture svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gesture:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.gesture[aria-pressed="true"] { color: var(--fg); background: rgba(255, 255, 255, 0.08); }

/* 三种形状 */
.shape-stage {
  position: relative; overflow: hidden;
  margin-top: 56px; border-radius: 28px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: clamp(40px, 6vw, 80px) clamp(16px, 3vw, 48px) 36px;
  gap: 16px;
}
.shape { position: relative; z-index: 1; margin: 0; display: grid; justify-items: center; gap: 22px; }
.shape-box { position: relative; width: 260px; height: 260px; max-width: 100%; }
.shape figcaption { font-size: 15px; color: var(--fg-2); }
.glass-band { position: absolute; inset: 0; border-radius: 0; }
.glass-rim { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.glass-rim .shadow { fill: rgba(0, 0, 0, 0.45); filter: blur(10px); transform: translateY(8px); }
.glass-rim .edge { fill: none; stroke: rgba(255, 255, 255, 0.32); stroke-width: 0.75; }
.glass-rim .light { fill: none; stroke: url(#rimLight); stroke-width: 1.4; }
.glass-tint { fill: rgba(255, 255, 255, 0.05); }
.shape-icon {
  position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  fill: none; stroke: var(--fg); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.pill {
  position: absolute; left: 50%; top: 50%; height: 32px; padding: 0 16px; transform: translate(-50%, -50%);
  border-radius: 16px; display: grid; place-items: center; font-size: 14px; font-weight: 600;
}

/* 下载 */
.download { display: grid; justify-items: center; text-align: center; gap: 0; }
.download img { width: 112px; height: 112px; margin-bottom: 28px; }
.download .button { margin-top: 32px; }
.download .fine { max-width: 36em; text-wrap: balance; }

/* 常见问题：一列展开式 */
.faq { max-width: var(--measure); border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-size: 17px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px;
  border-right: 1.5px solid var(--fg-3); border-bottom: 1.5px solid var(--fg-3);
  transform: rotate(45deg) translateY(-3px); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.faq details p { padding: 0 0 22px; color: var(--fg-2); }

.perms { margin: 28px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 14px 24px; }
.perms dt { font-weight: 600; }
.perms dd { margin: 0; color: var(--fg-2); }

/* 页脚 */
.footer {
  margin-top: clamp(96px, 14vw, 180px);
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  padding: 28px var(--gutter) 40px; border-top: 1px solid var(--hair);
  font-size: 13px;
}
.footer .brand { font-size: 13px; gap: 8px; }
.footer nav { display: flex; gap: 22px; margin-right: auto; }
.footer nav a { color: var(--fg-2); text-decoration: none; }
.footer nav a:hover { color: var(--fg); }

/* 隐私政策、用户协议 */
.doc { max-width: 42em; margin: 0 auto; padding: 120px 20px 0; }
.doc h1 { font-size: clamp(32px, 4vw, 44px); }
.doc h2 { font-size: 22px; margin-top: 48px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--fg-2); }
.doc ul { margin: 14px 0 0; padding-left: 1.2em; }
.doc li + li { margin-top: 8px; }
.doc b { color: var(--fg); font-weight: 600; }
.doc p { margin-top: 14px; }
.doc .updated { color: var(--fg-3); font-size: 14px; }
.doc a { color: var(--fg); }

/* ------------------------------------------------------------ 窄屏 */
@media (max-width: 860px) {
  .nav nav { gap: 18px; }
  .hero { min-height: auto; padding: 120px var(--gutter) 0; }
  .hero-copy { position: relative; left: auto; top: auto; transform: none; }
  /* 转盘本身没有尺寸（珠子都绕着原点摆），窄屏上给它一块 300px 高的地方，原点放在正中 */
  .dial { position: relative; left: 50%; top: 150px; height: 300px; margin-top: 40px; }
  .dial-hint { position: relative; left: auto; bottom: auto; transform: none; margin: 0; padding: 8px 0 48px; text-align: center; white-space: normal; }
  .split { grid-template-columns: 1fr; }
  .shape-stage { grid-template-columns: 1fr; gap: 40px; }
  .perms { grid-template-columns: 1fr; gap: 4px; }
  .perms dd { margin-bottom: 14px; }
}
@media (max-width: 520px) {
  .nav nav a:not([href="#download"]) { display: none; }
  .lede { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dial.is-blooming .glass, .bead.is-fired { animation: none; }
  .bead { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .kc { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: #2a2c34 !important; }
  .bead.is-on { background: var(--coral) !important; }
}
