/* ═══════════════════════════════════════════════════════════════════════
   Pet Guardian 官网样式

   视觉基调沿用 App（pet_guardian_app/lib/core/theme/app_theme.dart）：
   自然绿 + 米白底 + 陶土橙点缀，中性色偏暖。官网与 App 在同一个域名下
   （/ 与 /app/），用户从官网点进 App 不该有"换了家公司"的感觉。

   字体只用系统字体栈，不引 Google Fonts：
     · 欧盟法院判例（LG München 2022）认定加载 Google Fonts 即向美国传输
       访客 IP，官网面向欧洲市场，没必要为一个字体背这个合规风险
     · 少一次跨域请求，首屏更快
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --brand: #2e9e63;
  --brand-dark: #1f7a4a;
  --brand-deep: #1b5e3a;
  --brand-soft: #dcefe2;
  --brand-tint: #eff8f1;
  --accent: #e0904f;
  --accent-soft: #fbdcc3;
  --danger: #d1544e;
  --info: #4a7df0;

  --bg: #fbf8f2;
  --card: #ffffff;
  --line: #ebe6dd;
  --text: #22201c;
  --muted: #7a736a;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(34, 32, 28, .04), 0 12px 32px -12px rgba(34, 32, 28, .14);
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
          Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-title { font-size: clamp(28px, 4vw, 40px); font-weight: 750; color: var(--brand-deep); }
.section-lead { margin-top: 14px; font-size: 18px; color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* 无障碍：只给屏幕阅读器看的文字 */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── 按钮 ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.2;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--brand-deep); border-color: var(--brand-deep); }
.btn-outline:hover { background: var(--brand-tint); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--text); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn .soon { font-size: 11px; font-weight: 600; color: var(--muted); }

/* ── 顶栏 ──────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, .88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--brand-deep); font-weight: 750; font-size: 18px; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.logo small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: .04em; line-height: 1; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 15px; }
.nav a:hover { background: var(--brand-tint); text-decoration: none; }
.nav .btn { margin-left: 8px; padding: 9px 18px; }
.lang-btn {
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-weight: 600; font-size: 13px; letter-spacing: .02em;
}
.lang-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.menu-btn { display: none; margin-left: auto; padding: 8px; border: 0; background: none; color: var(--text); }
.menu-btn svg { width: 26px; height: 26px; }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 96px 0 80px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 85% 20%, var(--brand-soft) 0%, transparent 70%),
    radial-gradient(45% 45% at 10% 90%, var(--accent-soft) 0%, transparent 70%);
  opacity: .9;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--brand-deep);
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.hero h1 { margin-top: 20px; font-size: clamp(38px, 5.6vw, 62px); font-weight: 800; color: var(--brand-deep); letter-spacing: -0.02em; }
/* 中文标题字号略收：汉字比拉丁字母宽，同一档字号下中文会多折一行、
   把最后两个字挤成孤行 */
