:root {
  --paper: #F6F6F2;
  --card: #FFFFFF;
  --ink: #16191C;
  --ink2: #5A5F63;
  --ink3: #8C9195;
  --line: #E4E5DF;
  --accent: #1D6FB0;
  --accent-soft: #E3F1FC;
  --glow: rgba(116, 200, 255, 0.28);
  --shadow: 0 1px 2px rgba(20, 24, 28, 0.04), 0 8px 24px rgba(20, 24, 28, 0.06);
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color-scheme: light;
}
:root:lang(en) {
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101214;
    --card: #181B1E;
    --ink: #ECEDEA;
    --ink2: #A6AAAD;
    --ink3: #737779;
    --line: #25292C;
    --accent: #74C8FF;
    --accent-soft: #15283A;
    --glow: rgba(116, 200, 255, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101214; --card: #181B1E; --ink: #ECEDEA; --ink2: #A6AAAD; --ink3: #737779;
  --line: #25292C; --accent: #74C8FF; --accent-soft: #15283A; --glow: rgba(116, 200, 255, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
[id] { scroll-margin-top: 80px; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
p { margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }

/* 顶栏 */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: 0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a { color: var(--ink2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; font-size: 13px; }
.lang > * { padding: 2px 10px; border-radius: 999px; }
.lang [aria-current] { background: var(--ink); color: var(--paper); }

/* 首屏 */
.hero { position: relative; padding: 96px 0 72px; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto; height: 520px; z-index: -1;
  background: radial-gradient(60% 60% at 50% 40%, var(--glow), transparent 70%);
}
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); margin-bottom: 20px; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 7.2vw, 60px); letter-spacing: -0.01em; text-wrap: balance; }
:lang(en) .hero h1 { font-weight: 500; }
.hero .lede { max-width: 640px; margin: 22px auto 0; font-size: clamp(16px, 2vw, 19px); color: var(--ink2); }
.icons { display: flex; justify-content: center; gap: 18px; margin-top: 44px; flex-wrap: wrap; }
.icons a { display: block; transition: transform .25s ease; }
.icons a:hover { transform: translateY(-4px); }
.icons img { width: 76px; height: 76px; border-radius: 19px; box-shadow: var(--shadow); }
.icons a:nth-child(odd) img { transform: rotate(-4deg); }
.icons a:nth-child(even) img { transform: rotate(4deg) translateY(6px); }

/* 小节 */
section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3.6vw, 36px); }
:lang(en) .section-head h2 { font-weight: 500; }
.section-head p { margin-top: 10px; color: var(--ink2); }

/* 产品卡片 */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px; border-radius: 22px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}
.product:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tint) 45%, var(--line)); }
.product header { display: flex; align-items: center; gap: 14px; }
.product header img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.product h3 { font-size: 20px; }
.product .tag { font-size: 14px; color: var(--ink3); }
.product .desc { color: var(--ink2); }
.product ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; color: var(--ink2); }
.product li { position: relative; padding-left: 18px; }
.product li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--tint); }
.product footer { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.platforms { display: flex; gap: 6px; flex-wrap: wrap; }
.platforms span { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink2); }
.go { font-size: 15px; font-weight: 600; color: var(--tint); white-space: nowrap; }
.product:hover .go { text-decoration: underline; text-underline-offset: 3px; }

/* 品牌色：深色模式下提亮 */
.p-ambrio { --tint: #2E5E4E; }
.p-wiki   { --tint: #3F8A72; }
.p-prek   { --tint: #1D6FB0; }
.p-book   { --tint: #B5762A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .p-ambrio { --tint: #7FB8A4; }
  :root:not([data-theme="light"]) .p-wiki   { --tint: #6FC2A6; }
  :root:not([data-theme="light"]) .p-prek   { --tint: #74C8FF; }
  :root:not([data-theme="light"]) .p-book   { --tint: #E0A85E; }
}
:root[data-theme="dark"] .p-ambrio { --tint: #7FB8A4; }
:root[data-theme="dark"] .p-wiki   { --tint: #6FC2A6; }
:root[data-theme="dark"] .p-prek   { --tint: #74C8FF; }
:root[data-theme="dark"] .p-book   { --tint: #E0A85E; }

/* 原则 */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.principle { padding-top: 18px; border-top: 2px solid var(--ink); }
.principle h3 { font-size: 18px; margin-bottom: 8px; }
.principle p { color: var(--ink2); font-size: 15px; }

/* 联系 */
.contact { text-align: center; padding: 72px 0 88px; }
.contact .box { max-width: 640px; margin: 0 auto; padding: 44px 28px; border-radius: 26px; background: var(--accent-soft); }
.contact h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3.2vw, 32px); }
:lang(en) .contact h2 { font-weight: 500; }
.contact p { margin-top: 10px; color: var(--ink2); }
.btn { display: inline-block; margin-top: 22px; padding: 11px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; }
.btn:hover { opacity: .88; }

/* 页脚 */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--ink3); }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--ink2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 12px; padding: 24px; }
.notfound h1 { font-family: var(--serif); font-size: 40px; }
.notfound p { color: var(--ink2); }

@media (max-width: 820px) {
  .products, .principles { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 16px; }
  .top nav { gap: 14px; }
  .hero { padding: 64px 0 48px; }
  .hero h1 br { display: none; }
  .icons { gap: 12px; }
  .icons img { width: 60px; height: 60px; border-radius: 15px; }
  .product { padding: 22px; }
  section { padding: 48px 0; }
}
