/* 全家喂养记 · 官网
 * 品牌色：杏橘 #F08A5D / 奶白 #FFF8EE / 可可棕 #4A2F25 / 夜蓝 #24304D */
:root {
  --primary: #f08a5d;
  --primary-deep: #e0703f;
  --primary-text: #c75d30;
  --primary-soft: #fde6d8;
  --primary-softer: #fff1e7;
  --bg: #fff8ee;
  --card: #ffffff;
  --text: #4a2f25;
  --text-2: #8a6b5e;
  --text-3: #b5a093;
  --line: #f2e5d7;
  --night: #24304d;
  --moon: #ffd27a;
  --shadow: 0 18px 48px rgba(176, 110, 70, 0.14);
  --shadow-sm: 0 6px 18px rgba(176, 110, 70, 0.08);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; text-align: center; margin-bottom: 48px; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.narrow { width: min(760px, 100% - 40px); }
section { padding: 96px 0; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #f7a47c, var(--primary) 60%, var(--primary-deep));
  color: #fff; font-size: 16px; font-weight: 700; font-family: inherit;
  box-shadow: 0 10px 24px rgba(240, 138, 93, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(240, 138, 93, 0.45); }
.btn img { width: 22px; height: 22px; }
.btn-sm { height: 40px; padding: 0 20px; font-size: 14px; }
.btn-lg { height: 58px; padding: 0 32px; font-size: 18px; }
.btn-ghost { background: var(--card); color: var(--primary-text); box-shadow: var(--shadow-sm); }
.btn-white { background: #fff; color: var(--primary-text); box-shadow: none; }

/* 导航 */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 248, 238, 0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: box-shadow 0.3s; }
.nav.scrolled { box-shadow: 0 4px 20px rgba(176, 110, 70, 0.1); }
.nav-inner { display: flex; align-items: center; height: 68px; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand em { font-style: normal; color: var(--primary-text); font-weight: 800; font-size: 15px; }
.links { display: flex; gap: 28px; margin-left: auto; color: var(--text-2); font-weight: 600; }
.links a:hover { color: var(--primary-text); }

/* 首屏 */
.hero { padding: 56px 0 80px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 10px; border-radius: 999px; background: var(--card); color: var(--primary-text); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-sm); }
.pill img { width: 22px; }
.hero h1 { margin: 22px 0 18px; font-size: clamp(36px, 5.2vw, 60px); font-weight: 900; letter-spacing: 1px; }
.hl { background: linear-gradient(transparent 62%, rgba(240, 138, 93, 0.35) 62%); color: var(--primary-text); }
.lead { font-size: 18px; color: var(--text-2); max-width: 520px; margin: 0 0 32px; }
.cta { display: flex; gap: 16px; flex-wrap: wrap; }
.trust { display: flex; gap: 24px; list-style: none; padding: 0; margin: 32px 0 0; color: var(--text-2); font-weight: 600; flex-wrap: wrap; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust img { width: 26px; }

.hero-phones { position: relative; height: 600px; }
.blob { position: absolute; inset: 40px 0 0 40px; border-radius: 48% 52% 44% 56% / 52% 46% 54% 48%; background: radial-gradient(circle at 30% 30%, #ffd8c2, #f8b493 60%, #f08a5d); opacity: 0.55; animation: morph 12s ease-in-out infinite; }
@keyframes morph { 50% { border-radius: 56% 44% 52% 48% / 44% 56% 46% 54%; transform: rotate(8deg) scale(1.03); } }
.float { position: absolute; width: 64px; z-index: 3; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(176, 110, 70, 0.2)); }
.f1 { left: 4%; top: 18%; }
.f2 { right: 2%; top: 6%; width: 56px; animation-delay: 0.8s; }
.f3 { right: 6%; bottom: 14%; animation-delay: 1.6s; }
.f4 { left: 10%; bottom: 8%; width: 58px; animation-delay: 2.4s; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(-6deg); } }

/* 手机外框（灵动岛机型）：截图已带灵动岛和状态栏（scripts/island-shots.py 生成），这里只画机身。
   边框、圆角都按 --w 等比计算，改尺寸只需改 --w；屏幕固定 297:642，截图顶部对齐 */
.phone { --w: 270px; position: relative; flex: none; align-self: flex-start; width: var(--w); padding: calc(var(--w) * 0.032); border-radius: calc(var(--w) * 0.146); background: linear-gradient(160deg, #4a3d36, #241d1a 40%, #2e2622); box-shadow: inset 0 0 0 1.5px #6a5a50, inset 0 0 0 4px #1a1513, 0 30px 60px rgba(74, 47, 37, 0.25); }
.phone::after { content: ''; position: absolute; right: -2px; top: 24%; width: 2px; height: 14%; border-radius: 0 2px 2px 0; background: #4a3d36; }
.phone img { display: block; width: 100%; aspect-ratio: 297 / 642; object-fit: cover; object-position: top; border-radius: calc(var(--w) * 0.113); background: #fff8f1; }
.hero-phones .phone { position: absolute; }
.phone.front { left: 22%; top: 20px; z-index: 2; transform: rotate(-3deg); }
.phone.back { --w: 240px; left: 50%; top: 70px; z-index: 1; transform: rotate(6deg); opacity: 0.96; }
.phone.sm { --w: 230px; }

/* 角色 */
.roles { background: var(--card); border-radius: 48px 48px 0 0; }
.role-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.role { padding: 28px 22px; border-radius: var(--radius); background: var(--bg); transition: transform 0.25s, box-shadow 0.25s; }
.role:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.role img { width: 56px; margin-bottom: 14px; }
.role h3 { font-size: 20px; margin-bottom: 8px; }
.role p { margin: 0; color: var(--text-2); font-size: 14px; }

/* 功能 */
.features { background: var(--card); padding-top: 24px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 48px 0; }
.feature.rev .f-text { order: 2; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--primary-softer); color: var(--primary-text); font-weight: 800; font-size: 14px; }
.tag img { width: 26px; }
.f-text h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; margin: 16px 0 18px; }
.f-text ul { list-style: none; padding: 0; margin: 0; }
.f-text li { position: relative; padding-left: 28px; margin-bottom: 12px; color: var(--text-2); font-size: 16px; }
.f-text li::before { content: ''; position: absolute; left: 0; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary-soft); box-shadow: inset 0 0 0 4px var(--primary); }
.f-shots { display: flex; justify-content: center; align-items: flex-start; gap: 24px; }
.f-shots .phone:nth-child(2) { margin-top: 48px; }
.paper { flex: none; width: 260px; margin-top: 48px; padding: 8px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); transform: rotate(3deg); }
.paper img { display: block; border-radius: 6px; }

/* 三步 */
.how { background: var(--bg); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; padding: 40px 28px 32px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); text-align: center; }
.step .num { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 900; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(240, 138, 93, 0.4); }
.step img { width: 76px; margin: 0 auto 14px; }
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-2); }

