/* ============================================================
   必一赛场 · 共享样式 /assets/site.css
   ============================================================ */

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

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

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- tokens ---------- */
:root {
  --ink-950: #061A16;
  --ink-900: #0B2A23;
  --ink-800: #123D32;
  --ink-700: #1F5C4A;
  --cyan: #2DE2C5;
  --cyan-soft: #A7F8EA;
  --ember: #FF5A36;
  --paper: #F2F7F1;
  --mute: #8FAFA6;
  --line: #3E6B5E;

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

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-organic: 3px 18px 3px 18px;
  --radius-small: 2px 12px 2px 12px;
  --ease: cubic-bezier(.32, .72, 0, 1);
}

/* ---------- base ---------- */
body {
  background-color: var(--ink-950);
  background-image:
    radial-gradient(90% 55% at 100% 0%, rgba(45, 226, 197, .07), transparent 60%),
    radial-gradient(70% 45% at 0% 12%, rgba(31, 92, 74, .22), transparent 62%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--cyan); color: var(--ink-950); }

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

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

/* ---------- layout helpers ---------- */
.shell {
  width: min(1240px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.shell--narrow {
  width: min(820px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.section { padding-block: clamp(2rem, 5vw, 4rem); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: clamp(1.5rem, 3vw, 2.5rem) 0;
}

/* ---------- text primitives ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--cyan);
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  color: var(--paper);
}

.lede {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.8;
  color: var(--cyan-soft);
  max-width: 58ch;
}

.prose { max-width: 68ch; }
.prose p + p { margin-top: 1em; }
.prose h3 {
  margin-top: 1.9em;
  margin-bottom: .5em;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--paper);
}
.prose strong { color: var(--cyan-soft); font-weight: 700; }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: var(--gutter);
  z-index: 120;
  padding: .7rem 1.15rem;
  background: var(--cyan);
  color: var(--ink-950);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  transform: translateY(-130%);
  transition: transform .2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .62rem 1.15rem;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  color: var(--paper);
  background: transparent;
  transition: color .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--ink-950);
}

.btn:active { transform: translateY(1px); }

.btn--line {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--line:hover,
.btn--line:focus-visible {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-950);
}

.btn--solid {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-950);
}

.btn--solid:hover,
.btn--solid:focus-visible {
  background: var(--cyan-soft);
  border-color: var(--cyan-soft);
  color: var(--ink-950);
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  isolation: isolate;
  background: var(--ink-950);
  border-bottom: 1px solid var(--line);
  color: var(--paper);
}

.site-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 220% at 6% -40%, rgba(45, 226, 197, .16), transparent 62%),
    linear-gradient(180deg, var(--ink-900) 0%, var(--ink-950) 82%);
}

/* 更新细条 */
.head-ping {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .48rem var(--gutter);
  background: rgba(18, 61, 50, .72);
  border-bottom: 1px solid var(--line);
  font-size: .78rem;
}

.head-ping__text {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  color: var(--cyan-soft);
  letter-spacing: .02em;
}

.head-ping__tag {
  flex: none;
  display: inline-block;
  padding: .12rem .42rem;
  background: var(--ember);
  color: #2A0A03;
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .14em;
  border-radius: 2px;
}

.head-ping__link {
  flex: none;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(45, 226, 197, .45);
  padding-bottom: 1px;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.head-ping__link:hover,
.head-ping__link:focus-visible {
  color: var(--cyan-soft);
  border-bottom-color: var(--cyan-soft);
}

/* 品牌 + 导航两端布局 */
.head-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: inherit;
}

.brand-glyph {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.brand-glyph i {
  display: block;
  width: 5px;
  border-radius: 2px 2px 0 0;
  background: var(--cyan);
  transition: background-color .2s var(--ease);
}

.brand-glyph i:nth-child(1) { height: 13px; background: var(--cyan-soft); }
.brand-glyph i:nth-child(2) { height: 21px; background: var(--cyan); }
.brand-glyph i:nth-child(3) { height: 28px; background: var(--ember); }

.brand:hover .brand-glyph i:nth-child(1),
.brand:hover .brand-glyph i:nth-child(2) { background: var(--paper); }

.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.26rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--paper);
}

.brand-sub {
  margin-top: .2rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  color: var(--mute);
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 1.8vw, 1.75rem);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 1.3vw, 1.15rem);
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: .35rem .2rem;
  font-size: .92rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--paper);
  transition: color .18s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .24s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible { color: var(--cyan-soft); }

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

.nav-link[aria-current="page"] {
  color: var(--cyan);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -.5rem;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  background: var(--cyan);
  border-radius: 1px;
  transform: rotate(45deg);
}

.nav-cta {
  padding: .42rem .95rem;
  font-size: .82rem;
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  padding: .5rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(18, 61, 50, .7);
  color: var(--cyan-soft);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--cyan);
  color: var(--paper);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.site-head[data-open] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-head[data-open] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.site-head[data-open] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 阅读进度线 */
.head-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}

