/* =============================================================================
   萌宠芯 iPetCore — 官方网站样式表
   配色沿用产品设计系统（docs/PRD/app/visual_design_system.md §2）的暖色语义 token：
   奶油底 / 暖浓咖正文 / 陶土主色；暗色为暖棕近黑底 + 杏色。
   无外部字体与脚本依赖（中国大陆网络环境下不引用境外 CDN）。
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  --canvas:        #FAF5EE;
  --canvas-deep:   #F4EDE3;
  --surface:       #FFFFFF;
  --surface-muted: #F4EDE3;
  --surface-brand: #F7E8D5;
  --on-surface-brand: #6B3A17;

  --text-primary:   #35271C;
  --text-secondary: #6D5B4A;
  --text-tertiary:  #7C6A58;

  --brand:        #A8552F;
  --brand-strong: #8A4526;
  --on-brand:     #FFFFFF;

  --border:        #E7DDD0;
  --border-strong: #D8C9B4;
  --focus:         #B45309;

  --ok:      #2F6F6B;
  --ok-bg:   #E4F0EE;

  --maxw:   1120px;
  --gutter: clamp(20px, 5vw, 40px);

  --radius:    22px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(53, 39, 28, .05);
  --shadow-md: 0 10px 30px rgba(53, 39, 28, .07);
  --shadow-lg: 0 24px 60px rgba(53, 39, 28, .10);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
    "Noto Sans CJK SC", "WenQuanYi Micro Hei", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas:        #1D140E;
    --canvas-deep:   #171009;
    --surface:       #261B13;
    --surface-muted: #2C2016;
    --surface-brand: #3A2A1B;
    --on-surface-brand: #E89A62;

    --text-primary:   #F7EFE6;
    --text-secondary: #CBB8A5;
    --text-tertiary:  #A8937E;

    --brand:        #E89A62;
    --brand-strong: #F2AE7C;
    --on-brand:     #1D140E;

    --border:        #3D2C1E;
    --border-strong: #4E3928;
    --focus:         #E89A62;

    --ok:    #7FC8BE;
    --ok-bg: #16302D;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .40);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .50);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 { line-height: 1.28; margin: 0; font-weight: 700; letter-spacing: .01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--on-brand);
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 72px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; flex-shrink: 0;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-cn {
  font-size: 17px; font-weight: 700; letter-spacing: .10em;
  color: var(--text-primary);
}
.brand-en {
  font-size: 10px; font-weight: 700; letter-spacing: .30em;
  color: var(--brand); text-transform: uppercase;
}

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: inline-block; padding: 9px 14px; border-radius: var(--radius-pill);
  font-size: 14.5px; letter-spacing: .04em; text-decoration: none;
  color: var(--text-secondary);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.site-nav a:hover { color: var(--text-primary); background: var(--surface-muted); }
.site-nav a[aria-current="page"] { color: var(--on-surface-brand); background: var(--surface-brand); font-weight: 600; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text-primary);
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--canvas); border-bottom: 1px solid var(--border);
    padding: 10px var(--gutter) 18px;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 14px; font-size: 16px; border-radius: var(--radius-sm); }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 28px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; letter-spacing: .05em;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-2px); }
.btn-ghost { background: var(--surface); color: var(--text-primary); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- 通用区块 ---------- */
.section { padding: clamp(64px, 9vw, 104px) 0; }
.section-tint { background: var(--canvas-deep); }
.section-line { border-top: 1px solid var(--border); }

.eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .22em;
  color: var(--brand); text-transform: uppercase;
}
.section-head { max-width: 46em; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 {
  font-size: clamp(26px, 3.6vw, 38px); letter-spacing: .02em;
  margin-bottom: 16px;
}
.section-head p { color: var(--text-secondary); font-size: 17px; }
.section-head.center { margin-inline: auto; text-align: center; }

.lede { font-size: 18px; color: var(--text-secondary); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(64px, 10vw, 116px) 0 clamp(48px, 6vw, 72px);
}
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 720px;
  background: radial-gradient(50% 60% at 50% 40%,
    color-mix(in srgb, var(--surface-brand) 90%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }

.hero-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 18px; margin-bottom: 30px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 13px; letter-spacing: .12em; color: var(--text-secondary);
}
.hero-chip .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(52px, 11vw, 104px);
  letter-spacing: .06em; font-weight: 800; line-height: 1.02;
}
.hero-latin {
  margin-top: 10px;
  font-size: clamp(19px, 3.2vw, 32px);
  font-weight: 700; letter-spacing: .34em; color: var(--brand);
  text-transform: uppercase;
}
.hero-lede {
  margin-top: 30px; max-width: 34em;
  font-size: clamp(16.5px, 2vw, 19px); color: var(--text-secondary);
}
.hero-lede strong { color: var(--text-primary); font-weight: 650; }
.hero .btn-row { margin-top: 38px; }

/* 首屏图带 */
.hero-band { padding: 0 0 clamp(56px, 8vw, 88px); }
.hero-band figure {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.hero-band img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-band figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: clamp(28px, 5vw, 48px);
  background: linear-gradient(to top, rgba(32, 20, 10, .82), rgba(32, 20, 10, .35) 55%, transparent);
  color: #FBF6EF;
}
.hero-band figcaption h2 { font-size: clamp(20px, 2.6vw, 27px); margin-bottom: 8px; }
.hero-band figcaption p { font-size: 15.5px; opacity: .92; max-width: 40em; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(272px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(228px, 100%), 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(26px, 3vw, 34px);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              border-color .22s var(--ease);
}
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 20px;
  border-radius: 13px; background: var(--surface-brand); color: var(--on-surface-brand);
}
.card-icon svg { width: 23px; height: 23px; }
.card h3 { font-size: 17.5px; margin-bottom: 10px; letter-spacing: .04em; }
.card p { color: var(--text-secondary); font-size: 15px; }

.card-link { display: block; text-decoration: none; }
.card-link:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong);
}
.card-more {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 18px;
  font-size: 14px; font-weight: 650; color: var(--brand);
}
.card-more svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.card-link:hover .card-more svg { transform: translateX(3px); }

/* 产品卡 */
.product-card {
  overflow: hidden; padding: 0;
  display: flex; flex-direction: column;
}
.product-card figure {
  margin: 0; background: var(--surface-muted);
  aspect-ratio: 1 / 1; overflow: hidden;
}
.product-card figure img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.card-link:hover .product-card figure img { transform: scale(1.035); }
.product-card .pc-body { padding: clamp(22px, 2.6vw, 30px); flex: 1; display: flex; flex-direction: column; }
.product-card .pc-tag {
  display: inline-block; margin-bottom: 12px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .18em;
  color: var(--text-tertiary); text-transform: uppercase;
}
.product-card h3 { font-size: 19px; margin-bottom: 8px; }
.product-card p { color: var(--text-secondary); font-size: 14.5px; }

/* ---------- 功能列表 ---------- */
.feature-list { display: grid; gap: 14px; }
.feature-list li {
  display: grid; grid-template-columns: 26px 1fr; gap: 14px;
  align-items: start; font-size: 15.5px; color: var(--text-secondary);
}
.feature-list svg { width: 20px; height: 20px; margin-top: 4px; color: var(--brand); }
.feature-list strong { color: var(--text-primary); font-weight: 650; }

/* ---------- 步骤 ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 58px 1fr; gap: 22px;
  padding: 26px 0; border-bottom: 1px dashed var(--border);
}
.step:last-child { border-bottom: 0; }
.step-num {
  counter-increment: step;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--brand);
  padding-top: 5px;
}
.step-num::before { content: "0" counter(step); }
.step h3 { font-size: 17px; margin-bottom: 7px; letter-spacing: .04em; }
.step p { color: var(--text-secondary); font-size: 15px; }

/* ---------- 手机截图 ---------- */
.phone {
  width: 100%; max-width: 296px; margin-inline: auto;
  border-radius: 30px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.phone img { width: 100%; }

.phone-row {
  display: grid; gap: clamp(28px, 5vw, 56px);
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  align-items: start;
}

.split {
  display: grid; gap: clamp(32px, 6vw, 72px);
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  align-items: center;
}
.split-media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
}
.split-media img { width: 100%; }

