/* ==========================================================================
   28圈 · 圈大屏共享外壳样式  /assets/site.css
   暖纸蓝图 × 湖蓝暮紫 × 经幡点缀
   ========================================================================== */

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

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

body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }

:root {
  /* 色彩体系 */
  --paper: #F7F2E8;
  --paper-2: #EFE7D8;
  --card: #FFFCF5;
  --ink: #171A1F;
  --ink-soft: #3E464F;
  --ink-mute: #7C8AA0;
  --lake: #1677B8;
  --dusk: #5B4B8A;
  --flame: #E4572E;
  --saffron: #F2B230;
  --jade: #2FA39A;
  --blueprint: #CBD7E6;

  /* 形状与节奏 */
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --shell: 1240px;
  --shadow-card: 0 26px 60px -46px rgba(23, 26, 31, .75);
  --shadow-float: 0 24px 50px -34px rgba(23, 26, 31, .55);

  /* 字体 */
  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --font-module: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "HarmonyOS Sans SC", "MiSans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   1. 基础排版 / 蓝图底
   -------------------------------------------------------------------------- */

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(203, 215, 230, .30) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 215, 230, .30) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: center top;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (max-width: 720px) {
  body { background-size: 56px 56px; }
}

::selection { background: rgba(22, 119, 184, .22); color: var(--ink); }

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

h1, h2, h3, h4 { color: var(--ink); letter-spacing: -.01em; }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3, h4 {
  font-family: var(--font-module);
  font-weight: 700;
  line-height: 1.35;
}
h3 { font-size: clamp(1.18rem, 1.7vw, 1.45rem); }
h4 { font-size: 1.02rem; }

p { line-height: 1.78; }

strong { font-weight: 700; }

/* --------------------------------------------------------------------------
   2. 跳转链接 / 滚动进度
   -------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: .7rem;
  left: .7rem;
  z-index: 140;
  transform: translateY(-180%);
  padding: .6rem 1.05rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-module);
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-float);
  transition: transform .22s ease;
}
.skip-link:focus { transform: none; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 90;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--lake) 0%, var(--dusk) 42%, var(--flame) 76%, var(--saffron) 100%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   3. 悬浮胶囊头部
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: .85rem clamp(.9rem, 3vw, 2rem) 0;
  pointer-events: none;
}

.header-shell {
  position: relative;
  pointer-events: auto;
  width: min(var(--shell), 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .5rem .45rem 1rem;
  background: rgba(247, 242, 232, .90);
  border: 1px solid var(--blueprint);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  flex: 0 0 auto;
  padding: .12rem 0;
  text-decoration: none;
}

.brand-ring {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: conic-gradient(from 210deg,
    var(--lake) 0 30%,
    var(--dusk) 30% 55%,
    var(--flame) 55% 74%,
    var(--saffron) 74% 89%,
    var(--jade) 89% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px));
  animation: ring-spin 16s linear infinite;
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.14;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .13em;
  color: var(--ink-mute);
}

/* 主导航 */
.nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: .1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .78rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-module);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background .22s ease, color .22s ease;
}

.nav-link:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.nav-link[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.nav-link[aria-current="page"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--saffron);
}

.nav-extra {
  display: none;
  margin-top: .65rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--blueprint);
}
.nav-extra .btn { width: 100%; }

.header-cta {
  flex: 0 0 auto;
  padding: .62rem 1.1rem;
  font-size: .88rem;
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--blueprint);
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
  transition: background .22s ease, border-color .22s ease;
}
.nav-toggle:hover { border-color: var(--lake); }

.nav-toggle-bar {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .26s ease, opacity .2s ease;
}

.site-header[data-open="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   4. 按钮 / 胶囊标签
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .74rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-module);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .24s ease, color .24s ease, border-color .24s ease, transform .2s ease;
}

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--lake); }

