/* 咕咚心语官网 V1.1 — 品牌故事感 + 移动端优先 */

:root {
  --color-primary: #f2e8d5;
  --color-accent: #7cb9e8;
  --color-accent-dark: #5a9fd4;
  --color-warm-pink: #e8b4b8;
  --color-bg: #faf7f2;
  --color-surface: #ffffff;
  --color-text: #3d3d3d;
  --color-text-secondary: #8a8580;
  --color-not: #c9a8a8;
  --color-yes: #6aab8a;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --shadow-soft: 0 8px 32px rgba(74, 74, 74, 0.06);
  --shadow-card: 0 12px 40px rgba(124, 185, 232, 0.1);
  --shadow-warm: 0 16px 48px rgba(124, 185, 232, 0.22);
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::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", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 背景 */
.breath-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 130% 70% at 50% -15%, rgba(124, 185, 232, 0.16) 0%, transparent 58%),
    radial-gradient(circle at 88% 18%, rgba(232, 180, 184, 0.12) 0%, transparent 32%),
    radial-gradient(circle at 8% 78%, rgba(242, 232, 213, 0.45) 0%, transparent 38%),
    var(--color-bg);
  animation: breathe 10s ease-in-out infinite;
}

.deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.45;
  animation: float 12s ease-in-out infinite;
}

.deco-1 { width: 280px; top: -60px; right: -80px; }
.deco-2 { width: 200px; bottom: 20%; left: -60px; animation-delay: -4s; }

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.94; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.03); }
}

/* 顶栏 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(14px + var(--safe-top)) 24px 14px;
  background: rgba(250, 247, 242, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-logo {
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}

.site-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-accent-dark);
}

main {
  max-width: 760px;
  margin: 0 auto;
}

.screen {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: calc(72px + var(--safe-top)) 24px calc(64px + var(--safe-bottom));
  position: relative;
}

.screen.hero {
  min-height: 100svh;
  min-height: 100vh;
}

/* 第一屏 */
.hero {
  align-items: center;
  text-align: center;
  gap: 20px;
}

.scene-line {
  font-family: var(--font-serif);
  font-size: clamp(15px, 4vw, 17px);
  color: var(--color-text-secondary);
  line-height: 1.75;
  max-width: 340px;
  font-style: italic;
}

.hero-visual {
  position: relative;
  width: 200px;
  height: 200px;
}

.hero-glow {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 185, 232, 0.28) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

.hero-mascot {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(124, 185, 232, 0.2));
  animation: mascotFloat 5s ease-in-out infinite;
}

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

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 420px;
}

.brand-pill {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 20px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(124, 185, 232, 0.2);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--color-accent-dark);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.title-accent {
  color: var(--color-accent-dark);
  position: relative;
}

.title-accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 8px;
  background: rgba(124, 185, 232, 0.2);
  border-radius: 4px;
  z-index: -1;
}

.hero-subtitle {
  font-size: clamp(15px, 4vw, 18px);
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  line-height: 1.75;
}

.hero-quote {
  width: 100%;
  max-width: 360px;
  padding: 18px 20px;
  margin-bottom: 24px;
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(255, 255, 255, 0.65);
  text-align: left;
}

.hero-quote p {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
}

.hero-quote cite {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-style: normal;
  color: var(--color-accent-dark);
}

.hero-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-text-secondary);
  opacity: 0.75;
}

/* 对话预览 */
.chat-preview {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.chat-bubble {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.chat-bubble.user {
  align-self: flex-end;
  max-width: 92%;
  background: #fff8ee;
  border: 1px solid rgba(242, 232, 213, 0.8);
}

.chat-bubble.mirror {
  align-self: flex-start;
  max-width: 92%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(124, 185, 232, 0.2);
}

.bubble-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  color: var(--color-accent-dark);
}

.chat-bubble.user .bubble-label { color: #b89a8a; }

.chat-bubble p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text);
}

.chat-note {
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: 4px;
}

.scroll-hint {
  position: absolute;
  bottom: calc(20px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 44px;
  border: 2px solid rgba(124, 185, 232, 0.35);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  text-decoration: none;
}

.scroll-hint span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-accent);
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  min-height: 54px;
  padding: 15px 28px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-warm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.cta:active { transform: scale(0.97); }

.cta-icon { display: flex; width: 22px; height: 22px; }
.cta-icon svg,
.cta-icon img {
  width: 100%;
  height: 100%;
  color: #fff;
}

/* 区块标题 */
.section-head { margin-bottom: 32px; }
.section-head.center { text-align: center; }

.section-eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 600;
  line-height: 1.4;
}

.section-desc {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.section-head.center .section-desc {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.manifesto {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(242, 232, 213, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%);
  border: 1px solid rgba(124, 185, 232, 0.15);
  text-align: center;
}

.manifesto p {
  font-family: var(--font-serif);
  font-size: clamp(16px, 4.2vw, 18px);
  line-height: 1.65;
}

.manifesto strong {
  color: var(--color-accent-dark);
  font-weight: 600;
}

.moments { margin-bottom: 4px; }

.moments-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.moment-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.moment-tags li {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(232, 180, 184, 0.35);
  font-size: 13px;
  color: var(--color-text);
}

/* 第二屏对比卡片 */
.contrast-grid {
  display: grid;
  gap: 20px;
}

.contrast-card {
  padding: 24px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

.contrast-card.not {
  border: 1px solid rgba(201, 168, 168, 0.25);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 248, 246, 0.85) 100%);
}

.contrast-card.is {
  border: 1px solid rgba(106, 171, 138, 0.25);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9) 0%, rgba(246, 252, 248, 0.85) 100%);
}

