/* ============================================================
   刻图KT官网首页样式（方向 A · 专业工作台）
   浅底黑字 + 猫蓝点缀，真实 App 截图放进 CSS 绘制的设备外框。
   纯系统字体栈，零外部请求。QQ 登录页仍使用 styles.css，互不影响。
   动效只在 html.motion 下生效（见 index.html 头部脚本与 js/home.js）。
   ============================================================ */

:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --ink: #13171d;
  --ink-2: #4b5563;
  --ink-3: #636b78;          /* 弱化文字，浅底对比度 4.5:1+ */
  --line: #dedcd6;
  --blue: #2c5fa3;
  --blue-bright: #4d8fd6;    /* 深色底上的强调色 */
  --blue-soft: #e8eef7;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

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

html { scroll-padding-top: 76px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a3039; box-shadow: 0 8px 20px rgba(19, 23, 29, 0.18); }
.btn-line { border-color: #c9c6be; background: var(--surface); }
.btn-line:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-arrow { transition: transform 0.2s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- 导航：滚动后加阴影 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 8px 24px rgba(19, 23, 29, 0.06); }
.nav-inner { display: flex; align-items: center; height: 64px; gap: 40px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 14px; color: var(--ink-2); }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }

/* ---------- 设备外框：截图四角的黑边被外框吞掉 ---------- */
.device {
  background: #111418;
  padding: 10px;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(19, 23, 29, 0.16);
}
.device img { border-radius: 12px; width: 100%; }

/* ---------- 首屏 ---------- */
.hero { position: relative; padding: 72px 0 0; overflow: hidden; }
/* 细点网格底纹，向四周淡出 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(19, 23, 29, 0.12) 1px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-top { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: end; }
.hero h1 { font-size: 68px; line-height: 1.1; letter-spacing: -1.5px; font-weight: 800; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .line > span { display: inline-block; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-sub { font-size: 18px; color: var(--ink-2); max-width: 30em; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.qq-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.qq-entry:hover { color: var(--ink); border-bottom-color: currentColor; }
.qq-entry img { width: 22px; height: 22px; border-radius: 5px; }

.hero-stage { margin-top: 56px; perspective: 1800px; }
.hero-device {
  max-width: 1000px;
  margin: 0 auto;
  transform-origin: 50% 100%;
  box-shadow: 0 50px 100px -30px rgba(44, 95, 163, 0.45), 0 24px 60px rgba(19, 23, 29, 0.18);
}
.motion .hero-device { transition: transform 0.25s ease-out; will-change: transform; }
.screen { position: relative; }

/* 功能标注：蓝点 + 深色标签 */
.callout {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translate(-7px, -50%);
  pointer-events: none;
}
.callout i {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(19, 23, 29, 0.3);
}
.callout i::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  opacity: 0;
}
.callout b {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(19, 23, 29, 0.88);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(19, 23, 29, 0.2);
}
.callout-left { flex-direction: row-reverse; transform: translate(calc(-100% + 7px), -50%); }

/* 功能跑马灯 */
.marquee {
  margin-top: 72px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; }