/* 承诺 */
.promise { padding: 40px 0 96px; }
.promise-inner { display: flex; align-items: center; gap: 40px; padding: 48px; border-radius: 40px; background: linear-gradient(135deg, #2e3b5f, var(--night)); color: #ffeacb; }
.promise-inner h2 { text-align: left; margin-bottom: 24px; color: #ffeacb; }
.promise-mascot { width: 180px; flex-shrink: 0; animation: bob 5s ease-in-out infinite; }
.promise-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.promise-list div { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 22px; background: rgba(255, 234, 203, 0.08); }
.promise-list img { width: 44px; }
.promise-list b { font-size: 18px; }
.promise-list span { color: rgba(255, 234, 203, 0.75); font-size: 14px; }

/* 会员 */
.pricing { background: var(--card); }
.pricing h2 { margin-bottom: 12px; }
.sub { text-align: center; color: var(--text-2); margin: 0 0 48px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; gap: 28px; }
.plan { position: relative; padding: 36px; border-radius: 32px; background: var(--bg); border: 2px solid var(--line); }
.plan.hot { background: linear-gradient(160deg, #fff4dd, #ffe9da); border-color: var(--primary); box-shadow: var(--shadow); }
.plan h3 { font-size: 22px; }
.price { font-size: 40px; font-weight: 900; color: var(--primary-text); margin: 8px 0 20px; }
.price small { font-size: 15px; color: var(--text-2); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px dashed var(--line); }
.plan li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 16px; height: 9px; border-left: 3px solid var(--primary); border-bottom: 3px solid var(--primary); transform: rotate(-45deg); }
.ribbon { position: absolute; top: -16px; right: 24px; padding: 6px 16px; border-radius: 999px; background: #e5776a; color: #fff; font-size: 13px; font-weight: 800; }
.crown { position: absolute; top: 28px; right: 30px; width: 60px; animation: bob 3.5s ease-in-out infinite; }

/* FAQ */
.faq details { margin-bottom: 14px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 22px 56px 22px 26px; font-weight: 800; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 28px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--text-3); border-bottom: 2.5px solid var(--text-3); transform: translateY(-70%) rotate(45deg); transition: transform 0.3s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0; padding: 0 26px 22px; color: var(--text-2); }

/* 底部 CTA */
.final { padding: 0 0 96px; }
.final-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 56px; border-radius: 40px; background: linear-gradient(135deg, #f7a47c, var(--primary) 55%, var(--primary-deep)); color: #fff; box-shadow: var(--shadow); }
.final h2 { text-align: left; margin-bottom: 10px; }
.final p { margin: 0 0 24px; opacity: 0.9; font-size: 17px; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border-radius: 28px; background: #fff; color: var(--text-2); font-weight: 700; }
.qr-card img { width: 168px; height: 168px; }

.footer { padding: 40px 0 56px; color: var(--text-3); font-size: 14px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.footer .brand { color: var(--text); margin-bottom: 8px; }
.footer p { margin: 0; }

/* 小程序码弹窗 */
.qr-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(74, 47, 37, 0.45); backdrop-filter: blur(6px); animation: fade 0.25s; }
.qr-modal[hidden] { display: none; }
.qr-box { position: relative; width: min(360px, 90vw); padding: 36px 28px 28px; border-radius: 32px; background: var(--card); text-align: center; animation: pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.qr-mascot { width: 84px; margin: -80px auto 8px; }
.qr-img { width: 220px; margin: 18px auto; }
.qr-box p { margin: 0; color: var(--text-2); }
.qr-close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); color: var(--text-2); font-size: 22px; cursor: pointer; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }

/* 滚动出现 */
/* 只有脚本正常运行（html.js）时才先隐藏，保证无 JS / 截图环境下内容可见 */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* 响应式 */
@media (max-width: 960px) {
  section { padding: 72px 0; }
  .links { display: none; }
  .nav-inner { justify-content: space-between; }
  .hero-inner, .feature { grid-template-columns: 1fr; }
  .hero-text { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta, .trust { justify-content: center; }
  .hero-phones { height: 520px; }
  .phone.front { left: 10%; }
  .phone.back { left: 46%; }
  .feature.rev .f-text { order: 0; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
  .steps, .promise-list { grid-template-columns: 1fr; }
  .promise-inner, .final-inner { flex-direction: column; text-align: center; padding: 36px 24px; }
  .promise-inner h2, .final h2 { text-align: center; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero-phones { height: 440px; }
  .phone { --w: 210px; }
  .phone.back { --w: 190px; left: 42%; }
  .phone.sm { --w: 160px; }
  .paper { width: 150px; }
  .f-shots { gap: 12px; }
  .role-grid { grid-template-columns: 1fr; }
  .float { width: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
