/* ============================================================
   咔咔表情 · 落地页样式
   主色：奶油 → 焦糖 渐变（cream theme）
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --caramel: #C8956D;       /* 焦糖棕（主强调） */
  --caramel-dark: #A87850;  /* 深焦糖 */
  --peach: #E8A87C;         /* 蜜桃橙 */
  --terracotta: #D98E68;    /* 赤陶 */

  --ink: #3D2E1F;           /* 深棕文字 */
  --ink-soft: #8B7560;      /* 柔棕次要文字 */
  --line: #EDE0CB;          /* 奶油描边 */

  --bg: #FBF3E4;            /* 奶油主背景 */
  --card: #FFFFFF;          /* 卡片纯白，与奶油底拉开层次 */

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 4px 14px rgba(200, 149, 109, 0.10);
  --shadow: 0 18px 50px rgba(200, 149, 109, 0.16);
  --shadow-lg: 0 30px 80px rgba(200, 149, 109, 0.24);

  --grad: linear-gradient(135deg, var(--peach) 0%, var(--caramel) 100%);
  --grad-warm: linear-gradient(135deg, var(--terracotta) 0%, var(--caramel) 100%);

  --container: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* ---------- 容器 ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 24px rgba(200, 149, 109, 0.32);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(200, 149, 109, 0.42); }
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }

