/* Tidytalk 网站样式：中英文页面共用。颜色都定义成变量，深色模式只改变量。 */

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f2f2f5;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --border: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --on-accent: #ffffff;
  --strike: #c7362b;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  --radius: 18px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #161618;
    --surface-2: #1d1d20;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #6e6e73;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --on-accent: #ffffff;
    --strike: #ff6b5e;
    --glass: rgba(60, 60, 64, 0.55);
    --glass-border: rgba(255, 255, 255, 0.16);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  overflow-wrap: anywhere;
}

kbd {
  font-family: inherit;
  font-size: 0.85em;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.05em 0.45em;
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 28px;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  left: 16px;
}

/* 顶部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-links .nav-section {
  display: none;
}

@media (min-width: 760px) {
  .nav-links .nav-section {
    display: list-item;
  }
}

/* 首屏 */
/* 只设上下间距，左右留白来自 .container */
.hero {
  padding-top: 64px;
  padding-bottom: 40px;
  text-align: center;
}

@media (min-width: 760px) {
  .hero {
    padding-top: 96px;
    padding-bottom: 56px;
  }
}

.hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.15));
}

.eyebrow {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
}

h1,
h2,
.lead,
.section-head p {
  text-wrap: balance;
}

h1 {
  font-size: clamp(34px, 6.4vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 auto 20px;
  max-width: 16em;
}

.lead {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 36em;
  margin: 0 auto 32px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  text-decoration: none;
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.button svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.meta {
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 14px;
}

/* 首屏演示：一段口语被整理成文字，下方是录音指示器 */
.demo {
  max-width: 640px;
  margin: 56px auto 0;
  text-align: left;
}

.demo-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--faint);
  font-size: 13px;
}

.demo-titlebar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.demo-titlebar strong {
  margin-left: 8px;
  font-weight: 500;
}

.demo-body {
  padding: 20px 20px 24px;
  display: grid;
  gap: 16px;
}

.demo-row {
  margin: 0;
}

.demo-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.demo-said {
  color: var(--muted);
}

.demo-said del {
  color: var(--strike);
  text-decoration-thickness: 2px;
}

.demo-out {
  font-size: 19px;
  font-weight: 500;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.capsule {
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  margin: -26px auto 0;
  position: relative;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 26px;
}

.bars i {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  animation: level 1.2s ease-in-out infinite;
}

.bars i:nth-child(1) { animation-delay: -0.9s; }
.bars i:nth-child(2) { animation-delay: -0.2s; }
.bars i:nth-child(3) { animation-delay: -0.6s; }
.bars i:nth-child(4) { animation-delay: -1.1s; }
.bars i:nth-child(5) { animation-delay: -0.4s; }
.bars i:nth-child(6) { animation-delay: -0.8s; }
.bars i:nth-child(7) { animation-delay: -0.1s; }
.bars i:nth-child(8) { animation-delay: -0.7s; }
.bars i:nth-child(9) { animation-delay: -0.3s; }

@keyframes level {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .bars i,
  .caret {
    animation: none;
  }
  .bars i {
    transform: scaleY(0.6);
  }
}

/* 通用区块 */
.section {
  padding: 64px 0;
}

@media (min-width: 760px) {
  .section {
    padding: 88px 0;
  }
}

.section-alt {
  background: var(--surface-2);
}

.section-head {
  text-align: center;
  max-width: 40em;
  margin: 0 auto 40px;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 18px;
}

h3 {
  font-size: 19px;
  line-height: 1.35;
  margin: 0 0 6px;
}

/* 三步 */
.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}

.steps p,
.card p {
  margin: 0;
  color: var(--muted);
}

/* 整理前后对比 */
.compare {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

.compare figure {
  margin: 0;
  display: grid;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 760px) {
  .compare figure {
    grid-template-columns: 1fr 1fr;
  }
}

.compare blockquote,
.compare figcaption {
  margin: 0;
  padding: 20px 24px;
}

.compare blockquote {
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 760px) {
  .compare blockquote {
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
}

.compare figcaption {
  font-weight: 500;
}

/* 功能卡片 */
.cards {
  display: grid;
  gap: 16px;
}

@media (min-width: 600px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  color: var(--accent);
}

/* 截图 */
.shots {
  display: grid;
  gap: 24px;
  align-items: start;
}

@media (min-width: 860px) {
  .shots {
    grid-template-columns: 1fr 1fr;
  }
}

.shots figure {
  margin: 0;
}

.shots figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}

/* 隐私、安装 */
.split {
  display: grid;
  gap: 32px;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.checklist li {
  position: relative;
  padding-left: 30px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.6L13 6.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 18px no-repeat;
}

.install-steps {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 12px;
}

.note {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-size: 15px;
}

.note p {
  margin: 0 0 8px;
}

.note p:last-child {
  margin-bottom: 0;
}

/* 常见问题 */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 20px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 28px 18px 0;
  font-weight: 600;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin: 0 0 18px;
  color: var(--muted);
}

/* 底部下载 + 页脚 */
.cta {
  text-align: center;
}

.cta h2 {
  margin-bottom: 24px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--faint);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--muted);
}
