/* ==========================================================================
   必发体验站 · 共享样式表  /assets/site.css
   结构：reset → 令牌 → 排版 → 骨架 → 按钮 → 刊头 → 导航 → 页脚 → 通用件
        → 图片容器 → 目录 → 返回顶部 → 响应式 → 无障碍
   ========================================================================== */

/* --------------------------------------------------------------- 1. reset */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
}

img,
svg,
picture,
video { max-width: 100%; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

ul,
ol { margin: 0; padding: 0; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }

/* ------------------------------------------------------------- 2. 设计令牌 */
:root {
  /* 色彩体系 */
  --ink: #10232B;
  --deep: #063B45;
  --deep-2: #04252C;
  --tide: #0E6A72;
  --glass: #E6F2F1;
  --sand: #FBF6EC;
  --coral: #FF6B4A;
  --gold: #F2B544;
  --wave: #3FD2C7;
  --mist: #7C9BA3;
  --mist-deep: #4A6B72;

  /* 字族 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;

  /* 尺度 */
  --shell: 1180px;
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 88px;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  --shadow-soft: 0 20px 44px -30px rgba(6, 59, 69, .6);
  --shadow-lift: 0 30px 60px -34px rgba(6, 59, 69, .75);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --------------------------------------------------------------- 3. 排版 */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--sand);
  background-image:
    radial-gradient(120% 80% at 88% -10%, rgba(63, 210, 199, .10), transparent 62%),
    radial-gradient(90% 70% at 4% 4%, rgba(242, 181, 68, .09), transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: .01em;
  color: var(--deep);
}

h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: .01em; }
h2 { font-size: clamp(26px, 3.2vw, 40px); }
h3 { font-size: clamp(21px, 2.3vw, 28px); }
h4 { font-size: clamp(18px, 1.6vw, 20px); }

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

a {
  color: var(--tide);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .25s var(--ease);
}

a:hover { color: var(--coral); }

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

code, kbd, samp, .mono, [data-num] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

::selection {
  background: rgba(242, 181, 68, .38);
  color: var(--deep-2);
}

/* --------------------------------------------------------------- 4. 骨架 */
.shell {
  width: min(var(--shell), 100% - clamp(28px, 8vw, 64px));
  margin-inline: auto;
}

.main-content {
  display: block;
  padding-bottom: var(--sp-5);
}

#main-content { scroll-margin-top: 140px; }

.section {
  padding-block: clamp(44px, 6.5vw, 88px);
}

.section--tight { padding-block: clamp(28px, 4vw, 52px); }

.lede {
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.85;
  color: var(--mist-deep);
  max-width: 42ch;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 var(--sp-1);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--tide);
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background-image: linear-gradient(90deg, var(--tide), rgba(14, 106, 114, .12) 55%, transparent);
}

/* --------------------------------------------------------------- 5. 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease),
              color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.btn--coral {
  background: var(--coral);
  color: #2C0C04;
  box-shadow: 0 14px 28px -18px rgba(255, 107, 74, .95);
}

.btn--coral:hover {
  background: #FF8163;
  color: #2C0C04;
  transform: translateY(-2px);
}

.btn--gold {
  background: var(--gold);
  color: #3A2600;
}

.btn--gold:hover {
  background: #FFCB6A;
  color: #3A2600;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(230, 242, 241, .34);
  color: var(--glass);
}

.btn--ghost:hover {
  border-color: var(--wave);
  color: #FFFFFF;
  background: rgba(63, 210, 199, .12);
}

.btn--line {
  background: transparent;
  border-color: rgba(14, 106, 114, .3);
  color: var(--tide);
}

.btn--line:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: rgba(255, 107, 74, .06);
}

.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--full { width: 100%; }

/* ---------------------------------------------------------------- 6. 刊头 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -180%);
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: #2A1B00;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .28s var(--ease);
}

.skip-link:focus { transform: translate(-50%, 0); }

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  overflow: hidden;
  color: var(--glass);
  border-bottom: 1px solid rgba(242, 181, 68, .24);
  background-color: var(--deep);
  background-image:
    radial-gradient(110% 150% at 6% -45%, rgba(63, 210, 199, .22), transparent 58%),
    radial-gradient(95% 130% at 94% -35%, rgba(242, 181, 68, .17), transparent 60%),
    linear-gradient(168deg, #063B45 0%, #0A4E58 52%, #063B45 100%);
  transition: box-shadow .4s var(--ease);
}

.masthead[data-stuck] { box-shadow: 0 24px 48px -34px rgba(4, 37, 44, .95); }

.masthead__aurora {
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: -74px;
  height: 190px;
  pointer-events: none;
  background: radial-gradient(52% 100% at 50% 0%, rgba(63, 210, 199, .26), transparent 72%);
}

.masthead__bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-2);
  padding: clamp(18px, 2.6vw, 30px) 0 12px;
}

.masthead__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: #8FB9BE;
}

.masthead__lang { color: var(--glass); }
.masthead__sep { color: rgba(242, 181, 68, .7); }
.masthead__device { color: var(--gold); }

.brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0 var(--sp-1);
  color: inherit;
  text-decoration: none;
}

.brand:hover { color: inherit; }

.brand__mark {
  display: block;
  width: 38px;
  height: 38px;
  transition: width .4s var(--ease), height .4s var(--ease);
}

.brand__mark svg { display: block; width: 100%; height: 100%; }

.brand__name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.1;
  letter-spacing: .14em;
  text-indent: .14em;
  color: var(--sand);
  transition: font-size .4s var(--ease);
}

.brand__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-indent: .24em;
  color: var(--gold);
  transition: opacity .3s var(--ease);
}

.masthead__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--sp-1);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid rgba(230, 242, 241, .34);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--glass);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}

.nav-toggle:hover { border-color: var(--wave); color: #FFFFFF; }

.nav-toggle[aria-expanded="true"] {
  border-color: var(--wave);
  color: var(--deep);
  background: var(--wave);
}

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* ---------------------------------------------------------------- 7. 导航 */
.masthead__nav {
  position: relative;
  padding: 10px 0 12px;
  border-top: 1px solid rgba(230, 242, 241, .14);
}