html[data-lang="zh"] .hero h1 { font-size: clamp(34px, 4.8vw, 54px); letter-spacing: 0; text-wrap: balance; }
.hero .lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 520px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* Hero 右侧：三张叠放的示意卡片，暗示"两台设备 + 一条提醒" */
.hero-art { position: relative; height: 440px; }
.float-card {
  position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; display: flex; align-items: center; gap: 14px;
}
.float-card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.float-card .ico svg { width: 26px; height: 26px; }
.float-card b { display: block; font-size: 16px; }
.float-card span { font-size: 13px; color: var(--muted); }
.fc-collar { top: 22px; left: 0; width: 280px; }
.fc-collar .ico { background: var(--brand-tint); color: var(--brand-dark); }
.fc-cam { top: 150px; right: 0; width: 300px; }
.fc-cam .ico { background: #eef2fd; color: var(--info); }
.fc-alert { bottom: 30px; left: 40px; width: 320px; border-color: #f6d3cf; }
.fc-alert .ico { background: #fbe7e5; color: var(--danger); }
.hero-map {
  position: absolute; inset: 0; z-index: -1; border-radius: 28px;
  background: var(--brand-tint); border: 1px solid var(--line); overflow: hidden;
}
.hero-map svg { width: 100%; height: 100%; }

/* ── 怎么用 ────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step .num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-deep); color: #fff; font-weight: 700; font-size: 15px;
}
.step h3 { margin-top: 18px; font-size: 20px; }
.step p { margin-top: 10px; color: var(--muted); }

/* ── 产品 ──────────────────────────────────────────────────────── */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 48px; }
.product {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.product-visual { position: relative; height: 260px; display: grid; place-items: center; }
.product-visual svg { width: 200px; height: 200px; }
.product-visual.collar { background: linear-gradient(160deg, var(--brand-tint), var(--brand-soft)); }
.product-visual.cam { background: linear-gradient(160deg, #fff4ea, var(--accent-soft)); }
.badge {
  position: absolute; top: 16px; left: 16px; padding: 6px 12px; border-radius: 999px;
  background: var(--text); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.product-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 26px; color: var(--brand-deep); }
.product-body .tag { margin-top: 6px; color: var(--brand); font-weight: 600; font-size: 14px; }
.product-body .desc { margin-top: 14px; color: var(--muted); }
.specs { margin-top: 22px; display: grid; gap: 10px; }
.specs li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.specs li::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%;
  background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a4a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}
.product-body .actions { margin-top: auto; padding-top: 24px; }

/* ── 套餐 ──────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.plan h3 { font-size: 18px; }
.plan .price { margin-top: 8px; font-size: 26px; font-weight: 750; color: var(--brand-deep); }
.plan ul { margin-top: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
.plan li::before { content: "·"; margin-right: 8px; color: var(--brand); font-weight: 700; }
.plans-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ── App ───────────────────────────────────────────────────────── */
.app-section { background: var(--brand-deep); color: #fff; }
.app-section .section-title, .app-section h3 { color: #fff; }
.app-section .section-lead { color: rgba(255, 255, 255, .72); }
.app-grid { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: center; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; margin-top: 40px; }
.feature h3 { font-size: 17px; }
.feature p { margin-top: 6px; color: rgba(255, 255, 255, .72); font-size: 15px; }
.stores { margin-top: 40px; }
.stores .label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.stores .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 12px;
  background: #fff; color: var(--text); font-weight: 600; font-size: 15px; border: 1.5px solid transparent;
}
.store:hover { text-decoration: none; background: var(--bg); }
.store svg { width: 22px; height: 22px; }
.store .soon { font-size: 11px; font-weight: 600; color: var(--muted); display: block; line-height: 1; margin-top: 3px; }
.store .lines { display: flex; flex-direction: column; line-height: 1.1; }
.store[aria-disabled="true"] { opacity: .6; cursor: default; }
.store[aria-disabled="true"]:hover { background: #fff; }
.store.web { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.store.web:hover { background: rgba(255, 255, 255, .1); }

/* 手机示意：用 CSS 画的"首页"，不依赖截图。将来有真截图时整块换成 <img> */
.phone {
  width: 300px; margin: 0 auto; border-radius: 40px; background: #17161a; padding: 12px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.phone .screen { border-radius: 30px; background: var(--bg); color: var(--text); overflow: hidden; height: 560px; }
.phone .status { display: flex; justify-content: space-between; padding: 14px 22px 0; font-size: 12px; font-weight: 600; }
.phone .head { padding: 18px 20px 0; background: linear-gradient(180deg, #ffebcf, transparent); }
.phone .head small { font-size: 12px; color: var(--muted); }
.phone .head b { display: block; font-size: 24px; color: var(--brand-deep); }
.phone .head span { font-size: 13px; color: var(--muted); }
.phone .stat-row { display: flex; gap: 10px; padding: 16px 16px 0; }
.phone .stat { flex: 1; background: var(--card); border-radius: 14px; padding: 12px; border: 1px solid var(--line); }
.phone .stat b { font-size: 20px; display: block; color: var(--brand-deep); }
.phone .stat span { font-size: 11px; color: var(--muted); }
.phone .timeline { padding: 16px; display: grid; gap: 8px; }
.phone .ev { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.phone .ev i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.phone .ev i.o { background: var(--accent); }
.phone .ev i.b { background: var(--info); }
.phone .ev span { margin-left: auto; color: var(--muted); font-size: 11px; }
.phone .live {
  margin: 4px 16px 0; height: 120px; border-radius: 14px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2b3a33, #17161a);
}
.phone .live::after {
  content: "LIVE"; position: absolute; top: 10px; left: 10px; padding: 3px 7px; border-radius: 6px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em;
}
.phone .live svg { position: absolute; right: 18px; bottom: 6px; width: 90px; height: 90px; opacity: .85; }

/* ── 隐私 ──────────────────────────────────────────────────────── */
.privacy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 44px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; gap: 18px; }
.pcard .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-dark); display: grid; place-items: center; }
.pcard .ico svg { width: 24px; height: 24px; }
.pcard h3 { font-size: 18px; }
.pcard p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.disclaimer {
  margin-top: 28px; padding: 16px 20px; border-radius: var(--radius-sm);
  background: #fff8ee; border: 1px solid #f3dfc4; color: #6b5535; font-size: 14px;
}

/* ── 上市通知 ──────────────────────────────────────────────────── */
.notify { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 56px 40px; box-shadow: var(--shadow); }
.notify form { margin-top: 28px; max-width: 560px; margin-left: auto; margin-right: auto; }
.notify .row { display: flex; gap: 10px; }
.notify input[type="email"] {
  flex: 1; min-width: 0; padding: 14px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  font: inherit; font-size: 16px; background: var(--bg); color: var(--text);
}
.notify input[type="email"]:focus { outline: none; border-color: var(--brand); background: #fff; }
.notify fieldset { border: 0; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; font-size: 14px; color: var(--muted); }
.notify fieldset legend { float: left; padding: 0; margin-right: 6px; }
.notify fieldset label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.notify .consent { margin-top: 16px; font-size: 13px; color: var(--muted); }
.notify .msg { margin-top: 14px; font-size: 15px; min-height: 1.5em; }
.notify .msg.ok { color: var(--brand-dark); font-weight: 600; }
.notify .msg.err { color: var(--danger); }
/* 蜜罐：机器人会填，人看不见。用 position 而不是 display:none，
   有些爬虫会跳过 display:none 的字段 */
.hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; }

/* ── 关于 ──────────────────────────────────────────────────────── */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about p { margin-top: 16px; font-size: 17px; color: var(--muted); }
.about .contact { margin-top: 24px; }
.about-art { background: var(--brand-tint); border: 1px solid var(--line); border-radius: 28px; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.about-art svg { width: 60%; height: 60%; color: var(--brand); }

/* ── 页脚 ──────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--muted); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.foot-grid ul { margin-top: 12px; display: grid; gap: 8px; }
.foot-grid a { color: var(--muted); }
.foot-grid a:hover { color: var(--brand-dark); }
.foot-grid .logo { color: var(--brand-deep); }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; }

/* ── 隐私声明页 ────────────────────────────────────────────────── */
.prose { max-width: 760px; margin: 0 auto; padding: 64px 24px; }
.prose h1 { font-size: 36px; color: var(--brand-deep); }
.prose h2 { font-size: 22px; margin-top: 40px; color: var(--brand-deep); }
.prose p, .prose li { margin-top: 12px; color: #3d3833; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose .updated { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ── 响应式 ────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { height: 380px; max-width: 520px; }
  .steps, .plans { grid-template-columns: 1fr; }
  .products { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr; gap: 48px; }
  .about { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 56px; }
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 16px; gap: 2px;
  }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; }
  .lang-btn { align-self: flex-start; margin-top: 8px; }
  .hero-art { height: 340px; }
  .fc-collar, .fc-cam, .fc-alert { width: min(280px, 82%); }
  .fc-cam { top: 130px; }
  .fc-alert { left: 0; }
  .features, .privacy-grid { grid-template-columns: 1fr; }
  .notify { padding: 40px 20px; }
  .notify .row { flex-direction: column; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
