/* ==========================================================================
   贝博平台入口 — /assets/site.css
   共享外壳：reset、变量、中文排版、悬浮胶囊头部、三栏页脚、通用组件
   ========================================================================== */

/* --- 1. 变量 ------------------------------------------------------------- */
:root {
  --deep: #0B2A4A;
  --tide: #1E5B8F;
  --mother: #F4F1E8;
  --paper: #FFFDF8;
  --ink: #1C1A18;
  --coral: #FF6B3D;
  --coral-deep: #E4572E;
  --celadon: #2E9E8F;
  --celadon-light: #8FD8CE;
  --mist: #C9CBD3;

  --grad-tide: linear-gradient(120deg, #0B2A4A 0%, #1E5B8F 52%, #2E9E8F 100%);
  --grad-wick: linear-gradient(90deg, #FF6B3D 0%, #E4572E 100%);

  --shell: 1180px;
  --gutter: 24px;
  --cut-size: 18px;

  --line: rgba(201, 203, 211, .72);
  --line-soft: rgba(201, 203, 211, .42);
  --on-deep: rgba(244, 241, 232, .82);
  --on-deep-dim: rgba(244, 241, 232, .58);

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "Source Han Sans CN",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, "Liberation Mono", monospace;

  --shadow-float: 0 16px 38px -22px rgba(11, 42, 74, .58);
  --shadow-panel: 0 26px 52px -30px rgba(11, 42, 74, .55);
}

/* --- 2. Reset ------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--mother);
  background-image:
    radial-gradient(1200px 520px at 88% -10%, rgba(46, 158, 143, .11), transparent 62%),
    radial-gradient(920px 460px at -8% 14%, rgba(30, 91, 143, .10), transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.85;
  letter-spacing: .012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* --- 3. 中文排版 --------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--deep);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.14; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.12rem, 1.6vw, 1.35rem); }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--tide); text-decoration: none; }
a:hover { color: var(--coral-deep); }

strong { font-weight: 800; color: var(--deep); }

::selection { background: rgba(255, 107, 61, .24); color: var(--deep); }

:focus-visible {
  outline: 2px solid var(--celadon);
  outline-offset: 3px;
}
.site-footer :focus-visible { outline-color: var(--celadon-light); }

/* --- 4. 通用基元 --------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: .02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--celadon);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--grad-wick);
  flex: 0 0 22px;
}

.section-title {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 2px;
  background: var(--coral);
}

.lede {
  max-width: 62ch;
  font-size: 1.06rem;
  line-height: 1.9;
  color: #2f3a44;
}

.hairline {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line-soft);
}

.stack > * + * { margin-top: 20px; }

.grid {
  display: grid;
  gap: 22px;
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* --- 5. 按钮与标签 ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  background: none;
  transition: transform .18s ease, background-color .18s ease,
    color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--solid {
  background-image: var(--grad-wick);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(228, 87, 46, .9);
}
.btn--solid:hover { color: #fff; box-shadow: 0 16px 30px -14px rgba(228, 87, 46, .95); }

.btn--ghost {
  border-color: rgba(11, 42, 74, .28);
  color: var(--deep);
  background: rgba(255, 253, 248, .7);
}
.btn--ghost:hover { border-color: var(--coral); color: var(--coral-deep); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(46, 158, 143, .14);
  color: #1f6f65;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .05em;
  white-space: nowrap;
}
.chip--coral { background: rgba(255, 107, 61, .16); color: var(--coral-deep); }
.chip--celadon { background: rgba(46, 158, 143, .16); color: #1f6f65; }
.chip--mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* --- 6. 形状基元 --------------------------------------------------------- */
.cut-frame,
.cut-panel {
  --cut-size: 18px;
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut-size)) 0,
    100% var(--cut-size),
    100% 100%,
    0 100%
  );
}

.cut-panel {
  padding: 26px 28px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
}