.btn--ghost { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.btn--ghost:hover { border-color: var(--caramel); color: var(--caramel); transform: translateY(-2px); }

.btn--lg { padding: 16px 32px; font-size: 17px; }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 243, 228, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; }
.logo__icon { font-size: 24px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--ink-soft); font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav__links a:hover { color: var(--caramel); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px 0 80px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 600px;
  background:
    radial-gradient(circle at 20% 20%, rgba(200, 149, 109, 0.18), transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(232, 168, 124, 0.20), transparent 50%);
  z-index: -1; pointer-events: none;
}
.hero__inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.badge {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  background: rgba(200, 149, 109, 0.14); color: var(--caramel-dark);
  font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero__title {
  font-size: clamp(38px, 5.4vw, 64px); line-height: 1.08; font-weight: 850;
  letter-spacing: -0.02em; margin-bottom: 22px;
}
.hero__sub { font-size: 18px; color: var(--ink-soft); margin-bottom: 32px; max-width: 520px; }

/* ---------- 上传组件 ---------- */
.upload { margin-bottom: 22px; }
.upload__dropzone {
  display: block; position: relative; cursor: pointer;
  border: 2px dashed #E8D9BC; border-radius: var(--radius);
  background: var(--card); padding: 34px 24px; text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  margin-bottom: 14px;
}
.upload__dropzone:hover { border-color: var(--caramel); background: #FFF6E6; }
.upload__dropzone.dragover { border-color: var(--caramel); background: #F5E6CA; transform: scale(1.01); }
.upload__icon { font-size: 42px; margin-bottom: 10px; }
.upload__text { font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.upload__text strong { color: var(--caramel); }
.upload__hint { font-size: 13px; color: var(--ink-soft); }

.upload__preview { display: flex; align-items: center; gap: 18px; justify-content: center; text-align: left; }
.upload__preview img {
  width: 88px; height: 88px; border-radius: 20px; object-fit: cover;
  border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
.upload__change {
  padding: 8px 16px; border-radius: 999px; background: var(--bg);
  color: var(--caramel); font-weight: 600; font-size: 14px; border: 1px solid var(--line);
  transition: background 0.2s;
}
.upload__change:hover { background: var(--line); }

/* ---------- 信任标签 ---------- */
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.trust li { font-size: 14px; color: var(--ink-soft); font-weight: 500; }

/* ---------- Hero 视觉：浮动表情卡 ---------- */
.hero__visual { position: relative; min-height: 420px; }
.float-grid {
  position: relative; width: 100%; height: 420px;
}
.emoji-card {
  position: absolute; width: 110px; height: 110px;
  background: var(--card); border-radius: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 50px; box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}
.emoji-card small { font-size: 13px; color: var(--ink-soft); margin-top: 2px; font-weight: 600; }
.float-1 { top: 0; left: 18%; animation-delay: 0s; }
.float-2 { top: 8%; right: 8%; animation-delay: 0.6s; }
.float-3 { top: 42%; left: 0; animation-delay: 1.2s; }
.float-4 { top: 48%; right: 22%; animation-delay: 0.3s; }
.float-5 { bottom: 4%; left: 30%; animation-delay: 0.9s; }
.float-6 { bottom: 10%; right: 2%; animation-delay: 1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

/* ---------- 区块标题 ---------- */
.section__head { text-align: center; max-width: 600px; margin: 0 auto 52px; }
.section-title { font-size: clamp(28px, 3.6vw, 40px); font-weight: 850; letter-spacing: -0.02em; line-height: 1.2; }
.section-sub { font-size: 17px; color: var(--ink-soft); margin-top: 12px; }

/* ---------- 生成结果 ---------- */
.result { padding: 64px 0 32px; }
.result__head { text-align: center; margin-bottom: 36px; }

.loading {
  max-width: 420px; margin: 0 auto; text-align: center;
  background: var(--card); padding: 40px 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.loading__emoji { font-size: 56px; animation: bounce 1s ease-in-out infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.1); }
}
.loading__bar {
  height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 22px 0 14px;
}
.loading__bar span {
  display: block; height: 100%; width: 30%;
  background: var(--grad); border-radius: 999px;
  animation: loadbar 1.4s ease-in-out infinite;
}
@keyframes loadbar {
  0% { width: 10%; margin-left: 0; }
  50% { width: 55%; margin-left: 20%; }
  100% { width: 10%; margin-left: 90%; }
}
.loading__text { color: var(--ink-soft); font-size: 15px; font-weight: 500; }

.result__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  max-width: 560px; margin: 0 auto;
}
.result__item {
  position: relative; aspect-ratio: 1 / 1;
  background: var(--card); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; box-shadow: var(--shadow-sm);
  overflow: hidden; cursor: pointer;
  animation: pop 0.5s var(--ease) backwards;
}
.result__item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.result__item:hover .result__download { opacity: 1; transform: translateY(0); }
.result__item .emoji { font-size: clamp(40px, 7vw, 56px); line-height: 1; }
.result__item .label { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.result__download {
  position: absolute; inset: auto 0 0 0; padding: 8px;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 600;
  text-align: center; opacity: 0; transform: translateY(100%);
  transition: opacity 0.2s, transform 0.2s;
}
@keyframes pop {
  0% { opacity: 0; transform: scale(0.7) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.result__actions { display: flex; gap: 14px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }

/* ---------- 画廊 ---------- */
.gallery { background: linear-gradient(180deg, transparent, rgba(200, 149, 109, 0.05), transparent); }
.gallery__grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
}
.gallery__item {
  aspect-ratio: 1 / 1; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  animation: float 5s ease-in-out infinite;
}
.gallery__item:hover { transform: translateY(-6px) scale(1.04); box-shadow: var(--shadow); z-index: 2; }
.gallery__item .emoji { font-size: clamp(32px, 4.5vw, 46px); }
.gallery__item .label { font-size: 13px; color: var(--ink-soft); font-weight: 600; }

/* ---------- 步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  position: relative; background: var(--card); border-radius: var(--radius-lg);
  padding: 40px 28px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.step__num {
  position: absolute; top: 20px; left: 24px; font-size: 56px; font-weight: 850;
  color: rgba(200, 149, 109, 0.14); line-height: 1;
}
.step__emoji { font-size: 48px; margin-bottom: 14px; }
.step h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* ---------- 特点 ---------- */
.features__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  background: var(--card); border-radius: var(--radius); padding: 32px 24px;
  box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease);
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature__icon {
  width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: rgba(200, 149, 109, 0.14); margin-bottom: 16px;
}
.feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 14px; }

/* ---------- CTA ---------- */
.cta__box {
  background: var(--grad); border-radius: var(--radius-lg);
  padding: 64px 32px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta__box::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2), transparent 50%);
}
.cta__box .section-title { color: #fff; }
.cta__box .section-sub { color: rgba(255,255,255,0.9); }
.cta__form {
  display: flex; gap: 12px; max-width: 460px; margin: 28px auto 0; position: relative;
}
.cta__form input {
  flex: 1; padding: 16px 22px; border-radius: 999px; border: none;
  font-size: 16px; background: rgba(255,255,255,0.96); color: var(--ink);
}
.cta__form input:focus { outline: 3px solid rgba(255,255,255,0.6); }
.cta__form .btn--primary { background: var(--ink); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,0.2); }
.cta__success { margin-top: 18px; font-weight: 600; color: #fff; }

/* ---------- Footer ---------- */
.footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__copy { color: var(--ink-soft); font-size: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; box-shadow: var(--shadow);
  opacity: 0; transition: opacity 0.25s, transform 0.25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { min-height: 320px; order: -1; }
  .float-grid { height: 320px; }
  .emoji-card { width: 86px; height: 86px; font-size: 38px; }
  .gallery__grid { grid-template-columns: repeat(4, 1fr); }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .nav__links { display: none; }
  .nav__cta { display: inline-flex; }
  .steps { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .features__grid { grid-template-columns: 1fr; }
  .cta__form { flex-direction: column; }
  .cta__form .btn { width: 100%; }
  .result__grid { gap: 12px; }
  .hero__sub { font-size: 16px; }
}

/* ---------- 无障碍：减少动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
