/* 0o0.market · 智能穿戴工具箱
   视觉沿用 0o0 的 Material 3 令牌：扁平、无渐变、无光晕；
   主色 #FFD24A，容器 #1a1e25，描边 #2b313a，底色 #0f1115。
   ========================================================================== */

:root {
  --bg: #0f1115;
  --ink: #e4e7ee;
  --muted: #aab2bf;
  --dim: #7a8494;
  --line: #2b313a;
  --line-strong: #3a4250;
  --primary: #FFD24A;
  --primary-rgb: 255, 210, 74;
  --container: #1a1e25;
  --container-hover: #20252d;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --max: 1040px;
}

* { box-sizing: border-box; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(var(--primary-rgb), .28); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(8px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand-logo { width: 32px; height: 32px; border-radius: 50%; }
.brand-name { font-size: 16px; font-weight: 600; line-height: 1; }
.brand-tag { color: var(--dim); font-size: 13px; font-weight: 500; line-height: 1; }
.brand-tag::before { content: "/"; margin-right: 6px; opacity: .55; }

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.topnav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  transition: color 160ms var(--ease-emphasized), background-color 160ms var(--ease-emphasized);
}
.topnav a:hover { color: var(--ink); background: var(--container); }

/* ---------- 首屏 ---------- */

.hero { padding: 64px 0 8px; }
.hero-mark { width: 68px; height: 68px; border-radius: 50%; margin-bottom: 24px; }
.hero h1 {
  margin: 0;
  font-size: clamp(32px, 1.4rem + 3.4vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.02em;
}
.hero h1 .dot { color: var(--primary); }
.hero-lead {
  max-width: 34em;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1rem + .2vw, 17px);
  line-height: 1.7;
  text-wrap: pretty;
}
.hero-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.hero-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--container);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 160ms var(--ease-emphasized), background-color 160ms var(--ease-emphasized);
}
.hero-jump a:hover { border-color: var(--line-strong); background: var(--container-hover); }
.hero-jump svg { width: 16px; height: 16px; color: var(--primary); flex: none; }

/* ---------- 区块 ---------- */

.section { padding: 56px 0 0; }
.section-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.section-head h2 {
  margin: 0;
  font-size: clamp(21px, 1.1rem + .7vw, 26px);
  font-weight: 600;
  letter-spacing: -.01em;
}
.section-head .count {
  color: var(--dim);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}
.section-note {
  max-width: 40em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  text-wrap: pretty;
}

.group { margin-top: 28px; }
.group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}
.group-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- 卡片网格 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 16px 44px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--container);
  transition: border-color 160ms var(--ease-emphasized), background-color 160ms var(--ease-emphasized), transform 160ms var(--ease-emphasized);
}
.card:not(a) { padding-right: 16px; }

a.card:hover,
a.card:focus-visible {
  border-color: rgba(var(--primary-rgb), .5);
  background: var(--container-hover);
  transform: translateY(-2px);
}
a.card:focus-visible { outline-offset: 0; }

.card-name {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
}
.card-badge {
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid rgba(var(--primary-rgb), .35);
  border-radius: 4px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 500;
  vertical-align: 1px;
}
.card-desc {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.card-host {
  margin-top: 8px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: .01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 16px;
  height: 16px;
  color: var(--dim);
  transition: color 160ms var(--ease-emphasized), transform 160ms var(--ease-emphasized);
}
a.card:hover .card-arrow,
a.card:focus-visible .card-arrow { color: var(--primary); transform: translate(2px, -2px); }

/* 鸿蒙资源卡：带一排小标签 */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.5;
}

/* ---------- 引导条 ---------- */

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--container);
}
.cta p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.cta p strong { color: var(--ink); font-weight: 600; }
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #1a1500;
  font-size: 14px;
  font-weight: 600;
  transition: filter 160ms var(--ease-emphasized);
}
.cta-link:hover { filter: brightness(1.06); }
.cta-link svg { width: 16px; height: 16px; }

/* ---------- 页脚 ---------- */

.foot {
  margin-top: 72px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  color: var(--dim);
  font-size: 13px;
}
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.foot-links span { color: var(--muted); }
.foot-links a { color: var(--muted); transition: color 160ms var(--ease-emphasized); }
.foot-links a:hover { color: var(--primary); }

/* ---------- 入场 ---------- */

.reveal {
  animation: reveal 360ms var(--ease-emphasized) both;
  animation-delay: var(--d, 0s);
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 小屏 ---------- */

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .topbar-inner { height: 58px; gap: 10px; }
  .brand-tag { display: none; }
  .topnav a { padding: 7px 9px; font-size: 13px; }
  .hero { padding: 40px 0 4px; }
  .hero-mark { width: 56px; height: 56px; margin-bottom: 20px; }
  .section { padding-top: 44px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .card { padding: 14px 38px 14px 14px; border-radius: 10px; }
  .card-desc { font-size: 13px; }
  .foot { margin-top: 52px; }
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- 横屏矮窗口 ---------- */

@media (max-height: 560px) and (orientation: landscape) {
  .hero { padding-top: 28px; }
  .hero-mark { width: 44px; height: 44px; margin-bottom: 14px; }
  .section { padding-top: 36px; }
}

/* ---------- 降低动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
