/* Glimpets 官网样式。颜色取自 docs/design/tokens.md */
:root {
  --bg: #FBF7F1;
  --surface: #FFFFFF;
  --border: #EADFD2;
  --divider: #F1E8DC;
  --ink: #2B2621;
  --ink-2: #6B6158;
  --accent: #E58A4E;
  --accent-text: #A4501F;
  --accent-soft: #F6E7D6;
  --widget-day: #FFF3E2;
  --widget-dusk: #F9DCC7;
  --widget-night: #2F3550;
  --sun-patch: #FFDFA6;
  --wall: #F4EADD;
  --floor: #E9D9C4;
  --warm-shadow: rgba(185, 98, 47, 0.14);
  --radius-card: 24px;
  --max: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Nunito, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
.pet { display: block; aspect-ratio: 1 / 1; }
.pet svg { width: 100%; height: 100%; overflow: visible; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

h1, h2, h3 { font-weight: 900; line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(40px, 6.4vw, 68px); }
h2 { font-size: clamp(30px, 4.2vw, 44px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 34em; }
.eyebrow {
  font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-text); margin-bottom: 14px;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 247, 241, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--divider); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 900; font-size: 20px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 1px 0 rgba(43,38,33,.06), 0 4px 10px var(--warm-shadow); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 800; font-size: 15px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 18px; } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 26px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 17px; border: 0; cursor: pointer;
}
.btn:hover { background: #3d362f; }
.btn small { display: block; font-size: 11px; font-weight: 700; opacity: .75; line-height: 1; letter-spacing: .02em; }
.btn .btn-stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn svg { width: 22px; height: 22px; }
.btn[aria-disabled="true"] { cursor: default; }
.btn-ghost { background: transparent; color: var(--accent-text); padding: 0 8px; }
.btn-ghost:hover { background: transparent; text-decoration: underline; }

/* ---------- 首屏 ---------- */
.hero { padding: 56px 0 96px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 .soft { color: var(--accent-text); }
.hero .lede { margin-top: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 34px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 880px) {
  .hero { padding: 32px 0 72px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
}

/* 手机示意 */
.phone-stage { position: relative; display: flex; justify-content: center; }
.phone-stage::before {
  content: ""; position: absolute; inset: 8% -6% -4%;
  background: radial-gradient(closest-side, rgba(255, 217, 154, .7), rgba(255, 217, 154, 0));
  z-index: 0;
}
.phone {
  position: relative; z-index: 1;
  width: min(330px, 78vw); aspect-ratio: 390 / 844;
  border-radius: 54px; padding: 11px;
  background: #1f1b18;
  box-shadow: 0 2px 0 rgba(255,255,255,.08) inset, 0 40px 80px -20px rgba(120, 66, 30, .35), 0 18px 36px -18px rgba(43,38,33,.4);
}
.screen {
  position: relative; width: 100%; height: 100%; border-radius: 44px; overflow: hidden;
  background: linear-gradient(#F7EDE0 0 54%, #E7D3BA 54% 100%);
}
.screen .island { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 34%; height: 28px; background: #1f1b18; border-radius: 20px; z-index: 5; }
/* 房间：墙、窗、踢脚线、地板、光斑 */
.room-window {
  position: absolute; top: 15%; left: 12%; width: 40%; height: 28%;
  background: linear-gradient(#FDF6E8, #F8DFB8);
  border: 7px solid #EBDCC8; border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.6);
}
.room-window::before, .room-window::after { content: ""; position: absolute; background: #EBDCC8; }
.room-window::before { left: 50%; top: 0; bottom: 0; width: 5px; transform: translateX(-50%); }
.room-window::after { top: 50%; left: 0; right: 0; height: 5px; transform: translateY(-50%); }
.room-plant { position: absolute; right: 9%; top: 31%; width: 22%; }
.room-base { position: absolute; left: 0; right: 0; top: 53%; height: 2.2%; background: #E2D2BD; }
.room-floor { position: absolute; left: 0; right: 0; top: 55%; bottom: 0; background: linear-gradient(#E9D9C4, #DCC6AB); }
.room-sun {
  position: absolute; left: 6%; top: 60%; width: 84%; height: 20%;
  background: radial-gradient(closest-side, rgba(255, 223, 166, .95), rgba(255, 223, 166, 0));
  transform: skewX(-14deg);
}
.screen .pet { position: absolute; left: 50%; top: 52%; width: 50%; transform: translateX(-46%); }
.ui-seg {
  position: absolute; top: 9%; left: 50%; transform: translateX(-50%); z-index: 4;
  display: flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.86);
  font-size: 11px; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 14px rgba(43,38,33,.08);
}
.ui-seg span { padding: 6px 11px; border-radius: 999px; color: var(--ink-2); }
.ui-seg span.on { background: var(--ink); color: #fff; }
.ui-status {
  position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%); z-index: 4;
  padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.86);
  font-size: 12px; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 14px rgba(43,38,33,.08);
}
.ui-status b { color: var(--accent-text); }
.ui-record {
  position: absolute; left: 50%; bottom: 5.5%; transform: translateX(-50%); z-index: 4;
  width: 58px; height: 58px; border-radius: 50%; border: 4px solid #fff;
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(43,38,33,.15);
}
.ui-record::after { content: ""; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); }
.hint-tap {
  position: absolute; z-index: 3; right: -4%; top: 43%;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px;
  padding: 10px 14px; font-size: 13px; font-weight: 800; box-shadow: 0 10px 24px var(--warm-shadow);
  transform: rotate(3deg);
}
@media (max-width: 880px) { .hint-tap { right: 2%; } }
@media (max-width: 420px) { .hint-tap { display: none; } }

/* ---------- 通用区块 ---------- */
section { padding: 96px 0; }
@media (max-width: 640px) { section { padding: 72px 0; } }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head .lede { margin-top: 16px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .lede { margin-left: auto; margin-right: auto; }
.band { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }

/* 一天的时间线 */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: 74px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 16px);
}
.moment { position: relative; text-align: center; }
.moment .bubble {
  width: 148px; height: 148px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--accent-soft); display: grid; place-items: center; position: relative;
  border: 6px solid var(--bg);
}
.band .moment .bubble { border-color: var(--surface); }
.moment .bubble .pet { width: 104px; color: var(--ink-2); }
.moment.night .bubble { background: var(--widget-night); }
.moment.night .bubble .pet { color: #C9CDE0; }
.moment time { display: block; font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.moment h3 { margin-top: 6px; font-size: 19px; }
.moment p { margin-top: 6px; color: var(--ink-2); font-size: 15px; max-width: 16em; margin-left: auto; margin-right: auto; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .timeline::before { display: none; }
}
@media (max-width: 420px) { .moment .bubble { width: 124px; height: 124px; } .moment .bubble .pet { width: 88px; } }

/* 小组件 */
.widgets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .widgets-grid { grid-template-columns: 1fr; gap: 40px; } }
.homescreen {
  position: relative; padding: 28px; border-radius: 40px;
  background: linear-gradient(160deg, #F6DCC4, #EEC7A8 55%, #E2B08F);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  box-shadow: 0 30px 60px -24px rgba(120, 66, 30, .35);
}
.app-dot { aspect-ratio: 1; border-radius: 22%; background: rgba(255,255,255,.55); }
.widget {
  border-radius: 26px; padding: 14px; position: relative; overflow: hidden;
  box-shadow: 0 8px 22px var(--warm-shadow);
  display: flex; flex-direction: column; justify-content: space-between;
}
.widget.small { grid-column: span 2; grid-row: span 2; aspect-ratio: 1; }
.widget.medium { grid-column: span 4; grid-row: span 2; aspect-ratio: 2.12; flex-direction: row; align-items: center; gap: 12px; }
.widget.day { background: var(--widget-day); }
.widget.dusk { background: var(--widget-dusk); }
.widget.night { background: var(--widget-night); color: #fff; }
.widget .w-name { font-weight: 900; font-size: 15px; line-height: 1.1; }
.widget .w-act { font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.widget.night .w-act { color: #C9CDE0; }
.widget.small .pet { width: 62%; align-self: flex-end; margin: -6px -2px -4px 0; color: #C9CDE0; }
.widget.medium .w-art { position: relative; width: 42%; height: 100%; display: grid; place-items: end center; }
.widget.medium .w-art::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: 2%; height: 30%; border-radius: 50%; background: var(--sun-patch); opacity: .9; }
.widget.medium .pet { position: relative; width: 86%; }
.widget.medium .w-text { flex: 1; }
.widget.medium .w-hint { margin-top: 10px; display: inline-block; font-size: 11px; font-weight: 800; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.7); color: var(--ink); white-space: nowrap; }
@media (max-width: 420px) { .widget.medium .w-hint { display: none; } }
.w-moon { position: absolute; top: 14px; right: 14px; width: 14px; height: 14px; border-radius: 50%; box-shadow: -4px 3px 0 0 #F5E9C8; transform: translate(4px,-2px); }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: ""; flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23A4501F' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* 承诺卡片 */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-card); padding: 28px; }
.card .icon { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 20px; }
.card .icon svg { width: 28px; height: 28px; }
.card p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }

/* 性格 */
.traits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 980px) { .traits { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .traits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 360px) { .traits { grid-template-columns: 1fr; } }
.trait { background: var(--bg); border: 1.5px solid var(--border); border-radius: 22px; padding: 22px 18px 20px; text-align: center; }
.trait.is-default { border: 2.5px solid var(--accent); padding: 21px 17px 19px; }
.trait .pet { width: 92px; margin: 0 auto 12px; color: var(--ink-2); }
.trait h3 { font-size: 17px; }
.trait p { margin-top: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.trait .tag { display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }

/* 两种看它的方式 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.scene { border-radius: 28px; overflow: hidden; border: 1.5px solid var(--border); background: var(--surface); }
.scene .art { position: relative; height: 240px; }
.scene .art .pet { position: absolute; left: 50%; bottom: 18px; width: 150px; transform: translateX(-50%); color: var(--ink-2); }
.scene .art.room { background: linear-gradient(#EFE3D3 0 58%, #D9C3A6 58%); }
.scene .art.room::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 20px; height: 34%; background: radial-gradient(closest-side, rgba(255,223,166,.9), rgba(255,223,166,0)); }
.scene .art.room .frame { position: absolute; inset: 18px; border: 2px solid rgba(255,255,255,.9); border-radius: 18px; }
.scene .art.room .frame::before, .scene .art.room .frame::after { content: ""; position: absolute; width: 22px; height: 22px; border: 0 solid #fff; }
.scene .art.cozy { background: linear-gradient(#F4EADD 0 60%, #E9D9C4 60%); }
.scene .art.cozy .rug { position: absolute; left: 50%; bottom: 10px; width: 64%; height: 54px; transform: translateX(-50%); border-radius: 50%; background: #D99A72; box-shadow: inset 0 0 0 6px #D99A72, inset 0 0 0 8px #F2C9AC; }
.scene .art.cozy .win { position: absolute; top: 22px; right: 14%; width: 92px; height: 74px; border: 6px solid #EBDCC8; border-radius: 8px; background: linear-gradient(#FDF6E8, #F8DFB8); }
.scene .art.cozy .plant { position: absolute; left: 10%; bottom: 40px; width: 58px; }
.scene .body { padding: 24px 26px 28px; }
.scene .body p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }

/* 隐私条 */
.privacy-band { background: var(--ink); color: #fff; border-radius: 36px; padding: 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.privacy-band .eyebrow { color: #F2B98F; }
.privacy-band .lede { color: #D9CFC5; margin-top: 16px; }
.privacy-band ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.privacy-band li { display: flex; gap: 14px; align-items: flex-start; color: #EFE6DC; }
.privacy-band li svg { flex: none; width: 26px; height: 26px; margin-top: 1px; }
.privacy-band a { color: #F2B98F; }
@media (max-width: 860px) { .privacy-band { grid-template-columns: 1fr; padding: 40px 28px; border-radius: 28px; } }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1.5px solid var(--divider); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-weight: 900; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 3px solid var(--accent-text); border-bottom: 3px solid var(--accent-text);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 40em; }

/* 结尾 CTA */
.final { text-align: center; padding-bottom: 120px; }
.final .pet { width: 150px; margin: 0 auto 10px; color: var(--ink-2); }
.final .lede { margin: 16px auto 0; }
.final .hero-cta { justify-content: center; }

/* 页脚 */
footer { border-top: 1px solid var(--divider); padding: 40px 0 56px; font-size: 14px; color: var(--ink-2); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
footer a { color: var(--ink-2); text-decoration: none; font-weight: 800; }
footer a:hover { color: var(--ink); }
@media (max-width: 640px) { footer nav { margin-left: 0; } }

/* ---------- 文档页（隐私、支持） ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
@media (max-width: 480px) { .doc { padding: 40px 16px 72px; } }
.doc h1 { font-size: clamp(36px, 5vw, 48px); }
.doc .meta { margin-top: 12px; color: var(--ink-2); font-size: 15px; }
.doc .summary { margin-top: 32px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 22px; padding: 24px 26px; }
.doc .summary h2 { font-size: 18px; letter-spacing: 0; margin-top: 0; }
.doc .summary ul { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); }
.doc .summary li + li { margin-top: 6px; }
.doc h2 { font-size: 24px; margin-top: 48px; letter-spacing: -0.01em; }
.doc h3 { font-size: 18px; margin-top: 28px; }
.doc p, .doc ul, .doc ol { margin-top: 12px; color: #4A423B; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; overflow: hidden; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.doc th { font-weight: 900; background: #FDF9F4; }
.doc tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.contact-card { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; background: var(--accent-soft); border-radius: 24px; padding: 24px 26px; }
.contact-card p { margin: 0; color: var(--ink); }
.contact-card .btn { height: 48px; }

/* ---------- 动效 ---------- */
.pet-eyes { transform-origin: 100px 82px; animation: blink 5.2s infinite; }
.pet-breathe { transform-origin: 110px 180px; animation: breathe 3.6s ease-in-out infinite; }
.pet-z { animation: drift 3.6s ease-in-out infinite; opacity: .8; }
.pet-z2 { animation-delay: 1.2s; }
.pet-tail { transform-origin: 146px 170px; animation: sway 4s ease-in-out infinite; }
.pet[data-pettable] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pet.is-patted svg { animation: pat .5s ease-out; }
.pet[data-pettable]:hover svg { transform: translateY(-2px); transition: transform .2s; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.1); } }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.035); } }
@keyframes drift { 0%, 100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(-6px); opacity: .9; } }
@keyframes sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-5deg); } }
@keyframes pat { 0% { transform: scale(1); } 35% { transform: scale(1.06, .94) translateY(4px); } 70% { transform: scale(.98, 1.03) translateY(-6px); } 100% { transform: scale(1); } }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