.btn-accent { background: var(--flame); color: #FFF8F2; font-weight: 700; }
.btn-accent:hover { background: #C9441F; }

.btn-ghost {
  background: transparent;
  border-color: var(--blueprint);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .3rem .72rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--blueprint);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.6;
  text-transform: uppercase;
}

.pill--lake { background: rgba(22, 119, 184, .12); border-color: rgba(22, 119, 184, .34); color: var(--lake); }
.pill--dusk { background: rgba(91, 75, 138, .12); border-color: rgba(91, 75, 138, .34); color: var(--dusk); }
.pill--flame { background: rgba(228, 87, 46, .13); border-color: rgba(228, 87, 46, .34); color: #C9441F; }
.pill--jade { background: rgba(47, 163, 154, .14); border-color: rgba(47, 163, 154, .36); color: #25837C; }
.pill--saffron { background: rgba(242, 178, 48, .18); border-color: rgba(242, 178, 48, .42); color: #9A6B00; }

/* --------------------------------------------------------------------------
   5. 页面容器 / 网格 / 通用组件
   -------------------------------------------------------------------------- */

.wrap {
  width: min(var(--shell), 100% - 2.4rem);
  margin-inline: auto;
}

.section { padding: clamp(2.4rem, 6vw, 5rem) 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--lake);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.lede {
  max-width: 48ch;
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  line-height: 1.85;
  color: var(--ink-soft);
}

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  position: relative;
  padding: clamp(1.2rem, 2vw, 1.7rem);
  background: var(--card);
  border: 1px solid var(--blueprint);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color .24s ease, transform .24s ease;
}
.card:hover { border-color: var(--lake); transform: translateY(-2px); }

.prose {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.prose p + p { margin-top: 1.05em; }
.prose h2 { margin-top: 2.2em; margin-bottom: .6em; }
.prose h3 { margin-top: 1.8em; margin-bottom: .5em; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .45rem; }
.prose a { color: var(--lake); text-underline-offset: 3px; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .1rem;
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--ink-mute);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin: 0 .5rem;
  color: var(--blueprint);
}
.breadcrumb a {
  color: var(--ink-mute);
  text-decoration: none;
  transition: color .2s ease;
}
.breadcrumb a:hover { color: var(--lake); }
.breadcrumb [aria-current="page"] { color: var(--ink); }

/* 图片容器基础规则 —— 页面阶段把 img / svg 放进来即可 */
.figure-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--blueprint);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(70% 90% at 18% 8%, rgba(91, 75, 138, .22), transparent 62%),
    radial-gradient(60% 80% at 88% 12%, rgba(22, 119, 184, .22), transparent 60%),
    linear-gradient(150deg, var(--paper-2), #E4EDF6);
}
.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(203, 215, 230, .5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 215, 230, .5) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.figure-frame > img,
.figure-frame > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-frame--wide { aspect-ratio: 21 / 9; }
.figure-frame--square { aspect-ratio: 1 / 1; }
.figure-frame--tall { aspect-ratio: 4 / 5; }

.figure-frame__caption {
  margin-top: .7rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--ink-mute);
}

/* 进场显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   6. 页脚
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(3.5rem, 9vw, 7rem);
  padding: clamp(2.4rem, 5.5vw, 4rem) 0 1.4rem;
  background-color: var(--ink);
  background-image:
    radial-gradient(62% 82% at 12% 0%, rgba(91, 75, 138, .85), transparent 62%),
    radial-gradient(54% 74% at 88% 4%, rgba(22, 119, 184, .70), transparent 60%),
    radial-gradient(42% 62% at 50% 118%, rgba(47, 163, 154, .34), transparent 70%);
  color: rgba(247, 242, 232, .82);
  border-radius: clamp(26px, 4vw, 52px) clamp(26px, 4vw, 52px) 0 0;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(203, 215, 230, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 215, 230, .07) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

.footer-shell {
  position: relative;
  z-index: 1;
  width: min(var(--shell), 100% - 2.4rem);
  margin-inline: auto;
}

.footer-grid {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
  grid-template-columns: minmax(230px, 1.35fr) 1fr 1fr minmax(220px, 1.15fr);
}

.footer-lead { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 20px;
  border: 1px solid rgba(247, 242, 232, .22);
  background: linear-gradient(145deg, rgba(22, 119, 184, .95), rgba(91, 75, 138, .95));
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--paper);
}

.footer-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.footer-brand-text strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--paper);
  letter-spacing: .02em;
}
.footer-brand-text em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: .68rem;
  letter-spacing: .16em;
  color: rgba(247, 242, 232, .6);
}

.footer-note {
  max-width: 32ch;
  font-size: .92rem;
  line-height: 1.8;
  color: rgba(247, 242, 232, .68);
}

.footer-col { display: block; }

.footer-col-title {
  margin-bottom: .9rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--saffron);
}

.footer-links {
  display: grid;
  gap: .55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .93rem;
  color: rgba(247, 242, 232, .78);
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}
.footer-links a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
  opacity: .45;
  transition: opacity .2s ease, transform .2s ease;
}
.footer-links a:hover { color: var(--paper); transform: translateX(2px); }
.footer-links a:hover::before { opacity: 1; }

.contact-list {
  display: grid;
  gap: .85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-list li { display: grid; gap: .18rem; }

.contact-key {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(242, 178, 48, .9);
}

.contact-val {
  font-family: var(--font-module);
  font-size: .95rem;
  font-weight: 500;
  color: var(--paper);
  word-break: break-word;
}

.contact-note {
  margin-top: 1rem;
  padding-left: .8rem;
  border-left: 2px solid rgba(228, 87, 46, .7);
  font-size: .8rem;
  line-height: 1.75;
  color: rgba(247, 242, 232, .55);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.4rem;
  margin-top: clamp(1.8rem, 4vw, 3rem);
  padding-top: 1.15rem;
  border-top: 1px solid rgba(247, 242, 232, .14);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: rgba(247, 242, 232, .55);
}
.footer-copy, .footer-icp { margin: 0; }

/* --------------------------------------------------------------------------
   7. 返回顶部
   -------------------------------------------------------------------------- */

.backtop {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .62rem 1.1rem;
  border: 1px solid var(--blueprint);
  border-radius: var(--radius-pill);
  background: rgba(247, 242, 232, .94);
  color: var(--ink);
  font-family: var(--font-module);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: 0 20px 40px -26px rgba(23, 26, 31, .8);
  transition: opacity .28s ease, transform .28s ease, visibility .28s, background .24s ease, color .24s ease;
}
.backtop.is-visible { opacity: 1; visibility: visible; transform: none; }
.backtop:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* --------------------------------------------------------------------------
   8. 响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .footer-grid { grid-template-columns: minmax(200px, 1.2fr) 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
  .nav-link { padding: .48rem .62rem; font-size: .85rem; }
}

@media (max-width: 980px) {
  .nav {
    position: absolute;
    top: calc(100% + .6rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: .7rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    background: rgba(252, 249, 242, .98);
    border: 1px solid var(--blueprint);
    border-radius: var(--radius-lg);
    box-shadow: 0 36px 72px -42px rgba(23, 26, 31, .8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .24s ease, transform .24s ease, visibility .24s;
  }
  .site-header[data-open="true"] .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: .2rem; }
  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: .72rem .9rem;
    border-radius: var(--radius-md);
    font-size: .95rem;
  }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .header-cta { margin-left: auto; }
  .footer-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .footer-lead { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .site-header { padding: .7rem .7rem 0; }
  .header-shell { padding: .4rem .42rem .4rem .85rem; }
  .brand-sub { display: none; }
  .header-cta { display: none; }
  .nav-extra { display: block; }
  .wrap, .footer-shell { width: min(var(--shell), 100% - 1.7rem); }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   9. 动效降级
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .brand-ring { animation: none; }
  .card:hover { transform: none; }
}