.marquee ul { display: flex; list-style: none; }
.marquee li {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.marquee li::after {
  content: '';
  width: 5px;
  height: 5px;
  margin: 0 22px;
  background: var(--blue);
  transform: rotate(45deg);
}
/* 不播放动效时只显示一组，允许换行居中 */
html:not(.motion) .marquee { -webkit-mask-image: none; mask-image: none; }
html:not(.motion) .marquee-track { width: auto; justify-content: center; padding: 0 20px; }
html:not(.motion) .marquee ul { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
html:not(.motion) .marquee ul[aria-hidden] { display: none; }

/* ---------- 出图流程条 ---------- */
.flow { background: var(--ink); }
.flow-inner { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.flow-progress {
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 2px;
  background: var(--blue-bright);
  transform: scaleX(0);
  transform-origin: left;
}
.flow-step { padding: 28px 24px; border-left: 1px solid #2a2f37; }
.flow-step:first-of-type { border-left: none; padding-left: 0; }
.flow-step h2 { font-size: 16px; color: #fff; margin-bottom: 4px; }
.flow-step p { font-size: 14px; color: #a5acb7; }

/* ---------- 通用区块 ---------- */
.section { padding: 104px 0; overflow-x: clip; }  /* 入场前侧移的截图不撑出横向滚动 */
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: 40px; line-height: 1.25; font-weight: 800; letter-spacing: -0.5px; }
.section-head p { color: var(--ink-2); margin-top: 12px; font-size: 16px; }

/* ---------- 功能：文案与截图左右交替，截图始终占较宽一栏 ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.feature:nth-of-type(even) { grid-template-columns: 1.15fr 1fr; }
.feature:nth-of-type(even) .feature-copy { order: 2; }
.feature:nth-of-type(even) .feature-media { --fx: -64px; }
.feature:nth-of-type(odd) .feature-media { --fx: 64px; }
.feature-media { --fy: 0; --fs: 0.96; }
.feature-media .device { transition: box-shadow 0.4s; }
.feature-media .device:hover { box-shadow: 0 32px 70px rgba(19, 23, 29, 0.22); }
.feature-label { font-size: 13px; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
.feature h3 { font-size: 30px; line-height: 1.3; margin-bottom: 12px; }
.feature-copy > p:not(.feature-label) { color: var(--ink-2); }
.feature ul { list-style: none; margin-top: 20px; display: grid; gap: 10px; }
.feature li { position: relative; padding-left: 18px; font-size: 15px; }
.feature li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 8px;
  height: 2px;
  background: var(--blue);
}

.more {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 40px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.more div { background: var(--surface); padding: 24px 28px; }
.more h3 { font-size: 17px; margin-bottom: 4px; }
.more p { font-size: 14px; color: var(--ink-2); }

/* ---------- 下载 ---------- */
.download { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 10px; }
.dl { display: flex; flex-direction: column; gap: 6px; padding: 28px; border-left: 1px solid var(--line); transition: background-color 0.3s; }
.dl:first-child { border-left: none; }
.dl:hover { background: #fafaf8; }
.dl h3 { font-size: 20px; }
.dl p { flex: 1; margin-bottom: 14px; font-size: 14px; color: var(--ink-2); }
.dl .btn { align-self: flex-start; }

/* ---------- 价格 ---------- */
.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 15px;
}
.price-table th, .price-table td { text-align: left; padding: 18px 24px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.price-table tbody tr:last-child > * { border-bottom: none; }
.price-table thead th { font-size: 14px; background: #fafaf8; }
.price-table th small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.price-table tbody th { font-size: 16px; }
.price-table td.num { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-table td.num small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.price-table tr.hl > * { background: var(--blue-soft); }
.price-notes { list-style: none; margin-top: 16px; font-size: 13px; color: var(--ink-3); display: grid; gap: 2px; }

/* ---------- 底部 CTA：深色区 + 小蓝猫 ---------- */
.cta { background: var(--ink); color: #fff; padding: 112px 0; text-align: center; overflow: hidden; }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta-mascot {
  width: 128px;
  height: 128px;
  border-radius: 32px;
  margin-bottom: 28px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06), 0 24px 60px rgba(77, 143, 214, 0.35);
}
.cta h2 { font-size: 44px; font-weight: 800; letter-spacing: -0.5px; }
.cta p { color: #a5acb7; margin: 10px 0 32px; font-size: 16px; }

.footer { padding: 28px 0; font-size: 13px; color: var(--ink-3); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--ink); }

/* ============================================================
   动效（html.motion）：入场、循环与滚动联动
   ============================================================ */
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes stage-in { from { opacity: 0; transform: translateY(80px); } to { opacity: 1; transform: none; } }
@keyframes callout-in { from { opacity: 0; transform: translate(-7px, -50%) scale(0.8); } to { opacity: 1; transform: translate(-7px, -50%); } }
@keyframes callout-left-in { from { opacity: 0; transform: translate(calc(-100% + 7px), -50%) scale(0.8); } to { opacity: 1; transform: translate(calc(-100% + 7px), -50%); } }
@keyframes ping { 0% { opacity: 0.8; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(2.4); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes flow-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes flow-step { 0% { opacity: 0.5; } 3%, 25% { opacity: 1; } 30%, 100% { opacity: 0.5; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

/* 首屏标题逐行升起，截图随后入场，标注依次出现 */
.motion .hero h1 .line > span { transform: translateY(105%); animation: line-up 0.9s var(--ease-out) forwards; }
.motion .hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
.motion .hero-stage { opacity: 0; animation: stage-in 1.2s var(--ease-out) 0.35s forwards; }
.motion .callout { opacity: 0; animation: callout-in 0.5s var(--ease-out) forwards; animation-delay: calc(1.4s + var(--i) * 0.35s); }
.motion .callout-left { animation-name: callout-left-in; }
.motion .callout i::after { animation: ping 2.4s ease-out infinite; animation-delay: calc(1.8s + var(--i) * 0.35s); }

/* 跑马灯与流程条只在可见（.run）时播放 */
.motion .marquee-track { animation: marquee 48s linear infinite paused; }
.motion .marquee.run .marquee-track { animation-play-state: running; }
.motion .marquee:hover .marquee-track { animation-play-state: paused; }
.motion .flow-progress { animation: flow-bar 8s linear infinite paused; }
.motion .flow-step { opacity: 0.5; animation: flow-step 8s linear infinite paused; animation-delay: calc(var(--i) * 2s); }
.motion .flow.run .flow-progress,
.motion .flow.run .flow-step { animation-play-state: running; }

/* 滚动入场：默认上移淡入，功能截图从各自一侧滑入 */
.motion [data-reveal] {
  opacity: 0;
  transform: translate(var(--fx, 0), var(--fy, 28px)) scale(var(--fs, 1));
  transition: opacity 0.8s ease, transform 1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.motion [data-reveal].in { opacity: 1; transform: none; }
.motion [data-parallax] { will-change: transform; }

.motion .cta-mascot { animation: bob 5s ease-in-out infinite; }

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .nav-inner { gap: 16px; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }

  .hero { padding-top: 40px; }
  .hero-top { grid-template-columns: 1fr; gap: 16px; }
  .hero h1 { font-size: 40px; letter-spacing: -0.5px; }
  .hero-sub { font-size: 16px; }
  .hero-stage { margin-top: 32px; }
  .device { padding: 6px; border-radius: 14px; }
  .device img { border-radius: 8px; }
  .callout { display: none; }
  .marquee { margin-top: 44px; padding: 14px 0; }
  .marquee li { font-size: 14px; }
  .marquee li::after { margin: 0 16px; }

  .flow-inner { grid-template-columns: 1fr 1fr; }
  .flow-progress { left: 20px; right: 20px; }
  .flow-step, .flow-step:first-of-type { padding: 20px 12px; border-left: none; border-top: 1px solid #2a2f37; }
  .flow-step:nth-of-type(-n+2) { border-top: none; }

  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: 28px; }

  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
  .feature:nth-of-type(n) .feature-media { --fx: 0; --fy: 32px; }
  .feature h3 { font-size: 22px; }

  .more, .dl-grid { grid-template-columns: 1fr; }
  .dl { border-left: none; border-top: 1px solid var(--line); }
  .dl:first-child { border-top: none; }

  .price-table { font-size: 14px; }
  .price-table th, .price-table td { padding: 14px 12px; }
  .price-table tbody th { font-size: 15px; }
  .price-table td.num { font-size: 18px; }

  .cta { padding: 72px 0; }
  .cta h2 { font-size: 30px; }
  .cta-mascot { width: 104px; height: 104px; border-radius: 26px; }
}