.navlist {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(6px, 2vw, 30px);
  list-style: none;
}

.navlist a {
  position: relative;
  display: inline-block;
  padding: 8px 4px;
  font-size: 16px;
  font-weight: 500;
  color: #CBE4E2;
  text-decoration: none;
  transition: color .25s var(--ease);
}

.navlist a::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background-image: linear-gradient(90deg, var(--wave), var(--gold));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s var(--ease);
}

.navlist a:hover,
.navlist a:focus-visible { color: #FFFFFF; }

.navlist a:hover::after,
.navlist a:focus-visible::after { transform: scaleX(1); }

.navlist a[aria-current="page"] { color: #FFFFFF; font-weight: 600; }

.navlist a[aria-current="page"]::after {
  transform: scaleX(1);
  background-image: linear-gradient(90deg, var(--coral), var(--gold));
}

.masthead__quick {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-1);
  padding-bottom: var(--sp-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border: 1px solid rgba(63, 210, 199, .36);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
  color: #9FE3DD;
  text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}

.chip:hover {
  border-color: var(--wave);
  background: rgba(63, 210, 199, .16);
  color: #FFFFFF;
}

/* ---------------------------------------------------------------- 8. 页脚 */
.seafoot {
  position: relative;
  margin-top: clamp(56px, 8vw, 96px);
  overflow: hidden;
  color: #BCD7D7;
  background-color: var(--deep-2);
  background-image:
    radial-gradient(70% 120% at 50% -10%, rgba(63, 210, 199, .16), transparent 66%),
    linear-gradient(180deg, #07434E 0%, #04252C 100%);
}

.seafoot::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background-image: linear-gradient(90deg, transparent, var(--gold), var(--wave), transparent);
  opacity: .75;
}

.seafoot__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 2.2fr 1.15fr;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(40px, 5vw, 64px) 0 clamp(24px, 3vw, 36px);
}

.seafoot__name {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--sand);
}

.seafoot__line {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--wave);
}

.seafoot__addr {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #8FB4B4;
}

.seafoot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}

.seafoot__title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(230, 242, 241, .14);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--gold);
}

.seafoot__list { list-style: none; }

.seafoot__list li { margin-bottom: 9px; }

.seafoot__list a {
  font-size: 14.5px;
  color: #B7D3D3;
  text-decoration: none;
}

.seafoot__list a:hover { color: var(--wave); }

.seafoot__contact p { margin-bottom: 8px; }

.seafoot__mail a,
.seafoot__tel a {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--glass);
  text-decoration: none;
  word-break: break-all;
}

.seafoot__mail a:hover,
.seafoot__tel a:hover { color: var(--coral); }

.seafoot__note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: #7FA6A6;
}

.seafoot__base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(230, 242, 241, .12);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: #7FA6A6;
}

.seafoot__legal { color: var(--gold); }

/* ----------------------------------------------------------- 9. 通用组件 */
.grid { display: grid; gap: var(--sp-3); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  position: relative;
  padding: var(--sp-3);
  border: 1px solid rgba(14, 106, 114, .16);
  border-radius: var(--r-md);
  background: #FFFFFF;
  box-shadow: var(--shadow-soft);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(63, 210, 199, .55);
  box-shadow: var(--shadow-lift);
}

