/*
Theme Name: Theme Kuaichong
Theme URI: https://kuaichong.com
Author: Kuaichong Team
Author URI: https://kuaichong.com
Description: 快虫官方主题 — 轻快修图与创作工具箱官网主题
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theme-kuaichong
Tags: one-page, custom-colors, custom-menu, responsive
*/

:root {
  --bg-cream: #fffdf6;
  --bg-warm: #fff6dc;
  --bg-warm2: #ffeec0;
  --card: #ffffff;
  --ink: #181613;
  --ink-soft: #2a2722;
  --muted: rgba(24, 22, 19, 0.6);
  --faint: rgba(24, 22, 19, 0.42);
  --yellow: #ffd23d;
  --yellow-deep: #f5b400;
  --yellow-soft: #fff1c2;
  --pink-tint: #ffe7ea;
  --pink-ink: #d9607a;
  --blue-tint: #e6f0fd;
  --blue-ink: #4f81d8;
  --line: rgba(24, 22, 19, 0.08);
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --shadow-soft: 0 18px 48px rgba(180, 130, 0, 0.10);
  --shadow-card: 0 14px 40px rgba(120, 90, 10, 0.08);
  --shadow-yellow: 0 16px 40px rgba(245, 180, 0, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: "Noto Sans SC", "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg-cream);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 50% -8%, rgba(255, 210, 61, 0.55), transparent 60%),
    radial-gradient(820px 480px at 100% 4%, rgba(255, 224, 130, 0.4), transparent 55%),
    linear-gradient(180deg, #fff8e6 0%, var(--bg-cream) 34%, var(--bg-cream) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(245, 180, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 180, 0, 0.06) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 720px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 720px);
}

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

.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ 导航 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

.nav.scrolled {
  background: rgba(255, 253, 246, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

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

.brand img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  align-items: center;
}

.nav-links a {
  font-size: 14.5px;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  font-weight: 600;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.9);
}

.nav-cta {
  margin-left: 6px;
  background: var(--ink);
  color: #fff !important;
  font-weight: 600;
  padding: 8px 28px !important;
}

.nav-cta:hover {
  background: #000 !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
body.menu-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

#top,
#download,
#features,
#user-agreement,
#privacy-policy { scroll-margin-top: 100px; }

/* ============ Hero ============ */
.hero {
  padding: 64px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.hero-copy {
  text-align: left;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(245, 180, 0, 0.3);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 26px;
  box-shadow: 0 6px 18px rgba(245, 180, 0, 0.12);
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow-deep);
  box-shadow: 0 0 0 4px rgba(255, 210, 61, 0.35);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 210, 61, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(255, 210, 61, 0.12); }
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.highlight {
  position: relative;
  display: inline-block;
  color: var(--ink);
}

.highlight::after {
  content: "";
  position: absolute;
  left: 0%;
  right: 0%;
  bottom: -0.02em;
  height: 0.3em;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-deep));
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease) 0.4s;
}

.hero.in .highlight::after { transform: scaleX(1); }

.hero-lead {
  margin: 0 0 32px;
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 18px);
}

.hero-copy .tag-row,
.hero-copy .btn-row {
  justify-content: flex-start;
}

.hero-copy .btn-row {
  margin-bottom: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}

.tag {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(120, 90, 10, 0.05);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.tag:hover {
  transform: translateY(-3px);
  background: var(--yellow-soft);
  box-shadow: 0 10px 22px rgba(245, 180, 0, 0.2);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 15.5px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 30px rgba(24, 22, 19, 0.25);
  padding: 16px 60px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(24, 22, 19, 0.3);
}

.btn-ghost {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: var(--shadow-yellow);
  padding: 16px 60px;
}

.btn-ghost:hover {
  transform: translateY(-3px);
  background: var(--yellow-deep);
  box-shadow: 0 22px 50px rgba(245, 180, 0, 0.45);
}

.btn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

/* ============ Hero 手机展示 ============ */
.hero-stage {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

.phone {
  position: relative;
  width: min(300px, 78vw);
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #2b2722, #100f0d);
  box-shadow:
    0 50px 90px rgba(120, 90, 10, 0.28),
    0 12px 30px rgba(24, 22, 19, 0.2);
  animation: floaty 6s ease-in-out infinite;
}

.phone img {
  width: 100%;
  display: block;
  border-radius: 34px;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-0.6deg); }
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  z-index: -1;
}

.blob.a {
  width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(255, 210, 61, 0.9), transparent 70%);
  top: 8%; left: 12%;
  animation: floaty 7s ease-in-out infinite;
}

.blob.b {
  width: 90px; height: 90px;
  background: radial-gradient(circle, rgba(217, 96, 122, 0.5), transparent 70%);
  bottom: 14%; right: 14%;
  animation: floaty 5.5s ease-in-out infinite reverse;
}

.hero-chip {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow-card);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: floaty 5s ease-in-out infinite;
}

