/* 案同学官网 · Final Polish Hotfix 最终视觉语言
   案同学 accent = #14B8A6（Registry 冻结，禁止动态取色）。
   属于 Dongchen Studio Design Language，但具有明确的 Archive identity。
   轻量 DOM/CSS 动画；prefers-reduced-motion 降级；无视频/3D/重 Canvas。 */

:root {
  --accent: #14B8A6;
  --accent-hover: #0D9488;
  --accent-deep: #0F766E;
  --accent-soft: rgba(20, 184, 166, 0.14);
  --accent-faint: rgba(20, 184, 166, 0.08);

  --bg: #F4FAF9;
  --surface: #FFFFFF;
  --surface-muted: #EAF5F3;
  --text: #12322E;
  --text-secondary: #45605C;
  --text-muted: #7A8F8A;
  --border: #DCEBE8;
  --border-strong: #C3DCD8;

  --shadow-sm: 0 2px 8px rgba(18, 50, 46, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 184, 166, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #2DD4BF;
    --accent-hover: #5EEAD4;
    --accent-deep: #2DD4BF;
    --accent-soft: rgba(45, 212, 191, 0.16);
    --accent-faint: rgba(45, 212, 191, 0.09);

    --bg: #0B1413;
    --surface: #10201D;
    --surface-muted: #152824;
    --text: #E8F5F2;
    --text-secondary: #A9C4BF;
    --text-muted: #6F8C87;
    --border: #1E3631;
    --border-strong: #2A4A44;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.45);
  }
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a {
  color: var(--accent-deep);
}

/* ============ 顶部 ============ */
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
}

.brand-tagline {
  color: var(--text-muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--accent);
}

.header-studio {
  color: var(--accent-deep);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.header-studio:hover {
  border-color: var(--accent);
  background: var(--accent-faint);
}

/* ============ Hero ============ */
.hero {
  background:
    radial-gradient(46% 42% at 86% 8%, var(--accent-soft), transparent 70%),
    radial-gradient(40% 38% at 12% 18%, var(--accent-faint), transparent 70%),
    linear-gradient(180deg, var(--surface-muted) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 64px;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-copy {
  flex: 1 1 430px;
  max-width: 560px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-logo {
  width: 68px;
  height: 68px;
  border-radius: 17px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.hero-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.hero-brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text);
}

.hero-brand-sub {
  font-size: 14px;
  color: var(--text-muted);
}

.hero-copy h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.42;
  color: var(--text);
  letter-spacing: 0.01em;
}

.hero-sub {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 16.5px;
  max-width: 480px;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 11px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #04211D;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--accent-deep);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.hero-links {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.hero-links a:hover {
  color: var(--accent);
}

.hero-links-dot {
  opacity: 0.6;
}

/* Hero 右侧 app window 视觉 */
.hero-visual {
  flex: 1 1 340px;
  max-width: 420px;
  width: 100%;
}

.app-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform: translateY(0);
  animation: heroWindowFloat 6s ease-in-out infinite;
}

.app-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.app-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.app-dot:nth-child(1) { background: #F87171; }
.app-dot:nth-child(2) { background: #FBBF24; }
.app-dot:nth-child(3) { background: #34D399; }

.app-window-title {
  margin-left: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.app-window-body {
  padding: 18px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.app-row-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.app-row-text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  min-width: 0;
}

.app-row-text strong {
  font-size: 14px;
  color: var(--text);
}

.app-row-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.app-check {
  margin-left: auto;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

.app-window-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 16px;
}

.app-version {
  font-size: 12px;
  color: var(--text-muted);
  font-family: ui-monospace, Consolas, monospace;
}

@keyframes heroWindowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ============ 工作方式动画 ============ */
.how-strip {
  padding: 40px 0 36px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.how-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.how-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 92px;
}

.how-node-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent-deep);
  animation: nodeFloat 3.6s ease-in-out infinite;
}

.how-node:nth-child(3) .how-node-icon { animation-delay: .35s; }
.how-node:nth-child(5) .how-node-icon { animation-delay: .7s; }
.how-node:nth-child(7) .how-node-icon { animation-delay: 1.05s; }
.how-node:nth-child(9) .how-node-icon { animation-delay: 1.4s; }

.how-node-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.how-node-stack {
  display: flex;
  gap: 6px;
}

.how-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: nodeFloat 3.6s ease-in-out infinite;
}

.how-arrow {
  position: relative;
  width: 30px;
  height: 2px;
  background: var(--border-strong);
  flex-shrink: 0;
  margin: 0 4px;
}

.how-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -3.5px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: rotate(45deg);
  animation: arrowPulse 1.8s ease-in-out infinite;
}

@keyframes nodeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes arrowPulse {
  0%, 100% { opacity: 0.5; transform: rotate(45deg) translate(0, 0); }
  50% { opacity: 1; transform: rotate(45deg) translate(2px, -2px); }
}

.how-caption {
  margin-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

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

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.lead {
  color: var(--text-secondary);
  font-size: 15.5px;
  max-width: 640px;
  margin: 0 auto 34px;
  text-align: center;
}

/* ============ 能力卡片 ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 24px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent-deep);
  margin-bottom: 14px;
}

.card h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============ 隐私 ============ */
.privacy-inner {
  text-align: center;
  max-width: 760px;
}

.privacy-copy {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.8;
}

.privacy-copy a {
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 600;
}

.privacy-copy a:hover {
  text-decoration: underline;
}

.privacy-points {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.privacy-point {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13.5px;
  color: var(--text-secondary);
}

.privacy-point-icon {
  color: var(--accent-deep);
  display: inline-flex;
}

/* ============ 状态条 ============ */
.status-strip {
  background: var(--accent-faint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.status-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotBlink 2.2s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.status-note {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ============ 下载 ============ */
.download-inner {
  text-align: center;
}

.download-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 30px;
  text-align: left;
}

.download-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.download-logo {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.download-head h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.download-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-download {
  width: 100%;
  justify-content: center;
  padding: 15px 28px;
  font-size: 16px;
}

.download-facts {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.download-fact {
  display: block;
}

.sha-details {
  margin-top: 10px;
}

.sha-details summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
}

.sha-details code {
  display: block;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  word-break: break-all;
  font-family: ui-monospace, Consolas, monospace;
  color: var(--text-secondary);
}

.notice-card {
  max-width: 560px;
  margin: 18px auto 0;
  background: var(--accent-faint);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  text-align: left;
}

.notice-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.notice-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ============ 底部 ============ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 34px 0 30px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 28px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.footer-brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.footer-brand-text strong {
  color: var(--text);
  font-size: 14px;
}

.footer-brand-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.footer-meta a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--accent);
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .app-window,
  .how-node-icon,
  .how-chip,
  .how-arrow::after,
  .status-dot {
    animation: none;
  }
}

/* ============ 移动端 ============ */
@media (max-width: 760px) {
  .hero {
    padding: 48px 0 44px;
  }

  .hero-copy h1 {
    font-size: 26px;
  }

  .hero-brand-name {
    font-size: 21px;
  }

  .hero-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .section {
    padding: 48px 0;
  }

  .header-inner {
    justify-content: space-between;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 18px;
  }

  .how-stage {
    gap: 10px;
  }

  .how-arrow {
    width: 20px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}