/* --- 7. 可复用图片容器 --------------------------------------------------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background-color: #E9EEF1;
  background-image: var(--grad-tide);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut-size)) 0,
    100% var(--cut-size),
    100% 100%,
    0 100%
  );
}
.media-frame > img,
.media-frame > svg,
.media-frame > picture { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* --- 8. 面包屑 ----------------------------------------------------------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--tide);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--mist);
}
.breadcrumb a {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease, color .18s ease;
}
.breadcrumb a:hover { color: var(--coral-deep); border-bottom-color: var(--coral); }
.breadcrumb [aria-current="page"] { color: var(--ink); }

/* --- 9. 跳至主内容 ------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 300;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  transform: translateY(-180%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); color: var(--paper); }

/* --- 10. 悬浮胶囊头部 ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 12px 16px 8px;
}

.scroll-tide {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background-image: var(--grad-wick);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  pointer-events: none;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 8px 10px 8px 12px;
  background: rgba(255, 253, 248, .9);
  border: 1px solid var(--line);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: box-shadow .22s ease, background-color .22s ease,
    padding .22s ease;
}

.site-header.is-compact .header-inner {
  background: rgba(255, 253, 248, .98);
  box-shadow: var(--shadow-float);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  min-width: 0;
  color: var(--deep);
  text-decoration: none;
}
.brand:hover { color: var(--deep); }

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  background-image: var(--grad-tide);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 58% 100%, 0 100%);
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 9px;
  bottom: 8px;
  width: 15px;
  height: 3px;
  background: var(--coral);
  clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .03em;
  white-space: nowrap;
}
.brand-tagline {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--tide);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.site-nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--deep);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .03em;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.site-nav-link:hover {
  background: rgba(30, 91, 143, .1);
  color: var(--deep);
  transform: translateY(-2px);
}
.site-nav-link[aria-current="page"] {
  background: var(--deep);
  color: var(--paper);
}
.site-nav-link[aria-current="page"]:hover { color: var(--paper); }
.site-nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--coral);
  transform: translateX(-50%);
}

/* 头部动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pocket-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 19px;
  border-radius: 999px;
  background-image: var(--grad-wick);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
  box-shadow: 0 10px 22px -13px rgba(228, 87, 46, .95);
  transition: transform .18s ease, box-shadow .18s ease;
}
.pocket-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 15px 28px -13px rgba(228, 87, 46, .95);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid rgba(143, 216, 206, .34);
  border-radius: 999px;
  background: rgba(255, 253, 248, .1);
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .1em;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.nav-toggle:hover { background: rgba(255, 253, 248, .18); }
.nav-toggle[aria-expanded="true"] {
  background: rgba(255, 107, 61, .22);
  border-color: rgba(255, 107, 61, .55);
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}
.nav-toggle-bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: width .18s ease;
}
.nav-toggle-bars i:last-child { width: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i { width: 16px; }

/* --- 11. 页脚 ------------------------------------------------------------ */
.site-footer {
  position: relative;
  margin-top: 84px;
  background: var(--deep);
  color: var(--on-deep);
}

.footer-tide {
  display: block;
  height: 6px;
  background-image: var(--grad-tide);
}

.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 54px var(--gutter) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr .8fr 1.1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(244, 241, 232, .14);
}

.footer-col { min-width: 0; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--paper);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .04em;
}

.footer-brand-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  background-image: var(--grad-wick);
  clip-path: polygon(0 0, 100% 0, 100% 58%, 56% 100%, 0 100%);
}

.footer-tagline {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--celadon-light);
}

.footer-note {
  max-width: 34ch;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--on-deep-dim);
}

.footer-title {
  margin: 0 0 16px;
  color: var(--celadon-light);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 15px;
}
.footer-list a {
  color: var(--on-deep);
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.footer-list a:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.footer-list--legal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(244, 241, 232, .14);
  font-size: 14px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}
.footer-contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.footer-contact-key {
  flex: 0 0 68px;
  color: var(--celadon-light);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
}
.footer-contact-val {
  color: var(--paper);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 22px 0 34px;
  font-size: 13px;
  color: var(--on-deep-dim);
}
.footer-icp {
  font-family: var(--font-mono);
  letter-spacing: .05em;
}
.footer-copy {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* --- 12. 平板 ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .site-nav-link { padding: 9px 11px; font-size: 14px; }
  .brand-tagline { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-col--brand { grid-column: 1 / -1; }
}

/* --- 13. 小屏：底部悬浮胶囊 ---------------------------------------------- */
@media (max-width: 1000px) {
  body { padding-bottom: 104px; }

  .site-header {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .scroll-tide { display: none; }

  .header-inner {
    gap: 10px;
    padding: 9px 10px 9px 12px;
    background: rgba(11, 42, 74, .96);
    border-color: rgba(143, 216, 206, .24);
    border-radius: 20px;
    box-shadow: 0 20px 44px -20px rgba(11, 42, 74, .9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .site-header.is-compact .header-inner { background: rgba(11, 42, 74, .99); }

  .brand { gap: 9px; }
  .brand-name { color: var(--paper); font-size: 15px; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .brand-mark::after { left: 7px; bottom: 6px; width: 13px; height: 3px; }

  .header-actions { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .pocket-cta { padding: 8px 15px; font-size: 13px; letter-spacing: .05em; }

  .site-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    max-height: min(64vh, 520px);
    overflow-y: auto;
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-panel);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(16px) scale(.985);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    justify-content: flex-start;
  }
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .site-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }
  .site-nav-link {
    display: block;
    padding: 13px 16px;
    border-left: 3px solid transparent;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
  }
  .site-nav-link:hover { transform: none; background: rgba(30, 91, 143, .08); }
  .site-nav-link[aria-current="page"] {
    background: rgba(30, 91, 143, .1);
    color: var(--deep);
    border-left-color: var(--coral);
  }
  .site-nav-link[aria-current="page"]::after { display: none; }

  .site-footer { margin-top: 62px; }
}

/* --- 14. 手机 ------------------------------------------------------------ */
@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.82; }
  :root { --gutter: 18px; --cut-size: 14px; }

  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-inner { padding-top: 42px; }
  .footer-contact-key { flex-basis: 60px; }
  .footer-bottom { padding-bottom: 26px; }

  .pocket-cta { padding: 8px 13px; font-size: 12.5px; }
  .nav-toggle { padding: 8px 12px; }
  .cut-panel { padding: 20px 18px; }
}

/* --- 15. 减少动态效果 ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover,
  .pocket-cta:hover,
  .site-nav-link:hover { transform: none; }
}