.hero-chip .ico {
  width: 28px; height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.hero-chip .ico.ico-img {
  width: 36px;
  height: 36px;
  background: transparent;
  border-radius: 0;
}

.hero-chip .ico.ico-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero-chip.one { top: 16%; left: -4%; animation-delay: 0.4s; }
.hero-chip.two { bottom: 18%; right: -4%; animation-delay: 1.2s; }

/* ============ 章节标题 ============ */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-kicker {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--yellow-deep);
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.features { padding: 60px 0 20px; }

/* ============ 特性详情块 ============ */
.detail {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding: 52px 0;
}

.detail + .detail { border-top: 1px solid var(--line); }

.detail.reverse .detail-copy { order: 2; }
.detail.reverse .detail-visual { order: 1; }

.detail-copy .step-no {
  font-size: 14px;
  font-weight: 700;
  color: var(--yellow-deep);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.detail-copy h3 {
  margin: 0 0 32px;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

.detail-copy ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 16px;
}

.detail-copy li {
  position: relative;
  padding-left: 24px;
}

.detail-copy li + li { margin-top: 16px; }

.detail-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: var(--yellow);
}

.detail-copy li strong {
  color: var(--ink);
  font-weight: 700;
}

/* 视觉卡 */
.detail-visual {
  position: relative;
  border-radius: var(--radius-xl);
  min-height: 340px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.detail-visual:hover {
  transform: translateY(-6px);
}

.visual-pink { background: linear-gradient(155deg, #fff0f2, var(--pink-tint)); }
.visual-blue { background: linear-gradient(155deg, #eef5ff, var(--blue-tint)); }
.visual-mix { background: linear-gradient(155deg, #fffaf0, #fff0d6); }

.visual-emoji {
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
  transition: transform 0.4s var(--ease);
}

.detail-visual:hover .visual-emoji { transform: scale(1.08) rotate(-4deg); }

.visual-label {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.visual-label .t { font-weight: 800; font-size: 17px; }
.visual-label .d { font-size: 13px; color: var(--muted); }

.visual-go {
  align-self: flex-start;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: #fff;
  padding: 7px 14px;
  border-radius: 10px;
}

/* 抠图前后对比演示 */
.compare {
  position: absolute;
  inset: 28px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.compare .before,
.compare .after {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.compare .before {
  background: linear-gradient(135deg, #c9e3a8, #8fbf6a);
}

.compare .after {
  background:
    conic-gradient(rgba(0,0,0,0.06) 0 25%, transparent 0 50%) 0 0 / 22px 22px,
    conic-gradient(rgba(0,0,0,0.06) 0 25%, transparent 0 50%) 11px 11px / 22px 22px,
    #fafafa;
  clip-path: inset(0 0 0 50%);
}

.compare .person {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 130px;
  line-height: 1;
}

.compare .handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
  animation: swipe 4s ease-in-out infinite;
}

.compare .handle::after {
  content: "⟷";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes swipe {
  0%, 100% { left: 38%; }
  50% { left: 62%; }
}

/* ============ CTA ============ */
.cta {
  position: relative;
  margin: 80px 0 60px;
  padding: clamp(48px, 7vw, 60px) 28px;
  border-radius: var(--radius-xl);
  text-align: center;
  overflow: hidden;
  background:
  radial-gradient(120% 140% at 0% 0%, #ffe27a 0%, transparent 45%),
  radial-gradient(120% 150% at 100% 0%, #ffb347 0%, transparent 50%),
  radial-gradient(140% 160% at 85% 110%, #ffb41f 0%, transparent 55%),
  linear-gradient(135deg, var(--yellow) 0%, #ffdd67 60%, #fff296 100%);
  box-shadow:
    0 30px 70px rgba(245, 180, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 260px at 16% 6%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(420px 220px at 92% 96%, rgba(255, 255, 255, 0.32), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(120% 120% at 50% 40%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 120% at 50% 40%, #000 0%, transparent 72%);
  pointer-events: none;
  z-index: 1;
}

.cta-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.cta-orb.r1 {
  width: 180px; height: 180px;
  top: -54px; left: -36px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  animation: floaty 7s ease-in-out infinite;
}

.cta-orb.r2 {
  width: 120px; height: 120px;
  bottom: -30px; right: 12%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent 70%);
  filter: blur(2px);
  animation: floaty 6s ease-in-out infinite reverse;
}

.cta-orb.r3 {
  width: 56px; height: 56px;
  top: 22%; right: 8%;
  border: 2px dashed rgba(24, 22, 19, 0.18);
  animation: floaty 8s ease-in-out infinite;
}

.cta h2 {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
  font-size: clamp(28px, 4.6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.cta p {
  position: relative;
  z-index: 2;
  margin: 0 auto 30px;
  max-width: 520px;
  color: rgba(24, 22, 19, 0.7);
  font-size: 16px;
}

.cta .btn-row { margin-bottom: 0; position: relative; z-index: 2; }

.cta .btn-primary { background: var(--ink); }
.cta .btn-ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(24, 22, 19, 0.12);
}
.cta .btn-ghost:hover { background: #fff; }

/* ============ Footer ============ */
footer {
  padding: 44px 0 56px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-brand img { height: 30px; opacity: 0.85; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 18px;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

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

.footer-anchor {
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ============ 进场动画 ============ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone, .blob, .hero-chip, .eyebrow-dot, .compare .handle { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .detail {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 44px 0;
  }
  .detail.reverse .detail-copy { order: 2; }
  .detail.reverse .detail-visual { order: 1; }
  .detail-visual { min-height: 280px; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 84px 24px 28px;
    background: rgba(255, 253, 246, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 50px rgba(120, 90, 10, 0.12);
    transform: translateY(-110%);
    transition: transform 0.35s var(--ease);
    z-index: 45;
  }
  body.menu-open .nav-links { transform: translateY(0); }
  .nav-links a { font-size: 17px; padding: 12px 16px; }
  .nav-cta { text-align: center; margin-left: 0; margin-top: 6px; }
  .nav-toggle { display: flex; position: relative; z-index: 60; }
  .hero { padding: 60px 0 24px; }
  .hero-chip { display: none; }
  .btn { width: 100%; justify-content: center; }
  .btn-row { gap: 12px; }
}

@media (max-width: 420px) {
  .shell { padding: 0 18px; }
}