.head-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan-soft) 62%, var(--ember) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- footer ---------- */
.site-foot {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-900) 0%, var(--ink-950) 72%);
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 1.25rem;
}

.site-foot::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -120px;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(45, 226, 197, .12), transparent 66%);
  pointer-events: none;
}

.foot-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, .85fr)) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}

.foot-brand__name {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--paper);
}

.foot-brand__name::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 1px;
  transform: rotate(45deg);
}

.foot-brand__line {
  margin-top: .8rem;
  max-width: 26ch;
  font-size: .9rem;
  color: var(--mute);
}

.foot-brand__icp {
  margin-top: 1rem;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--mute);
}

.foot-col__title {
  margin-bottom: .9rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--cyan-soft);
}

.foot-col ul {
  display: grid;
  gap: .55rem;
}

.foot-link {
  display: inline-block;
  font-size: .9rem;
  color: var(--mute);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.foot-link:hover,
.foot-link:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--cyan);
}

.foot-contact__row {
  display: grid;
  gap: .2rem;
  margin-bottom: .85rem;
}

.foot-contact__key {
  font-size: .66rem;
  letter-spacing: .18em;
  color: var(--mute);
}

.foot-contact__val {
  font-size: .9rem;
  color: var(--paper);
  word-break: break-word;
}

.foot-base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.1rem;
  border-top: 1px solid rgba(62, 107, 94, .55);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--mute);
}

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.foot-legal a {
  color: var(--mute);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.foot-legal a:hover,
.foot-legal a:focus-visible {
  color: var(--cyan);
  border-bottom-color: currentColor;
}

/* ---------- shared content components ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--mute);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--line);
}

.breadcrumb a {
  color: var(--mute);
  text-decoration: none;
  transition: color .16s var(--ease);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--cyan); }

.card {
  position: relative;
  padding: clamp(1.1rem, 2vw, 1.6rem);
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius-organic);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.card:hover { border-color: var(--cyan); }

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem .5rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--cyan-soft);
  background: rgba(45, 226, 197, .07);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.tag--ember {
  color: var(--ember);
  background: rgba(255, 90, 54, .08);
  border-color: rgba(255, 90, 54, .55);
}

.media {
  position: relative;
  overflow: hidden;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 4px 22px 4px 22px;
}

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

.media--wide { aspect-ratio: 16 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }

.media__caption {
  margin-top: .6rem;
  font-size: .78rem;
  color: var(--mute);
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .35rem 0 1rem;
    background: var(--ink-900);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 44px -30px #000;
  }

  .site-head[data-open] .site-nav { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: .82rem var(--gutter);
    font-size: 1rem;
    border-bottom: 1px solid rgba(62, 107, 94, .45);
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"]::before {
    left: auto;
    right: var(--gutter);
  }

  .nav-cta {
    margin: 1rem var(--gutter) 0;
  }

  .head-ping__link { display: none; }

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

  .foot-brand { grid-column: 1 / -1; }

  .foot-brand__line { max-width: none; }
}

@media (max-width: 640px) {
  .head-ping { font-size: .72rem; }
  .head-ping__text { gap: .45rem; }
  .brand-name { font-size: 1.1rem; }
  .brand-sub { font-size: .58rem; letter-spacing: .1em; }
  .head-main { padding: .7rem var(--gutter); }

  .foot-grid { grid-template-columns: 1fr; }
  .foot-base { justify-content: flex-start; }
}

@media (max-width: 380px) {
  .brand-sub { display: none; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .skip-link { transition: none; }
  .nav-link::after { transition: none; }
}