.card-badge {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 20px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.not .card-badge {
  background: rgba(201, 168, 168, 0.15);
  color: var(--color-not);
}

.is .card-badge {
  background: rgba(106, 171, 138, 0.15);
  color: var(--color-yes);
}

.contrast-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contrast-card li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}

.not .item-icon {
  color: var(--color-not);
  background: rgba(201, 168, 168, 0.12);
}

.is .item-icon {
  color: var(--color-yes);
  background: rgba(106, 171, 138, 0.12);
}

.contrast-card li div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contrast-card strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.contrast-card span {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* 对话对比 */
.dialogue-compare {
  margin-top: 8px;
}

.compare-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

.compare-row {
  display: grid;
  gap: 14px;
}

.compare-card {
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.compare-card.others {
  background: rgba(255, 248, 246, 0.9);
  border: 1px solid rgba(201, 168, 168, 0.2);
}

.compare-card.ours {
  background: rgba(246, 252, 255, 0.95);
  border: 1px solid rgba(124, 185, 232, 0.25);
}

.compare-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.others .compare-tag {
  background: rgba(201, 168, 168, 0.15);
  color: var(--color-not);
}

.ours .compare-tag {
  background: rgba(124, 185, 232, 0.15);
  color: var(--color-accent-dark);
}

.compare-user {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--color-text);
}

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

.ours .compare-reply {
  color: var(--color-text);
}

/* 第三屏流程 */
.flow-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 36px;
}

.flow-card {
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.flow-card img {
  margin-bottom: 12px;
}

.flow-card h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

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

.flow-connector {
  width: 2px;
  height: 24px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--color-accent) 0%, rgba(124, 185, 232, 0.2) 100%);
  border-radius: 1px;
}

/* 日记样例 */
.diary-sample {
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff 0%, #fffaf5 100%);
  border: 1px solid rgba(242, 232, 213, 0.8);
  box-shadow: var(--shadow-card);
}

.diary-sample-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.diary-date,
.diary-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.diary-date {
  background: rgba(124, 185, 232, 0.12);
  color: var(--color-accent-dark);
}

.diary-tag {
  background: rgba(232, 180, 184, 0.15);
  color: #a87880;
}

.diary-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.diary-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
}

.diary-foot {
  margin-top: 14px;
  font-size: 11px;
  color: var(--color-text-secondary);
  opacity: 0.75;
}

/* 承诺卡片 */
.promise-grid {
  display: grid;
  gap: 12px;
}

.promise-card {
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.promise-card svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent-dark);
  margin-bottom: 8px;
}

.promise-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.promise-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.closing-letter {
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.closing-letter p {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.85;
  color: var(--color-text-secondary);
}

.closing-sign {
  margin-top: 10px !important;
  font-weight: 600;
  color: var(--color-accent-dark) !important;
}

.experience {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(242, 232, 213, 0.35) 100%);
  box-shadow: var(--shadow-soft);
}

.final-mascot {
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(124, 185, 232, 0.2);
}

.final-text {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--color-text-secondary);
}

.search-guide {
  width: 100%;
  max-width: 360px;
  padding: 20px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(124, 185, 232, 0.15);
}

.search-guide h3 {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-text);
}

.search-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.search-steps strong {
  color: var(--color-accent-dark);
  font-weight: 600;
}

.step-badge {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.qr-optional {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.text-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--color-accent-dark);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  opacity: 0.55;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-note {
  font-size: 11px;
  line-height: 1.6;
  opacity: 0.85;
  max-width: 360px;
  margin: 0 auto;
}

/* 浮层 */
.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 45, 45, 0.4);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 36px 28px calc(32px + var(--safe-bottom));
  background: linear-gradient(180deg, #fff 0%, #faf7f2 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.32s ease;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.modal-panel h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-hint {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.qr-wrap {
  display: flex;
  justify-content: center;
}

.qr-wrap img {
  width: 200px;
  height: 200px;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: var(--shadow-soft);
}

.qr-missing {
  width: 200px;
  padding: 24px 16px;
  border-radius: 14px;
  background: var(--color-primary);
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.qr-missing small {
  font-size: 12px;
  opacity: 0.85;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* 桌面端 */
@media (min-width: 640px) {
  .screen { padding-left: 40px; padding-right: 40px; }

  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    text-align: left;
    gap: 24px 40px;
    align-items: center;
  }

  .scene-line { grid-column: 1 / -1; text-align: center; max-width: 520px; margin: 0 auto; }
  .hero-visual { grid-row: 2; width: 240px; height: 240px; justify-self: center; }
  .hero-copy { grid-row: 2; align-items: flex-start; max-width: none; }
  .chat-preview { grid-column: 1 / -1; max-width: 520px; margin: 0 auto; }
  .scroll-hint { display: none; }

  .contrast-grid,
  .compare-row,
  .promise-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .flow-track {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
  }

  .flow-card { flex: 1; }

  .flow-connector {
    width: 32px;
    height: auto;
    min-height: 2px;
    align-self: center;
    background: linear-gradient(90deg, var(--color-accent) 0%, rgba(124, 185, 232, 0.2) 100%);
  }

  .modal { align-items: center; }

  .modal-panel {
    border-radius: var(--radius-lg);
    margin-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .breath-bg, .deco, .hero-glow, .hero-mascot, .scroll-hint span {
    animation: none;
  }
  html { scroll-behavior: auto; }
}
