@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-SemiBold.ttf") format("truetype"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/fonts/GeistMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --bg: #fbf6f0;
  --bg2: #f3ece4;
  --paper: #ffffff;
  --ink: #2a211c;
  --ink2: #6b5d54;
  --ink3: #a0938a;
  --line: #e9e0d6;
  --accent: #e5701f;
  --accent-ink: #b8530f;
  --accent-soft: #fce3cf;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(70, 45, 20, 0.08);
  --font: "Geist", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: var(--accent-ink); }
.wrap { width: min(1120px, 100% - 48px); margin: 0 auto; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(251, 246, 240, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; height: 64px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 22px; letter-spacing: -0.5px; color: var(--ink); text-decoration: none; }
.brand b { color: var(--accent); font-weight: 600; }
.brand img { width: 28px; height: 28px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav nav a { color: var(--ink2); text-decoration: none; }
.nav nav a:hover { color: var(--ink); }
.nav .cta { padding: 7px 16px; border-radius: 10px; background: var(--ink); color: #fff !important; font-weight: 500; }

/* buttons */
.btn { display: inline-flex; flex-direction: column; justify-content: center; padding: 12px 24px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 17px; line-height: 1.3; border: 1.5px solid transparent; transition: transform .1s, background .15s; }
.btn small { font-weight: 400; font-size: 13px; opacity: .8; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #d4621a; }
.btn.ghost { color: var(--ink); border-color: #d9cfc4; background: var(--paper); }
.btn.ghost:hover { background: var(--bg2); }

/* hero */
.hero { padding: 72px 0 32px; }
.hero .wrap { display: grid; grid-template-columns: 1.08fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; padding: 4px 12px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; font-weight: 500; }
.hero h1 span { white-space: nowrap; }
.hero h1 { font-size: clamp(30px, 3.9vw, 48px); line-height: 1.15; margin: 18px 0 18px; font-weight: 900; letter-spacing: 1px; }
.hero p.lead { font-size: 19px; color: var(--ink2); margin: 0 0 30px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .note { margin-top: 14px; font-size: 14px; color: var(--ink3); }
.player { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(70, 45, 20, 0.18); background: #efe8e0; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; object-fit: cover; }

/* the strolling pet */
.stroll { position: relative; height: 150px; overflow: hidden; margin-top: 8px; }
.stroll::after { content: ""; position: absolute; left: 0; right: 0; bottom: 18px; height: 2px; background: linear-gradient(90deg, transparent, var(--line) 10%, var(--line) 90%, transparent); }
.walker { --s: 120px; position: absolute; bottom: 14px; left: 0; width: var(--s); height: var(--s); animation: stroll 26s linear infinite; }
.walker .sprite { width: 100%; height: 100%; background: url("https://192.255.243.234:8443/api/public/dl/gzbVnmh-/lanpet-xiaoju-walk.png?inline=true") 0 0 / calc(var(--s) * 8) var(--s) no-repeat; animation: frames8 .72s steps(8) infinite; }
@keyframes frames8 { to { background-position-x: calc(var(--s) * -8); } }
@keyframes stroll {
  0% { transform: translateX(-140px) scaleX(1); }
  49.99% { transform: translateX(calc(100vw + 20px)) scaleX(1); }
  50% { transform: translateX(calc(100vw + 20px)) scaleX(-1); }
  100% { transform: translateX(-140px) scaleX(-1); }
}

/* sections */
section { padding: 88px 0; }
section.alt { background: var(--bg2); }
.section-head { max-width: 720px; margin: 0 0 44px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.25; margin: 0 0 12px; font-weight: 900; }
.section-head p { color: var(--ink2); margin: 0; font-size: 18px; }

/* features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow); }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 14px; }
.feature .icon svg { width: 24px; height: 24px; stroke: var(--accent-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin: 0 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--ink2); font-size: 15.5px; line-height: 1.65; }

/* pets */
.pets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 22px; text-align: center; box-shadow: var(--shadow); }
.pet .stage { --s: 180px; width: var(--s); height: var(--s); margin: 0 auto; }
.pet .sprite { width: 100%; height: 100%; background-repeat: no-repeat; background-position: 0 0; background-size: calc(var(--s) * var(--n)) var(--s); animation: frames var(--d) steps(var(--n)) infinite; }
.pet .sprite.alt, .pet:hover .sprite.base { display: none; }
.pet:hover .sprite.alt { display: block; }
@keyframes frames { to { background-position-x: calc(var(--s) * var(--n) * -1); } }
.pet h3 { margin: 6px 0 0; font-size: 24px; font-weight: 900; }
.pet span { color: var(--ink2); font-size: 15px; }
.pets-note { margin-top: 28px; color: var(--ink2); }
.pets-note code { white-space: nowrap; font-family: var(--mono); font-size: 14px; background: var(--bg2); padding: 1px 6px; border-radius: 6px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 26px 24px 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 600; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--ink2); font-size: 15.5px; }

/* downloads */
.downloads { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.dl { min-width: 0; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow); }
.dl.main { border: 2px solid var(--accent); }
.dl h3 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag { font-size: 12.5px; font-weight: 500; padding: 2px 9px; border-radius: 10px; background: var(--bg2); color: var(--ink2); }
.tag.rec { background: var(--accent-soft); color: var(--accent-ink); }
.dl .req { color: var(--ink2); font-size: 15px; margin: 8px 0 16px; }
.dl ul { margin: 0 0 18px; padding-left: 18px; color: var(--ink2); font-size: 15px; }
.dl .btn { margin-top: auto; text-align: center; align-items: center; }
.dl.soon { background: transparent; border-style: dashed; box-shadow: none; }
.btn.disabled { color: var(--ink3); border-color: var(--line); background: transparent; cursor: default; }
.btn.disabled:active { transform: none; }
.dl code, .faq code { font-family: var(--mono); font-size: 13.5px; background: var(--bg2); padding: 1px 6px; border-radius: 6px; }
.sha { margin-top: 12px; font-size: 12.5px; color: var(--ink3); display: flex; gap: 8px; align-items: center; }
.sha code { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; background: none; padding: 0; color: var(--ink3); }
.sha button { border: 1px solid var(--line); background: var(--paper); color: var(--ink2); border-radius: 6px; font: inherit; padding: 1px 8px; cursor: pointer; }
.dl-foot { margin-top: 22px; color: var(--ink2); font-size: 15px; }

/* faq */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink3); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink2); margin: 10px 0 0; font-size: 16px; }

footer { padding: 44px 0 60px; color: var(--ink3); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .features, .pets { grid-template-columns: repeat(2, 1fr); }
  .steps, .downloads { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .nav nav a:not(.cta) { display: none; }
  .hero { padding-top: 40px; }
  section { padding: 64px 0; }
  .features { grid-template-columns: 1fr; }
  .pet .stage { --s: 130px; }
  .btn { width: 100%; text-align: center; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .walker, .walker .sprite, .pet .sprite { animation: none; }
  html { scroll-behavior: auto; }
}