.card--glass {
  background: var(--glass);
  border-color: rgba(14, 106, 114, .2);
}

.card--sand {
  background: var(--sand);
  border-color: rgba(242, 181, 68, .34);
}

.card--deep {
  background-image: linear-gradient(160deg, #0A4E58, #063B45);
  border-color: rgba(63, 210, 199, .28);
  color: var(--glass);
}

.card--deep h2,
.card--deep h3,
.card--deep h4 { color: var(--sand); }

.card__index {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--gold);
}

/* ---------------------------------------------------------- 10. 图片容器 */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--r-md);
  isolation: isolate;
  background-color: var(--tide);
  background-image:
    radial-gradient(120% 120% at 18% 0%, rgba(63, 210, 199, .55), transparent 62%),
    radial-gradient(90% 90% at 92% 100%, rgba(242, 181, 68, .3), transparent 60%),
    linear-gradient(150deg, #0E6A72 0%, #063B45 72%);
}

.media > img,
.media > picture,
.media > svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media--soft { border-radius: var(--r-lg); }

.media--placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(115deg,
    rgba(255, 255, 255, .07) 0 2px,
    transparent 2px 26px);
}

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 40px 18px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--glass);
  background-image: linear-gradient(180deg, transparent, rgba(4, 37, 44, .88));
}

/* -------------------------------------------------------------- 11. 目录 */
.toc {
  padding-left: var(--sp-2);
  border-left: 2px solid rgba(14, 106, 114, .2);
}

.toc__title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--mist);
}

.toc a {
  display: block;
  padding: 7px 0;
  font-size: 14px;
  color: var(--mist-deep);
  text-decoration: none;
  transition: color .25s var(--ease), padding-left .25s var(--ease);
}

.toc a:hover { color: var(--tide); }

.toc a[data-active] {
  padding-left: 8px;
  color: var(--coral);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--coral);
}

@media (min-width: 901px) {
  .toc--sticky {
    position: sticky;
    top: 110px;
  }
}

/* --------------------------------------------------------- 12. 返回顶部 */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(63, 210, 199, .55);
  border-radius: 50%;
  background: rgba(6, 59, 69, .94);
  color: var(--wave);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s var(--ease),
              border-color .25s var(--ease), color .25s var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ----------------------------------------------------------- 13. 响应式 */
@media (max-width: 1080px) {
  .seafoot__inner { grid-template-columns: 1fr 1fr; }
  .seafoot__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  body { font-size: 16px; }

  .masthead__bar {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 14px 0 8px;
  }

  .masthead__meta { display: none; }

  .brand {
    justify-items: start;
    gap: 2px;
    padding: 0;
  }

  .brand__mark { display: none; }

  .brand__name {
    font-size: 21px;
    letter-spacing: .1em;
    text-indent: .1em;
  }

  .brand__tag {
    font-size: 10px;
    letter-spacing: .18em;
    text-indent: .18em;
  }

  .nav-toggle { display: inline-flex; }
  .btn--sm { padding: 9px 14px; font-size: 13px; }

  .masthead__nav {
    display: none;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
  }

  .masthead__nav[data-open] {
    display: block;
    padding-bottom: var(--sp-2);
    border-top-color: rgba(63, 210, 199, .3);
  }

  .navlist {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
  }

  .navlist li { border-bottom: 1px solid rgba(230, 242, 241, .1); }

  .navlist a {
    display: block;
    padding: 14px 6px;
    font-size: 16px;
  }

  .navlist a::after { display: none; }

  .navlist a[aria-current="page"] {
    padding-left: 14px;
    box-shadow: inset 3px 0 0 var(--coral);
    background: rgba(255, 107, 74, .08);
  }

  .masthead__quick {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .masthead__quick::-webkit-scrollbar { display: none; }

  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }

  .seafoot__inner { grid-template-columns: 1fr; }

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

  .seafoot__base { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 901px) {
  .masthead[data-stuck] .masthead__bar { padding: 10px 0 6px; }

  .masthead[data-stuck] .brand__mark {
    width: 26px;
    height: 26px;
  }

  .masthead[data-stuck] .brand__name { font-size: 20px; }

  .masthead[data-stuck] .brand__tag { display: none; }

  .masthead[data-stuck] .navlist a {
    padding: 5px 4px;
    font-size: 15px;
  }

  .masthead[data-stuck] .masthead__quick { display: none; }

  .masthead[data-stuck] .masthead__aurora { opacity: .4; }
}

@media (max-width: 560px) {
  .seafoot__cols { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------ 14. 动效与无障碍 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

.masthead :focus-visible,
.seafoot :focus-visible {
  outline-color: var(--wave);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .to-top { transition: none; }
}