/* ---------- 规格表 ---------- */
.spec-table {
  width: 100%; border-collapse: collapse; font-size: 15px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.spec-table caption {
  text-align: left; padding: 0 0 14px; font-size: 13px;
  letter-spacing: .16em; color: var(--text-tertiary); text-transform: uppercase;
}
.spec-table th, .spec-table td {
  padding: 15px 22px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  width: 34%; font-weight: 650; color: var(--text-primary);
  background: var(--surface-muted); white-space: nowrap;
}
.spec-table td { color: var(--text-secondary); }

/* ---------- 徽标 / 提示 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 650; letter-spacing: .06em;
}
.badge-dev { background: var(--surface-brand); color: var(--on-surface-brand); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }

.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--brand);
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 22px 26px; color: var(--text-secondary); font-size: 14.5px;
}
.callout strong { color: var(--text-primary); }
.callout + .callout { margin-top: 14px; }

/* ---------- 产品切换条 ---------- */
.product-nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}
.product-nav ul {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 0;
}
.product-nav a {
  display: inline-block; padding: 8px 16px; border-radius: var(--radius-pill);
  font-size: 14px; text-decoration: none; color: var(--text-secondary);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.product-nav a:hover { background: var(--surface); color: var(--text-primary); }
.product-nav a[aria-current="page"] {
  background: var(--surface-brand); color: var(--on-surface-brand); font-weight: 650;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--canvas-deep);
  padding: clamp(48px, 6vw, 72px) 0 40px;
  margin-top: clamp(56px, 8vw, 96px);
  font-size: 14px;
}
.footer-top {
  display: flex; flex-wrap: wrap; gap: 28px 48px;
  justify-content: space-between; align-items: flex-start;
  padding-bottom: 34px; border-bottom: 1px solid var(--border);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 50%; }
.footer-brand .fb-name { display: flex; flex-direction: column; line-height: 1.3; }
.footer-brand .fb-cn { font-size: 16px; font-weight: 700; letter-spacing: .10em; }
.footer-brand .fb-en { font-size: 10px; font-weight: 700; letter-spacing: .28em; color: var(--brand); text-transform: uppercase; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer-nav a { text-decoration: none; color: var(--text-secondary); transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--brand); }

.footer-legal { padding-top: 30px; color: var(--text-tertiary); line-height: 2; }
.footer-legal strong { color: var(--text-secondary); font-weight: 650; }
.footer-legal a { color: var(--text-secondary); text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.footer-legal a:hover { color: var(--brand); border-color: var(--brand); }
.footer-legal .legal-sep { margin: 0 10px; opacity: .5; }

.footer-disclaimer {
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-tertiary); max-width: 62em;
}

/* ---------- 页内锚点导航 ---------- */
.anchor-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.anchor-nav a {
  padding: 7px 15px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13.5px; text-decoration: none; color: var(--text-secondary);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.anchor-nav a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 工具类 ---------- */
.mt-s { margin-top: 14px; }
.mt-m { margin-top: 26px; }
.mt-l { margin-top: 44px; }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.measure { max-width: 44em; }

/* ---------- 窄屏：规格表改为堆叠 ---------- */
@media (max-width: 620px) {
  .spec-table { border: 0; background: transparent; }
  .spec-table, .spec-table tbody, .spec-table tr, .spec-table th, .spec-table td {
    display: block; width: auto;
  }
  .spec-table tr {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 15px 18px; margin-bottom: 10px;
  }
  .spec-table caption { padding-bottom: 12px; }
  .spec-table th, .spec-table td {
    border: 0; padding: 0; white-space: normal;
    overflow-wrap: anywhere; word-break: break-word;
  }
  .spec-table th {
    width: auto; background: transparent;
    font-size: 12px; font-weight: 700; letter-spacing: .12em;
    color: var(--text-tertiary); text-transform: uppercase;
    margin-bottom: 5px;
  }
  .spec-table td { font-size: 15.5px; color: var(--text-primary); }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .card-link:hover, .btn:hover { transform: none; }
}
